|
darkdragon Newbie
Joined: 13 Oct 2001 Posts: 5 Location: USA
|
Posted: Fri Feb 08, 2002 3:37 pm
Fleeing away from mobs. |
Ok here is a solution that i want help on. if i flee like west and i want to go back is there any possible solution to that.
You flee west, head over heels.
and i want to go back east to kill my mob...is that possible? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Feb 08, 2002 5:39 pm |
Yes it's possible, provided that east is the correct direction. This might work. The fillers are to avoid a result of 0 from the modular division.
#VAR directionlist{up|north|northeast|east|southeast|filler1|down|south|southwest|west|northwest|filler2}
#TR {You flee (%t), head over heels} {%item(@directionlist,%eval((%ismember(%1,@directionlist)+6)12))}
LightBulb
All scripts untested unless otherwise noted |
|
|
|
darkdragon Newbie
Joined: 13 Oct 2001 Posts: 5 Location: USA
|
Posted: Sat Feb 09, 2002 1:26 am |
#VAR directionlist{up|north|northeast|east|southeast|filler1|down|south|southwest|west|northwest|filler2}
#TR {You flee (%t), head over heels} {%item(@directionlist,%eval((%ismember(%1,@directionlist)+6)12))}
what if i just want the up, north, east, down, south, west......does that have to change the number 6? and that "" is that suppose to be "/"? Le met know.....thanks |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Feb 09, 2002 4:43 am |
There are 12 items in the stringlist. Half of that is 6. If you only use 6 directions instead of 10, you'll only need 8 items in the stringlist and half of that is 4.
#VAR directionlist{up|north|east|filler1|down|south|west|filler2}
#TR {You flee (%t), head over heels} {%item(@directionlist,%eval((%ismember(%1,@directionlist)+4)8))}
No, it's supposed to be . / is normal division, which gives a quotient. is modular division which gives a remainder and the algorithm relies on a remainder for its operation.
I'm glad you asked, though. Many people use scripts without any idea how they work and thus have no idea what's wrong when they don't. It's nice to see someone who wants to understand.
LightBulb
All scripts untested unless otherwise noted |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|