Cheat Engine

The Underground Site of Cheat Engine


    Fixed Store Banker

    Share

    Admin
    Admin

    Posts : 43
    Join date : 2009-05-18

    Fixed Store Banker

    Post  Admin on Mon May 18, 2009 11:50 am

    Fixed up the Store banker, you can now receive your mesos and items from Fredrick.

    9030000.js
    [PHP]/*Fredrick NPC (9030000)
    *By Moogra (Fixed by Ronald)
    */
    importPackage(net.sf.odinms.server);

    var status;
    var choice;

    function start() {
    status = -1;
    action(1, 0, 0);
    }

    function action(mode, type, selection) {
    if (mode == 1)
    status++;
    else {
    cm.dispose();
    return;
    }

    if (status == 0)
    cm.sendNext("Hi, I'm the store banker for MapleExclusive");
    else if (status == 1)
    cm.sendSimple("Would you like to withdraw\r\n#b#L0#Mesos#l #L1#Items#l");
    else if (status == 2) {
    cm.sendNext("Let me check if you have any...");
    choice = selection;
    } else {
    if (choice == 0) {
    if (status == 3) {
    var mesoEarnt = cm.getHiredMerchantMesos();
    if (mesoEarnt > 0)
    cm.sendYesNo("You have made "+mesoEarnt+" mesos in your store so far. Would you like to withdraw them?");
    else {
    cm.sendNext("You have not made any mesos");
    cm.dispose();
    }
    } else if (status == 4) {
    if (cm.getPlayer().getMeso() + cm.getHiredMerchantMesos() <= 2147483647) {
    cm.sendNext("Thank you for using my services, your mesos has been recieved");
    cm.gainMeso(cm.getHiredMerchantMesos());
    cm.setHiredMerchantMesos(0);
    } else {
    cm.sendOk("You have too much mesos with you.");
    }
    cm.dispose();
    }
    } else {
    if (status == 3) {
    var items = cm.getHiredMerchantItems();
    if (items.size() > 0) {
    var text = "Please select an item\r\n";
    for (var i = 0; i < items.size(); i++)
    text += "#L"+i+"##i"+items.get(i).getRight().getItemId()+"##l ";
    cm.sendSimple(text);
    } else {
    cm.sendNext("You do not have any items in your store.");
    cm.dispose();
    }
    } else if (status == 4) {
    var items = cm.getHiredMerchantItems();
    if (cm.getC() == null)
    cm.getPlayer().dropMessage("RAWR");
    MapleInventoryManipulator.addFromDrop(cm.getC(), items.get(selection).getRight(), false);
    cm.sendNext("Thank you for using my services, your item has been recieved.");
    cm.removeHiredMerchantItem(items.get(selection).getLeft());
    cm.dispose();
    }
    }
    }
    }[/PHP]

      Current date/time is Wed Sep 26, 2018 8:57 am