Excellzone

Forum and disscussions since 2010


You are not connected. Please login or register

View previous topic View next topic Go down Message [Page 1 of 1]

#1
Excell

avatar
Head Administer
Head Administer
^^^^^^^^^^^^^^^^^^^^^^
Look. v10 O.o

Hey, Someone requested me for an Exp seller, so I made one
first off, put this in NPCConversationManager.java
Code:
public int getExp() {
return getPlayer().getExp();
}

&
Code:
public int itemQuantity(int itemid) {
MapleInventoryType type = MapleItemInformationProvider.getInstance().getInventoryType(itemid);
MapleInventory iv = getPlayer().getInventory(type);
int possesed = iv.countById(itemid);
return possesed;
}

Then, make a new npc, i used 9010011.js (Orange Mushroom) and put this in it:
updated, you will get a key, after 50 keys you receive 75k bonus exp, this one now shows the progress bar

updated
v4 = You can choose how much EXP you will receive, however, theres a
maximum of 127k. i will try to fix that later, because when you do 128
it has to do something with the bytes, and that just doesn't work

Updated v10 The exp function is working! you can get a max of 1bil exp since you cant get more then 2bil mesos
Gms can get free exp now!


PHP Code:
//Made by kippieeej aka Bassoe

var chickenms = 0;



function
start() {

chickenms = -1;

action(1, 0, 0);

}



function
action(mode, type, selection) {

if (
mode == -1) {

cm.dispose();

} else {

if (
mode == 0 && chickenms == 0) {

cm.dispose();

return;

}

if (
mode == 1)

chickenms++;

else

chickenms--;

if (
chickenms == 0) {

if (
cm.itemQuantity(4001026) >= 50) {

cm.sendOk("#fUI/UIWindow.img/QuestIcon/4/0#\r\nYou got 50 #i4001026#!\r\nI will give you some #fUI/UIWindow.img/QuestIcon/8/0#");

cm.gainItem(4001026, -50);

cm.gainExp(75000);

cm.dispose();

} else {

cm.sendSimple("Hello #h #, Welcome to #rChickenMS!#k\r\nYou have this much Keys #B" + (cm.itemQuantity(4001026) * 2) + "#\r\nWhat do you want to do?\r\n#L1##bTrade 10k #fUI/UIWindow.img/QuestIcon/7/0# for 9k #fUI/UIWindow.img/QuestIcon/8/0#!#k#l\r\n\r\n#L2##bTrade 10k #fUI/UIWindow.img/QuestIcon/8/0# for 9k #fUI/UIWindow.img/QuestIcon/7/0#!#k#l\r\n\r\n#L3##bI want to choose how much Exp i get!#k#l\r\n#L4##eNothing really..#n#l");

}

} else if (
chickenms == 1) {

if (
selection == 1) {

if (
cm.getMeso() >= 10000 ) {

cm.gainMeso(-10000);

cm.gainExp(9000);

cm.gainItem(4001026, 1);

cm.dispose();

} else {

cm.sendOk("You don't have enough #bMesos#k\r\nDon't scam me or I will use this on you! #s5001001#");

cm.dispose();

}

} else if (
selection == 2) {

if (
cm.getExp() >= 10000 ) {

cm.gainMeso(9000);

cm.gainExp(-10000);

cm.gainItem(4001026, 1);

cm.dispose();

} else {

cm.sendOk("You don't have enough #bExp#k\r\nDon't scam me or I will use this on you! #s5001001#");

cm.dispose();

}

} else if (
selection == 3) {

var
prompt = "How much exp do you want?\r\n#rI'm fixed, there's no limit anymore!#k";

cm.sendGetText(prompt);

} else {

cm.sendOk("Oh. i see... Well then, have fun in #rChickenMS!#k");

cm.dispose();

}

} else if (
chickenms == 2) {

qty = cm.getText();

cost = (qty * 2);

cm.sendYesNo("Do you really want to pay " + cost + " mesos for " + qty + " Exp?");

} else if (
chickenms == 3) {

if(
cm.getChar().isGM() == 1) {

cm.gainExp(qty);

cm.dispose();

} else {

if (
cm.getMeso() >= cost) {

cm.gainMeso(-cost);

cm.gainExp(qty);

cm.dispose();

} else {

cm.sendOk("You don't have enough #bMesos#k\r\nDon't scam me or I will use this on you! #s5001001#");

cm.dispose();

}

}

} else {

cm.dispose();

}

}

}




After that, you can manually use !npc 9010011
Edit: if you want to put your NPC in free market:
Code:
<imgdir name="2">
<string name="type" value="n"/>
<string name="id" value="9010011"/>
<int name="x" value="520"/>
<int name="y" value="1"/>
<int name="mobTime" value="0"/>
<int name="f" value="0"/>
<int name="hide" value="0"/>
<int name="fh" value="71"/>
<int name="cy" value="6"/>
<int name="rx0" value="470"/>
<int name="rx1" value="570"/>
</imgdir>

Add that to 910000000.img.xml, change 9010011 to the npc you used
and change <imgdir name="2"> to the correct number

Have fun!
Bassoe aka Kippieeej

Woot the progress bar is working!


it will look like this if you have 50 keys:


& progress bar ^^


little improvement XD

View user profile http://excellzone.mrforum.net

View previous topic View next topic Back to top Message [Page 1 of 1]


Permissions in this forum:
You cannot reply to topics in this forum