Jump to content
  • 0

help custom drop rate


darking123

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

in mob_db.txt i put 0 to there card drop rate...

but when i @mi ingame card drop in the monster id is 0.01%

i want it to make 1.00% for the specific mob what will i edit

- script CustomDropRates -1,{
OnInit:
setarray $@MobOkay_ID[0],1651,1649,1650,1647,1646,1648; //Replace XXXX with the ID's of the monsters you want to be affected by this script. Add more as necessariy. *Note only supports 128 different monsters*
set $@MaxDropChance,10;end;

OnNPCKillEvent:
for(set @i,0; @i<getarraysize($@MobOkay_ID); set @i,@i+1)
{if (killedrid==$@MobOkay_ID[@i])
{callfunc "DropItemRate";}}
end;
}

function script DropItemRate {
set @i,0;
set @dropID,0;
deletearray $@MobDrop_item[0],128;
getmobdrops(killedrid);
goto iDropItemLoop;

iDropItemLoop:
set @i,rand(1,$@MaxDropChance);
if (@dropID == $@MobDrop_count){dispbottom "Success"; end;}
if (@i==1 && $@MobDrop_rate[@dropID]<=1)
{getitem $@MobDrop_item[@dropID],1;
set @dropID,@dropID+1; goto iDropItemLoop;}
if (@i<=$@MaxDropChance){set @dropID,@dropID+1; goto iDropItemLoop;}
end;
}

  • Upvote 1
Link to comment
Share on other sites

4 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:  

how about using this ?

trunk/db/mob_item_ratio.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

how about using this ?

trunk/db/mob_item_ratio.txt

i am using eathena svn

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

bump!

anyone?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

in mob_db.txt i put 0 to there card drop rate...

but when i @mi ingame card drop in the monster id is 0.01%

Your minimal drop rate is define in conf/battle/drops.conf

item_drop_card_min: 1

In mob_db.txt, if you let DropCardid and put DropCardper = 0 then the card drop rate is 0.01% 'coz your configuration define the card drop rate to 0.01% minimum.

Also your script doesn't change the drop rate, it's additional. You would have real drop rate (0.01%) and drop rate define by your script (1%).

i want it to make 1.00% for the specific mob what will i edit

In your script, you must edit

set $@MaxDropChance,10;

If set $@MaxDropChance,10;, you would have (1/10) % chance to drop item.

set $@MaxDropChance,100; --> (1/100) %

Edited by Capuche
  • Upvote 1
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...