essay about reading and writing how to write a good compare contrast essay how to write introduction for a research paper best rated resume writing services college essay quotes about essay writing

DG-Script help

  • Nero
  • Nero's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
2 years 4 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%
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.

2 years 4 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:
eval perc (%actor.hitp% * 100) / %actor.maxhitp%
if %perc% < 90% && !%actor.fighting%
    %actor.hitp% = %actor.maxhitp%
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.138 seconds