View Full Version : How to make a ::command?
heylol
June 27th, 2010, 16:42
I have a bit of an idea on how too..but not much. Searching didn't help either. Do you guys know how? Thanks:) Woops, I meant to put it ::commands. And I mean like So I could put a list of commands for the players like regular players mod admin etc
zygis227
June 27th, 2010, 19:31
i will add you an example from my server later
tlozoot
June 27th, 2010, 20:06
public void commands() {
sendQuest("@gre@Lootz-scape - Commands", 8144);
clearQuestInterface();
sendQuest("::talkon YOURTEXT - repeats a message (for buying/selling)", 8147);
sendQuest("::talkoff - turns off message repeater", 8148);
sendQuest("::pctime - checks how much time is left in pest contorl", 8149);
sendQuest("::pass NEWPASSWORD - changes your password", 8150);
sendQuest("::players - view everyone online", 8151);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
public void clanchat() {
sendQuest("@gre@Lootz-scape - Clan chat", 8144);
clearQuestInterface();
sendQuest("::ccmake)", 8147);
sendQuest("::cckick", 8148);
sendQuest("::ccleave", 8149);
sendQuest("::ccdelete", 8150);
sendQuest("::ccrename, ::ccjoin, ::cm(send message)", 8151);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
} Add that in client.java this was below return false;
}
public void switchBooks() {
interfaceEffect = 2;
setAnimation(1652);
clearQuestInterface();
sendFrame126("Normal Magic", 2494);
sendFrame126("", 2495);
sendFrame126("", 2496);
sendFrame126("", 2497);
sendFrame126("Ancient Magic", 2498);
sendQuestSomething(8143);
sendFrame164(2492);
flushOutStream();
}
TehCow
June 27th, 2010, 20:28
Lemme type one in, here it is:
Mod Commands:
Add this on your other commands, after a "}".
if(command.startsWith("Modcommandsnamehere") && playerRights >= 1){
sM("Whatever."");
}
Admin commands command:
if(command.startsWith("Admincommandsnamehere") && playerRights >= 2){
sM("You're commands are:");
sM("::own");
sM("::spec");
sM("::mypos");
sM("W/e");
}
Normal player command:
if(command.startsWith("commands") && playerRights >= 0){
sM("You're commands are:");
sM("::own");
sM("::setlevel");
sM("::mypos");
sM("W/e");
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.