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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Sun Sep 26, 2010 6:44 pm   

cant get this healing script to work..any ideas?
 
This is the script

#alias setmaxhp {#var tankmaxhp {%1}}
#var tankmaxhp {0}
#trigger {~<%d/%dhp %d/%dm %d/%dmv~> TN: (%w) TC: (%d)} {#if ((%2 * 30) < (@tankmaxhp * 100)) {cast 'rejuv' %1}}

here is an exsample of my prompt during combat

< 583hp 36m 102mv TN: Lussago TC: 583 EN: a leering scarecrow EC: nasty wounds >

what am i doing wrong?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Sep 26, 2010 7:02 pm   
 
You are not setting @tankmaxhp to anything and it's currently at 0. 0 times 100 is still 0, and so 583 times 30 is not less than 0.
_________________
EDIT: I didn't like my old signature
Reply with quote
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Sun Sep 26, 2010 7:09 pm   
 
#alias setmaxhp {#var tankmaxhp {%1}}
#var tankmaxhp {583}
#trigger {~<%d/%dhp %d/%dm %d/%dmv~> TN: (%w) TC: (%d)} {#if ((%2 * 30) < (@tankmaxhp * 100)) {cast 'rejuv' %1}}

so it should look like that?
Reply with quote
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Mon Sep 27, 2010 1:06 pm   
 
Still cant get this to work, Im z/cmud dumb so any help would be appriecated.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Sep 27, 2010 8:34 pm   
 
So which example is the correct one? I just noticed that your trigger pattern definitely does not match the example of the prompt you gave.
_________________
EDIT: I didn't like my old signature
Reply with quote
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Tue Sep 28, 2010 3:16 am   
 
The first example is what i started with, and the 2nd is how i changed it after you said i hadnt sent the tankmaxhp, I have tried it a few other ways and just cant get it to work. What i am trying to get to happen is for 'rejuv' to be cast when my hps hit or fall below 30%.
Reply with quote
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Thu Sep 30, 2010 4:09 am   
 
bump
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Sep 30, 2010 10:28 pm   
 
I think you misunderstood me.

This:
Code:
#trigger {~<%d/%dhp %d/%dm %d/%dmv~> TN: (%w) TC: (%d)} {#if ((%2 * 30) < (@tankmaxhp * 100)) {cast 'rejuv' %1}}


does not match this:
Code:
< 583hp 36m 102mv TN: Lussago TC: 583 EN: a leering scarecrow EC: nasty wounds >


because the > is in the wrong place. So which one is correct?
_________________
EDIT: I didn't like my old signature
Reply with quote
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Fri Oct 01, 2010 12:11 am   
 
I did misunderstand you, sorry about that,

OK the

Code:
#trigger {~<%d/%dhp %d/%dm %d/%dmv~> TN: (%w) TC: (%d)} {#if ((%2 * 30) < (@tankmaxhp * 100)) {cast 'rejuv' %1}}


is the trigger im trying to set up of course,

the

Code:
< 583hp 36m 102mv TN: Lussago TC: 583 EN: a leering scarecrow EC: nasty wounds >

is exactly how my combat prompt is displayed when im fighting a mob the < > are part of the prompt and not part of any code that im trying to create.

Basicly the only thing that matters from the combat prompt is


TN: Lussago TC: 583

Which is where im trying to draw the info off of in order to make the trigger fire.
I shouldnt have posted the whole combat prompt I guess as it just confused everyone:)

And thank you for taking the time to help me, if you need any other info please ask.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Oct 01, 2010 5:11 am   
 
Quote:

is exactly how my combat prompt is displayed when im fighting a mob the < > are part of the prompt and not part of any code that im trying to create.


That's my point. You didn't make the trigger pattern for that line.
_________________
EDIT: I didn't like my old signature
Reply with quote
shaughn2323
Beginner


Joined: 29 May 2009
Posts: 11

PostPosted: Fri Oct 01, 2010 2:15 pm   
 
hmm K i messed with it a little bit, but i cant get it to work, im just going to scrap it, thanks for the help.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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