[Release] Meso Bank Npc [Updated! V2.5!]

Status
Not open for further replies.
Joined
Apr 12, 2008
Messages
729
Reaction score
28
Sorry for the odd title, i didnt exactly know what to call it lol.

Who: Jake (the subway guy in kerning)

What it does: I dont know about you guys, but on my server, people normally want to get more then the max amount of mesos. But with the cap, they cant.

So i made an npc, that if you give him 1.5bil mesos, he will give you an item (dont worry, no monster drops it that i know of, i checked). You can hold up to 50 of the item (you can change if u want). Then, if u spend your mesos, and want more, talk to him and he will take the item back, and give you your 1.5bil mesos back.


Its kinda an easy thing to do, i know lol. But even though its ez, its very helpful on some servers.





Script:


IF YOU DONT ALREADY HAVE THIS:

In NpcConversationManager.java:

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

If you already have it, skip it and just use the npc script.

Open a notepad.
Paste the script in there.
Save it as: 1052006.js
Move to your scripts->npc folder.
Enjoy!


1052006.js

V2.5 (Added check for mesos)
Code:
//Kippieeej for the base of the script, Mikethemak for editing it for this function.
var status = 0;
 
function start() {
    status = -1;
    action(1, 0, 0);
}
 
function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0 && status == 0) {
            cm.dispose();
            return;
        }
        if (mode == 1)
            status++;
        else
            status--;
        if (status == 0) {
                cm.sendSimple("Hello #h #, Welcome to #rMapleRebellion#k\r\nAre your mesos maxed out? Want to get more? Well i can help!\r\nI give you rare money sacks that you can trade in at any time for mesos! You can hold up to 50 of each sack. Come to me at any time to give me one, and ill give you your money back!\r\n \r\nWhat would you like to do? \r\n#L1##bTrade 1.5bil for 1 #v5200002##k#l \r\n \r\n#L2##bTrade 1 #v5200002# for 1.5bil#k#l \r\n \r\n#L3#Trade 1bil Mesos for 1 #v5200001##l \r\n#L4#Trade 1 #v5200001# For 1bil mesos.#l \r\n#L5#Trade 500m mesos for 1 #v5200000##l \r\n#L6#Trade 1 #v5200000# For 500m mesos.#l");
        //cm.dispose();
            } else if (status == 1) {
            if (selection == 1) {
    if (cm.itemQuantity(5200002) >= 50) {
    cm.sendOk(" I Think you have enough #v5200002# saved up, try spending some of your mesos, and cashing in a few #v5200002# before you buy more.");
    cm.dispose();
        }  else if (cm.getMeso() >= 1500000000) {
                    cm.gainMeso(-1500000000);                
                    cm.gainItem(5200002, 1); 
                    cm.dispose();
                } else {
                    cm.sendOk("You don't have enough #bMesos#k, are you trying to #eScam#k me!?");
                    cm.dispose();
                }                                
            } else if (selection == 2) {
		if (cm.getMeso() >= 647000000) {
		cm.sendOk("Dont get too carried away, if you trade in your money sack now, you wont get any money! You need to spend some, if you have then the meso limit after u trade in your money sack, you wont get mesos!");
                cm.dispose();
		} else if (cm.itemQuantity(5200002) >= 1) {
                    cm.gainMeso(1500000000);                
                    cm.gainItem(5200002, -1); 
                    cm.dispose();
                } else {
                    cm.sendOk("You don't have any #v5200002#. Please come back when you have some to cash in.");
                    cm.dispose();
                }    
            } else if (selection == 3) {
    if (cm.itemQuantity(5200000) >= 50) {
    cm.sendOk(" I Think you have enough #v5200001# saved up, try spending some of your mesos, and cashing in a few #v5200001# before you buy more.");
    cm.dispose();
    } else if (cm.getMeso() >= 1000000000) {
                    cm.gainMeso(-1000000000);                
                    cm.gainItem(5200001, 1); 
                    cm.dispose();
                   }
        } else if (selection == 4) {
		if (cm.getMeso() >= 1147000000) {
		cm.sendOk("Dont get too carried away, if you trade in your money sack now, you wont get any money! You need to spend some, if you have then the meso limit after u trade in your money sack, you wont get mesos!");
                cm.dispose();
                } else if (cm.itemQuantity(5200001) >= 1) {
                    cm.gainMeso(1000000000);                
                    cm.gainItem(5200001, -1); 
                    cm.dispose();
                } else {
                    cm.sendOk("You don't have any #v5200001#. Please come back when you have some to cash in.");
                    cm.dispose();
               }    
            } else if (selection == 5) {
    if (cm.itemQuantity(5200000) >= 50) {
    cm.sendOk(" I Think you have enough #v5200000# saved up, try spending some of your mesos, and cashing in a few #v5200000# before you buy more.");
    cm.dispose();
    } else if (cm.getMeso() >= 500000000) {
                    cm.gainMeso(-500000000);                
                    cm.gainItem(5200000, 1); 
                    cm.dispose();
            }
                } else if (selection == 6) {
		if (cm.getMeso() >= 1647000000) {
		cm.sendOk("Dont get too carried away, if you trade in your money sack now, you wont get any money! You need to spend some, if you have then the meso limit after u trade in your money sack, you wont get mesos!");
                cm.dispose();
                } else if (cm.itemQuantity(5200000) >= 1) {
                    cm.gainMeso(500000000);                
                    cm.gainItem(5200000, -1); 
                    cm.dispose();
                } else {
                    cm.sendOk("You don't have any #v5200000#. Please come back when you have some to cash in.");
                    cm.dispose();
                    }    
                }
            }
        }
    }



