Sell Lumber

sidove

Member
Reaction score
22
Is there a way to sell lumber for gold like in items?
Like:
All my lumber is stored in a item?
+rep for help
 

Nerfpl

New Member
Reaction score
53
Is there a way to sell lumber for gold like in items?
Like:
All my lumber is stored in a item?

you can make item with charges representing your lumber. just limit i 999 i think.

each second or so
set charges on item (currnet lumer of player)
 

Azlier

Old World Ghost
Reaction score
461
All your lumber stored in an item? Items can have custom values. I would look into using that.
 

Azlier

Old World Ghost
Reaction score
461
Sorry, I'm not allowed to use the editor, or Warcraft, etc. Good luck, though!
 

Azlier

Old World Ghost
Reaction score
461
Well, let's assume that you want this to happen when a unit uses an item.

First, check the item type.

Second, set the item's custom value to its custom value (because it might have lumber inside already) plus the amount of lumber the owner has.

Third, set the lumber amount of the owner of this item to zero.
 

Azlier

Old World Ghost
Reaction score
461
>wngliah

What?

That's the best I can explain it without posting an actual trigger, sorry.
 

Azlier

Old World Ghost
Reaction score
461
Lazy peoples these days, I tells ya. I'ma throw one togetha' fer ya.

Trigger:
  • Example(?)
    • Events
      • A unit uses an item.
    • Conditions
      • Item-type of (Item being manipulated) Equal to <Itemtype>
    • Actions
      • Item - Set Custom Value of (Item being manipulated) to (Custom Value of (Item being manipulated) + (Player(Owner of Triggering Unit)'s Lumber
      • Player - Set Player(Owner of Triggering Unit)'s Lumber to 0


Hey, that turned out nicely for freehand!
 

sidove

Member
Reaction score
22
Lazy peoples these days, I tells ya. I'ma throw one togetha' fer ya.

Trigger:
  • Example(?)
    • Events
      • A unit uses an item.
    • Conditions
      • Item-type of (Item being manipulated) Equal to <Itemtype>
    • Actions
      • Item - Set Custom Value of (Item being manipulated) to (Custom Value of (Item being manipulated) + (Player(Owner of Triggering Unit)'s Lumber
      • Player - Set Player(Owner of Triggering Unit)'s Lumber to 0


Hey, that turned out nicely for freehand!
How do i do this
Code:
Set Custom Value of (Item being manipulated) to (Custom Value of (Item being manipulated) + (Player(Owner of Triggering Unit)'s Lumber
? couldn't find it in the editor
 

Azlier

Old World Ghost
Reaction score
461
I wouldn't know. I am not allowed to use the editor. But, I know that items have custom values. I used this to make a backpack system.
 

sidove

Member
Reaction score
22
I wouldn't know. I am not allowed to use the editor. But, I know that items have custom values. I used this to make a backpack system.

If you aren't allowed to use WE, then how did you do the trigger?
 

X-maul

AKA: Demtrod
Reaction score
201
freehand... he just wrote it like if i write

Event:
Unit- Unit dies

Condition:

Action:
Set TempPoint = random point in entire map
Unit - Create 1 footman at TempPoint facing random building angle
Custom script - call remove location(udg_TempPoint)
 

sidove

Member
Reaction score
22
yay it works all lumber stores in 1 item but how do i do so t e x:
i have 10 lumber then i get 10 charges:p?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top