- Joined
- Dec 13, 2010
- Messages
- 649
- Reaction score
- 140
This NPC is actually kind of useless but I got bored and scripted it. If you notice any problems let me know. I never had the opportunity to test it but if anyone could test it let me know!
It basically just sends out a server notice so GMs can communicate across channels and such. Like I said its not too useful but maybe someone will like it
Enjoy.
Note: It will only work if you have the "gmLevel" method. Those who dont can substitute it for "isGM" or w/e. Have fun :scared:
Edit 1: To make it for donors, change this bit.
To
And of cource change the message and the types of announcements at the top, the loop is made to hold as many selections as you want, so enjoy...
PHP:
/**
*
*@author Soulfist
*/
importPackage(Packages.tools.MaplePacketCreator);
status = 0, sname = "DominoStory", n = "";
Op = ["Urgent", "Warning", "Ban", "Severe", "Communication"];
function start() {
var t = "Welcome to"+sname+", I am the GM notice NPC, which type will it be?";
for(var i = 0; i < Op.length; t += "\r\n#L"+i+"#"+Op[i]+"#l", i++);
cm.sendSimple(t);
}
function action(m, t, s) {
status++;
if (m != 1) {
cm.dispose();
return;
}
if (status == 1) {
if (cm.getPlayer().gmLevel() >= 3)
cm.sendGetText("Please type your desired announcement:\r\n");
else {
cm.sendOk("You aren't a GM, please don't cause trouble");
cm.dispose();
}
} else if (status == 2) {
n = cm.getText();
cm.getClient().getChannelServer().getWorldInterface().broadcastGMMessage(null, MaplePacketCreator.serverNotice(6, "["+Op[s]+"] "+n).getBytes());
cm.dispose();
}
}
It basically just sends out a server notice so GMs can communicate across channels and such. Like I said its not too useful but maybe someone will like it
Enjoy.
Note: It will only work if you have the "gmLevel" method. Those who dont can substitute it for "isGM" or w/e. Have fun :scared:
Edit 1: To make it for donors, change this bit.
PHP:
cm.getPlayer().gmLevel() >= 2
PHP:
cm.getPlayer().gmLevel() > 1
Last edited: