- Joined
- Jun 20, 2017
- Messages
- 380
Asking for help to fixing triggers...+Rep
Just see the latest post in the thread to solve the problem.
Just see the latest post in the thread to solve the problem.
Last edited:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

AFK

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Set Integer_AFK = ((Player number of (Triggering player)) + (Player number of (Triggering player)))


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






Boolean_AFK Equal to True





Then - Actions






Set Integer_AFK = ((Player number of (Triggering player)) + (Player number of (Triggering player)))






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








Integer_AFK Equal to 29







Then - Actions








Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + is now afk.)








Multiboard - Set the text for Multiboard[(Integer B)] item in column 2, row (Integer_RowPlayers[(Player number of (Picked player))] + 2) to (((String(Integer_TimeHour)) + :) + (((String(Integer_TimeMinutes)) + :) + ((String(Integer_TimeSeconds)) + |r)))







Else - Actions





Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




Integer_AFK Equal to 30



Then - Actions




Trigger - Turn off (This trigger)



Else - Actions
Change

Events


Unit - A unit Acquires an item

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Item-type of (Item carried by (Hero manipulating item) of type 1 of 4 Key)) Equal to 1 of 4 Key




(Item-type of (Item carried by (Hero manipulating item) of type 2 of 4 Key)) Equal to 2 of 4 Key




(Item-type of (Item carried by (Hero manipulating item) of type 3 of 4 Key)) Equal to 3 of 4 Key




(Item-type of (Item carried by (Hero manipulating item) of type 4 of 4 Key)) Equal to 4 of 4 Key



Then - Actions




Item - Remove (Item carried by (Hero manipulating item) of type 1 of 4 Key)




Item - Remove (Item carried by (Hero manipulating item) of type 2 of 4 Key)




Item - Remove (Item carried by (Hero manipulating item) of type 3 of 4 Key)




Item - Remove (Item carried by (Hero manipulating item) of type 4 of 4 Key)




Unit - Replace (Triggering unit) with a Arthas using The old unit's relative life and mana




Special Effect - Create a special effect at (Position of (Hero manipulating item)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl



Else - Actions
Kick

Events


Player - Player 1 (Red) types a chat message containing -kick as An exact match


Player - Player 1 (Red) types a chat message containing -yes as An exact match

Conditions


Boolean_Kick[(Player number of (Triggering player))] Equal to False

Actions


Set Boolean_Kick[(Player number of (Triggering player))] = True


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Entered chat string) Equal to -yes



Then - Actions




Set Integer_KickYes = (Integer_KickYes + 1)




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + you already have voted.)



Else - Actions
Infernal Upgrades

Events


Unit - A unit Finishes an upgrade

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of (Triggering unit)) Equal to Infernal



Then - Actions




Unit - Replace (Triggering unit) with a Ranged Infernal using The old unit's relative life and mana




Unit - Replace (Triggering unit) with a Frozen Infernal using The old unit's relative life and mana



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of (Triggering unit)) Equal to Ranged Infernal



Then - Actions




Unit - Replace (Triggering unit) with a Corrupted Infernal using The old unit's relative life and mana




Unit - Replace (Triggering unit) with a Frozen Infernal using The old unit's relative life and mana



Else - Actions
Because you don't have an upgrade, but an ability that does it, the event should be "a unit starts an effect of ability" and then have a condition to detect which ability was used.
Infernal Upgrades

Events


Unit - A unit Starts the effect of an ability

Conditions


Or - Any (Conditions) are true



Conditions




(Unit-type of (Triggering unit)) Equal to Infernal




(Unit-type of (Triggering unit)) Equal to Ranged Infernal

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of (Triggering unit)) Equal to Infernal



Then - Actions




Unit - Replace (Triggering unit) with a Ranged Infernal using The old unit's relative life and mana



Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Unit-type of (Triggering unit)) Equal to Infernal





Then - Actions






Unit - Replace (Triggering unit) with a Frozen Infernal using The old unit's relative life and mana





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Unit-type of (Triggering unit)) Equal to Ranged Infernal







Then - Actions








Unit - Replace (Triggering unit) with a Corrupted Infernal using The old unit's relative life and mana







Else - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(Unit-type of (Triggering unit)) Equal to Ranged Infernal









Then - Actions










Unit - Replace (Triggering unit) with a Frozen Infernal using The old unit's relative life and mana









