Jump to content

Scripting help


Ray491

Recommended Posts

I want a script to my plugin, but I'm not realy good at scripting. Can somebody give me a starting idea, please? The script would change an armor and it's helmet to health to 100% (or removing and re-adding it), when the plugin installed and you enter the game. It would run only once. The armor would be the winterized T-51b power armor (01001f09) and it's helmet (0100c18e). The Begin GameMode seems good, but how can I stop the script, so it doesn't change the healt anymore? And how can I check if the player has the item or not? Edited by Ray491
Link to comment
Share on other sites

Create a quest with the tag "Start game enabled" checked.

Then, create your script. It should go something like this:

 

SCN (Whatever you want to name it)

Begin gamemode
     if player.getitemcount (Item editor ID) >= 1
             Player.removeitem (Same ID) 1
             player.additem (Same ID, again) 1
             stopquest (ID of the quest you created)
     Else
end

That's not exactly it--for example, use the tab button instead of holding space like I did there during the gaps--but it's the basics of it.

 

After you've made that script, open up the quest again. Set this to be the quest's script (Make sure the script is a quest-type).

 

Hopefully, that should be enough. You can probably get away with just making a quest for each item.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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