start your commands with this
Code:if (playerCommand.equalsIgnoreCase("Cmd")) {
|
Hello, when i make the ::claim command or as i have it here in 3 different commands seperated.
here is the problem i'm having.
I think maybe like the command doesn't end before the next one or something? so any help to fix this would be appreciated.
It sends the else's from the other commands.
here is the code
and here is a picture of what happens when i use one of the commands.Code:if (playerCommand.equals("deliverbox") && (c.playerRights >= 0) && (c.getItems().playerHasItem(15674, 1))) { c.getItems().addItem(6199, 5); c.getItems().deleteItem(15674, 1); c.sendMessage("Enjoy your 5 mystery donator boxes, hope you get something good!"); } else { c.sendMessage("You need a delivery box to exchange!"); } if (playerCommand.equals("delivercrate1") && (c.playerRights >= 0) && (c.getItems().playerHasItem(7630, 1))) { c.getItems().addItem(18782, 5); c.getItems().deleteItem(7630, 1); c.sendMessage("Enjoy your 5 slayer xp lamps!"); } else { c.sendMessage("You need a delivery crate to exchange!"); } if (playerCommand.equals("delivercrate2") && (c.playerRights >= 0) && (c.getItems().playerHasItem(7630, 1))) { c.getItems().addItem(18783, 5); c.getItems().deleteItem(7630, 1); c.sendMessage("Enjoy your 5 summoning xp lamps!"); } else { c.sendMessage("You need a delivery crate to exchange!"); }
Any help is appreciated, please no flame/hate/lmgtfy, thankyou.
start your commands with this
Code:if (playerCommand.equalsIgnoreCase("Cmd")) {
use notepad++ and you can spot brackets easier.
Is this for vote, or what? If it's for vote you might not of posted the correct webiste url?
no this isn't for vote, it's an item they get in game, this is kind of like redeeming it.
but it sends the other cmd's else's thats the problem i'm having
Code:if (playerCommand.equals("delivery") && c.playerRights >= 0)) { if(c.getItems().playerHasItem(15674, 1)) { c.getItems().addItem(6199, 5); c.getItems().deleteItem(15674, 1); c.sendMessage("Enjoy your 5 mystery donator boxes, hope you get something good!"); } if(c.getItems().playerHasItem(7630, 1)) { c.getItems().addItem(18782, 5); c.getItems().deleteItem(7630, 1); c.sendMessage("Enjoy your 5 slayer xp lamps!"); } if(c.getItems().playerHasItem(7630, 1)) { c.getItems().addItem(18783, 5); c.getItems().deleteItem(7630, 1); c.sendMessage("Enjoy your 5 summoning xp lamps!"); } else { c.sendMessage("You need a delivery box or crate to do that."); } }
=0 wow, thats nice, i like how you put it all in one and called different items. cool, thx m8, ++rep
the only thing, is that you have it calling 7630 twice, so if i made the command like that, it would i guess either error
or give both types of lamps.
maybe you thought i wanted it to give both idk
but yeah i want it seperated so i guess i'll just edit the clickitem and make a 3rd box to give the slayer lamps.
thanks m8
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |