Jump to content
  • 0

Question

Posted (edited)

Is it possible to let every monster drop the same item (for example: with the chance of 0,5%) without entering this in the mob_db.txt for every single mob?

EDIT: Oh my gaaawd!

I posted in wrong section.. please move it!

Edited by leertaste

7 answers to this question

Recommended Posts

Posted

Is it possible to let every monster drop the same item (for example: with the chance of 0,5%) without entering this in the mob_db.txt for every single mob?

Posted

OnNPCKillEvent:
if( rand(10000) < 50 )
getitem 512,1;
end;

So what is the 10000 for?

and how is the dropchance defined? 50 = 0,5%?

why do i never get the entered item?

function    script    Samedrop    {
OnNPCKillEvent:
if( rand(10000) < 50 )
   getitem 512,1;
end;
}

Posted

OnNPCKillEvent:

every time a player killing a monster without event label

if ( rand(1000) < 5 )

in every 5/1000 *100% chance

getitem 512,1;

get an apple

the full script should be

-    script    test    -1,{
OnNPCKillEvent:
   if ( rand(1000) < 5 )
       getitem 512, 1;
   end;
}

OnNPCKillEvent shouldn't be put inside the function

read wiki more

http://rathena.org/wiki/Scripting

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/script_commands.txt

  • Upvote 1
Posted (edited)

Oh.. i felt so stupid xD
it was kinda late!
ty to this point.. :)

 

next question i have.. 20003 is dropped with the chance of 1% now:

OnNPCKillEvent:
	if ( rand(100) < 1 )
		getitem 20003, 1;

do this stack with this itemscript:

bonus2 bAddMonsterDropItem,20003,1;

it should be the chance from onnpckillevent = 1% + baddmonsterdropitem = 1%, correct?

Edited by leertaste

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