Welcome to the Builder Academy

Question DG-Script help

More
27 Mar 2018 08:22 #7812 by Nero
DG-Script help was created by Nero
I have a cleric mob that I want to be able to cast heal on herself to top off her hp.
Basically for in fight, I have a hitprcnt trigger that she casts when her hp is below 80%
Code:
wait 1 sec dg_cast 'sovereign heal' %self% say The gods favor me in my faith towards Jerec! wait 3 sec

I want to also have it to where if the player flees out of combat and she is below 90% she will top herself off with a heal.
How would I go about doing this?

Please Log in or Create an account to join the conversation.

More
28 Mar 2018 13:33 #7820 by lacrc
Replied by lacrc on topic DG-Script help
For the second question, (tbh I do not now very much about DGs hehe) but how about just showing a message like you're already doing but instead of casting an actual spell just setting her HP using trigger vars?
Something like:
Code:
eval perc (%actor.hitp% * 100) / %actor.maxhitp% if %perc% < 90% && !%actor.fighting% %actor.hitp% = %actor.maxhitp% endif
Haven't tested that code and again I'm not that good with DGs, just an idea :)

For the first question, do you already have a spell that does that? Asking cause dg_cast() needs an existing spell so, does the 'sovereign heal' spell already exists or are you asking for directions on how to create that spell?

Please Log in or Create an account to join the conversation.

Time to create page: 0.193 seconds