Jump to content
  • 0

R> MVP custom drop


Question

Posted

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

  • 0
Posted
-    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.

  • Love 1
  • 0
Posted
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

  • 0
Posted
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

  • 0
Posted (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 by llchrisll
  • 0
Posted
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.

  • 0
Posted
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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...