Quesooo Posted September 27, 2018 Group: Members Topic Count: 197 Topics Per Day: 0.07 Content Count: 883 Reputation: 28 Joined: 02/13/17 Last Seen: November 10, 2022 Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted September 30, 2018 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 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 Link to comment Share on other sites More sharing options...
0 Wickedknight2 Posted September 27, 2018 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 39 Reputation: 5 Joined: 06/09/17 Last Seen: 7 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 Quesooo Posted September 28, 2018 Group: Members Topic Count: 197 Topics Per Day: 0.07 Content Count: 883 Reputation: 28 Joined: 02/13/17 Last Seen: November 10, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
0 Rizta Posted September 29, 2018 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 109 Reputation: 5 Joined: 08/12/17 Last Seen: March 30, 2020 Share 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 Link to comment Share on other sites More sharing options...
0 llchrisll Posted October 23, 2018 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share 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 Link to comment Share on other sites More sharing options...
0 Wickedknight2 Posted October 23, 2018 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 39 Reputation: 5 Joined: 06/09/17 Last Seen: 7 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 llchrisll Posted October 23, 2018 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share 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 Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.