Jump to content
  • 0

About NPC that gives random items from cash shop


AsurielRO

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   2
  • Joined:  05/01/20
  • Last Seen:  

Good day guys!, I just want to request a NPC Script which required an item and after giving the requirements the NPC will automatically pick a random item from cash shop to give .

 

For example a player insert 50pcs apples then the npc will generate all items on the cash shop randomly and he will get 1 item from it.

 

Thank you ?

Edited by AsurielRO
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   2
  • Joined:  05/01/20
  • Last Seen:  

I started the script using this format but i'm not sure if this will work, anyone can share what would be the better script i can use to implement this?

Quote

prontera,155,181,5    script    Wishing Well    757,{

if((countitem(607)<30)) {
mes "[Wishing Well]";
mes "Hi throw a primogems on me and we will make your wish came true!";
next;
mes "By throwing a primogems on me you are able to get a random items and a chance to get 1 Cash shop item!";
mes "Sounds good right, now lets proceed?";
close;
}
set @cb,rand(1,10);
mes "[Wishing Well]";
mes "Proceed now?";
switch(select("Thow Primogems:Leave")) {
    case 1:
    delitem 607,30;

    if (@cb <= 1)
        getitem 17229,1;
    if (@cb <= 2)
        getitem 2351,1;
    if (@cb <= 3)
        getitem 2349,1;
    if (@cb <= 4)

 

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