Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object-oriented: Spellvamp
#1
Hi,
First of all, I ask someone to delete my first thread named "Hitting target with skills causes attacker lose HP", because it's useless. I was working on spellvamp there, and I managed to do some kind of it (ball had to die, to transfer hp to it's owner), but now my spellvamp is object-oriented, and works properly (I think, so you can check). Here's the code (it's kinda long and complicated ^^):
Of course, initial frame of ball should have state 311, like this from my previous thread if you don't have special MAX_MP function, which I'll be trying to implement (thanks Silva).

In this code when ball hit's opponent, it stores in dark red hp damage it dealt, so when target has less hp than damage of ball, then it stores his all hp, but damage dealt is divided by 3, so you get 33% spellvamp (ofc you can change value). After that, the ball hits his owner, healing him, and then again it hits target with nothing, but it has to apply visual effect. :p

By the way, don't use injury in this itr, because injury is applied before all this code, so then I should heal him for the amount he was hit, which could cause him to revive, so use "respond" as injury (or change effect 74 to something like 74xxx).
Reply
Thanks given by:


Messages In This Thread
Object-oriented: Spellvamp - by Suzuya - 01-05-2014, 09:34 AM
RE: Object-oriented: Spellvamp - by hkmnhkmn - 01-19-2014, 12:45 PM
RE: Object-oriented: Spellvamp - by Suzuya - 01-19-2014, 03:28 PM



Users browsing this thread: 1 Guest(s)