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

Please help! creating item

Status
Not open for further replies.
Level 4
Joined
Oct 12, 2004
Messages
59
How do i do this,

-As long as unit has "blacksmiths hammer in inventory" and "Scrap Metal" in inventory and a player types "forge metal to shortsword" as exact match it creates "metal shortsword" for the hero of the owner of the player that typed the chat string the player has and removes scrap metal and orders the hero to use one charge of "Blacksmiths Hammer"
 
Level 3
Joined
May 6, 2006
Messages
44
well i dont know exactly how, but heres an idea:

Event:

Player types XXXX as exact match

Condition:
Picked Player has X item in inventory
Picked Player has Y item in inventory

Action:

Remove Item X from inventory
Remove Item Y from inventory
Add Item Z to Inventory

and so far thats all i think there is.... dont know the EXACT triggers, you might , probably will, need some variables...
 
Level 6
Joined
May 13, 2005
Messages
164
Please specify the "hero" that has the items. Note that this trigger can only be used when there is one hero for that player.

Event-
Player- Player 1 types a chat message containing forge metal to shortsword as An exact match

Player- Player 2 types a chat message containing forge metal to shortsword as An exact match

Player- Player 3 types a chat message containing forge metal to shortsword as An exact match

...so on for other players...

Conditions-
N/A

Actions-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to (Triggering player)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has an item of type Blacksmith's hammer) Equal to True
((Picked unit) has an item of type Scrap Metal) Equal to True
Then - Actions
Item - Remove (Item carried by (Picked unit) of type Scrap Metal)
Item - Set charges remaining in (Item carried by (Picked unit) of type Blacksmith's Hammer) to ((Charges remaining in (Item carried by (Picked unit) of type Blacksmith's Hammer)) - 1)
Hero - Create Shortsword and give it to (Picked unit)


Else - Actions
Game - Display to (Player group((Owner of (Picked unit)))) the text: Need a piece of Scrap Metal and a Blacksmith's Hammer
Else - Actions
Do Nothing



Tell me if it cant work :D , but i doubt you will.
 
Level 4
Joined
Oct 12, 2004
Messages
59
Doesnt work

It doesnt create the item and says you need clay and hammer 4 times, and doesnt remove a charge from hammer, plz someone help plz.
 
Status
Not open for further replies.
Top