Jump to content
  • 0

Shop


Hyoru

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1132
  • Joined:  05/27/12
  • Last Seen:  

Just wrote one, if you want to look at it: http://pastebin.com/raw.php?i=f5SJVy4k

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   253
  • Joined:  11/11/11
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1132
  • Joined:  05/27/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   253
  • Joined:  11/11/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1132
  • Joined:  05/27/12
  • Last Seen:  

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

Link to comment
Share on other sites

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.

×
×
  • Create New...