Well, lets say I have 8 collectible items in Slime Online.
There is a Sample account file which allready has all those entrys, like this:
[Collectibles]
1 = 0
2 = 0
3 = 0
4 = 0
5 = 0
6 = 0
7 = 0
8 = 0
Every number (id) means a collectible, for example:
1 = Jetpack
2 = Pori-Pori Hat
3 = Crown
4 = Magican Hat
5 = Bird
6 = Mini-Slime
7 = Magic-Stick
8 = Unicorn
When an account is created all I do is copy the whole ini and replace just the NAME and PASSWORD aswell as renaming the file.
This way all entrys are in allready.
Now if I have old accounts that didnt have as much entrys when they were created I just check if the entry exists at all.
On the client I give those collectibles a ID in their start event.
Lets say a player gets into the room with the collectible 8.
That collectible will now send its id to the server.
the server will check like this:
ini_open(name +'.ini')
if !ini_key_exists('Collectibles',string(collectible_id))
{
Now if that entry doesnt exist that means the player didnt get the collectible yet.
All we have to do now is to send the client a message that the player should be able to take the item.
}
The collectible is invisible by default, so if he DID take it allready (if the entry does exists) it doesnt have to send anything at all and yet agani we save some bandwidth =)
If the player should that it now we can just create the entry....and thats it =)
Simple, huh?









