| Mirage Source http://www.miragesource.net/forums/ |
|
| Simple question... prob for most of you. http://www.miragesource.net/forums/viewtopic.php?f=201&t=565 |
Page 1 of 1 |
| Author: | halla [ Thu Sep 28, 2006 3:46 am ] |
| Post subject: | Simple question... prob for most of you. |
Ok im learning how MS works. I know how to send data with winsock myself but when with MS im confused. More less I want to add more stuff to the characters files. Like for my pokemon game pokemon and their info. So I want the client to send that to the server with the rest of the character info and then the server send it back when called for... could someone give me an example of adding just 1 thing and I can work from there. Thanks. |
|
| Author: | Kenko [ Thu Sep 28, 2006 11:10 am ] |
| Post subject: | |
Under your Pokemon type or class, add more variables for whatever you want. Like: Type Pokemon Name as String EvolutionPercent as Byte End Type That would be for both server-side and client-side. Send the data using winsock with SendData. When it reaches the server, save it to the file or database, and then you may call it or update it whenever you wish. Hopefully that helps. |
|
| Author: | Obsidian [ Thu Sep 28, 2006 1:48 pm ] |
| Post subject: | |
Okay you're going to want to setup Pokemon for the player so you'll have something similar to Please Read Over This to make sense out of it. Code: Type PokemonAttackRec
AttackNum as Long End Type Type PokemonRec Name as String * NAME_LENGTH EvolvesTo as Long Type as Byte ' This way you can setup like Fire/Grass/Water, and not have to do 5000000+ if/case statements EvolveMethod as Byte ' Some Could Evolve With Stones or by level or whatever... EvolveLevel as Integer ' Because didn't they evolve at a certain Point? ' These Might be different... depends on what YOU want HP as Long MP as Long SP as Long ' Attacks PlayerPokemonAttacks(0 to 4) as PokemonAttackRec End Type Type PlayerRec ... PlayerPokemon(0 to max_player_pokemon) as PokemonRec ... End Type Pokemon(1 to max_pokemon) as Pokemon Rec Now if you did it this way, you'd have to make "Pokemon" directly editable, like Items... unless you just replaced "Npcs" with them, but i figured you didnt so you could leave the people walking around as the NPCs, but whatever. You'd also have to make an "Attack Editor", so you could do things like name the attack, the damage that it does, etc. Hope this helps, and i hope you could make some sense out of it! |
|
| Author: | halla [ Thu Sep 28, 2006 4:19 pm ] |
| Post subject: | |
I dont need all of that. Just how to send 1 thing of info when it makes the char and saves and all of that. for example when it sends your name or something everything you have to do to add that. Like help me just add 1 thing to the character file and I can work from there. Im going to add all their info to their character file. |
|
| Author: | William [ Thu Sep 28, 2006 7:18 pm ] |
| Post subject: | |
Sounds like you dont know packets? If so, check this: http://ms.shannaracorp.com/forums/viewtopic.php?t=418 |
|
| Author: | halla [ Thu Sep 28, 2006 9:39 pm ] |
| Post subject: | |
yeah but I mean to send it with the character info |
|
| Author: | Obsidian [ Thu Sep 28, 2006 11:13 pm ] |
| Post subject: | |
I guess we just misunderstood... just update the "playerdata" packets... |
|
| Author: | William [ Fri Sep 29, 2006 6:41 am ] |
| Post subject: | |
Obsidian wrote: I guess we just misunderstood... just update the "playerdata" packets... Basicly you just add:
Code: SEP_CHAR & variable & SEP_CHAR & variable2 & SEP_CHAR & END_CHAR And then make sure to receive it in the server by using: Code: Dim test as long
test = Val(Parse$(num)) Do you understand? |
|
| Author: | halla [ Fri Sep 29, 2006 8:10 pm ] |
| Post subject: | |
Yeah I understand I just want it to save with all the character info and load then as well I will figure it out I guess |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|