Aller au contenu

Photo

Lifesteal, Script attach to specefic item


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
KiKurA

KiKurA
  • Members
  • 8 messages
i'm BRANDNEW to nwn forums and all this jazz :D

okey, as you can see in topic i'm not satisfied with the nwn vampiric regen offer us :), how
can i, firstly i guess, get this script to work, and then put it on
specefic weapons

void main()
{
  int DamageHeal = (int GetDamageDealtByType(DAMAGE_TYPE_BASE_WERAPON) / 20 * 1);
  string Output =  ("You stole "+IntToString(DamageHeal)+" life.");
  if (DamageHeal > 0)
  {
    EffectDamage(DamageHeal,DAMAGE_TYPE_BASE_WERAPON,DAMAGE_POWER_PLUS_FIFTEEN);
    EffectHeal(DamageHeal);
    //Console.WriteLine(Output)... something that will give feedback in combat log of what happened :) ?
  }
}

Modifié par KiKurA, 04 avril 2011 - 07:05 .


#2
KiKurA

KiKurA
  • Members
  • 8 messages
with the attach to specefic item i mean, can i somehow "put the script in a item" export one file and mail it to someone that can put it in a quest or something on the server i play on xD lol

#3
ehye_khandee

ehye_khandee
  • Members
  • 855 messages
In my humble opinion, you would be best to modify the default on_damaged script you use, and have it check to see if the damaging weapon has the life stealing property, if so, then run your code to heal the weapon wielder the same amount of damage. iirc that is how dnd treats vampiric regen. Send me a PM if you'd like me to follow up with some code examples.

Be well. Game on.
GM_ODA

#4
KiKurA

KiKurA
  • Members
  • 8 messages
the nwn toolset only have +1,2,3,4.5 vampiric regen, not percentages of the actual damage dealt xD heh heh