Jump to content
  • 0

custom droprate


noobsai

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  70
  • Reputation:   0
  • Joined:  02/05/12
  • Last Seen:  

is there any script that makes some of MVP card 10% drop instead of 40%

this is my drops.conf. 75% for normal cards and 40% for MVP

but it applies event in thana card

item_rate_card: 750000

item_rate_card_boss: 400000

item_drop_card_min: 1

item_drop_card_max: 10000

i used this script

- script CustomDropRates -1,{
OnInit:
setarray $@MobOkay_ID[0],1708,1646,1647,1648,1649,1650,1651,1871,1768; //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;
}

but it makes my thana to 0.1% and other modified cards

any other script you can share?

bump still need this :)

Link to comment
Share on other sites

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  806
  • Reputation:   220
  • Joined:  03/13/12
  • Last Seen:  

if you don't delete it from mob_db then there is a chance for the item to be dropped twice from one kill (one due to the regular drop & one due to script).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

if you don't delete it from mob_db then there is a chance for the item to be dropped twice from one kill (one due to the regular drop & one due to script).

thanks for the supplement.. my droprate for the regular one is 1x only and i will make the other one as 10000x hehe thanks!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

since you post at script release section...i assume you looking for a script to make a custom rate..

then you can try it in this way.....

remove the Card from the Monster in the mob_db.txt

then load this script

[ Pastebin ] Custom Item Rate

you can add as many as you want..

but do not add more than hundred i think there is still a limit..

// CustomRateCard( <MobID>,<CardID>,<Rate> );
// Rate : 1 = 0.01%  /  1000 = 10%  /  10000 = 100%
Item Drop Rate wont be shown using @mi since the database has been edited..and @mi only read from the mob_db.txt

and please do let me know if you found the limit....

Re-Edit : Update Announce Problem

sir after i put 1 in the drop rate still it drops 100% 

for example the LK card i put 1 on the drop rate but still everytime i kill lord knight it always drop a card

how to fix this sir?

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:  

@2384

 

remove the Card from the Monster in the mob_db.txt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

sir i did and..

i did also use it for a custom drop of some of my items

but still it drops 100

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Any items you add to setarray remove from your mob_db. tytyty!

-	script	Drop Emulator	-1,{
OnNPCKillEvent:
	set .@mid, killedrid;
	set .@ar$, ".mob"+.@mid;
	set .@len, getarraysize(getd(.@ar$));
	if(.@len){
		for(set .@p,1; .@p<.@len;set .@p,.@p+2 ) {
			set .@itm, getd(.@ar$+"["+(.@p-1)+"]");
			set @itmtyp, getiteminfo(.@itm,2);
			set .@btflg, callfunc("Monster_DB",.@mid,@itmtyp);
			set .@itmrt, getd(.@ar$+"["+.@p+"]");
			query_sql("SELECT ROUND("+.@itmrt+"*("+.@btflg+"/100));",.@rte);
			if(((.@rte<=10000)?((rand(1,10000/.@rte)==1)?1:0):1)) {
				getitem .@itm,1;
			}
		}
	}
	end;
	
OnInit: //By Skorm
	//Example Poring Apple, 10%, Apple, 1.5%....etc
	setarray .mob1002, 512, 1000, 512, 150, 619, 20, 713, 1500, 909, 7000, 938, 400, 1202, 100, 4001, 1; // Mob List 10000=100% can support up to 128 values
}

function	script	Monster_DB	{
	switch(getarg(0)){
		case 1002:
			switch(@itmtyp){
				// Keep in mind these are precents overall so 20% is actually lower while 140% is actually 40% higher.
				// Where 200% is double... It's like saying 2*400=800.
				case 0: // Heal Item Rate (Healing Items)
					return 20; // 20% for  healing items.
				
				case 2: case 7: case 11: case 18: // Uasable Item Rate (Anything Usable that doesn't heal)
					return 100; // 100% for healing items.
					
				case 3: // Common Item Rate (ETC)
					return 200; //200% more for Common Items.
				
				case 4: case 5: case 8: case 10: // Equip Item Rate (Ammo, Pet Equip, Weapon, Armor)
					return 140; // 140% more for equip items.
				
				case 6: // Card Item Rate (Card)
					return 200; // 110% more for cards.
			}
		case 1003:
		case 1004:
		case 1005:
		//...to add new monsters simply do as I've done.
	}
}

As a side note there might be other factors that go into finding the drop-rate that are unforseen. I know some MMOs it depends on the time of day location and karma but I don't think RO has this. :)

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

-    script    Sample    -1,{

function CustomRateCard;

OnNPCKillEvent:

// CustomRateCard( <MobID>,<CardID>,<Rate> );

// Rate : 1 = 0.01%  /  1000 = 10%  /  10000 = 100%

CustomRateCard( 1708,4399,300 ); // Thanatos 3% ??

CustomRateCard( 1086,4128,5000 ); // GTB 5%??

CustomRateCard( 1832,4430,5000 ); // Ifrit 5%

CustomRateCard( 1874,4145,5000 ); // Berzebub 5%

CustomRateCard( 1751,4407,300 ); // Randgris 3%

CustomRateCard( 1086,4441,300 ); // Fallen bishop

end;

function    CustomRateCard    {

    if( killedrid == getarg(0) && rand( 10000 ) <= getarg(2) ){

            getitem getarg(1),1;

            announce "[ "+strcharinfo(0)+" ] get 1 "+getitemname( getarg(1) ),0;

    }

    return;

}

}

 

ur setting + reload the settings

is that correct? the percent of cards? :(

- 3% FBH

- 5% GTB

- 5% Ifrit

- 5% Beelzebub

- 3% Randgris

- 3% Thanatos

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   66
  • Joined:  09/05/12
  • Last Seen:  

since you post at script release section...i assume you looking for a script to make a custom rate..

then you can try it in this way.....

remove the Card from the Monster in the mob_db.txt

then load this script

[ Pastebin ] Custom Item Rate

you can add as many as you want..

but do not add more than hundred i think there is still a limit..

// CustomRateCard( <MobID>,<CardID>,<Rate> );
// Rate : 1 = 0.01%  /  1000 = 10%  /  10000 = 100%
Item Drop Rate wont be shown using @mi since the database has been edited..and @mi only read from the mob_db.txt

and please do let me know if you found the limit....

Re-Edit : Update Announce Problem

 

Thanks for this sir Emistry!

Very useful!

CustomRateCard( 1708,4399,300 ); // Thanatos 3% ??

CustomRateCard( 1086,4128,500 ); // GTB 5%??

CustomRateCard( 1832,4430,500 ); // Ifrit 5%

CustomRateCard( 1874,4145,500 ); // Berzebub 5%

CustomRateCard( 1751,4407,300 ); // Randgris 3%

CustomRateCard( 1086,4441,300 ); // Fallen bishop

This one is correct.

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