|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Tue Oct 27, 2009 5:53 am
trigger help |
hello,
im having some problems with a trigger, i dont know if cmud just did not want to parse it or what but here it goes
the code triggers off of
INFO: The wind of duality strengthens, as Hadar aligns themself (*) steps closer with Tao.
it fired correctly it outputted 80weaps when i hit level 70
but the mud said huh insted of cmud parsing it
Code: |
#forall {@thisisavarjustforstatmon} {#additem numbtosubtractfrom %eval( %i-%db( @Level_Info_DB, totaltiers)0)}
#if (%ismember( %1, @numbtosubtractfrom)) {%eval( %1+%db( @Level_Info_DB, totaltiers)0)weap}
|
thanks for your help |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Oct 27, 2009 3:47 pm |
What is it you actually want this code to do? You haven't given us any information on what @Level_Info_DB contains. What is totaltiers? Is it supposed to be a variable, @totaltiers? You are doing a number of odd or even incorrect things in your code, such as implicit concatenation, and a commandline beginning with a %function. Without knowing what you are actually trying to do, I hesitate to even start debugging this.
|
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Tue Oct 27, 2009 10:23 pm |
the var @thisisavarjustforstatmon is a set number of levels that i have equipment at, then i use #additem numbtosubtractfrom %eval( %i-%db( @Level_Info_DB, totaltiers)0) to take the level in thisvarisjustforstatmon ... and subtract X levels where right now X=1 and the 0 at the end is to make sure its 10.
as i said it works as a whole, its just that when it sends the command 80weap, for example it does not register it as an alias, it just sends it to the mud like that and the mud outputs huh,
now for the example i gave *weap is an alias i use to change my weapons for me so i dont forget, i use the code to as i said take the number for thisisavar' and subtract 10 levels so i can use it 10 levels early ... i dont know if im making sense, i think im just going to bed |
|
|
|
Tarken Aurelius Apprentice
Joined: 23 Oct 2008 Posts: 120 Location: Cincinnati, Ohio
|
Posted: Wed Oct 28, 2009 1:30 pm |
If you could, please paste inside the entire code you are using, #TRIGGER fully expanded. Also, an example of your desired imput-reaction sequence would help us tremendously with helping you.
|
|
_________________ Tarken Aurelius, quality triggers since 2004! Trigger consulting since 2008! Content Developer at BatMUD (www.bat.org) |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Oct 28, 2009 5:33 pm |
It sounds like you are saying that '80weap' is the correct result, but that it is supposed to fire an alias. Am I understanding you correctly?
You cannot have a wildcard in an alias, so an alias of '*weap' won't work. Is '80weap' an alias? If it is not, then Cmud is simply deciding it is not a known command and sending it along to the mud, as it will do with any input that is not a known command. Perhaps you really want 80 to be a parameter of an alias 'weap', e.g. 'weap 80'? |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Fri Oct 30, 2009 4:55 pm |
Rahab wrote: |
It sounds like you are saying that '80weap' is the correct result, but that it is supposed to fire an alias. Am I understanding you correctly? |
yes you are correct
Code: |
#trigger {INFO: The wind of duality strengthens, as Hadar aligns themself (%d) steps closer with Tao.} {#forall {@thisisavarjustforstatmon} {#additem numbtosubtractfrom %eval( %i-%db( @Level_Info_DB, totaltiers)0)};#if (%ismember( %1, @numbtosubtractfrom)) {%eval( %1+%db( @Level_Info_DB, totaltiers)0)weap}} |
thats my whole trigger when i reached level 70 it fired the command 80weap but all i got is a huh which is below
... 1 second need to look for log
Code: |
You raise a level! You are now level 70.
INFO: The wind of duality strengthens, as Hadar aligns themself 70 steps closer with Tao.
80weap
You gain 34 hit points, 27 mana, 22 moves, 11 practices and 4 trains.
noexp
Lucky! You gain an extra 1 training session!
You can now use the following skills and spells :
Spell Rainbow.
You get 2,166 gold coins from the frozen corpse of The Pale Rider.
Sorry Hadar, I don't understand you.
2183/2552/85% 676/1965/34% 2047/2069 (regpr) 541240 2944xp 0tell 2500 | 26tc |DX
You will no longer receive experience. Happy questing! |
where what should of happened was ...
Code: |
80weap
2204/2552/86% 658/1965/33% 2069/2069 (regpr) 540540 2944xp 0tell 2500 | 26tc |DX
--> TICK <-- (Hp: 87%, Mn: 35%, Mv: 100%, Qt: 25)
rem 299101
rem 280050
put 299101 (296263)
put 280050 (296263)
get (281089) (296263)
wield (281089)
get (280050) (296263)
dual (280050) |
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 30, 2009 5:35 pm |
Quote: |
Is '80weap' an alias? |
You didn't answer this question. If 80weap is not an alias, it's not going to work. If it is an alias, try putting #exec before the %eval(). A command line should not start with a %function. |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Mon Nov 02, 2009 4:54 pm |
addind the #exec workd thanks
|
|
|
|
|
|