quesoph Posted May 14, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 210 Reputation: 10 Joined: 11/20/11 Last Seen: August 23, 2015 Share Posted May 14, 2012 ^its instant. Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 14, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 14, 2012 Update Changelogs 1.1.1: Fixed a bug that caused duplicating items (Thanks to Emistry) Quote Link to comment Share on other sites More sharing options...
WhatFT Posted May 14, 2012 Group: Members Topic Count: 142 Topics Per Day: 0.03 Content Count: 511 Reputation: 7 Joined: 02/15/12 Last Seen: April 11, 2014 Share Posted May 14, 2012 @tr0n I hope this works, Thanks Emistry and tr0n ! Quote Link to comment Share on other sites More sharing options...
quesoph Posted May 14, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 210 Reputation: 10 Joined: 11/20/11 Last Seen: August 23, 2015 Share Posted May 14, 2012 @tron A lil typo.. Replace: mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_item[@i] + " ea.^000000"; to mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_amount[@i] + " ea.^000000"; Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 14, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 14, 2012 argh, I copied it from Emistry i'll fix that quick. thanks EDIT: DONE Quote Link to comment Share on other sites More sharing options...
Emistry Posted May 14, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted May 14, 2012 @tr0n I got a problem while giving out the codes to the players as an event for a test. I just input the "amount" from 10 and I made lots of Coupon Codes. Then suddenly some of my players got atleast 400~500 amount of the item I input. if i was right.....then i think those player are using this method to achieve above situation... GM Generate Coupon for Items and give the Code to Players. Players gain items from the NPC by giving the right Code. but then...unfortunately.....they found a way to Duplicate your Items / Coupons... this is the way how they do it.... Give the Correct Code , then get items. before they Close the Message Window .... they ...Relog / ALT + F4 so....after they relog / Alt +F4 ......the Coupon actually is not deleted from the SQL. ....because...the command line that delete the SQL only executed right after they closed the message window of NPC. mes "[^FF7700Coupon Jack^000000]"; mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_item[@i] + " ea.^000000"; close2; query_sql "DELETE FROM `coupons` WHERE `code`='"+@my_code$+"'"; getitem @available_item[@i],@available_amount[@i]; end; if you want...you can try it like this...i think it should be able to solve above problems. mes "[^FF7700Coupon Jack^000000]"; mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_item[@i] + " ea.^000000"; query_sql "DELETE FROM `coupons` WHERE `code`='"+@my_code$+"'"; getitem @available_item[@i],@available_amount[@i]; close; and....make sure you dont generate alot Coupon with SAME Code. I also monitored my SQL, and it has been deleted right away. In just a few minutes, after that I got reports that players got 400~500 amount. ya...the query will be delete if player click on "Close" button to close the NPC Message. Emistry, how it can be that you get the item before it gets deleted in sql ? the query is before getitem. Does the query need a bit of time ? erm..i was refer the close2 command you using. because you run the query deletion line right after.... aw....i just now only saw what tr0n try to tell me ..... >.< you get item only after the query is deleted... >.< swt i missed this...LOL... erm... Quote Link to comment Share on other sites More sharing options...
WhatFT Posted May 14, 2012 Group: Members Topic Count: 142 Topics Per Day: 0.03 Content Count: 511 Reputation: 7 Joined: 02/15/12 Last Seen: April 11, 2014 Share Posted May 14, 2012 Ahm, what is MD5-hash? I tried the latest coupon, The Code doesn't erase and can be abuse. Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted May 14, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Share Posted May 14, 2012 2 tips: - that label isn't really necessary, would look nicer if you used {} - why don't you set the variables on the OnInit label instead of setting them everytime the user clicks the npc? Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 14, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 14, 2012 @Emistry how could this be bugged then when the query deletes the data before it gets the item ? 2 tips: - that label isn't really necessary, would look nicer if you used {} - why don't you set the variables on the OnInit label instead of setting them everytime the user clicks the npc? - would look nicer ? it checks '@coupon_item' 2 times so I would need to write it down again. that's why I use label to avoid this. That's better. And why I shouldn't use a label ? - that's just a style of me. But yea you're right. Would be better if I put it in OnInit. Quote Link to comment Share on other sites More sharing options...
WhatFT Posted May 17, 2012 Group: Members Topic Count: 142 Topics Per Day: 0.03 Content Count: 511 Reputation: 7 Joined: 02/15/12 Last Seen: April 11, 2014 Share Posted May 17, 2012 The latest release can still be abused. Suggestion sir, what if the last message will not leave a dialog box. Quote Link to comment Share on other sites More sharing options...
Drakkus Posted May 17, 2012 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 386 Reputation: 15 Joined: 11/17/11 Last Seen: September 13, 2024 Share Posted May 17, 2012 +1 the latest is still abuse, when i input the code and after i got it, and i input it again it still continueing giving me a Main Guachce #1207 Is there any problem with the script tr0n? Thanks for this! Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 17, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 17, 2012 I will check it and find the bug. Last time I tested it, it worked bugless Quote Link to comment Share on other sites More sharing options...
WhatFT Posted May 17, 2012 Group: Members Topic Count: 142 Topics Per Day: 0.03 Content Count: 511 Reputation: 7 Joined: 02/15/12 Last Seen: April 11, 2014 Share Posted May 17, 2012 Hehe, you can do it ! The script you made is awesome <3 Good for implementing Donation Codes or anything XD THANKS FOR THE RELEASE & I hope some bugs will be fixed soon... Suggestion : Just remove the last message of the script "mes" i think.. Quote Link to comment Share on other sites More sharing options...
Tonetzkii Posted May 19, 2012 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 323 Reputation: 9 Joined: 11/19/11 Last Seen: September 25, 2015 Share Posted May 19, 2012 Im not a pro in script but i already fix the bug, i am using simple script lets check this. Find if(@my_code$==@available_code$[@i]) { mes "[^FF7700Coupon Jack^000000]"; mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_amount[@i] + " ea.^000000"; query_sql "DELETE FROM `coupons` WHERE `code`='"+@my_code$+"'"; getitem @available_item[@i],@available_amount[@i]; close; } Replace this if(@my_code$==@available_code$[@i]) { mes "[^FF7700Coupon Jack^000000]"; mes "After you enter the code you will be disconnect in 3 secs."; next; mes "[^FF7700Coupon Jack^000000]"; mes "3."; next; mes "[^FF7700Coupon Jack^000000]"; mes "2."; next; mes "[^FF7700Coupon Jack^000000]"; mes "1."; next; mes "[^FF7700Coupon Jack^000000]"; mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_amount[@i] + " ea.^000000"; query_sql "DELETE FROM `coupons` WHERE `code`='"+@my_code$+"'"; getitem @available_item[@i],@available_amount[@i]; atcommand "@kick " +strcharinfo(0); close; } Quote Link to comment Share on other sites More sharing options...
WhatFT Posted May 19, 2012 Group: Members Topic Count: 142 Topics Per Day: 0.03 Content Count: 511 Reputation: 7 Joined: 02/15/12 Last Seen: April 11, 2014 Share Posted May 19, 2012 @Khaii Why don you just make him use @refresh instead of kicking or warping back to the save point... Quote Link to comment Share on other sites More sharing options...
Tonetzkii Posted May 19, 2012 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 323 Reputation: 9 Joined: 11/19/11 Last Seen: September 25, 2015 Share Posted May 19, 2012 (edited) Refresh is not working. on my mind this code query_sql "DELETE FROM `coupons` WHERE `code`='"+@my_code$+"'"; will be effect if you are going to character select. Why dont you try. Edited May 19, 2012 by Khaii Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 19, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 19, 2012 query works after it is triggered not after you're going to character select. Quote Link to comment Share on other sites More sharing options...
Tonetzkii Posted May 19, 2012 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 323 Reputation: 9 Joined: 11/19/11 Last Seen: September 25, 2015 Share Posted May 19, 2012 Oh i see..Well i shared my fix script working on me. Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 19, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 19, 2012 I uploaded it again with changes: { mes "[^FF7700Coupon Jack^000000]"; mes "You get ^0000FF" + getitemname(@available_item[@i]) + " - " + @available_amount[@i] + " ea.^000000"; query_sql "DELETE FROM `coupons` WHERE `code`='"+@my_code$+"'"; sleep2 3000; close2; getitem @available_item[@i],@available_amount[@i]; end; } this should work maybe. Quote Link to comment Share on other sites More sharing options...
Tonetzkii Posted May 19, 2012 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 323 Reputation: 9 Joined: 11/19/11 Last Seen: September 25, 2015 Share Posted May 19, 2012 The code is abuse again. Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 19, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 19, 2012 I don't understand how this is possible.. Quote Link to comment Share on other sites More sharing options...
WhatFT Posted May 19, 2012 Group: Members Topic Count: 142 Topics Per Day: 0.03 Content Count: 511 Reputation: 7 Joined: 02/15/12 Last Seen: April 11, 2014 Share Posted May 19, 2012 @tr0n Maybe try making it a delay.. Receiving in 3-2-1.. then the dialog box closes then the item will be received something like that sir. The code is being abused on what sir Emistry said, character select or warping in its place.. Quote Link to comment Share on other sites More sharing options...
Tonetzkii Posted May 19, 2012 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 323 Reputation: 9 Joined: 11/19/11 Last Seen: September 25, 2015 Share Posted May 19, 2012 For example ill add the code then after input the code they give me item, then ill try twice input they will give me again item. Quote Link to comment Share on other sites More sharing options...
tr0n Posted May 19, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Author Share Posted May 19, 2012 does the server gives you any errors ? if something is wrong with the query the server should output a error Quote Link to comment Share on other sites More sharing options...
Tonetzkii Posted May 19, 2012 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 323 Reputation: 9 Joined: 11/19/11 Last Seen: September 25, 2015 Share Posted May 19, 2012 Nope script working fine. this is posible bug For example ill add the code then after input the code they give me item, then ill try twice input they will give me again item. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.