mob
verb
Rest()
usr.health=usr.maxhealth
usr.Energy=usr.maxEnergy
well is it a better rest verb becuz i dont like how it works i just instantly makes the health and energy no delay or nothing.
ID:139170
May 24 2011, 12:56 pm
|
|
ok this is what i have for a rest verb.
mob well is it a better rest verb becuz i dont like how it works i just instantly makes the health and energy no delay or nothing. |
Protip: Computers is not smart, you make it smart.
So, that means you have to think more logical, more from the ground. A few things i can add to your thinking: 1: How do i want the mob to rest? 2: Do i want the health/Energy to slowly increase? or: Do i want it to have a speciffic time to rest, and get max health when the timer is done? I can code something easy for you: client //This basicly means that the logedin players will get the verb, not Everything else. Makes it more efficient |
In response to Tafe
|
|
Don't use goto. Loop using while()
|
In response to MDC
|
|
Example?
|
mob |
In response to Tafe
|
|
while(1) or var/x = 10 |
The computer knows knowledge that it's given, and cannot take knowledge from your head without your input/output.
So, when you instantaneously make the mob's health equal to the mob's maximum health, there will be no delay because you're not telling DM to delay the events.
You'll want to look up sleep() and/or spawn() for delay, as well as taking a gander at while(), and for() for looping.