Else - Actions
Could you create new threads for new problems, and possibly attach a demo with what your exact goal is?
globals
constant integer Base_x_Index = 0
constant integer Base_y_Index = 1
constant integer Main_Timer_Index = 2
constant integer Player_Index = 3
constant integer Unit_1_Index = 4
constant integer Unit_Phase_1_Index = 5
constant integer Unit_2_Index = 6
constant integer Unit_Phase_2_Index = 7
constant integer Unit_3_Index = 8
constant integer Unit_Phase_3_Index = 9
constant integer Unit_4_Index = 10
constant integer Unit_Phase_4_Index = 11
constant integer Unit_5_Index = 12
constant integer Unit_Phase_5_Index = 13
constant integer Unit_6_Index = 14
constant integer Unit_Phase_6_Index = 15
constant integer Unit_7_Index = 16
constant integer Unit_Phase_7_Index = 17
constant integer Unit_8_Index = 18
constant integer Unit_Phase_8_Index = 19
constant integer Unit_Range_Index = 20
constant integer Unit_Slow_T_Index = 21
constant integer Unit_Phase_9_Index = 22
constant integer Unit_9_Index = 23
constant integer Unit_Phase_10_Index = 24
constant integer Unit_10_Index = 25
constant integer Unit_Phase_11_Index = 26
constant integer Unit_11_Index = 27
constant integer Unit_Phase_12_Index = 28
constant integer Unit_12_Index = 29
constant integer MAX_RC_ALLOWED = 3
integer array StartedRC
real MapMinX = 0.
real MapMinY = 0.
real MapMaxX = 0.
real MapMaxY = 0.
endglobals
struct CheckerPoint {
integer Base_X
integer Base_Y
}
function SafeX takes real x returns real
if MapMinX < x && x < MapMaxX
return x
elseif MapMinX > x
return MapMinX
elseif x > MapMaxX
return MapMaxX
endif
return x
endfunction
function SafeY takes real y returns real
if MapMinY < y && y < MapMaxY
return y
elseif MapMinY > y
return MapMinY
elseif y > MapMaxY
return MapMaxY
endif
return y
endfunction
function Trig_RangeChecker_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A034'
endfunction
function Move1stStage takes nothing returns nothing
local timer tm = GetExpiredTimer()
local integer Handle = LoadInteger(Main_Hash, GetHandleId(tm), 0)
local real Range = LoadReal(Main_Hash, Handle, Unit_Range_Index)
local real x0 = LoadReal(Main_Hash, Handle, Base_x_Index)
local real y0 = LoadReal(Main_Hash, Handle, Base_y_Index)
local real Timer = LoadReal(Main_Hash, Handle, Main_Timer_Index)
local real Slow_T = LoadReal(Main_Hash, Handle, Unit_Slow_T_Index)
local real x_temp = 0.
local real y_temp = 0.
local real Length = 0.
local unit u = LoadUnitHandle(Main_Hash, Handle, Unit_1_Index)
local real Phase = LoadReal(Main_Hash, Handle, Unit_Phase_1_Index)
local real PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
Length = Timer*Range/4 // _____ __ ____ __ _______ _______
if Length >= Range
Length = Range
endif
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) - 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_2_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_2_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_3_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_3_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) - 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_4_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_4_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_5_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_5_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) - 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_6_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_6_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_7_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_7_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) - 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_8_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_8_Index)
PhaseForSin = Timer*360./4 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_9_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_9_Index)
PhaseForSin = Timer*360./8 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
//y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
y_temp = y0
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_10_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_10_Index)
PhaseForSin = Timer*360./8 + Phase // ____________ ________ __ _______ ___ 360 ________
x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
//y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
y_temp = y0
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_11_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_11_Index)
PhaseForSin = Timer*360./8 + Phase // ____________ ________ __ _______ ___ 360 ________
//x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
x_temp = x0
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
u = LoadUnitHandle(Main_Hash, Handle, Unit_12_Index)
Phase = LoadReal(Main_Hash, Handle, Unit_Phase_12_Index)
PhaseForSin = Timer*360./8 + Phase // ____________ ________ __ _______ ___ 360 ________
//x_temp = x0 + Length * Cos(bj_DEGTORAD*PhaseForSin)
x_temp = x0
y_temp = y0 + Length * Sin(bj_DEGTORAD*PhaseForSin)
SetUnitX(u, SafeX(x_temp))
SetUnitY(u, SafeY(y_temp))
SetUnitFacing(u, GetUnitFacing(u) + 5)
if Timer <= 8.00
Timer = Timer + 0.02
TimerStart(tm, 0.02, false, function Move1stStage)
elseif Timer <= 12.00
Slow_T = Slow_T - 0.0001
if Slow_T >= 0
Timer = Timer + Slow_T
TimerStart(tm, 0.02, false, function Move1stStage)
else
if HaveSavedHandle(Main_Hash, Handle, Unit_1_Index) // ____ ________ ____________ -1
StartedRC[GetPlayerId(GetOwningPlayer(LoadUnitHandle(Main_Hash, Handle, Unit_1_Index)))] = StartedRC[GetPlayerId(GetOwningPlayer(LoadUnitHandle(Main_Hash, Handle, Unit_1_Index)))] - 1
endif
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_1_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_2_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_3_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_4_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_5_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_6_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_7_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_8_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_9_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_10_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_11_Index))
KillUnit(LoadUnitHandle(Main_Hash, Handle, Unit_12_Index))
FlushChildHashtable(Main_Hash, Handle)
FlushChildHashtable(Main_Hash, GetHandleId(tm))
DestroyTimer(tm)
tm = null
endif
endif
SaveReal(Main_Hash, Handle, Main_Timer_Index,Timer)
SaveReal(Main_Hash, Handle, Unit_Slow_T_Index,Slow_T)
u = null
endfunction
function MoveChecker takes integer Handle returns nothing
local real x0 = LoadReal(Main_Hash, Handle, Base_x_Index)
local real y0 = LoadReal(Main_Hash, Handle, Base_y_Index)
local real Timer = LoadReal(Main_Hash, Handle, Main_Timer_Index)
local integer PId = LoadInteger(Main_Hash, Handle, Player_Index)
local timer tm = CreateTimer()
Timer = Timer + 0.02
SaveReal(Main_Hash, Handle, Main_Timer_Index,Timer)
if Timer <= 0.01 // ______ _______ _______
SaveUnitHandle(Main_Hash, Handle, Unit_1_Index, CreateUnit(Player(PId), 'h01J', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_1_Index, 0.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_1_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_2_Index, CreateUnit(Player(PId), 'h01K', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_2_Index, 45.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_2_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_3_Index, CreateUnit(Player(PId), 'h01L', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_3_Index, 90.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_3_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_4_Index, CreateUnit(Player(PId), 'h01M', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_4_Index, 135.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_4_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_5_Index, CreateUnit(Player(PId), 'h01N', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_5_Index, 180.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_5_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_6_Index, CreateUnit(Player(PId), 'h01O', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_6_Index, 225.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_6_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_7_Index, CreateUnit(Player(PId), 'h01Q', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_7_Index, 270.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_7_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_8_Index, CreateUnit(Player(PId), 'h01P', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_8_Index, 315.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_8_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_9_Index, CreateUnit(Player(PId), 'h01N', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_9_Index, 0.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_9_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_10_Index, CreateUnit(Player(PId), 'h01N', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_10_Index, 180.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_10_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_11_Index, CreateUnit(Player(PId), 'h01N', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_11_Index, 90.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_11_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
SaveUnitHandle(Main_Hash, Handle, Unit_12_Index, CreateUnit(Player(PId), 'h01N', x0, y0, 0.))
SaveReal(Main_Hash, Handle, Unit_Phase_12_Index, 270.)
//SetUnitVertexColor(LoadUnitHandle(Main_Hash, Handle, Unit_12_Index), GetRandomInt(0,255), GetRandomInt(0,255), GetRandomInt(0,255), 255)
MoveChecker(Handle)
endif
SaveInteger(Main_Hash, GetHandleId(tm), 0, Handle)
TimerStart(tm, 0.02, false, function Move1stStage)
tm = null
endfunction
function Trig_RangeChecker_Actions takes nothing returns nothing
local unit u = GetSpellAbilityUnit()
local real x0 = GetUnitX(u)
local real y0 = GetUnitY(u)
local integer Handle = GetHandleId(u)
local integer PId = GetPlayerId(GetOwningPlayer(u))
if StartedRC[PId] < MAX_RC_ALLOWED
StartedRC[PId] = StartedRC[PId] + 1
SaveReal(Main_Hash, Handle, Base_x_Index, x0)
SaveReal(Main_Hash, Handle, Base_y_Index, y0)
SaveReal(Main_Hash, Handle, Main_Timer_Index, -0.02)
SaveReal(Main_Hash, Handle, Unit_Slow_T_Index, 0.02)
SaveInteger(Main_Hash, Handle, Player_Index, PId)
SaveReal(Main_Hash, Handle, Unit_Range_Index, GetUnitAcquireRange(u))
MoveChecker(Handle)
else
EchoPlayer(PId, "Only " + I2S(MAX_RC_ALLOWED) + " rangecheckers allowed at once.")
endif
u = null
endfunction
function InitTrig_RangeChecker takes nothing returns nothing
set gg_trg_RangeChecker = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_RangeChecker, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_RangeChecker, Condition( function Trig_RangeChecker_Conditions ) )
call TriggerAddAction( gg_trg_RangeChecker, function Trig_RangeChecker_Actions )
endfunction
library C
function ParserCalc takes string s returns real
if s == "A" or s == "a" then
return 0.8
elseif s == "B" or s == "b" then
return 0.3
elseif s == "C" or s == "c" then
return 0.7
elseif s == "D" or s == "d" then
return 0.8
elseif s == "E" or s == "e" then
return 0.9
elseif s == "F" or s == "f" then
return 0.3
elseif s == "G" or s == "g" then
return 0.4
elseif s == "H" or s == "h" then
return 0.8
elseif s == "I" or s == "i" then
return 0.9
elseif s == "J" or s == "j" then
return 1.
elseif s == "K" or s == "k" then
return 1.1
elseif s == "L" or s == "l" then
return 1.2
elseif s == "M" or s == "m" then
return 1.3
elseif s == "N" or s == "n" then
return 1.4
elseif s == "O" or s == "o" then
return 1.5
elseif s == "P" or s == "p" then
return 1.6
elseif s == "Q" or s == "q" then
return 1.7
elseif s == "R" or s == "r" then
return 1.8
elseif s == "S" or s == "s" then
return 1.9
elseif s == "T" or s == "t" then
return 2.0
elseif s == "U" or s == "u" then
return 2.1
elseif s == "V" or s == "v" then
return 2.2
elseif s == "W" or s == "w" then
return 2.3
elseif s == "X" or s == "x" then
return 2.4
elseif s == "Y" or s == "y" then
return 2.5
elseif s == "Z" or s == "z" then
return 2.6
else
return 0.3
endif
return 0.0
endfunction
function GetPlayerColoredName takes integer i returns string
if i == 0 then
return ("|c00ff0202" + (GetPlayerName(Player(0)) + "|r"))
elseif i == 1 then
return ("|c000041ff" + (GetPlayerName(Player(1)) + "|r" ))
elseif i == 2 then
return ("|c001be5b8" + (GetPlayerName(Player(2)) + "|r" ))
elseif i == 3 then
return ("|c00530080" + (GetPlayerName(Player(3)) + "|r" ))
elseif i == 4 then
return ("|c00fffc00" + (GetPlayerName(Player(4)) + "|r" ))
elseif i == 5 then
return ("|c00fe890d" + (GetPlayerName(Player(5)) + "|r" ))
elseif i == 6 then
return ("|c001fbf00" + (GetPlayerName(Player(6)) + "|r" ))
elseif i == 7 then
return ("|c00e45aaf" + (GetPlayerName(Player(7)) + "|r" ))
elseif i == 10 then
return ("|c000f6145" + (GetPlayerName(Player(10)) + "|r" ))
elseif i == 11 then
return ("|c004d2903" + (GetPlayerName(Player(11)) + "|r" ))
endif
return null
endfunction
function EchoForce takes force toForce, real duration, string message returns nothing
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, duration, message)
endif
endfunction
function EchoAllPlayers takes real duration, string message returns nothing
if (IsPlayerInForce(GetLocalPlayer(), bj_FORCE_ALL_PLAYERS)) then
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, duration, message)
endif
endfunction
function EchoPlayer takes integer PId, string text returns nothing
DisplayTextToPlayer(Player(PId),0,0, text)
endfunction
function EchoPlayerM takes integer PId, string text returns nothing // minute edition
DisplayTimedTextToPlayer(Player(PId),0,0, 60., text)
endfunction
function ClearPlayerTextMessages takes integer PId returns nothing
if GetLocalPlayer() == Player(PId)
ClearTextMessages()
endif
endfunction
endlibrary
calls, and I see { ... } syntax in the struct definition in the code you posted? I for the life of me have no idea if Zinc needs something special installed in the WE to work or if WEX supports it naturally. At any rate, try importing library C into your map and seeing if that gets rid of the EchoPlayer errors. If you can't, then add this into your map:function EchoPlayer takes integer PId, string text returns nothing
call DisplayTextToPlayer(Player(PId),0,0, text)
endfunction
library HashLibraryWorkaround initializer init
globals
hashtable Main_Hash
endglobals
private function init takes nothing returns nothing
set Main_Hash = InitHashTable()
endfunction
endlibrary
call TriggerAddCondition( gg_trg_RangeChecker, Condition( function Trig_RangeChecker_Conditions ) ) since I don't see that condition function anywhere in your code. If you do get that error, just put // in that line just before the "call" to comment it out.Please do this.Could you create new threads for new problems
Range Checker

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to (==) Check Range

Actions


Set Loc[1] = (Position of (Triggering unit))



Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)




Loop - Actions





Set Loc[2] = (Loc[1] offset by (Current acquisition range of (Triggering unit)) towards ((Real((Integer A))) x 30.00) degrees)





Special Effect - Create a special effect at Loc[2] using Doodads\Cinematic\GlowingRunes\GlowingRunes8.mdl





Special Effect - Destroy (Last created special effect)





Custom script: call RemoveLocation(udg_Loc[2])


Custom script: call RemoveLocation(udg_Loc[1])
Trading

Events


Player - Player 1 (Red) types a chat message containing -as as A substring


Player - Player 2 (Blue) types a chat message containing -as as A substring


Player - Player 3 (Teal) types a chat message containing -as as A substring


Player - Player 4 (Purple) types a chat message containing -as as A substring


Player - Player 5 (Yellow) types a chat message containing -as as A substring


Player - Player 6 (Orange) types a chat message containing -as as A substring


Player - Player 7 (Green) types a chat message containing -as as A substring


Player - Player 8 (Pink) types a chat message containing -as as A substring


Player - Player 9 (Gray) types a chat message containing -as as A substring


Player - Player 10 (Light Blue) types a chat message containing -as as A substring


Player - Player 11 (Dark Green) types a chat message containing -as as A substring


Player - Player 12 (Brown) types a chat message containing -as as A substring

Conditions

Actions


Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)



Loop - Actions




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Substring((Entered chat string), 10, (15 + (Length of String_PlayerColors[(Integer A)])))) Equal to (==) String_PlayerColors[(Integer A)]






((Triggering player) is an ally of (Player((Integer A)))) Equal to (==) True





Then - Actions






Set Integer_Trad = (Integer((Substring((Entered chat string), (10 + (Length of String_PlayerColors[(Integer A)])), 15))))







Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)








If - Conditions









(Substring((Entered chat string), 5, 10)) Equal to (==) (Name of (Player((Integer A))))









((Triggering player) Current gold) Greater than or equal to (>=) Integer_Trad








Then - Actions









Player - Add Integer_Trad to (Player((Integer A))) Current gold









Player - Add (Integer_Trad x -1) to (Triggering player) Current gold









Game - Display to (All players) the text: (String_PlayerColors[(Integer A)] + ((|r has given + String_PlayerColors[(Integer A)]) + (|r |CFFFFFF00 + ((String(Integer_Trad)) + |r gold.))))








Else - Actions







Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)








If - Conditions









(Substring((Entered chat string), 5, 10)) Equal to (==) (Name of (Player((Integer A))))









((Triggering player) Current lumber) Greater than or equal to (>=) Integer_Trad








Then - Actions









Player - Add Integer_Trad to (Player((Integer A))) Current lumber









Player - Add (Integer_Trad x -1) to (Triggering player) Current lumber









Game - Display to (All players) the text: (String_PlayerColors[(Integer A)] + ((|r has given + String_PlayerColors[(Integer A)]) + (|r |CFF008000 + ((String(Integer_Trad)) + |r lumber.))))








Else - Actions





Else - Actions
Heroic Heartbreak

Events


Unit - A unit Acquires an item

Conditions


Multiple ConditionsOr - Any (Conditions) are true



Conditions




(Unit-type of (Hero manipulating item)) Equal to (==) Kael




(Unit-type of (Hero manipulating item)) Equal to (==) Arthas




(Unit-type of (Hero manipulating item)) Equal to (==) Maiev




(Unit-type of (Hero manipulating item)) Equal to (==) Malfurion




(Unit-type of (Hero manipulating item)) Equal to (==) Rexxar

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Item-type of (Item carried by (Hero manipulating item) of type Heroic-Heartbreak)) Equal to (==) Heroic-Heartbreak



Then - Actions




Trigger - Turn off (This trigger)




Sound - Play HumanX1 <gen>




Environment - Create at (Playable map area) the weather effect Rays Of Light




Environment - Turn (Last created weather effect) On




Visibility - Disable fog of war




Wait 15.00 seconds




Visibility - Enable fog of war




Environment - Remove (Last created weather effect)



Else - Actions




Unit - Kill (Attacked unit)
Sacrifice

Events


Unit - A unit Begins channeling an ability

Conditions


(Ability being cast) Equal to (==) Sacrifice [Undead]

Actions


Trigger - Turn off (This trigger)


Sound - Play VolcanoLoop <gen>


Cinematic - Fade out over 5.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency


Camera - Shake the camera for (Triggering player) with magnitude 25.00


Wait 7.00 seconds


Sound - Play ThunderClapCaster <gen>


Cinematic - Fade out over 1.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency


Destructible - Pick every destructible in (Playable map area) and do (Actions)



Loop - Actions




Destructible - Kill (Picked destructible)




Destructible - Remove (Picked destructible)


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)



Loop - Actions




Unit - Explode (Picked unit)




Unit - Kill (Picked unit)




Unit - Remove (Picked unit) from the game


Item - Pick every item in (Playable map area) and do (Actions)



Loop - Actions




Item - Remove (Picked item)


Wait 10.00 seconds


Visibility - Disable fog of war


Environment - Create a 10.00 second Normal ripple deformation at (Center of (Playable map area)) with starting radius 10.00, ending radius 50000.00, and depth 300.00, using 1.00 second ripples spaced 512.00 apart


Cinematic - Fade in over 10.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency


Camera - Stop swaying/shaking the camera for (Triggering player)


Game - Set the time of day to 24.00


Environment - Create Blight for (Triggering player) across (Playable map area)


Environment - Set fog to style Linear, z-start 1000.00, z-end 8000.00, density 0.90 and color (1.00%, 0.00%, 0.00%)



Do Multiple ActionsFor each (Integer B) from 1 to 3, do (Actions)




Loop - Actions





Multiboard - Set the text for Multiboard[(Integer B)] item in column 1, row (Integer_RowPlayers[(Player number of (Triggering player))] + 2) to (String_PlayerColors[(Player number of (Triggering player))] + (Dead)|r)


Game - Display to (All players) the text: The vampires were v...


Sound - Play PH1 <gen>


Wait 60.00 seconds


Player Group - Pick every player in PlayerGroup_Vampires and do (Actions)



Loop - Actions




Game - Victory (Picked player) (Show dialogs, Show scores)


Player Group - Pick every player in PlayerGroup_Humans and do (Actions)



Loop - Actions




Game - Defeat (Picked player) with the message: Defeat!


Sacrifice

Events


Unit - A unit Begins channeling an ability

Conditions


(Ability being cast) Equal to (==) Sacrifice [Undead]

Actions


Trigger - Turn off (This trigger)


Sound - Play VolcanoLoop <gen>


Cinematic - Fade out over 5.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency


Camera - Shake the camera for (Triggering player) with magnitude 25.00


Wait 7.00 seconds


Sound - Play ThunderClapCaster <gen>


Cinematic - Fade out over 1.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency


Destructible - Pick every destructible in (Playable map area) and do (Actions)



Loop - Actions




Destructible - Kill (Picked destructible)




Destructible - Remove (Picked destructible)


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)



Loop - Actions




Unit - Explode (Picked unit)




Unit - Kill (Picked unit)




Unit - Remove (Picked unit) from the game


Item - Pick every item in (Playable map area) and do (Actions)



Loop - Actions




Item - Remove (Picked item)


Wait 10.00 seconds


Visibility - Disable fog of war


Environment - Create a 10.00 second Normal ripple deformation at (Center of (Playable map area)) with starting radius 10.00, ending radius 50000.00, and depth 300.00, using 1.00 second ripples spaced 512.00 apart


Cinematic - Fade in over 10.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency


Camera - Stop swaying/shaking the camera for (Triggering player)


Game - Set the time of day to 24.00


Environment - Create Blight for (Triggering player) across (Playable map area)


Environment - Set fog to style Linear, z-start 1000.00, z-end 8000.00, density 0.90 and color (1.00%, 0.00%, 0.00%)



Do Multiple ActionsFor each (Integer B) from 1 to 3, do (Actions)




Loop - Actions





Multiboard - Set the text for Multiboard[(Integer B)] item in column 1, row (Integer_RowPlayers[(Player number of (Triggering player))] + 2) to (String_PlayerColors[(Player number of (Triggering player))] + (Dead)|r)


Game - Display to (All players) the text: The vampires were v...


Sound - Play PH1 <gen>


Wait 60.00 seconds


Player Group - Pick every player in PlayerGroup_Vampires and do (Actions)



Loop - Actions




Game - Victory (Picked player) (Show dialogs, Show scores)


Player Group - Pick every player in PlayerGroup_Humans and do (Actions)



Loop - Actions




Game - Defeat (Picked player) with the message: Defeat!
Shop Pages

Events


Unit - A unit Starts the effect of an ability

Conditions

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of (Triggering unit)) Equal to (==) Vampires Research Center



