-
Scripting help.
This script doesn't work. Please help.
var status = -1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.sendOk("See you later dawg.");
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hey #r #h ##k. I am the donor boss spawner. These spawners give a #r decent amount of XP#k.\r\n\r\n#bPlease pick a mob below#k.\r\n#L0#Snail#\r\n#L1#Blue Snail#\r\n#L2#r ed Snail#\r\n#L3#Slime#\r\n#L4#Orange Mushroom#\r\n#L5#Pig#\r\n\r\n#L6#r enegade Spore#\r\n#L7#Lupin#\r\n#L7#Iron Hog#\r\n#L8#Clang#\r\n#L9#Coolie Zombie#\r\n#L10#Soul Master #r Teddie#k\r\n\r\n#L11#Tauromacis#\r\n#L12#Stormbreaker#\r\n#L13#Gallopera#\r\n#L14#Green Cornian#\r\n#L15#Monk Trainee#\r\n#L16#Oblivion Monk#\r\n#L17#Kill All & Clear Drops#");
} else {
if (selection == 0) {
if (cm.getChar().isDonor()) {
cm.summonMob(100100, 15000, 1000000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 1) {
if (cm.getChar().isDonor()) {
cm.summonMob(100101, 30000, 1500000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 2) {
if (cm.getChar().isDonor()) {
cm.summonMob(130101, 50000, 2000000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 3) {
if (cm.getChar().isDonor()) {
cm.summonMob(210100, 69000, 2250000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 4) {
if (cm.getChar().isDonor()) {
cm.summonMob(1210100, 80000, 2750000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 5) {
if (cm.getChar().isDonor()) {
cm.summonMob(3300000, 100000, 3150000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 6) {
if (cm.getChar().isDonor()) {
cm.summonMob(3210800, 125000, 3450000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 7) {
if (cm.getChar().isDonor()) {
cm.summonMob(4230103, 135000, 3650000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 8) {
if (cm.getChar().isDonor()) {
cm.summonMob(4230104, 150000, 3750000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 9) {
if (cm.getChar().isDonor()) {
cm.summonMob(5130107, 200000, 4050000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 10) {
if (cm.getChar().isDonor()) {
cm.summonMob(6230500, 250000, 5000000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 11) {
if (cm.getChar().isDonor()) {
cm.summonMob(7130100, 300000, 5250000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 12) {
if (cm.getChar().isDonor()) {
cm.summonMob(9400581, 350000, 5600000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 13) {
if (cm.getChar().isDonor()) {
cm.summonMob(9420540, 375000, 6000000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 14) {
if (cm.getChar().isDonor()) {
cm.summonMob(8150200, 450000, 6969696, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 15) {
if (cm.getChar().isDonor()) {
cm.summonMob(8200006, 500000, 7000000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 16) {
if (cm.getChar().isDonor()) {
cm.summonMob(8200009, 650000, 8000000, 5);
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
} else if (selection == 17) {
if (cm.getChar().isDonor()) {
cm.killAllMonsters();
cm.clearDrops();
cm.dispose();
} else {
cm.sendOk("#r You are not a donor#k!");
cm.dispose();
}
}
}
}
}
=============================================================================
Also, for the next script, when I click next, it dces me. Help please.
var status = -1;
function start()
{
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Hello #r #h ##k. I am the #bGameMaster #k NPC for #r EternalMS#k. So, what would you like to do today?\r\n\r\n#L0#Check GameMaster rules#\r\n#L1#Check GameMaster Commands#\r\n#L2#Check Developper Commands#\r\n#L3#Check Admin Commands#\r\n#L4#Check Staff List#\r\n#L5#Skypes#");
if (selection == 0) {
cm.sendOk("Since you have clicked this selection, I will now tell you the GM rules. Please note that you will only have #e #r 3 chances##k. If you break a severe rule, you will be automatically denied and will face various concequences.\r\n\r\n#bRule 1#k: The first rule is pretty simple, it's that you're not allowed to hack. Hacking is forbidden, for players and for GameMasters. If you are Level 5, you may hack. If you are under, you need to be trusted by an administrator in order to do so. Any kind of hack is illegal, this counts for #e Packet editing, Damage hacking, etc#k. If you do hack, and that a regular player or an admin finds you, you will be #r automatically demoted and banned permanantly#k. You will be IP banned from the server, banned on the forums and banned on our chatbox.\r\n\r\n#bRule 2#k: It is strongly forbidden to give out free items to other players without any reason. Items are only given on special occasions, which are events. That's it. Even if you give 1 single item, it's over. You will be demoted from the team and will have no more chances on applying. We will not ban you for breaking that rule. We will remove your account, which means that you will make a new account and start all over again.\r\n\r\n#bRule 3#k: You will have to act mature whenever you are online, on the forums, chatbox and in-game. We don't want any immature people on our team. You will recieve a strike if you do act immature, and that's it.\r\n\r\n#r Work in progress#k!");
} else if (selection == 1) {
cm.sendOk("You get all commands from #r regular players and GM donator#k.\r\n\r\n!search\r\n!buffme\r\n!autorebirth\r\n!itemvac\r\n!dnotice <message>!ap <amount>\r\n!cleardrops\r\n!dc <player>\r\n!whereami\r\n!smegaoff\r\n!unjail\r\n!smegaon\r\n!id\r\n!djob\r\n!reloadallmaps\r\n!killall\r\n!saveall\r\n!level <1 to 255>\r\n!notice <message>\r\n!me\r\n!whosthere\r\n!cheaters\r\n!reconnect\r\n!reconnectchan\r\n!closeallmerchants\r\n!online\r\n!givevotepoints <amount>\r\n!ban <player>\r\n!map <mapID>\r\n!chatinfo\r\n!warphere <IGN>\r\n!warp <IGN>\r\n!spawn\r\n!say <message>\r\n!warpmap <mapID>");
} else if (selection == 2) {
cm.sendOk("You get all commands from #r regular players, Donator GameMaster and GameMaster#k.\r\n\r\n!gc\r\n!pnpc <npcID>\r\n!shutdownworld\r\n!proitem <itemID> <stats>\r\n!proitem2 <itemID>\r\n!playernpc\r\n!pmob <mobID>\r\n!npc <npcID>\r\n!saveall\r\n!zakum");
} else if (selection == 3) {
cm.sendOk("You get all commands from #r regular players, Donatoe GameMaster, GameMaster and developper#k.\r\n\r\n!gc\r\n!pinkbean\r\n!gmperson <player> <level>\r\n!fakechar\r\n!watch\r\n!donorpoints <player> <amount>\r\n!tiredpoints <player> <amount>\r\n!afk\r\n!jqpoints <player> <amount>\r\n!eventpoints <player> <amount>\r\n!setgmlevel <player> <level>");
} else if (selection == 4) {
cm.sendOk("#r Owner#k: Beta\r\n#r Super-GM#k: Teddie, Cyber, Chibi\r\n#r NPC Scripter#k: Teddie, Saint\r\n#r GFX Artist#k: Cyber\r\n #r Wizet Editor#k: Cyber");
} else if (selection == 5) {
cm.sendOk("Work in progress!");
}
}
-
Re: Scripting help.
First NPC fix:
Code:
var status = -1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.sendOk("See you later dawg.");
cm.dispose();
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hey #r #h ##k. I am the donor boss spawner. These spawners give a #r decent amount of XP#k.\r\n\r\n#bPlease pick a mob below#k.\r\n#L0#Snail#\r\n#L1#Blue Snail#\r\n#L2#r ed Snail#\r\n#L3#Slime#\r\n#L4#Orange Mushroom#\r\n#L5#Pig#\r\n\r\n#L6#r enegade Spore#\r\n#L7#Lupin#\r\n#L7#Iron Hog#\r\n#L8#Clang#\r\n#L9#Coolie Zombie#\r\n#L10#Soul Master #r Teddie#k\r\n\r\n#L11#Tauromacis#\r\n#L12#Stormbreaker#\r\n#L13#Gallopera#\r\n#L14#Green Cornian#\r\n#L15#Monk Trainee#\r\n#L16#Oblivion Monk#\r\n#L17#Kill All & Clear Drops#");
} else if (status == 1) {
if (cm.getChar().isDonor()) {
if (selection == 0) {
cm.summonMob(100100, 15000, 1000000, 5);
cm.dispose();
} else if (selection == 1) {
cm.summonMob(100101, 30000, 1500000, 5);
cm.dispose();
} else if (selection == 2) {
cm.summonMob(130101, 50000, 2000000, 5);
cm.dispose();
} else if (selection == 3) {
cm.summonMob(210100, 69000, 2250000, 5);
cm.dispose();
} else if (selection == 4) {
cm.summonMob(1210100, 80000, 2750000, 5);
cm.dispose();
} else if (selection == 5) {
cm.summonMob(3300000, 100000, 3150000, 5);
cm.dispose();
} else if (selection == 6) {
cm.summonMob(3210800, 125000, 3450000, 5);
cm.dispose();
} else if (selection == 7) {
cm.summonMob(4230103, 135000, 3650000, 5);
cm.dispose();
} else if (selection == 8) {
cm.summonMob(4230104, 150000, 3750000, 5);
cm.dispose();
} else if (selection == 9) {
cm.summonMob(5130107, 200000, 4050000, 5);
cm.dispose();
} else if (selection == 10) {
cm.summonMob(6230500, 250000, 5000000, 5);
cm.dispose();
} else if (selection == 11) {
cm.summonMob(7130100, 300000, 5250000, 5);
cm.dispose();
} else if (selection == 12) {
cm.summonMob(9400581, 350000, 5600000, 5);
cm.dispose();
} else if (selection == 13) {
cm.summonMob(9420540, 375000, 6000000, 5);
cm.dispose();
} else if (selection == 14) {
cm.summonMob(8150200, 450000, 6969696, 5);
cm.dispose();
} else if (selection == 15) {
cm.summonMob(8200006, 500000, 7000000, 5);
cm.dispose();
} else if (selection == 16) {
cm.summonMob(8200009, 650000, 8000000, 5);
cm.dispose();
} else if (selection == 17) {
cm.killAllMonsters();
cm.clearDrops();
cm.dispose(); ;
}
} else {
cm.sendOk("#r You are not a donor!#k");
cm.dispose();
}
}
}
Second NPC fix:
Code:
function start() {
cm.sendSimple("Hello #r #h ##k. I am the #bGameMaster #k NPC for #r EternalMS#k. So, what would you like to do today?\r\n\r\n#L0#Check GameMaster rules#\r\n#L1#Check GameMaster Commands#\r\n#L2#Check Developper Commands#\r\n#L3#Check Admin Commands#\r\n#L4#Check Staff List#\r\n#L5#Skypes#");
}
function action(mode, type, selection) {
if (mode > 0) {
if (selection == 0) {
cm.sendOk("Since you have clicked this selection, I will now tell you the GM rules. Please note that you will only have #e #r 3 chances##k. If you break a severe rule, you will be automatically denied and will face various concequences.\r\n\r\n#bRule 1#k: The first rule is pretty simple, it's that you're not allowed to hack. Hacking is forbidden, for players and for GameMasters. If you are Level 5, you may hack. If you are under, you need to be trusted by an administrator in order to do so. Any kind of hack is illegal, this counts for #e Packet editing, Damage hacking, etc#k. If you do hack, and that a regular player or an admin finds you, you will be #r automatically demoted and banned permanantly#k. You will be IP banned from the server, banned on the forums and banned on our chatbox.\r\n\r\n#bRule 2#k: It is strongly forbidden to give out free items to other players without any reason. Items are only given on special occasions, which are events. That's it. Even if you give 1 single item, it's over. You will be demoted from the team and will have no more chances on applying. We will not ban you for breaking that rule. We will remove your account, which means that you will make a new account and start all over again.\r\n\r\n#bRule 3#k: You will have to act mature whenever you are online, on the forums, chatbox and in-game. We don't want any immature people on our team. You will recieve a strike if you do act immature, and that's it.\r\n\r\n#r Work in progress#k!");
} else if (selection == 1) {
cm.sendOk("You get all commands from #r regular players and GM donator#k.\r\n\r\n!search\r\n!buffme\r\n!autorebirth\r\n!itemvac\r\n!dnotice <message>!ap <amount>\r\n!cleardrops\r\n!dc <player>\r\n!whereami\r\n!smegaoff\r\n!unjail\r\n!smegaon\r\n!id\r\n!djob\r\n!reloadallmaps\r\n!killall\r\n!saveall\r\n!level <1 to 255>\r\n!notice <message>\r\n!me\r\n!whosthere\r\n!cheaters\r\n!reconnect\r\n!reconnectchan\r\n!closeallmerchants\r\n!online\r\n!givevotepoints <amount>\r\n!ban <player>\r\n!map <mapID>\r\n!chatinfo\r\n!warphere <IGN>\r\n!warp <IGN>\r\n!spawn\r\n!say <message>\r\n!warpmap <mapID>");
} else if (selection == 2) {
cm.sendOk("You get all commands from #r regular players, Donator GameMaster and GameMaster#k.\r\n\r\n!gc\r\n!pnpc <npcID>\r\n!shutdownworld\r\n!proitem <itemID> <stats>\r\n!proitem2 <itemID>\r\n!playernpc\r\n!pmob <mobID>\r\n!npc <npcID>\r\n!saveall\r\n!zakum");
} else if (selection == 3) {
cm.sendOk("You get all commands from #r regular players, Donatoe GameMaster, GameMaster and developper#k.\r\n\r\n!gc\r\n!pinkbean\r\n!gmperson <player> <level>\r\n!fakechar\r\n!watch\r\n!donorpoints <player> <amount>\r\n!tiredpoints <player> <amount>\r\n!afk\r\n!jqpoints <player> <amount>\r\n!eventpoints <player> <amount>\r\n!setgmlevel <player> <level>");
} else if (selection == 4) {
cm.sendOk("#r Owner#k: Beta\r\n#r Super-GM#k: Teddie, Cyber, Chibi\r\n#r NPC Scripter#k: Teddie, Saint\r\n#r GFX Artist#k: Cyber\r\n #r Wizet Editor#k: Cyber");
} else if (selection == 5) {
cm.sendOk("Work in progress!");
}
}
cm.dispose();
}
-
Re: Scripting help.
Euh, the NPC did this after the second script:
http://prntscr.com/2fai55
First one does this:
http://prntscr.com/2falkb
-
Re: Scripting help.
Fixed.
Code:
var status = -1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.sendOk("See you later dawg.");
cm.dispose();
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hey #r #h ##k. I am the donor boss spawner. These spawners give a #r decent amount of XP#k.\r\n\r\n#bPlease pick a mob below#k.\r\n#L0#Snail#l\r\n#L1#Blue Snail#l\r\n#L2#red Snail#l\r\n#L3#Slime#l\r\n#L4#Orange Mushroom#l\r\n#L5#Pig#l\r\n#L6#renegade Spore#l\r\n#L7#Lupin#l\r\n#L7#Iron Hog#l\r\n#L8#Clang#l\r\n#L9#Coolie Zombie#l\r\n#L10#Soul Master #r Teddie#k#l\r\n#L11#Tauromacis#l\r\n#L12#Stormbreaker#l\r\n#L13#Gallopera#l\r\n#L14#Green Cornian#l\r\n#L15#Monk Trainee#l\r\n#L16#Oblivion Monk#l\r\n#L17#Kill All & Clear Drops#l");
} else if (status == 1) {
if (cm.getChar().isDonor()) {
if (selection == 0) {
cm.summonMob(100100, 15000, 1000000, 5);
cm.dispose();
} else if (selection == 1) {
cm.summonMob(100101, 30000, 1500000, 5);
cm.dispose();
} else if (selection == 2) {
cm.summonMob(130101, 50000, 2000000, 5);
cm.dispose();
} else if (selection == 3) {
cm.summonMob(210100, 69000, 2250000, 5);
cm.dispose();
} else if (selection == 4) {
cm.summonMob(1210100, 80000, 2750000, 5);
cm.dispose();
} else if (selection == 5) {
cm.summonMob(3300000, 100000, 3150000, 5);
cm.dispose();
} else if (selection == 6) {
cm.summonMob(3210800, 125000, 3450000, 5);
cm.dispose();
} else if (selection == 7) {
cm.summonMob(4230103, 135000, 3650000, 5);
cm.dispose();
} else if (selection == 8) {
cm.summonMob(4230104, 150000, 3750000, 5);
cm.dispose();
} else if (selection == 9) {
cm.summonMob(5130107, 200000, 4050000, 5);
cm.dispose();
} else if (selection == 10) {
cm.summonMob(6230500, 250000, 5000000, 5);
cm.dispose();
} else if (selection == 11) {
cm.summonMob(7130100, 300000, 5250000, 5);
cm.dispose();
} else if (selection == 12) {
cm.summonMob(9400581, 350000, 5600000, 5);
cm.dispose();
} else if (selection == 13) {
cm.summonMob(9420540, 375000, 6000000, 5);
cm.dispose();
} else if (selection == 14) {
cm.summonMob(8150200, 450000, 6969696, 5);
cm.dispose();
} else if (selection == 15) {
cm.summonMob(8200006, 500000, 7000000, 5);
cm.dispose();
} else if (selection == 16) {
cm.summonMob(8200009, 650000, 8000000, 5);
cm.dispose();
} else if (selection == 17) {
cm.killAllMonsters();
cm.clearDrops();
cm.dispose(); ;
}
} else {
cm.sendOk("#r You are not a donor!#k");
cm.dispose();
}
}
}
Code:
function start() {
cm.sendSimple("Hello #r #h ##k. I am the #bGameMaster #k NPC for #r EternalMS#k. So, what would you like to do today?\r\n\r\n#L0#Check GameMaster rules#l\r\n#L1#Check GameMaster Commands#l\r\n#L2#Check Developper Commands#l\r\n#L3#Check Admin Commands#l\r\n#L4#Check Staff List#l\r\n#L5#Skypes#l");
}
function action(mode, type, selection) {
if (mode > 0) {
if (selection == 0) {
cm.sendOk("Since you have clicked this selection, I will now tell you the GM rules. Please note that you will only have #e #r 3 chances##k. If you break a severe rule, you will be automatically denied and will face various concequences.\r\n\r\n#bRule 1#k: The first rule is pretty simple, it's that you're not allowed to hack. Hacking is forbidden, for players and for GameMasters. If you are Level 5, you may hack. If you are under, you need to be trusted by an administrator in order to do so. Any kind of hack is illegal, this counts for #e Packet editing, Damage hacking, etc#k. If you do hack, and that a regular player or an admin finds you, you will be #r automatically demoted and banned permanantly#k. You will be IP banned from the server, banned on the forums and banned on our chatbox.\r\n\r\n#bRule 2#k: It is strongly forbidden to give out free items to other players without any reason. Items are only given on special occasions, which are events. That's it. Even if you give 1 single item, it's over. You will be demoted from the team and will have no more chances on applying. We will not ban you for breaking that rule. We will remove your account, which means that you will make a new account and start all over again.\r\n\r\n#bRule 3#k: You will have to act mature whenever you are online, on the forums, chatbox and in-game. We don't want any immature people on our team. You will recieve a strike if you do act immature, and that's it.\r\n\r\n#r Work in progress#k!");
} else if (selection == 1) {
cm.sendOk("You get all commands from #r regular players and GM donator#k.\r\n\r\n!search\r\n!buffme\r\n!autorebirth\r\n!itemvac\r\n!dnotice <message>!ap <amount>\r\n!cleardrops\r\n!dc <player>\r\n!whereami\r\n!smegaoff\r\n!unjail\r\n!smegaon\r\n!id\r\n!djob\r\n!reloadallmaps\r\n!killall\r\n!saveall\r\n!level <1 to 255>\r\n!notice <message>\r\n!me\r\n!whosthere\r\n!cheaters\r\n!reconnect\r\n!reconnectchan\r\n!closeallmerchants\r\n!online\r\n!givevotepoints <amount>\r\n!ban <player>\r\n!map <mapID>\r\n!chatinfo\r\n!warphere <IGN>\r\n!warp <IGN>\r\n!spawn\r\n!say <message>\r\n!warpmap <mapID>");
} else if (selection == 2) {
cm.sendOk("You get all commands from #r regular players, Donator GameMaster and GameMaster#k.\r\n\r\n!gc\r\n!pnpc <npcID>\r\n!shutdownworld\r\n!proitem <itemID> <stats>\r\n!proitem2 <itemID>\r\n!playernpc\r\n!pmob <mobID>\r\n!npc <npcID>\r\n!saveall\r\n!zakum");
} else if (selection == 3) {
cm.sendOk("You get all commands from #r regular players, Donatoe GameMaster, GameMaster and developper#k.\r\n\r\n!gc\r\n!pinkbean\r\n!gmperson <player> <level>\r\n!fakechar\r\n!watch\r\n!donorpoints <player> <amount>\r\n!tiredpoints <player> <amount>\r\n!afk\r\n!jqpoints <player> <amount>\r\n!eventpoints <player> <amount>\r\n!setgmlevel <player> <level>");
} else if (selection == 4) {
cm.sendOk("#r Owner#k: Beta\r\n#r Super-GM#k: Teddie, Cyber, Chibi\r\n#r NPC Scripter#k: Teddie, Saint\r\n#r GFX Artist#k: Cyber\r\n #r Wizet Editor#k: Cyber");
} else if (selection == 5) {
cm.sendOk("Work in progress!");
}
}
cm.dispose();
}
-
Re: Scripting help.
Quote:
Originally Posted by
StripedCow
Fixed.
Code:
var status = -1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.sendOk("See you later dawg.");
cm.dispose();
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Hey #r #h ##k. I am the donor boss spawner. These spawners give a #r decent amount of XP#k.\r\n\r\n#bPlease pick a mob below#k.\r\n#L0#Snail#l\r\n#L1#Blue Snail#l\r\n#L2#red Snail#l\r\n#L3#Slime#l\r\n#L4#Orange Mushroom#l\r\n#L5#Pig#l\r\n#L6#renegade Spore#l\r\n#L7#Lupin#l\r\n#L7#Iron Hog#l\r\n#L8#Clang#l\r\n#L9#Coolie Zombie#l\r\n#L10#Soul Master #r Teddie#k#l\r\n#L11#Tauromacis#l\r\n#L12#Stormbreaker#l\r\n#L13#Gallopera#l\r\n#L14#Green Cornian#l\r\n#L15#Monk Trainee#l\r\n#L16#Oblivion Monk#l\r\n#L17#Kill All & Clear Drops#l");
} else if (status == 1) {
if (cm.getChar().isDonor()) {
if (selection == 0) {
cm.summonMob(100100, 15000, 1000000, 5);
cm.dispose();
} else if (selection == 1) {
cm.summonMob(100101, 30000, 1500000, 5);
cm.dispose();
} else if (selection == 2) {
cm.summonMob(130101, 50000, 2000000, 5);
cm.dispose();
} else if (selection == 3) {
cm.summonMob(210100, 69000, 2250000, 5);
cm.dispose();
} else if (selection == 4) {
cm.summonMob(1210100, 80000, 2750000, 5);
cm.dispose();
} else if (selection == 5) {
cm.summonMob(3300000, 100000, 3150000, 5);
cm.dispose();
} else if (selection == 6) {
cm.summonMob(3210800, 125000, 3450000, 5);
cm.dispose();
} else if (selection == 7) {
cm.summonMob(4230103, 135000, 3650000, 5);
cm.dispose();
} else if (selection == 8) {
cm.summonMob(4230104, 150000, 3750000, 5);
cm.dispose();
} else if (selection == 9) {
cm.summonMob(5130107, 200000, 4050000, 5);
cm.dispose();
} else if (selection == 10) {
cm.summonMob(6230500, 250000, 5000000, 5);
cm.dispose();
} else if (selection == 11) {
cm.summonMob(7130100, 300000, 5250000, 5);
cm.dispose();
} else if (selection == 12) {
cm.summonMob(9400581, 350000, 5600000, 5);
cm.dispose();
} else if (selection == 13) {
cm.summonMob(9420540, 375000, 6000000, 5);
cm.dispose();
} else if (selection == 14) {
cm.summonMob(8150200, 450000, 6969696, 5);
cm.dispose();
} else if (selection == 15) {
cm.summonMob(8200006, 500000, 7000000, 5);
cm.dispose();
} else if (selection == 16) {
cm.summonMob(8200009, 650000, 8000000, 5);
cm.dispose();
} else if (selection == 17) {
cm.killAllMonsters();
cm.clearDrops();
cm.dispose(); ;
}
} else {
cm.sendOk("#r You are not a donor!#k");
cm.dispose();
}
}
}
Code:
function start() {
cm.sendSimple("Hello #r #h ##k. I am the #bGameMaster #k NPC for #r EternalMS#k. So, what would you like to do today?\r\n\r\n#L0#Check GameMaster rules#l\r\n#L1#Check GameMaster Commands#l\r\n#L2#Check Developper Commands#l\r\n#L3#Check Admin Commands#l\r\n#L4#Check Staff List#l\r\n#L5#Skypes#l");
}
function action(mode, type, selection) {
if (mode > 0) {
if (selection == 0) {
cm.sendOk("Since you have clicked this selection, I will now tell you the GM rules. Please note that you will only have #e #r 3 chances##k. If you break a severe rule, you will be automatically denied and will face various concequences.\r\n\r\n#bRule 1#k: The first rule is pretty simple, it's that you're not allowed to hack. Hacking is forbidden, for players and for GameMasters. If you are Level 5, you may hack. If you are under, you need to be trusted by an administrator in order to do so. Any kind of hack is illegal, this counts for #e Packet editing, Damage hacking, etc#k. If you do hack, and that a regular player or an admin finds you, you will be #r automatically demoted and banned permanantly#k. You will be IP banned from the server, banned on the forums and banned on our chatbox.\r\n\r\n#bRule 2#k: It is strongly forbidden to give out free items to other players without any reason. Items are only given on special occasions, which are events. That's it. Even if you give 1 single item, it's over. You will be demoted from the team and will have no more chances on applying. We will not ban you for breaking that rule. We will remove your account, which means that you will make a new account and start all over again.\r\n\r\n#bRule 3#k: You will have to act mature whenever you are online, on the forums, chatbox and in-game. We don't want any immature people on our team. You will recieve a strike if you do act immature, and that's it.\r\n\r\n#r Work in progress#k!");
} else if (selection == 1) {
cm.sendOk("You get all commands from #r regular players and GM donator#k.\r\n\r\n!search\r\n!buffme\r\n!autorebirth\r\n!itemvac\r\n!dnotice <message>!ap <amount>\r\n!cleardrops\r\n!dc <player>\r\n!whereami\r\n!smegaoff\r\n!unjail\r\n!smegaon\r\n!id\r\n!djob\r\n!reloadallmaps\r\n!killall\r\n!saveall\r\n!level <1 to 255>\r\n!notice <message>\r\n!me\r\n!whosthere\r\n!cheaters\r\n!reconnect\r\n!reconnectchan\r\n!closeallmerchants\r\n!online\r\n!givevotepoints <amount>\r\n!ban <player>\r\n!map <mapID>\r\n!chatinfo\r\n!warphere <IGN>\r\n!warp <IGN>\r\n!spawn\r\n!say <message>\r\n!warpmap <mapID>");
} else if (selection == 2) {
cm.sendOk("You get all commands from #r regular players, Donator GameMaster and GameMaster#k.\r\n\r\n!gc\r\n!pnpc <npcID>\r\n!shutdownworld\r\n!proitem <itemID> <stats>\r\n!proitem2 <itemID>\r\n!playernpc\r\n!pmob <mobID>\r\n!npc <npcID>\r\n!saveall\r\n!zakum");
} else if (selection == 3) {
cm.sendOk("You get all commands from #r regular players, Donatoe GameMaster, GameMaster and developper#k.\r\n\r\n!gc\r\n!pinkbean\r\n!gmperson <player> <level>\r\n!fakechar\r\n!watch\r\n!donorpoints <player> <amount>\r\n!tiredpoints <player> <amount>\r\n!afk\r\n!jqpoints <player> <amount>\r\n!eventpoints <player> <amount>\r\n!setgmlevel <player> <level>");
} else if (selection == 4) {
cm.sendOk("#r Owner#k: Beta\r\n#r Super-GM#k: Teddie, Cyber, Chibi\r\n#r NPC Scripter#k: Teddie, Saint\r\n#r GFX Artist#k: Cyber\r\n #r Wizet Editor#k: Cyber");
} else if (selection == 5) {
cm.sendOk("Work in progress!");
}
}
cm.dispose();
}
No switch/case for selection StripedCow? ;)
-
Re: Scripting help.
too lazy to redo his NPCs. @Drum