- Posts: 138
- Thank you received: 7
DG-Script help
- Nero
-
Topic Author
- Offline
- Premium Member
-
Less
More
5 years 6 months ago #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%
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?
Basically for in fight, I have a hitprcnt trigger that she casts when her hp is below 80%
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.
- lacrc
-
- Offline
- Senior Member
-
Less
More
- Posts: 53
- Thank you received: 26
5 years 6 months ago #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: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?
Something like:
eval perc (%actor.hitp% * 100) / %actor.maxhitp%
if %perc% < 90% && !%actor.fighting%
%actor.hitp% = %actor.maxhitp%
endif
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.082 seconds