Then - Actions




Unit - Replace (Triggering unit) with a Vampires Research Center (2) using The old unit's relative life and mana



Else - Actions




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Unit-type of (Triggering unit)) Equal to (==) Vampires Research Center (2)





Then - Actions






Unit - Replace (Triggering unit) with a Vampires Research Center using The old unit's relative life and mana





Else - Actions
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -g as A substring


Player - Player 2 (Blue) types a chat message containing -g as A substring


Player - Player 3 (Teal) types a chat message containing -g as A substring


Player - Player 4 (Purple) types a chat message containing -g as A substring


... And so on ...

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Substring((Entered chat string), 1, 3)) Equal to -gg



Then - Actions




Set TradedPlayer = (Integer((Substring((Entered chat string), 5, 5))))




Set TradeAmount = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))




Player - Add TradeAmount to (Player(TradedPlayer)) Current gold




Custom script: call DisplayTextToForce( GetPlayersAll(), GetPlayerName(GetTriggerPlayer()) + " gave " + (I2S(udg_TradeAmount)) + " gold to " + GetPlayerName(ConvertedPlayer(udg_TradedPlayer)) )



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Substring((Entered chat string), 1, 3)) Equal to -gw



Then - Actions




Set TradedPlayer = (Integer((Substring((Entered chat string), 5, 5))))




