• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Advanced item drop system TRIGGERS req.

Status
Not open for further replies.
Level 10
Joined
Nov 24, 2010
Messages
546
Hello here
Im Palooo3 and we currently making an ORPG
http://www.hiveworkshop.com/forums/map-development-202/elemental-staff-185953/

Well we are not really good at triggers, so we request an advanced item drop system.
Point is, that we can make a chance for dropping ONE item type from ONE type of monster. But we need it to make like this. Monster A must have 100% chance to drop any item from some types of item.

Example:
We have now: You kill Boss and it has 10% chance to drop gloves
We need: You kill boss and it has 100% chance to drop ONE of items: gloves, armor, etc...
You could make it for one type of creeps, then ill just simply CnP it to our map and edit diying type of unit and item drop table.

If anyone can make this in GUI i would be happy. :thumbs_up:

Ill give credits and +rep for those who help us.

>Ł Palooo3

P.S. sorry for mistakes
 
Level 11
Joined
May 26, 2009
Messages
760
How about this?
  • Loot
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to BOSS
        • Then - Actions
          • -------- 100% chance to get a level 1 permanent item --------
          • Set Loc = (Position of (Dying unit))
          • Item - Create (Random level 1 Permanent item-type) at Loc
          • -------- 10% chance to get a specific item --------
          • Set Dice = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dice Less than or equal to 10
            • Then - Actions
              • Item - Create Gloves at Loc
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Loc)
        • Else - Actions
 
No, i think he means that he wants different items that share one "drop slot", meaning a maximum of one can drop.

Here is the way in pseudocode, dont have the time to formulate it as GUI:
RandInt= Random Integer between 1 and 100
if RandInt <= Dropchance1 then drop Item1
else if RandInt <= Dropchance1 + Dropchance2 then drop Item2
else if RandInt <= Dropchance1 + Dropchance2 + Dropchance3 then drop Item3
etc

Dropchances always in percent, so 10 for 10% and 50 for 50% etc.
If you have for example four Armor parts that the boss can drop (gloves, Shield, Chestplate, Helmet) and you want all to have the same dropchance, use:
if RandInt <=25 then drop Gloves
else if Randint <=50 then drop Shield
else if Randint <=75 then drop Chestplate
else drop Shield

But you can do also more complex things: If you for example want that there is a 10% chance that the boss drops nothing and that the gloves and the Helmet are more common than the Chestplate and the Shield, you could use the following distribution:
if RandInt <= 30 then drop gloves (30% chance)
else if RandInt <=60 then drop Helmet (30% chance)
else if RandInt <=75 then drop Chestplate (15% chance)
else if Randint <= 90 then drop Shield (15% chance)

I hope that is understandable. If not, simply ask.
 
Status
Not open for further replies.
Top