Drop Rate (not complete)

Results 1 to 7 of 7
  1. #1
    Member Nini is offline
    MemberRank
    Oct 2008 Join Date
    CanadaLocation
    38Posts

    thumbs up Drop Rate (not complete)

    Hey everyone,

    Off topic:
    I know I haven't posted in a few months and I sort of abandoned my old project, but that was because I realized that it didn't have very much potential as it was created in Visual Basic. Anyways, now I'm back and I've started a new project, this time in c++, and I already have the client connecting using boost::asio.

    On topic:
    So I was looking through the drop rate file in data.res (propMoverEx.inc) and I found this table.
    Code:
    /3000000000	Percent		100/	Decimal
    
    9375		0.0003125%	320000	0.000003125
    18750		0.000625%	160000	0.00000625
    37500		0.00125%	80000	0.0000125
    75000		0.0025%		40000	0.000025
    150000		0.005%		20000	0.00005
    300000		0.01%		10000	0.0001
    1000000		0.0333%		3000	0.000333
    1875000		0.0625%		1600	0.000625
    3000000		0.1%		1000	0.001
    3750000		0.125%		800	0.00125
    5000000		0.166%		600	0.00166
    7500000		0.25%		400	0.0025
    15000000	0.5%		200	0.005
    30000000	1%		100	0.01
    300000000	10%		10	0.1
    3000000000	100%		1	1
    (I added the Decimal column.)

    I don't know if any of the devs know about this, or even need this, but I'm going to explain this to help anyone that might need it and for future reference.

    So the number in the left column / 3000000000 equals the corresponding percent in the second column.

    100 / the number in the right column equals the corresponding percent in the second column.

    And, obviously, the second column is the percentage of the item dropping.

    In propMoverEx.inc, each monster has something similar to this.
    (Giant Aibatt):
    Code:
    MI_AIBATT4
    {
    	Maxitem = 5;
    	DropGold(78, 113);
    	DropKind(IK3_SWD, 1, 6);
    	DropKind(IK3_HELMET, 1, 6);
    	DropKind(IK3_SUIT, 1, 6);
    	DropKind(IK3_GAUNTLET, 1, 6);
    	DropKind(IK3_BOOTS, 1, 6);
    	DropKind(IK3_SHIELD, 1, 6);
    	
    	DropItem(II_GEN_MAT_ELE_FLAME, 3750000, 0, 1); //¼Ó¼º Ä«µå3 0.125%
    	DropItem(II_GEN_MAT_ELE_TOUCH, 7500000, 0, 1); //¼Ó¼º Ä«µå2 0.25%
    
    	DropItem(II_GEN_MAT_ORICHALCUM01, 3006250, 0, 1);
    	DropItem(II_GEN_MAT_MOONSTONE, 1560000, 0, 1);
    
    	DropItem(II_GEN_GEM_GEM_TWINKLESTONE, 1000000000, 0, 1);
    	DropItem(II_GEN_GEM_GEM_TWINKLESTONE, 1000000000, 0, 1);
    	DropItem(II_GEN_FOO_INS_LOLLIPOP, 1000000001, 0, 1);
    	DropItem(II_GEN_FOO_INS_LOLLIPOP, 1000000001, 0, 1);
    	DropItem(II_GEN_FOO_INS_LOLLIPOP, 1000000001, 0, 1);
    	DropItem(II_GEN_FOO_ICE_ORANGEJUIICE, 600000001, 0, 1);
    	DropItem(II_GEN_FOO_ICE_ORANGEJUIICE, 600000001, 0, 1);
    
    	m_dwAttackMoveDelay = 0;
    	m_dwRunawayDelay = 1000;
    	SetRunAway( 10, MI_AIBATT2, 5 );
    	m_nAttackFirstRange = 8;
    
    	AI
    	{
    		#Scan
                        {
    			scan
                        }
    		#battle
    		    {
    			Attack cunning low
    			Recovery 10 50 100 m
    			evade 20
                                                                
                        }
    		#move
    		    {
    			Loot d 5
    		    }	
       	}               
    }
    Here is a possible DropItem() function.
    (Lmao I don't know what the last two parameters are for the DropItem() function...)
    Note: In this example, rate refers to the number in the first column of the table above.
    Note 2: This is NOT a working example as I am still working on it :P
    Note 3: I divide rate / 100000 because unsigned long is too big for the rand() function.
    Code:
    void DropItem(int itemID, unsigned long rate, ??, ??)
    {
            rate = rate / 100000;
            int randNum = 0;
    	srand(time(NULL));
            randNum = rand();
    	if(randNum > 30000)
    		randNum = 30000;
            if((float)randNum / 30000 <= (float)rate / 30000)
    	{
    		...
    	}
    }
    Well I tested out the above code and it seems to be pretty accurate. (If you want my testing code just ask or PM me)


    So that's it I hope it helped someone

    P.S. If I feel like working on this guide more I might extend on it.


  2. #2
    Elite Member Mythx is offline
    Member +Rank
    Aug 2009 Join Date
    130Posts

    Re: Drop Rate (not complete)

    I've known what the table is/means for years, but i'm sure there's someone who'll find this useful.

    Off-topic: What's your project? Like.. Version. Just curious.

  3. #3
    Grand Master HolySinX is offline
    Grand MasterRank
    Sep 2008 Join Date
    LocalhostLocation
    787Posts

    Re: Drop Rate (not complete)

    Quote Originally Posted by nini View Post
    hey everyone,

    off topic:
    I know i haven't posted in a few months and i sort of abandoned my old project, but that was because i realized that it didn't have very much potential as it was created in visual basic. Anyways, now i'm back and i've started a new project, this time in c++, and i already have the client connecting using boost::asio.

    On topic:
    So i was looking through the drop rate file in data.res (propmoverex.inc) and i found this table.
    Code:
    /3000000000	percent		100/	decimal
    
    9375		0.0003125%	320000	0.000003125
    18750		0.000625%	160000	0.00000625
    37500		0.00125%	80000	0.0000125
    75000		0.0025%		40000	0.000025
    150000		0.005%		20000	0.00005
    300000		0.01%		10000	0.0001
    1000000		0.0333%		3000	0.000333
    1875000		0.0625%		1600	0.000625
    3000000		0.1%		1000	0.001
    3750000		0.125%		800	0.00125
    5000000		0.166%		600	0.00166
    7500000		0.25%		400	0.0025
    15000000	0.5%		200	0.005
    30000000	1%		100	0.01
    300000000	10%		10	0.1
    3000000000	100%		1	1
    (i added the decimal column.)

    i don't know if any of the devs know about this, or even need this, but i'm going to explain this to help anyone that might need it and for future reference.

    So the number in the left column / 3000000000 equals the corresponding percent in the second column.

    100 / the number in the right column equals the corresponding percent in the second column.

    And, obviously, the second column is the percentage of the item dropping.

    In propmoverex.inc, each monster has something similar to this.
    (giant aibatt):
    Code:
    mi_aibatt4
    {
    	maxitem = 5;
    	dropgold(78, 113);
    	dropkind(ik3_swd, 1, 6);
    	dropkind(ik3_helmet, 1, 6);
    	dropkind(ik3_suit, 1, 6);
    	dropkind(ik3_gauntlet, 1, 6);
    	dropkind(ik3_boots, 1, 6);
    	dropkind(ik3_shield, 1, 6);
    	
    	dropitem(ii_gen_mat_ele_flame, 3750000, 0, 1); //¼ó¼º 䫵å3 0.125%
    	dropitem(ii_gen_mat_ele_touch, 7500000, 0, 1); //¼ó¼º 䫵å2 0.25%
    
    	dropitem(ii_gen_mat_orichalcum01, 3006250, 0, 1);
    	dropitem(ii_gen_mat_moonstone, 1560000, 0, 1);
    
    	dropitem(ii_gen_gem_gem_twinklestone, 1000000000, 0, 1);
    	dropitem(ii_gen_gem_gem_twinklestone, 1000000000, 0, 1);
    	dropitem(ii_gen_foo_ins_lollipop, 1000000001, 0, 1);
    	dropitem(ii_gen_foo_ins_lollipop, 1000000001, 0, 1);
    	dropitem(ii_gen_foo_ins_lollipop, 1000000001, 0, 1);
    	dropitem(ii_gen_foo_ice_orangejuiice, 600000001, 0, 1);
    	dropitem(ii_gen_foo_ice_orangejuiice, 600000001, 0, 1);
    
    	m_dwattackmovedelay = 0;
    	m_dwrunawaydelay = 1000;
    	setrunaway( 10, mi_aibatt2, 5 );
    	m_nattackfirstrange = 8;
    
    	ai
    	{
    		#scan
                        {
    			scan
                        }
    		#battle
    		    {
    			attack cunning low
    			recovery 10 50 100 m
    			evade 20
                                                                
                        }
    		#move
    		    {
    			loot d 5
    		    }	
       	}               
    }
    here is a possible dropitem() function.
    (lmao i don't know what the last two parameters are for the dropitem() function...)
    note: In this example, rate refers to the number in the first column of the table above.
    Note 2: This is not a working example as i am still working on it :p
    note 3: I divide rate / 100000 because unsigned long is too big for the rand() function.
    Code:
    void dropitem(int itemid, unsigned long rate, ??, ??)
    {
            rate = rate / 100000;
            int randnum = 0;
    	srand(time(null));
            randnum = rand();
    	if(randnum > 30000)
    		randnum = 30000;
            if((float)randnum / 30000 <= (float)rate / 30000)
    	{
    		...
    	}
    }
    well i tested out the above code and it seems to be pretty accurate. (if you want my testing code just ask or pm me)


    so that's it i hope it helped someone :d:

    P.s. If i feel like working on this guide more i might extend on it.
    woo nini! Where have you been dude!

  4. #4
    Member Nini is offline
    MemberRank
    Oct 2008 Join Date
    CanadaLocation
    38Posts

    Re: Drop Rate (not complete)

    Quote Originally Posted by Mythx View Post
    I've known what the table is/means for years, but i'm sure there's someone who'll find this useful.

    Off-topic: What's your project? Like.. Version. Just curious.
    Umm I think my project's going to be v11. It depends whether I can find the right neuz

    @HolySinX

    Sorry I kind of abandoned the project. I went away on vacation at the beginning of the summer, and never really got back into the project. I think it was partly because I realized Visual Basic wasn't the right option for an emulator, plus I was feeling lazy

  5. #5
    Member Schnitz is offline
    MemberRank
    Oct 2008 Join Date
    85Posts

    Re: Drop Rate (not complete)

    MVI_MONSTER
    (
    Maxitem = max drop count;
    DropItem (item--, droprate,additional item level, dropcount);
    DropGold (Min, Max);

    m_dwAttackMoveDelay = 0; / / move delay (milliseconds)
    m_dwRunawayDelay = 1000; / / When run, Delay (milliseconds)
    SetRunAway (HP (in percent) );
    SetCallHelper (HP (Percent), NPC (Index), number (0 is everywhere), bParty (TRUE, FALSE, subject to attack a party member in the player set)); dont realy know what this is.

    )

    thats from me >_>

  6. #6
    Grand Master BBim is offline
    Grand MasterRank
    Sep 2008 Join Date
    127.0.0.1Location
    1,110Posts

    Re: Drop Rate (not complete)

    Quote Originally Posted by Schnitz View Post
    SetCallHelper (HP (Percent), NPC (Index), number (0 is everywhere), bParty (TRUE, FALSE, subject to attack a party member in the player set)); dont realy know what this is.
    Some mobs when they get x% of hp, they spawn another mob to attack you, a giant for example do it :P

  7. #7
    Member Schnitz is offline
    MemberRank
    Oct 2008 Join Date
    85Posts

    Re: Drop Rate (not complete)

    ok thanky ;)



Advertisement