I
IKilledKEnny
Guest
Submissions
Hey I made this quick system to help people get players allied when they type massage with 2 triggers only. Map is attached if you don't want to read the Triggers and explanation.
http://www.thehelper.net/forums/showthread.php?t=52027
Things needed:
Variables:
What it would do, is in just 17.4 KB / 4 MB 3 things:
A.
When player writes: -Ally Num
He'll ally immediatly with the player that is that number (example: "-ally 3", player will immediatly ally with teal".
B.
When player writes: -Ally Color
He'll immediatly ally with the player that is that color. (Example: "-ally teal", player will immediatly ally with teal).
C.
When player writes: -Ally Name
He'll immediatly ally with that player that has that name (Example"-Ally TealLover" Assuming teal got this name player would ally with him).
Hope you enjoyed, move this theard if needed. Feedback is welcomed.
http://www.thehelper.net/forums/showthread.php?t=52027
Hey I made this quick system to help people get players allied when they type massage with 2 triggers only. Map is attached if you don't want to read the Triggers and explanation.
http://www.thehelper.net/forums/showthread.php?t=52027
Things needed:
- Warcraft III: The Frozen Throne (Expansion).
Variables:
- 1 Player Group variable no array (AllyPF)
- 2 String variables with array equal to maximum num of players (12)(AllyStringColor, AllyStringName)
- Integer Variable no array (Integer)
Code:
Setting Up Triggers
Events
Map initialization
Conditions
Actions
Set AllyPF = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
Player Group - Pick every player in AllyPF and do (Actions)
Loop - Actions
Set AllyStringName[(Player number of (Picked player))] = (Name of (Picked player))
Trigger - Add to Actual Trigger <gen> the event (Player - (Picked player) types a chat message containing -Ally as A substring)
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Red
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Blue
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Teal
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Purple
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Yellow
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Orange
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Green
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Pink
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Grey
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Light Blue
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Dark Green
Set Integer = (Integer + 1)
Set AllyStringColor[Integer] = Brown
Custom script: call DestroyForce(udg_AllyPF)
Custom script: call DestroyTrigger(GetTriggeringTrigger())
Code:
Actual Trigger
Events
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
Or - Any (Conditions) are true
Conditions
(Integer((Substring((Entered chat string), 7, 8)))) Equal to (Integer A)
(Substring((Entered chat string), 7, 22)) Equal to AllyStringName[(Integer A)]
(Substring((Entered chat string), 7, 17)) Equal to AllyStringColor[(Integer A)]
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
Else - Actions
What it would do, is in just 17.4 KB / 4 MB 3 things:
A.
When player writes: -Ally Num
He'll ally immediatly with the player that is that number (example: "-ally 3", player will immediatly ally with teal".
B.
When player writes: -Ally Color
He'll immediatly ally with the player that is that color. (Example: "-ally teal", player will immediatly ally with teal).
C.
When player writes: -Ally Name
He'll immediatly ally with that player that has that name (Example"-Ally TealLover" Assuming teal got this name player would ally with him).
Hope you enjoyed, move this theard if needed. Feedback is welcomed.
http://www.thehelper.net/forums/showthread.php?t=52027