Page 1 of 1

HP Trigger?

Posted: Tue Jul 14, 2020 8:06 am
by DSLPlayer78
Hey all!!

I'm new to mudlet and new to coding in general. Yes, I know this is jumping into the deep end :) So I play Dark and Shattered Lands. I have installed a PNP Package and have added a few triggers and aliases that are functioning smoothly.

What I want to do is make a Trigger that shoots out a one time echo when my HP reaches a certain threshold. There's a forum post here and an example in the Mudlet Manual on HP Triggers but I am probably just not entering it into the right box.

So it would basically be something like if HP <= 1900 then echo "Powerswing"....or something to that affect.

Thanks in advance!

Re: HP Trigger?

Posted: Tue Jul 14, 2020 3:54 pm
by demonnic
Do you have a prompt trigger setup that records your HP? If so, what does that look like?

Re: HP Trigger?

Posted: Wed Jul 15, 2020 5:40 am
by DSLPlayer78
The PNP I am using has gauges and a custom prompt so I would assume it would be capturing HP data. I just have to see if I can find the actual code.

Re: HP Trigger?

Posted: Wed Jul 15, 2020 11:12 pm
by demonnic
hmm, might be easiest to hop on discord for something like this, since it seems there may be some back and forth involved in finding it.

Re: HP Trigger?

Posted: Fri Jul 24, 2020 3:09 am
by DSLPlayer78
Ok sweet...I found a guy well versed in the PNP I am using...he gave me this but I am trying to figure out where to put it...is it a prompt trigger? if so I can't get it to work or I am missing a piece of code to get it to work:


if dslpnp.prompt.health_percent_number < 80
then echo("test test test test test test test test")
end

tried it as a prompt trigger but nothing triggered. I selected "prompt trigger" and put the if/then statement below.....

ah....maybe I need to put it at the end of the actual pnp script....

Alan