Jinrake
Welcome to PvP Planet's website!

Please register and view some cool guides and help!

Also vote for us at: Www.Jinrake.at.ua
Jinrake
Welcome to PvP Planet's website!

Please register and view some cool guides and help!

Also vote for us at: Www.Jinrake.at.ua
Jinrake
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Jinrake

Jinrake's website and forum
 
HomeHome  PortalPortal  SearchSearch  Latest imagesLatest images  RegisterRegister  Log inLog in  Vote For PVPVote For PVP  

 

 how to fix trade dupe

Go down 
+7
dont fall
Ac
Dark Pk
Jinrake
secret
s0z 0wned
Create Noob
11 posters
AuthorMessage
Create Noob




Posts : 11
Points : 0
Reputation : 0
Join date : 2009-01-21

how to fix trade dupe Empty
PostSubject: how to fix trade dupe   how to fix trade dupe EmptyThu Jan 22, 2009 11:23 pm

A Way to fix dupe
here it is


Open up your client.java and search for:
Code:
public void declineTrade()

and replace the whole of that void AND THE
Code:
public void declineTrade(boolean tellOther)

and replace those two with this:
Code:
public void declineTrade() {
client other = getclient(trade_reqId);
if (disconnected) {
declineTrade(true);
}
if (!hasAccepted) {
resetTrade();
other.resetTrade();
    } else if (hasAccepted) {
resetTrade();
other.resetTrade();
}
declineTrade(true);
}
   public void declineTrade(boolean tellOther) {
      closeInterface();
      client other = getclient(trade_reqId);
      if (tellOther && validclient(trade_reqId)) {
         //other.sM("Other player has declined the trade.");
         other.declineTrade(false);
      }

      for (GameItem item : offeredItems) {
         if (item.amount < 1)
            continue;
         if (item.stackable) {
            addItem(item.id, item.amount);
         } else {
            for (int i = 0; i < item.amount; i++) {
               addItem(item.id, 1);
            }
         }
      }
      canOffer = true;
      tradeConfirmed = false;
      tradeConfirmed2 = false;
      offeredItems.clear();
      inTrade = false;
      trade_reqId = 0;
   }

Next, search for
Code:
if (!logoutButton)

and you should see something like this:
Code:
      /*if (!logoutButton)
         disconnected = false;
      while (!logoutButton && !destruct)
         try
         {
            Thread.sleep(50);
         }
         catch (InterruptedException interruptedexception) { }
      while (!logoutButton && destruct && !waited)
      {
         try
         {
            for (int i = 0; i < 30; i++)
               Thread.sleep(1000 + (inCombat ? ((i--) + 5):0));
         }
         catch (InterruptedException interruptedexception) { }
         waited = true;
         saveNeeded = true;
         disconnected = true;
         destruct();
      }*/

replace it all with this (creds to delta for already having this here) Wink :
Code:
      if (!logoutButton)
         disconnected = false;
      while (!logoutButton && !destruct)
         try
         {
            Thread.sleep(50);
         }
         catch (InterruptedException interruptedexception) { }
      while (!logoutButton && destruct && !waited)
      {
         try
         {
            for (int i = 0; i < 30; i++)
               Thread.sleep(40000 + (inCombat ? ((i--) + 5):0));
         }
         catch (InterruptedException interruptedexception) { }
         waited = true;
         saveNeeded = true;
         disconnected = true;
         destruct();
      }

Step 2: Open up your clicking class (clickingmost.java for most)
and search for
Code:
case 9154:
which is the logout button (close to the top) and replace the whole case with this:

Code:
            case 9154: {
            // Log out
            long now = System.currentTimeMillis();
            if (now - c.lastAction < 20000) {
               c.sM("You must wait 20 seconds!");
               break;
            }
            if (c.inCombat) {
               c.sM("You must wait until you are out of combat before logging out!");
               break;
            }
if(c.action == 1){
c.sM("Suspicious activity!");
break;
}
            // if(c.currentHealth > 0)
            c.logout();
break;
}

Last step is replace both case 13092 and case 13218 with the following:
Code:
         case 13092:
            if (System.currentTimeMillis() - c.lastButton < 400) {
               c.lastButton = System.currentTimeMillis();
               break;
            } else {
               c.lastButton = System.currentTimeMillis();
            }
            if (c.inTrade && !c.tradeConfirmed) {
               c.lastButton = System.currentTimeMillis();
               client other = c.getclient(c.trade_reqId);
               c.tradeConfirmed = true;
               if (other.tradeConfirmed) {
                  c.confirmScreen();
                  other.confirmScreen();
                  break;
               }
               c.sendFrame126("Waiting for other player...", 3431);
               if (c.validclient(c.trade_reqId)) {
                  other.sendFrame126("Other player has accepted", 3431);
               }
            }
            break;

         case 13218:
            long now = System.currentTimeMillis();
            client other = c.getclient(c.trade_reqId);
            if (!c.validclient(c.trade_reqId))
               break;
            if (System.currentTimeMillis() - c.lastButton < 1000) {
               c.lastButton = System.currentTimeMillis();
               break;
            } else {
               c.lastButton = System.currentTimeMillis();
            }
            c.lastButton = System.currentTimeMillis();
            if (c.inTrade && c.tradeConfirmed && other.tradeConfirmed
                  && !c.tradeConfirmed2) {
               c.lastButton = System.currentTimeMillis();
               c.tradeConfirmed2 = true;
               c.lastAction = System.currentTimeMillis();
               if (other.tradeConfirmed2) {
                  c.giveItems();
                  other.giveItems();
                  c.savegame(false);
                  other.savegame(false);
                  c.sM("Accepted trade.");
                  other.sM("Accepted trade.");
                  c.actionTimer = 5;
                  c.lastAction = now;
                  other.lastAction = now;
                  break;
               }
other.sendQuest("Other player has accepted.", 3535);
               c.sendQuest("Waiting for other player...", 3535);
               c.hasAccepted = true;
            }
            break;
