Hey,
I was wondering how i could create a Code to hold a certain item in a players inventory.
This is what i have in mind:
Player wlaks up to an Object (This case a Berry Tree)
The player clicks Check(The verb) on the Tree
He finds a Berry, And then it is moved to his/her inventory.
If he/she tries to check for anothe rberry, It gives him/her a message telling them the Tree has no berries now (Since he has to wait 5 seconds each tiem he picks one, Can be done with a sleep(50)
Lets say he has done that 5 tiems, So he has 5 berrys in his inventory, The player then trys to pick another berry from that tree, But then gets a message saying he has too many berrys in his Inventory!
Is there a way to do this?
So to go over it again quickly
Tree
Pick berry
Has to wait 5 seconds
Maximum berrys in Inventory can be 5
How would i go about coding this?
ID:163085
Oct 14 2007, 7:14 am
|
|
mob/var |
The tree and berry will probably have to be mobs.
pick berry can be a verb added within view of the tree.
Yes sleep(50) will wait 5 seconds.
Now what you can do is add a var to the berry so that a count can be maintained.
I think those are good starting points for all of your objectives. The best thing to do now is abuse the hell out of Dream Maker's help function. read about mobs and the sleep command and all of that good junk.