Set TradeAmount = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))




Player - Add TradeAmount to (Player(TradedPlayer)) Current lumber




Custom script: call DisplayTextToForce( GetPlayersAll(), GetPlayerName(GetTriggerPlayer()) + " gave " + (I2S(udg_TradeAmount)) + " lumber to " + GetPlayerName(ConvertedPlayer(udg_TradedPlayer)) )



Else - Actions
Untitled Trigger 002

Events


Unit - A unit Is attacked

Conditions

Actions


For each (Integer A) from 1 to 6, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Item-type of (Item carried by (Attacking unit) in slot (Integer A))) Equal to [Your item]





Then - Actions






Unit - Kill (Attacked unit)






-------- or --------






Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real((Max HP of (Attacked unit)))) damage of attack type Chaos and damage type Universal





Else - Actions
Trading

Events


Player - Player 1 (Red) types a chat message containing -g as A substring


Player - Player 2 (Blue) types a chat message containing -g as A substring


Player - Player 3 (Teal) types a chat message containing -g as A substring


Player - Player 4 (Purple) types a chat message containing -g as A substring


Player - Player 5 (Yellow) types a chat message containing -g as A substring


Player - Player 6 (Orange) types a chat message containing -g as A substring


Player - Player 7 (Green) types a chat message containing -g as A substring


