Thread: devo 2.7 problems:(

Results 1 to 6 of 6
  1. #1 devo 2.7 problems:( 
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    hello,
    can someone help me with this please?
    1-if someone is atacked he can trade,dont close trade interface
    2-thieving problem,u can atack this npc and in the same time u can stealhow i can stop stealing when u atack him?
    can someone help me please?
    Reply With Quote  
     

  2. #2  
    Registered Member Suffacatingsins's Avatar
    Join Date
    Oct 2009
    Posts
    52
    Thanks given
    0
    Thanks received
    1
    Rep Power
    4
    For Number 1,

    Search in client.java for

    Code:
    public void tradereq(int id)
    Once you find that, You should see something like this under it...

    Code:
    if(other.interfaceOpened){
    int EnemyX = PlayerHandler.players[trade_reqId].absX;
    int EnemyY = PlayerHandler.players[trade_reqId].absY;
    TurnPlayerTo(EnemyX, EnemyY);
    sM("Other player is busy at the moment.");
    return;
    }
    if(action == 1){
    return;
    }
    if(other.playerName.equalsIgnoreCase(playerName)){
    sM("Other player is busy at the moment.");
    return;
    }
    if(other.action == 1){
    return;
    }
    if(other.playerRights == 2){
    sM("You cannot trade this person.");
    return;
    }
    So what you will do is add This,
    Code:
    if(inCombat){
    sM("You Cannot Trade while in Combat!");
    return;
    }
    if(other.inCombat){
    sM("They cant Trade while in Combat!");
    return;
    }
    After that last bracket.

    So after that it should like like this,

    Code:
    if(other.interfaceOpened){
    int EnemyX = PlayerHandler.players[trade_reqId].absX;
    int EnemyY = PlayerHandler.players[trade_reqId].absY;
    TurnPlayerTo(EnemyX, EnemyY);
    sM("Other player is busy at the moment.");
    return;
    }
    if(action == 1){
    return;
    }
    if(other.playerName.equalsIgnoreCase(playerName)){
    sM("Other player is busy at the moment.");
    return;
    }
    if(other.action == 1){
    return;
    }
    if(other.playerRights == 2){
    sM("You cannot trade this person.");
    return;
    }
    if(inCombat){
    sM("You Cannot Trade while in Combat!");
    return;
    }
    if(other.inCombat){
    sM("They cant Trade while in Combat!");
    return;
    }
    This should work fine

    Remember to backup your files, i cant promise anything.
    September 21, 2008

    Www.RsTwix.Com


    A kiss is a lovely trick designed by nature to stop speech when words become superfluous.
    Reply With Quote  
     

  3. #3  
    Registered Member Suffacatingsins's Avatar
    Join Date
    Oct 2009
    Posts
    52
    Thanks given
    0
    Thanks received
    1
    Rep Power
    4
    For Number two,

    Search in client.java for,
    Code:
    public void TheifStall
    It should look a little like this..

    Code:
    public void TheifStall(String stallName, String message, int lvlReq, int XPamount, int item, int itemAmount, int emote) {
    if(System.currentTimeMillis() - lastAction < actionInterval) return;
     if(playerLevel[17] >= lvlReq) {
       actionInterval = 4000;
       lastAction = System.currentTimeMillis();
       setAnimation(2292);
       sM("You Thief From the Stall..");
       sM(message);
       addItem(item, itemAmount);
       addSkillXP(XPamount, 17);
      }
    }
    once you find this..
    Code:
    if(inCombat){
    sM("You Cannot Theive while in Combat!");
    return;
    }
    After this.
    Code:
    if(System.currentTimeMillis() - lastAction < actionInterval) return;
    So in the end of this, it should end up looking like this..
    Code:
    public void TheifStall(String stallName, String message, int lvlReq, int XPamount, int item, int itemAmount, int emote) {
    if(System.currentTimeMillis() - lastAction < actionInterval) return;
    if(inCombat){
    sM("You Cannot Theive while in Combat!");
    return;
    }
     if(playerLevel[17] >= lvlReq) {
       actionInterval = 4000;
       lastAction = System.currentTimeMillis();
       setAnimation(2292);
       sM("You Thief From the Stall..");
       sM(message);
       addItem(item, itemAmount);
       addSkillXP(XPamount, 17);
      }
    }
    This should work. but remember to backup your files, i cant promise anything.
    September 21, 2008

    Www.RsTwix.Com


    A kiss is a lovely trick designed by nature to stop speech when words become superfluous.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    for first problem i dont have in my server something like other player is busy or something like this to stop trade
    can u help me?
    Reply With Quote  
     

  5. #5  
    Registered Member Suffacatingsins's Avatar
    Join Date
    Oct 2009
    Posts
    52
    Thanks given
    0
    Thanks received
    1
    Rep Power
    4
    did you find 'public void tradeReq' ?

    if so Post that whole void on here and ill look at it
    September 21, 2008

    Www.RsTwix.Com


    A kiss is a lovely trick designed by nature to stop speech when words become superfluous.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    public void requestTrade(int id){
    try {
    client o = (client) server.playerHandler.players[id];
    c.tradeWith = id;
    if(c.inCombat){
    c.CAM().sendMessage("You Cannot Trade while in Combat!");
    return;
    }
    if(o.inCombat){
    o.CAM().sendMessage("They cant Trade while in Combat!");
    return;
    }
    if(!c.inTrade && o.tradeRequested && o.tradeWith == c.playerId) {
    c.getTrade().openTrade();
    o.getTrade().openTrade();
    } else if(!c.inTrade && !c.isFrozen && !c.isStunned) {
    c.tradeRequested = true;
    c.CAM().sendMessage("Sending trade request...");
    o.CAM().sendMessage(c.playerName + ":tradereq:");
    }
    }
    catch (Exception e) {
    misc.println("Error requesting trade.");
    }
    }
    1-
    i added it but if u are in trade and a npc atak you dont close your trade screen
    2-
    Ok i have a trade problem , when i trade someone and he accept is ok , we make the trade , anything is ok.

    But when i trade he and i want to trade he again , but he accepted already and after he accepted i traded he again , my trade interface is closed but that player is still in trade.

    Look in the following video to understand.
    Trading problem




    here is it
    theiving work fine thank you
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •