|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Wed Aug 20, 2003 7:07 pm
Help: Auto attack |
OK,
Engage: You face { a | the | an | |}<enemy>
Attack: You swing <your weapon> at <enemy>
After attack:_ second until next action.
What i am trying to do is wait until the _ seconds are up, then #SHOW "attack!"
here is the triggers/aliases/variable i have so far, its not working that well though... |
|
|
|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Wed Aug 20, 2003 7:07 pm |
#CLASS {Combat}
#ALIAS t {#IF (@head == 0) {thrust @Ene} {thrust @Ene head}}
#ALIAS j {#IF (@head == 0) {jab @Ene} {jab @Ene head}}
#ALIAS l {#IF (@head == 0) {lunge @Ene} {lunge @Ene head}}
#ALIAS k {kill %1;thrust %1 head}
#VAR ki {0}
#VAR kil {1}
#VAR head {0}
#VAR Ene {0}
#VAR action {}
#TRIGGER { ... Severing {his|its|her} head!!!!} {#VARIABLE head 0}
#TRIGGER {(%*) is DEAD!!$} {#VARIABLE ki 1;#VAR kil 1;#VAR Ene 0;#COLOR Coral;;#MESS 2 %1 is DEAD!!;salvage corpse;craft unlearn salvaging butchering flesh;get chest cor;get rune cor;;get ring cor;;put ring port;;get all.dented cor;;put all.dented port;;drop all.meat;;get boot cor;;put boot port;sac cor}
#TRIGGER {You flee head over heels from combat!} {#VAR hi 1}
#TRIGGER {_DIEMSG_} {#VAR ki 1}
#TRIGGER {You face{ a | the | an | |}(%w)} {#VARIABLE ki 0;#VARIABLE head 1;#VARIABLE kil 0;#VAR Ene %1;#LOOP 20 {#IF (ki=0) {1};#WAIT 6000}}
#TRIGGER {(%d) seconds until next action.} {#STATE 1;#MATH action (%1*1000);#WAIT @action;;#IF ki=0 {;#SHOW %ansi(high,red) Attack!; }}
#COND {^{Warrb|Tayzo} Attacks:} {#STATE 0}
#TRIGGER {} {}
#CLASS 0 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Aug 21, 2003 5:48 pm |
#TRIGGER {(%d) seconds until next action.} {#ALA +%1 {#IF (@ki = 0) {#CR;#SHOW %ansi(high,red)Attack!;#CR}}}
|
|
|
|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Thu Aug 21, 2003 9:56 pm |
the _ second until next action happens right after you attack and when a new thing comes up, like public/private line, or the enemy attacks you
the thing is i want it to trigger only right after i attack |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Aug 21, 2003 10:17 pm |
#TR {^{Warrb|Tayzo} Attacks:}
#COND {(%d) seconds until next action.} {#ALA +%1 {#IF (@ki = 0) {#CR;#SHOW %ansi(high,red)Attack!;#CR}}} {Within|Param=5} |
|
|
|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Thu Aug 21, 2003 11:02 pm |
thanks a lot you are very helpful and knowlagable LightBulb
#TR {^{Warrb|Tayzo}: Attacks} {#TEMP {&wait seconds until next action.} {#ALA +@wait {#IF (@ki = 0) {#CR;#SHOW %ansi( high, red)Attack!;#CR;}}}}
will that work dimbulb? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Aug 22, 2003 6:26 pm |
No, not if your previous pattern was correct. You had the colon following Attacks, now you have it before Attacks. They can't both be right.
It also has the serious flaw that a new #TEMP trigger can be created each time Warrb or Tayzo Attacks, even if the previous one hasn't fired yet, all of which will fire the next time you get the "wait" message. Each #TEMP will then create a one-time alarm with the same delay, so they'll all go off at the same time.
I don't see any excuse for you to compliment me on my knowledge at the beginning of your post and then insult me for my ignorance at the end of it. Please remove the one you didn't mean. |
|
|
|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Fri Aug 22, 2003 10:14 pm |
Tayzo is my alt. they can't be on at the same time, and i messed up the first time, this is how attacks go:
>[**********] [ |+++++]
>[**********] [ |+++++]
><150/150hp 179/179m 169/185mv 3074/3074/3074xp (2 feet)You swing A generic sword at the guard!
Warrb: Attacks the guard (39.6+49=88.6, 5.1 Target) *hit*
... and strike an iron helm!
... critical hit (x4)!
... Severing his head!!!!
... You cause 308 damage.
6 seconds until next action.
>[**********] [ |+++ ]
>[* ] [ |+++++]
><150/150hp 179/179m 169/185mv 3074/3074/3074xp (2 feet)
My fighting prompt starts with >
i don get what exactly your saying... Attack! does show up twice
P.S. you inspired me to do the trig i posted above thats why i thanked you |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Aug 23, 2003 1:22 am |
What I mean is:
{^{Warrb|Tayzo}: Attacks}
{^{Warrb|Tayzo} Attacks:}
are different, because the colon (the :) is in a different place. Anything that matches the first pattern won't match the second, and vice versa.
I based my trigger on the trigger you had in your original script, however I moved the "attack" pattern to state 0 and the "secs" pattern to state 1, since your trigger was intended to react to them in that order. I still think it's better to use the #CONDITION and the Within parameter (set the number to however many lines you think is necessary, I just took a wild guess) instead of creating #TEMP triggers which can easily stack up and later produce massive spam. It's your script though, so do as you choose. |
|
|
|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Sat Aug 23, 2003 4:04 pm |
the only problem with the condition is that sometimes things can go in between my attack and _seconds until next action. So i made the temporary trigger so it would trigger once and delete itself, however now sometimes i get 2 Attack! and sometimes just 1. I didn't understand what you said before, mind restating my temp trigger, or another way to do it. Here is what an attack "could" happen:
Warrb: Attacks the guard (39.6+49=88.6, 5.1 Target) *hit*
... and strike an iron helm!
... critical hit (x4)!
... Severing his head!!!!
... You cause 308 damage.
Kazin oocs 'hello'
Autumn oocs 'hi'
Lingolas says 'i need a heal'
6 seconds until next action.
any amount of lines could be inbetween the attack and the time it shows you the action thing. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Aug 23, 2003 4:43 pm |
Then just drop the Within option.
#COND {(%d) seconds until next action.} {#ALA +%1 {#IF (@ki = 0) {#CR;#SHOW %ansi(high,red)Attack!;#CR}}} |
|
|
|
Warrb Beginner
Joined: 20 Aug 2003 Posts: 10
|
Posted: Sat Aug 23, 2003 5:38 pm |
k, thx
|
|
|
|
|
|