Full Shared Unit
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 1 (Red) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 1 (Red)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 2 (Blue) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 2 (Blue)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 3 (Teal) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 3 (Teal)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 4 (Purple) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 4 (Purple)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 5 (Yellow) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 5 (Yellow)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 6 (Orange) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 6 (Orange)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 7 (Green) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 7 (Green)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 8 (Pink) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 8 (Pink)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 9 (Gray) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 9 (Gray)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 10 (Light Blue) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 10 (Light Blue)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 11 (Dark Green) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 11 (Dark Green)) else do (Do nothing))
Player Group - Pick every player in (All players) and do (If (((Picked player) is giving Player 12 (Brown) Shared units) Equal to True) then do (Player - For (Picked player), turn Full shared units On toward Player 12 (Brown)) else do (Do nothing))
Kick
Events
Player - Player 1 (Red) types a chat message containing -kick as A substring
Conditions
Actions
For each (Integer A) from 1 to 11, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Substring((Entered chat string), 7, 8)) Not equal to (String((Player number of (Player((Integer A))))))
Then - Actions
*Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: Must enter a player number.
|cffffcc00Ex.|r "-kick 2" For Player 2 (Blue)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer((Substring((Entered chat string), 7, 8)))))) slot status) Equal to Is playing
Then - Actions
*Unit Group - Pick every unit in (Units owned by (Player((Integer((Substring((Entered chat string), 7, 8))))))) and do (Unit - Remove (Picked unit) from the game)
*Player Group - Remove (Player((Integer((Substring((Entered chat string), 7, 8)))))) from (All players)
*Game - Display to (All players) for 5.00 seconds the text: (Colors[(Player number of (Player((Integer((Substring((Entered chat string), 7, 8)))))))] + ((Name of (Player((Integer((Substring((Entered chat string), 7, 8))))))) + |r has been kicked.))
Game - Defeat (Player((Integer((Substring((Entered chat string), 7, 8)))))) with the message: You have been kicked
Else - Actions
*Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: The person has to be in the game to kick them.
Untitled Trigger 003
Events
Player - Player 1 (Red) types a chat message containing -kick as An exact match
Conditions
Actions
Dialog - Clear REDKICKdialog
Dialog - Change the title of REDKICKdialog to Kick who?
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) controller) Equal to User
(Player 2 (Blue) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cff0000FF + (Name of Player 2 (Blue))) + |r)
Set kickplayercolorname[1] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) controller) Equal to User
(Player 3 (Teal) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cff00FFFF + (Name of Player 3 (Teal))) + |r)
Set kickplayercolorname[2] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Equal to Is playing
(Player 4 (Purple) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cffA020F0 + (Name of Player 4 (Purple))) + |r)
Set kickplayercolorname[3] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 5 (Yellow) controller) Equal to User
(Player 5 (Yellow) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cffFFFF00 + (Name of Player 5 (Yellow))) + |r)
Set kickplayercolorname[4] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 6 (Orange) controller) Equal to User
(Player 6 (Orange) slot status) Equal to Is playing
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cffFFA500 + (Name of Player 6 (Orange))) + |r)
Set kickplayercolorname[5] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 7 (Green) slot status) Equal to Is playing
(Player 7 (Green) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cff00FF00 + (Name of Player 7 (Green))) + |r)
Set kickplayercolorname[6] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 8 (Pink) slot status) Equal to Is playing
(Player 8 (Pink) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cffFFC0CB + (Name of Player 8 (Pink))) + |r)
Set kickplayercolorname[8] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 9 (Gray) slot status) Equal to Is playing
(Player 9 (Gray) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cffA9A9A9 + (Name of Player 9 (Gray))) + |r)
Set kickplayercolorname[9] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 10 (Light Blue) slot status) Equal to Is playing
(Player 10 (Light Blue) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cff00BFFF + (Name of Player 10 (Light Blue))) + |r)
Set kickplayercolorname[10] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 11 (Dark Green) slot status) Equal to Is playing
(Player 11 (Dark Green) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cff006400 + (Name of Player 11 (Dark Green))) + |r)
Set kickplayercolorname[11] = (Last created dialog Button)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 12 (Brown) slot status) Equal to Is playing
(Player 12 (Brown) controller) Equal to User
Then - Actions
Dialog - Create a dialog button for REDKICKdialog labelled ((|cffA52A2A + (Name of Player 12 (Brown))) + |r)
Set kickplayercolorname[6] = (Last created dialog Button)
Else - Actions
Dialog - Create a dialog button for REDKICKdialog labelled never mind
Dialog - Show REDKICKdialog for Player 1 (Red)
Untitled Trigger 004
Events
Dialog - A dialog button is clicked for REDKICKdialog
Conditions
Actions
If ((Clicked dialog button) Equal to kickplayercolorname[1]) then do (Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[2]) then do (Unit Group - Pick every unit in (Units owned by Player 3 (Teal)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[3]) then do (Unit Group - Pick every unit in (Units owned by Player 4 (Purple)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[4]) then do (Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[5]) then do (Unit Group - Pick every unit in (Units owned by Player 6 (Orange)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[6]) then do (Unit Group - Pick every unit in (Units owned by Player 7 (Green)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[7]) then do (Unit Group - Pick every unit in (Units owned by Player 8 (Pink)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[8]) then do (Unit Group - Pick every unit in (Units owned by Player 9 (Gray)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[9]) then do (Unit Group - Pick every unit in (Units owned by Player 10 (Light Blue)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[10]) then do (Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
If ((Clicked dialog button) Equal to kickplayercolorname[11]) then do (Unit Group - Pick every unit in (Units owned by Player 12 (Brown)) and do (Unit - Hide (Picked unit))) else do (Do nothing)
Item Keeps
Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Hero manipulating item)) controller) Equal to User
Or - Any (Conditions) are true
Conditions
(Custom value of (Item being manipulated)) Equal to 0
(Custom value of (Item being manipulated)) Greater than 12
Then - Actions
Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Hero manipulating item)))
Else - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: This item does not ...
Anti Team Attack
Events
Unit - A unit Is attacked
Conditions
((Attacking unit) belongs to an ally of (Owner of (Attacked unit))) Equal to True
((Attacking unit) is A Hero) Equal to True
Actions
Unit - Order (Attacking unit) to Stop
Check For Tester
Events
Time - Elapsed game time is 2.00 seconds
Conditions
Actions
Game - Display to (All players) the text: (This is a |cff00aa00test version|r of the game. To prevent it from leaking, you can ONLY play a test version when |cffff0000 + (STR_Tester + (|r is in the game with you. You can try give |cffff0000 + (STR_Tester + |r a whisper on Battle.net if you want to try to get a public version of the map.))))
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(String((Name of (Picked player))) as Lower case) Equal to (String(STR_Tester) as Lower case)
Then - Actions
Set BOOL_TesterInGame = True
Else - Actions
Do Nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BOOL_TesterInGame Equal to False
Then - Actions
Unit - Pause all units
Wait 5.00 seconds
Game - Display to (All players) for 20.00 seconds the text: ============================================================
Game - Display to (All players) for 20.00 seconds the text: (|cffff0000 + (STR_Tester + |r was not found in game.))
Game - Display to (All players) for 20.00 seconds the text: Game ending in |cff0000ff15|r seconds....
Wait 15.00 seconds
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Game - Defeat (Picked player) with the message: Bye!
Else - Actions
Do Nothing
CreateQuest
Events
Player - Player 1 (Red) types a chat message containing CQ as A substring
Conditions
(Substring((Entered chat string), 1, 2)) Equal to CQ
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
QuestAvailable[(Integer((Substring((Entered chat string), 3, 3))))] Equal to taken
Then - Actions
Game - Display to (Player group((Triggering player))) the text: Sorry, but that que...
Skip remaining actions
Else - Actions
Set QuestAvailable[(Integer((Substring((Entered chat string), 3, 3))))] = taken
Quest - Create a Required quest titled (Substring((Entered chat string), 5, (Length of (Entered chat string)))) with the description <Empty String>, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Set Quest[(Integer((Substring((Entered chat string), 3, 3))))] = (Last created quest)
QuestDescription
Events
Player - Player 1 (Red) types a chat message containing CD as A substring
Conditions
(Substring((Entered chat string), 1, 2)) Equal to CD
Actions
Quest - Change the description of Quest[(Integer((Substring((Entered chat string), 3, 3))))] to (Substring((Entered chat string), 5, (Length of (Entered chat string))))
Set QuestScription[(Integer((Substring((Entered chat string), 3, 3))))] = (Substring((Entered chat string), 5, (Length of (Entered chat string))))
AddtoQuest
Events
Player - Player 1 (Red) types a chat message containing AD as A substring
Conditions
(Substring((Entered chat string), 1, 2)) Equal to AD
Actions
Set QuestScription[(Integer((Substring((Entered chat string), 3, 3))))] = (QuestScription[(Integer((Substring((Entered chat string), 3, 3))))] + (Substring((Entered chat string), 5, (Length of (Entered chat string)))))
Quest - Change the description of Quest[(Integer((Substring((Entered chat string), 3, 3))))] to QuestScription[(Integer((Substring((Entered chat string), 3, 3))))]
DeleteQuest
Events
Player - Player 1 (Red) types a chat message containing DQ as A substring
Conditions
(Substring((Entered chat string), 1, 2)) Equal to DQ
Actions
Quest - Destroy Quest[(Integer((Substring((Entered chat string), 3, 3))))]
Set QuestAvailable[(Integer((Substring((Entered chat string), 3, 3))))] = <Empty String>
[B][U]Kick Function[/U]-[/B]
[B]Events-[/B]
Player 1 (Red) types a chat message containing -kick as A substring
[I]*Repeat for all player slots available in-game.*[/I]
[B]Condition-[/B]
((Name of (Triggering player)) equal to [U][I]TimmyTonks[/I][/U])
[B]Action-[/B]
If ((Substring((Entered chat string), 7, 8)) Equal to [B][U]1[/U][/B]) then do (Game- Defeat Player 1 (Red) with the message: You have been kicked...) else do (Do nothing)
[I]*Repeat this procedure for Blue to Brown. The function would be -kick 1 to kick red, -kick 2 to kick blue, -kick 3 for teal, and so on. The number after "If ((Substring((Entered chat string), 7, 8)) Equal to" is the number you would type to kick a player, so if you put a 2 in that spot, you would make it then do (Game- Defeat Player 2 (Blue)... Got it? Good. :)*[/I]
[B][U]Red Kick Function[/U][/B]-
[B]Events-[/B]
Player 1 (Red) types a chat message containing -kick as A substring
[I]*Do NOT repeat for all players this time.*[/I]
[B]Conditions-[/B]
((Name of (Player 1 (Red))) Not equal to [U]TimmyTonks[/U])
[I]*Repeat for all players. NOTE: ONLY put this condition IF you want it so Red cannot kick while you are in the game. This will make it so that Red's kick function will not work at all, but you will still be able to kick.*[/I]
[B]Actions-[/B]
If ((Substring((Entered chat string), 7, 8)) Equal to 1) then do (Game- Defeat Player 1 (Red) with the message: You have been kicked...) else do (Do nothing)
[B]Event-[/B]
Time- Every [U]5.00[/U] seconds of game time
[B]Condition-[/B]
(Player 1 (Red) slot status) Equal to Has left the game
[B]Action-[/B]
Trigger- Turn off (This trigger)
Set [I]Player_Gold[/I] = (Player 1 (Red) Current Gold)
Set [I]Players[/I] = (Number of players in (All players matching (((Matching player) slot status) Equal to Is playing)))
Player Group- Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Player- (Add [I]Player_Gold[/I] / [I]Players[/I]) to (Picked player) Current Gold)
function PlaySoundForPlayer takes player WhichPlayer, sound WhichSound returns nothing
if ( GetLocalPlayer() == WhichPlayer ) then
call PlaySoundBJ( WhichSound )
endif
endfunction
Play Sound For Player
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Play Sound For Player
Actions
Set TmpSound = Credits <gen>
Set TmpPlayer = (Owner of (Triggering unit))
Custom script: call PlaySoundForPlayer( udg_TmpPlayer, udg_TmpSound )
function PlaySoundForPlayerAtLoc takes player WhichPlayer, sound WhichSound, location WhichLocation, real Volume returns nothing
local real x = GetLocationX(WhichLocation)
local real y = GetLocationY(WhichLocation)
if ( GetLocalPlayer() == WhichPlayer ) then
call SetSoundPosition( WhichSound, x, y, 0.00 )
call SetSoundVolumeBJ( WhichSound, Volume )
call PlaySoundBJ(WhichSound)
endif
endfunction
Play Sound For Player At Loc
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Play Sound For Player At Loc
Actions
Set TmpSound = Credits <gen>
Set TmpPlayer = (Owner of (Triggering unit))
Set TmpPoint = (Position of (Triggering unit))
Custom script: call PlaySoundForPlayerAtLoc( udg_TmpPlayer, udg_TmpSound, udg_TmpPoint, 100.00 )
function PlaySoundForPlayerOnUnit takes player WhichPlayer, sound WhichSound, unit WhichUnit, real Volume returns nothing
if ( GetLocalPlayer() == WhichPlayer ) then
call AttachSoundToUnit( WhichSound, WhichUnit )
call SetSoundVolumeBJ( WhichSound, Volume )
call PlaySoundBJ(WhichSound)
endif
endfunction
Play Sound For Player On Unit
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Play Sound For Player On Unit
Actions
Set TmpSound = Credits <gen>
Set TmpUnit = (Triggering unit)
Set TmpPlayer = (Owner of TmpUnit)
Custom script: call PlaySoundForPlayerOnUnit( udg_TmpPlayer, udg_TmpSound, udg_TmpUnit, 100.00 )
//**************************
// JASS KeyisDown
// BlueSin with help from Pyrogasm
//**************************
globals
trigger gg_trg_KeyDetect
boolean array KeyDown
integer left = 0
integer right = 1
integer down = 2
integer up = 3
endglobals
function KeyisDown takes integer key, integer pnum returns boolean
return KeyDown[4*pnum+key]
endfunction
function KeyDetect takes nothing returns boolean
local eventid Event = GetTriggerEventId()
if Event == EVENT_PLAYER_ARROW_RIGHT_DOWN then
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+right]=true
elseif Event == EVENT_PLAYER_ARROW_RIGHT_UP
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+right]=false
elseif Event == EVENT_PLAYER_ARROW_LEFT_DOWN
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+left]=true
elseif Event == EVENT_PLAYER_ARROW_LEFT_UP
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+left]=false
elseif Event == EVENT_PLAYER_ARROW_DOWN_DOWN
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+down]=true
elseif Event == EVENT_PLAYER_ARROW_DOWN_UP
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+down]=false
elseif Event == EVENT_PLAYER_ARROW_UP_DOWN
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+up]=true
elseif Event == EVENT_PLAYER_ARROW_UP_UP
set KeyDown[4*GetPlayerId(GetTriggerPlayer())+up]=false
endif
set Event = null
return false
endfunction
function InitTrig_KeyDetect takes nothing returns nothing
local integer i = 0
set gg_trg_KeyDetect = CreateTrigger( )
loop
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_RIGHT_DOWN )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_RIGHT_UP )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_LEFT_DOWN )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_LEFT_UP )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_DOWN_DOWN )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_DOWN_UP )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_UP_DOWN )
call TriggerRegisterPlayerEvent( gg_trg_KeyDetect, Player(i), EVENT_PLAYER_ARROW_UP_UP )
set i = i +1
exitwhen i > 11
endloop
call TriggerAddCondition( gg_trg_KeyDetect, function KeyDetect )
endfunction
if KeyisDown(left, 0) then
//do stuff, like move something left
endif