Two Requests

SpaceBar

New Member
Reaction score
16
SOVED

Hi guys,

I'm currently making a new vampirism map (thy shall not be named) and i need two requests:

1. A -show command, similar to the one in Vampirism Fire, showing the amount of gold fed by each player and the amount of leaks by the Vampires (Players 11 and 12).

(Second Request Solved.) I originally used this code http://www.thehelper.net/forums/showthread.php?t=129373&highlight=autoharvest

However, it didn't work, until i checked the trigger again in my map and for some reason i removed
Trigger:
  • (Level of Harvest (Gold and Lumber) for (Trained unit)) Greater than or equal to 1
and now it works.

If anyone can help, that would be great. (+rep :))

~Regards Space

@Happy

I have serveral different harvesters, just didn't add them.
 

Happy

Well-Known Member
Reaction score
71
why you are using an or condition in the second trigger??? o_O there's only 1 condition in the or.....
 

Happy

Well-Known Member
Reaction score
71
the amount of gold is not really difficult.

Trigger:
  • first trigger
    • Events
    • Unit - A unit Dies
    • Conditions
    • Actions
      • if/then/else(multiple)
        • if-conditions
          • unit-type of triggering unit is equal to (a unit/building the human can make)
        • then-actions
          • set killing_unit(player number of owner of triggering) = killing_unit(player number of owner of triggering) + (whatever amount of gold the unit adds)
        • else-actions

make this if/then/else for every unit can be trained/built by the humans.

Trigger:
  • 2. trigger
    • events
    • player 1 (red) types text massage -show
    • player 2 (blue) types text massage -show
    • and so on...
    • conditions
    • actions
    • for each integer A from 1 to 10 do actions
    • game - show to all player the text <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />layer name (integer A) + has fed the vampires with + (substring(killing_unit(integer A))) + gold.

the text you can change to whatever you want.^^

and what you mean with leaks of the vamps??

greetz happy
 

Lord Regno

Active Member
Reaction score
19
Hello spacebar :p I have the trigger :p from Titan winter, then you tabing show it will show for Dwarfs feed/leak because I maked a simpler trigger leak are then they falling as vamp and leak :p

EDIT: Moved color code to here

Player color: string variable:
Trigger:
  • Player Color
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set PlayerColor[1] = |c00ff0000
      • Set PlayerColor[2] = |c000000ff
      • Set PlayerColor[3] = |c0000ffff
      • Set PlayerColor[4] = |c00800080
      • Set PlayerColor[5] = |c00ffff00
      • Set PlayerColor[6] = |c00ff8000
      • Set PlayerColor[7] = |c0000ff00
      • Set PlayerColor[8] = |c00ff80ff
      • Set PlayerColor[9] = |c00808080
      • Set PlayerColor[10] = |c000db0ff
      • Set PlayerColor[11] = |c00027553
      • Set PlayerColor[12] = |c00613030



