Jump to content
  • 0

Question

Posted (edited)

I don't know if this script already exist.., if it does can someone link it to me..


The idea is to make a monster drop random list of items with only 1 quantity..

Ex. Killing poring will make it drop either topaz,gold or diamond.. with only 1 quantity and on a % chance too on each and every item :D

Edited by NexusXVI

2 answers to this question

Recommended Posts

Posted


- script RandomDrop -1,{

OnNPCKillEvent:

if(killedrid == 1002) { // Remove so it would apply to all monsters

if(rand(10) < 5) { // 50% chance to Drop

getmapxy(.@DMap$,.@Dx,.@Dy,0);

makeitem .DropList[rand(getarraysize(.DropList))],1,.@DMap$,.@Dx,.@Dy;

}

}

end;

OnInit:

setarray .DropList[0],607,608,609; // Edit to desired Item ID to be dropped

end;

}

Posted


- script Sample -1,{

OnNPCKillEvent:

.@i = rand( getarraysize( .i ) );

getmapxy( .@map$, .@x, .@y, 0 );

if ( rand( 100 ) < .@i )

makeitem .i[ .@i ], 1, .@map$, .@x, .@y;

end;

OnInit:

setarray .i[0],607,608,609; // item to drop

setarray .c[0],5,3,2; // chance

}

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