Jump to content
  • 0

Global drop of random item


Elqpal

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  66
  • Reputation:   2
  • Joined:  09/01/12
  • Last Seen:  

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

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


OnNPCKillEvent:

if ( rand( 2 ) ) {

.@item_id = F_Rand( 501,502,503,504,505 );

getitem .@item_id,1;

}

end;

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