KucingHitam Posted July 9, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 4 Joined: 01/23/12 Last Seen: August 10, 2021 Share Posted July 9, 2013 Is it possible to make a script with the following conditions? if kill this monster ID 1893 -Poring Coin Drop 80% -Potion Drop 100% -Custom Box 1 10% -Custom Box 2 10% -Custom Box 3 30% Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 9, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 9, 2013 (edited) I don't see why not. - 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); 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 .mob1893, 7539, 8000, 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 1893: 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 100; // 100% 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 100; //100% more for Common Items. case 4: case 5: case 8: case 10: // Equip Item Rate (Ammo, Pet Equip, Weapon, Armor) return 100; // 100% more for equip items. case 6: // Card Item Rate (Card) return 100; // 100% more for cards. } case 1003: case 1004: case 1005: //...to add new monsters simply do as I've done. } } I don't know the IDs of your potion drop or your custom box drops so you'll have to add them. //Example Poring Apple, 10%, Apple, 1.5%....etc setarray .mob1893, 7539, 8000, 512, 150, 619, 20, 713, 1500, 909, 7000, 938, 400, 1202, 100, 4001, 1; // Mob List 10000=100% can support up to 128 values Edited July 9, 2013 by Skorm Quote Link to comment Share on other sites More sharing options...
Archetype Saber Posted July 9, 2013 Group: Members Topic Count: 90 Topics Per Day: 0.02 Content Count: 361 Reputation: 19 Joined: 01/09/13 Last Seen: January 19 Share Posted July 9, 2013 I don't see why not. - 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); 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 .mob1893, 7539, 8000, 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 1893: 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 100; // 100% 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 100; //100% more for Common Items. case 4: case 5: case 8: case 10: // Equip Item Rate (Ammo, Pet Equip, Weapon, Armor) return 100; // 100% more for equip items. case 6: // Card Item Rate (Card) return 100; // 100% more for cards. } case 1003: case 1004: case 1005: //...to add new monsters simply do as I've done. } } I don't know the IDs of your potion drop or your custom box drops so you'll have to add them. //Example Poring Apple, 10%, Apple, 1.5%....etc setarray .mob1893, 7539, 8000, 512, 150, 619, 20, 713, 1500, 909, 7000, 938, 400, 1202, 100, 4001, 1; // Mob List 10000=100% can support up to 128 values Well Done Skorm. a True Professional.... I admire your talent /OTL Quote Link to comment Share on other sites More sharing options...
KucingHitam Posted July 9, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 4 Joined: 01/23/12 Last Seen: August 10, 2021 Author Share Posted July 9, 2013 thanks a lot sir its work Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 9, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted July 9, 2013 http://rathena.org/board/topic/59964-custom-droprate/#entry84489 Quote Link to comment Share on other sites More sharing options...
Lil Troll Posted August 3, 2013 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 276 Reputation: 24 Joined: 07/06/13 Last Seen: April 19, 2014 Share Posted August 3, 2013 (edited) How can i make it work? -------------------------- npc invinsible on map. case level not integer: -------------------------- case mob3000: Edited August 3, 2013 by Lil Troll Quote Link to comment Share on other sites More sharing options...
Capuche Posted August 4, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted August 4, 2013 case 3000: Quote Link to comment Share on other sites More sharing options...
Question
KucingHitam
Is it possible to make a script with the following conditions?
if kill this monster ID 1893
-Poring Coin Drop 80%
-Potion Drop 100%
-Custom Box 1 10%
-Custom Box 2 10%
-Custom Box 3 30%
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.