Quesooo Posted September 27, 2018 Posted September 27, 2018 Hi good day i would like to request a mvp custom drop item script example if you kill amon.ra or any mvp monster with a chance of 0.02% the monster will drop a random ( 1 item only ) on this list a random enchanted armor or enchanted weapon +10 just 1 item in random drop with announcement thank you Quote
0 Emistry Posted September 30, 2018 Posted September 30, 2018 @Wickedknight2 your method aren't quite correct, you shall randomize the value when it roll the items. Otherwise your script end up always giving the same item. could try something like this. https://pastebin.com/PZzpiz6V 1 Quote
0 Wickedknight2 Posted September 27, 2018 Posted September 27, 2018 - script MvPKill ,{ OnNPCKillEvent: if( getmonsterinfo( killedrid,MOB_MVPEXP ) ){ set .Dice,rand(1,10000){ // 1 = 0,01% if(.Dice <= .Chance){ getitem2 .PossibleItems[.RandItem],1,rand(.MinEnchant,.MaxEnchant),0,.RandEnchant1,.RandEnchant2,.RandEnchant3,.RandEnchant4; } } } end; OnInit: set .Chance,2; // Set the drop chance here setarray .PossibleItems[0], ;//<- Put your items IDs here. I.E: .PossibleItems[0],123,124,125; setarray .PossibleEnchants[0], ;//<- Put your enchants IDs here set .MinEnchant,0; // Minimum possible enchant set .MaxEnchant,20; // Max Possible enchant set .RandItem,rand(.SizeItem); set .RandEnchant1,rand(.SizeEnchants); set .RandEnchant2,rand(.SizeEnchants); set .RandEnchant3,rand(.SizeEnchants); set .RandEnchant4,rand(.SizeEnchants); set .SizeItem,getarraysize(.PossibleItems); set .SizeEnchants,getarraysize(.PossibleEnchants); end; } Haven't tested it tho, so let me know if anything goes wrong Have in mind it will get you an item with enchants on the 4 slots. 1 Quote
0 Quesooo Posted September 28, 2018 Author Posted September 28, 2018 16 hours ago, Wickedknight2 said: - script MvPKill ,{ OnNPCKillEvent: if( getmonsterinfo( killedrid,MOB_MVPEXP ) ){ set .Dice,rand(1,10000){ // 1 = 0,01% if(.Dice <= .Chance){ getitem2 .PossibleItems[.RandItem],1,rand(.MinEnchant,.MaxEnchant),0,.RandEnchant1,.RandEnchant2,.RandEnchant3,.RandEnchant4; } } } end; OnInit: set .Chance,2; // Set the drop chance here setarray .PossibleItems[0], ;//<- Put your items IDs here. I.E: .PossibleItems[0],123,124,125; setarray .PossibleEnchants[0], ;//<- Put your enchants IDs here set .MinEnchant,0; // Minimum possible enchant set .MaxEnchant,20; // Max Possible enchant set .RandItem,rand(.SizeItem); set .RandEnchant1,rand(.SizeEnchants); set .RandEnchant2,rand(.SizeEnchants); set .RandEnchant3,rand(.SizeEnchants); set .RandEnchant4,rand(.SizeEnchants); set .SizeItem,getarraysize(.PossibleItems); set .SizeEnchants,getarraysize(.PossibleEnchants); end; } Haven't tested it tho, so let me know if anything goes wrong Have in mind it will get you an item with enchants on the 4 slots. thank you i will try this later Quote
0 Rizta Posted September 29, 2018 Posted September 29, 2018 On 9/27/2018 at 3:10 PM, Wickedknight2 said: - script MvPKill ,{ OnNPCKillEvent: if( getmonsterinfo( killedrid,MOB_MVPEXP ) ){ set .Dice,rand(1,10000){ // 1 = 0,01% if(.Dice <= .Chance){ getitem2 .PossibleItems[.RandItem],1,rand(.MinEnchant,.MaxEnchant),0,.RandEnchant1,.RandEnchant2,.RandEnchant3,.RandEnchant4; } } } end; OnInit: set .Chance,2; // Set the drop chance here setarray .PossibleItems[0], ;//<- Put your items IDs here. I.E: .PossibleItems[0],123,124,125; setarray .PossibleEnchants[0], ;//<- Put your enchants IDs here set .MinEnchant,0; // Minimum possible enchant set .MaxEnchant,20; // Max Possible enchant set .RandItem,rand(.SizeItem); set .RandEnchant1,rand(.SizeEnchants); set .RandEnchant2,rand(.SizeEnchants); set .RandEnchant3,rand(.SizeEnchants); set .RandEnchant4,rand(.SizeEnchants); set .SizeItem,getarraysize(.PossibleItems); set .SizeEnchants,getarraysize(.PossibleEnchants); end; } Haven't tested it tho, so let me know if anything goes wrong Have in mind it will get you an item with enchants on the 4 slots. It is possible to made this randomly for a party member? Only restriction is the party member need to be in the same map and the same area when mvp is killed, like 20-30 cells Quote
0 llchrisll Posted October 23, 2018 Posted October 23, 2018 (edited) @Wickedknight2 I also see nowhere where you set the .SizeItems and .SizeEnchants, or I'm blind lol Maybe you meant getarraysize(.PossibleEnchants) and getarraysize(.PossibleItems) in your rand. XX Edited October 23, 2018 by llchrisll Quote
0 Wickedknight2 Posted October 23, 2018 Posted October 23, 2018 5 hours ago, llchrisll said: @Wickedknight2 I also see nowhere where you set the .SizeItems and .SizeEnchants, or I'm blind lol Maybe you meant getarraysize(.PossibleEnchants) and getarraysize(.PossibleItems) in your rand. XX They were set within the OnInit ! Though it's not working, as Emistry said. Quote
0 llchrisll Posted October 23, 2018 Posted October 23, 2018 3 hours ago, Wickedknight2 said: They were set within the OnInit ! Though it's not working, as Emistry said. Okayy. Must have been blind, after reading it like 10 times, I was able to find them lol. Quote
Question
Quesooo
Hi good day i would like to request a mvp custom drop item script example
if you kill amon.ra or any mvp monster with a chance of 0.02% the monster will drop a random ( 1 item only ) on this list
a random enchanted armor or enchanted weapon +10
just 1 item in random drop with announcement
thank you
7 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.