Newest update: Checks for mesos (so u dont go over the limit)







To put him in the FM:

Open "Your source file"->wz->map.wz->map->map9->910000000.xml
ctrl + f and look for: "life"
Under life, paste this:
Code:
  <imgdir name="6">
   <string name="type" value="n"/>
   <string name="id" value="1052006"/>
   <int name="x" value="434"/>
   <int name="y" value="4"/>
   <int name="mobTime" value="0"/>
   <int name="f" value="0"/>
   <int name="hide" value="0"/>
   <int name="fh" value="46"/>
   <int name="cy" value="34"/>
   <int name="rx0" value="484"/>
   <int name="rx1" value="384"/>
  </imgdir>

That will place him by the portal entrance to FM ROOM #1. If you dont want him there, edit the cords.

Screenshots:
V2.5
mikethemak - [Release] Meso Bank Npc [Updated! V2.5!] - RaGEZONE Forums

mikethemak - [Release] Meso Bank Npc [Updated! V2.5!] - RaGEZONE Forums

mikethemak - [Release] Meso Bank Npc [Updated! V2.5!] - RaGEZONE Forums

mikethemak - [Release] Meso Bank Npc [Updated! V2.5!] - RaGEZONE Forums





Credits

Basic script build: kippieeej (i used the exp seller script, and modified it)
Editing the script and making it work for this function: Me




Questions/Comments? Post em here! Always happy to hear what u think!
 
Last edited:
Re: [Release] Meso Bank Npc

This is actually pretty useful, Since lots of players get to 2.1bil and then goes like ''Zomg hax, cnt pik up!!1!!1!1'' So they can just store it there. It's really cool.
 
Re: [Release] Meso Bank Npc

Hmm not working o.o

Lawl, ive tested this on my server, it works perfectly :P.

This is actually pretty useful, Since lots of players get to 2.1bil and then goes like ''Zomg hax, cnt pik up!!1!!1!1'' So they can just store it there. It's really cool.


I know, i was getting tired of people complaining about that.








@everyone else


Glad you enjoy it! :D
 
Re: [Release] Meso Bank Npc

Update:

Added screenshots.
Fixed it so it only shows the "you have too many" message when you have 50 bubbles AND are trying to buy 1.

It used to show that if u had 50 and you couldnt do anything.

Please use the new script on the first post.
 
Re: [Release] Meso Bank Npc

N1 But Could You Add Something To The Server Properties So You Cant Drop THAT Specific item?
 
Status
Not open for further replies.
Back