buying unit?

Menelaus

New Member
Reaction score
9
Code:
set cvs for items
    Events
        Unit - A unit Sells an item (from shop)
    Conditions
    Actions
        Item - Set the custom value of (Sold Item) to 70
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Item-type of (Sold Item)) Equal to Damage Aura lvl 1
                        (Item-type of (Sold Item)) Equal to Speed Aura lvl 1
            Then - Actions
                Item - Set the custom value of (Sold Item) to 30
            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 (Sold Item)) Equal to Damage Aura lvl 2
                        (Item-type of (Sold Item)) Equal to Speed Aura lvl 2
            Then - Actions
                Item - Set the custom value of (Sold Item) to 40
            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 (Sold Item)) Equal to Damage Aura lvl 3
                        (Item-type of (Sold Item)) Equal to Speed Aura lvl 3
            Then - Actions
                Item - Set the custom value of (Sold Item) to 50
            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 (Sold Item)) Equal to Damage Aura lvl 4
                        (Item-type of (Sold Item)) Equal to Speed Aura lvl 4
            Then - Actions
                Item - Set the custom value of (Sold Item) to 60
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Custom value of (Sold Item)) Greater than HeroTDPoints[(Player number of [COLOR="red"](Owner of (Triggering unit))[/COLOR])]
            Then - Actions
                Item - Remove (Sold Item)
                Game - Display to (Player group([COLOR="red"](Owner of (Triggering unit))[/COLOR])) the text: You dont have enoug...
            Else - Actions
                Set HeroTDPoints[(Player number of [COLOR="Red"](Owner of (Triggering Unit))[/COLOR])] = (HeroTDPoints[(Player number of [COLOR="Red"](Owner of (Triggering unit))[/COLOR])] - (Custom value of (Sold Item)))


are these equivalent to "buying player"?

the item is bought and then removed, as if there arent enough points and im sure there are, because i made a "-points"


EDIT:

wow im stupid there is a "buying unit"
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top