Jump to content

Home

[K1] Force Transmogrify


e-varmint

Recommended Posts

A spell script that turns your target into three insane gizkas:

 

Edit: ***Don't use this on plot-critical characters (duelists, Juhani, etc.) It will probably "break" something if you do.***

 

#include "k_inc_force" 

void main() 
{ 
   object oSource = OBJECT_SELF; 
   object oTarget = GetSpellTargetObject(); 

   effect eSource = EffectVisualEffect(1014);

   ApplyEffectAtLocation(0, EffectVisualEffect(3005, 0), GetSpellTargetLocation(), 0.0);
   ApplyEffectToObject(1, eSource, oSource, 1.5);
   CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
   CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
   CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
   DestroyObject(oTarget, 0.0f, TRUE, 0.0f);
} 

 

Here is a .zip file containing the gizka .utc, script, an an icon:

 

http://www.e-varmint.net/witchspell.zip

 

___

Link to comment
Share on other sites

Very interesting, I like the idea. Would it work in TSL or would I just have to make a similar one?

 

I haven't done much TSL scripting, so I don't know. I'll try it and see what happens.

 

Edit: I tried adding it to TSL, but couldn't get it to show up in the Level Up - Powers screen. So:

 

1) It only works for K1; or

2) I don't know how to add force powers to TSL.

 

Haha, sweet! :D

 

When I get around to learning the TSL Patcher, I'll publish my force power collection. There is another good one that changes the target into a hutt for 20 seconds.

Link to comment
Share on other sites

........you can never get the loot.)

 

You have just given me a very interesting idea! If I am interpreting nwscript correctly, I should be able to modify this so that you can steal (at least some) of the target's loot! It will take some experimentation, but it would be REALLY COOL if it works.

 

Edit: Not to mention the fact that I could also make a pickpocket spell!

Link to comment
Share on other sites

Transfering items would be something like:

void GM_TransferItems(object oTake, object oGive)
{
   object oItem = GetFirstItemInInventory(oTake);
   while (ObjectIsValid(oItem)){
       GiveItem(oItem, oGive);
       AssignCommand(oTake, ActionTakeItem(oItem, oTake));
       oItem = GetNextItemInInventory(oTake);
   }
}
void main()
{
   object oTarget = GetTargetObject();
   if (GetHasInventory(oTarget))
       GM_TransferItems(oTarget, OBJECT_SELF);
}

Link to comment
Share on other sites

Transfering items would be something like:

void GM_TransferItems(object oTake, object oGive)
{
   object oItem = GetFirstItemInInventory(oTake);
   while (ObjectIsValid(oItem)){
       GiveItem(oItem, oGive);
       AssignCommand(oTake, ActionTakeItem(oItem, oTake));
       oItem = GetNextItemInInventory(oTake);
   }
}
void main()
{
   object oTarget = GetTargetObject();
   if (GetHasInventory(oTarget))
       GM_TransferItems(oTarget, OBJECT_SELF);
}

 

Nice!!! You just saved me a bunch of work!!!!

 

:lol: This is different. Is it possible to do something similar with Rakghouls?

 

Rakghouls work quite well, but make it a long range spell in spells.2da or it will backfire. Also, make the rackghouls have short range perception (.utc file).

 

Another good one is Vandar (as Frienldy 1, designated in the .utc file). It's a riot to pop him into a crowd of hostiles (another Long Distance spell, so you can sit back and watch the fun).

 

It works just as well if you take the "destroyobject" line out. Make your spawnables either Friendly 1 or Insane so they will attack your ememies (and/or each other). A couple of Ajunta Palls sure can come in handy during the Malak showdown.

 

Edit: This just occurred to me. Don't use the destroyobject on plot-critical characters (duelists, Juhani, etc.) It will probably "break" something if you do.

Link to comment
Share on other sites

You can check if oTarget is a plot object with GetPlotFlag()

This adapted script will check oTarget before casting the force power, if the target is a plot object they will resist the force power.

void main() 
{ 
   object oSource = OBJECT_SELF; 
   object oTarget = GetSpellTargetObject(); 
   if( !GetPlotFlag(oTarget) ){
       effect eSource = EffectVisualEffect(1014);
       ApplyEffectAtLocation(0, EffectVisualEffect(3005, 0), GetSpellTargetLocation(), 0.0);
       ApplyEffectToObject(1, eSource, oSource, 1.5);
       CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
       CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
       CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
       DestroyObject(oTarget, 0.0f, TRUE, 0.0f);
   }
   else
   {
       effect eResist = EffectForceResisted(oTarget);
       ApplyEffectToObject(DURATION_TYPE_INSTANT, eResisted, oSource);
   }
}

Link to comment
Share on other sites

You can check if oTarget is a plot object with GetPlotFlag()

This adapted script will check oTarget before casting the force power, if the target is a plot object they will resist the force power.

void main() 
{ 
   object oSource = OBJECT_SELF; 
   object oTarget = GetSpellTargetObject(); 
   if( !GetPlotFlag(oTarget) ){
       effect eSource = EffectVisualEffect(1014);
       ApplyEffectAtLocation(0, EffectVisualEffect(3005, 0), GetSpellTargetLocation(), 0.0);
       ApplyEffectToObject(1, eSource, oSource, 1.5);
       CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
       CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
       CreateObject( OBJECT_TYPE_CREATURE, "c_gizka088", GetLocation(GetSpellTargetObject()));
       DestroyObject(oTarget, 0.0f, TRUE, 0.0f);
   }
   else
   {
       effect eResist = EffectForceResisted(oTarget);
       ApplyEffectToObject(DURATION_TYPE_INSTANT, eResisted, oSource);
   }
}

 

 

Thanks!!!

 

I may modify it further to add some type of alternate nasty under the "else". Perhaps a Virulent Weakness/Confusion/Attribute Damage combo.

 

If I ever release this via the TSL Patcher, I'm going to list you as the co-author.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...