Player - Player 8 (Pink) types a chat message containing -g as A substring


Player - Player 9 (Gray) types a chat message containing -g as A substring


Player - Player 10 (Light Blue) types a chat message containing -g as A substring


Player - Player 11 (Dark Green) types a chat message containing -g as A substring


Player - Player 12 (Brown) types a chat message containing -g as A substring

Conditions

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Substring((Entered chat string), 1, 3)) Equal to (==) -gg



Then - Actions




Set Integer_TradePlayer = (Integer((Substring((Entered chat string), 5, 5))))




Set Integer_TradeAmount = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))




Player - Add Integer_TradeAmount to (Player(Integer_TradePlayer)) Current gold




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + ((|r has given + String_PlayerColors[Integer_TradePlayer]) + (|r |CFFFFFF00 + ((String(Integer_TradeAmount)) + |r gold.))))



Else - Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Substring((Entered chat string), 1, 3)) Equal to (==) -gw



Then - Actions




Set Integer_TradePlayer = (Integer((Substring((Entered chat string), 5, 5))))




Set Integer_TradeAmount = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))




Player - Add Integer_TradeAmount to (Player(Integer_TradePlayer)) Current lumber




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + ((|r has given + String_PlayerColors[Integer_TradePlayer]) + (|r |CFF008000 + ((String(Integer_TradeAmount)) + |r lumber.))))



