Jump to content
  • 0

Global drop of random item


Question

Posted (edited)

Hi, it's like everymonster will drop a random item. 27 items and you will get 1 in random 50% chance. btw im using eathena.

Edited by Elqpal

2 answers to this question

Recommended Posts

Posted

hmm, "will get 1 in random 50% chance."

what does it mean?

 

anyway, made one that works this way:

randoms, 0-26 (for 27 items)

then randoms 0-1 (50% chance: will or not the player get it)

 

-    script    candies    -1,{
OnNPCKillEvent:
    setarray .items,7227,501,502,503,504,505,506;
    set .theitem, getarraysize(.items);
    set .dasitem, @items[@theitem];
    if (rand(0,1) == 1) {
        getitem .items[rand(.theitem-1)],1;
    }
    end;
}

edit line 3 and write the 27 item IDs down.

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