mob/Click()
if(usr.Bow == 0)
if(usr.Attacking == 0)
while(src in oview(1) & usr.Bow ==0)
For some reason ^ doesn't work. Does anyone know why.
However this works.
mob/Click()
if(usr.Bow == 0)
if(usr.Attacking == 0)
while(src in oview(1))
Its probably from usr.Bow == 0. Does anyone know how to fix this and still have usr.Bow == 0 part?
ID:148114
Jul 7 2003, 10:53 am
|
|
Jul 7 2003, 10:58 am
|
|
no, it's in the
|
try this one
mob/Click() if(usr.Bow==0) if(usr.Attacking==0) while(src in oview(1) && usr.Bow==0) blah blah blah... and if that doesn't work try it like this mob/Click() if(usr.Bow==0) if(usr.Attacking==0) while(src in oview(1)) if(usr.Bow==0) blah blah blah... |
mob/Click() try that 'n' dun ferget yer dee emm taggs sunny boy, Airjoe |
In response to Dragon of Ice
|
|
Damn you dragon of Ice...I saw him first! in byond boxing he asked for my help. and && didn't do anything he said.
|
In response to Airjoe
|
|
Airjoe that works untill there is an infinit loop. Is there a way to stop a loop?
|
In response to Blades
|
|
I thought world.loop_checks = 0 should work.
|
In response to Airjoe
|
|
No, no, no! world.loop_checks is BAD. Bad, bad, BAD. All it does it suppress runtime "infinite loop" error messages. The infinite loop still exists, and it slows down the computer something terrible. I really don't know why Dantom included world.loop_checks, because it's an absolutely appalling way of dealing with infinite loops.
You need to use spawn(). spawn() is your friend. <code>mob/Click() if(usr.Bow == 0) if(usr.Attacking == 0) spawn() usr.autoattack(src) mob/proc/autoattack(mob/target) if(!usr.Bow) //do the attack spawn(10) //In one second (you'll probably want to adjust the delay)... if (target in oview(src)) .() //...do the attack again</code> |