immersiontool safety...

For in-game support requests, and bug reports.
Post Reply
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

immersiontool safety...

Post 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
User avatar
Li'l Rose
Posts: 142
Joined: Thu Apr 09, 2015 8:19 pm

Re: immersiontool safety...

Post 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;
icywind1980
Posts: 68
Joined: Mon Feb 09, 2015 4:04 pm

Re: immersiontool safety...

Post by icywind1980 »

*Eyes boggle* that's like reading Ancient Greek to me guys! Glad someone knows what it all means.
User avatar
tarashon
Posts: 861
Joined: Sun Jan 11, 2015 6:27 pm

Re: immersiontool safety...

Post by tarashon »

Thx alot, implemented now :)

/tara
Post Reply