• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Upgrade(recipe) Help

Status
Not open for further replies.
Level 4
Joined
Nov 9, 2008
Messages
112
How to make if a unit upgrade an item (using recipe)

ex:broadsword to broadsword+1

ex:broadsword + ore = broadsword+1 (with xx% succes)

(if possible)
 
Whenever the upgrading should happen:

Set Integer A = 1 to 6
Check if slot Integer A contains Ore
Check if slot Integer A contains Broadsword
If both true:
Set RANDOM = Random number beteen 1 and 100
If RANDOM is less then or equal to xx (Your percentage), then do:
Remove Ore, remove Broadsword, and add Broadsword+

I got no WE here, so I can't give it to you in correct triggers, but all these commands are there.
 
As Avator wrote there, I made the trigger for you.
  • Upgrade Recipe
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Hero manipulating item) has an item of type Broadsword) Equal to True
              • ((Hero manipulating item) has an item of type Ore) Equal to True
        • Then - Actions
          • Set Random = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Less than or equal to 50
            • Then - Actions
              • Item - Remove (Item carried by (Hero manipulating item) of type Broadsword)
              • Item - Remove (Item carried by (Hero manipulating item) of type Ore)
              • Hero - Create Broadsword+ and give it to (Hero manipulating item)
            • Else - Actions
              • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You have failed to create a new item!
        • Else - Actions
          • Do nothing
*Works for heroes only!
 
Check my tutorial (it's in my signature). It's what you are looking for, just ignore the whole profession check part.
It's main part is having a recipe that will turn it into a item with a X chance.
Just cut out all of the profession checks.

Unless you want to make it a profession with lvls that is.
 
that's have 50% chance...

but how if..(bad english)

50% succes (ex: Broadsword+1)
35% do nothing [still Broadsword] (but the ore vanish)
10% the weapon back to origin(ex: Broadsword+3 --> Broadsword)&[ore vanish]
5% the weapon and ore are vanished
 
Then make such same If/Then/Else triggers like the 50% chance If/Then/Else, and you enter

  • If - Conditions
    • Random Greater then 50
    • Random Less then or equal to 85
This gives 35% chance. Just add which actions you want to be performed with which chances and you're all set.
 
Status
Not open for further replies.
Back
Top