Else - Actions
Shop Pages

Events


Unit - A unit Starts the effect of an ability

Conditions

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of (Triggering unit)) Equal to (==) Vampires Research Center



Then - Actions




Unit - Replace (Triggering unit) with a Vampires Research Center (2) using The old unit's relative life and mana




Selection - Select (Triggering unit) for (Triggering player)



Else - Actions




Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Unit-type of (Triggering unit)) Equal to (==) Vampires Research Center (2)





Then - Actions






Unit - Replace (Triggering unit) with a Vampires Research Center using The old unit's relative life and mana






Selection - Select (Triggering unit) for (Triggering player)





Else - Actions
Heroic Heartbreak

Events


Unit - A unit Acquires an item

Conditions

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Item-type of (Item carried by (Hero manipulating item) of type Heroic-Heartbreak)) Equal to (==) Heroic-Heartbreak



Then - Actions




Trigger - Turn off (This trigger)




Sound - Play DarkVictory <gen>




Environment - Create at (Playable map area) the weather effect Rays Of Light




Environment - Turn (Last created weather effect) On




Visibility - Disable fog of war




Wait 15.00 seconds




Visibility - Enable fog of war




Environment - Remove (Last created weather effect)



Else - Actions
Attack Heroic Heartbreak

Events


Unit - A unit Is attacked