Trigger:
  • Show command (in this it&#039;s show to how match gold income humans/vamp get every minit!)
    • Events
      • Player - Player 1 (Red) to Player 12 types a chat message containing -show as An exact match
    • Conditions
    • Actions
      • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
      • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: Feed|cff99ffff/|r|c...
      • For each (Integer B) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer B))) slot status) Equal to Is playing
                  • ((Player((Integer B))) slot status) Equal to Has left the game
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: ((PlayerColor[(Integer B)] + (Name of (Player((Integer B))))) + (((|cffffffff + ((String(Feed[(Integer B)])) + g|cff99ffff/|r|cffFFCC66)) + (String(Gold_Drop[(Integer B)]))) + g))
            • Else - Actions
              • Do nothing
      • For each (Integer B) from 11 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer B))) slot status) Equal to Is playing
                  • ((Player((Integer B))) slot status) Equal to Has left the game
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: ((PlayerColor[(Integer B)] + (Name of (Player((Integer B))))) + (|cff99ffff has leaked|r|cffFFCC66 + ((String(Gold_Drop[(Integer B)])) + |cffffffffgold|r)))
            • Else - Actions
              • Do nothing
    • The total minit goldincome (feel free to give credits if you use this, because it was not simple to make it and its was taken a while to make it):
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in Dwarf) Equal to True
        • Then - Actions
          • Set Total_Goldmines = ((Number of units in (Units owned by (Triggering player) of type Gold Mine)) + (((Number of units in (Units owned by (Triggering player) of type Better Gold Mine)) x 2) + (((Number of units in (Units owned by (Triggering player) of type Big Gold Mine)) x 4) +
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Gold_Bonus Greater than or equal to 1
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (|cff99FFFFYour total minute gold income are |cffFFCC66 + ((String((Total_Goldmines x (Gold_Bonus + 1)))) + |r|cff99ffff.))
            • Else - Actions
              • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (|cff99FFFFYour total minute gold income are |cffFFCC66 + ((String(Total_Goldmines)) + |r|cff99ffff.))
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (|cff99FFFFYour total minute gold income are |cffFFCC66 + ((String(Urn)) + |r|cff99ffff.))


Feed trigger:
Trigger:
  • Human Feed
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Killing unit)) Equal to Ice Man
              • (Unit-type of (Killing unit)) Equal to Minion
        • Then - Actions
          • Set Feed[(Player number of (Owner of (Dying unit)))] = (Feed[(Player number of (Owner of (Dying unit)))] + (Point-value of (Dying unit)))
        • Else - Actions
          • Do nothing


EDIT: In feed trigger don't forgot to set point value to the gold bonus!

Then I make 2 triggers that are simple:

Trigger:
  • Gold Drop (if titan/vamp kill its has a drop chance)
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Unit-type of (Killing unit)) Equal to Minion) or ((Unit-type of (Killing unit)) Equal to Ice Man)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 10
        • Then - Actions
          • Item - Create Gold coin 1G at (Position of (Triggering unit))
          • Item - Change ownership of (Last created item) to (Owner of (Killing unit)) and Retain color
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Equal to 10
            • Then - Actions
              • Item - Create Gold coin 3G at (Position of (Triggering unit))
              • Item - Change ownership of (Last created item) to (Owner of (Killing unit)) and Retain color
            • Else - Actions
              • Do nothing


Now to the leak trigger:

Trigger:
  • Gold leak
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Dwarf Slayer
          • (Unit-type of (Hero manipulating item)) Equal to Dwarf Lord
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Gold coin 1G
        • Then - Actions
          • Set Gold_Drop[(Player number of (Owner of (Item being manipulated)))] = (Gold_Drop[(Player number of (Owner of (Item being manipulated)))] + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Gold coin 3G
            • Then - Actions
              • Set Gold_Drop[(Player number of (Owner of (Item being manipulated)))] = (Gold_Drop[(Player number of (Owner of (Item being manipulated)))] + 3)
            • Else - Actions
              • Do nothing


EDIT: Forgot the trigger leak then vamps are falling, whatever I take more then necessary now:

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Ice Man
    • Then - Actions
      • Item - Create Ice Heart at (Position of (Dying unit))
      • Player - Add 4 to (Owner of (Killing unit)) Current gold
      • Set Gold_Drop[(Player number of (Owner of (Dying unit)))] = (Gold_Drop[(Player number of (Owner of (Dying unit)))] + 4)
    • Else - Actions
      • Item - Create Minion Ice Heart at (Position of (Dying unit))
      • Player - Add 2 to (Owner of (Killing unit)) Current gold
      • Set Gold_Drop[(Player number of (Owner of (Dying unit)))] = (Gold_Drop[(Player number of (Owner of (Dying unit)))] + 2)
 

SpaceBar

New Member
Reaction score
16
Cheers mate, all works. Only a few problems, which i can fix up, again thanks a bunch :thup:
 

Lord Regno

Active Member
Reaction score
19
Hm, now I wonder what's are the problems, its are some varibels in it but I think you now what's the variabels am, but are it something that are making the trigger bug in titan winter? Hm I can see set number of Goldmines variable are two times... well I chanced it and forgot to remove it fixed here to!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top