mob
verb
Swift()
skillname = "Swift"
if(usr.Swift == 1)
return 0
else if(usr.Swift == 2)
usr<<"You must wait before you can use this skill again!"
else if(usr.Swift == 0)
usr<<"You feel faster than before."
usr.rundelay = 2
usr.Swift = 1
sleep(100) // Your speed is 2 for 10 seconds.
usr.rundelay = 6 // Return ...
usr<<"You feel normal, again."
usr.Swift = 2
sleep(600) // 1 minute cooldown.
usr.Swift = 0
Recover()
skillname = "Recover"
if(usr.Recover == 1)
return 0
else if(usr.Recover == 2)
usr<<"You must wait before you can use this skill again!"
else if(usr.Recover == 0)
return // Not coded in yet.
Problem description:
No problem, but I just want to know if there is an easier way to do skills like this.
Basically, what I did was took all usr out because in verbs and procs, it is more often than not (about 99% of the time) frowned upon. I also changed your else if statements into a simple switch procedure, and that's about it. I also removed the if(1) lines because they were redundant.
Hope it helps.