Warcraft III resources & community, 2003–2006 · archived

Please help! creating item

7 posts
#1

Please help! creating item

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"
#2
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...
#3
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.
#4
What do you mean "the hero that has the items"?
#5

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.
#6
yo if u donwload some attach ments form sight if u dont know u can equip them to player by going to triggers add special effect to unit ////put special effect to the right hand SOme advice
#7
Okay G-dizzle, u didnt mention clay in ur first post... I have edited the trigger code at my earlier post and dont tell me its wrong after you havent tried it twice or thrice; maybe you could have made a mistake in copying the triggers.