Jump to content

Nee help script - player/npc add/remove


Foggier

Recommended Posts

Following problem. It's about a new playable race. The player takes a piece of clothing. This will be automatically exchanged for another item of clothing. For example, "OutfitLucasSimms" is exchanged for "NeelooOutfitLucasSimms". This works for the player. However, it should work simultaneously for the player and the NPC. Unfortunately, all previous attempts did not lead to success. Here are 2 scripts as an example.

 

Equip OutfitLucasSimms:

 

scn NeelooLucasSimms1SCRIPT

 

BEGIN OnAdd player

 

if player.GetIsRace Neeloo == 1

player.RemoveItem OutfitLucasSimms 1

player.AddItem NeelooOutfitLucasSimms 1

endif

 

END

 

Unequip NeelooLucasSimms:

 

scn NeelooLucasSimms2SCRIPT

 

BEGIN OnDrop player

 

if Player.GetIsRace Neeloo == 1

player.RemoveItem NeelooOutfitLucasSimms 1

player.AddItem OutfitLucasSimms 1

player.Drop OutfitLucasSimms 1

endif

 

END

Link to comment
Share on other sites

Begin OnAdd -> DO NOT use Player, if you do, the script only fires when the Player picks it up, not allowing it to fire when NPCs pick it up

 

<tab>If Player.GetIsRace Neeloo == 1

<tab><tab>AddItem NeelooOutfitLucasSimms 1 1 -> Adds the item silently.

<tab><tab>RemoveMe -> Removes picked up item.

<tab>EndIf

 

End

 

Begin OnDrop -> This script should only be added to Neeloo race clothing. There is also no need to check the player's race if the only way to acquire the Neeloo race clothing is via the clothing replace OnAdd scripts.

 

<tab>Player.RemoveItem NeelooOutfitLucasSimms 1 1 -> Removes the item silently.

<tab>Player.AddItem OutfitLucasSimms 1 1 -> Adds the item silently.

<tab>Player.Drop OutfitLucasSimms 1

 

End

Edited by Kuroitsune
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...