iTz Rossss X Posted March 30, 2010 Posted March 30, 2010 Hi, I've been making a script for a forge that allows you to make your own staff, here it is: scn aaaFrozenFurnace01SCRIPT int buttonint buttonPressed Begin OnActivate if IsActionRef player == 1 messageBox "Would you like to create a diamond staff? It requires 50 pieces of flawless diamond.", "Yes.", "No."; set buttonPressed to 1 endifend begin Gamemode if buttonPressed == 1 set button to getbuttonpressed if button > -1 if button == 0 ; if player.getitemcount Gem6DiamondFlawless == 50; player.removeitem Gem6DiamondFlawless 50 player.additem aaaWEAPDiamondStaff01 1 else message "You don't have enough flawless diamonds. (You need 50.)" return elseif button == 1 ; return endif endif endifend If I don't have the 50 diamonds requirements it still gives me the diamond staff. What can I do to fix this? Thanks in advance. ~~~iTz
Khet Posted March 30, 2010 Posted March 30, 2010 Take out the ; (semicolon) at the beginning of this line: ; if player.getitemcount Gem6DiamondFlawless == 50; Semi colon makes the line a comment, which is ignored by the script.
Pronam Posted March 30, 2010 Posted March 30, 2010 Added to that, I would make >= 50 of that, as without it would force the player to have 50 diamonds even though the player might have more of them.
Recommended Posts