HP Trigger?

Post Reply
DSLPlayer78
Posts: 4
Joined: Mon Jul 13, 2020 3:04 am

HP Trigger?

Post 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!

User avatar
demonnic
Posts: 676
Joined: Sat Dec 05, 2009 3:19 pm

Re: HP Trigger?

Post by demonnic »

Do you have a prompt trigger setup that records your HP? If so, what does that look like?

DSLPlayer78
Posts: 4
Joined: Mon Jul 13, 2020 3:04 am

Re: HP Trigger?

Post 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.

User avatar
demonnic
Posts: 676
Joined: Sat Dec 05, 2009 3:19 pm

Re: HP Trigger?

Post 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.

DSLPlayer78
Posts: 4
Joined: Mon Jul 13, 2020 3:04 am

Re: HP Trigger?

Post 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

Post Reply