Jump to content

Question

Posted (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 :D

Edited by Hyoru

5 answers to this question

Recommended Posts

Posted

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?

Posted

@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.

Posted (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 by Mysterious
Posted

@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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...