Creating an Armor that heals for a small percentage after you kill a mob

  • Nero
  • Nero's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 year 7 months ago #9759 by Nero
Looking for ideas on how to accomplish this without having to change around code or cause any exploitation.

I have something similar on a wieldable item that randomly does a heal proc so it would be something based off that.
Any help would be great!
Name: 'Anduril Heal Proc',  VNum: [20043], RNum: [ 2118]
Trigger Intended Assignment: Objects
Trigger Type: Random , Numeric Arg: 100, Arg list: None
Commands:
eval actor %self.worn_by%
if !%actor%
halt
end
if %actor.pos% != Fighting
halt
end
  switch %random.8%
    case 1
if !%actor%
halt
end
      %echo% %self.shortdesc% briefly glows with a blue aura.
      %damage% %actor% -55
    break
    case 2
if !%actor%
halt
end
      %echo% %self.shortdesc% briefly glows with a blue aura.
      %damage% %actor% -60
    break
    case 3
if !%actor%
halt
end
      %echo% %self.shortdesc% briefly glows with a blue aura.
      %damage% %actor% -65
    break
    case 4
if !%actor%
halt
end
      %echo% %self.shortdesc% briefly glows with a blue aura.
      %damage% %actor% -70
    break
    default
    break
  done

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

More
1 year 7 months ago #9762 by Parnassus
I think the problem will be in knowing when the player has killed a mob. You can see when the player is fighting and not fighting but there are variables between such as fleeing. If you use the mob-death-message, it could be a different player with a different mob death.

Another thing to think about would be the intensity of the heal. For instance: would you heal the same amount for a one-hit fido as for that dragon that took you an hour and used up all your heals?

The trigger you've used just heals as you are fighting which is relatively easy. It might be more fun (triggerly speaking) to upgrade the healing according to how long you've been fighting as opposed to randomly but checking to see IF you're fighting is much easier than:
Are you fighting now?
Were you fighting a second ago?
If you were fighting a second ago but not now, how did the fight end?

I suppose you might be able to have it depend on the experience gained from a won fight but I don't know how that could be triggered. If you could figure that out, then the intensity of the heal could be based on the experience gain, although this doesn't always reflect the difficulty of the fight. That one-hit fido probably didn't generate any experience so there would be no healing.

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

More
1 year 7 months ago #9763 by thomas
I think this may be a use case for a new type of trigger (OBJECT_DEATH_TRIGGER?)

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

More
1 year 7 months ago #9764 by Parnassus
That's an interesting thought. Darn! I was thinking that a mob death trigger would work but that would mean putting a trigger on every mob or only having the armor work with certain mobs.

Hmm, how about a mob death trigger that the armor attaches?
Is the player fighting?
Who is the player fighting? Is it a mob?
Attach a death trigger to the mob.
If the trigger fires, then the mob has died so check to see if the killer is the owner of the armor that attached the trigger.

It's kinda weird but it has possibities. Maybe?

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

More
1 year 4 months ago #9778 by Shaoden
I wrote a trigger years ago that does damage on hit.

tstat 38215 maybe will be of some help.
I actually have alot of wierd crap in 382 zone, free free to browse.

Name: 'fireshield', VNum: [38215], RNum: [ 3338]
Trigger Intended Assignment: Objects
Trigger Type: Command , Numeric Arg: 1, Arg list: flameon
Commands:
eval hp %actor.hitp%
set room_var %actor.room%
set target_ch %room_var.people%
if %actor.pos% != fighting
%send% %actor% You need the rage of fighting to ignite your firey soul.
%echoaround% %actor% %actor.name% tries to ignite %actor.hisher% firey soul but lacks the fighting
rage.
else
%send% %actor% A flame wall surrounds you.
%echoaround% %actor% %actor.name% focuses %actor.hisher% rage into a flame wall surrounding
%actor.hisher% body
while %actor.pos% == fighting
wait 1s
if %actor.hitp% < %hp%
eval hp %actor.hitp%
%damage% %actor.fighting% 20
%send% %actor% Your flame has burned %actor.fighting.name%
%send% %actor.fighting% %actor.name%'s flame has burned you.
while %target_ch%
if %target_ch% != %actor% && %target_ch% != %actor.fighting%
%send% %target_ch% %actor.name%'s flame wall has burned %actor.fighting.name%
end
set target_ch %target_ch.next_in_room%
done
set target_ch %room_var.people%
else
return 0
end
done
end
The following user(s) said Thank You: thomas

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

Time to create page: 0.092 seconds