Automatic Seller

Status
Not open for further replies.
Level 14
Joined
Oct 16, 2010
Messages
749
Hi

I've just started making a map where there is generally a lot of loot. (Most of which you want to sell) So I thought it would be good to have a unit that when it picks an item up it automatically sells it, however I have no idea how to do this!!! Any ideas?
 
Level 14
Joined
Oct 16, 2010
Messages
749
The shop has both of those abilities but the item is still not sold. Does the shop need to be a building?

Anyway the item does get removed from the unit that picks it up so that part works fine, just doesn't get sold.

Here's the trigger:

  • Travelling Merchant
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Level of Travelling Merchant (Claptrap) for (Hero manipulating item)) Greater than or equal to 1
    • Actions
      • Set Spell_CasterUnit = (Hero manipulating item)
      • Set Spell_CasterPoint = (Position of Spell_CasterUnit)
      • Unit - Create 1 Dummy (Merch Seller) for (Owner of Spell_CasterUnit) at Spell_CasterPoint facing Default building facing degrees
      • Set TempUnit = (Last created unit)
      • Hero - Give (Item being manipulated) to TempUnit
      • Unit - Make TempUnit Explode on death
      • Unit - Add a 1.00 second Generic expiration timer to TempUnit
      • Unit - Create 1 Dummy (Merch Shop) for (Owner of Spell_CasterUnit) at Spell_CasterPoint facing Default building facing degrees
      • Set Spell_CasterUnit = (Last created unit)
      • Unit - Make Spell_CasterUnit Explode on death
      • Unit - Add a 1.00 second Generic expiration timer to Spell_CasterUnit
      • Hero - Order TempUnit to use (Item being manipulated) on Spell_CasterUnit
      • Custom script: call RemoveLocation(udg_Spell_CasterPoint)
 
Level 3
Joined
Jul 15, 2014
Messages
39
You give the item wrong way, if you want unit to naturally sell item try Unit - Order U1 to give Item1 to U2
  • sellitem
    • Events
      • Player - Player 1 (Red) types a chat message containing dodo as An exact match
    • Conditions
    • Actions
      • Unit - Order Paladin 0000 <gen> to give (Item carried by Paladin 0000 <gen> in slot 1) to Goblin Merchant 0001 <gen>
 
Status
Not open for further replies.
Top