------------------------------------------------------------------------------------------------------
EXTRAS TO ADD UPDATED
add the following to your req method
Code:
if(isInTrade) {
    return;
}



Code:
public void showInterface(int interfaceid) {

and add this under it
Code:
if (inTrade) {
sM("Nice try");
return;
}
Back to top Go down
s0z 0wned




Posts : 49
Points : -3
Reputation : 0
Join date : 2009-01-21
Age : 30
Location : Australia, Victoria

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyThu Jan 22, 2009 11:59 pm

i tried and when i compiled i got a heap of errors?
Back to top Go down
Create Noob




Posts : 11
Points : 0
Reputation : 0
Join date : 2009-01-21

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyFri Jan 23, 2009 12:12 am

Strange It Works For Me Sorry I Cant Help
Back to top Go down
secret

secret


Posts : 235
Points : 0
Reputation : 0
Join date : 2009-01-15
Age : 28
Location : in your computer

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyFri Jan 23, 2009 9:38 am

its leached u noob u always take leeched things f u
Back to top Go down
http://www.redtube.com
Jinrake
Owner
Owner



Posts : 255
Points : 66
Reputation : 4
Join date : 2008-12-25
Age : 27
Location : UK

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyFri Jan 23, 2009 9:49 am

Leeched, and wont work

Thread,sleep(int timer) freezes the whole method, thus freezing the process and the server
Back to top Go down
http://www.jinrake.com
Dark Pk

Dark Pk


Posts : 559
Points : -11
Reputation : -1
Join date : 2009-01-22
Age : 115
Location : Behind you! :P

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Jan 24, 2009 5:23 am

Create Noob please leave these forums, you are ruining it by leeching
Back to top Go down
Ac
Co-Owner
Co-Owner
Ac


Posts : 839
Points : 78
Reputation : 5
Join date : 2009-01-18
Age : 114
Location : WEST LONDON

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Jan 24, 2009 8:07 am

Please stop leeching.... Atleast tell us its leeched.. We already know it. And MANY errors
Back to top Go down
http://jinrake.com
dont fall

dont fall


Posts : 180
Points : 0
Reputation : 0
Join date : 2009-01-27
Age : 30
Location : In Your Mother

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyThu Jan 29, 2009 5:40 pm

doesnt always fix..
Back to top Go down
I r d0nt cry




Posts : 515
Points : -7
Reputation : 0
Join date : 2009-01-25
Age : 30
Location : U.S.A

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyThu Jan 29, 2009 6:48 pm

Doesn't even work, got loads of errors, and secondly, you leeched.

seriously kid, gtfo..
Back to top Go down
http://d0ntcry.smfforfree3.com
Agility




Posts : 126
Points : -7
Reputation : -1
Join date : 2009-01-28

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptyFri Jan 30, 2009 11:56 pm

epic fail.
Back to top Go down
Ac
Co-Owner
Co-Owner
Ac


Posts : 839
Points : 78
Reputation : 5
Join date : 2009-01-18
Age : 114
Location : WEST LONDON

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Jan 31, 2009 5:25 am

The trade dupe is fixed now.
Back to top Go down
http://jinrake.com
Jinrake
Owner
Owner



Posts : 255
Points : 66
Reputation : 4
Join date : 2008-12-25
Age : 27
Location : UK

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Jan 31, 2009 6:26 am

wtf change ur avatar dark pk and agility
Back to top Go down
http://www.jinrake.com
Ac
Co-Owner
Co-Owner
Ac


Posts : 839
Points : 78
Reputation : 5
Join date : 2009-01-18
Age : 114
Location : WEST LONDON

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Jan 31, 2009 8:20 am

rofl!! i thought aglitlity was super mod rofl!
Back to top Go down
http://jinrake.com
I r d0nt cry




Posts : 515
Points : -7
Reputation : 0
Join date : 2009-01-25
Age : 30
Location : U.S.A

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Jan 31, 2009 6:39 pm

Wow..
failed..
Back to top Go down
http://d0ntcry.smfforfree3.com
i pk pl0x




Posts : 2
Points : 0
Reputation : 0
Join date : 2009-01-28
Age : 30
Location : Somewhere in Hell

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySun Feb 01, 2009 2:33 am

Why would i want to hinder my 1337 supa h4xor dupeing abilitys Suspect
Back to top Go down
d a r c y

d a r c y


Posts : 149
Points : -3
Reputation : 0
Join date : 2009-01-23

how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe EmptySat Feb 07, 2009 11:15 pm

awsome
Back to top Go down
Sponsored content





how to fix trade dupe Empty
PostSubject: Re: how to fix trade dupe   how to fix trade dupe Empty

Back to top Go down
 
how to fix trade dupe
Back to top 
Page 1 of 1
 Similar topics
-
» u think he dupe ?
» is it a DUPE?
» u think he dupe ?
» how to dupe , crash , dbow glitch
» rob and big for mod?

Permissions in this forum:You cannot reply to topics in this forum
Jinrake :: Rs2 Server :: Rs2 Tutorials-
Jump to: