Compilation of NPCs/Commands
Page 1 of 1
Compilation of NPCs/Commands
alright so i found a few commands/npcs and i'll update it with them when i have time or find new ones
currently found:
@msi command
MSI npc(went ahead and customized it)
Gambling npc
stuck in question npc
PVP map npc(not sure if we need it since we have @duel lol)
all buffs npc(might work idk but it has all buffs and you can choose!)
MSI npc source:
The @msi command:
simple question but funny as shit:
Meso Gambler NPC (guarantee it works):
PVP warp npc:
Buffs npc:
currently found:
@msi command
MSI npc(went ahead and customized it)
Gambling npc
stuck in question npc
PVP map npc(not sure if we need it since we have @duel lol)
all buffs npc(might work idk but it has all buffs and you can choose!)
MSI npc source:
- Spoiler:
the npc:- Code:
importPackage(net.sf.odinms.client);
var status = 0;
var selected = 1;
var wui = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
selected = selection;
if (mode == -1) {
cm.dispose();
} else {
if (status >= 0 && mode == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendAcceptDecline("Hey, Welcome to #rYourServer#k Max Stat Item NPC!(Customized by #gvoyeur#k :P)#k\r\n#rPlease make sure you meet these #bRequirements: \r\n\r\n#b30,000 Stats in all#k\r\n#b250 Tetris Pieces\r\n#b4 VotePoints\r\n#b3 White Scrolls");
} else if (status == 1) {
if (cm.getPlayer().getStr() > 29999 && cm.getPlayer().getDex() > 29999 && cm.getPlayer().getInt() > 29999 && cm.getPlayer().getLuk() > 29999 && cm.haveItem(4000203, 50)){
var String = "Please Choose your desire item or nx you want as your new MSI. Please check your Inventory to make sure u have enough room because, we don't give back refunds.Enjoy!\r\n\r\n";
cm.sendSimple(String+cm.EquipList(cm.getC()));
} else {
cm.sendOk ("Sorry but you don't meet the requirements to Max Stat your item!");
cm.dispose();
}
} else if (status == 2) {
cm.MakeGMItem(selected, cm.getP());
cm.getPlayer().setStr(10); cm.getPlayer().setDex(10); cm.getPlayer().setLuk(10); cm.getPlayer().setInt(10);
cm.gainItem(4000203, -50);
cm.reloadChar();
cm.dispose();
}
if (selection == 1) {
cm.sendOk("Alright have fun, and don't forget to vote!");
cm.dispose();
}
}
}
- Code:
public MapleCharacter getP() {
return getPlayer();
}
public void MakeGMItem (byte slot, MapleCharacter player) {
MapleInventory equip = player.getInventory(MapleInventoryType.EQUIP);
Equip eu = (Equip) equip.getItem(slot);
int item = equip.getItem(slot).getItemId();
MapleJob job = eu.getJob();
short hand = eu.getHands();
byte level = eu.getLevel();
Equip nItem = new Equip(item, equip.getNextFreeSlot());
nItem.setStr((short) 30000); // STR
nItem.setDex((short) 30000); // DEX
nItem.setInt((short) 30000); // INT
nItem.setLuk((short) 30000); //LUK
nItem.setUpgradeSlots((byte) 0);
nItem.setJob(job);
nItem.setHands(hand);
nItem.setLevel(level);
nItem.setRingId(-1);
player.getInventory(MapleInventoryType.EQUIP).addFromDB(nItem);
}
public String EquipList(MapleClient c) {
StringBuilder str = new StringBuilder();
MapleInventory equip = c.getPlayer().getInventory(MapleInventoryType.EQUIP);
List<String> stra = new LinkedList<String>();
for (IItem item : equip.list()) {
stra.add("#L"+item.getPosition()+"##v"+item.getItemId()+"##l");
}
for (String strb : stra) {
str.append(strb);
}
return str.toString();
}
The @msi command:
- Spoiler:
the @msi command:- Code:
} else if (splitted[0].equals("msi")) {
int item = 0;
try {
item = Integer.parseInt(splitted[1]);
} catch (NumberFormatException prb) {
System.out.println("The user: " + player.getName() + "has committed illegal command syntax");
}
if (player.getStr() == 30000 && player.getDex() == 30000 && player.getInt() == 30000 && player.getLuk() == 30000 && player.getitemQuantity() == 50 && player.haveItem(item)) {
if (splitted.length == 1) {
MapleItemInformationProvider miip = MapleItemInformationProvider.getInstance();
IItem pe = miip.getEquipById(item);
MapleInventoryType type = MapleInventoryType.getInstance();
if (type.equals(MapleInventoryType.EQUIP)) {
MapleInventoryManipulator.addFromDrop(c, (IItem) miip.msiItem((Equip) pe, (int) Math.ceil(Math.random() * 4000) + 28000), (int) Math.ceil(Math.random() * 50) + 50));
player.setDex(10);
player.updateSingleStat(MapleStat.DEX, player.getDex());
player.setStr(10);
player.updateSingleStat(MapleStat.STR, player.getStr());
player.setInt(10);
player.updateSingleStat(MapleStat.INT, player.getInt());
player.setLuk(10);
player.updateSingleStat(MapleStat.LUK, player.getLuk());
player.reloadChar();
player.dropMessage(6, "Congratulations " + player.getName() + ", on your successful MSI creation. Enjoy your new and improved " + splitted[1] + "!");
}
} else {
player.dropMessage(6, "Syntax Helper: @msi <item id> || Example: @msi 9999999");
}
} else {
player.dropMessage(6, "You do not meet the requirements to create an MSI, please type @msirules to see the requirements");
}
}
the @msirules command:- Code:
} else if (splitted[0].equalsIgnoreCase("msirules")) {
player.dropMessage("To create an MSI you must have 4 votepoints, and 32767 stats in every stat. When this is done, type @msi <equipid> and you shall"
+ "receive your msi. [Note]: You must have the item you want to make an MSI out of, in your inventory!");
}
simple question but funny as shit:
- Spoiler:
question:- Code:
var status = -1;
function start()
{
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1)
status++;
if (status == 0) {
cm.sendYesNo("Hi there, do you like #gBedtimestori?")
}else{
if (status == 1)
cm.sendOk("#dGood, because I can trap you in my chat window until you say yes.")
cm.dispose();
}
}
Meso Gambler NPC (guarantee it works):
- Spoiler:
source of the npc:- Code:
var a1 = Math.floor(Math.random()*4+1);
var a2 = Math.floor(Math.random()*4+1);
var a3 = Math.floor(Math.random()*4+1);
var a4 = Math.floor(Math.random()*4+1);
var a5 = Math.floor(Math.random()*4+1);
var a6 = Math.floor(Math.random()*4+1);
var a7 = Math.floor(Math.random()*4+1);
var a8 = Math.floor(Math.random()*4+1);
var a9 = Math.floor(Math.random()*4+1);
var status = 0;
var cost = Array(1,10, 10*10, 1000,10000,100000,1000000);
var amount = 0;
var lulz = 0;
var win = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendOk("Oh.. byebye");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("#rDo you want to gamble some mesos?\r\n #pThe jackpot: #r10x your bet!!!#k");
} else if (status == 1) {
cm.sendSimple("#b#L1#I want to do try the Slot Machine#l\r\n#L2#I want to do the Lucky Guess#l#k");
} else if (status == 2) {
var text = "#r How much do you want to gamble?";
for (var i = 0; i < cost.length; i++) {
text += "\r\n#L" + i + "##b" + cost[i] + "#k mesos";
}
cm.sendSimple(text);
if (selection == 2) status = 5;
} else if (status == 3) {
amount = cost[selection];
cm.sendYesNo("#g Are you sure you want to gamble #b" + amount + "#k mesos?");
} else if (status == 4) {
if (cm.getChar().getMeso() < amount) {
cm.sendOk("#r I'm sorry, but you don't have enough mesos");
cm.dispose();
return;
}
cm.gainMeso(-amount);
var text2 = "";
for (var b = 0; b < 3; b++) {
for (var c = 0; c < 3; c++) {
lulz++;
switch(lulz) {
case 1:
text2 += " #i" + (3992001 + a1) + "# |";
break;
case 2:
text2 += " #i" + (3992001 + a2) + "# |";
break;
case 3:
text2 += " #i" + (3992001 + a3) + "#\r\n-------------------------\r\n";
break;
case 4:
text2 += " #i" + (3992001 + a4) + "# |";
break;
case 5:
text2 += " #i" + (3992001 + a5) + "# |";
break;
case 6:
text2 += " #i" + (3992001 + a6) + "#\r\n-------------------------\r\n";
break;
case 7:
text2 += " #i" + (3992001 + a7) + "# |";
break;
case 8:
text2 += " #i" + (3992001 + a8) + "# |";
break;
case 9:
text2 += " #i" + (3992001 + a9) + "#";
break;
default:
text2 += "error";
break;
}
}
}
if (((a1 == a2) && (a1 == a3)) || ((a1 == a5) && (a1 == a9)) || ((a4 == a5) && (a4 == a6)) || ((a7 == a8) && (a7 == a9)) || ((a7 == a5) && (a7 == a3))) {
if (((a4 == a5) && (a4 == a6))) {
text2 += "#rJackpot! Jackpot! JACKITYPOT!#k";
win = 2;
} else {
text2 += "\r\n\r\nWow, it seems like #ryou have won#k!";
win = 1;
}
} else {
text2 += "\r\n\r\nSorry, but you #bhaven't won anything#k..";
win = 0;
}
cm.sendNext(text2);
lulz = 0;
a1 = Math.floor(Math.random()*4+1);
a2 = Math.floor(Math.random()*4+1);
a3 = Math.floor(Math.random()*4+1);
a4 = Math.floor(Math.random()*4+1);
a5 = Math.floor(Math.random()*4+1);
a6 = Math.floor(Math.random()*4+1);
a7 = Math.floor(Math.random()*4+1);
a8 = Math.floor(Math.random()*4+1);
a9 = Math.floor(Math.random()*4+1);
} else if (status == 5) {
if (win == 0) {
cm.sendOk("Better luck next time..\r\nGoodbye and thanks for participating");
cm.dispose();
} else if (win == 1) {
cm.gainMeso(amount * 3);
cm.sendOk("I just tripled your bet!\r\nThanks for participating, and come back any time!");
cm.dispose();
} else {
cm.gainMeso(amount * 10);
cm.sendOk("Wow, good job on winning the #rJackpot#k!\r\nI just have multiplied your bet with 10\r\ncome back any time!");
cm.dispose();
}
} else if (status == 6) {
amount = cost[selection];
cm.sendNext("Ah the lucky guess, i will present you 10 bags\r\nYou will have to open one to see what you have won");
} else if (status == 7) {
if (cm.getChar().getMeso() < amount) {
cm.sendOk("I'm sorry, but you don't have enough mesos");
cm.dispose();
return;
}
cm.gainMeso(-amount);
var text = "";
for (var a = 0; a < 10; a++) {
text += "#L" + a + "##v2100016##l";
}
cm.sendSimple(text);
} else if (status == 8) {
var xyz = Math.floor(Math.random()*10);
if (selection == xyz) {
cm.gainMeso(amount * 10);
cm.sendOk("#r Wow, good job on winning the #rJackpot#k!\r\nI just have multiplied your bet with 10\r\ncome back any time!");
} else {
cm.sendOk("#b :3 Sorry but there was nothing in that sack\r\nBetter luck next time..\r\nGoodbye and thanks for participating");
}
cm.dispose();
}
}
}
PVP warp npc:
- Spoiler:
- Code:
var status = 0;
function start() {
cm.sendYesNo("Do you want to go to the PvP map and fight with your friends?");
}
function action(mode, type, selection) {
if (mode < 1) {
cm.dispose();
} else {
if (status == 0) {
cm.sendNext ("Alright, good luck in there!");
status++;
} else if (status == 1) {
cm.warp(800020400, 0);
cm.dispose();
}
}
}
Buffs npc:
- Spoiler:
buffs npc source:- Code:
importPackage(net.sf.odinms.client);
var status = 0;
var skills = new Array(1002, 1001, 1001003, 2001003, 2001002, 3001003, 4001003, 1101007, 1101006, 1101005, 1201005, 1201004, 1201006, 1005, 1301007, 1301006, 1301005, 1301004, 2101001, 2301003, 5101003, 3101002, 3101004, 3201002, 4101003, 4201002, 1111002, 1211006, 1211004, 1211003, 1211005, 1211008, 1211007, 1311008, 2111005, 2311003, 4111001, 4111002, 4211005, 4211003, 1121000, 1221004, 1221003, 2121004, 2121002, 3121002, 4121006);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1)
cm.dispose();
else {
if (mode == 0)
cm.dispose();
if (mode == 1)
status++;
else
status--;
if (status == 0) {
var seleskill = "Hello #h #, would you like to be buffed?\r\nSelect which buff you want.\r\n#r#eNote#n: You will be using your own MP.#k\r\n#b";
for (var i = 0; i < skills.length; i++)
seleskill += "\r\n#L" + i + "##s" + skills[i] + "# #q" + skills[i] + "##l";
seleskill += "#k";
cm.sendSimple(seleskill);
} else if (status == 1) {
cm.sendOk("Enjoy your buff.");
cm.giveBuff(skills[selection], SkillFactory.getSkill(skills[selection]).getMaxLevel());
cm.dispose();
}
}
}
King Kazma- Posts : 61
Join date : 2011-11-19
Age : 27
Location : OZ
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum