|
wmiller8 Newbie
Joined: 01 Mar 2009 Posts: 3
|
Posted: Mon Mar 23, 2009 11:50 pm
Stumped, Again! |
So... Not sure how to do something here... i need to make it so that IF a certain variable goes below an amount, i execute a series of actions. My apologies if the answer is simple and i've missed it, but that's be all the better. Basically, what I'm out to do is set it so that if a i drop below 100 hp or so i flee and gate to my secret hiding hole.
|
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Tue Mar 24, 2009 2:01 am |
Well that is simple. How are you assigning the value to the variable? You need to provide more information. Are you doing it on your prompt or what? Just put in an #if statement just like you say. #if (@health < 100) {stop doing everything and flee to secret hiding hole}.
|
|
|
|
wmiller8 Newbie
Joined: 01 Mar 2009 Posts: 3
|
Posted: Tue Mar 24, 2009 2:04 am |
Taking it from the prompt, The variable is entitled hp
That gets me a lot closer... is it possible to make nullifying triggers part of that with the #t- command? |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Tue Mar 24, 2009 2:57 am |
#if (@hp < 100 && @berserk < 1) {flee to secret hiding hole} {#exec badass;#var berserk 0}
#al badass {some pwn}
#al stay {#var berserk 1}
fight
fight
you type stay
fight some pwn
else
you chicken you
Edit: That should nullify it, I assumed you just wanted control since you had practically answered your own question, to use #T- or #T+ from triggers just follow the Help about IDs. The second section's {#exec badass;} is not needed but you could put a message there so you know the trigger is working as expected. The semicolon breaks the command line into two commands. |
|
|
|
|
|