Jump to content

Vending Machine Script Help


Recommended Posts

What am I doing wrong? The message on the activator shows the top two lines of the message itself. But that's it. Shows none of the options... and I can't escape from that screen.





BlackbriarBHChipVendorScript
short Button
short PlayerChipAmount
begin OnActivate
if IsActionRef player == 1
ShowMessage BlackbriarBHChipsMessage1
endif
end
BEGIN MenuMode 1001
set Button to GetButtonPressed
if ( Button == 0 )
player.additem BlackbriarBHChip 10
player.RemoveItem caps001 10
elseif ( Button == 1 )
player.additem BlackbriarBHChip 50
player.RemoveItem caps001 50
elseif ( Button == 2 )
player.additem BlackbriarBHChip 250
player.RemoveItem caps001 250
elseif ( Button == 3 )
player.additem BlackbriarBHChip 1000
player.RemoveItem caps001 1000
elseif ( Button == 4 )
player.additem BlackbriarBHChip 5000
player.RemoveItem caps001 5000
elseif ( Button == 5 )
set PlayerChipAmount to player.GetItemCount BlackbriarBHChip
player.RemoveItem BlackbriarBHChip PlayerChipAmount
player.AddItem caps001 PlayerChipAmount
elseif ( Button == 6 )
ShowMessage BlackbriarCanceltransactionMSG
endif
endif
END
Link to comment
Share on other sites

 

Begin Gamemode
Set Button to GetButtonPressed
If Button == -1
return
elseif Button == 0
player.additem BlackbriarBHChip 10
player.RemoveItem caps001 10
return
elseif Button == 1
player.additem BlackbriarBHChip 250
player.RemoveItem caps001 250
return
;etc
endif
end

TH

Question for you.... just in case you have a suggestion. Working on a script that autotransfers any item you loot from a dead body, container or just lying around to a companion's inventory. I keep getting an error on the script I'm trying to use... which is a modified version of a weapon script that disables and deletes dead bodies,.... any suggestions.

 

Thanks again by the way!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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