Full Fix for hiredmerchant no joke

Results 1 to 11 of 11
  1. #1
    Account Upgraded | Title Enabled! ohmx is offline
    MemberRank
    Jul 2008 Join Date
    270Posts

    Full Fix for hiredmerchant no joke

    simple fix yet no one realises it .


    change
    Code:
    public void setHiredMerchantMesos(int set) {
            Connection con = DatabaseConnection.getConnection();
            try {
                PreparedStatement ps = con.prepareStatement("UPDATE characters SET MerchantMesos = ? WHERE id = ?");
                ps.setInt(1, set);
                ps.setInt(2, getPlayer().getId());
                ps.executeUpdate();
                ps.close();
    
            } catch (SQLException se) {
            }
        }




    to:
    Code:
    public void zeroMerchantMesos() {
            try {
                PreparedStatement ps = DatabaseConnection.getConnection().prepareStatement("UPDATE characters SET MerchantMesos = 0 WHERE id = ?");
                ps.setInt(1, getPlayer().getId());
                ps.executeUpdate();
                ps.close();
            } catch (Exception e) {
            }
        }
    fredrick 9030000

    Code:
    /* ajaja */
    importPackage(net.sf.odinms.server);
    var status = 0;
    var text = "";
    
    function start() {
        status = -1;
        action(1, 0, 0);
    }
    
    function action(mode, type, selection) {
    
        if (mode == -1) {
            cm.dispose();
        } else {
            if (mode == 0) {
                cm.dispose();
                return;
            }
            if (mode == 1)
                status++;
            else
                status--;
            if (status == 0) {
                 cm.sendSimple("I'm fredrick. You can pick up your Hired Merchant's item's or mesos here.\r\n#b#L0#Pick up mesos#l\r\n#L1#Pick up items#l");
            } else if (status == 1) {
                switch(selection) {
                  case 0:
                    if (cm.getHiredMerchantMesos() > 0) {
                          setid = 0;
                          cm.sendYesNo(" You have made #r" + cm.getHiredMerchantMesos() + "#k in your merchant. Would you like to take them out?");
                    } else {
                          cm.sendOk("You either don't have a Hired Merchant or you do not have any mesos stored.");
                          cm.dispose();
                    }
                  break;
                  case 1:
                          setid = 1;
                    if (cm.getHiredMerchantItems().size() > 0) {
                          var text = "????????????????? : \r\n";
                          for (var i = 0; i < cm.getHiredMerchantItems().size(); i++) {
                                text += "#b#L"+i+"##t"+cm.getHiredMerchantItems().get(i).getRight().getItemId()+"##l\r\n";
                          }
                          cm.sendSimple(text);
                    } else {
                          cm.sendOk("You either don't have a Hired Merchant or you do not have any items stored here.");
                          cm.dispose();
                    }
                  break;
                  case 2:
                      setid = 2;
                      cm.sendGetText("1?#e#b500#n#k?????????????????????");
                  break;
                  case 3:
                      setid = 3;
                      cm.sendGetText("1LV~50LV?????????????? #e#b 1 #n#k????50LV~70LV??????????????#e#b 2 #n#k??????????");
                  break;
                  case 4:
                      cm.openShop(1330);
                          cm.dispose();
                  break;
                  case 5:
                      cm.openShop(1332);
                          cm.dispose();
                  break;
                }
            } else if (status == 2) {
    
                switch (setid) {
    
                  case 0:
                    cm.sendOk("Your mesos that were stored in your merchant were succesfully recived.");
                    cm.gainMeso(cm.getHiredMerchantMesos());
                    cm.zeroMerchantMesos();
                    cm.dispose();
                    //return;
                  break;
                  case 1:
                	MapleInventoryManipulator.addFromDrop(cm.getChar().getClient(), cm.getHiredMerchantItems().get(selection).getRight(), true);
                    cm.sendOk("Your items that were stores in your Hired Merchant were succesfully recived.");
                    cm.removeHiredMerchantItem(cm.getHiredMerchantItems().get(selection).getLeft());
                    cm.dispose();
                  break;
                  case 2:
                      buyquarity = cm.getText();
                      if (cm.getMeso() >= (buyquarity * 500)) {
                          cm.sendYesNo(buyquarity + "????????????");
                      } else {
                          cm.sendOk("???????????????????????");
                          cm.dispose();
                      }
                  break;
                  case 3:
                    openid = cm.getText();
                    if (openid == 1) {
                        setshop = 1300;
                    } else if (openid == 2) {
                        setshop = 1301;
                    } else {
                          cm.sendOk("??????????????????????");
                          status == 1;
                          cm.dispose();
                          break;
                    }
                    cm.openShop(setshop);
                  break;
    
                }
    
            } else if (status == 3) {
                cm.gainItem(5390002, buyquarity);
                cm.gainMeso(-(buyquarity * 500));
                cm.sendOk("????????????????????????????????????????????????????????");
                cm.dispose();
            }
        }
    }
    not to be cocky . my method win xiuzsource's full merchants completely .not to criticise his work or something . but his method work too but just complicated and eat up space
    Last edited by ohmx; 17-09-09 at 12:57 PM.


  2. #2
    Account Upgraded | Title Enabled! PinkGatsby is offline
    MemberRank
    Mar 2009 Join Date
    AmericaLocation
    434Posts

    Re: Full Fix for hiredmerchant no joke

    I don't remember me writing zeroMerchantMesos() in xotic.

    btw funny how you still use zeroMerchantMesos() in the npc script.

  3. #3
    Member cheezii is offline
    MemberRank
    Aug 2008 Join Date
    78Posts

    Re: Full Fix for hiredmerchant no joke

    Sorry, i'm new here. Where to find this?

    PHP Code:
    public void setHiredMerchantMesos(int set) {
            
    Connection con DatabaseConnection.getConnection();
            try {
                
    PreparedStatement ps con.prepareStatement("UPDATE characters SET MerchantMesos = ? WHERE id = ?");
                
    ps.setInt(1set);
                
    ps.setInt(2getPlayer().getId());
                
    ps.executeUpdate();
                
    ps.close();

            } catch (
    SQLException se) {
            }
        } 

  4. #4
    Account Upgraded | Title Enabled! PinkGatsby is offline
    MemberRank
    Mar 2009 Join Date
    AmericaLocation
    434Posts

    Re: Full Fix for hiredmerchant no joke

    NpcConversationManager

  5. #5
    Account Upgraded | Title Enabled! shlomivman is offline
    MemberRank
    Jan 2006 Join Date
    284Posts

    Re: Full Fix for hiredmerchant no joke

    Lawl AMG ZOMG Works!

  6. #6
    Account Upgraded | Title Enabled! ohmx is offline
    MemberRank
    Jul 2008 Join Date
    270Posts

    Re: Full Fix for hiredmerchant no joke

    Quote Originally Posted by PinkGatsby View Post
    I don't remember me writing zeroMerchantMesos() in xotic.

    btw funny how you still use zeroMerchantMesos() in the npc script.
    i notice an error on the zero merchant on the bat though . i just change it to suit those stuff

  7. #7
    Valued Member MyEnterprises is offline
    MemberRank
    Dec 2008 Join Date
    130Posts

    Re: Full Fix for hiredmerchant no joke

    good release but you didn't write zeroMerchantMesos

  8. #8
    Account Upgraded | Title Enabled! X-Tasis is offline
    MemberRank
    Feb 2009 Join Date
    1,192Posts

    Re: Full Fix for hiredmerchant no joke

    Quote Originally Posted by PinkGatsby View Post
    I don't remember me writing zeroMerchantMesos() in xotic.

    btw funny how you still use zeroMerchantMesos() in the npc script.
    you didn't write it, mr cockrong did in thepack 2

  9. #9
    Account Upgraded | Title Enabled! meetoo is offline
    MemberRank
    Jul 2008 Join Date
    Canada ~eh.Location
    542Posts

    Re: Full Fix for hiredmerchant no joke

    Quote Originally Posted by X-Tasis View Post
    you didn't write it, mr cockrong did in thepack 2

    Ahh X Tasis You Beat Me to it. :P

    Yeah Your right. :)

  10. #10
    Valued Member AngyTheBitch is offline
    MemberRank
    Dec 2008 Join Date
    125Posts

    Re: Full Fix for hiredmerchant no joke

    Quote Originally Posted by X-Tasis View Post
    you didn't write it, mr cockrong did in thepack 2
    no. Cockrong did not write it. no one did. Cockrong typed it.

  11. #11
    Account Upgraded | Title Enabled! X-Tasis is offline
    MemberRank
    Feb 2009 Join Date
    1,192Posts

    Re: Full Fix for hiredmerchant no joke

    Quote Originally Posted by AngyTheBitch View Post
    no. Cockrong did not write it. no one did. Cockrong typed it.
    Mr.Cockrong use a notebook, he write it before type it.
    phrase is write code btw
    Last edited by X-Tasis; 24-10-09 at 06:20 AM.



Advertisement