Jump to content

Home

Script: adjust current vitality?


Vox Kalam

Recommended Posts

You mean like EffectHeal and EffectDamage?

 

void main() {
 object oTarget2Heal=GetObjectByTag("somebody");
 object oTarget2Hurt=GetObjectByTag("somebody_else");

 effect eHeal=EffectHeal(10);   // heal 10 VP
 effect eHurt=EffectDamage(10); // damage 10 VP

 ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget2Heal);
 ApplyEffectToObject(DURATION_TYPE_INSTANT, eHurt, oTarget2Hurt);
}

Link to comment
Share on other sites

  • 1 year later...
So ... how can I script for a poisoning effect on my PC and let's say Atton for 10 seconds?? with 10 VP loss?

 

First you'd need a custom poison that behaves in that particular way. You can add one by adding a new line in the poison.2da file.

 

Then you can apply it with a script like:


void main() {
   object oPC = GetFirstPC();
   object oAR = GetObjectByTag("Atton");

   effect ePoison = EffectPoison([color=Yellow]999[/color]);

   ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oPC); 
   ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oAR);
}

 

Replace 999 with the line number from the poison.2da file that contains your new poison type. (Note that poison effects should generally be applied with a Permanent duration since the poison types have their own built-in duration that's set in the poison.2da file.)

Link to comment
Share on other sites

(Note that poison effects should generally be applied with a Permanent duration since the poison types have their own built-in duration that's set in the poison.2da file.)

 

Duration was one of my doubts :) ... plus the poisoning animation but it fires right there ...

 

thanks again Stoffe ... :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...