rabid_weiner
New Member
- Reaction score
- 2
I need some help in a trigger where when a unit equips an item that it is binded to them, and they can drop the item, but no other players can pick it up.
And my trigger to drop the item is
The problem with this is that if they pick up an item owned by another player that it allows them to pick up another item of the same type or pick up the other players item... So if anyone could help me, that would be great
PHP:
Unit - A unit Acquires an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff7777aaIron Armor|r
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Not equal to Elven Warrior
(Unit-type of (Triggering unit)) Not equal to Human Warrior
(Unit-type of (Triggering unit)) Not equal to Orc Warrior
(Unit-type of (Triggering unit)) Not equal to Human Paladin
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cffff0000You are n...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PlayerChest[(Player number of (Owner of (Triggering unit)))] Equal to True
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cffff0000You may n...
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
PlayerChest[(Player number of (Owner of (Triggering unit)))] Equal to False
Or - Any (Conditions) are true
Conditions
(Custom value of (Item being manipulated)) Equal to 0
(Custom value of (Item being manipulated)) Equal to (Player number of (Owner of (Triggering unit)))
Then - Actions
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Set PlayerChest[(Player number of (Owner of (Triggering unit)))] = True
Else - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cffff0000You may n...
PHP:
Events
Unit - A unit Loses an item
Unit - A unit Pawns an item (to shop)
Actions
Set ItemUnitGroup = (Units owned by (Triggering player))
Unit Group - Pick every unit in ItemUnitGroup and do (Actions)
Loop - Actions
Set ItemOwner = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff7777aaIron Sword|r
(Item-type of (Item being manipulated)) Equal to |c000000ffAssailant's Hope|r
(Item-type of (Item being manipulated)) Equal to |c000000ffAssailant's Plight|r
(Item-type of (Item being manipulated)) Equal to |c000000ffAssailant's Wrath|r
(Item-type of (Item being manipulated)) Equal to |cff32cd32Ravaged Longsword|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaSteel Sword|r
(Item-type of (Item being manipulated)) Equal to |cff32cd32Orc Warlock Cleaver|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaWooden Bow|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaLong Wooden Bow|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaMace|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaMace of the Magus|r
Then - Actions
Set PlayerWeapon[(Player number of (Triggering player))] = False
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff7777aaCloth Shirt|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaDemon Wood Bark|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaIron Armor|r
(Item-type of (Item being manipulated)) Equal to |c000000ffAssailant's Will|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaBattle Mage's Armor|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaLeather Armor|r
Then - Actions
Set PlayerChest[(Player number of (Triggering player))] = False
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff7777aaSteel Shield|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaIron Shield|r
(Item-type of (Item being manipulated)) Equal to |c000000ffAssailant's Might|r
(Item-type of (Item being manipulated)) Equal to |cff32cd32Blighted Claws|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaSharp Claws|r
Then - Actions
Set PlayerIOffhand[(Player number of (Triggering player))] = False
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff7777aaBattle Mage's Cap|r
(Item-type of (Item being manipulated)) Equal to |c000000ffAssailant's Grace|r
(Item-type of (Item being manipulated)) Equal to |cff7777aaIron Helm|r
Then - Actions
Set PlayerHelm[(Player number of (Triggering player))] = False
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff32cd32Orc Grunt's Gloves|r
(Item-type of (Item being manipulated)) Equal to |cff32cd32Silk Gloves|r
(Item-type of (Item being manipulated)) Equal to |cff32cd32Scorpid's Claw|r
Then - Actions
Set PlayerGloves[(Player number of (Triggering player))] = False
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to |cff32cd32Taskmaster's Boots|r
(Item-type of (Item being manipulated)) Equal to |cff32cd32Jungle Boots|r
Then - Actions
Set PlayerBoots[(Player number of (Triggering player))] = False
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
Else - Actions
Custom script: call DestroyGroup(udg_ItemUnitGroup)