Jump to content

Need a fast script fix


AlexxEG

Recommended Posts

Okey, So I trying to make a script so I can buy 1 Nuka Cola for 10 Caps, or pick lock to steal the Nuka Colas, also look ALL vending machine in whole fallout to "Hard", but something don't work. Problem is:

I have a message that pops up if you have 10+ caps. Short Version:

-"Buy Nuka Cola"

-"Try to Pick Lock"

-"Do Nothing"

(If you have 10- caps it just say you don't have enough, no option)

But none of the buttons work :S

SCRIPT:

scn 00BuyNukaColaFromVendingMachineSCRIPT

short NVButton
short GoCaps


begin OnActivate

if ( IsActionRef Player == 1 )
	if ( Player.GetItemCount Caps001 >= 10 )
		ShowMessage 00BuyNukaColaFromVendingMachineWithMESG
		set GoCaps to 2
	elseif ( Player.GetItemCount Caps001 < 10 )
		ShowMessage 00BuyNukaColaFromVendingMachineWithoutMESG
		set GoCaps to 1
	endif	
endif

end

Begin GameMode
Lock 75
end

begin gamemode

set NVButton to GetButtonPressed

if ( NVButton == 0 ) && ( GoCaps == 2 )
	Player.RemoveItem Caps001 10
	Player.AddItem NukaCola 1
	set GoCaps to 0
elseif ( NVButton == 1 ) && ( GoCaps == 2 )
	Activate
	Set GoCaps to 0
elseif ( NVButton == 2 ) && ( GoCaps == 2 )
	;Do Nothing
	set GoCaps to 0
elseif ( NVButton == 0 ) && ( GoCaps == 1 )
	;Do Nothing
	Set GoCaps to 0
endif

end

If you would take some of your time to look over I will be VERY thankful :D Thx for your time

Link to comment
Share on other sites

Changed script A LITTLE ^^

scn 00BuyNukaColaFromVendingMachineSCRIPT

short NVButton
short GoCaps


begin OnActivate

if ( IsActionRef Player == 1 )
	if ( Player.GetItemCount Caps001 >= 10 )
		ShowMessage 00BuyNukaColaFromVendingMachineWithMESG
		set GoCaps to 2
	elseif ( Player.GetItemCount Caps001 < 10 )
		ShowMessage 00BuyNukaColaFromVendingMachineWithoutMESG
	endif	
endif

end

Begin GameMode
Lock 75
end

begin gamemode

set NVButton to GetButtonPressed

if ( NVButton == 0 ) && ( GoCaps == 2 )
	Player.RemoveItem Caps001 10
	Player.AddItem NukaCola 1
	set GoCaps to 0
elseif ( NVButton == 1 ) && ( GoCaps == 2 )
	Activate
	Set GoCaps to 0
elseif ( NVButton == 2 ) && ( GoCaps == 2 )
	;Do Nothing
	set GoCaps to 0
endif

end

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...