Jump to content
  • 0

Randomly get an Item after killing Monster


LearningRO

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Hi, All i need help

 

i want to make Ramadhan Event

 

When kill monster normal player can get random item like

 

Ketupad (583)

Ketupad Sayur (11704)

Ramadan( 685)

 

 

anybody can  make script for me ??

 

 

sory bad english

Edited by melv0
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


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


OnInit:

setarray .item,512,512,512,512;

set .item_size,getarraysize( .item );

end;

OnNPCKillEvent:

getitem .item[ rand( .item_size ) ],1;

end;

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:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  04/07/17
  • Last Seen:  

On 7/12/2013 at 6:04 PM, Emistry said:

 



 

OnInit:

setarray .item,512,512,512,512;

set .item_size,getarraysize( .item );

end;

OnNPCKillEvent:

getitem .item[ rand( .item_size ) ],1;

end;

 

 
 

what if i want to add a drop rate too. like 10% chance of getting item on kill.

 

Edited by Tofee
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

hi, emistry Can given the exception for monster Sky petite

because i have gold room and summon to much sky petite in that room

 

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( killedrid == 1002 ) end;

getitem .item[ rand( .item_size ) ],1;

end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Hi emistry, I mean I have gold room contains sky petite, but I dont want to that monster drop event Item, I have a plan to make an event for my private server, and I want to make all monster except sky petite drop that item event, can you help me?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Thx Emistry :D

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