Conditions


Multiple ConditionsOr - Any (Conditions) are true



Conditions




(Unit-type of (Attacking unit)) Equal to (==) Kael




(Unit-type of (Attacking unit)) Equal to (==) Arthas




(Unit-type of (Attacking unit)) Equal to (==) Maiev




(Unit-type of (Attacking unit)) Equal to (==) Malfurion




(Unit-type of (Attacking unit)) Equal to (==) Rexxar

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Item-type of (Item carried by (Attacking unit) of type Heroic-Heartbreak)) Equal to (==) Heroic-Heartbreak



Then - Actions




Trigger - Turn on Heroic Heartbreak <gen>




Unit - Kill (Attacked unit)



Else - Actions
Cant Attack Ally

Events


Unit - A unit Is attacked

Conditions


((Attacked unit) is An Ancient) Equal to (==) True


((Attacked unit) belongs to an ally of (Owner of (Attacking unit))) Equal to (==) True

Actions


Unit - Order (Attacking unit) to Stop
Trading

Events


Player - Player 1 (Red) types a chat message containing -g as A substring


Player - Player 2 (Blue) types a chat message containing -g as A substring


Player - Player 3 (Teal) types a chat message containing -g as A substring


Player - Player 4 (Purple) types a chat message containing -g as A substring


