Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: 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
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: 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
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Tarken Aurelius
Apprentice


Joined: 23 Oct 2008
Posts: 120
Location: Cincinnati, Ohio

PostPosted: 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)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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'?
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: 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)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Mon Nov 02, 2009 4:54 pm   
 
addind the #exec workd thanks
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net