Jump to content

Scripting for a mod I've released


AltreU

Recommended Posts

I've released The Highlands recently and I'm in the process of updating it. Before I release the update, I'd like some script for a chest. I want it to alert the player before they open the chest that it contains extremely powerful items (specifically meant to aid in travel and combat with the enemies in the area) and then give them a choice to either open it or permanently lock it. Or maybe a script that removes the items from the players inventory when they leave the worldspace. Any advice and/or help would be much appreciated.
Link to comment
Share on other sites

FOr the chest..

scn (ChestScript)

short button
Begin OnActivate
player.messagebox "This chest contains powerful items to aid you in your journey, and may be overpowered. What do you want to do?", "Open the chest", "Lock it permanently"
end

begin gamemode
set button to getbuttonpressed
if button == 0
activate
elseif button == 1
(ChestID).lock 100
return
endif
end

 

You'll need to fill in the parenthesis with some actual ID's.

 

For the other bit, it depends on how you exit the world. If there's only one exit SI style, you can put a script on that door to remove the items when they activate it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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