//+-----------+
//| |
//| Quest API |
//| by seiken |
//| ver 1.3 |
//| |
//+-----------+
//+-------------------------------------+
//| |
//| Global variables |
//| |
//| Name Type |
//| |
//| Quests_Forces Player Group Array |
//| Quests_Ids String Array |
//| Quests_Names String Array |
//| Quests_Num Integer |
//| Quests_Quests Quest Array |
//| |
//+-------------------------------------+
//+-------------------------------------------------------------------------------+
//| |
//| Notes |
//| |
//| Copy and paste this code to the custom script section of your map to use it. |
//| Call the functions from GUI using the trigger action "custom script". A call |
//| might take the form |
//| call QuestDestroy(Player(0), "generic example quest id") |
//| |
//| The API supports two forms of quest, "solo" and "shared" types. Solo quests |
//| use the regular functions. Shared quests apply to more than one player, and |
//| you should use the "Force"-prefixed functions that take forces rather than |
//| players. A shared quest does not mean that each player in the force recieves |
//| an instance of the quest (to accomplish this, just use multiple solo quests). |
//| rather, the quest is shared between the players - if one player completes it, |
//| all do. |
//| |
//+-------------------------------------------------------------------------------+
//+--------------------------------------------------------------------------------------------------------------------------+
//| |
//| Functions |
//| |
//| void QuestInit(player whichplayer, string questid, string name, string description, string icon, boolean required) |
//| void ForceQuestInit(force playergroup, string questid, string name, string description, string icon, boolean required) |
//| Creates a quest for a specific player. Questid is the id you will use later to refer to this quest. Different players or |
//| player groups who are given the same quest can use the same quest id, the quests will remain independent. |
//| ReplaceableTextures\CommandButtons\ is automatically added to the icon path. Just supply "BTNCheese.blp", for example. |
//| If the quest/player combination already exists, no action is taken. The player(s) will be notified that they have a new |
//| quest. |
//| |
//| void QuestComplete(player whichplayer, string questid) |
//| void ForceQuestComplete(force playergroup, string questid) |
//| Marks a specific quest as completed. Pass the player who has completed the quest, and the id that was used on quest |
//| creation. The player(s) will be notified that they have completed the quest. If the quest does not exist, no action will |
//| be taken. |
//| |
//| void QuestFail(player whichplayer, string questid) |
//| void ForceQuestFail(force playergroup, string questid) |
//| Similar to QuestComplete, but fails the quest rather than creates it. The player(s) will be notified that they have |
//| failed the quest. If the quest does not exist, no action will be taken. |
//| |
//| void QuestDestroy(player whichplayer, string questid) |
//| void ForceQuestDestroy(force playergroup, string questid) |
//| Removes the quest from the player(s)' quest log. Quests that are completed or failed will not be removed from the quest |
//| log until they have been destroyed. If the quest does not exist, no action will be taken. |
//| |
//| integer QuestRetrieveNum(player whichplayer, string questid) |
//| integer ForceQuestRetrieveNum(force playergroup, string questid) |
//| Returns the index of a specific quest instance, used throughout the four quest data arrays. Can be used to access the |
//| quest data directly. If the quest does not exist, the Quest_Num variable will be returned. |
//| |
//| boolean QuestIdExists(string questid) |
//| boolean QuestPlayerExists(player whichplayer) |
//| boolean QuestPlayerIdExists(player whichplayer, string questid) |
//| boolean QuestForceExists(force playergroup) |
//| boolean QuestForceIdExists(force playergroup, string questid) |
//| These functions check whether quests matching specific criteria are met. Respectively: Whether any quests using a given |
//| id exist, whether a given player is involved in any quest (be it solo or shared), whether a given player is involved in |
//| a quest with a given id, whether a shared quest exists for a given player group, and whether a shared quest exists for |
//| a given player group using a given id. |
//| |
//| void QuestClear(void) |
//| Destroys all quests and clears all quest memory. Use just before the map exits to reduce the waiting time on map exit. |
//| |
//+--------------------------------------------------------------------------------------------------------------------------+
function QuestIdExists takes string id returns boolean
local integer i = 0
loop
exitwhen i == udg_Quests_Num
if udg_Quests_Ids[i] == id then
set i = 0
set id = null
return true
endif
set i = i + 1
endloop
set i = 0
set id = null
return false
endfunction
function QuestPlayerExists takes player p returns boolean
local integer i = 0
loop
exitwhen i == udg_Quests_Num
if IsPlayerInForce(p, udg_Quests_Forces[i]) then
set i = 0
set p = null
return true
endif
set i = i + 1
endloop
set i = 0
set p = null
return false
endfunction
function QuestPlayerIdExists takes player p, string id returns boolean
local integer i = 0
loop
exitwhen i == udg_Quests_Num
if IsPlayerInForce(p, udg_Quests_Forces[i]) and udg_Quests_Ids[i] == id then
set i = 0
set p = null
set id = null
return true
endif
set i = i + 1
endloop
set i = 0
set p = null
set id = null
return false
endfunction
// using force == force only compares the pointers!
function AreForcesEqual_PlayerLoop takes nothing returns nothing
if IsPlayerInForce(GetEnumPlayer(), udg_Quests_Forces[udg_Quests_Num]) == false then
set bj_makeUnitRescuableFlag = false
endif
endfunction
function AreForcesEqual takes force a, force b returns boolean
if CountPlayersInForceBJ(a) != CountPlayersInForceBJ(b) then
return false
endif
set bj_makeUnitRescuableFlag = true
set udg_Quests_Forces[udg_Quests_Num] = b
call ForForce(a, function AreForcesEqual_PlayerLoop)
set a = null
set b = null
return bj_makeUnitRescuableFlag
endfunction
function QuestForceExists takes force f returns boolean
local integer i = 0
loop
exitwhen i == udg_Quests_Num
if AreForcesEqual(udg_Quests_Forces[i], f) then
set i = 0
set f = null
return true
endif
set i = i + 1
endloop
set i = 0
set f = null
return false
endfunction
function QuestForceIdExists takes force f, string id returns boolean
local integer i = 0
loop
exitwhen i == udg_Quests_Num
if AreForcesEqual(udg_Quests_Forces[i], f) and udg_Quests_Ids[i] == id then
set i = 0
set f = null
set id = null
return true
endif
set i = i + 1
endloop
set i = 0
set f = null
set id = null
return false
endfunction
function ForceQuestRetrieveNum takes force f, string id returns integer
local integer i = 0
local integer q = 0
loop
exitwhen i > udg_Quests_Num
if i == udg_Quests_Num then
set i = 0
set q = 0
return udg_Quests_Num
endif
if udg_Quests_Ids[i] == id and AreForcesEqual(udg_Quests_Forces[i], f) then
set q = i
set i = udg_Quests_Num
endif
set i = i + 1
endloop
set i = 0
set f = null
return q
endfunction
function QuestRetrieveNum takes player p, string id returns integer
set p = null
set id = null
return ForceQuestRetrieveNum(GetForceOfPlayer(p), id)
endfunction
function ForceQuestInit takes force f, string id, string name, string info, string icon, boolean r returns nothing
if QuestForceIdExists(f, id) then
return
endif
call QuestMessageBJ(f, bj_QUESTMESSAGE_DISCOVERED, "A new quest has been added to your quests log: " + name)
if r == true then
call CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED, name, info, "ReplaceableTextures\\CommandButtons\\" + icon)
else
call CreateQuestBJ(bj_QUESTTYPE_OPT_DISCOVERED, name, info, "ReplaceableTextures\\CommandButtons\\" + icon)
endif
if IsPlayerInForce(GetLocalPlayer(), f) then
call QuestSetEnabledBJ(true, GetLastCreatedQuestBJ())
call FlashQuestDialogButtonBJ()
else
call QuestSetEnabledBJ(false, GetLastCreatedQuestBJ())
endif
set udg_Quests_Ids[udg_Quests_Num] = id
set udg_Quests_Forces[udg_Quests_Num] = f
set udg_Quests_Quests[udg_Quests_Num] = GetLastCreatedQuestBJ()
set udg_Quests_Names[udg_Quests_Num] = name
set udg_Quests_Num = udg_Quests_Num + 1
set id = null
set name = null
set info = null
set icon = null
set r = false
set f = null
endfunction
function QuestInit takes player p, string id, string name, string info, string icon, boolean r returns nothing
call ForceQuestInit(GetForceOfPlayer(p), id, name, info, icon, r)
set p = null
set id = null
set name = null
set info = null
set icon = null
set r = false
endfunction
function ForceQuestComplete takes force f, string id returns nothing
local integer q = ForceQuestRetrieveNum(f, id)
if (q == udg_Quests_Num) then
return
endif
call QuestMessageBJ(f, bj_QUESTMESSAGE_COMPLETED, "You have completed a quest: " + udg_Quests_Names[q])
call QuestSetCompletedBJ(udg_Quests_Quests[q], true)
if IsPlayerInForce(GetLocalPlayer(), f) then
call FlashQuestDialogButtonBJ()
endif
set q = 0
set id = null
set f = null
endfunction
function QuestComplete takes player p, string id returns nothing
call ForceQuestComplete(GetForceOfPlayer(p), id)
set p = null
set id = null
endfunction
function ForceQuestFail takes force f, string id returns nothing
local integer q = ForceQuestRetrieveNum(f, id)
if (q == udg_Quests_Num) then
return
endif
call QuestMessageBJ(f, bj_QUESTMESSAGE_FAILED, "You have failed a quest: " + udg_Quests_Names[q])
call QuestSetFailedBJ(udg_Quests_Quests[q], true)
if IsPlayerInForce(GetLocalPlayer(), f) then
call FlashQuestDialogButtonBJ()
endif
set q = 0
set id = null
set f = null
endfunction
function QuestFail takes player p, string id returns nothing
call ForceQuestFail(GetForceOfPlayer(p), id)
set p = null
endfunction
function ForceQuestDestroy takes force f, string id returns nothing
local integer q = ForceQuestRetrieveNum(f, id)
if (q == udg_Quests_Num) then
return
endif
call DestroyQuestBJ(udg_Quests_Quests[q])
call DestroyForce(udg_Quests_Forces[q])
loop
exitwhen q == udg_Quests_Num
set udg_Quests_Ids[q] = udg_Quests_Ids[q + 1]
set udg_Quests_Forces[q] = udg_Quests_Forces[q + 1]
set udg_Quests_Quests[q] = udg_Quests_Quests[q + 1]
set udg_Quests_Names[q] = udg_Quests_Names[q + 1]
set q = q + 1
endloop
set udg_Quests_Num = udg_Quests_Num - 1
set q = 0
set id = null
set f = null
endfunction
function QuestDestroy takes player p, string id returns nothing
call ForceQuestDestroy(GetForceOfPlayer(p), id)
set p = null
set id = null
endfunction
function QuestClear takes nothing returns nothing
local integer i = 0
loop
exitwhen i == udg_Quests_Num
call DestroyQuestBJ(udg_Quests_Quests[i])
call DestroyForce(udg_Quests_Forces[i])
set udg_Quests_Quests[i] = null
set udg_Quests_Forces[i] = null
set udg_Quests_Names[i] = null
set udg_Quests_Ids[i] = null
set i = i + 1
endloop
set udg_Quests_Num = 0
set i = 0
endfunction
Name | Type | is_array | initial_value |
altarhoku | group | No | |
altarnan | group | No | |
archer | integer | Yes | |
bolt | ordercode | Yes | |
Bolt | abilcode | Yes | A00D |
bombarray | item | Yes | |
bombinteger | integer | No | |
bombinteger2 | integer | No | |
CalcCaster | integer | No | |
CalcCaster0 | integer | No | |
CalcCaster1 | integer | No | |
calvary | integer | Yes | |
captain | integer | Yes | |
CineOn | boolean | No | true |
Creep0 | integer | No | |
Creep0_Copy | integer | No | |
Creep0_Copy_2 | integer | No | |
Creep0_Copy_3 | integer | No | |
Cure | abilcode | Yes | A001 |
cure | ordercode | Yes | |
Demi | abilcode | Yes | A011 |
demi | ordercode | Yes | |
f1 | texttag | No | |
f2 | texttag | No | |
f3 | texttag | No | |
f4 | texttag | No | |
fire | ordercode | Yes | |
Fire | abilcode | Yes | A00F |
footman | integer | Yes | |
GrenadeAsh | item | No | |
Haste | ordercode | Yes | |
haste | abilcode | Yes | A013 |
Hokuarmy | group | No | |
hokunewunits | group | No | |
hokupreplaced | group | No | |
i | integer | No | |
Ice | abilcode | Yes | A00B |
ice | ordercode | Yes | |
invite | unit | No | UnitNull |
invite0 | player | No | Player00 |
mathskill | unit | No | |
Mute | ordercode | Yes | |
mute | abilcode | Yes | A00X |
Nanarmy | group | No | |
nannewunits | group | No | |
nanpreplaced | group | No | |
Numberofpeopleplaying | integer | No | |
NumHumanPlayers | integer | No | |
o_O | integer | No | |
peltarray | item | Yes | |
peltinteger | integer | No | |
player | force | No | |
player0 | player | No | |
Preach | unit | No | UnitNull |
PressedEsc | boolean | Yes | |
questnumhoku | integer | No | |
questnumnan | integer | No | |
Quests_Forces | force | Yes | |
Quests_Ids | string | Yes | |
Quests_Names | string | Yes | |
Quests_Num | integer | No | |
Quests_Quests | quest | Yes | |
Random | integer | No | |
randomitem | integer | No | |
secondqueston | boolean | No | true |
SkipCinematic | boolean | No | |
SkipVotePercentageRequired | integer | No | 51 |
Sleep | ordercode | Yes | |
sleep | abilcode | Yes | A00W |
Slow | ordercode | Yes | |
slow | abilcode | Yes | A010 |
Squire2 | integer | No | |
Squire3 | integer | No | 0 |
Squire4 | integer | No | 0 |
Squire5 | integer | No | 0 |
Squire6 | integer | No | 0 |
Squire7 | integer | No | 0 |
Squire8 | integer | No | 0 |
String | string | Yes | |
swordsman | integer | Yes | |
tempbool | boolean | No | |
TempPlayerGroup | force | No | |
tempstring | string | No | |
TempString | string | No | |
tempstring0 | string | No | |
tempstring1 | string | No | |
tempstring2 | string | No | |
Theifs2 | group | No | |
Thiefs | group | No | |
VotesToSkip | integer | No |
function Trig_footnan_Func001C takes nothing returns boolean
if ( not ( udg_footman[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func002C takes nothing returns boolean
if ( not ( udg_footman[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func003C takes nothing returns boolean
if ( not ( udg_footman[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func004C takes nothing returns boolean
if ( not ( udg_footman[2] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func005C takes nothing returns boolean
if ( not ( udg_footman[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func006C takes nothing returns boolean
if ( not ( udg_footman[2] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func007C takes nothing returns boolean
if ( not ( udg_footman[2] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func008C takes nothing returns boolean
if ( not ( udg_footman[2] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Func009C takes nothing returns boolean
if ( not ( udg_footman[2] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_footnan_Actions takes nothing returns nothing
if ( Trig_footnan_Func001C() ) then
call RemoveItemFromStockBJ( 'I00G', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01K', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func002C() ) then
call RemoveItemFromStockBJ( 'I01K', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01D', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func003C() ) then
call RemoveItemFromStockBJ( 'I01D', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01E', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func004C() ) then
call RemoveItemFromStockBJ( 'I01E', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01F', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func005C() ) then
call RemoveItemFromStockBJ( 'I01F', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01G', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func006C() ) then
call RemoveItemFromStockBJ( 'I01G', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01H', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func007C() ) then
call RemoveItemFromStockBJ( 'I01H', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01I', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func008C() ) then
call RemoveItemFromStockBJ( 'I01I', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01J', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_footnan_Func009C() ) then
call RemoveItemFromStockBJ( 'I01J', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01L', gg_unit_n00X_0320, 1, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_footnan takes nothing returns nothing
set gg_trg_footnan = CreateTrigger( )
call TriggerAddAction( gg_trg_footnan, function Trig_footnan_Actions )
endfunction
function Trig_archnan_Func001C takes nothing returns boolean
if ( not ( udg_archer[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func002C takes nothing returns boolean
if ( not ( udg_archer[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func003C takes nothing returns boolean
if ( not ( udg_archer[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func004C takes nothing returns boolean
if ( not ( udg_archer[2] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func005C takes nothing returns boolean
if ( not ( udg_archer[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func006C takes nothing returns boolean
if ( not ( udg_archer[2] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func007C takes nothing returns boolean
if ( not ( udg_archer[2] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func008C takes nothing returns boolean
if ( not ( udg_archer[2] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Func009C takes nothing returns boolean
if ( not ( udg_archer[2] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_archnan_Actions takes nothing returns nothing
if ( Trig_archnan_Func001C() ) then
call RemoveItemFromStockBJ( 'I00O', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00H', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func002C() ) then
call RemoveItemFromStockBJ( 'I00H', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00T', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func003C() ) then
call RemoveItemFromStockBJ( 'I00T', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00S', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func004C() ) then
call RemoveItemFromStockBJ( 'I00S', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00R', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func005C() ) then
call RemoveItemFromStockBJ( 'I00R', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00M', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func006C() ) then
call RemoveItemFromStockBJ( 'I00M', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00N', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func007C() ) then
call RemoveItemFromStockBJ( 'I00N', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00U', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func008C() ) then
call RemoveItemFromStockBJ( 'I00U', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00P', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_archnan_Func009C() ) then
call RemoveItemFromStockBJ( 'I00P', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00Q', gg_unit_n00X_0320, 1, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_archnan takes nothing returns nothing
set gg_trg_archnan = CreateTrigger( )
call TriggerAddAction( gg_trg_archnan, function Trig_archnan_Actions )
endfunction
function Trig_capnan_Func001C takes nothing returns boolean
if ( not ( udg_captain[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func002C takes nothing returns boolean
if ( not ( udg_captain[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func003C takes nothing returns boolean
if ( not ( udg_captain[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func004C takes nothing returns boolean
if ( not ( udg_captain[2] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func005C takes nothing returns boolean
if ( not ( udg_captain[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func006C takes nothing returns boolean
if ( not ( udg_captain[2] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func007C takes nothing returns boolean
if ( not ( udg_captain[2] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func008C takes nothing returns boolean
if ( not ( udg_captain[2] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Func009C takes nothing returns boolean
if ( not ( udg_captain[2] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_capnan_Actions takes nothing returns nothing
if ( Trig_capnan_Func001C() ) then
call RemoveItemFromStockBJ( 'I013', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00I', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func002C() ) then
call RemoveItemFromStockBJ( 'I00I', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I012', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func003C() ) then
call RemoveItemFromStockBJ( 'I012', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I011', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func004C() ) then
call RemoveItemFromStockBJ( 'I011', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00V', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func005C() ) then
call RemoveItemFromStockBJ( 'I00V', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00W', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func006C() ) then
call RemoveItemFromStockBJ( 'I00W', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00X', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func007C() ) then
call RemoveItemFromStockBJ( 'I00X', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00Y', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func008C() ) then
call RemoveItemFromStockBJ( 'I00Y', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00Z', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_capnan_Func009C() ) then
call RemoveItemFromStockBJ( 'I00Z', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I010', gg_unit_n00X_0320, 1, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_capnan takes nothing returns nothing
set gg_trg_capnan = CreateTrigger( )
call TriggerAddAction( gg_trg_capnan, function Trig_capnan_Actions )
endfunction
function Trig_swordnan_Func001C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func002C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func003C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func004C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func005C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func006C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func007C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func008C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Func009C takes nothing returns boolean
if ( not ( udg_swordsman[2] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_swordnan_Actions takes nothing returns nothing
if ( Trig_swordnan_Func001C() ) then
call RemoveItemFromStockBJ( 'I00J', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01M', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func002C() ) then
call RemoveItemFromStockBJ( 'I01M', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01N', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func003C() ) then
call RemoveItemFromStockBJ( 'I01N', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01O', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func004C() ) then
call RemoveItemFromStockBJ( 'I01O', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01P', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func005C() ) then
call RemoveItemFromStockBJ( 'I01P', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01Q', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func006C() ) then
call RemoveItemFromStockBJ( 'I01Q', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01R', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func007C() ) then
call RemoveItemFromStockBJ( 'I01R', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01S', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func008C() ) then
call RemoveItemFromStockBJ( 'I01S', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01T', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_swordnan_Func009C() ) then
call RemoveItemFromStockBJ( 'I01T', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01U', gg_unit_n00X_0320, 1, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_swordnan takes nothing returns nothing
set gg_trg_swordnan = CreateTrigger( )
call TriggerAddAction( gg_trg_swordnan, function Trig_swordnan_Actions )
endfunction
function Trig_calvarynan_Func001C takes nothing returns boolean
if ( not ( udg_calvary[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func002C takes nothing returns boolean
if ( not ( udg_calvary[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func003C takes nothing returns boolean
if ( not ( udg_calvary[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func004C takes nothing returns boolean
if ( not ( udg_calvary[2] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func005C takes nothing returns boolean
if ( not ( udg_calvary[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func006C takes nothing returns boolean
if ( not ( udg_calvary[2] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func007C takes nothing returns boolean
if ( not ( udg_calvary[2] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func008C takes nothing returns boolean
if ( not ( udg_calvary[2] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Func009C takes nothing returns boolean
if ( not ( udg_calvary[2] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_calvarynan_Actions takes nothing returns nothing
if ( Trig_calvarynan_Func001C() ) then
call RemoveItemFromStockBJ( 'I01B', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I00L', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func002C() ) then
call RemoveItemFromStockBJ( 'I00L', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01C', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func003C() ) then
call RemoveItemFromStockBJ( 'I01C', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I014', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func004C() ) then
call RemoveItemFromStockBJ( 'I014', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I015', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func005C() ) then
call RemoveItemFromStockBJ( 'I015', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I016', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func006C() ) then
call RemoveItemFromStockBJ( 'I016', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I017', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func007C() ) then
call RemoveItemFromStockBJ( 'I017', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I018', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func008C() ) then
call RemoveItemFromStockBJ( 'I018', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I019', gg_unit_n00X_0320, 1, 1 )
else
endif
if ( Trig_calvarynan_Func009C() ) then
call RemoveItemFromStockBJ( 'I019', gg_unit_n00X_0320 )
call AddItemToStockBJ( 'I01A', gg_unit_n00X_0320, 1, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_calvarynan takes nothing returns nothing
set gg_trg_calvarynan = CreateTrigger( )
call TriggerAddAction( gg_trg_calvarynan, function Trig_calvarynan_Actions )
endfunction
function Trig_BJ_CineSkip_Override_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_BJ_CineSkip_Override takes nothing returns nothing
set gg_trg_BJ_CineSkip_Override = CreateTrigger( )
//setting this variable prevents Warcraft from registering the internal transmission skip trigger.
set bj_cineSceneBeingSkipped = gg_trg_BJ_CineSkip_Override
call TriggerAddAction( gg_trg_BJ_CineSkip_Override, function Trig_BJ_CineSkip_Override_Actions )
endfunction