Purpose: Fix trade dupes on PI base
Difficulty: 2/10
Assumed Knowledge: C&P and how to read
Classes Modified: TradeAndDuel
Tested On(if it applies): Project Insanity (My source )
Links to already made tuts:
Fixing alch dupe: [Only registered and activated users can see links. ]
Fixing store dupe (cheat engine involved): [Only registered and activated users can see links. ]
Dupe #1: Stack-able Item Dupe How it works: Taking two of any stackable items (morgians javs, ect) , placing one in bank, equipping the other. Then once the one is equipped you withdraw the other so one is in inv and one is equipped. Next you would put on a weapon to remove the jav from your hand. It will result in two stacks in your inventory. Trade someone and offer x then submit 2 javs from the stack that was removed from equip. Rinse and repeat for unlimited javs.
Fix: Simple, make sure if they offer something, they actually have that quantity of it.
How it works: (it is illustrated in that video, the two different ways it can be done, but is already fixed so you dont actually see items being duplicated)
You can add this in there around the snippets and it will display the ids and quantities of items as read by the client and server for admins (helps for fixing dupes and understanding them).
Code:
if (c.playerRights >= 2)
c.sendMessage("id:"+itemID+"/"+c.playerItems[fromSlot]+", itemamt: "+amount+"/"+c.playerItemsN[fromSlot]);