• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Vamp beast style trading

Status
Not open for further replies.
Level 2
Joined
Apr 7, 2008
Messages
14
I asked the same question on the official vampirism beast forum and got only abuse, so I will ask here in hope someone knows what I need.

Can someone please explain to me how to make the -gw or -gg triggers for a vamp map using the GUI not JASS? I played around for a bit and I just don't get it.

But can you also post an example screenshot? I got a result on the vamp forum, but I still didn't get it.


Thankz in advance,

The Zayfox
 
Level 2
Joined
Apr 7, 2008
Messages
14
Damn, I expected more people to know, because it is like the only game played apart from DoTA.

Ok, lets have an example
I type -GG 24 blue
So it basically gives 24 gold to whoever is in blue player slot
if I have 30g (g = gold by the way) and type -gg 50 blue, it will only give 30 because thats all i have.

Wood works in the same way (-gw)
I need it for players 1-6 (red - orange)
 
Level 4
Joined
Jun 1, 2007
Messages
92
Color is a string array variable containing red, blue, teal, etc. So set it on your initialization trigger. Amount is an integer variable. Note that on
  • (Substring((Entered chat string), 2, 4)) Equal to gg
gg has a space right after it, same with gw
  • trading
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
      • Player - Player 2 (Blue) types a chat message containing - as A substring
      • Player - Player 3 (Teal) types a chat message containing - as A substring
      • Player - Player 4 (Purple) types a chat message containing - as A substring
      • Player - Player 5 (Yellow) types a chat message containing - as A substring
      • Player - Player 6 (Orange) types a chat message containing - as A substring
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Entered chat string), 5, (5 + (Length of Color[(Integer A)])))) Equal to (Color[(Integer A)] + )
              • ((Triggering player) is an ally of (Player((Integer A)))) Equal to True
            • Then - Actions
              • Set Amount = (Integer((Substring((Entered chat string), (5 + (Length of Color[(Integer A)])), 25))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring((Entered chat string), 2, 4)) Equal to gw
                  • ((Triggering player) Current lumber) Greater than or equal to Amount
                • Then - Actions
                  • Player - Add Amount to (Player((Integer A))) Current lumber
                  • Player - Add (Amount x -1) to (Triggering player) Current lumber
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring((Entered chat string), 2, 4)) Equal to gg
                  • ((Triggering player) Current gold) Greater than or equal to Amount
                • Then - Actions
                  • Player - Add Amount to (Player((Integer A))) Current gold
                  • Player - Add (Amount x -1) to (Triggering player) Current gold
                • Else - Actions
            • Else - Actions
 
Level 2
Joined
Apr 7, 2008
Messages
14
Trading Trigger:
For this line:
(Substring((Entered chat string), 5, (5 + (Length of Color[(Integer A)])))) Equal to (Color[(Integer A)] + )

For the COLOUR[(Integer A)] bit, how do I get that up, I tried pretty much all functions and I don't see it.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
-gw = -GhostWolf !

Anyhow, when the player types whatever he needs to type, you check where his unit is.
Now you check if the region the unit is in, isn't owned by someone else. This will be done by setting a boolean to true when a player claims a region.

If that region isn't claimed, you do something like "set Claim[player number of[triggering player]] = true" (in case a player can only have one region).

Now to -gtfo noobs from your region, check what region the unit claims, pick every unit not owned by the player in that region, and instantly move the picked units to somewhere else.
 
Level 2
Joined
Apr 7, 2008
Messages
14
Anyhow, when the player types whatever he needs to type, you check where his unit is.
Now you check if the region the unit is in, isn't owned by someone else. This will be done by setting a boolean to true when a player claims a region.

If that region isn't claimed, you do something like "set Claim[player number of[triggering player]] = true" (in case a player can only have one region).

Now to -gtfo noobs from your region, check what region the unit claims, pick every unit not owned by the player in that region, and instantly move the picked units to somewhere else.

Could someone please give me a GUI trigger example? I am at loss in where to go.

Thanks
 
Level 2
Joined
Apr 7, 2008
Messages
14
Lol, Ok :)

Can someone help me? I am really stuck, I tried again this afternoon and still don't get how I check where the unit is, I can do the boolean stuff, but IDK where the checking unit location thing is...

Thanks in advance
 
Status
Not open for further replies.
Top