Player - Player 5 (Yellow) types a chat message containing -g as A substring


Player - Player 6 (Orange) types a chat message containing -g as A substring


Player - Player 7 (Green) types a chat message containing -g as A substring


Player - Player 8 (Pink) types a chat message containing -g as A substring


Player - Player 9 (Gray) types a chat message containing -g as A substring


Player - Player 10 (Light Blue) types a chat message containing -g as A substring


Player - Player 11 (Dark Green) types a chat message containing -g as A substring


Player - Player 12 (Brown) types a chat message containing -g as A substring

Conditions

Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Substring((Entered chat string), 1, 3)) Equal to (==) -gg




((Triggering player) is an ally of (Triggering player)) Equal to (==) True



Then - Actions




Set Integer_TradePlayer = (Integer((Substring((Entered chat string), 5, 6))))




Set Integer_TradeAmount = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))




If (((Triggering player) Current gold) Greater than or equal to (>=) Integer_TradeAmount) then do (Set Integer_TradeAmount = 0) else do (Do nothing)




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + not enough resources.)




Player - Add Integer_TradeAmount to (Player(Integer_TradePlayer)) Current gold




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + ((|r has given + String_PlayerColors[Integer_TradePlayer]) + (|r |CFFFFFF00 + ((String(Integer_TradeAmount)) + |r gold.))))



Else - Actions


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Substring((Entered chat string), 1, 3)) Equal to (==) -gw



Then - Actions




Set Integer_TradePlayer = (Integer((Substring((Entered chat string), 5, 6))))




Set Integer_TradeAmount = (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))




If (((Triggering player) Current gold) Greater than or equal to (>=) Integer_TradeAmount) then do (Set Integer_TradeAmount = 0) else do (Do nothing)




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + not enough resources.)




Player - Add Integer_TradeAmount to (Player(Integer_TradePlayer)) Current lumber




Game - Display to (All players) the text: (String_PlayerColors[(Player number of (Triggering player))] + ((|r has given + String_PlayerColors[Integer_TradePlayer]) + (|r |CFF008000 + ((String(Integer_TradeAmount)) + |r lumber.))))



Else - Actions
