Hyoru Posted June 7, 2012 Posted June 7, 2012 (edited) Hello, I have a invasion event, player gets a custom points i mean, when a mob is killed: set pointo,pointo+50; its possible make a Shop like Cash shop, but using those points to buy stuffs?? Thanks Adv. I solved with Emistry Shop. Thanks Edited June 7, 2012 by Hyoru Quote
Euphy Posted June 7, 2012 Posted June 7, 2012 Just wrote one, if you want to look at it: http://pastebin.com/raw.php?i=f5SJVy4k Quote
Mystery Posted June 7, 2012 Posted June 7, 2012 Euphy, would it be possible to make a ladder out of those points? Like, since its a variable is there anyway you get the NPC to make sorta like a List of players with the most of those points from that specific variable? Quote
Euphy Posted June 7, 2012 Posted June 7, 2012 @Mysterious: prontera,163,172,4 script Testing 950,{ input .@i$; mes "[Point Ladder]"; query_sql("SELECT char_id,value FROM `global_reg_value` WHERE `str` = '"+.@i$+"' ORDER BY `value` DESC LIMIT 50", .@char_id, .@value); if (!getarraysize(.@char_id)) { mes "No values found for ^0055FF"+.@i$+"^000000."; close; } for(set .@i,0; .@i<getarraysize(.@char_id); set .@i,.@i+1) query_sql("SELECT `name` FROM `char` WHERE `char_id` = "+.@char_id[.@i]+";", .@name$[.@i]); for(set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) mes "["+(.@i+1)+"] ^FF0000"+.@value[.@i]+"^000000 points - ^0055FF"+.@name$[.@i]+"^000000"; close; } That's only for character variables, though. The script is similar for account variables. Quote
Mystery Posted June 8, 2012 Posted June 8, 2012 (edited) Alright! Thanks Euphy. I'll see what I can do with it ;3! Edit: I don't see any items in the shop.. o_O. Also, mine is an account variable: #. So, I've set points as an account variable and when i test the ladder, it only returns my value: 2 but it says Cant Find Value: 2 hm? Edited June 8, 2012 by Mysterious Quote
Euphy Posted June 8, 2012 Posted June 8, 2012 @Mysterious: I've tested both of the scripts before posting them, and were both fine for me... x.x Remember the shop loads items OnInit (needs @reloadscript). About account variables: you need to use a different SQL query because they take no character ID. I'm not really sure how you'd display the ladder without giving away account names, then... Quote
Question
Hyoru
Hello,
I have a invasion event, player gets a custom points
i mean, when a mob is killed:
set pointo,pointo+50;
its possible make a Shop like Cash shop, but using those points to buy stuffs??
Thanks Adv.
I solved with Emistry Shop. Thanks
Edited by Hyoru5 answers to this question
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.