Page 1 of 1

immersiontool safety...

Posted: Tue Dec 01, 2015 9:20 am
by tarashon
Howdy folks. Anyone scripting capeable feeling like making a fast fix to this script so that it will not fire on PCs...

Rose told me yesterday but me being scripting impaired forgot the formular again...

////////////

/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3

For download info, please visit:
http://nwvault.ign.com/View.php?view=Ot ... 683&id=625 */

void main()
{
object oPC;

if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE)
){

SendMessageToPC(GetItemActivator(), "Improper use of item!");
return;}

oPC = GetItemActivator();

object oTarget;
oTarget = GetItemActivatedTarget();

SetCreatureAppearanceType(oTarget, APPEARANCE_TYPE_BADGER);

SetPortraitResRef(oTarget, "po_badger");
}

/////////////////////

Thanks in advance :)

/tara

Re: immersiontool safety...

Posted: Tue Dec 01, 2015 10:34 am
by Li'l Rose
Add this to your script:

Code: Select all

if (GetIsPC(GetItemActivatedTarget()))
{
    SendMessageToPC(GetItemActivator(), "Improper use of item!");
    return;
}
Put it just after the line: object oPC;

Re: immersiontool safety...

Posted: Tue Dec 01, 2015 10:44 am
by icywind1980
*Eyes boggle* that's like reading Ancient Greek to me guys! Glad someone knows what it all means.

Re: immersiontool safety...

Posted: Tue Dec 01, 2015 1:30 pm
by tarashon
Thx alot, implemented now :)

/tara