|
genie Newbie
Joined: 07 Sep 2002 Posts: 9 Location: Yemen
|
Posted: Sat Sep 07, 2002 1:11 pm
problem with triggers |
Heya..
I got a problem with whenever I enter a combat I after a while get a huge problem with commands getting queued.
The triggers I have is that I execute my combat script (pk) which sorta looks like:
cast attack spell; special attack.
Then I put my combat script in an alias which basically looks like pk t1;pk t2;pk t3
t1-3 stands for targets.
top of this I use a trigger to retrieve my HP,GP and XP looking like:
^Hp: (%d)~((%d)~) Gp: (%d)~((%d)~) Xp: (%d)
#VAR HP %1
#var HPmax %2
#var GP %3
#var GPmax %4
#var XP %5
#var XPmax 1000000
#if %1<2000 {
get potion from bags
drink potion
}
#if %3<600 {
get mana from bags
drink mana
put mana in bags
}
I use a command every 3 seconds to retrieve the info of HP,GP and XP
I dont know why the problem occures (well apparently I am executing to many commands at the same time)
When I look at the logs it looks like it is the heal trigger that somehow sets off a large amount of commands. But its hard to tell since the only message you get it (to many commands queued, discarding, restarting)
Happy for suggestions/solutions
Genie
If all you have is duct tape, everything starts to look like a duct. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Sep 07, 2002 4:09 pm |
Heal triggers are usually the culprit, but that's because most of them operate off the prompt and are triggered every time anything happens. You say that yours requires a separate command that you only input about once every 3 seconds, so it's probably not at fault. It seems more likely that it's the alias which pk's three different targets, using two commands per target. That would be 6 commands per use, and since spells and attacks usually have built-in lag, I could easily see that backing up in a hurry.
LightBulb
Senior Member |
|
|
|
genie Newbie
Joined: 07 Sep 2002 Posts: 9 Location: Yemen
|
Posted: Sat Sep 07, 2002 5:39 pm |
Thanks for your time and answer LightBulb.
yea.. Actually I have a timer on score every 3 seconds that does the output I capture for HP,GP and XP. ok so the PK alias is probably the one you gotta work on then ?
Is it possible to build a target list, lets use my example t1-13. if t1 is dead it is removed out of the alias/queue so next time the pk alias is executed the command for trying to cast the spell and using the attack is removed. Should this be a 'semi'solution ? and is it possible, if how ?
Hope that question is somewhat understandable :)
If all you have is duct tape, everything starts to look like a duct. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Sep 07, 2002 7:30 pm |
I wouldn't recommend trying to use single-attacks/spells against more than one target at a time. If you want to deal damage to multiple targets at the same time use area spells/attacks.
Yes, it's possible to create target lists and remove targets as they die. List variables are usually best for this. You can add targets to the list with the #ADDITEM command and remove targets with #DELITEM.
LightBulb
Senior Member |
|
|
|
genie Newbie
Joined: 07 Sep 2002 Posts: 9 Location: Yemen
|
Posted: Sat Sep 07, 2002 7:39 pm |
ahh my fault.. didnt explain it good enough.. the alias as it is now: if t1 exists thats the one you attack... if t1 is dead all you get is your target doesent seem to be around x2 (since I use cast spell and then special attack) and moves on to t2 (and same here if t2 is dead I get the target isnt around again x2 and then moves on to t3)
soooooo my question would be that if I deleted t1 completly from the alias if he/she is dead lessen the chance of getting to many commands queued ?
thx
genie
If all you have is duct tape, everything starts to look like a duct. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Sep 07, 2002 9:10 pm |
How many commands are queued depends entirely on how many commands you send (and how fast they are processed). There's usually very little delay in reporting that your target isn't around, so that won't affect the queue by much. Still, it's not necessary. This would probably be much easier if you'd stop beating around the bush and just give the actual triggers and commands you use (i.e. cast 'magic missile' instead of cast attack spell). Made-up examples usually just confuse things.
#ADDITEM targets t1;#ADDITEM targets t2;#ADDITEM targets t3
#TR {whatever you use to decide it's time to cast and attack} {cast attack spell %item(@targets,1);special attack %item(@targets,1)}
#TR {({@targets}) is dead} {#DELITEM targets {%1})
I don't actually know what's causing your commands to queue up. I'm just making educated guesses. You can actually try things like "removing t1 from the target list" to find out if they help. I can't. Sorry if this comes across a bit harsh, but it's frustrating when people ask me to guess about things they could actually test.
LightBulb
Senior Member |
|
|
|
genie Newbie
Joined: 07 Sep 2002 Posts: 9 Location: Yemen
|
Posted: Sat Sep 07, 2002 10:24 pm |
No it does not come of harsh. But the question wasnt only directed to you but to the whole forum. So if its frustrating handling new people on the board just ignore them. I would ;)
But yes you are right. I could test all diffrent combinations. But since I am not sure how I would actually get them to work I was hoping someone before me might had run into the problem.
Thanx for your help and time.
genie
If all you have is duct tape, everything starts to look like a duct. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Sep 07, 2002 11:05 pm |
Yes, I realize that questions are directed to the entire forum. Other people are certainly welcome to jump in if they have other ideas, they frequently do.
Basically, if you're having a problem with commands getting queued it's because you are sending commands faster than they finish processing. This usually means that you have a trigger which goes off too often. For instance, if you had an attack trigger which sends two different commands (say, cast attack spell and special attack) you would need to be sure the trigger only went off after BOTH the spell AND the special attack were finished. If it went off every time either of them was finished, you'd be sending two commands for each command that was finished.
It should be fairly easy to go through your script and find the trigger that sends more commands than have finished.
LightBulb
Senior Member |
|
|
|
|
|