Jump to content

need a script


Guest KillMeTwice

Recommended Posts

Sure thing.

 

scn MySwapperScript
;scn stands for Scriptname.  All scripts need to be named on their first line.

Begin OnActivate
;All of a script's functions need to take place in a Begin/End loop, that determines when they play.
;An OnActivate loop, as the name implies, runs when you activate something in the world.

  if (player.GetItemCount MyItem1 > 0)
 ;The contents of an If/Endif loop only run when their specified condition is true.
 ;In this case, the player has more than zero of MyItem1.

  player.RemoveItem MyItem1 1
  player.AddItem MyItem2 1
  endif
end

 

If you wanted it to do the swap when activating the object in your inventory, you'd have to use OnEquip instead of OnActivate.

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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