PDA

View Full Version : A few scripts


Mindtwistah
08-05-2007, 03:53 PM
Can someone post these scripts?:

A script that makes an NPC vanish, not move to a location and vanish.

A script that makes someone shot lightining on another ( For a dialog )

A script that makes someone die ( For a dialog )

A script that makes someone walk to another NPC during a dialog

stoffe
08-05-2007, 04:53 PM
Can someone post these scripts?:


Something like these might work. Change the tags inside the GetObjectByTag() calls to the tags of the NPCs you want to be affected.


A script that makes an NPC vanish, not move to a location and vanish.


void main() {
DestroyObject(GetObjectByTag("TagOfSomeone"));
}



A script that makes someone shot lightining on another ( For a dialog )



void main() {
object oCaster = GetObjectByTag("TagOfSomeone");
object oVictim = GetObjectByTag("TagOfVictim");

ActionPauseConversation();
AssignCommand(oCaster, ClearAllActions());
AssignCommand(oCaster, ActionUseTalentOnObject( TalentSpell(FORCE_POWER_LIGHTNING), oVictim));
ActionResumeConversation();
}



A script that makes someone die ( For a dialog )



void main() {
object oDeadmeat = GetObjectByTag("TagOfSomeone");
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDeadmeat);
}



A script that makes someone walk to another NPC during a dialog


void main() {
object oSomeone = GetObjectByTag("TagOfSomeone");
object oAnother = GetObjectByTag("TagOfAnother");

ActionPauseConversation();
AssignCommand(oSomeone, ClearAllActions());
AssignCommand(oSomeone, ActionForceMoveToObject(oAnother));
ActionResumeConversation();
}

Mindtwistah
08-05-2007, 05:51 PM
Thank you soooooo much Stoffe. I forever owe you (again :p)