So, it removes a point but doesn't send the yell...
In that case, post your sendyell and make sure u use ;;yell message but I assume that's what ur doing.
|
So, I modified my yell command slightly, making it require one of my servers currency's "Dragon Points", to yell. Except if you're a Donator or Staff it costs nothing.
Everything works as it's supposed to.
Except for Player yell.
It removes the 1 Dragon Point, but doesn't send the yell.
Here's my command.
Any help will be greatly appreciated.Code:case "yell": if (!player.isDonator() && !player.isExtremeDonator() && player.getRights() == 0) { if (player.getInventory().containsItem(4278, 1)) { player.getInventory().deleteItem(4278, 1); message = ""; for (int i = 1; i < cmd.length; i++) message += cmd[i] + ((i == cmd.length - 1) ? "" : " "); sendYell(player, Utils.fixChatMessage(message), false); return true;} else { player.getPackets().sendGameMessage("You need atleast 1 Dragon Point to yell, or upgrade to Donator."); return true;}} else if (player.isDonator() || player.isExtremeDonator() || player.getRights() > 0) { message = ""; for (int i = 1; i < cmd.length; i++) message += cmd[i] + ((i == cmd.length - 1) ? "" : " "); sendYell(player, Utils.fixChatMessage(message), false); return true; }
Also if you need to see any other codes or classes just ask.
So, it removes a point but doesn't send the yell...
In that case, post your sendyell and make sure u use ;;yell message but I assume that's what ur doing.
Yes, it removes the yell like it's supposed to, but does not 'post'/'send' the yell to the chatbox.
And is this what you mean?
Code:else if (player.getRights() == 0) World.sendWorldMessage("[<col=02ab2f>World</col>]" + player.getDisplayName() + ": <col=02ab2f>" + message + "</col>", false);
Try using this, then let me know the outcome.Code:case "yell": if (!player.isDonator() && !player.isExtremeDonator() && player.getRights() == 0) { if (player.getInventory().containsItem(4278, 1)) { player.getInventory().deleteItem(4278, 1); message = ""; for (int i = 1; i < cmd.length; i++) message += cmd[i] + ((i == cmd.length - 1) ? "" : " "); sendYell(player, Utils.fixChatMessage(message), false); return true; } else if (player.isDonator() || player.isExtremeDonator() || player.getRights() > 0) { message = ""; for (int i = 1; i < cmd.length; i++) message += cmd[i] + ((i == cmd.length - 1) ? "" : " "); sendYell(player, Utils.fixChatMessage(message), false); return true; } else { player.getPackets().sendGameMessage("You need atleast 1 Dragon Point to yell, or upgrade to Donator."); return true; } return true;
case "yell":
if (player.getRights() == 0) {
boolean deleted = false;
if (player.getInventory().containsItem(4278, 1)) {
player.getInventory().deleteItem(4278, 1);
deleted = true;
}
if (!deleted) {
player.getPackets().sendGameMessage("You need atleast 1 Dragon Point to yell, or upgrade to Donator.");
return;
}
}
message = "";
for (int i = 1; i < cmd.length; i++)
message += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
sendYell(player, Utils.fixChatMessage(message), false);
return true;
´
something like that should do the work.
Bump still need help.
EDIT: Just realized it hasn't been 24 hrs. My bad :\
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |