AlexxEG Posted May 30, 2009 Share Posted May 30, 2009 Can some1 look over this script and see if they see something wrong?Either PM me or say it here. Cause it don't work for me. It's message boxes with options. I post the options if needed scn 00BuyNukaColaFromVendingMachineSCRIPT short NVButton short GoPreWarMoney short doonce begin OnActivate if ( Player.GetItemCount PrewarMoney >= 1 ) ShowMessage 00BuyNukaColaFromVendingMachinePrewarMoneyWithMESG set GoPreWarMoney to 3 elseif ( Player.GetItemCount 0010CentsCoin >= 1 ) ShowMessage 00BuyNukaColaFromVendingMachineCoinsWithMESG set GoPreWarMoney to 2 elseif ( Player.GetItemCount PrewarMoney >= 1 ) && ( Player.GetItemCount 0010CentsCoin >= 1 ) ShowMessage 00BuyNukaColaFromVendingMachineBothWithMESG set GoPreWarMoney to 4 elseif ( Player.GetItemCount PrewarMoney < 1 ) && ( Player.GetItemCount 0010CentsCoin < 1 ) ShowMessage 00BuyNukaColaFromVendingMachineWithoutMESG set GoPreWarMoney to 1 endif end Begin OnLoad if doonce == 0 set doonce to 1 Lock 75 endif end begin gamemode set NVButton to GetButtonPressed if ( NVButton == 0 ) && ( GoPreWarMoney == 3 ) Player.RemoveItem PrewarMoney 1 Player.additem 0010CentsCoin 4 Player.AddItem NukaCola 1 Additem 0010CentsCoin 4 set GoPreWarMoney to 0 elseif ( NVButton == 1 ) && ( GoPreWarMoney == 3 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock set GoPreWarMoney to 0 else ;Do Nothing set GoPreWarMoney to 0 elseif ( NVButton == 2 ) && ( GoPreWarMoney == 3 ) Activate set GoPreWarMoney to 0 elseif ( NVButton == 3 ) && ( GoPreWarMoney == 3 ) ;Do Nothing set GoPreWarMoney to 0 elseif ( NVButton == 0 ) && ( GoPreWarMoney == 2 ) Player.Removeitem 0010CentsCoin 1 Player.additem NukaCola 1 additem 0010CentsCoin 1 set GoPreWarMoney to 0 elseif ( NVButton == 1 ) && ( GoPreWarMoney == 2 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock Set GoPreWarMoney to 0 else ;do nothing Set GoPreWarMoney to 0 elseif ( NVButton == 2 ) && ( GoPreWarMoney == 2 ) Activate Set GoPreWarMoney to 0 elseif ( NVButton == 3 ) && ( GoPreWarMoney == 2 ) ;Do Nothing Set GoPreWarMoney to 0 elseif ( NVButton == 0 ) && ( GoPreWarMoney == 4 ) Player.RemoveItem PrewarMoney 1 Player.additem 0010CentsCoin 4 Player.AddItem NukaCola 1 Additem 0010CentsCoin 1 set GoPreWarMoney to 0 elseif ( NVButton == 1 ) && ( GoPreWarMoney == 4 ) Player.Removeitem 0010CentsCoin 1 Player.additem NukaCola 1 additem 0010CentsCoin 1 set GoPreWarMoney to 0 elseif ( NVButton == 2 ) && ( GoPreWarMoney == 4 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock Set GoPreWarMoney to 0 else ;do nothing Set GoPreWarMoney to 0 elseif ( NVButton == 3 ) && ( GoPreWarMoney == 4 ) Activate Set GoPreWarMoney to 0 elseif ( NVButton == 4 ) && ( GoPreWarMoney == 4 ) ;Do Nothing Set GoPreWarMoney to 0 elseif ( NVButton == 0 ) && ( GoPreWarMoney == 1 ) Activate Set GoPreWarMoney to 0 elseif ( NVButton == 1 ) && ( GoPreWarMoney == 1 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock Set GoPreWarMoney to 0 else ;do nothing Set GoPreWarMoney to 0 elseif ( NVButton == 2 ) && ( GoPreWarMoney == 1 ) ;Do Nothing set GoPreWarMoney to 0 endif endif endif endif endif end Link to comment Share on other sites More sharing options...
Stewb Posted May 31, 2009 Share Posted May 31, 2009 You forgot an Endif here: elseif ( NVButton == 1 ) && ( GoPreWarMoney == 3 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock set GoPreWarMoney to 0 else ; Do Nothing set GoPreWarMoney to 0 elseif ( NVButton == 2 ) && ( GoPreWarMoney == 3 ) Shoulda been: elseif ( NVButton == 1 ) && ( GoPreWarMoney == 3 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock set GoPreWarMoney to 0 else ; Do Nothing set GoPreWarMoney to 0 Endif elseif ( NVButton == 2 ) && ( GoPreWarMoney == 3 ) I see two more instances where the same problem crops up, at: elseif ( NVButton == 1 ) && ( GoPreWarMoney == 1 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock Set GoPreWarMoney to 0 else ;Do nothing Set GoPreWarMoney to 0 elseif ( NVButton == 2 ) && ( GoPreWarMoney == 1 ) and: elseif ( NVButton == 2 ) && ( GoPreWarMoney == 4 ) if player.GetItemCount 00UniversalVendingMachineKey >= 1 Unlock Set GoPreWarMoney to 0 else ;Do nothing Set GoPreWarMoney to 0 elseif ( NVButton == 3 ) && ( GoPreWarMoney == 4 ) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.