Firestar Posted May 30, 2010 Author Share Posted May 30, 2010 Not sure if this is known or not, but if you sell a negative amount of an item, like… let's say -58, you'll apparently get that many of said item. Yes, you can clone items like this...Is there a way to fix this? If not, my game will have to be without a selling system forever... Link to comment Share on other sites More sharing options...
emblem Posted May 30, 2010 Share Posted May 30, 2010 Are you proficient in source editing, if so I can show you how to fix it.**Edit:** Wait, is this a problem with the Engine itself? Link to comment Share on other sites More sharing options...
Krumelz Posted May 30, 2010 Share Posted May 30, 2010 Hello ^^, i remember i had the same problem a few weeks ago.To fix it, open the source [client side] and find:```AMT = InputBox("How many " & Item(GetPlayerInvItemNum(MyIndex, (lstSellItem.ListIndex + 1))).name & " would you like to sell?", "Sell " & Trim$(Item(GetPlayerInvItemNum(MyIndex, (lstSellItem.ListIndex + 1))).name), 0) If IsNumeric(AMT) Then packet = "sellitem" & SEP_CHAR & snumber & SEP_CHAR & ItemNum & SEP_CHAR & ItemSlot & SEP_CHAR & AMT & END_CHAR Call SendData(packet) lblSold.Caption = "You sold " & AMT & " " & Trim$(Item(ItemNum).name) & "s ." End If```its in the frmSellItem.Now Replace the line``` If IsNumeric(AMT) Then```with``` If IsNumeric(AMT) and AMT > 0 Then```Thats the way i fixed it ^^yours sincerely,krumelz Link to comment Share on other sites More sharing options...
emblem Posted May 30, 2010 Share Posted May 30, 2010 I guess it is a source problem.Thanks for the post, Krumelz. Now I don't have to download stable to fix the problem myself. :D Link to comment Share on other sites More sharing options...
Krumelz Posted May 30, 2010 Share Posted May 30, 2010 Not a thing ^^ Link to comment Share on other sites More sharing options...
Firestar Posted May 30, 2010 Author Share Posted May 30, 2010 Wait, a source problem?I'm doomed. Link to comment Share on other sites More sharing options...
emblem Posted May 30, 2010 Share Posted May 30, 2010 Give me a second, I'll fix it in a vanilla stable and post the compiled EXE.Krumelz. I'd recommend adding this fix too, as your way still leaves it open for anyone who knows how to edit packets to duplicate items on your game. :P**Server:**In _modHandleData_'s _Sub BlahBlah_.Find:```Public Sub Packet_SellItem(ByVal index As Long, ByVal ShopNum As Long, ByVal ItemNum As Long, ByVal ItemSlot As Long, ByVal ItemAmt As Long)```Add After``` If ItemAmt <= 0 Then Call PlayerMsg(index, "You can not sell an amount lower than 1!", RED) Call HackingAttempt(index, "Selling a negative amount of an item.") Exit Sub End If``` Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now