//HasUnitAbility checks ability level - used for Archievement checks
function HasUnitAbility takes unit U, integer Abil returns boolean
return GetUnitAbilityLevel(U,Abil) > 0
endfunction
//GetNextItemBJ checks for items in range - used for itemlimits
function GetNextItemBJ takes nothing returns nothing
if DistanceBetweenPoints(GetItemLoc(GetEnumItem()),udg_zz_CheckLocation) < udg_zz_ClosestDistance then
set udg_zz_ClosestItem = GetEnumItem()
set udg_zz_ClosestDistance = DistanceBetweenPoints(GetItemLoc(GetEnumItem()),udg_zz_CheckLocation)
endif
endfunction
//FindNextItem checks for items in range - used for itemlimits
function FindNextItem takes location L returns item
set udg_zz_ClosestDistance = 1000000
set udg_zz_CheckLocation = L
call EnumItemsInRect(GetEntireMapRect(),null,function GetNextItemBJ)
return udg_zz_ClosestItem
endfunction
//GetNextDestBJ checks for items in range - used for itemlimits
function GetNextDestBJ takes nothing returns nothing
if DistanceBetweenPoints(GetDestructableLoc(GetEnumDestructable()),udg_zz_CheckLocation) < udg_zz_ClosestDistance then
set udg_zz_ClosestDestructable = GetEnumDestructable()
set udg_zz_ClosestDistance = DistanceBetweenPoints(GetDestructableLoc(GetEnumDestructable()),udg_zz_CheckLocation)
endif
endfunction
//GetNextDestBJ checks for items in range - used for itemlimits
function ForItemsOfTypeCondition takes nothing returns boolean
return GetItemTypeId(GetFilterItem()) == udg_zz_EnumItemType
endfunction
//FindNextItem checks for items in range - used for itemlimits/ forest fire
function FindNextDoodad takes location L returns destructable
set udg_zz_ClosestDistance = 1000000
set udg_zz_CheckLocation = L
call EnumDestructablesInRectAll(GetEntireMapRect(),function GetNextDestBJ)
return udg_zz_ClosestDestructable
endfunction
//ForItemsOfType checks for items in range - used for itemlimits
function ForItemsOfType takes integer Type, code Func returns nothing
local filterfunc F = Filter(function ForItemsOfTypeCondition)
set udg_zz_EnumItemType = Type
call EnumItemsInRect(GetEntireMapRect(),F,Func)
call DestroyFilter(F)
set F = null
endfunction
//FindNextUnitMatching checks for units in range - used for animal reproduction
function FindNextUnitMatching takes location L, boolexpr Cond returns unit
local group G = CreateGroup()
local real Dist = 1000000
local unit Closest
local unit U
call GroupEnumUnitsInRect(G,GetEntireMapRect(),Cond)
loop
set U = FirstOfGroup(G)
exitwhen U == null
if DistanceBetweenPoints(GetUnitLoc(U),L) < Dist then
set Closest = U
set Dist = DistanceBetweenPoints(GetUnitLoc(U),L)
endif
call GroupRemoveUnit(G,U)
endloop
call DestroyGroup(G)
set G = null
return Closest
endfunction
//GetItemWoodCostById checks itemcosts - used for itemlimits
function GetItemWoodCostById takes integer Uid returns integer
local integer Val = GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_GOLD)
local integer ValB = GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_LUMBER)
local integer Diff
local unit U = CreateUnitAtLoc(Player(15),'nshe',GetRectCenter(GetPlayableMapRect()),bj_UNIT_FACING)
call AdjustPlayerStateBJ(50000,Player(15),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(50000,Player(15),PLAYER_STATE_RESOURCE_LUMBER)
call UnitAddAbilityBJ('Asid',U)
set Diff = GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_LUMBER)
call AddItemToStockBJ(Uid,U,1,1)
call IssueTrainOrderByIdBJ(U,Uid)
set Diff = Diff - GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_LUMBER)
call SetPlayerState(Player(15),PLAYER_STATE_RESOURCE_GOLD,Val)
call SetPlayerState(Player(15),PLAYER_STATE_RESOURCE_LUMBER,ValB)
call RemoveItem(FindNextItem(GetUnitLoc(U)))
call RemoveUnit(U)
return Diff
endfunction
//GetItemGoldCostById - used in triggering Human_sell_and_item_limits
function GetItemGoldCostById takes integer Uid returns integer
local integer Val = GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_GOLD)
local integer ValB = GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_LUMBER)
local integer Diff
local unit U = CreateUnitAtLoc(Player(15),'nshe',GetRectCenter(GetPlayableMapRect()),bj_UNIT_FACING)
call AdjustPlayerStateBJ(50000,Player(15),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(50000,Player(15),PLAYER_STATE_RESOURCE_LUMBER)
call UnitAddAbilityBJ('Asid',U)
set Diff = GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_GOLD)
call AddItemToStockBJ(Uid,U,1,1)
call IssueTrainOrderByIdBJ(U,Uid)
set Diff = Diff - GetPlayerState(Player(15),PLAYER_STATE_RESOURCE_GOLD)
call SetPlayerState(Player(15),PLAYER_STATE_RESOURCE_GOLD,Val)
call SetPlayerState(Player(15),PLAYER_STATE_RESOURCE_LUMBER,ValB)
call RemoveItem(FindNextItem(GetUnitLoc(U)))
call RemoveUnit(U)
return Diff
endfunction
//UnitTypeIsInRegion - used for through/Manastonequest
function UnitTypeIsInRegion takes rect whichRegion, integer whichType returns boolean
local group source = GetUnitsInRectAll(whichRegion)
local group unitstested = CreateGroup()
local unit testunit
loop
set testunit = GroupPickRandomUnit(source)
exitwhen testunit == null
if GetUnitTypeId(testunit) == whichType then
call DestroyGroup(source)
set source = null
call DestroyGroup(unitstested)
set unitstested = null
return true
endif
call GroupRemoveUnit(source,testunit)
endloop
call DestroyGroup(source)
set source = null
call DestroyGroup(unitstested)
set unitstested = null
return false
endfunction
//CancelAIOrders ends all orders given - used with player defeat
function CancelAIOrders takes integer Type, player P returns nothing
call CommandAI(P,Type,0)
endfunction
//RandomPointInRange returns random point around a target point within range - used in spawning units
function RandomPointInRange takes location whichPoint, real pointrange returns location
return PolarProjectionBJ(whichPoint,GetRandomReal(1.00,pointrange),GetRandomReal(0,360.00))
endfunction
Name | Type | is_array | initial_value |
A | integer | No | |
A1 | integer | No | |
A2 | integer | No | |
Ability_HiderCold | abilcode | No | A0I9 |
Alchemy_Crafting | unit | Yes | |
AmmoAmmount | integer | Yes | |
AmmoContainer | item | Yes | |
AmmoMax | integer | Yes | |
AmmoType | integer | Yes | |
Anaconda | unit | No | |
Ancient_Lore | itemcode | Yes | |
Area | rect | Yes | |
ArmorOwned | integer | Yes | |
B | integer | No | |
Basic_Crafting | unit | Yes | |
Beast_owned | boolean | Yes | |
BeeSwarm | unit | Yes | |
BeeSwarmCount | integer | No | |
BirdNest | unit | Yes | |
Boat | boolean | Yes | |
BoatLoaded | unit | Yes | |
BootsOwned | integer | Yes | |
Boss | boolean | Yes | |
BotString | string | No | |
Bush | destructable | Yes | |
C | integer | No | 100 |
Cave | rect | Yes | |
ChainSawItem | item | Yes | |
ChainsawOn | boolean | Yes | |
ChainSawValue | integer | Yes | |
Character | unit | Yes | |
Color | string | Yes | |
Coma | boolean | Yes | |
count_Alligators | integer | No | |
count_Antelopes | integer | No | |
count_Bears | integer | No | |
count_Crabs | integer | No | |
count_Flint | integer | Yes | |
count_Frogs | integer | No | |
count_JungleBirds | integer | No | |
count_Plants | integer | No | |
count_Rabbits | integer | No | |
count_Racoons | integer | No | |
count_Rats | integer | No | |
Count_RepairHammer | real | Yes | |
count_Snakes | integer | No | |
count_Spiders | integer | No | |
count_Stone | integer | Yes | |
count_Tinder | integer | Yes | |
count_Tortoises | integer | No | |
count_VotingSpirits | integer | No | |
count_Vultures | integer | No | |
count_WildBoars | integer | No | |
count_Wolves | integer | No | |
count_Wood | integer | Yes | |
Crit_block | integer | Yes | |
Crit_power | integer | Yes | |
Critblock_current | integer | No | |
Critical_current | integer | No | |
CurrentMB | integer | Yes | |
CutTree | integer | No | |
D | integer | Yes | |
D_Action | button | Yes | |
D_Button | integer | Yes | |
D_Diff | button | Yes | |
D_Difficulty | button | Yes | |
D_GameMode | string | Yes | |
D_Harcore | button | Yes | |
D_Mode | button | Yes | |
D_ModeAction | string | Yes | |
D_ModeDifficulty | string | Yes | |
D_ModeHardcore | string | Yes | |
D_ModePlenty | string | Yes | |
D_ModeSoul | string | Yes | |
D_ModeTutorial | string | Yes | |
D_Ok | button | No | |
D_On | boolean | No | |
D_Option | dialog | No | |
D_Plenty | button | Yes | |
D_Removed | boolean | No | |
D_Soul | button | Yes | |
D_Timer | timer | No | |
D_TimerW | timerdialog | No | |
D_Tutorial | button | Yes | |
Day | integer | No | |
DayTimer | timer | No | |
DeadTree | destructable | Yes | DestructableNull |
Defeat | boolean | Yes | |
Defeat_Loc | location | Yes | |
Defeat_Tribe | boolean | Yes | |
Defeated | player | No | |
DefeatMessage | string | Yes | |
Die_Animals | integer | Yes | |
Die_Diseases | integer | Yes | |
Die_Enemy | integer | Yes | |
Die_Frost | integer | Yes | |
Die_Hunger | integer | Yes | |
Die_Lightning | integer | Yes | |
Die_Self | integer | Yes | |
Die_Wind | integer | Yes | |
DificultyChooser | unit | No | |
DiseaseResist | integer | Yes | 50 |
DollOwned | integer | Yes | |
EasyItem__ERRORSOUND | string | No | |
EasyItem__SPLIT | boolean | No | |
EasyItem__SPLITDROP | boolean | No | |
EasyItem__SPLITSIZE | integer | No | |
EasyItem__SPLITSTACK | boolean | No | |
EasyItem__SPLITSTACKDELAY | real | No | |
EasyItem__USEITEMLEVEL | boolean | No | |
EasyItem_integer | integervar | Yes | |
EasyItem_item | item | No | |
EasyItem_items | item | Yes | |
EasyItem_order | integervar | No | |
EasyItem_point | location | Yes | |
EasyItem_point1 | location | No | |
EasyItem_point2 | location | No | |
EasyItem_slot | integervar | No | |
EasyItem_sound | sound | No | |
EasyItem_string | string | Yes | |
EasyItem_strings | string | Yes | |
EasyItem_timer | timer | No | |
EasyItem_total | integer | No | |
EasyItem_unit | unit | No | |
EasyItem_units | unit | Yes | |
Eat_caster | unit | Yes | |
Eat_count | integer | No | |
Eat_Current | integer | No | |
Eat_DataStore | integer | Yes | |
Eat_Max | integer | No | 15 |
Eat_player | integer | Yes | |
Eat_target | unit | Yes | |
Eat_target_damage | integer | Yes | |
Eat_target_life | real | Yes | |
Eat_true | boolean | Yes | |
Eaten | boolean | Yes | |
Eaten_Alcohol | integer | Yes | |
Eaten_Berry | integer | Yes | |
Eaten_BoneFishbone | integer | Yes | |
Eaten_CrackedTeeth | integer | Yes | |
Eaten_EggOmelette | integer | Yes | |
Eaten_Hearts | integer | Yes | |
Eaten_Honey | integer | Yes | |
Eaten_HumanMeat | integer | Yes | |
Eaten_OldTrollCake | integer | Yes | |
Eaten_Plants | integer | Yes | |
Eaten_Potions | integer | Yes | |
Eaten_RawMeat | integer | Yes | |
Eaten_SkullHeads | integer | Yes | |
Eaten_StewCooked | integer | Yes | |
Eaten_TrollMeat | integer | Yes | |
Eaten_Vomit | integer | Yes | |
EatenTroll_Loc | location | Yes | |
EatWolf | boolean | No | |
EndGame | fogmodifier | No | |
EquipItem | item | Yes | |
FishCaught | unitcode | Yes | |
Fishing | integer | No | |
Fishing_Bonus | integer | Yes | |
Fishing_Temp | integer | Yes | |
FishingArea | integer | Yes | |
FishingBobbler | unit | Yes | |
FishingItem | itemcode | Yes | |
FishingLoc | location | No | |
FishingPoleYes | integer | Yes | |
FishingRod | item | Yes | |
FishingSuccess | boolean | Yes | |
FishingText1 | string | Yes | |
FishingText2 | string | Yes | |
FishingText3 | string | Yes | |
FloatingTextTrigger | trigger | Yes | |
Freeze_weather | weathereffect | No | |
Freezing | boolean | No | |
Froll_Huts | integer | No | |
Froll_Villages | integer | No | |
FrollCampMain | unit | No | |
Frozen | boolean | Yes | |
game_diff_timer | timer | No | |
game_diff_window | timerdialog | No | |
GameDiff | integer | No | 1 |
GameModeLauncher | timer | No | |
GameTimeHours | integer | No | |
GameTimeMin | integer | No | |
GameTimeSec | integer | No | |
GauntletsOwned | integer | Yes | |
ground_big | rect | Yes | |
ground_food | rect | Yes | |
ground_normal | rect | Yes | |
ground_vermin | rect | Yes | |
Hardcore | boolean | No | |
Hawk | boolean | Yes | |
HawkDamage | real | Yes | |
HawkPrey | unit | Yes | |
HawkPreyArmor | real | Yes | 1.00 |
HawkPreyHp | real | Yes | |
HawkPreyName | string | Yes | |
Headpiece_owned | integer | Yes | |
Heart_Grizzly | boolean | Yes | |
Heart_Snake | boolean | Yes | |
Heart_Vulture | boolean | Yes | |
Heart_Werewolf | boolean | Yes | |
Heat | integer | Yes | |
HeatDamage | integer | No | |
HelpTimer | timer | No | |
Hero_Agility | integer | Yes | |
Hero_Armor | integer | Yes | |
Hero_Building | unit | Yes | |
Hero_Chooser | unit | Yes | |
Hero_Deaths | integer | Yes | |
Hero_Intelligence | integer | Yes | |
Hero_Strength | integer | Yes | |
Hero_Troll | unit | Yes | |
Hero_Type | unitcode | Yes | |
Hero_Xp | integer | Yes | |
Host | player | No | |
Hunter_Crafting | unit | Yes | |
i | integer | No | |
Inventor_Crafting | unit | Yes | |
Item_sell | item | Yes | |
Job1 | integer | No | |
Job2 | integer | No | |
Job_Alchemy_Lvl | integer | Yes | 0 |
Job_Alchemy_XP | integer | Yes | 0 |
Job_Ballistic_Lvl | integer | Yes | 0 |
Job_Ballistic_Xp | integer | Yes | 0 |
Job_BeastMaster_Lvl | integer | Yes | 0 |
Job_BeastMaster_XP | integer | Yes | 0 |
Job_Bomber_Lvl | integer | Yes | 0 |
Job_Bomber_XP | integer | Yes | 0 |
Job_ChosenOne_Lvl | integer | Yes | 0 |
Job_ChosenOne_XP | integer | Yes | 0 |
Job_Cooking_Lvl | integer | Yes | 0 |
Job_Cooking_XP | integer | Yes | 0 |
Job_Destroyer_Lvl | integer | Yes | 0 |
Job_Destroyer_XP | integer | Yes | 0 |
Job_FishCaught | integer | Yes | |
Job_Fishing_Lvl | integer | Yes | 0 |
Job_Fishing_XP | integer | Yes | |
Job_FishMissed | integer | Yes | |
Job_MealBurned | integer | Yes | 0 |
Job_MealCooked | integer | Yes | 0 |
Job_Merchant_Lvl | integer | Yes | 0 |
Job_Merchant_Xp | integer | Yes | 0 |
Job_MerchantGoldbonus | real | Yes | |
Job_Mining_Lvl | integer | Yes | 0 |
Job_Mining_XP | integer | Yes | 0 |
Job_PotionMade | integer | Yes | 0 |
Job_PuppetMaster_Lvl | integer | Yes | 0 |
Job_PuppetMaster_XP | integer | Yes | 0 |
Job_RareMineral | integer | Yes | 0 |
Job_RessourceMined | integer | Yes | 0 |
Job_TacticalMaster_Lvl | integer | Yes | 0 |
Job_TacticalMaster_XP | integer | Yes | 0 |
Job_Transmutation | integer | Yes | 0 |
Job_Trapper_Lvl | integer | Yes | 0 |
Job_Trapper_XP | integer | Yes | 0 |
Join_TribeNo | integer | Yes | |
Join_TribeYes | integer | Yes | |
Junk | itemcode | Yes | |
Kill_Alligator | integer | Yes | |
Kill_AlligatorEgg | integer | Yes | |
Kill_AlligatorHatchling | integer | Yes | |
Kill_Anaconda | integer | Yes | |
Kill_AncientGiantTortoise | integer | Yes | |
Kill_Antelope | integer | Yes | |
Kill_AntelopeFawn | integer | Yes | |
Kill_AntelopeStag | integer | Yes | |
Kill_Bear | integer | Yes | |
Kill_BearCub | integer | Yes | |
Kill_BigJungleBird | integer | Yes | |
Kill_BlackBass | integer | Yes | |
Kill_BlackPiranhas | integer | Yes | |
Kill_BlackWidow | integer | Yes | |
Kill_Boar | integer | Yes | |
Kill_BossComodo | integer | Yes | |
Kill_BossGiantVulture | integer | Yes | |
Kill_BossGrizzli | integer | Yes | |
Kill_BossWolf | integer | Yes | |
Kill_Building | integer | Yes | |
Kill_BullFrog | integer | Yes | |
Kill_Bunny | integer | Yes | |
Kill_DogHawk | integer | Yes | |
Kill_ElderAlphaWolf | integer | Yes | |
Kill_ElderCaveBear | integer | Yes | |
Kill_ElderCrocodile | integer | Yes | |
Kill_ElderRazzorback | integer | Yes | |
Kill_ElderRoyalStag | integer | Yes | |
Kill_FatHog | integer | Yes | |
Kill_FatRabbit | integer | Yes | |
Kill_FatRacoon | integer | Yes | |
Kill_FatUglyFrog | integer | Yes | |
Kill_Frog | integer | Yes | |
Kill_Froll | integer | Yes | |
Kill_GiantAlligator | integer | Yes | |
Kill_GiantCattleFish | integer | Yes | |
Kill_GiantTortoise | integer | Yes | |
Kill_GriffonVulture | integer | Yes | |
Kill_HermitCrab | integer | Yes | |
Kill_Human | integer | Yes | |
Kill_ImperialCrab | integer | Yes | |
Kill_JungleAspic | integer | Yes | |
Kill_JungleBird | integer | Yes | |
Kill_JungleBirdNest | integer | Yes | |
Kill_JungleViper | integer | Yes | |
Kill_Mosquito | integer | Yes | |
Kill_OldBear | integer | Yes | |
Kill_OldWolf | integer | Yes | |
Kill_Piglet | integer | Yes | |
Kill_Piranhas | integer | Yes | |
Kill_PoisonousFrog | integer | Yes | |
Kill_Rabbit | integer | Yes | |
Kill_Racoon | integer | Yes | |
Kill_RacoonCub | integer | Yes | |
Kill_Rat | integer | Yes | |
Kill_RiverCrab | integer | Yes | |
Kill_RiverTrout | integer | Yes | |
Kill_RottenBeast | integer | Yes | |
Kill_Salmon | integer | Yes | |
Kill_SnakeEgg | integer | Yes | |
Kill_SpiderEgg | integer | Yes | |
Kill_Tarentula | integer | Yes | |
Kill_TarentulaQueen | integer | Yes | |
Kill_Tortoise | integer | Yes | |
Kill_TortoiseEgg | integer | Yes | |
Kill_Troll | integer | Yes | |
Kill_UglyFrog | integer | Yes | |
Kill_UglyFrogEgg | integer | Yes | |
Kill_Vulture | integer | Yes | |
Kill_VultureNest | integer | Yes | |
Kill_Wolf | integer | Yes | |
Kill_WolfCub | integer | Yes | |
Kill_worthy | integer | Yes | |
LeftHand | integer | Yes | |
Loc | location | No | |
Loc2 | location | No | |
Loc3 | location | No | |
LocalBolean | boolean | No | |
LocalEffect | effect | No | |
LocalItem | item | No | |
LocalItem2 | item | No | |
LocalPlayer | player | No | |
LocalText | texttag | No | |
Lumber | integer | Yes | |
Malaria | integer | No | |
MaskOwned | integer | Yes | |
MaxSlot | integer | No | |
MB_Coma | string | Yes | No |
MB_Dead | string | Yes | No |
MB_Difficulty | string | No | Normal |
MB_Fever | string | Yes | No |
MB_Frozen | string | Yes | No |
MB_Malaria | string | Yes | No |
MB_ModeAction | string | No | No |
MB_ModePlenty | string | No | No |
MB_Pague | StringExt | Yes | |
MB_Plague | string | Yes | No |
MB_PlayerClass | string | Yes | None |
MB_PlayerTribes | string | Yes | None |
MB_Poisoned | string | Yes | No |
MB_Sleep | string | Yes | No Perks |
MB_Soul | string | Yes | |cffFF8040yes|r |
MB_Starving | string | Yes | No |
MB_Troll | integer | Yes | |
MB_Weather | string | No | Clear |
minerals | rect | Yes | |
MonsterBush | boolean | Yes | |
Multiboard | multiboard | Yes | |
MultiboardShow | boolean | Yes | |
N | integer | No | |
NestNumber | integer | No | |
NestTree | destructable | Yes | DestructableNull |
No_Player | boolean | Yes | |
offering | integer | No | 0 |
Old_team | integer | Yes | |
PactWithTheDevil | boolean | Yes | |
Pet | unit | Yes | |
Pet_Hut | unit | Yes | |
Pet_Owned | boolean | Yes | |
PetHut_Owned | boolean | Yes | |
piranhas_killed | integer | No | |
Plants | unitcode | Yes | |
PlayerGroup_Show | force | Yes | |
PlayerTimer | timer | No | |
PlayerUnit_Point | location | No | |
Points | integer | Yes | |
PointX | real | No | |
PointY | real | No | |
ProgressBar | string | Yes | |
ProgressText | texttag | Yes | |
ProtectRain | boolean | Yes | |
ProtectSlip | boolean | Yes | |
ProtectWater | boolean | Yes | |
Rain | boolean | No | |
Rain_day | weathereffect | No | |
random | integer | No | |
RandomTree1 | destructable | Yes | |
RandomTree2 | destructable | Yes | |
RecipeItem | integer | Yes | |
RecipeItemNumber | integer | Yes | |
RecipeItemStack | integer | Yes | |
RecipeItemType | itemcode | Yes | |
RecipeName | string | No | |
RecipeTeam | force | No | |
RecipeText | string | No | |
RecipeUnit | unit | No | |
ReloadCount | integer | No | |
ReloadItem | item | Yes | |
ReloadItemEmpty | itemcode | Yes | |
ReloadUnit | unit | Yes | |
RessourceLimit | integer | No | 10 |
Revive | effect | Yes | |
RightHand | integer | Yes | |
Ring_boolean | boolean | No | |
Ring_Resurrect | unit | No | |
Rock | unitcode | Yes | |
run_energy | real | Yes | 10.00 |
Score_Memorial | unit | Yes | |
SelectionsCount | integer | No | 14 |
SelectTempPlayer | player | Yes | |
Shaman_Crafting | unit | Yes | |
Sleep_Troll | integer | Yes | |
Sleeping | boolean | Yes | |
Slippery | boolean | Yes | |
Speed | integer | No | |
SpellBook_Owned | integer | Yes | |
Starving | boolean | Yes | |
Stop_ItemsDrop | boolean | No | |
StoreMonsterID | integer | Yes | |
Summon | unitcode | Yes | |
SwallowDamage | real | No | |
SwallowedUnit | unit | No | |
Swoop | boolean | Yes | |
TamedBeast | unit | Yes | |
Target | integer | No | |
TauntAdjectives | string | Yes | |
TauntTribes | string | Yes | |
TauntVerbs | string | Yes | |
Team | force | Yes | |
TeamName | string | Yes | |
TeamNumber | integer | Yes | |
TeamStart | rect | Yes | |
Temp_Item | item | Yes | |
TempEffect | effect | Yes | |
TempGroup | group | No | |
TempGroup2 | group | No | |
TempInteger | integer | No | |
TempIntegerArray | integer | Yes | |
TempItem | item | No | |
TempItem2 | item | No | |
TempItemType | itemcode | No | |
TempPickedUnit | unit | No | |
TempPlayerArray | player | Yes | |
TempPlayerGroup | force | No | |
TempPlayerGroup2 | force | No | |
TempPoint1 | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
TempReal | real | No | |
TempRealArray | real | Yes | |
TempTarget_VoodooDoll | unit | Yes | |
TempTargetUnit | unit | Yes | |
TempTree | destructable | No | DestructableNull |
TempUnit | unit | No | |
TempUnitArray | unit | Yes | |
TempUnitType | unitcode | Yes | |
TenDays | boolean | No | |
TextType | integer | Yes | 0 |
ThrowDaggerSpear | boolean | Yes | |
Timer10sec | timer | No | |
timer_Ticking | boolean | Yes | |
TimerCheck | boolean | No | |
Totem | unit | Yes | |
Totem_timer | timer | No | |
Totem_window | timerdialog | No | |
TotemCheck | timer | No | |
TotemKit | item | Yes | |
TotemOwned | boolean | Yes | |
TrackA | integer | Yes | |
TrackB | integer | Yes | |
TrackC | integer | Yes | |
TrackD | integer | Yes | |
TrackE | integer | Yes | |
TrackF | integer | Yes | |
TrackG | integer | Yes | |
TrackH | integer | Yes | |
TrackI | integer | Yes | |
TrackJ | integer | Yes | |
TrackK | integer | Yes | |
TrackL | integer | Yes | |
Tree | destructable | Yes | |
Tree_count | integer | No | |
TribeJoin_number | integer | Yes | |
TribeJoin_player | player | Yes | |
TribeJoin_started | boolean | Yes | |
TribeJoin_timer | timer | Yes | |
TribeJoin_voted | boolean | Yes | |
TribeJoin_window | timerdialog | Yes | |
Troll_Spirit | unit | Yes | |
TutorialFloatingText | texttag | Yes | |
TutorialItems | item | Yes | |
TutorialView | fogmodifier | Yes | |
VotingSpirit | unit | Yes | |
VotingUnit | unit | No | |
Warning | boolean | Yes | true |
Warrior_Crafting | unit | Yes | |
WarTarget | unit | No | |
water_big | rect | Yes | |
water_normal | rect | Yes | |
water_piranha | rect | Yes | |
WeatherPlayer | player | No | |
WeatherTimer | timer | No | |
WetEffect | integer | Yes | 1 |
Wind | boolean | No | |
Wind_Weather | weathereffect | No | |
Winter | boolean | No | |
WolfBoss | unit | No | |
WolfTimer | integer | No | |
Wood | integer | No | |
Xnumber | integer | No | 10 |
zz_ActionAndTrig | trigger | No | |
zz_AdjustCam | boolean | Yes | |
zz_ai_only_mode | button | No | |
zz_AllItems | item | Yes | |
zz_AllUnits | unit | Yes | |
zz_Anfangsfarbe | integer | Yes | |
zz_AnyDamageTrig | trigger | No | |
zz_AnzahlVoter | integer | No | |
zz_ATLastSound | sound | Yes | |
zz_AttackDiceUpgr | integer | Yes | |
zz_AttackRateUpgr | integer | Yes | |
zz_ATToBeSkipped | boolean | Yes | |
zz_BnsBit | integer | Yes | |
zz_CamAlreadyOff | boolean | Yes | |
zz_CamAngle | real | Yes | |
zz_CameraSettingVal | real | Yes | |
zz_CamFollowUnit | unit | Yes | |
zz_CamOffset | real | Yes | |
zz_CamPid | integer | Yes | |
zz_CamPidIndex | integer | No | |
zz_CamRoll | real | Yes | |
zz_CamRotation | real | Yes | |
zz_CamSysPlayer | player | No | |
zz_CamSysT | real | No | |
zz_CamSysTime | real | No | |
zz_CamZOffset | real | Yes | |
zz_cdlg_button | button | Yes | |
zz_cdlg_dialog | dialog | Yes | |
zz_cdlg_length | integer | No | |
zz_cdlg_number | integer | Yes | |
zz_chat_no_ally | string | No | |
zz_CheckLocation | location | No | |
zz_ClosestDestructable | destructable | No | |
zz_ClosestDistance | real | No | |
zz_ClosestItem | item | No | |
zz_CodeIdA | string | Yes | |
zz_CodeIdB | string | Yes | |
zz_CodeRow | string | No | |
zz_CodeRows | integer | Yes | |
zz_color_board | leaderboard | No | |
zz_command_dlg1 | string | Yes | |
zz_command_dlg2 | string | Yes | |
zz_command_dlg3 | string | Yes | |
zz_command_hotkey1 | integer | Yes | |
zz_command_hotkey2 | integer | Yes | |
zz_command_hotkey3 | integer | Yes | |
zz_command_key1 | string | Yes | |
zz_command_key2 | string | Yes | |
zz_command_key3 | string | Yes | |
zz_command_language | string | No | |
zz_command_length | integer | No | |
zz_command_msg | string | Yes | |
zz_command_number | integer | Yes | |
zz_command_par1 | integer | Yes | |
zz_command_par2 | integer | Yes | |
zz_command_par3 | integer | Yes | |
zz_command_prefix | string | No | |
zz_commanded_player | player | No | |
zz_commander_mode | button | No | |
zz_commanding_player | player | No | |
zz_Comp | boolean | No | |
zz_current_command | integer | No | |
zz_current_number_par | integer | No | |
zz_current_player_par | integer | No | |
zz_CurrentlySelectedHero | unit | Yes | |
zz_CustomBooleanValue | boolean | Yes | |
zz_CustomRealValue | real | Yes | |
zz_CustomStringValue | string | Yes | |
zz_DamageTaken | real | No | |
zz_debug_BlackMaskTrig | trigger | No | |
zz_debugCamAoaTrig | trigger | No | |
zz_debugCamDistTrig | trigger | No | |
zz_debugCamFarzTrig | trigger | No | |
zz_debugCamFovTrig | trigger | No | |
zz_debugCamInfoTrig | trigger | No | |
zz_debugCamResetTrig | trigger | No | |
zz_debugCamRollTrig | trigger | No | |
zz_debugCamRotTrig | trigger | No | |
zz_debugCloneTrig | trigger | No | |
zz_debugDemoTrig | trigger | No | |
zz_debugDifficultyTrig | trigger | No | |
zz_debugDispelTrig | trigger | No | |
zz_debugFingerOfDeathEnabled | boolean | Yes | |
zz_debugFingerOfDeathTrig | trigger | Yes | |
zz_debugGimmeTrig | trigger | No | |
zz_debugGotoUnits | integer | No | |
zz_debugGotoUnitTrig | trigger | No | |
zz_debugGotoUnitX | real | No | |
zz_debugGotoUnitY | real | No | |
zz_debugGotoXTrig | trigger | No | |
zz_debugGotoXYTrig | trigger | No | |
zz_debugGotoYTrig | trigger | No | |
zz_debugTeleportTrig | trigger | No | |
zz_debugToolOfDeathTrig | trigger | Yes | |
zz_debugUnitInfoTrig | trigger | No | |
zz_DefendCaster | sound | No | |
zz_DetectRandom | real | No | |
zz_DetectSelected | real | No | |
zz_deutsch_button | button | No | |
zz_dialog_in_use | boolean | No | |
zz_DialogAktion | string | Yes | |
zz_DialogButton | button | Yes | |
zz_DialogFolge | trigger | Yes | |
zz_DialogShortcut | integer | Yes | |
zz_DialogSpieler | dialog | Yes | |
zz_DivineShield | sound | No | |
zz_dlg_dialog | dialog | Yes | |
zz_dlg_length | integer | No | |
zz_dlg_string | string | Yes | |
zz_dlgbutton_ai_only | string | No | |
zz_dlgbutton_all | string | No | |
zz_dlgbutton_cancel | string | No | |
zz_dlgbutton_commander | string | No | |
zz_dlgbutton_gold | string | No | |
zz_dlgbutton_lumber | string | No | |
zz_dlgbutton_no_human | string | No | |
zz_dlgbutton_tribute | string | No | |
zz_dlghdr_choose_ally | string | No | |
zz_dlghdr_choose_number | string | No | |
zz_dlghdr_choose_player | string | No | |
zz_dlghdr_game_type | string | No | |
zz_dlghdr_root | string | No | |
zz_dlghdr_tribute_amount | string | No | |
zz_dlghdr_tribute_type | string | No | |
zz_Empty0p5 | sound | No | |
zz_Empty1 | sound | No | |
zz_Empty10 | sound | No | |
zz_Empty11 | sound | No | |
zz_Empty12 | sound | No | |
zz_Empty14 | sound | No | |
zz_Empty16 | sound | No | |
zz_Empty18 | sound | No | |
zz_Empty1p5 | sound | No | |
zz_Empty2 | sound | No | |
zz_Empty20 | sound | No | |
zz_Empty22 | sound | No | |
zz_Empty24 | sound | No | |
zz_Empty26 | sound | No | |
zz_Empty28 | sound | No | |
zz_Empty2p5 | sound | No | |
zz_Empty3 | sound | No | |
zz_Empty30 | sound | No | |
zz_Empty32 | sound | No | |
zz_Empty4 | sound | No | |
zz_Empty5 | sound | No | |
zz_Empty6 | sound | No | |
zz_Empty7 | sound | No | |
zz_Empty8 | sound | No | |
zz_Empty9 | sound | No | |
zz_EngineTimerDialogs | timerdialog | Yes | |
zz_EngineTimers | timer | Yes | |
zz_english_button | button | No | |
zz_EnumItemType | integer | No | |
zz_EnumItemTypeT | itemtype | No | |
zz_ErweckteIndex | integer | No | |
zz_ErweckteKreaturen | unit | Yes | |
zz_Farbinterval | real | Yes | |
zz_ForRectItem | boolean | No | |
zz_french_button | button | No | |
zz_game_start_dialog | dialog | No | |
zz_game_start_trigger | trigger | No | |
zz_GewitterBlitze | integer | No | |
zz_GewitterCenter | location | No | |
zz_GlowEffect | effect | Yes | |
zz_GlowEffectPlus | effect | Yes | |
zz_heap_array_0 | integer | Yes | |
zz_heap_array_1 | integer | Yes | |
zz_heap_array_2 | integer | Yes | |
zz_heap_array_begin | integer | No | |
zz_heap_array_end | integer | No | |
zz_heap_arraycount | integer | No | |
zz_heap_descriptor_alloccursor | integer | No | |
zz_heap_descriptor_array_0 | integer | Yes | |
zz_heap_descriptor_array_1 | integer | Yes | |
zz_heap_descriptor_arraycount | integer | No | |
zz_heap_descriptor_begin | integer | No | |
zz_heap_descriptor_end | integer | No | |
zz_heap_descriptor_first | integer | No | |
zz_heap_descriptor_last | integer | No | |
zz_heap_descriptor_record_size | integer | No | |
zz_HeroChoice | trigger | No | |
zz_HeroDiedMsg | trigger | No | |
zz_HeroSkill1 | integer | Yes | |
zz_HeroSkill2 | integer | Yes | |
zz_HeroSkill3 | integer | Yes | |
zz_HeroSkill4 | integer | Yes | |
zz_HeroSkill5 | integer | Yes | |
zz_IsAlreadyPathing | boolean | Yes | |
zz_ItemIndex | integer | No | |
zz_language_dialog | dialog | No | |
zz_language_trigger | trigger | No | |
zz_LastClickedButtonNr | integer | Yes | |
zz_LastCreatedMovingSFX | integer | No | |
zz_LastCreatedMultiboardItem | multiboarditem | No | |
zz_LastMidiSound | sound | No | |
zz_LastMultipleChoice | integer | Yes | |
zz_LifeRegenUpgr | integer | Yes | |
zz_ManaRegenUpgr | integer | Yes | |
zz_MissileLength | integer | No | |
zz_MissileModel | string | Yes | |
zz_MissileOrder | string | Yes | |
zz_MissileUnitType | integer | Yes | |
zz_MJAuswahl | boolean | Yes | |
zz_MJAuswahleinheit | unit | Yes | |
zz_MJLastSound | sound | Yes | |
zz_MJPlayerPointer | integer | No | |
zz_MJSelected | group | Yes | |
zz_MJTrig1 | trigger | Yes | |
zz_MJTrig2 | trigger | Yes | |
zz_ModuloHex | integer | No | |
zz_MoveRateUpgr | integer | Yes | |
zz_MovForward | trigger | No | |
zz_MovingSFX | effect | Yes | |
zz_MovingSFXAbstand | real | Yes | |
zz_MovingSFXCenter | location | Yes | |
zz_MovingSFXCounter | integer | Yes | |
zz_MovingSFXKilled | boolean | Yes | |
zz_MovingSFXLength | integer | No | |
zz_MovingSFXLoop | boolean | Yes | |
zz_MovingSFXNach | rect | Yes | |
zz_MovingSFXNr | integer | Yes | |
zz_MovingSFXPath | string | Yes | |
zz_MovingSFXRadius | real | Yes | |
zz_MovingSFXStartAngle | real | Yes | |
zz_MovingSFXTrigger | trigger | Yes | |
zz_MovingSFXType | integer | Yes | |
zz_MovingSFXUnit | unit | Yes | |
zz_MovingSFXVor | rect | Yes | |
zz_MovingSFXWait | real | Yes | |
zz_MovLeft | integer | Yes | |
zz_MovMoving | boolean | Yes | |
zz_MovRight | integer | Yes | |
zz_MovSidewards | trigger | No | |
zz_MovUnit | unit | Yes | |
zz_ndbn_button | button | Yes | |
zz_ndbn_length | integer | No | |
zz_no_human_mode | button | No | |
zz_NoBuildIndex | integer | No | |
zz_NoBuildRects | rect | Yes | |
zz_NoBuildTrig | trigger | No | |
zz_number_dialog | dialog | No | |
zz_observer_god | boolean | No | |
zz_parsed_command | string | Yes | |
zz_pcbn_button | button | Yes | |
zz_pcbn_length | integer | No | |
zz_pcbn_number | integer | Yes | |
zz_player_dialog | dialog | No | |
zz_PlayerLeftMsg | trigger | No | |
zz_PortaleffektA | effect | Yes | |
zz_PortaleffektB | effect | No | |
zz_PortaltriggerA | trigger | No | |
zz_PortaltriggerB | trigger | No | |
zz_PressDown | trigger | No | |
zz_PressLeft | trigger | No | |
zz_PressRight | trigger | No | |
zz_PressUp | trigger | No | |
zz_PrevCam | camerasetup | Yes | |
zz_RangeUpgr | integer | Yes | |
zz_RegrowingTrees | trigger | No | |
zz_ReleaseLeft | trigger | No | |
zz_ReleaseRight | trigger | No | |
zz_ReleaseUp | trigger | No | |
zz_root_dialog | dialog | No | |
zz_SaveLoadSettings | boolean | Yes | |
zz_sdbn_button | button | Yes | |
zz_sdbn_length | integer | No | |
zz_sdbn_number | integer | Yes | |
zz_SEAnzahl | integer | No | |
zz_SECaster | unit | No | |
zz_SECastingType | integer | Yes | |
zz_SEFunc | string | Yes | |
zz_SEId | integer | Yes | |
zz_SEIndex | integer | No | |
zz_SELastOrder | string | No | |
zz_SelectableHeros | group | No | |
zz_SEMana | real | Yes | |
zz_SEOrder | string | Yes | |
zz_SERange | real | Yes | |
zz_SETarget | unit | No | |
zz_SETX | real | No | |
zz_SETY | real | No | |
zz_ShortcutId | string | Yes | |
zz_start_dialog | dialog | No | |
zz_StimmeAbgegeben | boolean | Yes | |
zz_Stimmen | integer | Yes | |
zz_StimmenAbgabe | trigger | No | |
zz_StimmenAbgegeben | integer | No | |
zz_StringIdent | string | No | |
zz_swedish_button | button | No | |
zz_TargetDistance | real | Yes | |
zz_TargetUpgr | integer | Yes | |
zz_TimerCounter | integer | No | |
zz_TPCenter | rect | No | |
zz_TPCondition | triggercondition | Yes | |
zz_TPEingang | rect | Yes | |
zz_TPNextTown | rect | No | |
zz_TPOpen | boolean | Yes | |
zz_TPPointer | integer | No | |
zz_TPRestrictGroup | group | No | |
zz_TPRestrictType | integer | No | |
zz_TPWatchersA | real | No | |
zz_TPWatchersB | real | No | |
zz_tribute_amount | string | No | |
zz_tribute_dlg | dialog | No | |
zz_tribute_dlg_button | button | Yes | |
zz_tribute_dlg_length | integer | No | |
zz_tribute_g | button | No | |
zz_tribute_l | button | No | |
zz_tribute_type | string | No | |
zz_TrigAlways | trigger | No | |
zz_UnfertigeGebaeude | unit | Yes | |
zz_UnfertigeGebIndex | integer | No | |
zz_UnfertigeUpgrades | unit | Yes | |
zz_UnfertigeUpgradesIndex | integer | No | |
zz_UnitIndex | integer | No | |
zz_UseAngle | boolean | Yes | |
zz_UseDistance | boolean | Yes | |
zz_UseOffset | boolean | Yes | |
zz_UseRoll | boolean | Yes | |
zz_UseRotation | boolean | Yes | |
zz_UseZOffset | boolean | Yes | |
zz_VotingAuswahl | string | Yes | |
zz_VotingBoard | leaderboard | Yes | |
zz_VotingErgebnis | string | No | |
zz_VotingFolge | string | Yes | |
zz_VotingGeheim | boolean | No | |
zz_VotingTimer | timerdialog | No | |
zz_XAcquiredItem | item | Yes | |
zz_XBuiltConstruction | unit | Yes | |
zz_XDroppedItem | item | Yes | |
zz_XLearnedSkill | integer | Yes | |
zz_XResearchedUpgrade | integer | Yes | |
zz_XSoldItem | item | Yes | |
zz_XSoldUnit | unit | Yes | |
zz_XSummonedUnit | unit | Yes | |
zz_XTrainedUnit | unit | Yes |
function Actions takes nothing returns nothing
local integer i
// Give Event to Trigger (Multiplayer) and Enable Visibility Area
set i = 0
loop
exitwhen i > 11
if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Tauren_Area )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Troll_Chief_Area )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_OilGeyser )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Boss1 )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Boss2 )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Boss3 )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Boss4 )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Oil1 )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Oil2 )
call CreateFogModifierRectBJ( true, Player(i), FOG_OF_WAR_VISIBLE, gg_rct_Oil3 )
call TriggerRegisterPlayerChatEvent( gg_trg_Day, Player(i), "-day", true )
call TriggerRegisterPlayerChatEvent( gg_trg_remove_Help, Player(i), "-pro", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Debug, Player(i), "-debug", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MS, Player(i), "-ms", true )
call TriggerRegisterPlayerChatEvent( gg_trg_High_Camera, Player(i), "-cam", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Count, Player(i), "-count", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Taunt, Player(i), "-taunt", false )
call TriggerRegisterPlayerEventLeave( gg_trg_Leaver_Event, Player(i) )
call TriggerRegisterPlayerChatEvent( gg_trg_Yes_global, Player(i), "-yes", true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Select_Global, Player(i), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Use_teleporter, Player(i), true )
endif
set i = i + 1
endloop
// Setting Troll Spirit Value not equal 0
set udg_Troll_Spirit[1] = gg_unit_h017_0338
set udg_Troll_Spirit[2] = gg_unit_h017_0066
set udg_Troll_Spirit[3] = gg_unit_h017_0097
set udg_Troll_Spirit[4] = gg_unit_h017_0150
set udg_Troll_Spirit[5] = gg_unit_h017_0238
set udg_Troll_Spirit[6] = gg_unit_h017_0204
set udg_Troll_Spirit[7] = gg_unit_h017_0218
set udg_Troll_Spirit[8] = gg_unit_h017_0229
set udg_Troll_Spirit[9] = gg_unit_h017_0339
set udg_Troll_Spirit[10] = gg_unit_h017_0232
set udg_Troll_Spirit[11] = gg_unit_h017_0234
set udg_Troll_Spirit[12] = gg_unit_h017_0235
// Ally with Neutral and Hide SpellBook
call SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), Player(bj_PLAYER_NEUTRAL_EXTRA), bj_ALLIANCE_NEUTRAL_VISION )
call SetPlayerAllianceStateBJ( Player(bj_PLAYER_NEUTRAL_EXTRA), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_NEUTRAL )
set udg_A1 = 1
loop
exitwhen udg_A1 > 12
if GetPlayerSlotState(ConvertedPlayer(udg_A1)) == PLAYER_SLOT_STATE_PLAYING then
call SetPlayerAbilityAvailableBJ( false, 'Aspb', ConvertedPlayer(udg_A1) )
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), Player(PLAYER_NEUTRAL_PASSIVE), bj_ALLIANCE_ALLIED )
call SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_PASSIVE), ConvertedPlayer(udg_A1), bj_ALLIANCE_ALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), Player(PLAYER_NEUTRAL_AGGRESSIVE), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( Player(PLAYER_NEUTRAL_AGGRESSIVE), ConvertedPlayer(udg_A1), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), Player(bj_PLAYER_NEUTRAL_EXTRA), bj_ALLIANCE_NEUTRAL_VISION )
call SetPlayerAllianceStateBJ( Player(bj_PLAYER_NEUTRAL_EXTRA), ConvertedPlayer(udg_A1), bj_ALLIANCE_NEUTRAL )
if udg_A1 < 5 then
set udg_A2 = 1
loop
exitwhen udg_A2 > 12
if GetPlayerSlotState(ConvertedPlayer(udg_A2)) == PLAYER_SLOT_STATE_PLAYING and ConvertedPlayer(udg_A1) != ConvertedPlayer(udg_A2) then
if udg_A2 < 5 then
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_UNALLIED )
endif
endif
set udg_A2 = udg_A2 + 1
endloop
elseif udg_A1 >= 5 and udg_A1 < 9 then
set udg_A2 = 1
loop
exitwhen udg_A2 > 12
if GetPlayerSlotState(ConvertedPlayer(udg_A2)) == PLAYER_SLOT_STATE_PLAYING and ConvertedPlayer(udg_A1) != ConvertedPlayer(udg_A2) then
if udg_A2 < 5 then
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_UNALLIED )
elseif udg_A2 >= 5 and udg_A2 < 9 then
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_UNALLIED )
endif
endif
set udg_A2 = udg_A2 + 1
endloop
elseif udg_A1 >= 9 then
set udg_A2 = 1
loop
exitwhen udg_A2 > 12
if GetPlayerSlotState(ConvertedPlayer(udg_A2)) == PLAYER_SLOT_STATE_PLAYING and ConvertedPlayer(udg_A1) != ConvertedPlayer(udg_A2) then
if udg_A2 < 9 then
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_UNALLIED )
else
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), ConvertedPlayer(udg_A2), bj_ALLIANCE_ALLIED_VISION )
endif
endif
set udg_A2 = udg_A2 + 1
endloop
endif
endif
set udg_A1 = udg_A1 + 1
endloop
// TotemKit
set udg_TotemKit[1] = gg_item_I01M_0005
set udg_TotemKit[2] = gg_item_I01M_0009
set udg_TotemKit[3] = gg_item_I01M_0011
// Team Name
set udg_TeamName[1] = "BloodSpear"
set udg_TeamName[2] = "GoldTooth"
set udg_TeamName[3] = "StoneSkin"
// Team Start
set udg_TeamStart[1] = gg_rct_Team_1
set udg_TeamStart[2] = gg_rct_Team_2
set udg_TeamStart[3] = gg_rct_Team_3
// RandomTree changing the Jungle Mazing at start
set udg_RandomTree1[0] = gg_dest_ZTtw_2778
set udg_RandomTree2[0] = gg_dest_ZTtw_0697
set udg_RandomTree1[1] = gg_dest_ZTtw_0208
set udg_RandomTree2[1] = gg_dest_ZTtw_1281
set udg_RandomTree1[2] = gg_dest_ZTtw_2362
set udg_RandomTree2[2] = gg_dest_ZTtw_1286
set udg_RandomTree1[3] = gg_dest_ZTtw_2363
set udg_RandomTree2[3] = gg_dest_ZTtw_1290
set udg_RandomTree1[4] = gg_dest_BTtw_2311
set udg_RandomTree2[4] = gg_dest_BTtw_1296
set udg_RandomTree1[5] = gg_dest_ZTtw_4089
set udg_RandomTree2[5] = gg_dest_ZTtw_1301
set udg_RandomTree1[6] = gg_dest_ZTtw_1602
set udg_RandomTree2[6] = gg_dest_ZTtw_1303
set udg_RandomTree1[7] = gg_dest_BTtw_1572
set udg_RandomTree2[7] = gg_dest_BTtw_1304
set udg_RandomTree1[8] = gg_dest_BTtw_2251
set udg_RandomTree2[8] = gg_dest_BTtw_1308
set udg_RandomTree1[9] = gg_dest_BTtw_2250
set udg_RandomTree2[9] = gg_dest_BTtw_1307
set udg_RandomTree1[10] = gg_dest_ZTtw_2137
set udg_RandomTree2[10] = gg_dest_ZTtw_1314
set udg_RandomTree1[11] = gg_dest_ZTtw_2136
set udg_RandomTree2[11] = gg_dest_ZTtw_1315
set udg_RandomTree1[12] = gg_dest_ZTtw_1523
set udg_RandomTree2[12] = gg_dest_ZTtw_1318
set udg_RandomTree1[13] = gg_dest_ZTtw_1514
set udg_RandomTree2[13] = gg_dest_ZTtw_1323
set udg_RandomTree1[14] = gg_dest_ZTtw_2448
set udg_RandomTree2[14] = gg_dest_ZTtw_1327
set udg_RandomTree1[15] = gg_dest_ZTtw_0811
set udg_RandomTree2[15] = gg_dest_ZTtw_1334
set udg_RandomTree1[16] = gg_dest_ZTtw_0773
set udg_RandomTree2[16] = gg_dest_ZTtw_1337
set udg_RandomTree1[17] = gg_dest_ZTtw_0750
set udg_RandomTree2[17] = gg_dest_ZTtw_1338
set udg_RandomTree1[18] = gg_dest_ZTtw_0413
set udg_RandomTree2[18] = gg_dest_ZTtw_1346
set udg_RandomTree1[19] = gg_dest_ZTtw_1079
set udg_RandomTree2[19] = gg_dest_ZTtw_1348
set udg_RandomTree1[20] = gg_dest_ZTtw_3199
set udg_RandomTree2[20] = gg_dest_ZTtw_1349
set udg_RandomTree1[21] = gg_dest_ZTtw_0127
set udg_RandomTree2[21] = gg_dest_ZTtw_1357
set udg_RandomTree1[22] = gg_dest_ZTtw_0130
set udg_RandomTree2[22] = gg_dest_ZTtw_1351
set udg_RandomTree1[23] = gg_dest_ZTtw_3973
set udg_RandomTree2[23] = gg_dest_ZTtw_1361
set udg_RandomTree1[24] = gg_dest_ZTtw_0847
set udg_RandomTree2[24] = gg_dest_ZTtw_1358
set udg_RandomTree1[25] = gg_dest_ZTtw_3820
set udg_RandomTree2[25] = gg_dest_ZTtw_1364
set udg_RandomTree1[26] = gg_dest_ZTtw_3555
set udg_RandomTree2[26] = gg_dest_ZTtw_1365
set udg_RandomTree1[27] = gg_dest_ZTtw_3541
set udg_RandomTree2[27] = gg_dest_ZTtw_1367
set udg_RandomTree1[28] = gg_dest_ZTtw_3725
set udg_RandomTree2[28] = gg_dest_ZTtw_1368
set udg_RandomTree1[29] = gg_dest_ZTtw_3594
set udg_RandomTree2[29] = gg_dest_ZTtw_1378
set udg_RandomTree1[30] = gg_dest_ZTtw_3466
set udg_RandomTree2[30] = gg_dest_ZTtw_1380
set udg_RandomTree1[31] = gg_dest_ZTtw_3797
set udg_RandomTree2[31] = gg_dest_ZTtw_1387
set udg_RandomTree1[32] = gg_dest_ZTtw_3799
set udg_RandomTree2[32] = gg_dest_ZTtw_1381
set udg_RandomTree1[33] = gg_dest_ZTtw_2719
set udg_RandomTree2[33] = gg_dest_ZTtw_1392
set udg_RandomTree1[34] = gg_dest_BTtw_2651
set udg_RandomTree2[34] = gg_dest_BTtw_1393
set udg_RandomTree1[35] = gg_dest_BTtw_1335
set udg_RandomTree2[35] = gg_dest_BTtw_1398
set udg_RandomTree1[36] = gg_dest_BTtw_1332
set udg_RandomTree2[36] = gg_dest_BTtw_1406
set udg_RandomTree1[37] = gg_dest_ZTtw_1914
set udg_RandomTree2[37] = gg_dest_ZTtw_1410
set udg_RandomTree1[38] = gg_dest_ZTtw_2995
set udg_RandomTree2[38] = gg_dest_ZTtw_1414
set udg_RandomTree1[39] = gg_dest_ZTtw_1630
set udg_RandomTree2[39] = gg_dest_ZTtw_1419
set udg_RandomTree1[40] = gg_dest_ZTtw_1426
set udg_RandomTree2[40] = gg_dest_ZTtw_1438
set udg_RandomTree1[41] = gg_dest_ZTtw_1420
set udg_RandomTree2[41] = gg_dest_ZTtw_1431
set udg_RandomTree1[42] = gg_dest_ZTtw_4047
set udg_RandomTree2[42] = gg_dest_ZTtw_1444
set udg_RandomTree1[43] = gg_dest_ZTtw_2425
set udg_RandomTree2[43] = gg_dest_ZTtw_1445
set udg_RandomTree1[44] = gg_dest_ZTtw_1366
set udg_RandomTree2[44] = gg_dest_ZTtw_1454
set udg_RandomTree1[45] = gg_dest_ZTtw_2022
set udg_RandomTree2[45] = gg_dest_ZTtw_1456
// Lost Cave
set udg_Cave[1] = gg_rct_Lost_Cave_SO
set udg_Cave[2] = gg_rct_Lost_Cave_NNO
set udg_Cave[3] = gg_rct_Lost_Cave_NE
set udg_Cave[4] = gg_rct_Lost_Cave_SE
set udg_Cave[5] = gg_rct_Lost_Cave_SSO
set udg_Cave[6] = gg_rct_Lost_Cave_NO
// Hero Building
set udg_Hero_Building[1] = gg_unit_h017_0338
set udg_Hero_Building[2] = gg_unit_h017_0066
set udg_Hero_Building[3] = gg_unit_h017_0097
set udg_Hero_Building[4] = gg_unit_h017_0150
set udg_Hero_Building[5] = gg_unit_h017_0238
set udg_Hero_Building[6] = gg_unit_h017_0204
set udg_Hero_Building[7] = gg_unit_h017_0218
set udg_Hero_Building[8] = gg_unit_h017_0229
set udg_Hero_Building[9] = gg_unit_h017_0339
set udg_Hero_Building[10] = gg_unit_h017_0232
set udg_Hero_Building[11] = gg_unit_h017_0234
set udg_Hero_Building[12] = gg_unit_h017_0235
// Hero Chooser
set udg_Hero_Chooser[1] = gg_unit_h009_0340
set udg_Hero_Chooser[2] = gg_unit_h009_0341
set udg_Hero_Chooser[3] = gg_unit_h009_0342
set udg_Hero_Chooser[4] = gg_unit_h009_0343
set udg_Hero_Chooser[5] = gg_unit_h009_0344
set udg_Hero_Chooser[6] = gg_unit_h009_0345
set udg_Hero_Chooser[7] = gg_unit_h009_0346
set udg_Hero_Chooser[8] = gg_unit_h009_0347
set udg_Hero_Chooser[9] = gg_unit_h009_0348
set udg_Hero_Chooser[10] = gg_unit_h009_0349
set udg_Hero_Chooser[11] = gg_unit_h009_0350
set udg_Hero_Chooser[12] = gg_unit_h009_0351
// Rock types
set udg_Rock[1] = 'h028'
set udg_Rock[2] = 'h029'
set udg_Rock[3] = 'h02A'
set udg_Rock[4] = 'h02B'
set udg_Rock[5] = 'h02C'
set udg_Rock[6] = 'h02D'
set udg_Rock[7] = 'h00W'
set udg_Rock[8] = 'h01J'
set udg_Rock[9] = 'h01N'
set udg_Rock[10] = 'h01W'
set udg_Rock[11] = 'h025'
set udg_Rock[12] = 'h026'
// Plants types
set udg_Plants[1] = 'h00E'
set udg_Plants[2] = 'h00S'
set udg_Plants[3] = 'h00T'
set udg_Plants[4] = 'h00U'
set udg_Plants[5] = 'h02S'
// Map Area
set udg_Area[1] = gg_rct_Area_1
set udg_Area[2] = gg_rct_Area_2
set udg_Area[3] = gg_rct_Area_3
set udg_Area[4] = gg_rct_Area_4
set udg_Area[5] = gg_rct_Area_5
set udg_Area[6] = gg_rct_Area_6
set udg_Area[7] = gg_rct_Area_7
set udg_Area[8] = gg_rct_Area_8
set udg_Area[9] = gg_rct_Area_9
// Unit spawn locations
set udg_ground_normal[1] = gg_rct_GroundNormal001
set udg_ground_normal[2] = gg_rct_GroundNormal002
set udg_ground_normal[3] = gg_rct_GroundNormal003
set udg_ground_normal[4] = gg_rct_GroundNormal004
set udg_ground_normal[5] = gg_rct_GroundNormal005
set udg_ground_normal[6] = gg_rct_GroundNormal006
set udg_ground_normal[7] = gg_rct_GroundNormal007
set udg_ground_normal[8] = gg_rct_GroundNormal008
set udg_ground_normal[9] = gg_rct_GroundNormal009
set udg_ground_normal[10] = gg_rct_GroundNormal010
set udg_ground_normal[11] = gg_rct_GroundNormal011
set udg_ground_normal[12] = gg_rct_GroundNormal012
set udg_ground_normal[13] = gg_rct_GroundNormal013
set udg_ground_normal[14] = gg_rct_GroundNormal014
set udg_ground_normal[15] = gg_rct_GroundNormal015
set udg_ground_normal[16] = gg_rct_GroundNormal016
set udg_ground_normal[17] = gg_rct_GroundNormal017
set udg_ground_normal[18] = gg_rct_GroundNormal018
set udg_ground_normal[19] = gg_rct_GroundNormal019
set udg_ground_normal[20] = gg_rct_GroundNormal020
set udg_ground_normal[21] = gg_rct_GroundNormal021
set udg_ground_normal[22] = gg_rct_GroundNormal022
set udg_ground_normal[23] = gg_rct_GroundNormal023
set udg_ground_normal[24] = gg_rct_GroundNormal024
set udg_ground_normal[25] = gg_rct_GroundNormal025
set udg_ground_normal[26] = gg_rct_GroundNormal026
set udg_ground_normal[27] = gg_rct_GroundNormal027
set udg_ground_normal[28] = gg_rct_GroundNormal028
set udg_ground_normal[29] = gg_rct_GroundNormal029
set udg_ground_normal[30] = gg_rct_GroundNormal030
set udg_ground_normal[31] = gg_rct_GroundNormal031
set udg_ground_normal[32] = gg_rct_GroundNormal032
set udg_ground_normal[33] = gg_rct_GroundNormal033
set udg_ground_normal[34] = gg_rct_GroundNormal034
set udg_ground_normal[35] = gg_rct_GroundNormal035
set udg_ground_normal[36] = gg_rct_GroundNormal036
set udg_ground_normal[37] = gg_rct_GroundNormal037
set udg_ground_normal[38] = gg_rct_GroundNormal038
set udg_ground_normal[39] = gg_rct_GroundNormal039
set udg_ground_normal[40] = gg_rct_GroundNormal040
set udg_ground_normal[41] = gg_rct_GroundNormal041
set udg_ground_normal[42] = gg_rct_GroundNormal042
set udg_ground_normal[43] = gg_rct_GroundNormal043
set udg_ground_normal[44] = gg_rct_GroundNormal044
set udg_ground_normal[45] = gg_rct_GroundNormal045
set udg_ground_normal[46] = gg_rct_GroundNormal046
set udg_ground_normal[47] = gg_rct_GroundNormal047
set udg_ground_normal[48] = gg_rct_GroundNormal048
set udg_ground_normal[49] = gg_rct_GroundNormal049
set udg_ground_normal[50] = gg_rct_GroundNormal050
set udg_ground_normal[51] = gg_rct_GroundNormal051
set udg_ground_normal[52] = gg_rct_GroundNormal052
set udg_ground_normal[53] = gg_rct_GroundNormal053
set udg_ground_normal[54] = gg_rct_GroundNormal054
set udg_ground_normal[55] = gg_rct_GroundNormal055
set udg_ground_normal[56] = gg_rct_GroundNormal056
set udg_ground_normal[57] = gg_rct_GroundNormal057
set udg_ground_normal[58] = gg_rct_GroundNormal058
set udg_ground_normal[59] = gg_rct_GroundNormal059
set udg_ground_normal[60] = gg_rct_GroundNormal060
set udg_ground_normal[61] = gg_rct_GroundNormal061
set udg_ground_normal[62] = gg_rct_GroundNormal062
set udg_ground_normal[63] = gg_rct_GroundNormal063
set udg_ground_normal[64] = gg_rct_GroundNormal064
set udg_ground_normal[65] = gg_rct_GroundNormal065
set udg_ground_normal[66] = gg_rct_GroundNormal066
set udg_ground_normal[67] = gg_rct_GroundNormal067
set udg_ground_normal[68] = gg_rct_GroundNormal068
set udg_ground_normal[69] = gg_rct_GroundNormal069
set udg_ground_normal[70] = gg_rct_GroundNormal070
set udg_ground_normal[71] = gg_rct_GroundNormal071
set udg_ground_normal[72] = gg_rct_GroundNormal072
set udg_ground_normal[73] = gg_rct_GroundNormal073
set udg_ground_normal[74] = gg_rct_GroundNormal074
set udg_ground_normal[75] = gg_rct_GroundNormal075
set udg_ground_normal[76] = gg_rct_GroundNormal076
set udg_ground_normal[77] = gg_rct_GroundNormal077
set udg_ground_normal[78] = gg_rct_GroundNormal078
set udg_ground_normal[79] = gg_rct_GroundNormal079
set udg_ground_normal[80] = gg_rct_GroundNormal080
set udg_ground_normal[81] = gg_rct_GroundNormal081
set udg_ground_normal[82] = gg_rct_GroundNormal082
set udg_ground_normal[83] = gg_rct_GroundNormal083
set udg_ground_normal[84] = gg_rct_GroundNormal084
set udg_ground_normal[85] = gg_rct_GroundNormal085
set udg_ground_normal[86] = gg_rct_GroundNormal086
set udg_water_normal[1] = gg_rct_WaterNormal001
set udg_water_normal[2] = gg_rct_WaterNormal002
set udg_water_normal[3] = gg_rct_WaterNormal003
set udg_water_normal[4] = gg_rct_WaterNormal004
set udg_water_normal[5] = gg_rct_WaterNormal005
set udg_water_normal[6] = gg_rct_WaterNormal006
set udg_water_normal[7] = gg_rct_WaterNormal007
set udg_water_normal[8] = gg_rct_WaterNormal008
set udg_water_normal[9] = gg_rct_WaterNormal009
set udg_water_normal[10] = gg_rct_WaterNormal010
set udg_water_normal[11] = gg_rct_WaterNormal011
set udg_water_normal[12] = gg_rct_WaterNormal012
set udg_water_normal[13] = gg_rct_WaterNormal013
set udg_water_normal[14] = gg_rct_WaterNormal014
set udg_water_normal[15] = gg_rct_WaterNormal015
set udg_water_normal[16] = gg_rct_WaterNormal016
set udg_water_normal[17] = gg_rct_WaterNormal017
set udg_water_normal[18] = gg_rct_WaterNormal018
set udg_water_normal[19] = gg_rct_WaterNormal019
set udg_water_normal[20] = gg_rct_WaterNormal020
set udg_water_normal[21] = gg_rct_WaterNormal021
set udg_water_normal[22] = gg_rct_WaterNormal022
set udg_water_normal[23] = gg_rct_WaterNormal023
set udg_water_normal[24] = gg_rct_WaterNormal024
set udg_water_normal[25] = gg_rct_WaterNormal025
set udg_water_normal[26] = gg_rct_WaterNormal026
set udg_water_normal[27] = gg_rct_WaterNormal027
set udg_water_normal[28] = gg_rct_WaterNormal028
set udg_water_normal[29] = gg_rct_WaterNormal029
set udg_water_normal[30] = gg_rct_WaterNormal030
set udg_water_normal[31] = gg_rct_WaterNormal031
set udg_water_normal[32] = gg_rct_WaterNormal032
set udg_water_normal[33] = gg_rct_WaterNormal033
set udg_water_normal[34] = gg_rct_WaterNormal034
set udg_water_normal[35] = gg_rct_WaterNormal035
set udg_water_normal[36] = gg_rct_WaterNormal036
set udg_water_normal[37] = gg_rct_WaterNormal037
set udg_water_normal[38] = gg_rct_WaterNormal038
set udg_water_normal[39] = gg_rct_WaterNormal039
set udg_water_normal[40] = gg_rct_WaterNormal040
set udg_water_normal[41] = gg_rct_WaterNormal041
set udg_water_normal[42] = gg_rct_WaterNormal042
set udg_water_normal[43] = gg_rct_WaterNormal043
set udg_water_normal[44] = gg_rct_WaterNormal044
set udg_water_normal[45] = gg_rct_WaterNormal045
set udg_water_normal[46] = gg_rct_WaterNormal046
set udg_water_normal[47] = gg_rct_WaterNormal047
set udg_water_normal[48] = gg_rct_WaterNormal048
set udg_water_normal[49] = gg_rct_WaterNormal049
set udg_water_normal[50] = gg_rct_WaterNormal050
set udg_water_normal[51] = gg_rct_WaterNormal051
set udg_water_normal[52] = gg_rct_WaterNormal052
set udg_water_normal[53] = gg_rct_WaterNormal053
set udg_water_normal[54] = gg_rct_WaterNormal054
set udg_ground_vermin[1] = gg_rct_GroundVermin001
set udg_ground_vermin[2] = gg_rct_GroundVermin002
set udg_ground_vermin[3] = gg_rct_GroundVermin003
set udg_ground_vermin[4] = gg_rct_GroundVermin004
set udg_ground_vermin[5] = gg_rct_GroundVermin005
set udg_ground_vermin[6] = gg_rct_GroundVermin006
set udg_ground_vermin[7] = gg_rct_GroundVermin007
set udg_ground_vermin[8] = gg_rct_GroundVermin008
set udg_ground_vermin[9] = gg_rct_GroundVermin009
set udg_ground_vermin[10] = gg_rct_GroundVermin010
set udg_ground_vermin[11] = gg_rct_GroundVermin011
set udg_ground_vermin[12] = gg_rct_GroundVermin012
set udg_ground_vermin[13] = gg_rct_GroundVermin013
set udg_ground_vermin[14] = gg_rct_GroundVermin014
set udg_ground_vermin[15] = gg_rct_GroundVermin015
set udg_ground_vermin[16] = gg_rct_GroundVermin016
set udg_ground_vermin[17] = gg_rct_GroundVermin017
set udg_ground_vermin[18] = gg_rct_GroundVermin018
set udg_ground_vermin[19] = gg_rct_GroundVermin019
set udg_ground_vermin[20] = gg_rct_GroundVermin020
set udg_ground_vermin[21] = gg_rct_GroundVermin021
set udg_ground_vermin[22] = gg_rct_GroundVermin022
set udg_ground_vermin[23] = gg_rct_GroundVermin023
set udg_ground_vermin[24] = gg_rct_GroundVermin024
set udg_ground_vermin[25] = gg_rct_GroundVermin025
set udg_ground_vermin[26] = gg_rct_GroundVermin026
set udg_ground_vermin[27] = gg_rct_GroundVermin027
set udg_ground_vermin[28] = gg_rct_GroundVermin028
set udg_ground_vermin[29] = gg_rct_GroundVermin029
set udg_ground_vermin[30] = gg_rct_GroundVermin030
set udg_ground_vermin[31] = gg_rct_GroundVermin031
set udg_ground_vermin[32] = gg_rct_GroundVermin032
set udg_ground_vermin[33] = gg_rct_GroundVermin033
set udg_ground_vermin[34] = gg_rct_GroundVermin034
set udg_ground_vermin[35] = gg_rct_GroundVermin035
set udg_ground_vermin[36] = gg_rct_GroundVermin036
set udg_ground_vermin[37] = gg_rct_GroundVermin037
set udg_ground_vermin[38] = gg_rct_GroundVermin038
set udg_ground_vermin[39] = gg_rct_GroundVermin039
set udg_ground_vermin[40] = gg_rct_GroundVermin040
set udg_ground_vermin[41] = gg_rct_GroundVermin041
set udg_ground_vermin[42] = gg_rct_GroundVermin042
set udg_ground_big[1] = gg_rct_GroundBig001
set udg_ground_big[2] = gg_rct_GroundBig002
set udg_ground_big[3] = gg_rct_GroundBig003
set udg_ground_big[4] = gg_rct_GroundBig004
set udg_water_piranha[1] = gg_rct_Pirahnas_1
set udg_water_piranha[2] = gg_rct_Pirahnas_2
set udg_water_piranha[3] = gg_rct_Pirahnas_3
set udg_water_piranha[4] = gg_rct_Pirahnas_4
set udg_water_big[1] = gg_rct_WaterBig001
set udg_water_big[2] = gg_rct_WaterBig002
set udg_water_big[3] = gg_rct_WaterBig003
set udg_water_big[4] = gg_rct_WaterBig004
set udg_ground_food[1] = gg_rct_Food001
set udg_ground_food[2] = gg_rct_Food002
set udg_ground_food[3] = gg_rct_Food003
set udg_ground_food[4] = gg_rct_Food004
set udg_ground_food[5] = gg_rct_Food005
set udg_ground_food[6] = gg_rct_Food006
set udg_ground_food[7] = gg_rct_Food007
set udg_ground_food[8] = gg_rct_Food008
set udg_ground_food[9] = gg_rct_Food009
set udg_ground_food[10] = gg_rct_Food010
set udg_ground_food[11] = gg_rct_Food011
set udg_ground_food[12] = gg_rct_Food012
set udg_ground_food[13] = gg_rct_Food013
set udg_ground_food[14] = gg_rct_Food014
set udg_ground_food[15] = gg_rct_Food015
set udg_ground_food[16] = gg_rct_Food016
set udg_ground_food[17] = gg_rct_Food017
set udg_ground_food[18] = gg_rct_Food018
set udg_ground_food[19] = gg_rct_Food019
set udg_ground_food[20] = gg_rct_Food020
set udg_ground_food[21] = gg_rct_Food021
set udg_ground_food[22] = gg_rct_Food022
set udg_ground_food[23] = gg_rct_Food023
set udg_ground_food[24] = gg_rct_Food024
set udg_ground_food[25] = gg_rct_Food025
set udg_ground_food[26] = gg_rct_Food026
set udg_ground_food[27] = gg_rct_Food027
set udg_ground_food[28] = gg_rct_Food028
set udg_ground_food[29] = gg_rct_Food029
set udg_ground_food[30] = gg_rct_Food030
set udg_ground_food[31] = gg_rct_Food031
set udg_ground_food[32] = gg_rct_Food032
set udg_ground_food[33] = gg_rct_Food033
set udg_ground_food[34] = gg_rct_Food034
set udg_ground_food[35] = gg_rct_Food035
set udg_ground_food[36] = gg_rct_Food036
set udg_ground_food[37] = gg_rct_Food037
set udg_ground_food[38] = gg_rct_Food038
set udg_ground_food[39] = gg_rct_Food039
set udg_ground_food[40] = gg_rct_Food040
set udg_ground_food[41] = gg_rct_Food041
set udg_ground_food[42] = gg_rct_Food042
set udg_ground_food[43] = gg_rct_Food043
set udg_ground_food[44] = gg_rct_Food044
set udg_ground_food[45] = gg_rct_Food045
set udg_ground_food[46] = gg_rct_Food046
set udg_ground_food[47] = gg_rct_Food047
set udg_ground_food[48] = gg_rct_Food048
set udg_ground_food[49] = gg_rct_Food049
set udg_ground_food[50] = gg_rct_Food050
set udg_ground_food[51] = gg_rct_Food051
set udg_ground_food[52] = gg_rct_Food052
set udg_ground_food[53] = gg_rct_Food053
set udg_ground_food[54] = gg_rct_Food054
set udg_ground_food[55] = gg_rct_Food055
set udg_ground_food[56] = gg_rct_Food056
set udg_ground_food[57] = gg_rct_Food057
set udg_ground_food[58] = gg_rct_Food058
set udg_ground_food[59] = gg_rct_Food059
set udg_ground_food[60] = gg_rct_Food060
set udg_ground_food[61] = gg_rct_Food061
set udg_ground_food[62] = gg_rct_Food062
set udg_ground_food[63] = gg_rct_Food063
set udg_ground_food[64] = gg_rct_Food064
set udg_ground_food[65] = gg_rct_Food065
set udg_ground_food[66] = gg_rct_Food066
set udg_ground_food[67] = gg_rct_Food067
set udg_ground_food[68] = gg_rct_Food068
set udg_ground_food[69] = gg_rct_Food069
set udg_ground_food[70] = gg_rct_Food070
set udg_minerals[1] = gg_rct_Minerals001
set udg_minerals[2] = gg_rct_Minerals002
set udg_minerals[3] = gg_rct_Minerals003
set udg_minerals[4] = gg_rct_Minerals004
set udg_minerals[5] = gg_rct_Minerals005
set udg_minerals[6] = gg_rct_Minerals006
set udg_minerals[7] = gg_rct_Minerals007
set udg_minerals[8] = gg_rct_Minerals008
set udg_minerals[9] = gg_rct_Minerals009
set udg_minerals[10] = gg_rct_Minerals010
set udg_minerals[11] = gg_rct_Minerals011
set udg_minerals[12] = gg_rct_Minerals012
set udg_minerals[13] = gg_rct_Minerals013
set udg_minerals[14] = gg_rct_Minerals014
set udg_minerals[15] = gg_rct_Minerals015
set udg_minerals[16] = gg_rct_Minerals016
set udg_minerals[17] = gg_rct_Minerals017
set udg_minerals[18] = gg_rct_Minerals018
set udg_minerals[19] = gg_rct_Minerals019
set udg_minerals[20] = gg_rct_Minerals020
set udg_minerals[21] = gg_rct_Minerals021
set udg_minerals[22] = gg_rct_Minerals022
set udg_minerals[23] = gg_rct_Minerals023
set udg_minerals[24] = gg_rct_Minerals024
// --------------- Color Variable ---------------
// Player color
set udg_Color[1] = "|c00FF0303"
set udg_Color[2] = "|c000042FF"
set udg_Color[3] = "|c001CE6B9"
set udg_Color[4] = "|c00540081"
set udg_Color[5] = "|c00FFFC01"
set udg_Color[6] = "|c00fEBA0E"
set udg_Color[7] = " |c0020C000"
set udg_Color[8] = "|c00E55BB0"
set udg_Color[9] = "|c00959697"
set udg_Color[10] = " |c007EBFF1"
set udg_Color[11] = " |c00106246"
set udg_Color[12] = "|c004E2A04"
// ProgressBar color
set udg_Color[13] = "|cffFF0000"
set udg_Color[14] = "|cffFF8040"
set udg_Color[15] = "|cffFFFF00"
set udg_Color[16] = "|cff00D500"
set udg_Color[17] = "|cff009D00"
set udg_Color[18] = "|Cfffed312"
set udg_Color[19] = "|CFFFFFFFF"
set udg_Color[20] = "|Cffffcc00"
set udg_Color[21] = "|Cffff0000"
set udg_Color[22] = "|Cffffff00"
set udg_Color[23] = "|cff808080"
// Taunt Variable
set udg_TauntVerbs[1] = "smash "
set udg_TauntVerbs[2] = "rip off "
set udg_TauntVerbs[3] = "kick "
set udg_TauntVerbs[4] = "hit "
set udg_TauntVerbs[5] = "break "
set udg_TauntVerbs[6] = "bash "
set udg_TauntVerbs[7] = "beat "
set udg_TauntVerbs[8] = "strike "
set udg_TauntVerbs[9] = "tear apart "
set udg_TauntVerbs[10] = "cut off "
set udg_TauntVerbs[11] = "eat "
set udg_TauntVerbs[12] = "cripple "
set udg_TauntVerbs[13] = "cook "
set udg_TauntVerbs[14] = "boil "
set udg_TauntVerbs[15] = "roast "
set udg_TauntAdjectives[1] = "ya brainless head, "
set udg_TauntAdjectives[2] = "ya bloody heart, "
set udg_TauntAdjectives[3] = "ya stoopid ass, "
set udg_TauntAdjectives[4] = "ye testicles, "
set udg_TauntAdjectives[5] = "ya ugly face, "
set udg_TauntAdjectives[6] = "ye limbz, "
set udg_TauntAdjectives[7] = "ya bloody liver, "
set udg_TauntAdjectives[8] = "ya offspring, "
set udg_TauntAdjectives[9] = "ya twisted neck, "
set udg_TauntAdjectives[10] = "ya fat old butt, "
set udg_TauntAdjectives[11] = "ya uzeless brainz, "
set udg_TauntAdjectives[12] = "ye eyez, "
set udg_TauntAdjectives[13] = "ye cursed handz, "
set udg_TauntAdjectives[14] = "ye crooked legz, "
set udg_TauntAdjectives[15] = "ye bonez, "
set udg_TauntTribes[1] = "haz no Honor"
set udg_TauntTribes[2] = "be full of cowardz"
set udg_TauntTribes[3] = "stinkz"
set udg_TauntTribes[4] = "be too stoopid to live"
set udg_TauntTribes[5] = "will be eaten by uz"
// Color Bar Variable
set udg_ProgressBar[1] = "|cffFF0000II|r"
set udg_ProgressBar[2] = ( "|cffFF0000II|r" + "|cffFF8040II|r" )
set udg_ProgressBar[3] = ( "|cffFF0000II|r" + ( "|cffFF8040II|r" + "|cffFFFF00II|r" ) )
set udg_ProgressBar[4] = ( "|cffFF0000II|r" + ( "|cffFF8040II|r" + ( "|cffFFFF00II|r" + "|cff00D500II|r" ) ) )
set udg_ProgressBar[5] = ( "|cffFF0000II|r" + ( "|cffFF8040II|r" + ( "|cffFFFF00II|r" + ( "|cff00D500II|r" + "|cff009D00II|r" ) ) ) )
set udg_ProgressBar[6] = "|cffFF8040Done !!|r"
set udg_ProgressBar[18] = "|cff00D500 4 |r"
set udg_ProgressBar[19] = "|cffFFFF00 3 ! |r"
set udg_ProgressBar[20] = "|cffFF8040 2 !! |r"
set udg_ProgressBar[21] = "|cffFF0000 1 !!! |r"
// Fishing bonus special items Type
// All Water
set udg_FishingItem[1] = 'I00P'
set udg_FishingItem[2] = 'ciri'
set udg_FishingItem[3] = 'I036'
set udg_FishingItem[4] = 'I022'
set udg_FishingItem[5] = 'I06A'
set udg_FishingItem[6] = 'I09B'
set udg_FishingItem[7] = 'I09I'
set udg_FishingItem[8] = 'I047'
set udg_FishingItem[9] = 'I05U'
set udg_FishingItem[10] = 'I01W'
set udg_FishingItem[11] = 'I00Z'
set udg_FishingItem[12] = 'I08Y'
set udg_FishingItem[13] = 'I07A'
set udg_FishingItem[14] = 'I077'
set udg_FishingItem[15] = 'I07L'
set udg_FishingItem[16] = 'I03W'
set udg_FishingItem[17] = 'I03X'
set udg_FishingItem[18] = 'I03V'
set udg_FishingItem[19] = 'I054'
set udg_FishingItem[20] = 'I042'
// "Junk" Type
set udg_Junk[1] = 'I0AM'
set udg_Junk[2] = 'I012'
set udg_Junk[3] = 'I01A'
set udg_Junk[4] = 'I01B'
set udg_Junk[5] = 'I012'
set udg_Junk[6] = 'I012'
set udg_Junk[7] = 'I01C'
set udg_Junk[8] = 'I01D'
set udg_Junk[9] = 'I0AM'
set udg_Junk[10] = 'I004'
// "Junk" Type pirahnas
set udg_Junk[11] = 'I00E'
set udg_Junk[12] = 'I004'
set udg_Junk[13] = 'I00D'
set udg_Junk[14] = 'I012'
set udg_Junk[15] = 'I00E'
set udg_Junk[16] = 'I012'
set udg_Junk[17] = 'I004'
set udg_Junk[18] = 'I00D'
set udg_Junk[19] = 'I0AM'
set udg_Junk[20] = 'I054'
// DeepWaterType
set udg_FishCaught[1] = 'n00A'
set udg_FishCaught[2] = 'n00B'
set udg_FishCaught[3] = 'n012'
set udg_FishCaught[4] = 'n018'
set udg_FishCaught[5] = 'n00A'
set udg_FishCaught[6] = 'n00B'
set udg_FishCaught[7] = 'n016'
set udg_FishCaught[8] = 'n009'
set udg_FishCaught[9] = 'n00A'
set udg_FishCaught[10] = 'n00P'
set udg_FishCaught[11] = 'n00B'
set udg_FishCaught[12] = 'n012'
set udg_FishCaught[13] = 'n018'
set udg_FishCaught[14] = 'n00A'
set udg_FishCaught[15] = 'nska'
set udg_FishCaught[16] = 'n02N'
set udg_FishCaught[17] = 'n00B'
set udg_FishCaught[18] = 'n00A'
set udg_FishCaught[19] = 'n012'
set udg_FishCaught[20] = 'n016'
// ShallowWaterType
set udg_FishCaught[21] = 'n00B'
set udg_FishCaught[22] = 'n001'
set udg_FishCaught[23] = 'n00A'
set udg_FishCaught[24] = 'n00B'
set udg_FishCaught[25] = 'n012'
set udg_FishCaught[26] = 'n018'
set udg_FishCaught[27] = 'n00A'
set udg_FishCaught[28] = 'n00B'
set udg_FishCaught[29] = 'n007'
set udg_FishCaught[30] = 'n017'
set udg_FishCaught[31] = 'n00P'
set udg_FishCaught[32] = 'n00A'
set udg_FishCaught[33] = 'n00B'
set udg_FishCaught[34] = 'n007'
set udg_FishCaught[35] = 'n018'
set udg_FishCaught[36] = 'n012'
set udg_FishCaught[37] = 'n00D'
set udg_FishCaught[38] = 'n00C'
set udg_FishCaught[39] = 'n00A'
set udg_FishCaught[40] = 'n001'
// WaterFall Type
set udg_FishCaught[41] = 'n012'
set udg_FishCaught[42] = 'n00B'
set udg_FishCaught[43] = 'n00A'
set udg_FishCaught[44] = 'n007'
set udg_FishCaught[45] = 'n001'
set udg_FishCaught[46] = 'n012'
set udg_FishCaught[47] = 'n00B'
set udg_FishCaught[48] = 'n00A'
set udg_FishCaught[49] = 'n018'
set udg_FishCaught[50] = 'n00P'
set udg_FishCaught[51] = 'n016'
set udg_FishCaught[52] = 'n012'
set udg_FishCaught[53] = 'n00B'
set udg_FishCaught[54] = 'n016'
set udg_FishCaught[55] = 'n02N'
set udg_FishCaught[56] = 'n012'
set udg_FishCaught[57] = 'n00B'
set udg_FishCaught[58] = 'n00A'
set udg_FishCaught[59] = 'n007'
set udg_FishCaught[60] = 'n012'
// Pirahnas Pond Type
set udg_FishCaught[61] = 'n018'
set udg_FishCaught[62] = 'n01Y'
set udg_FishCaught[63] = 'n00B'
set udg_FishCaught[64] = 'n00A'
set udg_FishCaught[65] = 'n018'
set udg_FishCaught[66] = 'n01Y'
set udg_FishCaught[67] = 'n007'
set udg_FishCaught[68] = 'n017'
set udg_FishCaught[69] = 'n00Q'
set udg_FishCaught[70] = 'n018'
set udg_FishCaught[71] = 'n01Y'
set udg_FishCaught[72] = 'n00B'
set udg_FishCaught[73] = 'n00Q'
set udg_FishCaught[74] = 'n00D'
set udg_FishCaught[75] = 'n018'
set udg_FishCaught[76] = 'n01Y'
set udg_FishCaught[77] = 'n00B'
set udg_FishCaught[78] = 'n00A'
set udg_FishCaught[79] = 'n007'
set udg_FishCaught[80] = 'n018'
// SecretDeep Water Type
set udg_FishCaught[81] = 'n00A'
set udg_FishCaught[82] = 'n00B'
set udg_FishCaught[83] = 'n012'
set udg_FishCaught[84] = 'n00A'
set udg_FishCaught[85] = 'n018'
set udg_FishCaught[86] = 'n02N'
set udg_FishCaught[87] = 'n00B'
set udg_FishCaught[88] = 'n00A'
set udg_FishCaught[89] = 'n009'
set udg_FishCaught[90] = 'n016'
set udg_FishCaught[91] = 'n012'
set udg_FishCaught[92] = 'n00A'
set udg_FishCaught[93] = 'n00C'
set udg_FishCaught[94] = 'n016'
set udg_FishCaught[95] = 'n00B'
set udg_FishCaught[96] = 'n00A'
set udg_FishCaught[97] = 'n00P'
set udg_FishCaught[98] = 'n018'
set udg_FishCaught[99] = 'n012'
set udg_FishCaught[100] = 'nska'
// HotSpring Water Type
set udg_FishCaught[101] = 'n001'
set udg_FishCaught[102] = 'n001'
set udg_FishCaught[103] = 'n001'
set udg_FishCaught[104] = 'n001'
set udg_FishCaught[105] = 'n001'
set udg_FishCaught[106] = 'n016'
set udg_FishCaught[107] = 'n016'
set udg_FishCaught[108] = 'n016'
set udg_FishCaught[109] = 'n02N'
set udg_FishCaught[110] = 'n02N'
set udg_FishCaught[111] = 'n00C'
set udg_FishCaught[112] = 'n02C'
set udg_FishCaught[113] = 'n009'
set udg_FishCaught[114] = 'n00D'
set udg_FishCaught[115] = 'n00F'
set udg_FishCaught[116] = 'n007'
set udg_FishCaught[117] = 'n007'
set udg_FishCaught[118] = 'n017'
set udg_FishCaught[119] = 'n00P'
set udg_FishCaught[120] = 'u001'
call SetUnitUserData( gg_unit_h01R_0069, 13 )
// Quest Menus
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_020", "TRIGSTR_048", "ReplaceableTextures\\PassiveButtons\\PASBTNDrum.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_5601", "TRIGSTR_5602", "ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_050", "THANKS TO
- A.Dominion for creating the original Jungle Troll Tribes (5.5) and for his great work on the map after joining it again in version 3.7+
- Dark_Angel for his ideas, in-game help and beta-testing
- beta-testers Inhyper, Plah, Weinlock, LFC, Day-Elven
- resource contributors from the Hive Workshop
- Cindy Nyan for the awesome loading screen picture
- Meur for reviving the game after patch 1.24
- Dangerb0y for implementing the stacking system
- ElloElloEllo for the weapon models
- Daehun Kim for fixing major bugs
- BloodForBlood for reviving the game after Warcraft 3 Reforged and implementing key content", "ReplaceableTextures\\CommandButtons\\BTNMedalionOfCourage.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_207", "To download the latest version go to:
http://sites.google.com/site/jungletrolls
www.hiveworkshop.com
www.epicwar.com", "ReplaceableTextures\\CommandButtons\\BTNAttackGround.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "Contact", "Email: [email protected]
Discord server: https://discord.gg/q4SNMYfV3E", "ReplaceableTextures\\CommandButtons\\BTNBacktoWork.blp" )
endfunction
//===========================================================================
function InitTrig_Map_Variables_Ini_JASS takes nothing returns nothing
set gg_trg_Map_Variables_Ini_JASS = CreateTrigger()
call TriggerAddAction( gg_trg_Map_Variables_Ini_JASS, function Actions )
call TriggerRegisterTimerEvent(gg_trg_Map_Variables_Ini_JASS, 0.20, false)
endfunction
function SpawnActions takes nothing returns nothing
call Spawn1()
call TriggerSleepAction(0.10)
call Spawn2()
call TriggerSleepAction(0.10)
call Spawn3()
call TriggerSleepAction(0.10)
call Spawn4()
call TriggerSleepAction(0.10)
call Spawn5()
call TriggerSleepAction(0.10)
call Spawn6()
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_SpawnLauncher_JASS takes nothing returns nothing
set gg_trg_SpawnLauncher_JASS = CreateTrigger()
call TriggerAddAction( gg_trg_SpawnLauncher_JASS, function SpawnActions )
endfunction
library Beast
globals
// eggs
constant integer ALLIGATOR_EGG_ID = 'h01Q'
constant integer BIRDNEST_G_ID = 'h032'
constant integer BIRDNEST_A_ID = 'h02U'
constant integer VULTURENEST_G_ID = 'h033'
constant integer VULTURENEST_A_ID = 'h02V'
constant integer TORTOISE_EGG_ID = 'h02I'
constant integer SNAKE_EGG_ID = 'h019'
constant integer UGLYFROG_EGG_ID = 'h02X'
constant integer SPIDER_EGGBAG_ID = 'h01C'
constant integer WEBLAIR_ID = 'h018'
// Pest
constant integer BLACKPIRANHA_ID = 'n01Y'
constant integer PIRANHA_ID = 'n018'
constant integer MOSQUITOES_ID = 'h02F'
constant integer CARNIVORPLANT_ID = 'hMEP'
constant integer RAT_ID = 'h02H'
constant integer MANGYRAT_ID = 'h01O'
constant integer ANACONDA_ID = 'n00J'
constant integer JUNGLEASPIC_ID = 'n00D'
constant integer JUNGLEVIPER_ID = 'n00F'
constant integer BLACKWIDOW_ID = 'n004'
constant integer TARENTULA_ID = 'n01A'
constant integer TARENTULAQUEEN_ID = 'n02P'
constant integer MONSTER_1_ID = 'n00U'
constant integer MONSTER_2_ID = 'n00X'
constant integer MONSTER_3_ID = 'n015'
// rock
constant integer ROCK1_ID = 'h028'
constant integer ROCK2_ID = 'h029'
constant integer ROCK3_ID = 'h02A'
constant integer ROCK4_ID = 'h02B'
constant integer ROCK5_ID = 'h02C'
constant integer ROCK6_ID = 'h02D'
constant integer ROCK7_ID = 'h00W'
constant integer ROCK8_ID = 'h01J'
constant integer ROCK9_ID = 'h01N'
constant integer ROCK10_ID = 'h01W'
constant integer ROCK11_ID = 'h025'
constant integer ROCK12_ID = 'h026'
// building
constant integer TENTB_ID = 'h016'
constant integer TENTS_ID = 'h00K'
constant integer TENTP_ID = 'h015'
constant integer TENTHB_ID = 'h00Z'
constant integer TENTHS_ID = 'h00G'
constant integer TENTHP_ID = 'h00Y'
constant integer CAULDRON_A_ID = 'h00I'
constant integer CAULDRON_C_ID = 'h02J'
constant integer FORGE_A_ID = 'h00H'
constant integer FORGE_S_ID = 'h02Y'
constant integer TANNER_A_ID = 'h021'
constant integer TANNER_B_ID = 'h022'
constant integer WORKSHOP_A_ID = 'h00O'
constant integer WORKSHOP_B_ID = 'h02G'
constant integer VOODOO_A_ID = 'h006'
constant integer VOODOO_B_ID = 'h024'
constant integer VOODOO_C_ID = 'h00C'
constant integer TOTEM_ID = 'h004'
constant integer HUTT_ID = 'h005'
constant integer MERCHANT_A_ID = 'h013'
constant integer MERCHANT_B_ID = 'h01Z'
constant integer MERCHANT_C_ID = 'h02M'
constant integer ARMORY_A_ID = 'h008'
constant integer ARMORY_B_ID = 'h023'
constant integer TOWER_A_ID = 'h01I'
constant integer TOWER_B_ID = 'h01K'
constant integer TOWER_C_ID = 'h01M'
constant integer TOWER_D_ID = 'h01L'
// heroes
constant integer WARRIOR_ID = 'H003'
constant integer HUNTER_ID = 'H001'
constant integer SHAMAN_ID = 'H002'
constant integer INVENTOR_ID = 'H000'
// hunter pets
constant integer DOG1_ID = 'n00Y'
constant integer DOG2_ID = 'n01R'
constant integer DOG3_ID = 'n01Q'
constant integer DOG4_ID = 'n01P'
constant integer DOG5_ID = 'n01S'
constant integer DOG6_ID = 'n00V'
constant integer HAWK1_ID = 'n01H'
constant integer HAWK2_ID = 'n01U'
constant integer HAWK3_ID = 'n01T'
constant integer HAWK4_ID = 'n01I'
// birds and Froll
constant integer JUNGLEBIRD_ID = 'n02G'
constant integer BIGJUNGLEBIRD_ID = 'n00O'
constant integer VULTURE_ID = 'n00E'
constant integer GRIFFONVULTURE_ID = 'n00H'
constant integer FROLL_ID = 'u001'
constant integer WARFROLL_ID = 'u002'
constant integer FROLLHUTT_ID = 'nmg1'
constant integer UGLYFROG_ID = 'n01B'
constant integer FATUGLYFROG_ID = 'n01D'
constant integer HARPOON_ID = 'I0AG'
// Boss and zombies
constant integer BIGBADWOLF_ID = 'n01E'
constant integer GIANTVULTURE_ID = 'n01L'
constant integer GRIZZLI_ID = 'n01C'
constant integer COMODODRAGON_ID = 'n010'
constant integer ANTELOPE_Z_ID = 'n01X'
constant integer RIVERCRAB_Z_ID = 'n021'
constant integer SABERCAT_Z_ID = 'n02S'
constant integer ALLIGATOR_Z_ID = 'n01V'
constant integer TARENTULA_Z_ID = 'n024'
constant integer SNAKE_Z_ID = 'n020'
constant integer BLACKWIDOW_Z_ID = 'n02T'
constant integer VULTURE_Z_ID = 'n029'
constant integer RACOON_Z_ID = 'n023'
constant integer BOAR_Z_ID = 'n02I'
constant integer TORTOISE_Z_ID = 'n026'
constant integer GIANTTORTOISE_Z_ID = 'n01Z'
constant integer RABBIT_Z_ID = 'n022'
constant integer BEAR_Z_ID = 'n01W'
constant integer STAG_Z_ID = 'n00I'
constant integer TROLL_Z_ID = 'u000'
// animals water
constant integer HERMITCRAB_ID = 'n001'
constant integer RIVERCRAB_ID = 'n016'
constant integer IMPERCRAB_ID = 'n02N'
constant integer ALLIGATORHATCHLING_ID = 'n02C'
constant integer ALLIGATOR_ID = 'n009'
constant integer GIANTALLIGATOR_ID = 'n02K'
constant integer CROCODILE_ID = 'ntrg'
constant integer FROG_ID = 'n007'
constant integer BULLFROG_ID = 'n017'
constant integer POISONFROG_ID = 'nskg'
constant integer TORTOISE_ID = 'n00C'
constant integer GIANTTORTOISE_ID = 'n014'
constant integer ANCIENTTORTOISE_ID = 'n02M'
// animals ground
constant integer PIGLET_ID = 'n02A'
constant integer BOAR_ID = 'n002'
constant integer FATHOG_ID = 'n02R'
constant integer RAZORBACK_ID = 'nwen'
constant integer ANTELOPEFAWN_ID = 'n01K'
constant integer ANTELOPE_ID = 'n01J'
constant integer ANTELOPESTAG_ID = 'n01M'
constant integer ROYALSTAG_ID = 'njg1'
constant integer RACOONCUB_ID = 'n02E'
constant integer RACOON_ID = 'n006'
constant integer FATRACOON_ID = 'n02O'
constant integer BUNNY_ID = 'n02D'
constant integer RABBIT_ID = 'n005'
constant integer FATRABBIT_ID = 'n02J'
constant integer SABERKITTEN_ID = 'n02F'
constant integer SABERCAT_ID = 'n003'
constant integer OLDSABERCAT_ID = 'n02Q'
constant integer SABERLION_ID = 'nwwg'
constant integer BEARCUB_ID = 'n02B'
constant integer BEAR_ID = 'n008'
constant integer OLDBEAR_ID = 'n02L'
constant integer CAVEBEAR_ID = 'nwlg'
// plants and bees
constant integer BEEHIVE_ID = 'h036'
constant integer BEEQUEEN_ID = 'h035'
constant integer ARIA_ID = 'h00E'
constant integer BARDANE_ID = 'h00S'
constant integer CORIAN_ID = 'h00T'
constant integer DRAXIMOR_ID = 'h00U'
constant integer BERRYBUSH_ID = 'h00M'
constant integer BERRYSAPPLING_ID = 'h02S'
constant integer CARNIVORBUSH_ID = 'h02O'
endglobals
function Spawn1 takes nothing returns nothing
local real x
local real y
local integer i = 1
set x = GetRandomReal(GetRectMinX(gg_rct_Mojo_Anaconda), GetRectMaxX(gg_rct_Mojo_Anaconda))
set y = GetRandomReal(GetRectMinY(gg_rct_Mojo_Anaconda), GetRectMaxY(gg_rct_Mojo_Anaconda))
call CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ANACONDA_ID, x, y, bj_UNIT_FACING )
set x = GetRectCenterX(gg_rct_Secret_Deep_Zone)
set y = GetRectCenterY(gg_rct_Secret_Deep_Zone)
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), JUNGLEBIRD_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
loop
exitwhen i > 9
set x = GetRandomReal(GetRectMinX(udg_Area[i]), GetRectMaxX(udg_Area[i]))
set y = GetRandomReal(GetRectMinY(udg_Area[i]), GetRectMaxY(udg_Area[i]))
if GetRandomInt(1, 10) <= 6 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), JUNGLEBIRD_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), VULTURE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
endif
set x = GetRandomReal(GetRectMinX(udg_Area[i]), GetRectMaxX(udg_Area[i]))
set y = GetRandomReal(GetRectMinY(udg_Area[i]), GetRectMaxY(udg_Area[i]))
if GetRandomInt(1, 10) <= 6 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), JUNGLEBIRD_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), VULTURE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
endif
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 4
if GetRandomInt(0, 1) == 1 then
set x = GetRandomReal(GetRectMinX(gg_rct_Mojo_Anaconda), GetRectMaxX(gg_rct_Mojo_Anaconda))
set y = GetRandomReal(GetRectMinY(gg_rct_Mojo_Anaconda), GetRectMaxY(gg_rct_Mojo_Anaconda))
call CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ANACONDA_ID, x, y, bj_UNIT_FACING )
endif
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 2
set x = GetRectCenterX(gg_rct_Mojo_Tarantula)
set y = GetRectCenterY(gg_rct_Mojo_Tarantula)
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), TARENTULAQUEEN_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
set x = GetRandomReal(GetRectMinX(gg_rct_Mojo_Tarantula), GetRectMaxX(gg_rct_Mojo_Tarantula))
set y = GetRandomReal(GetRectMinY(gg_rct_Mojo_Tarantula), GetRectMaxY(gg_rct_Mojo_Tarantula))
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), SPIDER_EGGBAG_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 6
set x = GetRandomReal(GetRectMinX(udg_Cave[i]), GetRectMaxX(udg_Cave[i]))
set y = GetRandomReal(GetRectMinY(udg_Cave[i]), GetRectMaxY(udg_Cave[i]))
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), MANGYRAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
set x = GetRandomReal(GetRectMinX(udg_Cave[i]), GetRectMaxX(udg_Cave[i]))
set y = GetRandomReal(GetRectMinY(udg_Cave[i]), GetRectMaxY(udg_Cave[i]))
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), MANGYRAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
set x = GetRandomReal(GetRectMinX(udg_Cave[i]), GetRectMaxX(udg_Cave[i]))
set y = GetRandomReal(GetRectMinY(udg_Cave[i]), GetRectMaxY(udg_Cave[i]))
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), MANGYRAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 4
set x = GetRandomReal(GetRectMinX(udg_water_big[i]), GetRectMaxX(udg_water_big[i]))
set y = GetRandomReal(GetRectMinY(udg_water_big[i]), GetRectMaxY(udg_water_big[i]))
if GetRandomInt(1, 10) != 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIGATOR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
elseif GetRandomInt(1, 20) <= 6 then
if GetRandomInt(1, 3) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), HERMITCRAB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RIVERCRAB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
endif
elseif GetRandomInt(1, 14) <= 6 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), FROG_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
elseif GetRandomInt(1, 8) <= 3 then
call CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), MOSQUITOES_ID, x, y, bj_UNIT_FACING )
elseif GetRandomInt(1, 5) <= 3 then
if GetRandomInt(1, 4) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), GIANTTORTOISE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), TORTOISE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 500.00) )
endif
else
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIGATORHATCHLING_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIGATOR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
endif
endif
set i = i + 1
endloop
endfunction
function Spawn2 takes nothing returns nothing
local real x
local real y
local unit spawn
local integer i = 1
loop
exitwhen i > 86
set x = GetRandomReal(GetRectMinX(udg_ground_normal[i]), GetRectMaxX(udg_ground_normal[i]))
set y = GetRandomReal(GetRectMinY(udg_ground_normal[i]), GetRectMaxY(udg_ground_normal[i]))
if GetRandomInt(1, 10) <= 9 then
if GetRandomInt(1, 12) <= 4 then
if GetRandomInt(1, 10) <= 2 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), PIGLET_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 100.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BOAR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
elseif GetRandomInt(1, 8) <= 3 then
if GetRandomInt(1, 10) <= 2 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ANTELOPEFAWN_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 100.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ANTELOPE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
endif
elseif GetRandomInt(1, 5) <= 2 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), SABERKITTEN_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), SABERCAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
endif
elseif GetRandomInt(1, 3) <= 1 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BEARCUB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BEAR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 500.00) )
endif
elseif GetRandomInt(1, 2) <= 1 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RACOONCUB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RACOON_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
else
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BUNNY_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RABBIT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
endif
endif
endif
set spawn =null
set i = i + 1
endloop
endfunction
function Spawn3 takes nothing returns nothing
local real x
local real y
local unit spawn
local integer i = 1
loop
exitwhen i > 54
set x = GetRandomReal(GetRectMinX(udg_water_normal[i]), GetRectMaxX(udg_water_normal[i]))
set y = GetRandomReal(GetRectMinY(udg_water_normal[i]), GetRectMaxY(udg_water_normal[i]))
if GetRandomInt(1, 10) <= 9 then
if GetRandomInt(1, 20) <= 6 then
if GetRandomInt(1, 3) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), HERMITCRAB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RIVERCRAB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
endif
elseif GetRandomInt(1, 14) <= 5 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), FROG_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
elseif GetRandomInt(1, 9) <= 1 then
call SetItemCharges( UnitAddItemById( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), FROLL_ID, x, y, bj_UNIT_FACING ), HARPOON_ID ), GetRandomInt(1, 5) )
elseif GetRandomInt(1, 8) <= 3 then
call CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), MOSQUITOES_ID, x, y, bj_UNIT_FACING )
elseif GetRandomInt(1, 5) <= 3 then
if GetRandomInt(1, 4) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), GIANTTORTOISE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), TORTOISE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 500.00) )
endif
elseif GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIGATORHATCHLING_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ALLIGATOR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 400.00) )
endif
endif
set spawn =null
set i = i + 1
endloop
endfunction
function Spawn4 takes nothing returns nothing
local real x
local real y
local unit spawn
local integer i = 1
loop
exitwhen i > 42
set x = GetRandomReal(GetRectMinX(udg_ground_vermin[i]), GetRectMaxX(udg_ground_vermin[i]))
set y = GetRandomReal(GetRectMinY(udg_ground_vermin[i]), GetRectMaxY(udg_ground_vermin[i]))
if GetRandomInt(1, 10) <= 9 then
if GetRandomInt(1, 20) <= 9 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), JUNGLEASPIC_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
elseif GetRandomInt(1, 11) <= 9 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), TARENTULA_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BLACKWIDOW_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 500.00) )
endif
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
endif
set spawn =null
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 4
set x = GetRandomReal(GetRectMinX(udg_ground_big[i]), GetRectMaxX(udg_ground_big[i]))
set y = GetRandomReal(GetRectMinY(udg_ground_big[i]), GetRectMaxY(udg_ground_big[i]))
if GetRandomInt(1, 10) != 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BEAR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 500.00) )
elseif GetRandomInt(1, 10) <= 3 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), PIGLET_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 100.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BOAR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
elseif GetRandomInt(1, 7) <= 2 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ANTELOPEFAWN_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 100.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), ANTELOPE_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
endif
elseif GetRandomInt(1, 5) <= 2 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), SABERKITTEN_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), SABERCAT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 300.00) )
endif
elseif GetRandomInt(1, 3) <= 1 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BEARCUB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BEAR_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 500.00) )
endif
elseif GetRandomInt(1, 2) <= 1 then
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RACOONCUB_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RACOON_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 250.00) )
endif
else
if GetRandomInt(1, 10) <= 1 then
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BUNNY_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
else
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), RABBIT_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 200.00) )
endif
endif
set i = i + 1
endloop
endfunction
function Spawn5 takes nothing returns nothing
local real x
local real y
local unit spawn
local integer i = 1
loop
exitwhen i > 70
set x = GetRectCenterX(udg_ground_food[i])
set y = GetRectCenterY(udg_ground_food[i])
if GetRandomInt(1, 2) <= 1 then
if GetRandomInt(1, 20) <= 2 then
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), BEEHIVE_ID, x, y, bj_UNIT_FACING )
set udg_BeeSwarmCount = ( udg_BeeSwarmCount + 1 )
call SetUnitUserData( spawn, udg_BeeSwarmCount )
call SetUnitState( spawn, UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
set udg_BeeSwarm[udg_BeeSwarmCount] = CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), BEEQUEEN_ID, x, y, bj_UNIT_FACING )
elseif GetRandomInt(1, 18) == 1 then
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), ARIA_ID, x, y, bj_UNIT_FACING )
call SetUnitState( spawn, UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
elseif GetRandomInt(1, 17) == 1 then
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), BARDANE_ID, x, y, bj_UNIT_FACING )
call SetUnitState( spawn, UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
elseif GetRandomInt(1, 16) == 1 then
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), CORIAN_ID, x, y, bj_UNIT_FACING )
call SetUnitState( spawn, UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
elseif GetRandomInt(1, 15) == 1 then
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), DRAXIMOR_ID, x, y, bj_UNIT_FACING )
call SetUnitState( spawn, UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
else
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), BERRYBUSH_ID, x, y, bj_UNIT_FACING )
call SetUnitState( spawn, UNIT_STATE_MANA, GetRandomReal(0.00, 50.00) )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
endif
endif
set spawn =null
set i = i + 1
endloop
endfunction
function Spawn6 takes nothing returns nothing
local real x
local real y
local unit spawn
local integer i = 1
loop
exitwhen i > 24
set x = GetRectCenterX(udg_minerals[i])
set y = GetRectCenterY(udg_minerals[i])
if GetRandomInt(1, 2) == 1 then
if GetRandomInt(1, 2) == 1 then
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Rock[GetRandomInt(1, 6)], x, y, bj_UNIT_FACING )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
else
set spawn = CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Rock[GetRandomInt(7, 12)], x, y, bj_UNIT_FACING )
call UnitRemoveAbility( spawn, 'Afir' )
call UnitRemoveAbility( spawn, 'Afio' )
call UnitRemoveAbility( spawn, 'Afih' )
call UnitRemoveAbility( spawn, 'Afin' )
call UnitRemoveAbility( spawn, 'Afiu' )
endif
endif
set spawn =null
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 4
set x = GetRectCenterX(udg_water_piranha[i])
set y = GetRectCenterY(udg_water_piranha[i])
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), PIRANHA_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), PIRANHA_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
call SetUnitState( CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), PIRANHA_ID, x, y, bj_UNIT_FACING ), UNIT_STATE_MANA, GetRandomReal(0.00, 150.00) )
set i = i + 1
endloop
endfunction
endlibrary
function Trig_Easy_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyTrigger( gg_trg_Normal )
call DestroyTrigger( gg_trg_Hard )
call DestroyTrigger( gg_trg_Start_Cinematic_A )
call DestroyTrigger( gg_trg_Dsetup )
call DestroyTrigger( gg_trg_Dclick )
call DestroyTrigger( gg_trg_Dedit )
call DestroyTrigger( gg_trg_DTimer )
call DestroyTrigger( gg_trg_HostDetect )
// Launch Game Start
call TriggerExecute( gg_trg_DropAll_JASS )
// Set the Difficulty to Variable and Units
set udg_MB_Difficulty = "Easy"
call UnitAddAbilityBJ( 'A0IB', gg_unit_h00F_0043 )
call SetPlayerTechResearchedSwap( 'Rhar', 1, Player(PLAYER_NEUTRAL_AGGRESSIVE) )
set udg_Xnumber = 20
set udg_GameDiff = 1
call StartTimerBJ( udg_PlayerTimer, true, 3.50 )
call ConditionalTriggerExecute( gg_trg_Player_ini )
call TriggerSleepAction( 0.50 )
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Easy takes nothing returns nothing
set gg_trg_Easy = CreateTrigger( )
call TriggerAddAction( gg_trg_Easy, function Trig_Easy_Actions )
endfunction
function Trig_Normal_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyTrigger( gg_trg_Easy )
call DestroyTrigger( gg_trg_Hard )
call DestroyTrigger( gg_trg_Start_Cinematic_A )
call DestroyTrigger( gg_trg_Dsetup )
call DestroyTrigger( gg_trg_Dclick )
call DestroyTrigger( gg_trg_Dedit )
call DestroyTrigger( gg_trg_DTimer )
call DestroyTrigger( gg_trg_HostDetect )
// Launch Game Start
call TriggerExecute( gg_trg_DropAll_JASS )
// Set the Difficulty to Variable and Units
set udg_MB_Difficulty = "Normal"
call UnitAddAbilityBJ( 'A0IC', gg_unit_h00F_0043 )
call SetPlayerTechResearchedSwap( 'Rhme', 1, Player(PLAYER_NEUTRAL_AGGRESSIVE) )
set udg_Xnumber = 10
set udg_GameDiff = 2
call StartTimerBJ( udg_PlayerTimer, true, 3.00 )
call ConditionalTriggerExecute( gg_trg_Player_ini )
call TriggerSleepAction( 0.50 )
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Normal takes nothing returns nothing
set gg_trg_Normal = CreateTrigger( )
call TriggerAddAction( gg_trg_Normal, function Trig_Normal_Actions )
endfunction
function Trig_Hard_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DestroyTrigger( gg_trg_Easy )
call DestroyTrigger( gg_trg_Normal )
call DestroyTrigger( gg_trg_Start_Cinematic_A )
call DestroyTrigger( gg_trg_Dsetup )
call DestroyTrigger( gg_trg_Dclick )
call DestroyTrigger( gg_trg_Dedit )
call DestroyTrigger( gg_trg_DTimer )
call DestroyTrigger( gg_trg_HostDetect )
// Launch Game Start
call TriggerExecute( gg_trg_DropAll_JASS )
// Set the Difficulty to Variable and Units
set udg_MB_Difficulty = "Hard"
call UnitAddAbilityBJ( 'A0ID', gg_unit_h00F_0043 )
call SetPlayerTechResearchedSwap( 'Rhme', 2, Player(PLAYER_NEUTRAL_AGGRESSIVE) )
call SetPlayerTechResearchedSwap( 'Rhgb', 1, Player(PLAYER_NEUTRAL_AGGRESSIVE) )
set udg_Xnumber = 5
set udg_GameDiff = 3
call StartTimerBJ( udg_PlayerTimer, true, 2.50 )
call ConditionalTriggerExecute( gg_trg_Player_ini )
call TriggerSleepAction( 0.50 )
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Hard takes nothing returns nothing
set gg_trg_Hard = CreateTrigger( )
call TriggerAddAction( gg_trg_Hard, function Trig_Hard_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Action_Mode takes nothing returns nothing
local real x
local real y
call DisableTrigger( GetTriggeringTrigger() )
set udg_MB_ModeAction = "Yes"
if ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) then
set x = GetRectCenterX(gg_rct_Team_1)
set y = GetRectCenterY(gg_rct_Team_1)
call CreateItem( 'I09H', x, y )
endif
if ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) then
set x = GetRectCenterX(gg_rct_Team_2)
set y = GetRectCenterY(gg_rct_Team_2)
call CreateItem( 'I09H', x, y )
endif
if ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) or ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) then
set x = GetRectCenterX(gg_rct_Team_3)
set y = GetRectCenterY(gg_rct_Team_3)
call CreateItem( 'I09H', x, y )
endif
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Action_Mode_JASS takes nothing returns nothing
set gg_trg_Action_Mode_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_Action_Mode_JASS, function Action_Mode )
endfunction
function Plenty takes nothing returns nothing
local real x
local real y
local rect area
local integer i = 1
call DisableTrigger( GetTriggeringTrigger() )
set udg_MB_ModePlenty = "Yes"
loop
exitwhen i > 5
set area = udg_Area[GetRandomInt(1, 9)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
call CreateItem( 'I036', x, y )
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 5
set area = udg_Cave[GetRandomInt(1, 6)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
call SetItemCharges( CreateItem( 'I03B', x, y ), GetRandomInt(1, 7) )
set i = i + 1
endloop
call TriggerSleepAction( 0.10 )
// ========== Increase the Limit to Item Drop ==========
set udg_RessourceLimit = 30
call TriggerExecute( gg_trg_DropAll_JASS )
call TriggerSleepAction( 0.10 )
call TriggerExecute( gg_trg_DropAll_JASS )
call TriggerSleepAction( 0.10 )
call TriggerExecute( gg_trg_DropAll_JASS )
call TriggerSleepAction( 0.10 )
set udg_Stop_ItemsDrop = true
call DestroyTrigger( gg_trg_StopItemDrop_and_Visibility )
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Plenty_Mode_JASS takes nothing returns nothing
set gg_trg_Plenty_Mode_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_Plenty_Mode_JASS, function Plenty )
endfunction
function Trig_Player_ini_Func001C takes nothing returns boolean
if ( not ( udg_MB_ModeAction == "Yes" ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func002C takes nothing returns boolean
if ( not ( udg_MB_ModePlenty == "Yes" ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func004C takes nothing returns boolean
if ( not ( udg_TeamNumber[1] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func005C takes nothing returns boolean
if ( not ( udg_TeamNumber[2] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func006C takes nothing returns boolean
if ( not ( udg_TeamNumber[3] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func008Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func008C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func010Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func010C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func012Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func012C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func014Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func014C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func016Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func016C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func018Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func018C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func020Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func020C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func022Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func024Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func024C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func026Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func026C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func028Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func030Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_ini_Func030C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Player_ini_Func045A takes nothing returns nothing
call ForceUICancelBJ( GetEnumPlayer() )
endfunction
function Trig_Player_ini_Actions takes nothing returns nothing
local integer i = 0
if ( Trig_Player_ini_Func001C() ) then
else
call DestroyTrigger( gg_trg_Action_Mode_JASS )
endif
if ( Trig_Player_ini_Func002C() ) then
else
call DestroyTrigger( gg_trg_Plenty_Mode_JASS )
call TriggerRegisterTimerEventSingle( gg_trg_StopItemDrop_and_Visibility, 5000.00 )
endif
// Set Totem Kit for Teams
if ( Trig_Player_ini_Func004C() ) then
call SetItemInvulnerableBJ( udg_TotemKit[1], true )
else
call RemoveItem( udg_TotemKit[1] )
set udg_TotemOwned[1] = true
endif
if ( Trig_Player_ini_Func005C() ) then
call SetItemInvulnerableBJ( udg_TotemKit[2], true )
else
call RemoveItem( udg_TotemKit[2] )
set udg_TotemOwned[2] = true
endif
if ( Trig_Player_ini_Func006C() ) then
call SetItemInvulnerableBJ( udg_TotemKit[3], true )
else
call RemoveItem( udg_TotemKit[3] )
set udg_TotemOwned[3] = true
endif
// Player1
if ( Trig_Player_ini_Func008C() ) then
call PanCameraToTimedLocForPlayer( Player(0), GetPlayerStartLocationLoc(Player(0)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0338, Player(0) )
else
set udg_PactWithTheDevil[1] = true
set udg_Hero_Troll[1] = gg_unit_h009_0340
call KillUnit( gg_unit_h009_0340 )
call RemoveUnit( gg_unit_h017_0338 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(0)), function Trig_Player_ini_Func008Func006002 )
endif
// Player2
if ( Trig_Player_ini_Func010C() ) then
call PanCameraToTimedLocForPlayer( Player(1), GetPlayerStartLocationLoc(Player(1)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0066, Player(1) )
else
set udg_PactWithTheDevil[2] = true
set udg_Hero_Troll[2] = gg_unit_h009_0341
call KillUnit( gg_unit_h009_0341 )
call RemoveUnit( gg_unit_h017_0066 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(1)), function Trig_Player_ini_Func010Func006002 )
endif
// Player3
if ( Trig_Player_ini_Func012C() ) then
call PanCameraToTimedLocForPlayer( Player(2), GetPlayerStartLocationLoc(Player(2)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0097, Player(2) )
else
set udg_PactWithTheDevil[3] = true
set udg_Hero_Troll[3] = gg_unit_h009_0342
call KillUnit( gg_unit_h009_0342 )
call RemoveUnit( gg_unit_h017_0097 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(2)), function Trig_Player_ini_Func012Func006002 )
endif
// Player4
if ( Trig_Player_ini_Func014C() ) then
call PanCameraToTimedLocForPlayer( Player(3), GetPlayerStartLocationLoc(Player(3)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0150, Player(3) )
else
set udg_PactWithTheDevil[4] = true
set udg_Hero_Troll[4] = gg_unit_h009_0343
call KillUnit( gg_unit_h009_0343 )
call RemoveUnit( gg_unit_h017_0150 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(3)), function Trig_Player_ini_Func014Func006002 )
endif
// Player5
if ( Trig_Player_ini_Func016C() ) then
call PanCameraToTimedLocForPlayer( Player(4), GetPlayerStartLocationLoc(Player(4)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0238, Player(4) )
else
set udg_PactWithTheDevil[5] = true
set udg_Hero_Troll[5] = gg_unit_h009_0344
call KillUnit( gg_unit_h009_0344 )
call RemoveUnit( gg_unit_h017_0238 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(4)), function Trig_Player_ini_Func016Func006002 )
endif
// Player6
if ( Trig_Player_ini_Func018C() ) then
call PanCameraToTimedLocForPlayer( Player(5), GetPlayerStartLocationLoc(Player(5)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0204, Player(5) )
else
set udg_PactWithTheDevil[6] = true
set udg_Hero_Troll[6] = gg_unit_h009_0345
call KillUnit( gg_unit_h009_0345 )
call RemoveUnit( gg_unit_h017_0204 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(5)), function Trig_Player_ini_Func018Func006002 )
endif
// Player7
if ( Trig_Player_ini_Func020C() ) then
call PanCameraToTimedLocForPlayer( Player(6), GetPlayerStartLocationLoc(Player(6)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0218, Player(6) )
else
set udg_PactWithTheDevil[7] = true
set udg_Hero_Troll[7] = gg_unit_h009_0346
call KillUnit( gg_unit_h009_0346 )
call RemoveUnit( gg_unit_h017_0218 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(6)), function Trig_Player_ini_Func020Func006002 )
endif
// Player8
if ( Trig_Player_ini_Func022C() ) then
call PanCameraToTimedLocForPlayer( Player(7), GetPlayerStartLocationLoc(Player(7)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0229, Player(7) )
else
set udg_PactWithTheDevil[8] = true
set udg_Hero_Troll[8] = gg_unit_h009_0347
call KillUnit( gg_unit_h009_0347 )
call RemoveUnit( gg_unit_h017_0229 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(7)), function Trig_Player_ini_Func022Func006002 )
endif
// Player9
if ( Trig_Player_ini_Func024C() ) then
call PanCameraToTimedLocForPlayer( Player(8), GetPlayerStartLocationLoc(Player(8)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0339, Player(8) )
else
set udg_PactWithTheDevil[9] = true
set udg_Hero_Troll[9] = gg_unit_h009_0348
call KillUnit( gg_unit_h009_0348 )
call RemoveUnit( gg_unit_h017_0339 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(8)), function Trig_Player_ini_Func024Func006002 )
endif
// Player10
if ( Trig_Player_ini_Func026C() ) then
call PanCameraToTimedLocForPlayer( Player(9), GetPlayerStartLocationLoc(Player(9)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0232, Player(9) )
else
set udg_PactWithTheDevil[10] = true
set udg_Hero_Troll[10] = gg_unit_h009_0349
call KillUnit( gg_unit_h009_0349 )
call RemoveUnit( gg_unit_h017_0232 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(9)), function Trig_Player_ini_Func026Func006002 )
endif
// Player11
if ( Trig_Player_ini_Func028C() ) then
call PanCameraToTimedLocForPlayer( Player(10), GetPlayerStartLocationLoc(Player(10)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0234, Player(10) )
else
set udg_PactWithTheDevil[11] = true
set udg_Hero_Troll[11] = gg_unit_h009_0350
call KillUnit( gg_unit_h009_0350 )
call RemoveUnit( gg_unit_h017_0234 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(10)), function Trig_Player_ini_Func028Func006002 )
endif
// Player12
if ( Trig_Player_ini_Func030C() ) then
call PanCameraToTimedLocForPlayer( Player(11), GetPlayerStartLocationLoc(Player(11)), 0 )
call SelectUnitForPlayerSingle( gg_unit_h017_0235, Player(11) )
else
set udg_PactWithTheDevil[12] = true
set udg_Hero_Troll[12] = gg_unit_h009_0351
call KillUnit( gg_unit_h009_0351 )
call RemoveUnit( gg_unit_h017_0235 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerAll(Player(11)), function Trig_Player_ini_Func030Func006002 )
endif
call PlaySoundBJ( gg_snd_StartGameMusic )
call StartTimerBJ( udg_TotemCheck, false, 60.00 )
call StartTimerBJ( udg_DayTimer, true, 500.00 )
call StartTimerBJ( udg_WeatherTimer, true, 360.00 )
call StartTimerBJ( udg_HelpTimer, true, 25.00 )
call StartTimerBJ( udg_Timer10sec, true, 10.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_1213" )
call StartTimerBJ( udg_Totem_timer, false, 600.00 )
call CreateTimerDialogBJ( udg_Totem_timer, "TRIGSTR_1298" )
set udg_Totem_window = GetLastCreatedTimerDialogBJ()
call TimerDialogDisplayBJ( true, udg_Totem_window )
call ConditionalTriggerExecute( gg_trg_Create_MultiBoard )
call EnableTrigger( gg_trg_Update_MultiBoard )
call EnableTrigger( gg_trg_Show_and_Swap_Multiboard )
call ForForce( GetPlayersAll(), function Trig_Player_ini_Func045A )
call DestroyTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 0.10 )
loop
exitwhen i > 11
if ( GetPlayerController(Player(i)) != MAP_CONTROL_USER ) then
if IsUnitType(udg_Hero_Building[i+1], UNIT_TYPE_DEAD) == false then
call IssueNeutralImmediateOrderById( Player(i), udg_Hero_Building[i+1], 'H001' )
call TriggerSleepAction( 0.10 )
set udg_PactWithTheDevil[i+1] = true
call KillUnit( udg_Hero_Troll[i+1] )
else
set udg_PactWithTheDevil[i+1] = true
call KillUnit( udg_Hero_Troll[i+1] )
call KillUnit( udg_Troll_Spirit[i+1] )
endif
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Player_ini takes nothing returns nothing
set gg_trg_Player_ini = CreateTrigger( )
call TriggerAddAction( gg_trg_Player_ini, function Trig_Player_ini_Actions )
endfunction
function Trig_Start_Cinematic_A_Func016A takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, gg_rct_TutorialVisibility )
set udg_TutorialView[GetConvertedPlayerId(GetEnumPlayer())] = GetLastCreatedFogModifier()
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_Loc, 0 )
call SetCameraTargetControllerNoZForPlayer( GetEnumPlayer(), udg_Hero_Troll[16], 0, 0, false )
call SelectUnitForPlayerSingle( udg_Hero_Troll[16], GetEnumPlayer() )
endfunction
function Trig_Start_Cinematic_A_Func076A takes nothing returns nothing
call SelectUnitForPlayerSingle( udg_Hero_Troll[16], GetEnumPlayer() )
endfunction
function Trig_Start_Cinematic_A_Func082A takes nothing returns nothing
call SelectUnitForPlayerSingle( udg_Basic_Crafting[16], GetEnumPlayer() )
endfunction
function Trig_Start_Cinematic_A_Func089A takes nothing returns nothing
call SelectUnitForPlayerSingle( udg_Hero_Troll[16], GetEnumPlayer() )
endfunction
function Trig_Start_Cinematic_A_Func159A takes nothing returns nothing
call SelectUnitForPlayerSingle( udg_Hero_Troll[16], GetEnumPlayer() )
endfunction
function Trig_Start_Cinematic_A_Func173002 takes nothing returns nothing
call RemoveItem( GetEnumItem() )
endfunction
function Trig_Start_Cinematic_A_Func217A takes nothing returns nothing
call DestroyFogModifier( udg_TutorialView[GetConvertedPlayerId(GetEnumPlayer())] )
call ResetToGameCameraForPlayer( GetEnumPlayer(), 0 )
call SelectUnitForPlayerSingle( udg_Hero_Building[GetConvertedPlayerId(GetEnumPlayer())], GetEnumPlayer() )
set udg_Loc = GetUnitLoc(udg_Hero_Building[GetConvertedPlayerId(GetEnumPlayer())])
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), udg_Loc, 0 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Start_Cinematic_A_Func231C takes nothing returns boolean
if ( not ( udg_D_Button[4] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Start_Cinematic_A_Func232C takes nothing returns boolean
if ( not ( udg_D_Button[3] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Start_Cinematic_A_Func234C takes nothing returns boolean
if ( not ( udg_D_Button[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Start_Cinematic_A_Func236Func002Func002C takes nothing returns boolean
if ( not ( udg_D_Button[1] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Start_Cinematic_A_Func236Func002C takes nothing returns boolean
if ( not ( udg_D_Button[1] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Start_Cinematic_A_Func236C takes nothing returns boolean
if ( not ( udg_D_Button[1] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Start_Cinematic_A_Actions takes nothing returns nothing
call UseTimeOfDayBJ( false )
call SetUserControlForceOff( GetPlayersAll() )
call DisableTrigger(bj_cineSceneBeingSkipped)
// ===== Create Crafting Dummies =====
set udg_Loc = GetRectCenter(gg_rct_Tutorial_Basic)
call CreateNUnitsAtLoc( 1, 'h01S', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[16] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
// ===== Create Troll Dummies =====
set udg_Loc = GetRectCenter(gg_rct_Tutorial_Area_1)
call CreateNUnitsAtLoc( 1, 'H001', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Aspb', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'Aall', GetLastCreatedUnit() )
set udg_Hero_Troll[16] = GetLastCreatedUnit()
set udg_TempPlayerGroup = GetPlayersByMapControl(MAP_CONTROL_USER)
call ForForce( udg_TempPlayerGroup, function Trig_Start_Cinematic_A_Func016A )
call RemoveLocation(udg_Loc)
call DisableTrigger( gg_trg_Global_Ability_1 )
call DisableTrigger( gg_trg_Global_Ability_Recipe )
call TriggerSleepAction( 1.00 )
call PlaySoundBJ( gg_snd_Tutorial )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_1011", null, "TRIGSTR_1233", bj_TIMETYPE_SUB, 1.00, false )
call TriggerSleepAction( 1.00 )
set udg_Loc2 = GetRandomLocInRect(gg_rct_Tutorial_Area_1)
set udg_Loc = PolarProjectionBJ(udg_Loc2, 200.00, 0)
call CreateItemLoc( 'I011', udg_Loc )
set udg_TutorialItems[1] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_1708", udg_Loc, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[1] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc)
set udg_Loc = PolarProjectionBJ(udg_Loc2, 200.00, 90.00)
call CreateItemLoc( 'I014', udg_Loc )
set udg_TutorialItems[2] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_2482", udg_Loc, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[2] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc)
set udg_Loc = PolarProjectionBJ(udg_Loc2, 200.00, 180.00)
call CreateItemLoc( 'I013', udg_Loc )
set udg_TutorialItems[3] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_2766", udg_Loc, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[3] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc)
set udg_Loc = PolarProjectionBJ(udg_Loc2, 200.00, 270.00)
call CreateItemLoc( 'I012', udg_Loc )
set udg_TutorialItems[4] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_2840", udg_Loc, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[4] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call TriggerSleepAction( 2.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_2893", null, "TRIGSTR_2900", bj_TIMETYPE_SUB, 1.00, false )
call TriggerSleepAction( 4.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_2935", null, "TRIGSTR_2947", bj_TIMETYPE_ADD, 0.00, false )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[1] )
call DestroyTextTagBJ( udg_TutorialFloatingText[1] )
call TriggerSleepAction( 2.00 )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[2] )
call DestroyTextTagBJ( udg_TutorialFloatingText[2] )
call TriggerSleepAction( 2.00 )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[3] )
call DestroyTextTagBJ( udg_TutorialFloatingText[3] )
call TriggerSleepAction( 1.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_2980", null, "TRIGSTR_2982", bj_TIMETYPE_SUB, 1.00, false )
call TriggerSleepAction( 1.00 )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[4] )
call DestroyTextTagBJ( udg_TutorialFloatingText[4] )
call TriggerSleepAction( 3.00 )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_2994", null, "TRIGSTR_2999", bj_TIMETYPE_SUB, 0.00, false )
call TriggerSleepAction( 5.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3126", null, "TRIGSTR_3144", bj_TIMETYPE_SUB, 0.00, false )
call TriggerSleepAction( 5.00 )
call CinematicModeBJ( false, GetPlayersAll() )
call ForForce( udg_TempPlayerGroup, function Trig_Start_Cinematic_A_Func076A )
call TriggerSleepAction( 0.50 )
call EnableTrigger( gg_trg_Global_Ability_Recipe )
call IssueImmediateOrderBJ( udg_Hero_Troll[16], "summongrizzly" )
call DisableTrigger( gg_trg_Global_Ability_Recipe )
call TriggerSleepAction( 0.50 )
call ForForce( udg_TempPlayerGroup, function Trig_Start_Cinematic_A_Func082A )
call TriggerSleepAction( 3.00 )
call EnableTrigger( gg_trg_Global_Ability_Recipe )
call IssueImmediateOrderBJ( udg_Basic_Crafting[16], "spiritwolf" )
call TriggerSleepAction( 0.50 )
call DisableTrigger( gg_trg_Global_Ability_Recipe )
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "TRIGSTR_3283" )
call ForForce( udg_TempPlayerGroup, function Trig_Start_Cinematic_A_Func089A )
call TriggerSleepAction( 3.00 )
set udg_Loc = GetRandomLocInRect(gg_rct_Tutorial_Area_1)
set udg_TutorialItems[5] = GetItemOfTypeFromUnitBJ(udg_Hero_Troll[16], 'I015')
call IssuePointOrderLocBJ( udg_Hero_Troll[16], "move", udg_Loc )
call TriggerSleepAction( 2.00 )
call RemoveItem( udg_TutorialItems[5] )
call CreateNUnitsAtLoc( 1, 'h00J', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
set udg_TempTargetUnit[1] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call TriggerSleepAction( 3.00 )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3435", null, "TRIGSTR_3517", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 6.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3609", null, "TRIGSTR_3611", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 4.00 )
set udg_Loc = GetRandomLocInRect(gg_rct_Tutorial_Area_1)
call CreateNUnitsAtLoc( 1, 'n002', Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
set udg_TempUnit = GetLastCreatedUnit()
call IssueTargetOrderBJ( udg_TempUnit, "attack", udg_Hero_Troll[16] )
call IssueTargetOrderBJ( udg_Hero_Troll[16], "attack", udg_TempUnit )
call TriggerSleepAction( 3.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3612", null, "TRIGSTR_3613", bj_TIMETYPE_ADD, 1.00, false )
call IssueTargetOrderBJ( udg_TempUnit, "attack", udg_Hero_Troll[16] )
call IssueTargetOrderBJ( udg_Hero_Troll[16], "attack", udg_TempUnit )
call TriggerSleepAction( 3.00 )
call IssueTargetOrderBJ( udg_TempUnit, "attack", udg_Hero_Troll[16] )
call IssueTargetOrderBJ( udg_Hero_Troll[16], "attack", udg_TempUnit )
call TriggerSleepAction( 3.00 )
call DisableTrigger( gg_trg_Global_Unit_Die )
set udg_Loc = GetUnitLoc(udg_TempUnit)
set udg_Loc2 = PolarProjectionBJ(udg_Loc, GetRandomReal(100.00, 200.00), 0.00)
call KillUnit( udg_TempUnit )
call EnableTrigger( gg_trg_Global_Unit_Die )
call CreateItemLoc( 'I003', udg_Loc2 )
call SetItemCharges( GetLastCreatedItem(), 6 )
set udg_TutorialItems[6] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_3614", udg_Loc2, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[6] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc2)
set udg_Loc2 = PolarProjectionBJ(udg_Loc, GetRandomReal(100.00, 200.00), 135.00)
call CreateItemLoc( 'I004', udg_Loc2 )
call SetItemCharges( GetLastCreatedItem(), 2 )
set udg_TutorialItems[7] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_3617", udg_Loc2, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[7] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc2)
set udg_Loc2 = PolarProjectionBJ(udg_Loc, GetRandomReal(100.00, 200.00), 225.00)
call CreateItemLoc( 'I009', udg_Loc2 )
set udg_TutorialItems[8] = GetLastCreatedItem()
call CreateTextTagLocBJ( "TRIGSTR_3618", udg_Loc2, 0, 10, 100, 100, 100, 0 )
set udg_TutorialFloatingText[8] = GetLastCreatedTextTag()
call RemoveLocation(udg_Loc2)
call RemoveLocation(udg_Loc)
call TriggerSleepAction( 2.00 )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[6] )
call DestroyTextTagBJ( udg_TutorialFloatingText[6] )
call TriggerSleepAction( 2.00 )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[7] )
call DestroyTextTagBJ( udg_TutorialFloatingText[7] )
call TriggerSleepAction( 2.00 )
call IssueTargetItemOrder( udg_Hero_Troll[16], "smart", udg_TutorialItems[8] )
call DestroyTextTagBJ( udg_TutorialFloatingText[8] )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3640", null, "TRIGSTR_3708", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 6.00 )
call CinematicModeBJ( false, GetPlayersAll() )
call TriggerSleepAction( 1.00 )
call ForForce( udg_TempPlayerGroup, function Trig_Start_Cinematic_A_Func159A )
call TriggerSleepAction( 3.00 )
call UnitDropItemTargetBJ( udg_Hero_Troll[16], udg_TutorialItems[1], udg_TempTargetUnit[1] )
call TriggerSleepAction( 1.00 )
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3724", null, "TRIGSTR_3771", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 6.00 )
call CinematicModeBJ( false, GetPlayersAll() )
call TriggerSleepAction( 1.00 )
call UnitDropItemTargetBJ( udg_Hero_Troll[16], udg_TutorialItems[6], udg_TempTargetUnit[1] )
call TriggerSleepAction( 6.00 )
call IssueTargetOrderBJ( udg_Hero_Troll[16], "smart", udg_TutorialItems[9] )
call TriggerSleepAction( 2.00 )
call RemoveItem( udg_TutorialItems[9] )
call EnumItemsInRectBJ( gg_rct_Tutorial_Area_1, function Trig_Start_Cinematic_A_Func173002 )
call DisplayTimedTextToForce( GetPlayersAll(), 5.00, "TRIGSTR_3807" )
call TriggerSleepAction( 5.00 )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3811", null, "TRIGSTR_3845", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 10.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3856", null, "TRIGSTR_3880", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 7.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3911", null, "TRIGSTR_3920", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 7.00 )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3953", null, "TRIGSTR_3954", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 6.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3959", null, "TRIGSTR_3965", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 6.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_3993", null, "TRIGSTR_4010", bj_TIMETYPE_ADD, 1.00, false )
call TriggerSleepAction( 6.00 )
call CinematicModeBJ( false, GetPlayersAll() )
call EnableTrigger( gg_trg_Global_Ability_Recipe )
call EnableTrigger( gg_trg_Global_Ability_1 )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrderBJ( udg_Hero_Troll[16], "waterelemental" )
call TriggerSleepAction( 1.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 7.00, "TRIGSTR_4044" )
call DisableTrigger( gg_trg_Global_Ability_Recipe )
call DisableTrigger( gg_trg_Global_Ability_1 )
call TriggerSleepAction( 7.00 )
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call CinematicModeBJ( true, GetPlayersAll() )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_4130", null, "TRIGSTR_4142", bj_TIMETYPE_ADD, 2.00, false )
call TriggerSleepAction( 7.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_4143", null, "TRIGSTR_4145", bj_TIMETYPE_ADD, 2.00, false )
call TriggerSleepAction( 7.00 )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_4151", null, "TRIGSTR_4154", bj_TIMETYPE_ADD, 2.00, false )
call TriggerSleepAction( 7.00 )
call PlaySoundBJ( gg_snd_Warning )
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_Hero_Troll[16], "TRIGSTR_4159", null, "TRIGSTR_4161", bj_TIMETYPE_ADD, 4.00, false )
call TriggerSleepAction( 9.00 )
call EnableTrigger( gg_trg_Global_Ability_1 )
call EnableTrigger( gg_trg_Global_Ability_Recipe )
call RemoveUnit( udg_Hero_Troll[16] )
call RemoveUnit( udg_Basic_Crafting[16] )
call RemoveUnit( udg_TempTargetUnit[1] )
call ForForce( udg_TempPlayerGroup, function Trig_Start_Cinematic_A_Func217A )
call CinematicModeBJ( false, GetPlayersAll() )
call EnableTrigger(bj_cineSceneBeingSkipped)
call SetUserControlForceOn( GetPlayersAll() )
call UseTimeOfDayBJ( true )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_4274" )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_4303" )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, ( "|c00FEBA0EDifficulty: |r" + udg_D_ModeDifficulty[udg_D_Button[1]] ) )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, ( "|c00FEBA0EMode Action: |r" + udg_D_ModeAction[udg_D_Button[2]] ) )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, ( "|c00FEBA0EMode Plenty: |r" + udg_D_ModePlenty[udg_D_Button[3]] ) )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, ( "|c00FEBA0EMode Hardcore: |r" + udg_D_ModeHardcore[udg_D_Button[4]] ) )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, ( "|c00FEBA0ETutorial: |r" + udg_D_ModeTutorial[udg_D_Button[5]] ) )
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_4316" )
call TriggerSleepAction( 0.10 )
if ( Trig_Start_Cinematic_A_Func231C() ) then
set udg_Hardcore = true
else
endif
if ( Trig_Start_Cinematic_A_Func232C() ) then
call ConditionalTriggerExecute( gg_trg_Plenty_Mode_JASS )
else
endif
call TriggerSleepAction( 0.10 )
if ( Trig_Start_Cinematic_A_Func234C() ) then
call ConditionalTriggerExecute( gg_trg_Action_Mode_JASS )
else
endif
call TriggerSleepAction( 0.10 )
if ( Trig_Start_Cinematic_A_Func236C() ) then
call ConditionalTriggerExecute( gg_trg_Easy )
else
if ( Trig_Start_Cinematic_A_Func236Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Normal )
else
if ( Trig_Start_Cinematic_A_Func236Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Hard )
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Start_Cinematic_A takes nothing returns nothing
set gg_trg_Start_Cinematic_A = CreateTrigger( )
call TriggerAddAction( gg_trg_Start_Cinematic_A, function Trig_Start_Cinematic_A_Actions )
endfunction
function Trig_Random_Troll_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Troll_Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Troll_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Random_Troll_Actions takes nothing returns nothing
if ( Trig_Random_Troll_Func001C() ) then
call IssueNeutralImmediateOrderById( GetOwningPlayer(GetSpellAbilityUnit()), GetSpellAbilityUnit(), 'H001' )
else
if ( Trig_Random_Troll_Func001Func001C() ) then
call IssueNeutralImmediateOrderById( GetOwningPlayer(GetSpellAbilityUnit()), GetSpellAbilityUnit(), 'H000' )
else
if ( Trig_Random_Troll_Func001Func001Func001C() ) then
call IssueNeutralImmediateOrderById( GetOwningPlayer(GetSpellAbilityUnit()), GetSpellAbilityUnit(), 'H002' )
else
call IssueNeutralImmediateOrderById( GetOwningPlayer(GetSpellAbilityUnit()), GetSpellAbilityUnit(), 'H003' )
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Random_Troll takes nothing returns nothing
set gg_trg_Random_Troll = CreateTrigger( )
call TriggerAddAction( gg_trg_Random_Troll, function Trig_Random_Troll_Actions )
endfunction
function Trig_Choose_Hero1_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero1_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero1_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero1_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero1_new_Actions takes nothing returns nothing
set udg_Hero_Troll[1] = GetSoldUnit()
set udg_Hero_Type[1] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic01)
call CreateNUnitsAtLoc( 1, 'h01S', Player(0), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[1] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score01)
call CreateNUnitsAtLoc( 1, 'h007', Player(0), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[1] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 1 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GP', udg_Score_Memorial[1] )
call AdjustPlayerStateBJ( 200, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(0), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero1_new_Func016C() ) then
set udg_MB_PlayerClass[1] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(0), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(0), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class01)
call CreateNUnitsAtLoc( 1, 'h01D', Player(0), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[1] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[1] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[1] )
else
if ( Trig_Choose_Hero1_new_Func016Func001C() ) then
set udg_MB_PlayerClass[1] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(0), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(0), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(0), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class01)
call CreateNUnitsAtLoc( 1, 'h01U', Player(0), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[1] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[1] )
else
if ( Trig_Choose_Hero1_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[1] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(0), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(0), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class01)
call CreateNUnitsAtLoc( 1, 'h01E', Player(0), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[1] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[1] )
else
if ( Trig_Choose_Hero1_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[1] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(0), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(0), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class01)
call CreateNUnitsAtLoc( 1, 'h01T', Player(0), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[1] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[1] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(0) )
call KillUnit( gg_unit_h009_0340 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0338 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero1_new takes nothing returns nothing
set gg_trg_Choose_Hero1_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero1_new, gg_unit_h017_0338, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero1_new, function Trig_Choose_Hero1_new_Actions )
endfunction
function Trig_Choose_Hero2_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero2_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero2_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero2_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero2_new_Actions takes nothing returns nothing
set udg_Hero_Troll[2] = GetSoldUnit()
set udg_Hero_Type[2] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic02)
call CreateNUnitsAtLoc( 1, 'h01S', Player(1), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[2] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score02)
call CreateNUnitsAtLoc( 1, 'h007', Player(1), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[2] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 2 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GP', udg_Score_Memorial[2] )
call AdjustPlayerStateBJ( 200, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(1), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero2_new_Func016C() ) then
set udg_MB_PlayerClass[2] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(1), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(1), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class02)
call CreateNUnitsAtLoc( 1, 'h01D', Player(1), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[2] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[2] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[2] )
else
if ( Trig_Choose_Hero2_new_Func016Func001C() ) then
set udg_MB_PlayerClass[2] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(1), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(1), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(1), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class02)
call CreateNUnitsAtLoc( 1, 'h01U', Player(1), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[2] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[2] )
else
if ( Trig_Choose_Hero2_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[2] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(1), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(1), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class02)
call CreateNUnitsAtLoc( 1, 'h01E', Player(1), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[2] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[2] )
else
if ( Trig_Choose_Hero2_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[2] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(1), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(1), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class02)
call CreateNUnitsAtLoc( 1, 'h01T', Player(1), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[2] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[2] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(1) )
call KillUnit( gg_unit_h009_0341 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0066 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero2_new takes nothing returns nothing
set gg_trg_Choose_Hero2_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero2_new, gg_unit_h017_0066, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero2_new, function Trig_Choose_Hero2_new_Actions )
endfunction
function Trig_Choose_Hero3_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero3_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero3_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero3_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero3_new_Actions takes nothing returns nothing
set udg_Hero_Troll[3] = GetSoldUnit()
set udg_Hero_Type[3] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic03)
call CreateNUnitsAtLoc( 1, 'h01S', Player(2), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[3] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score03)
call CreateNUnitsAtLoc( 1, 'h007', Player(2), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[3] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 3 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GP', udg_Score_Memorial[3] )
call AdjustPlayerStateBJ( 200, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(2), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero3_new_Func016C() ) then
set udg_MB_PlayerClass[3] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(2), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(2), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class03)
call CreateNUnitsAtLoc( 1, 'h01D', Player(2), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[3] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[3] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[3] )
else
if ( Trig_Choose_Hero3_new_Func016Func001C() ) then
set udg_MB_PlayerClass[3] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(2), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(2), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(2), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
if ((GetPlayerController(Player(2)) == MAP_CONTROL_USER)) then
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
endif
set udg_Loc = GetRectCenter(gg_rct_Class03)
call CreateNUnitsAtLoc( 1, 'h01U', Player(2), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[3] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[3] )
else
if ( Trig_Choose_Hero3_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[3] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(2), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(2), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class03)
call CreateNUnitsAtLoc( 1, 'h01E', Player(2), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[3] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[3] )
else
if ( Trig_Choose_Hero3_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[3] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(2), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(2), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class03)
call CreateNUnitsAtLoc( 1, 'h01T', Player(2), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[3] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[3] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(2) )
call KillUnit( gg_unit_h009_0342 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0097 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero3_new takes nothing returns nothing
set gg_trg_Choose_Hero3_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero3_new, gg_unit_h017_0097, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero3_new, function Trig_Choose_Hero3_new_Actions )
endfunction
function Trig_Choose_Hero4_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero4_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero4_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero4_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero4_new_Actions takes nothing returns nothing
set udg_Hero_Troll[4] = GetSoldUnit()
set udg_Hero_Type[4] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic04)
call CreateNUnitsAtLoc( 1, 'h01S', Player(3), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[4] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score04)
call CreateNUnitsAtLoc( 1, 'h007', Player(3), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[4] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 4 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GP', udg_Score_Memorial[4] )
call AdjustPlayerStateBJ( 200, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(3), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero4_new_Func016C() ) then
set udg_MB_PlayerClass[4] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(3), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(3), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class04)
call CreateNUnitsAtLoc( 1, 'h01D', Player(3), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[4] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[4] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[4] )
else
if ( Trig_Choose_Hero4_new_Func016Func001C() ) then
set udg_MB_PlayerClass[4] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(3), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(3), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(3), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class04)
call CreateNUnitsAtLoc( 1, 'h01U', Player(3), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[4] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[4] )
else
if ( Trig_Choose_Hero4_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[4] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(3), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(3), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class04)
call CreateNUnitsAtLoc( 1, 'h01E', Player(3), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[4] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[4] )
else
if ( Trig_Choose_Hero4_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[4] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(3), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(3), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class04)
call CreateNUnitsAtLoc( 1, 'h01T', Player(3), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[4] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[4] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(3) )
call KillUnit( gg_unit_h009_0343 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0150 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero4_new takes nothing returns nothing
set gg_trg_Choose_Hero4_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero4_new, gg_unit_h017_0150, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero4_new, function Trig_Choose_Hero4_new_Actions )
endfunction
function Trig_Choose_Hero5_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero5_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero5_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero5_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero5_new_Actions takes nothing returns nothing
set udg_Hero_Troll[5] = GetSoldUnit()
set udg_Hero_Type[5] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic05)
call CreateNUnitsAtLoc( 1, 'h01S', Player(4), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[5] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score05)
call CreateNUnitsAtLoc( 1, 'h007', Player(4), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[5] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 5 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GQ', udg_Score_Memorial[5] )
call AdjustPlayerStateBJ( 200, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(4), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero5_new_Func016C() ) then
set udg_MB_PlayerClass[5] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(4), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(4), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class05)
call CreateNUnitsAtLoc( 1, 'h01D', Player(4), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[5] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[5] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[5] )
else
if ( Trig_Choose_Hero5_new_Func016Func001C() ) then
set udg_MB_PlayerClass[5] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(4), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(4), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(4), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class05)
call CreateNUnitsAtLoc( 1, 'h01U', Player(4), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[5] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[5] )
else
if ( Trig_Choose_Hero5_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[5] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(4), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(4), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class05)
call CreateNUnitsAtLoc( 1, 'h01E', Player(4), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[5] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[5] )
else
if ( Trig_Choose_Hero5_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[5] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(4), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(4), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class05)
call CreateNUnitsAtLoc( 1, 'h01T', Player(4), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[5] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[5] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(4) )
call KillUnit( gg_unit_h009_0344 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0238 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero5_new takes nothing returns nothing
set gg_trg_Choose_Hero5_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero5_new, gg_unit_h017_0238, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero5_new, function Trig_Choose_Hero5_new_Actions )
endfunction
function Trig_Choose_Hero6_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero6_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero6_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero6_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero6_new_Actions takes nothing returns nothing
set udg_Hero_Troll[6] = GetSoldUnit()
set udg_Hero_Type[6] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic06)
call CreateNUnitsAtLoc( 1, 'h01S', Player(5), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[6] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score06)
call CreateNUnitsAtLoc( 1, 'h007', Player(5), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[6] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 6 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GQ', udg_Score_Memorial[6] )
call AdjustPlayerStateBJ( 200, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(5), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero6_new_Func016C() ) then
set udg_MB_PlayerClass[6] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(5), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(5), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class06)
call CreateNUnitsAtLoc( 1, 'h01D', Player(5), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[6] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[6] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[6] )
else
if ( Trig_Choose_Hero6_new_Func016Func001C() ) then
set udg_MB_PlayerClass[6] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(5), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(5), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(5), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class06)
call CreateNUnitsAtLoc( 1, 'h01U', Player(5), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[6] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[6] )
else
if ( Trig_Choose_Hero6_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[6] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(5), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(5), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class06)
call CreateNUnitsAtLoc( 1, 'h01E', Player(5), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[6] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[6] )
else
if ( Trig_Choose_Hero6_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[6] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(5), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(5), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class06)
call CreateNUnitsAtLoc( 1, 'h01T', Player(5), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[6] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[6] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(5) )
call KillUnit( gg_unit_h009_0345 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0204 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero6_new takes nothing returns nothing
set gg_trg_Choose_Hero6_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero6_new, gg_unit_h017_0204, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero6_new, function Trig_Choose_Hero6_new_Actions )
endfunction
function Trig_Choose_Hero7_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero7_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero7_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero7_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero7_new_Actions takes nothing returns nothing
set udg_Hero_Troll[7] = GetSoldUnit()
set udg_Hero_Type[7] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic07)
call CreateNUnitsAtLoc( 1, 'h01S', Player(6), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[7] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score07)
call CreateNUnitsAtLoc( 1, 'h007', Player(6), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[7] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 7 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GQ', udg_Score_Memorial[7] )
call AdjustPlayerStateBJ( 200, Player(6), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(6), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero7_new_Func016C() ) then
set udg_MB_PlayerClass[7] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(6), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(6), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(6), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class07)
call CreateNUnitsAtLoc( 1, 'h01D', Player(6), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[7] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[7] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[7] )
else
if ( Trig_Choose_Hero7_new_Func016Func001C() ) then
set udg_MB_PlayerClass[7] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(6), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(6), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(6), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class07)
call CreateNUnitsAtLoc( 1, 'h01U', Player(6), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[7] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[7] )
else
if ( Trig_Choose_Hero7_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[7] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(6), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(6), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class07)
call CreateNUnitsAtLoc( 1, 'h01E', Player(6), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[7] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[7] )
else
if ( Trig_Choose_Hero7_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[7] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(6), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(6), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class07)
call CreateNUnitsAtLoc( 1, 'h01T', Player(6), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[7] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[7] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(6) )
call KillUnit( gg_unit_h009_0346 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0218 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero7_new takes nothing returns nothing
set gg_trg_Choose_Hero7_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero7_new, gg_unit_h017_0218, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero7_new, function Trig_Choose_Hero7_new_Actions )
endfunction
function Trig_Choose_Hero8_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero8_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero8_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero8_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero8_new_Actions takes nothing returns nothing
set udg_Hero_Troll[8] = GetSoldUnit()
set udg_Hero_Type[8] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic08)
call CreateNUnitsAtLoc( 1, 'h01S', Player(7), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[8] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score08)
call CreateNUnitsAtLoc( 1, 'h007', Player(7), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[8] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 8 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0GQ', udg_Score_Memorial[8] )
call AdjustPlayerStateBJ( 200, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(7), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero8_new_Func016C() ) then
set udg_MB_PlayerClass[8] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(7), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(7), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class08)
call CreateNUnitsAtLoc( 1, 'h01D', Player(7), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[8] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[8] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[8] )
else
if ( Trig_Choose_Hero8_new_Func016Func001C() ) then
set udg_MB_PlayerClass[8] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(7), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(7), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(7), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class08)
call CreateNUnitsAtLoc( 1, 'h01U', Player(7), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[8] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[8] )
else
if ( Trig_Choose_Hero8_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[8] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(7), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(7), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class08)
call CreateNUnitsAtLoc( 1, 'h01E', Player(7), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[8] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[8] )
else
if ( Trig_Choose_Hero8_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[8] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(7), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(7), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class08)
call CreateNUnitsAtLoc( 1, 'h01T', Player(7), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[8] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[8] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(7) )
call KillUnit( gg_unit_h009_0347 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0229 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero8_new takes nothing returns nothing
set gg_trg_Choose_Hero8_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero8_new, gg_unit_h017_0229, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero8_new, function Trig_Choose_Hero8_new_Actions )
endfunction
function Trig_Choose_Hero9_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero9_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero9_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero9_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero9_new_Actions takes nothing returns nothing
set udg_Hero_Troll[9] = GetSoldUnit()
set udg_Hero_Type[9] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic09)
call CreateNUnitsAtLoc( 1, 'h01S', Player(8), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[9] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score09)
call CreateNUnitsAtLoc( 1, 'h007', Player(8), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[9] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 9 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0H5', udg_Score_Memorial[9] )
call AdjustPlayerStateBJ( 200, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(8), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero9_new_Func016C() ) then
set udg_MB_PlayerClass[9] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(8), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(8), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class09)
call CreateNUnitsAtLoc( 1, 'h01D', Player(8), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[9] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[9] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[9] )
else
if ( Trig_Choose_Hero9_new_Func016Func001C() ) then
set udg_MB_PlayerClass[9] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(8), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(8), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(8), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class09)
call CreateNUnitsAtLoc( 1, 'h01U', Player(8), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[9] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[9] )
else
if ( Trig_Choose_Hero9_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[9] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(8), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(8), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class09)
call CreateNUnitsAtLoc( 1, 'h01E', Player(8), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[9] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[9] )
else
if ( Trig_Choose_Hero9_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[9] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(8), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(8), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class09)
call CreateNUnitsAtLoc( 1, 'h01T', Player(8), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[9] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[9] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(8) )
call KillUnit( gg_unit_h009_0348 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0339 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero9_new takes nothing returns nothing
set gg_trg_Choose_Hero9_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero9_new, gg_unit_h017_0339, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero9_new, function Trig_Choose_Hero9_new_Actions )
endfunction
function Trig_Choose_Hero10_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero10_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero10_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero10_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero10_new_Actions takes nothing returns nothing
set udg_Hero_Troll[10] = GetSoldUnit()
set udg_Hero_Type[10] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic10)
call CreateNUnitsAtLoc( 1, 'h01S', Player(9), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[10] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score10)
call CreateNUnitsAtLoc( 1, 'h007', Player(9), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[10] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 10 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0H5', udg_Score_Memorial[10] )
call AdjustPlayerStateBJ( 200, Player(9), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(9), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero10_new_Func016C() ) then
set udg_MB_PlayerClass[10] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(9), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(9), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(9), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class10)
call CreateNUnitsAtLoc( 1, 'h01D', Player(9), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[10] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[10] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[10] )
else
if ( Trig_Choose_Hero10_new_Func016Func001C() ) then
set udg_MB_PlayerClass[10] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(9), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(9), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(9), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class10)
call CreateNUnitsAtLoc( 1, 'h01U', Player(9), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[10] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[10] )
else
if ( Trig_Choose_Hero10_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[10] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(9), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(9), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class10)
call CreateNUnitsAtLoc( 1, 'h01E', Player(9), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[10] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[10] )
else
if ( Trig_Choose_Hero10_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[10] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(9), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(9), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class10)
call CreateNUnitsAtLoc( 1, 'h01T', Player(9), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[10] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[10] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(9) )
call KillUnit( gg_unit_h009_0349 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0232 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero10_new takes nothing returns nothing
set gg_trg_Choose_Hero10_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero10_new, gg_unit_h017_0232, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero10_new, function Trig_Choose_Hero10_new_Actions )
endfunction
function Trig_Choose_Hero11_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero11_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero11_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero11_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero11_new_Actions takes nothing returns nothing
set udg_Hero_Troll[11] = GetSoldUnit()
set udg_Hero_Type[11] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic11)
call CreateNUnitsAtLoc( 1, 'h01S', Player(10), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[11] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score11)
call CreateNUnitsAtLoc( 1, 'h007', Player(10), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[11] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 11 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0H5', udg_Score_Memorial[11] )
call AdjustPlayerStateBJ( 200, Player(10), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(10), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero11_new_Func016C() ) then
set udg_MB_PlayerClass[11] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(10), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(10), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(10), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class11)
call CreateNUnitsAtLoc( 1, 'h01D', Player(10), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[11] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[11] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[11] )
else
if ( Trig_Choose_Hero11_new_Func016Func001C() ) then
set udg_MB_PlayerClass[11] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(10), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(10), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(10), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
if ((GetPlayerController(Player(10)) == MAP_CONTROL_USER)) then
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
endif
set udg_Loc = GetRectCenter(gg_rct_Class11)
call CreateNUnitsAtLoc( 1, 'h01U', Player(10), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[11] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[11] )
else
if ( Trig_Choose_Hero11_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[11] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(10), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(10), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class11)
call CreateNUnitsAtLoc( 1, 'h01E', Player(10), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[11] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[11] )
else
if ( Trig_Choose_Hero11_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[11] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(10), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(10), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class11)
call CreateNUnitsAtLoc( 1, 'h01T', Player(10), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[11] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[11] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(10) )
call KillUnit( gg_unit_h009_0350 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0234 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero11_new takes nothing returns nothing
set gg_trg_Choose_Hero11_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero11_new, gg_unit_h017_0234, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero11_new, function Trig_Choose_Hero11_new_Actions )
endfunction
function Trig_Choose_Hero12_new_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero12_new_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero12_new_Func016Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero12_new_Func016C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSoldUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Choose_Hero12_new_Actions takes nothing returns nothing
set udg_Hero_Troll[12] = GetSoldUnit()
set udg_Hero_Type[12] = GetUnitTypeId(GetSoldUnit())
set udg_Loc = GetRectCenter(gg_rct_Basic12)
call CreateNUnitsAtLoc( 1, 'h01S', Player(11), udg_Loc, bj_UNIT_FACING )
set udg_Basic_Crafting[12] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Score12)
call CreateNUnitsAtLoc( 1, 'h007', Player(11), udg_Loc, bj_UNIT_FACING )
call SetUnitLifeBJ( GetLastCreatedUnit(), 1.00 )
set udg_Score_Memorial[12] = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), 12 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0H5', udg_Score_Memorial[12] )
call AdjustPlayerStateBJ( 200, Player(11), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 100, Player(11), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Choose_Hero12_new_Func016C() ) then
set udg_MB_PlayerClass[12] = "Hunter"
call AdjustPlayerStateBJ( 50, Player(11), PLAYER_STATE_RESOURCE_GOLD )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(11), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger_hunter, Player(11), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 251.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class12)
call CreateNUnitsAtLoc( 1, 'h01D', Player(11), udg_Loc, bj_UNIT_FACING )
set udg_Hunter_Crafting[12] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0CV', udg_Score_Memorial[12] )
call UnitAddAbilityBJ( 'A0CW', udg_Score_Memorial[12] )
else
if ( Trig_Choose_Hero12_new_Func016Func001C() ) then
set udg_MB_PlayerClass[12] = "Inventor"
call AdjustPlayerStateBJ( 25, Player(11), PLAYER_STATE_RESOURCE_LUMBER )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat_Inventor, Player(11), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 126.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(11), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class12)
call CreateNUnitsAtLoc( 1, 'h01U', Player(11), udg_Loc, bj_UNIT_FACING )
set udg_Inventor_Crafting[12] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0DK', udg_Score_Memorial[12] )
else
if ( Trig_Choose_Hero12_new_Func016Func001Func001C() ) then
set udg_MB_PlayerClass[12] = "Shaman"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(11), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(11), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class12)
call CreateNUnitsAtLoc( 1, 'h01E', Player(11), udg_Loc, bj_UNIT_FACING )
set udg_Shaman_Crafting[12] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0AO', udg_Score_Memorial[12] )
else
if ( Trig_Choose_Hero12_new_Func016Func001Func001Func001C() ) then
set udg_MB_PlayerClass[12] = "Warrior"
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Heat, Player(11), PLAYER_STATE_RESOURCE_LUMBER, GREATER_THAN_OR_EQUAL, 101.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_Max_Hunger, Player(11), PLAYER_STATE_RESOURCE_GOLD, GREATER_THAN_OR_EQUAL, 201.00 )
call UnitAddItemByIdSwapped( 'I07J', GetSoldUnit() )
set udg_Loc = GetRectCenter(gg_rct_Class12)
call CreateNUnitsAtLoc( 1, 'h01T', Player(11), udg_Loc, bj_UNIT_FACING )
set udg_Warrior_Crafting[12] = GetLastCreatedUnit()
call UnitAddAbilityBJ( 'A038', GetSoldUnit() )
call IssueImmediateOrder( GetSoldUnit(), "defend" )
call SetUnitManaPercentBJ( GetSoldUnit(), 100 )
call UnitAddAbilityBJ( 'A0AZ', udg_Score_Memorial[12] )
else
endif
endif
endif
endif
call IssueImmediateOrder( GetSoldUnit(), "replenishon" )
call SetUnitAbilityLevelSwapped( 'ACba', GetSoldUnit(), udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', GetSoldUnit(), udg_GameDiff )
call SelectUnitForPlayerSingle( GetSoldUnit(), Player(11) )
call KillUnit( gg_unit_h009_0351 )
call TriggerSleepAction( 0.50 )
call RemoveUnit( gg_unit_h017_0235 )
// Auto Kill
call DestroyTrigger(GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Choose_Hero12_new takes nothing returns nothing
set gg_trg_Choose_Hero12_new = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Choose_Hero12_new, gg_unit_h017_0235, EVENT_UNIT_SELL )
call TriggerAddAction( gg_trg_Choose_Hero12_new, function Trig_Choose_Hero12_new_Actions )
endfunction
function Trig_MS_Func001C takes nothing returns boolean
if ( not ( udg_Boat[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
return true
endfunction
function Trig_MS_Actions takes nothing returns nothing
if ( Trig_MS_Func001C() ) then
call DisplayTimedTextToPlayer( GetTriggerPlayer(), 0, 0, 10.00, ( "|c0000c400Troll:|r |c00ffff64Me movez by the amazing speed of " + ( R2S(GetUnitMoveSpeed(udg_BoatLoaded[GetConvertedPlayerId(GetTriggerPlayer())])) + "!|r" ) ) )
else
set udg_Speed = ( GetHeroStatBJ(bj_HEROSTAT_AGI, udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())], true) * 1 )
call DisplayTimedTextToPlayer( GetTriggerPlayer(), 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me movez by the amazing speed of " + ( R2S(( GetUnitMoveSpeed(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) + I2R(udg_Speed) )) + ( ( " for " + I2S(R2I(udg_run_energy[GetConvertedPlayerId(GetTriggerPlayer())])) ) + " energy!|r" ) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_MS takes nothing returns nothing
set gg_trg_MS = CreateTrigger( )
call TriggerAddAction( gg_trg_MS, function Trig_MS_Actions )
endfunction
function Trig_HelpTimer_25s takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 11
if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING and GetUnitState(udg_Hero_Troll[i+1], UNIT_STATE_LIFE) > 1.00 and udg_Warning[i+1] then
if GetPlayerState(Player(i), PLAYER_STATE_RESOURCE_LUMBER) <= 25 then
call DisplayTimedTextToPlayer( Player(i), 0, 0, 2.00, "TRIGSTR_1187" )
endif
if GetPlayerState(Player(i), PLAYER_STATE_RESOURCE_GOLD) <= 50 then
call DisplayTimedTextToPlayer( Player(i), 0, 0, 2.00, "TRIGSTR_3940" )
endif
if GetUnitState( udg_Hero_Troll[i+1], UNIT_STATE_MANA ) <= 50.00 then
call DisplayTimedTextToPlayer( Player(i), 0, 0, 2.00, "TRIGSTR_3981" )
endif
if GetUnitState( udg_Hero_Troll[i+1], UNIT_STATE_LIFE ) <= 50.00 then
call DisplayTimedTextToPlayer( Player(i), 0, 0, 2.00, "TRIGSTR_4040" )
endif
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_HelpTimer__JASS takes nothing returns nothing
set gg_trg_HelpTimer__JASS = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_HelpTimer__JASS, udg_HelpTimer )
call TriggerAddAction( gg_trg_HelpTimer__JASS, function Trig_HelpTimer_25s )
endfunction
function Sleep takes nothing returns nothing
local unit u
local real x
local real y
local group g = CreateGroup()
local integer i = 0
local item thekey
local boolean key = false
local integer p = GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1
local integer class = GetUnitTypeId(GetTriggerUnit())
local integer buff1 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B016')
local integer buff2 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B01O')
local integer buff3 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B01Q')
local integer buff4 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B01P')
local integer buff5 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B00H')
local integer buff6 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B00I')
local integer buff7 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'Brej')
local integer buff8 = GetUnitAbilityLevel(udg_Hero_Troll[p], 'BEsh')
set u =null
if buff8 > 0 then
else
call SetUnitState( udg_Hero_Troll[p], UNIT_STATE_LIFE, ( GetUnitState( udg_Hero_Troll[p], UNIT_STATE_LIFE) + 1 ) )
endif
if buff1 > 0 then
call SetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA, ( GetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA) + 10 ) )
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) + 8)
elseif buff2 > 0 then
call SetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA, ( GetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA) + 6 ) )
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) + 6)
elseif buff3 > 0 then
call SetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA, ( GetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA) + 4 ) )
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) + 5)
elseif buff4 > 0 then
call SetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA, ( GetUnitState( udg_Hero_Troll[p], UNIT_STATE_MANA) + 2 ) )
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) + 4)
elseif class == 'H001' then
else
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) - 1)
endif
if udg_Heart_Snake[p] == true or GetRandomInt(1, 20) == 1 then
if buff5 > 0 then
call UnitRemoveBuffBJ( 'B00H', udg_Hero_Troll[p] )
elseif buff6 > 0 then
call UnitRemoveBuffBJ( 'B00I', udg_Hero_Troll[p] )
elseif buff7 > 0 then
call UnitRemoveBuffBJ( 'Brej', udg_Hero_Troll[p] )
endif
endif
loop
exitwhen i > 5
if GetItemTypeId(UnitItemInSlot(udg_Hero_Troll[p], i)) == 'I0A8' then
set thekey = UnitItemInSlot(udg_Hero_Troll[p], i)
set key = true
endif
set i = i + 1
endloop
if key then
set x = GetUnitX(udg_Hero_Troll[p])
set y = GetUnitY(udg_Hero_Troll[p])
call GroupEnumUnitsInRange(g, x, y, 300., null)
loop
set u = FirstOfGroup(g)
exitwhen u == null
if GetUnitTypeId(u) == 'n01B' then
call RemoveItem( thekey )
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) - 20)
call ReplaceUnitBJ( u, 'n01D', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitOwner( u , Player(p-1), true )
call CreateItem( 'I042', x, y )
call CreateUnit( Player(p-1), 'h02X', x, y, bj_UNIT_FACING )
call UnitRemoveAbility( gg_unit_h00F_0043, 'A0HE' )
call SetUnitState( gg_unit_h00F_0043, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h00F_0043, UNIT_STATE_MANA) + 1 ) )
endif
call GroupRemoveUnit(g, u)
endloop
call DestroyGroup(g)
set g = null
endif
set thekey = null
set u = null
endfunction
//===========================================================================
function InitTrig_Resting_JASS takes nothing returns nothing
set gg_trg_Resting_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_Resting_JASS, function Sleep )
endfunction
library Disease
globals
private group g1=CreateGroup()
private group g2=CreateGroup()
private group g3=CreateGroup()
private integer resist=50
constant integer MALARIA_BUFF='B00I'
constant integer PLAGUE_BUFF='B00H'
constant integer FEVER_BUFF='Brej'
endglobals
public function Infection takes nothing returns nothing
local unit u1=null
local unit u2=null
local unit u3=null
local unit dummy=null
local real x1
local real x2
local real y1
local real y2
local integer res
local integer p
call GroupEnumUnitsInRect(g1, bj_mapInitialPlayableArea, null)
loop
set u1 = FirstOfGroup(g1)
set x1 = GetUnitX(u1)
set y1 = GetUnitY(u1)
exitwhen u1 == null
//Special action for diseased Heroes
if IsUnitType(u1, UNIT_TYPE_HERO) then
set p = GetPlayerId(GetOwningPlayer(u1)) + 1
//Malaria Disease
if GetUnitAbilityLevel(u1, MALARIA_BUFF) > 0 then
set udg_MB_Malaria[p]= "Yes"
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 3.00 then
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) - 3.00 ))
endif
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA) - 6.00 ))
if GetRandomReal(1., GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA)) < 20. then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x1, y1, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0K5')
call IssueTargetOrder(dummy, "cripple", u1)
endif
else
set udg_MB_Malaria[p]= "No"
endif
//Plague Disease
if GetUnitAbilityLevel(u1, PLAGUE_BUFF) > 0 then
set udg_MB_Plague[p]= "Yes"
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 4.50 then
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) - 4.50 ))
endif
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA) - 9.00 ))
if GetRandomReal(1., GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA)) < 20. then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x1, y1, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0K5')
call IssueTargetOrder(dummy, "cripple", u1)
endif
else
set udg_MB_Plague[p]= "No"
endif
//Fever Disease
if GetUnitAbilityLevel(u1, FEVER_BUFF) > 0 then
set udg_MB_Fever[p]= "Yes"
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) + GetRandomInt(0, 2))
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 1.00 then
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) - 1.00 ))
endif
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA) - 3.00 ))
if GetRandomReal(1., GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA)) < 20. then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x1, y1, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0K5')
call IssueTargetOrder(dummy, "cripple", u1)
endif
if GetRandomInt(1, 10) == 1 then
call GroupEnumUnitsInRange(g3, x1, y1, 2000., null)
loop
set u3 = FirstOfGroup(g3)
exitwhen u3 == null
if IsUnitType(u3, UNIT_TYPE_HERO) then
call DisplayTimedTextToPlayer(GetOwningPlayer(u3), 0., 0., 6.00, ( "|c0000c400Troll " + (GetPlayerName(GetOwningPlayer(u1)) + ":|r |c00ffff64AAaatcchhoo!|r" ) ) )
call PingMinimapForPlayer(GetOwningPlayer(u3), x1, y1, 3.00 )
endif
call GroupRemoveUnit(g3, u3)
endloop
endif
else
set udg_MB_Fever[p]= "No"
endif
//Action for diseased Units
else
if GetUnitAbilityLevel(u1, MALARIA_BUFF) > 0 then
if GetUnitState(u1, UNIT_STATE_LIFE) > 3.00 then
call SetUnitState(u1, UNIT_STATE_LIFE, (GetUnitState(u1, UNIT_STATE_LIFE) - 3.00 ))
call SetUnitState(u1, UNIT_STATE_MANA, (GetUnitState(u1, UNIT_STATE_MANA ) - 2.00 ))
endif
if GetRandomReal(1., GetUnitState(u1, UNIT_STATE_LIFE)) < 10 then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x1, y1, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0K5')
call IssueTargetOrder(dummy, "cripple", u1)
endif
endif
if GetUnitAbilityLevel(u1, PLAGUE_BUFF) > 0 then
if GetUnitState(u1, UNIT_STATE_LIFE) > 4.50 then
call SetUnitState(u1, UNIT_STATE_LIFE, (GetUnitState(u1, UNIT_STATE_LIFE) - 4.50 ))
call SetUnitState(u1, UNIT_STATE_MANA, (GetUnitState(u1, UNIT_STATE_MANA) - 3.00 ))
endif
if GetRandomReal(1., GetUnitState(u1, UNIT_STATE_LIFE)) < 10 then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x1, y1, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0K5')
call IssueTargetOrder(dummy, "cripple", u1)
endif
endif
if GetUnitAbilityLevel(u1, FEVER_BUFF) > 0 then
if GetUnitState(u1, UNIT_STATE_LIFE) > 1.00 then
call SetUnitState(u1, UNIT_STATE_LIFE, (GetUnitState(u1, UNIT_STATE_LIFE) - 1.00 ))
call SetUnitState(u1, UNIT_STATE_MANA, (GetUnitState(u1, UNIT_STATE_MANA) - 1.00 ))
endif
if GetRandomReal(1., GetUnitState(u1, UNIT_STATE_LIFE)) < 10 then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x1, y1, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0K5')
call IssueTargetOrder(dummy, "cripple", u1)
endif
endif
endif
//Check if Unit from group1 is infected with any disease
if GetUnitAbilityLevel(u1, MALARIA_BUFF) > 0 or GetUnitAbilityLevel(u1, PLAGUE_BUFF) > 0 or GetUnitAbilityLevel(u1, FEVER_BUFF) > 0 then
call GroupEnumUnitsInRange(g2, x1, y1, 300., null)
loop
set u2 = FirstOfGroup(g2)
exitwhen u2 == null
//check to prevent auto infection
if u2 != u1 then
//if unit from group1 has malaria and the unit2 in range has not malaria yet
if GetUnitAbilityLevel(u1, MALARIA_BUFF) > 0 and GetUnitAbilityLevel(u2, MALARIA_BUFF) == 0 then
if GetRandomInt(1, resist) <= 2 then
set x2 = GetUnitX(u2)
set y2 = GetUnitY(u2)
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x2, y2, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'ANdh')
call IssueTargetOrder(dummy, "drunkenhaze", u2)
endif
endif
//if unit from group1 has plague and the unit2 in range has not plague yet
if GetUnitAbilityLevel(u1, PLAGUE_BUFF) > 0 and GetUnitAbilityLevel(u2, PLAGUE_BUFF) == 0 then
if GetRandomInt(1, resist) <= 2 then
set x2 = GetUnitX(u2)
set y2 = GetUnitY(u2)
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x2, y2, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'ACif')
call IssueTargetOrder(dummy, "innerfire", u2)
endif
endif
//if unit from group1 has fever and the unit2 in range has not fever yet
if GetUnitAbilityLevel(u1, FEVER_BUFF) > 0 and GetUnitAbilityLevel(u2, FEVER_BUFF) == 0 then
if GetRandomInt(1, resist) <= 2 then
set x2 = GetUnitX(u2)
set y2 = GetUnitY(u2)
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x2, y2, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'ACff')
call IssueTargetOrder(dummy, "faeriefire", u2)
endif
endif
endif
call GroupRemoveUnit(g2, u2)
endloop
endif
call GroupRemoveUnit(g1, u1)
endloop
endfunction
endlibrary
library BioSupport
globals
private constant integer DummyCaster = 'ndwm'
//Slippery/Wet System Configuration
private constant integer S_Ability = 'ACcs'
private constant string S_AbltyOrder = "curse"
private constant integer S_Buff = 'BUfa'
//Cold System Configuration
private constant integer C_Ability = 'A00P'
private constant integer C_AbilityHider = 'A0I9'
private constant integer C_AbilityFever = 'ACff'
private constant string C_AbltyFeverOrder = "faeriefire"
//Hunger System Configuration
private constant integer H_AbilityHider = 'A0JE'
endglobals
private function arcanum takes integer p returns boolean
local integer i = 0
loop
exitwhen i > 5
if GetItemTypeId(UnitItemInSlot(udg_Hero_Troll[p], i)) == 'I060' then
return true
endif
set i = i +1
endloop
return false
endfunction
private function slipperyFalse takes integer p, real x, real y returns nothing
local unit dummy
set dummy = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), DummyCaster, x, y, bj_UNIT_FACING )
call UnitAddAbility( dummy, S_Ability )
if udg_ProtectSlip[p] == false then
if udg_Slippery[p] == false then
set udg_Slippery[p] = true
set udg_Crit_power[p] = ( udg_Crit_power[p] - 1 )
endif
else
call SetUnitAbilityLevel( dummy, S_Ability, 2 )
endif
call IssueTargetOrder( dummy, S_AbltyOrder, udg_Hero_Troll[p] )
set dummy =null
endfunction
public function CheckPlayer takes integer p returns nothing
local unit dummy
local real x = GetUnitX(udg_Hero_Troll[p])
local real y = GetUnitY(udg_Hero_Troll[p])
local integer wetbuff = GetUnitAbilityLevel(udg_Hero_Troll[p], S_Buff)
local integer heatbuff = GetUnitAbilityLevel(udg_Hero_Troll[p], 'Bapl')
local integer springbuff = GetUnitAbilityLevel(udg_Hero_Troll[p], 'BHab')
local integer feverbuff = GetUnitAbilityLevel(udg_Hero_Troll[p], 'Brej')
local integer shelterbuff = GetUnitAbilityLevel(udg_Hero_Troll[p], 'B01R')
local integer panicbuff = GetUnitAbilityLevel(udg_Hero_Troll[p], 'Bbsk')
local integer invi = GetUnitAbilityLevel(udg_Hero_Troll[p], 'A0DY')
local integer boatfreeze = GetUnitAbilityLevel(udg_BoatLoaded[p], 'A00P')
local integer heroheat = GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER)
local integer herohunger = GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_GOLD)
// ===== Water Wet Effect =====
if wetbuff == 0 and IsTerrainPathable( x, y, PATHING_TYPE_FLOATABILITY) == false then
if udg_ProtectWater[p] == false then
call slipperyFalse(p, x, y)
elseif wetbuff == 0 and heatbuff == 0 and udg_Rain == true then
if udg_ProtectRain[p] == false then
call slipperyFalse(p, x, y)
endif
endif
else
if wetbuff == 0 and heatbuff == 0 and udg_Rain == true then
if udg_ProtectRain[p] == false then
call slipperyFalse(p, x, y)
endif
endif
endif
if wetbuff == 0 then
if udg_Slippery[p] == true then
set udg_Slippery[p] = false
set udg_Crit_power[p] = ( udg_Crit_power[p] + 1 )
endif
else
if springbuff == 0 then
set udg_WetEffect[p] = 2
else
set udg_WetEffect[p] = 1
endif
endif
// ===== Frozen by Cold =====
if GetRandomReal(1., 25.) >= heroheat then
if udg_Boat[p] == true then
call UnitAddAbility( udg_BoatLoaded[p], C_Ability )
call SetUnitAbilityLevel( udg_BoatLoaded[p], C_Ability, 2 )
else
call UnitAddAbility( udg_Hero_Troll[p], C_AbilityHider )
endif
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 3.00 then
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) - 3.00 ))
else
call KillUnit( udg_Hero_Troll[p] )
endif
if GetRandomInt(1, 10) == 1 and feverbuff == 0 and udg_Boat[p] == false then
set dummy = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), DummyCaster, x, y, bj_UNIT_FACING )
call UnitAddAbility( dummy, C_AbilityFever )
call IssueTargetOrder( dummy, C_AbltyFeverOrder, udg_Hero_Troll[p] )
set dummy =null
endif
else
call UnitRemoveAbility( udg_Hero_Troll[p], C_AbilityHider )
call UnitRemoveAbility( udg_BoatLoaded[p], C_Ability )
endif
// ===== Starving =====
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_GOLD) - 1)
if GetRandomReal(1., 50.) >= herohunger then
call UnitAddAbility( udg_Hero_Troll[p], H_AbilityHider )
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 6.00 then
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) - 6.00 ))
else
call KillUnit( udg_Hero_Troll[p] )
endif
else
call UnitRemoveAbility( udg_Hero_Troll[p], H_AbilityHider )
endif
// ===== Faint =====
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 1.00 then
if GetRandomReal(1., 50.) >= GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA) then
set dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x, y, bj_UNIT_FACING)
call UnitAddAbility(dummy, 'A0MA')
call IssueTargetOrder(dummy, "creepthunderbolt", udg_Hero_Troll[p])
call DisplayTimedTextToPlayer(Player(p-1), 0., 0., 3.00, ( "|c0000c400Troll: |r" + "|c00ffff64Me just... nap... here.|r" ) )
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_MANA) + 30.00 ))
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) - 3)
call IssueImmediateOrder (udg_Hero_Troll[p], "replenishon")
endif
endif
// ===== Running heat and food =====
if panicbuff > 0 then
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_LUMBER) + 1)
if GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_GOLD) > 0 then
call SetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(Player(p-1), PLAYER_STATE_RESOURCE_GOLD) - 1)
else
if GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) > 1.00 then
call SetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE, (GetUnitState(udg_Hero_Troll[p], UNIT_STATE_LIFE) - 1.00 ))
else
call KillUnit( udg_Hero_Troll[p] )
endif
endif
endif
endfunction
endlibrary
function Trig_Survival_Effects_Func002Func006Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) > 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func002Func006A takes nothing returns nothing
if ( Trig_Survival_Effects_Func002Func006Func001C() ) then
else
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 6.00 ) )
endif
endfunction
function Trig_Survival_Effects_Func002C takes nothing returns boolean
if ( not ( udg_Rain == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func004Func005Func005C takes nothing returns boolean
if ( not ( GetRandomInt(1, 20) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func004Func005A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 1.50 ) )
set udg_Loc = GetUnitLoc(GetEnumUnit())
set udg_PointX = GetLocationX(udg_Loc)
set udg_PointY = GetLocationY(udg_Loc)
if ( Trig_Survival_Effects_Func004Func005Func005C() ) then
call Weather_ForestFire( udg_PointX, udg_PointY)
else
endif
call RemoveLocation(udg_Loc)
endfunction
function Trig_Survival_Effects_Func004C takes nothing returns boolean
if ( not ( udg_Wind == true ) ) then
return false
endif
if ( not ( udg_Winter == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func006Func001Func001Func007C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_Hero_Troll[udg_A]) > 6.00 ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func006Func001Func001C takes nothing returns boolean
if ( not ( udg_Wind == true ) ) then
return false
endif
if ( not ( udg_Winter == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'B016') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'B01O') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'B01Q') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'B01P') == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func006Func001Func003Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'Bapl') == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BUfa') == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func006Func001Func003Func003C takes nothing returns boolean
if ( ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BHab') == true ) ) then
return true
endif
if ( ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'Bapl') == true ) ) then
return true
endif
return false
endfunction
function Trig_Survival_Effects_Func006Func001Func003C takes nothing returns boolean
if ( not Trig_Survival_Effects_Func006Func001Func003Func003C() ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func006Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Hero_Troll[udg_A]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002Func003Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BUfa') == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BHab') == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002Func003Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BUfa') == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BHab') == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002Func003C takes nothing returns boolean
if ( not ( udg_Freezing == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002Func004Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BUfa') == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BHab') == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002Func004Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BUfa') == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Hero_Troll[udg_A], 'BHab') == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002Func004C takes nothing returns boolean
if ( not ( udg_Freezing == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001Func002C takes nothing returns boolean
if ( not ( GetTimeOfDay() > 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() < 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func009Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Hero_Troll[udg_A]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func012Func001Func001Func002C takes nothing returns boolean
if ( not ( IsTerrainPathableBJ(udg_Loc, PATHING_TYPE_WALKABILITY) == false ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func012Func001Func001C takes nothing returns boolean
if ( not ( udg_Boat[udg_A] == true ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hero_Troll[udg_A]) <= 10.00 ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Func012Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Hero_Troll[udg_A]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Survival_Effects_Actions takes nothing returns nothing
// Raining Douse Fire
if ( Trig_Survival_Effects_Func002C() ) then
set udg_TempGroup = GetUnitsOfTypeIdAll('h00A')
set udg_TempGroup2 = GetUnitsOfTypeIdAll('h00B')
call GroupAddGroup( udg_TempGroup2, udg_TempGroup )
call DestroyGroup(udg_TempGroup2)
call ForGroupBJ( udg_TempGroup, function Trig_Survival_Effects_Func002Func006A )
call DestroyGroup(udg_TempGroup)
else
endif
// Blowing Wind Damage
if ( Trig_Survival_Effects_Func004C() ) then
set udg_TempGroup = GetUnitsOfTypeIdAll('h00A')
set udg_TempGroup2 = GetUnitsOfTypeIdAll('h00B')
call GroupAddGroup( udg_TempGroup2, udg_TempGroup )
call DestroyGroup(udg_TempGroup2)
call ForGroupBJ( udg_TempGroup, function Trig_Survival_Effects_Func004Func005A )
call DestroyGroup(udg_TempGroup)
else
endif
// Heat Firecamp ---- Hunger Effect and Damage ---- Wind Damage
set udg_A = 1
loop
exitwhen udg_A > 12
if ( Trig_Survival_Effects_Func006Func001C() ) then
if ( Trig_Survival_Effects_Func006Func001Func001C() ) then
if ( Trig_Survival_Effects_Func006Func001Func001Func007C() ) then
call SetUnitLifeBJ( udg_Hero_Troll[udg_A], ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_Hero_Troll[udg_A]) - 6.00 ) )
else
call KillUnit( udg_Hero_Troll[udg_A] )
set udg_Die_Wind[udg_A] = ( udg_Die_Wind[udg_A] + 1 )
endif
else
endif
// Firecamp, Forge, HotSpring Effect on Heat
if ( Trig_Survival_Effects_Func006Func001Func003C() ) then
call AdjustPlayerStateBJ( 8, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Survival_Effects_Func006Func001Func003Func002C() ) then
call UnitRemoveBuffBJ( 'BUfa', udg_Hero_Troll[udg_A] )
else
endif
else
endif
else
endif
set udg_A = udg_A + 1
endloop
call TriggerSleepAction( 0.10 )
// Heat Effect and Damage
set udg_A = 1
loop
exitwhen udg_A > 12
if ( Trig_Survival_Effects_Func009Func001C() ) then
// Day, Night, Freezing and Wet Effect on Heat
if ( Trig_Survival_Effects_Func009Func001Func002C() ) then
// Day
if ( Trig_Survival_Effects_Func009Func001Func002Func004C() ) then
if ( Trig_Survival_Effects_Func009Func001Func002Func004Func001C() ) then
call AdjustPlayerStateBJ( -8, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
else
call AdjustPlayerStateBJ( -4, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
endif
else
if ( Trig_Survival_Effects_Func009Func001Func002Func004Func002C() ) then
else
call AdjustPlayerStateBJ( 4, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
endif
endif
else
// Night
if ( Trig_Survival_Effects_Func009Func001Func002Func003C() ) then
if ( Trig_Survival_Effects_Func009Func001Func002Func003Func001C() ) then
call AdjustPlayerStateBJ( -16, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
else
call AdjustPlayerStateBJ( -8, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
endif
else
if ( Trig_Survival_Effects_Func009Func001Func002Func003Func002C() ) then
call AdjustPlayerStateBJ( -8, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
else
call AdjustPlayerStateBJ( -4, ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER )
endif
endif
endif
else
endif
set udg_A = udg_A + 1
endloop
call TriggerSleepAction( 0.10 )
// Energy in Boat
set udg_A = 1
loop
exitwhen udg_A > 12
if ( Trig_Survival_Effects_Func012Func001C() ) then
if ( Trig_Survival_Effects_Func012Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_BoatLoaded[udg_A])
if ( Trig_Survival_Effects_Func012Func001Func001Func002C() ) then
call IssueImmediateOrderById( udg_BoatLoaded[udg_A], String2OrderIdBJ("unloadallinstant") )
else
call SelectUnitRemoveForPlayer( udg_BoatLoaded[udg_A], ConvertedPlayer(udg_A) )
set udg_Loc2 = RandomPointInRange(udg_Loc, 500)
call IssuePointOrderLocBJ( udg_BoatLoaded[udg_A], "move", udg_Loc2 )
call RemoveLocation(udg_Loc2)
endif
call RemoveLocation(udg_Loc)
else
endif
else
endif
set udg_A = udg_A + 1
endloop
endfunction
//===========================================================================
function InitTrig_Survival_Effects takes nothing returns nothing
set gg_trg_Survival_Effects = CreateTrigger( )
call TriggerAddAction( gg_trg_Survival_Effects, function Trig_Survival_Effects_Actions )
endfunction
function Random_Weather takes nothing returns nothing
if GetRandomInt(1, 5) == 1 and udg_Rain == false and udg_Freezing == false and udg_Wind == false and udg_Winter == false then
call Weather_Rain()
elseif GetRandomInt(1, udg_Xnumber) == 1 and udg_Rain == false and udg_Freezing == false and udg_Wind == false and udg_Winter == false then
call Weather_Freezing()
elseif GetRandomInt(1, udg_Xnumber) == 1 and udg_Rain == false and udg_Freezing == false and udg_Wind == false and udg_Winter == false then
call Weather_Wind()
endif
endfunction
//===========================================================================
function InitTrig_Random_Weather_JASS takes nothing returns nothing
set gg_trg_Random_Weather_JASS = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_Random_Weather_JASS, udg_WeatherTimer )
call TriggerAddAction( gg_trg_Random_Weather_JASS, function Random_Weather )
endfunction
function Totem_Prayers takes nothing returns nothing
local unit u = GetTriggerUnit()
if GetSpellAbilityId() == 'A0C6' then
if udg_Rain == false and udg_Winter == false then
call Weather_Rain()
else
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerSleepAction(1)
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + 75. ))
if IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
endif
endif
elseif GetSpellAbilityId() == 'A09L' then
if udg_Freezing == false and udg_Winter == false then
call Weather_Freezing()
else
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerSleepAction(1)
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + 150. ))
if IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
endif
endif
elseif GetSpellAbilityId() == 'A08Q' then
if udg_Wind == false and udg_Winter == false then
call Weather_Wind()
else
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerSleepAction(1)
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + 150. ))
if IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
endif
endif
elseif GetSpellAbilityId() == 'A09R' then
if udg_Rain == false and udg_Wind == false and udg_Freezing == false and udg_Winter == false then
call Weather_Winter()
else
call IssueImmediateOrderBJ( GetTriggerUnit(), "stop" )
call TriggerSleepAction(1)
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + 500. ))
if IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
elseif IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Godz will listen to ye prayerz only when the weather be clear!|r" )
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Totem_Prayers_JASS takes nothing returns nothing
set gg_trg_Totem_Prayers_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_Totem_Prayers_JASS, function Totem_Prayers )
endfunction
library Weather
globals
private group g=CreateGroup()
private integer i
private real time
private unit array ztarget
endglobals
public function ForestFire takes real x, real y returns nothing
local unit fire
set fire = CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00S', x, y, bj_UNIT_FACING )
call SetUnitUserData( fire, 2)
if udg_Rain == false and udg_Wind == false then
call SetUnitState(fire, UNIT_STATE_LIFE, GetRandomReal(20., 40.) )
call SetUnitAbilityLevel( fire, 'A0H7', 2 )
else
call SetUnitState(fire, UNIT_STATE_LIFE, GetRandomReal(20., 30.) )
if udg_Rain then
call SetUnitAbilityLevel( fire, 'A0H7', 1 )
else
call SetUnitAbilityLevel( fire, 'A0H7', 3 )
endif
endif
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 4.00, "|c009966ffOld Troll:|r |c00ffff64Oh, no, mon, a forest fire!|r" )
call PingMinimap( x, y, 4.00 )
endfunction
private function Pathing takes real x, real y returns boolean
if ( not ( IsTerrainPathable( x, y, PATHING_TYPE_FLOATABILITY) == true ) ) then
return false
endif
if ( not ( IsTerrainPathable( x, y, PATHING_TYPE_WALKABILITY) == false ) ) then
return false
endif
if ( not ( IsTerrainPathable( x, y, PATHING_TYPE_BUILDABILITY) == false ) ) then
return false
endif
return true
endfunction
private function Display takes player owner, integer msg returns nothing
local integer team
if IsPlayerInForce(owner, udg_Team[1]) then
set team =1
elseif IsPlayerInForce(owner, udg_Team[2]) then
set team =2
elseif IsPlayerInForce(owner, udg_Team[3]) then
set team =3
endif
if msg == 1 then
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 6.00, ("|c009966ffOld Troll:|r |c00ffff64The Gods respect the " + udg_TeamName[team] + "! They be givin powah to them Totem." ))
elseif msg == 2 then
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(owner) + " from the " + udg_TeamName[team] + " haz been struck by lightning!|r" ))
endif
endfunction
private function Lightning takes integer chance, integer count returns nothing
local real x
local real y
local real dmg
local player owner
local integer t
local destructable d
local effect lightbolt
if ( GetRandomInt(1, chance) == 1 ) then
set t = GetRandomInt(0, count)
if IsUnitType(ztarget[t], UNIT_TYPE_DEAD) == false then
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.10, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 90.00, 0 )
call TriggerSleepAction(0.1)
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.10, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 90.00, 0 )
set x = GetUnitX(ztarget[t])
set y = GetUnitY(ztarget[t])
set i = GetUnitTypeId(ztarget[t])
set owner = GetOwningPlayer(ztarget[t])
set lightbolt = AddSpecialEffect( "Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl", x, y )
if i == TOTEM_ID then
call SetUnitState(ztarget[t], UNIT_STATE_MANA, 1000.)
call Display(owner,1)
set dmg = 0
elseif IsUnitType(ztarget[t], UNIT_TYPE_STRUCTURE) then
set dmg = GetRandomReal(25.00, 50.00)
elseif IsUnitType(ztarget[t], UNIT_TYPE_HERO) then
set dmg = GetRandomReal(50.00, 200.00)
call Display(owner,2)
else
set dmg = GetRandomReal(50.00, 200.00)
endif
if GetUnitState(ztarget[t],UNIT_STATE_LIFE) > dmg then
call SetUnitState(ztarget[t], UNIT_STATE_LIFE, (GetUnitState(ztarget[t], UNIT_STATE_LIFE) - dmg) )
else
call KillUnit( ztarget[t] )
if IsUnitType(ztarget[t], UNIT_TYPE_HERO) then
set udg_Die_Lightning[GetPlayerId(owner)+1] = ( udg_Die_Lightning[GetPlayerId(owner)+1] + 1 )
endif
endif
call PlaySoundBJ( gg_snd_LightningBolt1 )
call TriggerSleepAction(0.1)
call DestroyEffect(lightbolt)
set owner =null
endif
else
set t = GetRandomInt(1, udg_Tree_count)
if GetDestructableLife(udg_Tree[t]) > 0.5 then
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.10, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 90.00, 0 )
call TriggerSleepAction(0.1)
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.10, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 90.00, 0 )
set x = GetDestructableX(udg_Tree[t])
set y = GetDestructableY(udg_Tree[t])
set lightbolt = AddSpecialEffect( "Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl", x, y )
call DisableTrigger( gg_trg_DropItemDestructible__JASS )
call RemoveDestructable(udg_Tree[t])
call EnableTrigger( gg_trg_DropItemDestructible__JASS )
set d = CreateDestructable( 'NTtw', x, y, 0., 0.90, GetRandomInt(0, 9) )
call TriggerRegisterDeathEvent( gg_trg_DropItemDestructible__JASS, d )
if GetRandomInt(1, 20) == 1 then
call ForestFire(x,y)
endif
call PlaySoundBJ( gg_snd_LightningBolt1 )
call TriggerSleepAction(0.1)
call DestroyEffect(lightbolt)
set d =null
endif
endif
endfunction
private function Plants takes real x, real y returns nothing
local unit flower
set flower = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), udg_Plants[GetRandomInt(1, 4)], x, y, bj_UNIT_FACING )
call UnitRemoveAbility( flower, 'Afir' )
call UnitRemoveAbility( flower, 'Afio' )
call UnitRemoveAbility( flower, 'Afih' )
call UnitRemoveAbility( flower, 'Afin' )
call UnitRemoveAbility( flower, 'Afiu' )
set udg_count_Plants = ( udg_count_Plants + 1 )
set flower =null
endfunction
// Freezing = 70-140 (hard) 30-60 (other) ( 2x 2% (0%) plants mortality + 17% (8%) plants mortality , -1 honey , bear hibernate )
public function Freezing takes nothing returns nothing
local unit u=null
local item honey=null
local real dmg
// ===== Create weather if not existing =====
if (udg_Freeze_weather == null) then
set udg_Freeze_weather = AddWeatherEffect(bj_mapInitialPlayableArea, 'SNhs')
endif
// ===== Start Freezing Weather =====
call EnableWeatherEffect( udg_Freeze_weather, true )
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 6.00, "|c009966ffOld Troll:|r |c00ffff64It'z snowin', mon. Go put some wood in the fire place, me no likez cold.|r" )
set udg_Freezing = true
set udg_MB_Weather = "Snow"
if udg_GameDiff == 3 then
set time = GetRandomReal(70.00, 140.00)
set dmg = 50.
else
set time = GetRandomReal(30.00, 60.00)
set dmg = 35.
endif
// ===== Slow plant Growth and make Bear hibernate =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(5., dmg) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(5., 15.) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(5., dmg) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(5., 30.) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - 30. ))
set honey = UnitItemInSlot(u, 1)
if honey != null and GetItemTypeId(honey) == HONEY_ID then
if GetItemCharges(honey) == 1 then
call RemoveItem(honey)
else
call SetItemCharges( honey, ( GetItemCharges(honey) - 1 ) )
endif
endif
set honey =null
elseif i == BEARCUB_ID or i == BEAR_ID or i == OLDBEAR_ID or i == CAVEBEAR_ID then
call IssueTargetOrder( u, "sleep", u )
endif
call GroupRemoveUnit(g, u)
endloop
// ===== Freeze Duration =====
call TriggerSleepAction(time)
// ===== Slow plant Growth and Remove Hibernation Mode from Bears =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(1., dmg) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(5., 15.) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(1., dmg) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(5., 30.) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - 30. ))
elseif i == BEARCUB_ID or i == BEAR_ID or i == OLDBEAR_ID or i == CAVEBEAR_ID then
call UnitWakeUp(u)
endif
call GroupRemoveUnit(g, u)
endloop
// ===== Stop Freezing Weather =====
call RemoveWeatherEffect(udg_Freeze_weather)
set udg_Freeze_weather = null
set udg_Freezing = false
set udg_MB_Weather = "Clear"
endfunction
// Rain = 80-180 (hard) 35-85 (other) ( 4 lightning , 4 plants )
public function Rain takes nothing returns nothing
local real x
local real y
local unit u=null
local rect area
local integer count=0
local integer chance
// ===== Create weather if not existing =====
if (udg_Rain_day == null) then
set udg_Rain_day = AddWeatherEffect(bj_mapInitialPlayableArea, 'RAhr')
endif
// ===== Start Rain Weather =====
if udg_GameDiff == 3 then
set chance = 3
set time = GetRandomReal(60.00, 120.00)
else
set chance = 4
set time = GetRandomReal(15.00, 25.00)
endif
call EnableWeatherEffect( udg_Rain_day, true )
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 6.00, "|c009966ffOld Troll:|r|c00ffff64Oh, It'z rainin'. That'z good for the herbz and iz bad for me old bonez...|r" )
set udg_Rain = true
set udg_MB_Weather = "Rain"
// ===== Rain Change the Fishes in the Water Area =====
set udg_FishCaught[1] = 'nska'
set udg_FishCaught[4] = 'n00B'
set udg_FishCaught[23] = 'nska'
set udg_FishCaught[26] = 'n00B'
set udg_FishCaught[43] = 'nska'
set udg_FishCaught[49] = 'n00B'
set udg_FishCaught[61] = 'nska'
set udg_FishCaught[64] = 'n00B'
set udg_FishCaught[81] = 'nska'
set udg_FishCaught[85] = 'n00B'
// ========== Rain makes plants grow ==========
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) + GetRandomReal(5.00, 10.00) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + GetRandomReal(5.00, 20.00) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) + GetRandomReal(10.00, 20.00) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + GetRandomReal(5.00, 20.00) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(25.00, 50.00) ))
elseif i == INVENTOR_ID or i == HUNTER_ID or i == SHAMAN_ID or i == WARRIOR_ID or i == TOTEM_ID or i == TOWER_A_ID or i == TOWER_B_ID or i == TOWER_C_ID or i == TOWER_D_ID or i == HUTT_ID or i == ARMORY_A_ID or i == ARMORY_B_ID or i == MERCHANT_A_ID or i == MERCHANT_B_ID or i == MERCHANT_C_ID or i == VOODOO_A_ID or i == VOODOO_B_ID or i == VOODOO_C_ID or i == WORKSHOP_A_ID or i == WORKSHOP_B_ID or i == TANNER_A_ID or i == TANNER_B_ID or i == FORGE_A_ID or i == FORGE_S_ID or i == CAULDRON_A_ID or i == CAULDRON_C_ID or i == TENTB_ID or i == TENTHB_ID or i == TENTS_ID or i == TENTHS_ID or i == TENTP_ID or i == TENTHP_ID or i == PIGLET_ID or i == BOAR_ID or i == FATHOG_ID or i == ANTELOPEFAWN_ID or i == ANTELOPE_ID or i == ANTELOPESTAG_ID or i == BEARCUB_ID or i == BEAR_ID or i == OLDBEAR_ID or i == SABERKITTEN_ID or i == SABERCAT_ID or i == OLDSABERCAT_ID or i == RACOONCUB_ID or i == RACOON_ID or i == FATRACOON_ID or i == BUNNY_ID or i == RABBIT_ID or i == FATRABBIT_ID or i == HERMITCRAB_ID or i == RIVERCRAB_ID or i == IMPERCRAB_ID or i == ALLIGATORHATCHLING_ID or i == ALLIGATOR_ID or i == GIANTALLIGATOR_ID or i == FROG_ID or i == BULLFROG_ID or i == TORTOISE_ID or i == GIANTTORTOISE_ID or i == ANCIENTTORTOISE_ID or i == FROLL_ID or i == JUNGLEBIRD_ID or i == BIGJUNGLEBIRD_ID or i == VULTURE_ID or i == GRIFFONVULTURE_ID or i == RAT_ID or i == MANGYRAT_ID or i == JUNGLEASPIC_ID or i == JUNGLEVIPER_ID or i == ANACONDA_ID or i == BLACKWIDOW_ID or i == TARENTULA_ID or i == TARENTULAQUEEN_ID or i == DOG1_ID or i == DOG2_ID or i == DOG3_ID or i == DOG4_ID or i == DOG5_ID or i == DOG6_ID or i == HAWK1_ID or i == HAWK2_ID or i == HAWK3_ID or i == HAWK4_ID or i == FROLLHUTT_ID then
set ztarget[count] = u
set count = count + 1
endif
call GroupRemoveUnit(g, u)
endloop
call TriggerSleepAction( GetRandomReal(5.00, 20.00) )
// ===== Lightning 1 =====
call Lightning(chance,count)
// ===== Create New Plants =====
set area = udg_Area[GetRandomInt(1, 9)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
if Pathing(x,y) then
call Plants(x,y)
endif
call TriggerSleepAction( GetRandomReal(5.00, 20.00) )
// ===== Lightning 2 =====
call Lightning(chance,count)
// ===== Create New Plants =====
set area = udg_Area[GetRandomInt(1, 9)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
if Pathing(x,y) then
call Plants(x,y)
endif
call TriggerSleepAction( GetRandomReal(5.00, 20.00) )
// ===== Lightning 3 =====
call Lightning(chance,count)
// ===== Create New Plants =====
set area = udg_Area[GetRandomInt(1, 9)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
if Pathing(x,y) then
call Plants(x,y)
endif
// ===== Create New Plants =====
set area = udg_Area[GetRandomInt(1, 9)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
if Pathing(x,y) then
call Plants(x,y)
endif
// ===== Variable cleaning =====
set i = 0
loop
exitwhen i > count
set ztarget[i] = null
set i = i + 1
endloop
set u=null
// ===== Rain Duration =====
call TriggerSleepAction(time)
// ===== Reset the Fishes chance for Water Area =====
set udg_FishCaught[1] = 'n00A'
set udg_FishCaught[4] = 'n018'
set udg_FishCaught[23] = 'n00A'
set udg_FishCaught[26] = 'n018'
set udg_FishCaught[43] = 'n00A'
set udg_FishCaught[49] = 'n018'
set udg_FishCaught[61] = 'n018'
set udg_FishCaught[64] = 'n00A'
set udg_FishCaught[81] = 'n00A'
set udg_FishCaught[85] = 'n018'
// ===== Stop Rain Weather =====
call RemoveWeatherEffect(udg_Rain_day)
set udg_Rain_day = null
set udg_Rain = false
set udg_MB_Weather = "Clear"
endfunction
// wind = 60-120 (hard) 20-40 (other) (birds 10-40 dmg)
public function Wind takes nothing returns nothing
local unit u=null
// ===== Create weather if not existing =====
if (udg_Wind_Weather == null) then
set udg_Wind_Weather = AddWeatherEffect(bj_mapInitialPlayableArea, 'WOcw')
endif
// ===== Start Wind Weather =====
call EnableWeatherEffect( udg_Wind_Weather, true )
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 6.00, "|c009966ffOld Troll:|r |c00ffff64Mon, a storm iz comin'! That can't be good for me health.|r" )
set udg_Wind = true
set udg_MB_Weather = "Wind"
if udg_GameDiff == 3 then
set time = GetRandomReal(60.00, 120.00)
else
set time = GetRandomReal(20.00, 40.00)
endif
call TriggerSleepAction( GetRandomReal(10.00, 20.00) )
// ===== Damage Plants Health =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID or i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 20.) ))
elseif i == JUNGLEBIRD_ID or i == BIGJUNGLEBIRD_ID or i == VULTURE_ID or i == GRIFFONVULTURE_ID or i == HAWK1_ID or i == HAWK2_ID or i == HAWK3_ID or i == HAWK4_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
endif
call GroupRemoveUnit(g, u)
endloop
// ===== Wind Duration =====
call TriggerSleepAction(time)
// ===== Stop Wind Weather =====
set i = 1
loop
exitwhen i > 12
if GetUnitState(udg_Hero_Troll[i], UNIT_STATE_LIFE) > 0.00 then
call UnitRemoveBuffBJ( 'Bslo', udg_Hero_Troll[i] )
endif
set i = i + 1
endloop
call RemoveWeatherEffect(udg_Wind_Weather)
set udg_Wind_Weather = null
set udg_Wind = false
set udg_MB_Weather = "Clear"
endfunction
// freezing = 190-410 sec, rain = 130-270 sec, wind = 60-100 sec ( 5 lightning, -2 honey, 4x 3% plants mortality + 50% plants mortality)
public function Winter takes nothing returns nothing
local unit u=null
local item honey=null
local integer count=0
local integer chance
// game difficulty setting
if udg_GameDiff == 3 then
set chance = 3
else
set chance = 4
endif
// ===== Start Freezing Weather =====
call EnableWeatherEffect( udg_Freeze_weather, true )
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 6.00, "|c009966ffOld Troll:|r |c00ffff64The Troll Gods are angry, the Longest Winter haz begun!!!|r" )
set udg_Freezing = true
set udg_MB_Weather = "Winter"
call TriggerSleepAction(GetRandomReal(10.00, 30.00))
// ===== Damage plants and slow Growth and make Bear hibernate =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 50.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 25.) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 50.) ))
elseif i == CARNIVORPLANT_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - 50. ))
set honey = UnitItemInSlot(u, 1)
if honey != null and GetItemTypeId(honey) == HONEY_ID then
if GetItemCharges(honey) == 1 then
call RemoveItem(honey)
else
call SetItemCharges( honey, ( GetItemCharges(honey) - 1 ) )
endif
endif
set honey =null
elseif i == BEARCUB_ID or i == BEAR_ID or i == OLDBEAR_ID or i == CAVEBEAR_ID then
call IssueTargetOrder( u, "sleep", u )
set ztarget[count] = u
set count = count + 1
elseif i == INVENTOR_ID or i == HUNTER_ID or i == SHAMAN_ID or i == WARRIOR_ID or i == TOTEM_ID or i == TOWER_A_ID or i == TOWER_B_ID or i == TOWER_C_ID or i == TOWER_D_ID or i == HUTT_ID or i == ARMORY_A_ID or i == ARMORY_B_ID or i == MERCHANT_A_ID or i == MERCHANT_B_ID or i == MERCHANT_C_ID or i == VOODOO_A_ID or i == VOODOO_B_ID or i == VOODOO_C_ID or i == WORKSHOP_A_ID or i == WORKSHOP_B_ID or i == TANNER_A_ID or i == TANNER_B_ID or i == FORGE_A_ID or i == FORGE_S_ID or i == CAULDRON_A_ID or i == CAULDRON_C_ID or i == TENTB_ID or i == TENTHB_ID or i == TENTS_ID or i == TENTHS_ID or i == TENTP_ID or i == TENTHP_ID or i == PIGLET_ID or i == BOAR_ID or i == FATHOG_ID or i == ANTELOPEFAWN_ID or i == ANTELOPE_ID or i == ANTELOPESTAG_ID or i == SABERKITTEN_ID or i == SABERCAT_ID or i == OLDSABERCAT_ID or i == RACOONCUB_ID or i == RACOON_ID or i == FATRACOON_ID or i == BUNNY_ID or i == RABBIT_ID or i == FATRABBIT_ID or i == HERMITCRAB_ID or i == RIVERCRAB_ID or i == IMPERCRAB_ID or i == ALLIGATORHATCHLING_ID or i == ALLIGATOR_ID or i == GIANTALLIGATOR_ID or i == FROG_ID or i == BULLFROG_ID or i == TORTOISE_ID or i == GIANTTORTOISE_ID or i == ANCIENTTORTOISE_ID or i == FROLL_ID or i == JUNGLEBIRD_ID or i == BIGJUNGLEBIRD_ID or i == VULTURE_ID or i == GRIFFONVULTURE_ID or i == RAT_ID or i == MANGYRAT_ID or i == JUNGLEASPIC_ID or i == JUNGLEVIPER_ID or i == ANACONDA_ID or i == BLACKWIDOW_ID or i == TARENTULA_ID or i == TARENTULAQUEEN_ID or i == DOG1_ID or i == DOG2_ID or i == DOG3_ID or i == DOG4_ID or i == DOG5_ID or i == DOG6_ID or i == HAWK1_ID or i == HAWK2_ID or i == HAWK3_ID or i == HAWK4_ID or i == FROLLHUTT_ID then
set ztarget[count] = u
set count = count + 1
endif
call GroupRemoveUnit(g, u)
set u=null
endloop
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(10.00, 30.00) )
// ===== Lightning 2 =====
call Lightning(chance,count)
// ===== Duration =====
call TriggerSleepAction(GetRandomReal(40.00, 80.00))
// ===== Start Rain Weather =====
call EnableWeatherEffect( udg_Rain_day, true )
set udg_Rain = true
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(5.00, 15.00) )
// ===== Lightning 3 =====
call Lightning(chance,count)
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(5.00, 15.00) )
// ===== Lightning 4 =====
call Lightning(chance,count)
// ===== Damage plants and slow Growth =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 50.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 25.) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 50.) ))
elseif i == CARNIVORPLANT_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - 50. ))
endif
call GroupRemoveUnit(g, u)
set u=null
endloop
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(45.00, 95.00) )
// ===== Lightning 5 =====
call Lightning(chance,count)
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(5.00, 15.00) )
// ===== Lightning 6 =====
call Lightning(chance,count)
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(10.00, 30.00) )
// ===== Start Wind Weather =====
call EnableWeatherEffect( udg_Wind_Weather, true )
set udg_Wind = true
// ===== Damage plants and slow Growth =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 50.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 25.) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 50.) ))
elseif i == CARNIVORPLANT_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - 50. ))
set honey = UnitItemInSlot(u, 1)
if honey != null and GetItemTypeId(honey) == HONEY_ID then
if GetItemCharges(honey) == 1 then
call RemoveItem(honey)
else
call SetItemCharges( honey, ( GetItemCharges(honey) - 1 ) )
endif
endif
set honey =null
endif
call GroupRemoveUnit(g, u)
set u=null
endloop
// ===== Duration =====
call TriggerSleepAction( GetRandomReal(60.00, 100.00) )
// ===== Slow plant Growth and Remove Hibernation Mode from Bears =====
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == ARIA_ID or i == BARDANE_ID or i == CORIAN_ID or i == DRAXIMOR_ID or i == BERRYSAPPLING_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 50.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 25.) ))
elseif i == BERRYBUSH_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - GetRandomReal(10., 50.) ))
elseif i == CARNIVORPLANT_ID then
call SetUnitState(u, UNIT_STATE_LIFE, (GetUnitState(u, UNIT_STATE_LIFE) - GetRandomReal(10., 40.) ))
elseif i == BEEHIVE_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) - 50. ))
elseif i == BEARCUB_ID or i == BEAR_ID or i == OLDBEAR_ID or i == CAVEBEAR_ID then
call UnitWakeUp(u)
endif
call GroupRemoveUnit(g, u)
set u=null
endloop
// ===== Stop Wind Weather =====
call EnableWeatherEffect( udg_Wind_Weather, false )
set udg_Wind = false
set i = 1
loop
exitwhen i > 12
if GetUnitState(udg_Hero_Troll[i], UNIT_STATE_LIFE) > 0.00 then
call UnitRemoveBuffBJ( 'Bslo', udg_Hero_Troll[i] )
endif
set i = i + 1
endloop
// ===== Stop Rain Weather =====
call EnableWeatherEffect( udg_Rain_day, false )
set udg_Rain = false
// ===== Variable cleaning =====
set i = 0
loop
exitwhen i > count
set ztarget[i] = null
set i = i + 1
endloop
// ===== Stop Freezing Weather =====
call EnableWeatherEffect( udg_Freeze_weather, false )
set udg_Freezing = false
set udg_MB_Weather = "Clear"
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
function FireSpread takes nothing returns nothing
local real x
local real x1
local real y
local real y1
local real n
local real d
local unit fire
local integer chance
set x = GetUnitX(GetTriggerUnit())
set y = GetUnitY(GetTriggerUnit())
set n = GetRandomReal(0, 360)
set d = GetRandomReal(600., 800.)
set x1 = x + d * Cos(n * bj_DEGTORAD)
set y1 = y + d * Sin(n * bj_DEGTORAD)
if IsTerrainPathable( x1, y1, PATHING_TYPE_FLOATABILITY) then
set chance = GetUnitUserData(GetTriggerUnit())
if GetRandomInt(1, chance )== 1 and chance < 5 then
set fire = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00S', x1, y1, bj_UNIT_FACING)
call SetUnitUserData( fire, chance + 1)
else
set fire = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00R', x1, y1, bj_UNIT_FACING)
endif
if udg_Rain == false and udg_Wind == false then
call SetUnitState(fire, UNIT_STATE_LIFE, GetRandomReal(20., 40.) )
call SetUnitAbilityLevel( fire, 'A0H7', 2 )
else
call SetUnitState(fire, UNIT_STATE_LIFE, GetRandomReal(20., 30.) )
if udg_Rain then
call SetUnitAbilityLevel( fire, 'A0H7', 1 )
else
call SetUnitAbilityLevel( fire, 'A0H7', 3 )
endif
endif
else
call DisplayTimedTextToPlayer( Player(0), 0, 0, 10.00, "pathing is water" )
endif
set fire =null
endfunction
//===========================================================================
function InitTrig_ForestFire_Spread_JASS takes nothing returns nothing
set gg_trg_ForestFire_Spread_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_ForestFire_Spread_JASS, function FireSpread )
endfunction
function Trig_PlayerTimer takes nothing returns nothing
local integer i = 1
// ===== Global Disease Effects =====
call Disease_Infection()
// ===== Global Survival Effects =====
call TriggerExecute( gg_trg_Survival_Effects )
// ===== BioSupport ( 1 to 12 ) =====
loop
exitwhen i > 12
if GetPlayerSlotState(Player(i-1)) == PLAYER_SLOT_STATE_PLAYING and IsUnitType(udg_Hero_Troll[i], UNIT_TYPE_DEAD) == false then
call BioSupport_CheckPlayer(i)
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_PlayerTimer__JASS takes nothing returns nothing
set gg_trg_PlayerTimer__JASS = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_PlayerTimer__JASS, udg_PlayerTimer )
call TriggerAddAction( gg_trg_PlayerTimer__JASS, function Trig_PlayerTimer )
endfunction
function Trig_Global_Timer_10_sec_Func002C takes nothing returns boolean
if ( not ( udg_TimerCheck == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Func003Func002C takes nothing returns boolean
if ( not ( udg_GameTimeMin <= 59 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Func003C takes nothing returns boolean
if ( not ( udg_GameTimeSec <= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Func006001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B01S') == true )
endfunction
function Trig_Global_Timer_10_sec_Func006Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h00J' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h00A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h00B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h00H' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h02Y' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h00I' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h02J' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Func006A takes nothing returns nothing
if ( Trig_Global_Timer_10_sec_Func006Func001C() ) then
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - GetRandomReal(30.00, 40.00) ) )
else
endif
endfunction
function Trig_Global_Timer_10_sec_Func008002002 takes nothing returns boolean
return ( HasUnitAbility(GetFilterUnit(), 'A05G') == true )
endfunction
function Trig_Global_Timer_10_sec_Func009Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) >= GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Func009A takes nothing returns nothing
if ( Trig_Global_Timer_10_sec_Func009Func001C() ) then
call UnitRemoveAbilityBJ( 'A05G', GetEnumUnit() )
call SetUnitAnimation( GetEnumUnit(), "Stand" )
call PauseUnitBJ( false, GetEnumUnit() )
else
endif
endfunction
function Trig_Global_Timer_10_sec_Func012C takes nothing returns boolean
if ( not ( IsTriggerEnabled(gg_trg_Fish_bite) == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Func014C takes nothing returns boolean
if ( not ( IsTriggerEnabled(gg_trg_Update_MultiBoard) == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Timer_10_sec_Actions takes nothing returns nothing
if ( Trig_Global_Timer_10_sec_Func002C() ) then
call TriggerExecute( gg_trg_Totem_Timer_Remover )
else
endif
if ( Trig_Global_Timer_10_sec_Func003C() ) then
set udg_GameTimeSec = ( udg_GameTimeSec + 1 )
else
set udg_GameTimeSec = 0
if ( Trig_Global_Timer_10_sec_Func003Func002C() ) then
set udg_GameTimeMin = ( udg_GameTimeMin + 1 )
else
set udg_GameTimeMin = 0
set udg_GameTimeHours = ( udg_GameTimeHours + 1 )
endif
endif
call TriggerSleepAction( 0.10 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Global_Timer_10_sec_Func006001002)), function Trig_Global_Timer_10_sec_Func006A )
call TriggerSleepAction( 0.10 )
set udg_TempGroup = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Global_Timer_10_sec_Func008002002))
call ForGroupBJ( udg_TempGroup, function Trig_Global_Timer_10_sec_Func009A )
call DestroyGroup(udg_TempGroup)
call ConditionalTriggerExecute( gg_trg_Clothes_Heat_Add )
if ( Trig_Global_Timer_10_sec_Func012C() ) then
call ConditionalTriggerExecute( gg_trg_Fish_bite )
else
endif
call TriggerSleepAction( 0.10 )
if ( Trig_Global_Timer_10_sec_Func014C() ) then
call ConditionalTriggerExecute( gg_trg_Update_MultiBoard )
else
endif
call TriggerSleepAction( 0.10 )
call ConditionalTriggerExecute( gg_trg_Animal_Reproduction_1 )
call TriggerSleepAction( 0.10 )
call ConditionalTriggerExecute( gg_trg_Animal_Reproduction_2 )
call TriggerSleepAction( 0.10 )
call ConditionalTriggerExecute( gg_trg_Animal_Reproduction_3 )
call TriggerSleepAction( 0.10 )
call ConditionalTriggerExecute( gg_trg_Animal_Reproduction_4 )
call TriggerSleepAction( 0.10 )
call ConditionalTriggerExecute( gg_trg_Animal_Color )
endfunction
//===========================================================================
function InitTrig_Global_Timer_10_sec takes nothing returns nothing
set gg_trg_Global_Timer_10_sec = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Global_Timer_10_sec, udg_Timer10sec )
call TriggerAddAction( gg_trg_Global_Timer_10_sec, function Trig_Global_Timer_10_sec_Actions )
endfunction
function pickPlayer takes force team returns integer
local integer j = 0
loop
exitwhen j > 11
if IsPlayerInForce(Player(j), team) then
return j
endif
set j = j + 1
endloop
return 12
endfunction
function Totem_Timer takes nothing returns nothing
local real x
local real y
local integer i = 1
local integer p
set udg_TimerCheck = false
call DestroyTrigger( gg_trg_Totem_Timer_Remover )
call PauseTimer( udg_Totem_timer )
call DestroyTimerDialog( udg_Totem_window )
loop
exitwhen i > 12
if IsUnitType(udg_Hero_Building[i], UNIT_TYPE_DEAD) == false then
call IssueImmediateOrder ( udg_Hero_Building[i], "roar" )
endif
set i = i + 1
endloop
//===========================================================================
if udg_TeamNumber[1] > 0 then
if udg_TotemOwned[1] == false then
if GetWidgetLife(udg_TotemKit[1]) > 0.5 then
call RemoveItem( udg_TotemKit[1] )
set x = GetRectCenterX(udg_TeamStart[1])
set y = GetRectCenterY(udg_TeamStart[1])
set p = pickPlayer(udg_Team[1])
set udg_Totem[1] = CreateUnit( Player(p), 'h004', x, y, bj_UNIT_FACING )
set udg_TotemOwned[1] = true
call CreateUnit( Player(p), 'n01O', x, y, bj_UNIT_FACING )
set udg_Beast_owned[1] = true
endif
endif
else
set x = GetRectCenterX(udg_TeamStart[1])
set y = GetRectCenterY(udg_TeamStart[1])
set udg_Totem[1] = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), 'h004', x, y, bj_UNIT_FACING )
call KillUnit( udg_Totem[1] )
endif
//===========================================================================
if udg_TeamNumber[2] > 0 then
if udg_TotemOwned[2] == false then
if GetWidgetLife(udg_TotemKit[2]) > 0.5 then
call RemoveItem( udg_TotemKit[2] )
set x = GetRectCenterX(udg_TeamStart[2])
set y = GetRectCenterY(udg_TeamStart[2])
set p = pickPlayer(udg_Team[2])
set udg_Totem[2] = CreateUnit( Player(p), 'h004', x, y, bj_UNIT_FACING )
set udg_TotemOwned[2] = true
call CreateUnit( Player(p), 'n01G', x, y, bj_UNIT_FACING )
set udg_Beast_owned[2] = true
endif
endif
else
set x = GetRectCenterX(udg_TeamStart[2])
set y = GetRectCenterY(udg_TeamStart[2])
set udg_Totem[2] = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), 'h004', x, y, bj_UNIT_FACING )
call KillUnit( udg_Totem[2] )
endif
//===========================================================================
if udg_TeamNumber[3] > 0 then
if udg_TotemOwned[3] == false then
if GetWidgetLife(udg_TotemKit[3]) > 0.5 then
call RemoveItem( udg_TotemKit[3] )
set x = GetRectCenterX(udg_TeamStart[3])
set y = GetRectCenterY(udg_TeamStart[3])
set p = pickPlayer(udg_Team[3])
set udg_Totem[3] = CreateUnit( Player(p), 'h004', x, y, bj_UNIT_FACING )
set udg_TotemOwned[3] = true
call CreateUnit( Player(p), 'n027', x, y, bj_UNIT_FACING )
set udg_Beast_owned[3] = true
endif
endif
else
set x = GetRectCenterX(udg_TeamStart[3])
set y = GetRectCenterY(udg_TeamStart[3])
set udg_Totem[3] = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), 'h004', x, y, bj_UNIT_FACING )
call KillUnit( udg_Totem[3] )
endif
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Totem_Timer_JASS takes nothing returns nothing
set gg_trg_Totem_Timer_JASS = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_Totem_Timer_JASS, udg_Totem_timer )
call TriggerAddAction( gg_trg_Totem_Timer_JASS, function Totem_Timer )
endfunction
function Totem_Defeat takes nothing returns nothing
local integer i = 0
local integer team = 0
if GetUnitTypeId(GetTriggerUnit()) == 'h004' then
if GetTriggerUnit() == udg_Totem[1] then
set team = 1
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 10.00, "|c009966ffOld Troll:|r |c00ffff64The Bloodspear Tribe failed to protect their Totem! Troll Godz be angry!|r" )
call DisplayTimedTextToForce( udg_Team[1], 7200, "|cffff0000BLOODSPEAR TRIBE DEFEATED!|r" )
elseif GetTriggerUnit() == udg_Totem[2] then
set team = 2
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 10.00, "|c009966ffOld Troll:|r |c00ffff64The Goldtooth Tribe failed to protect their Totem! Troll Godz be angry!|r" )
call DisplayTimedTextToForce( udg_Team[2], 7200, "|cffff0000GOLDTOOTH TRIBE DEFEATED!|r" )
elseif GetTriggerUnit() == udg_Totem[3] then
set team = 3
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 10.00, "|c009966ffOld Troll:|r |c00ffff64The Stoneskin Tribe failed to protect their Totem! Troll Godz be angry!|r" )
call DisplayTimedTextToForce( udg_Team[3], 7200, "|cffff0000STONESKIN TRIBE DEFEATED!|r" )
endif
if team != 0 then
loop
exitwhen i > 11
if IsPlayerInForce(Player(i), udg_Team[team]) == true then
if IsUnitType(udg_Hero_Building[i+1], UNIT_TYPE_DEAD) == false then
call IssueNeutralImmediateOrderById( Player(i), udg_Hero_Building[i+1], 'H001' )
call TriggerSleepAction( 0.10 )
set udg_PactWithTheDevil[i+1] = true
call KillUnit( udg_Hero_Troll[i+1] )
else
set udg_PactWithTheDevil[i+1] = true
call KillUnit( udg_Hero_Troll[i+1] )
call KillUnit( udg_Troll_Spirit[i+1] )
endif
endif
set i = i + 1
endloop
else
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 10.00, "Bug 001 <totem killed not registered> !" )
endif
endif
endfunction
//===========================================================================
function InitTrig_Totem_Defeat_JASS takes nothing returns nothing
set gg_trg_Totem_Defeat_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Totem_Defeat_JASS, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Totem_Defeat_JASS, function Totem_Defeat )
endfunction
function Trig_Leaver_Event_Func001C takes nothing returns boolean
if ( not ( udg_D_On == true ) ) then
return false
endif
if ( not ( GetTriggerPlayer() == udg_Host ) ) then
return false
endif
return true
endfunction
function Trig_Leaver_Event_Func002Func002C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Hero_Building[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Leaver_Event_Func002C takes nothing returns boolean
if ( not ( udg_Defeat[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
return true
endfunction
function Trig_Leaver_Event_Actions takes nothing returns nothing
if ( Trig_Leaver_Event_Func001C() ) then
call DialogDisplayBJ( false, udg_D_Option, udg_Host )
call TriggerExecute( gg_trg_HostDetect )
call TriggerSleepAction( 0.10 )
call TriggerExecute( gg_trg_Dedit )
else
endif
if ( Trig_Leaver_Event_Func002C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + " haz left the Jungle.|r" ) )
else
if ( Trig_Leaver_Event_Func002Func002C() ) then
call IssueNeutralImmediateOrderById( GetTriggerPlayer(), udg_Hero_Building[GetConvertedPlayerId(GetTriggerPlayer())], 'H001' )
call TriggerSleepAction( 1.00 )
set udg_PactWithTheDevil[GetConvertedPlayerId(GetTriggerPlayer())] = true
call KillUnit( udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())] )
else
set udg_PactWithTheDevil[GetConvertedPlayerId(GetTriggerPlayer())] = true
call KillUnit( udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())] )
call KillUnit( udg_Troll_Spirit[GetConvertedPlayerId(GetTriggerPlayer())] )
endif
endif
endfunction
//===========================================================================
function InitTrig_Leaver_Event takes nothing returns nothing
set gg_trg_Leaver_Event = CreateTrigger( )
call TriggerAddAction( gg_trg_Leaver_Event, function Trig_Leaver_Event_Actions )
endfunction
function Trig_Player_Defeat_Func013001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Player_Defeat_Func013002 takes nothing returns nothing
call CancelAIOrders( 0, ConvertedPlayer(udg_N) )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func005A takes nothing returns nothing
call SetPlayerAllianceStateBJ( udg_Defeated, GetEnumPlayer(), bj_ALLIANCE_UNALLIED_VISION )
call SetPlayerAllianceStateBJ( GetEnumPlayer(), udg_Defeated, bj_ALLIANCE_UNALLIED_VISION )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func010001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n027' )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func010002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func011C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Totem[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func015001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n027' )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func015002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, false )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func017001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func017002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, true )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func018002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001Func019A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
endfunction
function Trig_Player_Defeat_Func014Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_TeamNumber[3] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func001Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(udg_Defeated, udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func005A takes nothing returns nothing
call SetPlayerAllianceStateBJ( udg_Defeated, GetEnumPlayer(), bj_ALLIANCE_UNALLIED_VISION )
call SetPlayerAllianceStateBJ( GetEnumPlayer(), udg_Defeated, bj_ALLIANCE_UNALLIED_VISION )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func010001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n01G' )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func010002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func011C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Totem[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func015001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n01G' )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func015002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, false )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func017001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func017002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, true )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func018002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Player_Defeat_Func014Func001Func002Func019A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
endfunction
function Trig_Player_Defeat_Func014Func001Func002C takes nothing returns boolean
if ( not ( udg_TeamNumber[2] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(udg_Defeated, udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func002Func005A takes nothing returns nothing
call SetPlayerAllianceStateBJ( udg_Defeated, GetEnumPlayer(), bj_ALLIANCE_UNALLIED_VISION )
call SetPlayerAllianceStateBJ( GetEnumPlayer(), udg_Defeated, bj_ALLIANCE_UNALLIED_VISION )
endfunction
function Trig_Player_Defeat_Func014Func002Func009001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n01O' )
endfunction
function Trig_Player_Defeat_Func014Func002Func009002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, false )
endfunction
function Trig_Player_Defeat_Func014Func002Func011001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Player_Defeat_Func014Func002Func011002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, true )
endfunction
function Trig_Player_Defeat_Func014Func002Func016001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n01O' )
endfunction
function Trig_Player_Defeat_Func014Func002Func016002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Player_Defeat_Func014Func002Func017C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Totem[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014Func002Func018002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Player_Defeat_Func014Func002Func019A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
endfunction
function Trig_Player_Defeat_Func014Func002C takes nothing returns boolean
if ( not ( udg_TeamNumber[1] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func014C takes nothing returns boolean
if ( not ( IsPlayerInForce(udg_Defeated, udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func015C takes nothing returns boolean
if ( not ( GetPlayerController(udg_Defeated) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func017001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Player_Defeat_Func017001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'h007' )
endfunction
function Trig_Player_Defeat_Func017001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Player_Defeat_Func017001002001(), Trig_Player_Defeat_Func017001002002() )
endfunction
function Trig_Player_Defeat_Func017A takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A007', GetEnumUnit() )
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(10) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(9) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(8) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(7) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(5) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(4) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(3) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(2) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019Func001C takes nothing returns boolean
if ( not ( udg_Defeated == Player(1) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Func019C takes nothing returns boolean
if ( not ( udg_Defeated == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_Player_Defeat_Actions takes nothing returns nothing
set udg_Defeat[GetConvertedPlayerId(udg_Defeated)] = true
set udg_N = GetConvertedPlayerId(udg_Defeated)
call RemoveUnit( udg_Basic_Crafting[udg_N] )
call RemoveUnit( udg_Hunter_Crafting[udg_N] )
call RemoveUnit( udg_Inventor_Crafting[udg_N] )
call RemoveUnit( udg_Shaman_Crafting[udg_N] )
call RemoveUnit( udg_Warrior_Crafting[udg_N] )
call SetUnitPositionLoc( udg_Score_Memorial[udg_N], udg_Defeat_Loc[udg_N] )
call RemoveLocation(udg_Defeat_Loc[udg_N])
call UnitAddAbilityBJ( 'Aneu', udg_Score_Memorial[udg_N] )
call UnitAddAbilityBJ( 'Aall', udg_Score_Memorial[udg_N] )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(ConvertedPlayer(udg_N), Condition(function Trig_Player_Defeat_Func013001002)), function Trig_Player_Defeat_Func013002 )
if ( Trig_Player_Defeat_Func014C() ) then
if ( Trig_Player_Defeat_Func014Func002C() ) then
call UnitAddAbilityBJ( 'AIsi', udg_Score_Memorial[udg_N] )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2690" )
call ForceRemovePlayerSimple( udg_Defeated, udg_Team[1] )
set udg_TeamNumber[1] = ( udg_TeamNumber[1] - 1 )
set udg_Defeat_Tribe[1] = true
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func002Func016001002)), function Trig_Player_Defeat_Func014Func002Func016002 )
if ( Trig_Player_Defeat_Func014Func002Func017C() ) then
call RemoveUnit( udg_Totem[1] )
else
endif
set udg_TempGroup = GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func002Func018002002))
call ForGroupBJ( udg_TempGroup, function Trig_Player_Defeat_Func014Func002Func019A )
call DestroyGroup(udg_TempGroup)
else
call ForceRemovePlayerSimple( udg_Defeated, udg_Team[1] )
set udg_A = 1
loop
exitwhen udg_A > 12
call SetPlayerAllianceStateBJ( udg_Defeated, ConvertedPlayer(udg_A), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A), udg_Defeated, bj_ALLIANCE_UNALLIED )
set udg_A = udg_A + 1
endloop
call ForForce( udg_Team[1], function Trig_Player_Defeat_Func014Func002Func005A )
set udg_TeamNumber[1] = ( udg_TeamNumber[1] - 1 )
set udg_LocalPlayer = ForcePickRandomPlayer(udg_Team[1])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func002Func009001002)), function Trig_Player_Defeat_Func014Func002Func009002 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func002Func011001002)), function Trig_Player_Defeat_Func014Func002Func011002 )
endif
else
if ( Trig_Player_Defeat_Func014Func001C() ) then
if ( Trig_Player_Defeat_Func014Func001Func002C() ) then
call UnitAddAbilityBJ( 'AIsi', udg_Score_Memorial[udg_N] )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2293" )
call ForceRemovePlayerSimple( udg_Defeated, udg_Team[2] )
set udg_TeamNumber[2] = ( udg_TeamNumber[2] - 1 )
set udg_Defeat_Tribe[2] = true
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func002Func010001002)), function Trig_Player_Defeat_Func014Func001Func002Func010002 )
if ( Trig_Player_Defeat_Func014Func001Func002Func011C() ) then
call RemoveUnit( udg_Totem[2] )
else
endif
set udg_TempGroup = GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func002Func018002002))
call ForGroupBJ( udg_TempGroup, function Trig_Player_Defeat_Func014Func001Func002Func019A )
call DestroyGroup(udg_TempGroup)
else
call ForceRemovePlayerSimple( udg_Defeated, udg_Team[2] )
set udg_A = 1
loop
exitwhen udg_A > 12
call SetPlayerAllianceStateBJ( udg_Defeated, ConvertedPlayer(udg_A), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A), udg_Defeated, bj_ALLIANCE_UNALLIED )
set udg_A = udg_A + 1
endloop
call ForForce( udg_Team[2], function Trig_Player_Defeat_Func014Func001Func002Func005A )
set udg_TeamNumber[2] = ( udg_TeamNumber[2] - 1 )
set udg_LocalPlayer = ForcePickRandomPlayer(udg_Team[2])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func002Func015001002)), function Trig_Player_Defeat_Func014Func001Func002Func015002 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func002Func017001002)), function Trig_Player_Defeat_Func014Func001Func002Func017002 )
endif
else
if ( Trig_Player_Defeat_Func014Func001Func001C() ) then
if ( Trig_Player_Defeat_Func014Func001Func001Func001C() ) then
call UnitAddAbilityBJ( 'AIsi', udg_Score_Memorial[udg_N] )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2543" )
call ForceRemovePlayerSimple( udg_Defeated, udg_Team[3] )
set udg_TeamNumber[3] = ( udg_TeamNumber[3] - 1 )
set udg_Defeat_Tribe[3] = true
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func001Func001Func010001002)), function Trig_Player_Defeat_Func014Func001Func001Func001Func010002 )
if ( Trig_Player_Defeat_Func014Func001Func001Func001Func011C() ) then
call RemoveUnit( udg_Totem[3] )
else
endif
set udg_TempGroup = GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func001Func001Func018002002))
call ForGroupBJ( udg_TempGroup, function Trig_Player_Defeat_Func014Func001Func001Func001Func019A )
call DestroyGroup(udg_TempGroup)
else
call ForceRemovePlayerSimple( udg_Defeated, udg_Team[3] )
set udg_A = 1
loop
exitwhen udg_A > 12
call SetPlayerAllianceStateBJ( udg_Defeated, ConvertedPlayer(udg_A), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A), udg_Defeated, bj_ALLIANCE_UNALLIED )
set udg_A = udg_A + 1
endloop
call ForForce( udg_Team[3], function Trig_Player_Defeat_Func014Func001Func001Func001Func005A )
set udg_TeamNumber[3] = ( udg_TeamNumber[3] - 1 )
set udg_LocalPlayer = ForcePickRandomPlayer(udg_Team[3])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func001Func001Func015001002)), function Trig_Player_Defeat_Func014Func001Func001Func001Func015002 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(udg_Defeated, Condition(function Trig_Player_Defeat_Func014Func001Func001Func001Func017001002)), function Trig_Player_Defeat_Func014Func001Func001Func001Func017002 )
endif
else
endif
endif
endif
if ( Trig_Player_Defeat_Func015C() ) then
call KillUnit( udg_Score_Memorial[udg_N] )
else
endif
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(ConvertedPlayer(udg_N), Condition(function Trig_Player_Defeat_Func017001002)), function Trig_Player_Defeat_Func017A )
// Destroy Trigger
if ( Trig_Player_Defeat_Func019C() ) then
call TriggerClearActions( gg_trg_TextTrigger01 )
call DestroyTrigger( gg_trg_TextTrigger01 )
else
if ( Trig_Player_Defeat_Func019Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger02 )
call DestroyTrigger( gg_trg_TextTrigger02 )
else
if ( Trig_Player_Defeat_Func019Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger03 )
call DestroyTrigger( gg_trg_TextTrigger03 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger04 )
call DestroyTrigger( gg_trg_TextTrigger04 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger05 )
call DestroyTrigger( gg_trg_TextTrigger05 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger06 )
call DestroyTrigger( gg_trg_TextTrigger06 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger07 )
call DestroyTrigger( gg_trg_TextTrigger07 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger08 )
call DestroyTrigger( gg_trg_TextTrigger08 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger09 )
call DestroyTrigger( gg_trg_TextTrigger09 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger10 )
call DestroyTrigger( gg_trg_TextTrigger10 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger11 )
call DestroyTrigger( gg_trg_TextTrigger11 )
else
if ( Trig_Player_Defeat_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call TriggerClearActions( gg_trg_TextTrigger12 )
call DestroyTrigger( gg_trg_TextTrigger12 )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Player_Defeat takes nothing returns nothing
set gg_trg_Player_Defeat = CreateTrigger( )
call TriggerAddAction( gg_trg_Player_Defeat, function Trig_Player_Defeat_Actions )
endfunction
//TESH.scrollpos=22
//TESH.alwaysfold=0
function RottenMeat takes nothing returns nothing
local real x
local real y
local real life
local integer i = GetItemTypeId(GetEnumItem())
local integer ic
local item it
if i == 'I003' or i == 'I069' or i == 'I0AV' then
set it = GetEnumItem()
set life = GetWidgetLife(it)
set ic = GetItemCharges(it)
endif
if i == 'I003' or i == 'I069' then
if life <= 8.00 then
set x = GetItemX(it)
set y = GetItemY(it)
call RemoveItem(it)
call SetItemCharges( CreateItem( 'I0AV', x, y ), ic )
else
call SetWidgetLife( it, ( life - 1 ) )
endif
elseif i == 'I0AV' then
if life <= 6.00 then
call RemoveItem(it)
else
call SetWidgetLife( it, ( life - 1 ) )
endif
endif
set it = null
endfunction
function Days_Dropstart takes nothing returns nothing
local real x
local real y
local rect area
local integer i
local integer j
local integer k
if udg_MB_ModePlenty == "Yes" then
call SetUnitState( gg_unit_h02E_0653, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h02E_0653, UNIT_STATE_MANA ) + GetRandomReal(0, 2.00) ))
call SetUnitState( gg_unit_h02E_0092, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h02E_0092, UNIT_STATE_MANA ) + GetRandomReal(0, 2.00) ))
call SetUnitState( gg_unit_h02E_0655, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h02E_0655, UNIT_STATE_MANA ) + GetRandomReal(0, 2.00) ))
else
call SetUnitState( gg_unit_h02E_0653, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h02E_0653, UNIT_STATE_MANA ) + GetRandomReal(0, 1.00) ))
call SetUnitState( gg_unit_h02E_0092, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h02E_0092, UNIT_STATE_MANA ) + GetRandomReal(0, 1.00) ))
call SetUnitState( gg_unit_h02E_0655, UNIT_STATE_MANA, ( GetUnitState( gg_unit_h02E_0655, UNIT_STATE_MANA ) + GetRandomReal(0, 1.00) ))
endif
call EnumItemsInRect( bj_mapInitialPlayableArea, null, function RottenMeat ) // group item conditional call "RottenMeat"
call TriggerSleepAction( 0.10 )
call Daily_Mana() // function call
set udg_Day = udg_Day + 1
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 10.00, ( "|c009966ffOld Troll:|r |c00ffff64Good morning, me li'l trollz! Today be day " + ( I2S(udg_Day) + ".|r" ) ) )
call TriggerSleepAction( 0.10 )
if udg_Day != 1 then
call TriggerExecute( gg_trg_New_quest ) // function call
else
call DisplayTimedTextToForce( bj_FORCE_ALL_PLAYERS, 20.00, "|c009966ffOld Troll:|r |c00ffff64Me dear trollz, ya have one day to build ye |c00ff9b37Totem|r |c00ffff64somewhere in the Jungle.|r" )
endif
set area = udg_Area[GetRandomInt(1, 9)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
call CreateItem( 'I036', x, y )
set area = gg_rct_Ruin_2
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
call CreateItem( 'I054', x, y )
set area = udg_Cave[GetRandomInt(1, 6)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
call SetItemCharges( CreateItem( 'I03B', x, y ), GetRandomInt(1, 3) )
set area = udg_Cave[GetRandomInt(1, 6)]
set x = GetRandomReal(GetRectMinX(area), GetRectMaxX(area))
set y = GetRandomReal(GetRectMinY(area), GetRectMaxY(area))
call SetItemCharges( CreateItem( 'I03B', x, y ), GetRandomInt(1, 3) )
call TriggerSleepAction( 0.10 )
set k = 1
loop
exitwhen k > 4
if k == 1 then
set x = GetRandomReal(GetRectMinX(gg_rct_Pirahnas_1), GetRectMaxX(gg_rct_Pirahnas_1))
set y = GetRandomReal(GetRectMinY(gg_rct_Pirahnas_1), GetRectMaxY(gg_rct_Pirahnas_1))
elseif ( k == 2 ) then
set x = GetRandomReal(GetRectMinX(gg_rct_Pirahnas_2), GetRectMaxX(gg_rct_Pirahnas_2))
set y = GetRandomReal(GetRectMinY(gg_rct_Pirahnas_2), GetRectMaxY(gg_rct_Pirahnas_2))
elseif ( k == 3 ) then
set x = GetRandomReal(GetRectMinX(gg_rct_Pirahnas_3), GetRectMaxX(gg_rct_Pirahnas_3))
set y = GetRandomReal(GetRectMinY(gg_rct_Pirahnas_3), GetRectMaxY(gg_rct_Pirahnas_3))
elseif ( k == 4 ) then
set x = GetRandomReal(GetRectMinX(gg_rct_Pirahnas_4), GetRectMaxX(gg_rct_Pirahnas_4))
set y = GetRandomReal(GetRectMinY(gg_rct_Pirahnas_4), GetRectMaxY(gg_rct_Pirahnas_4))
endif
set i = 1
set j = GetRandomInt(1, 3)
loop
exitwhen i > j
call CreateUnit( Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n018', x, y, bj_UNIT_FACING )
set i = i + 1
endloop
set k = k + 1
endloop
call TriggerSleepAction( 0.10 )
if udg_Stop_ItemsDrop == false then
call TriggerExecute( gg_trg_DropAll_JASS ) //function call
endif
endfunction
//===========================================================================
function InitTrig_Days_ManaGold_JASS takes nothing returns nothing
set gg_trg_Days_ManaGold_JASS = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_Days_ManaGold_JASS, udg_DayTimer )
call TriggerAddAction( gg_trg_Days_ManaGold_JASS, function Days_Dropstart )
endfunction
//TESH.scrollpos=60
//TESH.alwaysfold=0
function Drop takes nothing returns nothing
local integer i
local integer j = 1
local real x
local real y
loop
exitwhen j > 3
set i = 1
loop
exitwhen i > 9
if ( udg_count_Wood[i] <= udg_RessourceLimit ) then
set x = GetRandomReal(GetRectMinX(udg_Area[i]), GetRectMaxX(udg_Area[i]))
set y = GetRandomReal(GetRectMinY(udg_Area[i]), GetRectMaxY(udg_Area[i]))
if ( udg_MB_ModePlenty == "Yes" ) then
call SetItemCharges( CreateItem( 'I011', x, y ), 2 )
else
call CreateItem( 'I011', x, y )
endif
set udg_count_Wood[i] = ( udg_count_Wood[i] + 1 )
endif
set i = i + 1
endloop
set j = j + 1
endloop
call TriggerSleepAction( 0.25 )
set j = 1
loop
exitwhen j > 3
set i = 1
loop
exitwhen i > 9
if ( udg_count_Tinder[i] <= udg_RessourceLimit ) then
set x = GetRandomReal(GetRectMinX(udg_Area[i]), GetRectMaxX(udg_Area[i]))
set y = GetRandomReal(GetRectMinY(udg_Area[i]), GetRectMaxY(udg_Area[i]))
if ( udg_MB_ModePlenty == "Yes" ) then
call SetItemCharges( CreateItem( 'I012', x, y ), 2 )
else
call CreateItem( 'I012', x, y )
endif
set udg_count_Tinder[i] = ( udg_count_Tinder[i] + 1 )
endif
set i = i + 1
endloop
set j = j + 1
endloop
call TriggerSleepAction( 0.25 )
set j = 1
loop
exitwhen j > 3
set i = 1
loop
exitwhen i > 9
if ( udg_count_Stone[i] <= udg_RessourceLimit ) then
set x = GetRandomReal(GetRectMinX(udg_Area[i]), GetRectMaxX(udg_Area[i]))
set y = GetRandomReal(GetRectMinY(udg_Area[i]), GetRectMaxY(udg_Area[i]))
if ( udg_MB_ModePlenty == "Yes" ) then
call SetItemCharges( CreateItem( 'I014', x, y ), 2 )
else
call CreateItem( 'I014', x, y )
endif
set udg_count_Stone[i] = ( udg_count_Stone[i] + 1 )
endif
set i = i + 1
endloop
set j = j + 1
endloop
call TriggerSleepAction( 0.25 )
set j = 1
loop
exitwhen j > 3
set i = 1
loop
exitwhen i > 9
if ( udg_count_Flint[i] <= udg_RessourceLimit ) then
set x = GetRandomReal(GetRectMinX(udg_Area[i]), GetRectMaxX(udg_Area[i]))
set y = GetRandomReal(GetRectMinY(udg_Area[i]), GetRectMaxY(udg_Area[i]))
if ( udg_MB_ModePlenty == "Yes" ) then
call SetItemCharges( CreateItem( 'I013', x, y ), 2 )
else
call CreateItem( 'I013', x, y )
endif
set udg_count_Flint[i] = ( udg_count_Flint[i] + 1 )
endif
set i = i + 1
endloop
set j = j + 1
endloop
endfunction
//===========================================================================
function InitTrig_DropAll_JASS takes nothing returns nothing
set gg_trg_DropAll_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_DropAll_JASS, function Drop )
endfunction
library Daily
globals
private group g=CreateGroup()
endglobals
public function Mana takes nothing returns nothing
local unit u=null
local integer i
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
loop
set u = FirstOfGroup(g)
set i = GetUnitTypeId(u)
exitwhen u == null
if i == BEEHIVE_ID or i == PIGLET_ID or i == BOAR_ID or i == FATHOG_ID or i == ANTELOPEFAWN_ID or i == ANTELOPE_ID or i == ANTELOPESTAG_ID or i == BEARCUB_ID or i == BEAR_ID or i == OLDBEAR_ID or i == SABERKITTEN_ID or i == SABERCAT_ID or i == OLDSABERCAT_ID or i == RACOONCUB_ID or i == RACOON_ID or i == FATRACOON_ID or i == BUNNY_ID or i == RABBIT_ID or i == FATRABBIT_ID or i == HERMITCRAB_ID or i == RIVERCRAB_ID or i == IMPERCRAB_ID or i == ALLIGATOR_EGG_ID or i == ALLIGATORHATCHLING_ID or i == ALLIGATOR_ID or i == GIANTALLIGATOR_ID or i == FROG_ID or i == BULLFROG_ID or i == TORTOISE_EGG_ID or i == TORTOISE_ID or i == GIANTTORTOISE_ID or i == ANCIENTTORTOISE_ID or i == BIRDNEST_G_ID or i == BIRDNEST_A_ID or i == JUNGLEBIRD_ID or i == BIGJUNGLEBIRD_ID or i == VULTURENEST_G_ID or i == VULTURENEST_A_ID or i == VULTURE_ID or i == GRIFFONVULTURE_ID or i == RAT_ID or i == MANGYRAT_ID or i == SNAKE_EGG_ID or i == JUNGLEASPIC_ID or i == JUNGLEVIPER_ID or i == SPIDER_EGGBAG_ID or i == BLACKWIDOW_ID or i == TARENTULA_ID or i == TARENTULAQUEEN_ID then
call SetUnitState(u, UNIT_STATE_MANA, (GetUnitState(u, UNIT_STATE_MANA) + GetRandomReal(-25., 25.) ))
endif
call GroupRemoveUnit(g, u)
endloop
endfunction
endlibrary
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02N' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func009C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func014C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n016' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func004Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n001' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02M' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func003C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func005Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func005C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func005Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func010C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func005C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n014' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func003Func008C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00C' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func002Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02I' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02P' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func013C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01A' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func002Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n004' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func002Func006C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h01C' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02R' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func008C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func011C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n002' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func002Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02A' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00X' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002Func022C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00U' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02O' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) >= GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_1_Func002A takes nothing returns nothing
// -------------------- Carnivorous Bush --------------------
if ( Trig_Animal_Reproduction_1_Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call RemoveUnit( GetEnumUnit() )
set udg_Eat_count = ( udg_Eat_count + 1 )
call CreateDestructableLoc( 'B003', udg_Loc, GetRandomDirectionDeg(), 1, 0 )
call UnitRemoveAbilityBJ( 'Afir', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afio', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afih', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afin', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastCreatedUnit() )
set udg_Bush[udg_Eat_count] = GetLastCreatedDestructable()
set udg_MonsterBush[udg_Eat_count] = true
call TriggerRegisterDeathEvent( gg_trg_DropItemDestructible__JASS, GetLastCreatedDestructable() )
call CreateNUnitsAtLoc( 1, 'hMEP', Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_Eat_count )
set udg_Eat_Current = ( udg_Eat_Current + 1 )
set udg_Eat_DataStore[udg_Eat_Current] = udg_Eat_count
call RemoveLocation(udg_Loc)
else
// -------------------- Voodoo Monster --------------------
if ( Trig_Animal_Reproduction_1_Func002Func002Func022C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func004C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n00X', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_AQUA )
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n015', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_AQUA )
else
endif
else
// -------------------- Pigs --------------------
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n002', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func002Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 5) - 2 ), 'n02A', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func008C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02R', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func011C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02R', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func002Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func003C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func003Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'nwen', bj_UNIT_STATE_METHOD_RELATIVE )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
endif
else
endif
else
// -------------------- Spiders --------------------
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func002C() ) then
call RemoveUnit( GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( GetRandomInt(1, 2), 'n004', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), ConvertPlayerColor(12) )
call RemoveLocation(udg_Loc)
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func002Func006C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01A', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), ConvertPlayerColor(12) )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func002Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'h018', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h01C', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02P', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), ConvertPlayerColor(12) )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func013C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02P', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), ConvertPlayerColor(12) )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func002Func001Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Tortoises --------------------
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( GetRandomInt(1, 2), 'n00C', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_BROWN )
call RemoveLocation(udg_Loc)
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func002Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveUnit( GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 4), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n014', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func003Func008C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 4), GetEnumUnit() )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'h02I', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02M', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func010C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call ReplaceUnitBJ( GetEnumUnit(), 'n02M', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func003Func005Func003C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func004C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 4), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Crabs --------------------
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func004C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n016', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func004Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 5) - 2 ), 'n001', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func009C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02N', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_ORANGE )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func014C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02N', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_ORANGE )
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func004Func001Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func001C() ) then
if ( Trig_Animal_Reproduction_1_Func002Func002Func022Func001Func002Func001Func001Func002Func001Func001Func001Func002Func001Func002Func002Func003Func001Func001Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function Trig_Animal_Reproduction_1_Actions takes nothing returns nothing
set udg_TempGroup = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( udg_TempGroup, function Trig_Animal_Reproduction_1_Func002A )
call DestroyGroup(udg_TempGroup)
endfunction
//===========================================================================
function InitTrig_Animal_Reproduction_1 takes nothing returns nothing
set gg_trg_Animal_Reproduction_1 = CreateTrigger( )
call TriggerAddAction( gg_trg_Animal_Reproduction_1, function Trig_Animal_Reproduction_1_Actions )
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func003Func003C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n02S' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'nwwg' ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00F' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func010C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00D' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func002Func003C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h019' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func005Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02Q' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func009C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func013C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n003' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func005Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02F' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02O' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func008C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func011C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n006' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func002Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02E' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func004Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02K' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h01Q' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func007C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) >= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func010C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) >= 4 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func013C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func016C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n009' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func003Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02C' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02J' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func008C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func011C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n005' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02D' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_2_Func002A takes nothing returns nothing
// -------------------- Bunnies --------------------
if ( Trig_Animal_Reproduction_2_Func002Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n005', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func002Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(0, 3) - 0 ), 'n02D', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func008C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02J', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func011C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02J', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func002Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func005C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Alligators --------------------
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n009', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func003Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func002C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func007C() ) then
call CreateNUnitsAtLoc( 1, 'h01Q', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
else
endif
call RemoveLocation(udg_Loc)
set udg_Loc = RandomPointInRange(GetUnitLoc(GetEnumUnit()), 200.00)
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func010C() ) then
call CreateNUnitsAtLoc( 1, 'h01Q', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
else
endif
call RemoveLocation(udg_Loc)
set udg_Loc = RandomPointInRange(GetUnitLoc(GetEnumUnit()), 200.00)
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func013C() ) then
call CreateNUnitsAtLoc( 1, 'h01Q', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
else
endif
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02K', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func016C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02K', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func003Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func003C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n02C', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func003Func003C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func004C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func004Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'ntrg', bj_UNIT_STATE_METHOD_RELATIVE )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
endif
else
endif
else
// -------------------- Racoons --------------------
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n006', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func002Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(0, 6) - 2 ), 'n02E', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func008C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02O', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func011C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02O', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func002Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func005C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Sabretooth Cats --------------------
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func001C() ) then
call UnitAddAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitAddAbilityBJ( 'S00W', GetEnumUnit() )
else
call UnitRemoveAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'S00W', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func005C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n003', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), ConvertPlayerColor(12) )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func005Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func001C() ) then
call UnitAddAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitAddAbilityBJ( 'S00W', GetEnumUnit() )
else
call UnitRemoveAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'S00W', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 5) - 2 ), 'n02F', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), ConvertPlayerColor(12) )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func009C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02Q', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), ConvertPlayerColor(12) )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func013C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02Q', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func003Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func002C() ) then
call UnitAddAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitAddAbilityBJ( 'S00W', GetEnumUnit() )
else
call UnitRemoveAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'S00W', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func005C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func005Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'nwwg', bj_UNIT_STATE_METHOD_RELATIVE )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func002C() ) then
call UnitAddAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitAddAbilityBJ( 'S00W', GetEnumUnit() )
else
call UnitRemoveAbilityBJ( 'A0DY', GetEnumUnit() )
call UnitRemoveAbilityBJ( 'S00W', GetEnumUnit() )
endif
else
// -------------------- Snakes --------------------
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func002C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 4) - GetRandomInt(1, 2) ), 'n00D', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func002Func003C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call RemoveUnit( GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'h019', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n00F', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func010C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n00F', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func005Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func002C() ) then
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_2_Func002Func002Func001Func001Func002Func002Func001Func004Func003Func001Func001Func002Func002Func002Func001Func004Func001Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function Trig_Animal_Reproduction_2_Actions takes nothing returns nothing
set udg_TempGroup = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( udg_TempGroup, function Trig_Animal_Reproduction_2_Func002A )
call DestroyGroup(udg_TempGroup)
endfunction
//===========================================================================
function InitTrig_Animal_Reproduction_2 takes nothing returns nothing
set gg_trg_Animal_Reproduction_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Animal_Reproduction_2, function Trig_Animal_Reproduction_2_Actions )
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01M' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func005Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func005Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func005Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func005C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func005Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func007C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01J' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func002Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01K' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00O' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) > 4 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001Func002Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001Func002C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001Func002Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02G' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02U' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02X' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01D' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n017' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'nskg' ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func004C() ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func008C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n007' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01S' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01P' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01Q' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01R' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00Y' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
if ( not ( udg_Hawk[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
if ( not ( udg_Swoop[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01T' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
if ( not ( udg_Hawk[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
if ( not ( udg_Swoop[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01U' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
if ( not ( udg_Hawk[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
if ( not ( udg_Swoop[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01H' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_3_Func002A takes nothing returns nothing
// -------------------- Hawks --------------------
if ( Trig_Animal_Reproduction_3_Func002Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01U', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01T', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01I', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
// -------------------- Dogs --------------------
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01R', bj_UNIT_STATE_METHOD_RELATIVE )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01Q', bj_UNIT_STATE_METHOD_RELATIVE )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01P', bj_UNIT_STATE_METHOD_RELATIVE )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01S', bj_UNIT_STATE_METHOD_RELATIVE )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n00V', bj_UNIT_STATE_METHOD_RELATIVE )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] = GetLastReplacedUnitBJ()
else
endif
else
// -------------------- Frogs --------------------
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 4) - GetRandomInt(1, 2) ), 'n007', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func008C() ) then
call ReplaceUnitBJ( GetEnumUnit(), 'nskg', bj_UNIT_STATE_METHOD_RELATIVE )
else
call ReplaceUnitBJ( GetEnumUnit(), 'n017', bj_UNIT_STATE_METHOD_RELATIVE )
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func003Func001Func003C() ) then
call ReplaceUnitBJ( GetEnumUnit(), 'nskg', bj_UNIT_STATE_METHOD_RELATIVE )
else
call ReplaceUnitBJ( GetEnumUnit(), 'n017', bj_UNIT_STATE_METHOD_RELATIVE )
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func005C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func005C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'u001', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
call CreateNUnitsAtLoc( 1, 'u001', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
call CreateNUnitsAtLoc( 1, 'u001', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Birds --------------------
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func004C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( GetRandomInt(1, 2), 'n02G', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
call RemoveUnit( GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func004Func001Func001C() ) then
set udg_NestNumber = ( udg_NestNumber + 1 )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
set udg_NestTree[udg_NestNumber] = FindNextDoodad(udg_Loc)
call RemoveLocation(udg_Loc)
set udg_Loc = GetDestructableLoc(udg_NestTree[udg_NestNumber])
call CreateNUnitsAtLoc( 1, 'h02U', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
set udg_BirdNest[udg_NestNumber] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call TriggerRegisterDeathEvent( gg_trg_NestingBirds, udg_NestTree[udg_NestNumber] )
call ReplaceUnitBJ( GetEnumUnit(), 'n00O', bj_UNIT_STATE_METHOD_RELATIVE )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n00O', bj_UNIT_STATE_METHOD_RELATIVE )
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n00O', bj_UNIT_STATE_METHOD_RELATIVE )
endif
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func003C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Antelopes --------------------
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n01J', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func002Func005C() ) then
call UnitAddAbilityBJ( 'A007', GetLastReplacedUnitBJ() )
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 4), GetEnumUnit() )
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func005C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 5) - 2 ), 'n01K', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
else
endif
call ReplaceUnitBJ( GetEnumUnit(), 'n01M', bj_UNIT_STATE_METHOD_RELATIVE )
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002Func007C() ) then
call UnitAddAbilityBJ( 'A007', GetLastReplacedUnitBJ() )
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001C() ) then
if ( Trig_Animal_Reproduction_3_Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 4), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 5), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 6), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'njg1', bj_UNIT_STATE_METHOD_RELATIVE )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 2), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 3), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 4), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 5), GetEnumUnit() )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 6), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
endif
else
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function Trig_Animal_Reproduction_3_Actions takes nothing returns nothing
set udg_TempGroup = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( udg_TempGroup, function Trig_Animal_Reproduction_3_Func002A )
call DestroyGroup(udg_TempGroup)
endfunction
//===========================================================================
function InitTrig_Animal_Reproduction_3 takes nothing returns nothing
set gg_trg_Animal_Reproduction_3 = CreateTrigger( )
call TriggerAddAction( gg_trg_Animal_Reproduction_3, function Trig_Animal_Reproduction_3_Actions )
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func001Func003002003 takes nothing returns boolean
return ( HasUnitAbility(GetFilterUnit(), 'A0JX') == true )
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func001Func003002003 takes nothing returns boolean
return ( HasUnitAbility(GetFilterUnit(), 'A0JX') == true )
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func002Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) == 100 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func002Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) == 100 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func002Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) == 100 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func002Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) == 100 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n027' ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetEnumUnit(), 'BUav') == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01G' ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetEnumUnit(), 'BUav') == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01O' ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetEnumUnit(), 'BUav') == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetEnumUnit(), 'I0AG') == true ) ) then
return false
endif
if ( not ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I0AG')) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetEnumUnit(), 'I0AG') == false ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'u001' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n010' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n00J' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n020' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n026' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01Z' ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func003C() ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h036' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h00U' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h00T' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h00S' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h00E' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func004Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) == 100 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h00M' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02S' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n018' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h01O' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002Func002Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002Func002Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002Func002Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002Func002C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02H' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func006C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00H' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) > 4 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001Func002Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001Func002C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001Func002Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n00E' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h02V' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func005Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func005C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02L' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func001Func002001003001001 takes nothing returns boolean
return ( udg_Defeat[GetConvertedPlayerId(GetFilterPlayer())] == false )
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( ( GetOwningPlayer(GetEnumUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( ( GetRandomInt(1, 12) + CountPlayersInForceBJ(GetPlayersMatching(Condition(function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func001Func002001003001001))) ) >= ( 12 - udg_Day ) ) ) then
return true
endif
return false
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func010C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastCreatedUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func014C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n008' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func002Func005C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLastReplacedUnitBJ()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n02B' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Animal_Reproduction_4_Func002A takes nothing returns nothing
// -------------------- Bears --------------------
if ( Trig_Animal_Reproduction_4_Func002Func002C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'n008', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_4_Func002Func002Func002Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func002C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 5) - 2 ), 'n02B', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func010C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastCreatedUnit() )
else
endif
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'n02L', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func014C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n02L', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_BROWN )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func002Func001Func005C() ) then
call UnitRemoveAbilityBJ( 'Awan', GetLastReplacedUnitBJ() )
else
endif
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func005Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'nwlg', bj_UNIT_STATE_METHOD_RELATIVE )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
endif
else
endif
else
// -------------------- Vultures --------------------
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func004C() ) then
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( GetRandomInt(1, 2), 'n00E', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call SetUnitColor( GetLastCreatedUnit(), PLAYER_COLOR_LIGHT_GRAY )
call RemoveLocation(udg_Loc)
call RemoveUnit( GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func001C() ) then
call UnitRemoveAbilityBJ( 'A0JT', GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
set udg_TempGroup2 = GetUnitsInRangeOfLocMatching(1000.00, udg_Loc, Condition(function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func001Func003002003))
call IssueTargetOrderById( GetEnumUnit(), String2OrderIdBJ("attack"), FirstOfGroup(udg_TempGroup2) )
call RemoveLocation(udg_Loc)
call DestroyGroup(udg_TempGroup2)
else
endif
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func005Func001Func001C() ) then
set udg_NestNumber = ( udg_NestNumber + 1 )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
set udg_NestTree[udg_NestNumber] = FindNextDoodad(udg_Loc)
call RemoveLocation(udg_Loc)
set udg_Loc = GetDestructableLoc(udg_NestTree[udg_NestNumber])
call CreateNUnitsAtLoc( 1, 'h02V', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
set udg_BirdNest[udg_NestNumber] = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
call TriggerRegisterDeathEvent( gg_trg_NestingBirds, udg_NestTree[udg_NestNumber] )
call ReplaceUnitBJ( GetEnumUnit(), 'n00H', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_LIGHT_GRAY )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n00H', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_LIGHT_GRAY )
endif
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'n00H', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitColor( GetLastReplacedUnitBJ(), PLAYER_COLOR_LIGHT_GRAY )
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'A0JT', GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
set udg_TempGroup2 = GetUnitsInRangeOfLocMatching(1000.00, udg_Loc, Condition(function Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func001Func003002003))
call IssueTargetOrderById( GetEnumUnit(), String2OrderIdBJ("attack"), FirstOfGroup(udg_TempGroup2) )
call RemoveLocation(udg_Loc)
call DestroyGroup(udg_TempGroup2)
else
endif
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func006C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Rats --------------------
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func002Func002C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
set udg_Loc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( ( GetRandomInt(1, 5) - 2 ), 'h02H', GetOwningPlayer(GetEnumUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
call ReplaceUnitBJ( GetEnumUnit(), 'h01O', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitAbilityLevelSwapped( 'A0E0', GetLastReplacedUnitBJ(), 2 )
else
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call ReplaceUnitBJ( GetEnumUnit(), 'h01O', bj_UNIT_STATE_METHOD_RELATIVE )
call SetUnitAbilityLevelSwapped( 'A0E0', GetLastReplacedUnitBJ(), 2 )
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetEnumUnit(), 1), GetEnumUnit() )
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Piranhas --------------------
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func003C() ) then
call RemoveUnit( GetEnumUnit() )
else
endif
else
// -------------------- Berries Bushes and Bee Hives --------------------
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func004C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call ReplaceUnitBJ( GetEnumUnit(), 'h00M', bj_UNIT_STATE_METHOD_RELATIVE )
call UnitRemoveAbilityBJ( 'Afir', GetLastReplacedUnitBJ() )
call UnitRemoveAbilityBJ( 'Afio', GetLastReplacedUnitBJ() )
call UnitRemoveAbilityBJ( 'Afih', GetLastReplacedUnitBJ() )
call UnitRemoveAbilityBJ( 'Afin', GetLastReplacedUnitBJ() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastReplacedUnitBJ() )
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func004C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call UnitAddItemByIdSwapped( 'I002', GetEnumUnit() )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func004Func003C() ) then
set udg_Loc = GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00))
call CreateNUnitsAtLoc( 1, 'h02S', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Afir', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afio', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afih', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afin', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func001C() ) then
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
else
endif
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func002C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call UnitAddItemByIdSwapped( 'I01A', GetEnumUnit() )
call SetItemCharges( GetLastCreatedItem(), GetRandomInt(1, 3) )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func002Func004C() ) then
set udg_Loc = GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00))
call CreateNUnitsAtLoc( 1, 'h00E', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Afir', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afio', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afih', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afin', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func001C() ) then
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
else
endif
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func002C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call UnitAddItemByIdSwapped( 'I01B', GetEnumUnit() )
call SetItemCharges( GetLastCreatedItem(), GetRandomInt(1, 3) )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func002Func004C() ) then
set udg_Loc = GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00))
call CreateNUnitsAtLoc( 1, 'h00S', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Afir', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afio', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afih', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afin', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func001C() ) then
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
else
endif
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func002C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call UnitAddItemByIdSwapped( 'I01C', GetEnumUnit() )
call SetItemCharges( GetLastCreatedItem(), GetRandomInt(1, 3) )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func002Func004C() ) then
set udg_Loc = GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00))
call CreateNUnitsAtLoc( 1, 'h00T', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Afir', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afio', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afih', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afin', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func001C() ) then
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), true )
else
endif
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func002C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call UnitAddItemByIdSwapped( 'I01D', GetEnumUnit() )
call SetItemCharges( GetLastCreatedItem(), GetRandomInt(1, 3) )
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func002Func004C() ) then
set udg_Loc = GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 500.00, 500.00))
call CreateNUnitsAtLoc( 1, 'h00U', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'Afir', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afio', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afih', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afin', GetLastCreatedUnit() )
call UnitRemoveAbilityBJ( 'Afiu', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func004C() ) then
call SetUnitManaBJ( GetEnumUnit(), 0 )
call UnitAddItemByIdSwapped( 'I09A', GetEnumUnit() )
else
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func002C() ) then
call UnitRemoveAbilityBJ( 'SCae', GetEnumUnit() )
else
call UnitAddAbilityBJ( 'SCae', GetEnumUnit() )
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001C() ) then
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func002C() ) then
call UnitAddItemByIdSwapped( 'I0AG', GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) - 11.00 ) )
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func002Func001C() ) then
call UnitAddItemByIdSwapped( 'I0AG', GetEnumUnit() )
call SetUnitManaBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) - 11.00 ) )
else
endif
endif
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[1])
call SetUnitPositionLoc( GetEnumUnit(), udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetEnumUnit()), 0, 0, 6.00, "TRIGSTR_210" )
call RemoveLocation(udg_Loc)
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[2])
call SetUnitPositionLoc( GetEnumUnit(), udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetEnumUnit()), 0, 0, 6.00, "TRIGSTR_210" )
call RemoveLocation(udg_Loc)
else
if ( Trig_Animal_Reproduction_4_Func002Func002Func001Func001Func002Func001Func002Func003Func001Func005Func002Func001Func001Func005Func005Func005Func005Func001Func001Func001Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[3])
call SetUnitPositionLoc( GetEnumUnit(), udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetEnumUnit()), 0, 0, 6.00, "TRIGSTR_210" )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
function Trig_Animal_Reproduction_4_Actions takes nothing returns nothing
set udg_TempGroup = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( udg_TempGroup, function Trig_Animal_Reproduction_4_Func002A )
call DestroyGroup(udg_TempGroup)
endfunction
//===========================================================================
function InitTrig_Animal_Reproduction_4 takes nothing returns nothing
set gg_trg_Animal_Reproduction_4 = CreateTrigger( )
call TriggerAddAction( gg_trg_Animal_Reproduction_4, function Trig_Animal_Reproduction_4_Actions )
endfunction
function Trig_Tactics_casted_Func003C takes nothing returns boolean
if ( not ( GetTriggerUnit() != GetSpellTargetUnit() ) ) then
return false
endif
if ( not ( HasUnitAbility(GetTriggerUnit(), 'Aloc') == false ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0GG' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0IL' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0B7' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A064' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0DD' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0CB' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0EH' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A065' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0DL' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A03C' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0E3' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0M2' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0M3' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0KV' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A083' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0B9' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06Q' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08W' ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Conditions takes nothing returns boolean
if ( not Trig_Tactics_casted_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func001Func003C takes nothing returns boolean
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A083') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0B9') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A06Q') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A08W') == true ) ) then
return true
endif
return false
endfunction
function Trig_Tactics_casted_Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == GetOwningPlayer(GetSpellTargetUnit()) ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetSpellTargetUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not Trig_Tactics_casted_Func001Func003C() ) then
return false
endif
if ( not ( GetRandomInt(1, 12) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func002Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A08W') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func002C takes nothing returns boolean
if ( not Trig_Tactics_casted_Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func004Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A06Q') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func004C takes nothing returns boolean
if ( not Trig_Tactics_casted_Func004Func002C() ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func005Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A0B9') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 4 ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func005C takes nothing returns boolean
if ( not Trig_Tactics_casted_Func005Func002C() ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func006Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A083') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 6 ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func006C takes nothing returns boolean
if ( not Trig_Tactics_casted_Func006Func002C() ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Func007Func003001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'u001' )
endfunction
function Trig_Tactics_casted_Func007Func003002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GetSpellAbilityUnit() )
endfunction
function Trig_Tactics_casted_Func007C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'u001' ) ) then
return false
endif
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Tactics_casted_Actions takes nothing returns nothing
if ( Trig_Tactics_casted_Func001C() ) then
call UnitRemoveAbilityBJ( 'A007', GetSpellTargetUnit() )
call SetUnitOwner( GetSpellTargetUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_167" )
else
endif
if ( Trig_Tactics_casted_Func002C() ) then
call IssueTargetOrderBJ( GetSpellTargetUnit(), "attack", GetSpellAbilityUnit() )
else
endif
if ( Trig_Tactics_casted_Func004C() ) then
call IssueTargetOrderBJ( GetSpellTargetUnit(), "attack", GetSpellAbilityUnit() )
else
endif
if ( Trig_Tactics_casted_Func005C() ) then
call IssueTargetOrderBJ( GetSpellTargetUnit(), "attack", GetSpellAbilityUnit() )
else
endif
if ( Trig_Tactics_casted_Func006C() ) then
call IssueTargetOrderBJ( GetSpellTargetUnit(), "attack", GetSpellAbilityUnit() )
else
endif
if ( Trig_Tactics_casted_Func007C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(800.00, udg_Loc, Condition(function Trig_Tactics_casted_Func007Func003001003)), function Trig_Tactics_casted_Func007Func003002 )
call RemoveLocation(udg_Loc)
else
endif
endfunction
//===========================================================================
function InitTrig_Tactics_casted takes nothing returns nothing
set gg_trg_Tactics_casted = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tactics_casted, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tactics_casted, Condition( function Trig_Tactics_casted_Conditions ) )
call TriggerAddAction( gg_trg_Tactics_casted, function Trig_Tactics_casted_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_StoreCheck takes nothing returns nothing
local integer i = ( GetDestructableTypeId(GetEnumDestructable()))
local real x
local real y
if i == 'NTtw' or i == 'ATtr' or i == 'BTtw' or i == 'ZTtw' or i == 'FTtw' or i == 'B004' or i == 'B003' then
//Check if the picked destructable Id is matching the destructable we want to add to DropItemDestructible
call TriggerRegisterDeathEvent( gg_trg_DropItemDestructible__JASS, GetEnumDestructable() )
if i == 'ATtr' or i == 'BTtw' or i == 'ZTtw' or i == 'FTtw' then
set udg_Tree_count = udg_Tree_count + 1
set udg_Tree[udg_Tree_count] = GetEnumDestructable()
endif
endif
endfunction
function Trig_StoreActions takes nothing returns nothing
call EnumDestructablesInRect( (bj_mapInitialPlayableArea), null, function Trig_StoreCheck )
//pick everydestructable in playable map and run the function Trig_StoreDestructible_Check
endfunction
//===========================================================================
function InitTrig_StoreDestructible__JASS takes nothing returns nothing
set gg_trg_StoreDestructible__JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_StoreDestructible__JASS, function Trig_StoreActions )
//create the trigger StoreDestructible
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_DropItemDestructible takes nothing returns nothing
local destructable d = GetDyingDestructable()
local integer i = GetDestructableTypeId(d)
local real x = GetDestructableX(d)
local real y = GetDestructableY(d)
if i == 'ATtr' or i == 'BTtw' or i == 'ZTtw' or i == 'FTtw' then //Ashenval/Barren/Ruin/Autumn tree Destructable
call SetItemUserData( CreateItem( 'I011', x, y ), 99 ) //Wood item
elseif i == 'B004' or i == 'B003' then //Bush1/Bush2/Bush3/VignyThorn Destructable
call SetItemUserData( CreateItem( 'I012', x, y ), 99 ) //Tinder item
elseif i == 'NTtw' then //DeadTree destructable
call SetItemUserData( CreateItem( 'I06A', x, y ), 99 ) //Petrified wood item
endif
call TriggerSleepAction( 1.00 )
call DisableTrigger( GetTriggeringTrigger() ) //Disable trigger before the remove action is done
call RemoveDestructable(d) // remove destructible
set d = null // clean memory from destructible
call EnableTrigger( GetTriggeringTrigger() ) //Restaure trigger after the remove action is done
endfunction
//===========================================================================
function InitTrig_DropItemDestructible__JASS takes nothing returns nothing
set gg_trg_DropItemDestructible__JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_DropItemDestructible__JASS, function Trig_DropItemDestructible )
//create the trigger DropItemDestructible
endfunction
function Trig_Global_Ability_1_instant_Conditions takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'Aloc') == false ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_instant_Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05V' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_instant_Func004Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0N1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08A' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0B2' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_instant_Func004C takes nothing returns boolean
if ( not Trig_Global_Ability_1_instant_Func004Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_instant_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local integer spell = GetSpellAbilityId()
if ( Trig_Global_Ability_1_instant_Func004C() ) then
call ConditionalTriggerExecute( gg_trg_Transition_and_Cancel )
else
if ( Trig_Global_Ability_1_instant_Func004Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Next_Page )
else
endif
endif
set caster = null
set target = null
endfunction
//===========================================================================
function InitTrig_Global_Ability_1_instant takes nothing returns nothing
set gg_trg_Global_Ability_1_instant = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Global_Ability_1_instant, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Global_Ability_1_instant, Condition( function Trig_Global_Ability_1_instant_Conditions ) )
call TriggerAddAction( gg_trg_Global_Ability_1_instant, function Trig_Global_Ability_1_instant_Actions )
endfunction
function Trig_Global_Ability_1_Conditions takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'Aloc') == false ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0MC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A00N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A064' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A00S' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FZ' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CE' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002Func001Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0DO' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DP' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AL' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AH' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AG' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AN' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0B1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AZ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AO' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AY' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E2' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0KP' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A06Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A083' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0B9' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08W' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FM' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A02M' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05F' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IJ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0KD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0OO' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0MK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GG' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0KV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08J' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0MM' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05A' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02P' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A007' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BY' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0BC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IY' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IZ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CJ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A094' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A04X' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A093' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A095' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FF' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FG' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FI' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FJ' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A002' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IM' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IN' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IO' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07J' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IP' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IQ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IR' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IT' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A096' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IX' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A00C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CZ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0B6' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A028' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0MS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02F' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0K3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0K7' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A00K' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0JW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0K0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0K1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0KF' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A075' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E9' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DT' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A065' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DL' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DN' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0N5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0N2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DX' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DR' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EH' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A057' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EJ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EF' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DZ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A037' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DJ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A036' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EL' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BA' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FX' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FQ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A078' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A079' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0D0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GX' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FN' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GE' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A04W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0K6' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DI' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0HG' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E6' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E7' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACdc' ) ) then
return false
endif
if ( not ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) != MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001Func003Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0C6' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09L' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'ACdc' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004Func001Func003C takes nothing returns boolean
if ( not Trig_Global_Ability_1_Func004Func001Func003Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08F' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Func004Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0A1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05I' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A087' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AT' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BX' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A088' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08L' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BZ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C1' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_1_Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h01H' ) ) then
return false
endif
if ( not Trig_Global_Ability_1_Func004Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_1_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local integer spell = GetSpellAbilityId()
if ( Trig_Global_Ability_1_Func004C() ) then
call ConditionalTriggerExecute( gg_trg_Item_Choice_and_Summon_Beast )
else
if ( Trig_Global_Ability_1_Func004Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Item_Choice_and_Summon_Beast )
else
if ( Trig_Global_Ability_1_Func004Func001Func003C() ) then
if ( Trig_Global_Ability_1_Func004Func001Func003Func002C() ) then
call TriggerExecute( gg_trg_Change_Tribe_global )
else
set udg_LocalPlayer = udg_SelectTempPlayer[GetUnitUserData(GetTriggerUnit())]
call TriggerExecute( gg_trg_Totem_Prayers_JASS )
endif
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Abilities_All_Spells_and_Clubs )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001C() ) then
call Hawk_Swoop( caster, target, spell)
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Abilities_Heroes )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Abilities_All_Bow_and_Gun )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Abilities_All_Dagger_Spear_Axe )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Abilities_All_Dagger_Spear_Axe_2 )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Abilities_All_Others )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Turn_on_Chainsaw_All )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001C() ) then
call Food_FeedAnimal(caster)
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Random_Troll )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002Func001C() ) then
set udg_LocalPlayer = udg_SelectTempPlayer[GetUnitUserData(GetSpellAbilityUnit())]
call ConditionalTriggerExecute( gg_trg_Achievements )
else
if ( Trig_Global_Ability_1_Func004Func001Func003Func001Func001Func003Func003Func001Func001Func001Func001Func001Func002Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Item_Choice_and_Summon_Beast )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set caster = null
set target = null
endfunction
//===========================================================================
function InitTrig_Global_Ability_1 takes nothing returns nothing
set gg_trg_Global_Ability_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Global_Ability_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Global_Ability_1, Condition( function Trig_Global_Ability_1_Conditions ) )
call TriggerAddAction( gg_trg_Global_Ability_1, function Trig_Global_Ability_1_Actions )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func002Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func002Func003Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func002Func003Func003C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func002Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A02N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0N5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A075' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A057' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A037' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A036' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BA' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A065' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03C' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E3' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0FW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FX' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A065' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DL' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0BA' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CK' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 2 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A036' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EL' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A037' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DJ' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0CD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DT' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0BB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DZ' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A08R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EF' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A057' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EJ' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0A3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E9' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0CB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EH' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= 10 ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A02K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DR' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DX' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A075' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06K' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func004C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0N5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0N2' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0CC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DN' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A02N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E5' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0D0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GX' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 2 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func002Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func002Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func002Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func003Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func003Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006C takes nothing returns boolean
if ( not ( IsTerrainPathableBJ(udg_Loc, PATHING_TYPE_FLOATABILITY) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func007002003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'h02F' )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func008A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - GetRandomReal(50.00, 100.00) ) )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func010Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func010Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func010C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A0E7' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func008002003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'h02F' )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func009A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - GetRandomReal(25.00, 75.00) ) )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func011Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func011Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func011C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A0E6' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func008002003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'h02F' )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func009A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - GetRandomReal(10.00, 30.00) ) )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func011Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func011Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func011C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A0CS' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0HG' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func006Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func006Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func006C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A0DI' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func006Func001002003 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func006Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func006C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A0K6' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func002Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04W' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0GE' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FN' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0P9' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0P8' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0P7' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0P6' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 2 ) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0P0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0P3' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 2 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0FQ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A078' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A079' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07G' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Spells_and_Clubs_Actions takes nothing returns nothing
local unit udg_TempUnit
if ( Trig_Abilities_All_Spells_and_Clubs_Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func002Func001C() ) then
set udg_Critical_current = 0
else
set udg_Critical_current = ( udg_Crit_power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetRandomInt(1, 10) )
endif
if ( Trig_Abilities_All_Spells_and_Clubs_Func002Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func002Func003Func003C() ) then
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + 9 )
else
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + 10 )
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func002Func003Func001C() ) then
set udg_Critblock_current = 8
else
set udg_Critblock_current = 10
endif
endif
else
endif
if ( Trig_Abilities_All_Spells_and_Clubs_Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func001C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) - udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] ) )
else
endif
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M0', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 6
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07S', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 7
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002C() ) then
call PlaySoundOnUnitBJ( gg_snd_LocustSwarmLoop, 100, GetSpellAbilityUnit() )
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func003C() ) then
call SetUnitManaBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) - GetRandomReal(25.00, 50.00) ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 8
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002C() ) then
call PlaySoundOnUnitBJ( gg_snd_RatWhat1, 100, GetSpellAbilityUnit() )
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func004C() ) then
call SetUnitManaBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) - GetRandomReal(25.00, 50.00) ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 8
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func001C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER) - GetRandomInt(25, 50) ) )
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func001Func002C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER) - GetRandomInt(25, 50) ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 9
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func001C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER) - GetRandomInt(50, 100) ) )
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func001Func002C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_LUMBER) - GetRandomInt(50, 100) ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 10
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func003C() ) then
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + GetRandomReal(25.00, 75.00) ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 11
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func003C() ) then
call SetUnitLifeBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellAbilityUnit()) + GetRandomReal(25.00, 75.00) ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 11
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func001Func002C() ) then
call SetUnitAnimation( GetTriggerUnit(), "throw" )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07S', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 4
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M0', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 4
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func003C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) + 20.00 ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 12
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func003C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) + 40.00 ) )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 13
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M2', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "invisibility", GetSpellAbilityUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 14
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M2', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "invisibility", GetSpellAbilityUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 14
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func002C() ) then
call TriggerSleepAction( 0.10 )
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M2', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "invisibility", GetSpellAbilityUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func002C() ) then
call TriggerSleepAction( 0.10 )
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M2', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "invisibility", GetSpellAbilityUnit() )
call RemoveLocation(udg_Loc)
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M3', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellAbilityUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 14
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func003Func002Func001Func002Func002Func002Func002Func002Func001Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M3', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 14
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
endif
if ( Trig_Abilities_All_Spells_and_Clubs_Func004C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0MX', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 15
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M1', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 15
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func002C() ) then
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0P4', GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 15
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func001C() ) then
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0P5', GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 3
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func001C() ) then
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0PA', GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 3
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func001C() ) then
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0PB', GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 3
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func001C() ) then
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0PC', GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 3
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
endif
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func002Func001C() ) then
set udg_TempReal = GetRandomReal(20.00, 60.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func001C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func001Func001C() ) then
set udg_TempReal = GetRandomReal(20.00, 40.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func002C() ) then
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func002Func001C() ) then
set udg_TempReal = GetRandomReal(20.00, 60.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
set udg_Loc2 = GetSpellTargetLoc()
set udg_TempUnit = GetSpellAbilityUnit()
call SelectUnitRemoveForPlayer( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func006C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func006Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func006Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
call TriggerSleepAction( 0.50 )
call SelectUnitForPlayerSingle( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
set udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] = ( udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] + 12 )
call ConditionalTriggerExecute( gg_trg_Bomber_Lvl )
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
set udg_Loc2 = GetSpellTargetLoc()
set udg_TempUnit = GetSpellAbilityUnit()
call SelectUnitRemoveForPlayer( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func006C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func006Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func006Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
call TriggerSleepAction( ( DistanceBetweenPoints(udg_Loc, udg_Loc2) / 750.00 ) )
call SelectUnitForPlayerSingle( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
set udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] = ( udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(udg_TempUnit))] + 24 )
call ConditionalTriggerExecute( gg_trg_Bomber_Lvl )
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001C() ) then
set udg_Loc = GetSpellTargetLoc()
set udg_PointX = GetLocationX(udg_Loc)
set udg_PointY = GetLocationY(udg_Loc)
call CreateNUnitsAtLoc( 1, 'nskk', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0EQ', GetLastCreatedUnit() )
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006C() ) then
call Weather_ForestFire( udg_PointX, udg_PointY)
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func003C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func003Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func003Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func002C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func002Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func006Func002Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
endif
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
set udg_Loc2 = GetSpellTargetLoc()
set udg_TempUnit = GetSpellAbilityUnit()
call SelectUnitRemoveForPlayer( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call CreateNUnitsAtLoc( 1, 'n00G', GetOwningPlayer(udg_TempUnit), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07F', GetLastCreatedUnit() )
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func008002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func009A )
call DestroyGroup(udg_TempGroup)
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func011C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func011Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func011Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
call TriggerSleepAction( 0.50 )
call SelectUnitForPlayerSingle( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call TriggerSleepAction( 1.00 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
set udg_Loc2 = GetSpellTargetLoc()
set udg_TempUnit = GetSpellAbilityUnit()
call SelectUnitRemoveForPlayer( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call CreateNUnitsAtLoc( 1, 'n00G', GetOwningPlayer(udg_TempUnit), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0CG', GetLastCreatedUnit() )
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func008002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func009A )
call DestroyGroup(udg_TempGroup)
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func011C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func011Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func011Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
call TriggerSleepAction( 0.50 )
call SelectUnitForPlayerSingle( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call TriggerSleepAction( 1.00 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
else
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
set udg_Loc2 = GetSpellTargetLoc()
set udg_TempUnit = GetSpellAbilityUnit()
call SelectUnitRemoveForPlayer( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call CreateNUnitsAtLoc( 1, 'n00G', GetOwningPlayer(udg_TempUnit), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0CH', GetLastCreatedUnit() )
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func007002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func008A )
call DestroyGroup(udg_TempGroup)
if ( Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func010C() ) then
set udg_TempGroup = GetUnitsInRangeOfLocMatching(300.00, udg_Loc2, Condition(function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func010Func001002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Spells_and_Clubs_Func004Func001Func001Func003Func001Func003Func003Func003Func003Func003Func002Func001Func001Func001Func009Func001Func001Func010Func002A )
call DestroyGroup(udg_TempGroup)
else
endif
call TriggerSleepAction( 0.50 )
call SelectUnitForPlayerSingle( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call TriggerSleepAction( 1.00 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Abilities_All_Spells_and_Clubs takes nothing returns nothing
set gg_trg_Abilities_All_Spells_and_Clubs = CreateTrigger( )
call TriggerAddAction( gg_trg_Abilities_All_Spells_and_Clubs, function Trig_Abilities_All_Spells_and_Clubs_Actions )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func001Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func001Func003Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func001Func003Func003C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func001Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == true ) ) then
return true
endif
if ( ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_MECHANICAL) == true ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00K' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0K7' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 0 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_MECHANICAL) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_UNDEAD) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0K3' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func004Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func007C takes nothing returns boolean
if ( not ( IsTerrainPathableBJ(udg_Loc, PATHING_TYPE_FLOATABILITY) == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func002002003001 takes nothing returns boolean
return ( GetFilterUnit() != GetTriggerUnit() )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func002002003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) == false )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func002002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func002002003001(), Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func002002003002() )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), GetRandomReal(25.00, 75.00), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func002002003001 takes nothing returns boolean
return ( GetFilterUnit() != GetTriggerUnit() )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func002002003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) == false )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func002002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func002002003001(), Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func002002003002() )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func004002003001 takes nothing returns boolean
return ( GetFilterUnit() != GetTriggerUnit() )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func004002003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) == false )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func004002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func004002003001(), Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func004002003002() )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func006A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), GetRandomReal(25.00, 75.00), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func011A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), GetRandomReal(50.00, 100.00), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010C takes nothing returns boolean
if ( not ( udg_Critical_current >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02F' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004Func003Func002002003 takes nothing returns boolean
return ( GetFilterUnit() != udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004Func003Func005A takes nothing returns nothing
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004Func003C takes nothing returns boolean
if ( not ( udg_Critical_current >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0MS' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func004Func003C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A028' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func004Func003C takes nothing returns boolean
if ( not ( udg_Critical_current >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07R' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func002Func004Func004C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func005Func003C takes nothing returns boolean
if ( not ( udg_Critical_current >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B6' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func002Func004Func004C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func002C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func005Func003C takes nothing returns boolean
if ( not ( udg_Critical_current >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CZ' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func002Func004Func004C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func002C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func005Func003C takes nothing returns boolean
if ( not ( udg_Critical_current >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00C' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Bow_and_Gun_Actions takes nothing returns nothing
if ( Trig_Abilities_All_Bow_and_Gun_Func001C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func001Func001C() ) then
set udg_Critical_current = 0
else
set udg_Critical_current = ( udg_Crit_power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetRandomInt(1, 10) )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func001Func003C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func001Func003Func003C() ) then
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + 9 )
else
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + 10 )
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func001Func003Func001C() ) then
set udg_Critblock_current = 8
else
set udg_Critblock_current = 10
endif
endif
else
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J5', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func002Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J4', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func002Func004Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J6', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I00S')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func004C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I00S')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I044'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func005C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func005Func003C() ) then
set udg_TempReal = GetRandomReal(20.00, 60.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J5', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func002Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J4', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func002Func004Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J6', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I05R')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func004C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I05R')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AR'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func005C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func005Func003C() ) then
set udg_TempReal = GetRandomReal(40.00, 80.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func002C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J5', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func002Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J4', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func002Func004Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J6', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I04W')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func004C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I04W')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AO'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func005C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func005Func003C() ) then
set udg_TempReal = GetRandomReal(40.00, 60.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I02O')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func003C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I02O')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AQ'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func004C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func004Func003C() ) then
set udg_TempReal = GetRandomReal(75.00, 125.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I02P')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func003C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I02P')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AU'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func004C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func004Func003C() ) then
set udg_TempReal = GetRandomReal(75.00, 125.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I02T')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func003C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I02T')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AT'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004Func003C() ) then
set udg_Loc = GetSpellTargetLoc()
set udg_TempGroup = GetUnitsInRangeOfLocMatching(200.00, udg_Loc, Condition(function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004Func003Func002002003))
call RemoveLocation(udg_Loc)
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func004Func003Func005A )
call DestroyGroup(udg_TempGroup)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 1
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I045')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func003C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I045')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AP'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
set udg_Loc = GetSpellTargetLoc()
set udg_PointX = GetLocationX(udg_Loc)
set udg_PointY = GetLocationY(udg_Loc)
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func007C() ) then
call Weather_ForestFire( udg_PointX, udg_PointY)
else
endif
call RemoveLocation(udg_Loc)
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010C() ) then
set udg_Loc = GetSpellTargetLoc()
set udg_TempGroup = GetUnitsInRangeOfLocMatching(200.00, udg_Loc, Condition(function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func004002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func011A )
call CreateNUnitsAtLoc( 1, 'nskk', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0ER', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
call DestroyGroup(udg_TempGroup)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 2
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
set udg_Loc = GetSpellTargetLoc()
set udg_TempGroup = GetUnitsInRangeOfLocMatching(200.00, udg_Loc, Condition(function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func002002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func010Func006A )
call CreateNUnitsAtLoc( 1, 'nskk', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0EQ', GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
call DestroyGroup(udg_TempGroup)
endif
else
set udg_Loc = GetSpellTargetLoc()
set udg_TempGroup = GetUnitsInRangeOfLocMatching(200.00, udg_Loc, Condition(function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func002002003))
call ForGroupBJ( udg_TempGroup, function Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func009Func003A )
call CreateNUnitsAtLoc( 1, 'nskk', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0EQ', GetLastCreatedUnit() )
call DestroyGroup(udg_TempGroup)
call RemoveLocation(udg_Loc)
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I029')
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func003C() ) then
set udg_ReloadCount = ( udg_ReloadCount + 1 )
set udg_ReloadUnit[udg_ReloadCount] = GetSpellAbilityUnit()
set udg_ReloadItem[udg_ReloadCount] = GetItemOfTypeFromUnitBJ(GetSpellAbilityUnit(), 'I029')
set udg_ReloadItemEmpty[udg_ReloadCount] = 'I0AS'
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00N', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call SetUnitUserData( GetLastCreatedUnit(), udg_ReloadCount )
call RemoveLocation(udg_Loc)
else
call SetItemCharges( udg_TempItem, ( GetItemCharges(udg_TempItem) + 1 ) )
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func004C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func004Func003C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0MX', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 4
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0FY', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + 30.00 ) )
else
call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetSpellTargetUnit(), 30.00, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002Func002C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 30.00, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
endif
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 36.00, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
else
endif
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 40.00, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_TempUnit = GetSpellTargetUnit()
set udg_TempPickedUnit = GetTriggerUnit()
call ConditionalTriggerExecute( gg_trg_Mining_Resource )
else
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006Func001C() ) then
if ( Trig_Abilities_All_Bow_and_Gun_Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0MX', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 4
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'o000', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call ShowUnitHide( GetLastCreatedUnit() )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Abilities_All_Bow_and_Gun takes nothing returns nothing
set gg_trg_Abilities_All_Bow_and_Gun = CreateTrigger( )
call TriggerAddAction( gg_trg_Abilities_All_Bow_and_Gun, function Trig_Abilities_All_Bow_and_Gun_Actions )
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func003Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func003Func003C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B015') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func006C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 2 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006Func006Func008C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[udg_A] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0J0' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006Func009C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[udg_A] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0IZ' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func009C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[udg_A] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0IY' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BC' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 2 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006Func006Func008C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[udg_A] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0J3' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006Func009C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[udg_A] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0J2' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func009C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[udg_A] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0J1' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CJ' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func003Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func008Func001Func001C takes nothing returns boolean
if ( not ( ( udg_Critical_current + 1 ) >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func008Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func008C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FJ' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FI' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FG' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FF' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A095' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A093' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04X' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A094' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func005C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0CJ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J3' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003C takes nothing returns boolean
if ( not Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func005C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0BC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IY' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0IZ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0J0' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Func007C takes nothing returns boolean
if ( not Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func004C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Dagger_Spear_Axe_2_Actions takes nothing returns nothing
local player udg_LocalPlayer
local item udg_LocalItem
local item udg_LocalItem2
set udg_LocalPlayer = GetOwningPlayer(GetTriggerUnit())
set udg_ThrowDaggerSpear[GetConvertedPlayerId(udg_LocalPlayer)] = true
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func006C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func001C() ) then
set udg_Critical_current = 0
else
set udg_Critical_current = ( udg_Crit_power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetRandomInt(1, 10) )
endif
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func003C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func003Func003C() ) then
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + 9 )
else
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] + 10 )
endif
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func006Func003Func001C() ) then
set udg_Critblock_current = 8
else
set udg_Critblock_current = 10
endif
endif
else
endif
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func001C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func001Func001C() ) then
set udg_TempReal = GetRandomReal(20.00, 40.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002C() ) then
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04L')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04L', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J5', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I09N')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_A = GetItemUserData(udg_LocalItem)
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func009C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04L', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
set udg_AmmoAmmount[udg_A] = ( udg_AmmoAmmount[udg_A] - 1 )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I09N', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call SetItemUserData( GetLastCreatedItem(), udg_A )
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
endif
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J4', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I09O')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_A = GetItemUserData(udg_LocalItem)
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006Func009C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04L', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
set udg_AmmoAmmount[udg_A] = ( udg_AmmoAmmount[udg_A] - 1 )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I09O', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call SetItemUserData( GetLastCreatedItem(), udg_A )
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
endif
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006Func006C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J6', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I09P')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_A = GetItemUserData(udg_LocalItem)
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func002Func001Func006Func006Func008C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04L', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
set udg_AmmoAmmount[udg_A] = ( udg_AmmoAmmount[udg_A] - 1 )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I09P', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call SetItemUserData( GetLastCreatedItem(), udg_A )
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
endif
else
endif
endif
endif
endif
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func001C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func001Func001C() ) then
set udg_TempReal = GetRandomReal(20.00, 50.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002C() ) then
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04R')
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04R', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J5', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I09Q')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_A = GetItemUserData(udg_LocalItem)
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func009C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04R', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
set udg_AmmoAmmount[udg_A] = ( udg_AmmoAmmount[udg_A] - 1 )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I09Q', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call SetItemUserData( GetLastCreatedItem(), udg_A )
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
endif
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J4', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I09R')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_A = GetItemUserData(udg_LocalItem)
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006Func009C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04R', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
set udg_AmmoAmmount[udg_A] = ( udg_AmmoAmmount[udg_A] - 1 )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I09R', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call SetItemUserData( GetLastCreatedItem(), udg_A )
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
endif
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006Func006C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J6', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I09S')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_A = GetItemUserData(udg_LocalItem)
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func002Func001Func006Func006Func008C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I04R', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
set udg_AmmoAmmount[udg_A] = ( udg_AmmoAmmount[udg_A] - 1 )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I09S', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call SetItemUserData( GetLastCreatedItem(), udg_A )
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
endif
else
endif
endif
endif
endif
else
set udg_ThrowDaggerSpear[GetConvertedPlayerId(udg_LocalPlayer)] = false
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004C() ) then
set udg_TempItemType = 'I028'
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func003C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func003Func001C() ) then
set udg_TempReal = GetRandomReal(30.00, 60.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_TempItemType)
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( udg_TempItemType, udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010C() ) then
set udg_TempItemType = 'I01S'
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func003C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func003Func001C() ) then
set udg_TempReal = GetRandomReal(30.00, 70.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_TempItemType)
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( udg_TempItemType, udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010C() ) then
set udg_TempItemType = 'I00H'
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func003C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func003Func001C() ) then
set udg_TempReal = GetRandomReal(30.00, 80.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_TempItemType)
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( udg_TempItemType, udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010C() ) then
set udg_TempItemType = 'I02F'
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func003C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func003Func001C() ) then
set udg_TempReal = GetRandomReal(30.00, 90.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_TempItemType)
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( udg_TempItemType, udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func001C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TempReal = GetRandomReal(50.00, 60.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I094')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I094', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func001C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TempReal = GetRandomReal(50.00, 70.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I095')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I095', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func001C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TempReal = GetRandomReal(50.00, 80.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I096')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I096', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func008C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func008Func001C() ) then
if ( Trig_Abilities_All_Dagger_Spear_Axe_2_Func007Func003Func004Func010Func010Func010Func010Func008Func008Func008Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
set udg_TempReal = GetRandomReal(50.00, 90.00)
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_TempReal, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 5
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
else
endif
else
endif
set udg_LocalItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I097')
set udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - GetItemLifeBJ(udg_LocalItem) )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I097', udg_Loc )
set udg_LocalItem2 = GetLastCreatedItem()
call RemoveLocation(udg_Loc)
call SetItemVisibleBJ( false, udg_LocalItem2 )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
call PolledWait( 0.30 )
set udg_ThrowDaggerSpear[GetConvertedPlayerId(udg_LocalPlayer)] = false
call RemoveItem( udg_LocalItem )
call SetItemVisibleBJ( true, udg_LocalItem2 )
set udg_LocalItem = null
set udg_LocalItem2 = null
set udg_LocalPlayer = null
endfunction
//===========================================================================
function InitTrig_Abilities_All_Dagger_Spear_Axe_2 takes nothing returns nothing
set gg_trg_Abilities_All_Dagger_Spear_Axe_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Abilities_All_Dagger_Spear_Axe_2, function Trig_Abilities_All_Dagger_Spear_Axe_2_Actions )
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0KD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0OO' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0MK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0E1' ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BY' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A007' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[1], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[2], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[3], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[4], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[5], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[6], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[7], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[8], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[9], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[10], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[11], GetSpellAbilityUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitInTransportBJ(udg_Hero_Troll[12], GetSpellAbilityUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02P' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func003Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]) >= 60.00 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func003C takes nothing returns boolean
if ( not ( udg_Pet_Owned[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05A' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func002Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]) >= 60.00 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func002C takes nothing returns boolean
if ( not ( udg_Pet_Owned[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03E' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08J' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func003Func001C takes nothing returns boolean
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A0M4') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func003Func003C takes nothing returns boolean
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A00N') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0H1') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A02S') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0JL') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0JM') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0JN') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0JO') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetSpellTargetUnit(), 'A0JP') == true ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func003C takes nothing returns boolean
if ( not Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func003Func003C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func011C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'Broa') == false ) ) then
return false
endif
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A0KT') == false ) ) then
return false
endif
if ( not ( HasUnitAbility(GetSpellTargetUnit(), 'A0AX') == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h02U' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h032' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h019' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h01C' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h02I' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h01Q' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h02X' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h02V' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h033' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h00E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h00S' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h00T' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h00U' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h00R' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h018' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h00M' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h02S' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h036' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0GG' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Abilities_All_Others_Func004Func001Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0IJ' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05F' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02M' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_All_Others_Actions takes nothing returns nothing
local location udg_Loc
local location udg_Loc2
local unit udg_TempUnit
if ( Trig_Abilities_All_Others_Func004C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I014', udg_Loc )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Others_Func004Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I011', udg_Loc )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Others_Func004Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateItemLoc( 'I06A', udg_Loc )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001C() ) then
call UnitRemoveItemFromSlotSwapped( 1, GetSpellAbilityUnit() )
call UnitRemoveItemFromSlotSwapped( 2, GetSpellAbilityUnit() )
call UnitRemoveItemFromSlotSwapped( 3, GetSpellAbilityUnit() )
call UnitRemoveItemFromSlotSwapped( 4, GetSpellAbilityUnit() )
call UnitRemoveItemFromSlotSwapped( 5, GetSpellAbilityUnit() )
call UnitRemoveItemFromSlotSwapped( 6, GetSpellAbilityUnit() )
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002C() ) then
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002C() ) then
call SelectUnitRemoveForPlayer( GetSpellTargetUnit(), GetOwningPlayer(GetSpellTargetUnit()) )
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func003C() ) then
call IssueImmediateOrder( GetSpellTargetUnit(), "berserk" )
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func003Func001C() ) then
call IssueImmediateOrder( GetSpellTargetUnit(), "frenzy" )
else
endif
endif
call UnitRemoveAbilityBJ( 'SCae', GetSpellTargetUnit() )
call UnitRemoveBuffBJ( 'BOae', GetSpellTargetUnit() )
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
set udg_Loc2 = PolarProjectionBJ(udg_Loc, GetRandomReal(500.00, 2000.00), GetRandomDirectionDeg())
call IssuePointOrderLocBJ( GetSpellTargetUnit(), "move", udg_Loc2 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func002Func011C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 5.00, "TRIGSTR_289" )
else
endif
else
endif
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
set udg_Loc2 = GetSpellTargetLoc()
set udg_TempUnit = GetSpellAbilityUnit()
call SelectUnitRemoveForPlayer( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call TriggerSleepAction( ( DistanceBetweenPoints(udg_Loc, udg_Loc2) / 1000.00 ) )
call CreateItemLoc( 'I014', udg_Loc2 )
call SelectUnitForPlayerSingle( udg_TempUnit, GetOwningPlayer(udg_TempUnit) )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
set udg_TempUnit = null
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011C() ) then
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func002C() ) then
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func002Func001C() ) then
call SetUnitManaBJ( udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]) - 60.00 ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, "TRIGSTR_1540" )
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n00Y', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = GetLastCreatedUnit()
set udg_Pet_Owned[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = true
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), GetOwningPlayer(GetLastCreatedUnit()) )
call RemoveLocation(udg_Loc)
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, ( "|c0000c400Troll:|r |c00ffff64Me needz to rest before doin' this hard task. It requirez " + ( "60" + " taming energy (mana of Hunter Crafting).|r" ) ) )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, "TRIGSTR_279" )
endif
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001C() ) then
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func003C() ) then
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func003Func001C() ) then
call SetUnitManaBJ( udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]) - 60.00 ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, "TRIGSTR_2821" )
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'n01H', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
set udg_Pet[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = GetLastCreatedUnit()
set udg_Pet_Owned[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = true
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), GetOwningPlayer(GetLastCreatedUnit()) )
call RemoveLocation(udg_Loc)
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, ( "|c0000c400Troll:|r |c00ffff64Me needz to rest before doin' this hard task. It requirez " + ( "60" + " taming energy (mana of Hunter Crafting).|r" ) ) )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, "TRIGSTR_279" )
endif
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001C() ) then
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func002C() ) then
call SetUnitOwner( GetSpellAbilityUnit(), GetOwningPlayer(GetSpellTargetUnit()), true )
else
endif
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func001C() ) then
call SetUnitOwner( GetSpellAbilityUnit(), GetOwningPlayer(GetSpellTargetUnit()), true )
else
if ( Trig_Abilities_All_Others_Func004Func001Func001Func001Func002Func001Func011Func011Func001Func001Func001Func001C() ) then
call KillUnit( GetSpellAbilityUnit() )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Abilities_All_Others takes nothing returns nothing
set gg_trg_Abilities_All_Others = CreateTrigger( )
call TriggerAddAction( gg_trg_Abilities_All_Others, function Trig_Abilities_All_Others_Actions )
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B00W') == true ) ) then
return true
endif
if ( ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B00X') == true ) ) then
return true
endif
return false
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]) >= ( I2R(GetUnitPointValue(GetSpellTargetUnit())) * 4.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func001Func001C takes nothing returns boolean
if ( not ( GetUnitLevel(GetSpellTargetUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FZ' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func003C takes nothing returns boolean
if ( not ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func008C takes nothing returns boolean
if ( not ( udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] >= 20.00 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00S' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DD' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func003Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'Brej') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func003Func001Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B00I') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func003Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B00H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A064' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00N' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0MC' ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Abilities_Heroes_Actions takes nothing returns nothing
if ( Trig_Abilities_Heroes_Func001C() ) then
if ( Trig_Abilities_Heroes_Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0M2', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "invisibility", GetSpellAbilityUnit() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_Heroes_Func001Func001Func001C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) - udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] ) )
else
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) - ( 10.00 + udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] ) ) )
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func003C() ) then
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func003Func001C() ) then
call UnitRemoveBuffBJ( 'B00H', GetSpellTargetUnit() )
else
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func003Func001Func002C() ) then
call UnitRemoveBuffBJ( 'B00I', GetSpellTargetUnit() )
else
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func003Func001Func002Func001C() ) then
call UnitRemoveBuffBJ( 'Brej', GetSpellTargetUnit() )
else
endif
endif
endif
else
endif
else
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) - ( 10.00 + udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] ) ) )
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func002C() ) then
call UnitRemoveBuffBJ( 'B00W', GetSpellTargetUnit() )
call UnitRemoveBuffBJ( 'B00X', GetSpellTargetUnit() )
call UnitRemoveBuffBJ( 'B015', GetSpellTargetUnit() )
else
endif
else
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003C() ) then
call AdjustPlayerStateBJ( 5, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func003C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) - 5 ) )
else
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - 5.00 ) )
endif
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) - udg_run_energy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] ) )
set udg_Loc = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0AC', GetLastCreatedUnit() )
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func008C() ) then
call SetUnitAbilityLevelSwapped( 'A0AC', GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped('A00S', GetTriggerUnit()) + 1 ) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
else
call SetUnitAbilityLevelSwapped( 'A0AC', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A00S', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
endif
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Loc)
else
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func001C() ) then
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func001Func001C() ) then
if ( Trig_Abilities_Heroes_Func001Func001Func001Func002Func002Func003Func001Func001Func001C() ) then
set udg_Loc = GetUnitLoc(GetSpellAbilityUnit())
call SetUnitManaBJ( udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]) - I2R(( GetUnitPointValue(GetSpellTargetUnit()) * 4 )) ) )
set udg_TamedBeast[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'n00G', GetOwningPlayer(GetSpellAbilityUnit()), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'Asth', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'Asth', GetLastCreatedUnit(), 1 )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, "TRIGSTR_4067" )
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, ( "|c0000c400Troll:|r |c00ffff64Me needz to rest before doin' this hard task. It requirez " + ( I2S(( GetUnitPointValue(GetSpellTargetUnit()) * 4 )) + " taming energy (mana of Hunter Crafting).|r" ) ) )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 5.00, "TRIGSTR_4070" )
endif
else
endif
endif
endif
endif
endif
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Abilities_Heroes takes nothing returns nothing
set gg_trg_Abilities_Heroes = CreateTrigger( )
call TriggerAddAction( gg_trg_Abilities_Heroes, function Trig_Abilities_Heroes_Actions )
endfunction
function Trig_Achievements_Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Job_Alchemy_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Job_Alchemy_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Job_Alchemy_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func001C takes nothing returns boolean
if ( not ( udg_Job_Alchemy_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_BeastMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_BeastMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_BeastMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Job_BeastMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Cooking_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Cooking_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Cooking_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Cooking_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Destroyer_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Destroyer_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Destroyer_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Destroyer_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Fishing_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Fishing_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Fishing_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Fishing_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_PuppetMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_PuppetMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_PuppetMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_PuppetMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Mining_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Mining_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Mining_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Mining_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Bomber_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_TacticalMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_TacticalMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_TacticalMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_TacticalMaster_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_ChosenOne_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_ChosenOne_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_ChosenOne_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_ChosenOne_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E2' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func003C takes nothing returns boolean
if ( not ( udg_Heart_Werewolf[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func004C takes nothing returns boolean
if ( not ( udg_Heart_Grizzly[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func005C takes nothing returns boolean
if ( not ( udg_Heart_Snake[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func006C takes nothing returns boolean
if ( not ( udg_Heart_Vulture[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DS' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CW' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AY' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AZ' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DK' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AN' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AO' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AG' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B1' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AH' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CV' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func002Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[1] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[1] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func002Func003C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[1] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[1] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func002Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func002Func003C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[2] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[3] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[3] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002Func003C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[3] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Merchant_Lvl[3] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A0H5') == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A0GQ') == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A0GP') == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DP' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[1] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[1] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[1] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[1] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func002Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[2] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[2] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[2] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[2] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func003Func002Func003Func002Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[3] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func003Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[3] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func003Func002Func003C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[3] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func003Func002C takes nothing returns boolean
if ( not ( udg_Job_Ballistic_Lvl[3] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A0H5') == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A0GQ') == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A0GP') == true ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DO' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AL' ) ) then
return false
endif
return true
endfunction
function Trig_Achievements_Actions takes nothing returns nothing
if ( Trig_Achievements_Func001C() ) then
if ( Trig_Achievements_Func001Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Alchemy. Xp " ) ) + ( I2S(udg_Job_Alchemy_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 100" ) ) )
else
if ( Trig_Achievements_Func001Func001Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Alchemy. Xp " ) ) + ( I2S(udg_Job_Alchemy_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 300" ) ) )
else
if ( Trig_Achievements_Func001Func001Func001Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Alchemy. Xp " ) ) + ( I2S(udg_Job_Alchemy_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 600" ) ) )
else
if ( Trig_Achievements_Func001Func001Func001Func001Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64 " + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "'s troll Alchemy skill be level 3. He be the greatest, mon!" ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002C() ) then
if ( Trig_Achievements_Func001Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 0 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 1 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 2 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_4679" )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func002Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 0 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func002Func002Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 1 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func002Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 2 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func002Func002Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_4677" )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func002Func002Func003C() ) then
if ( Trig_Achievements_Func001Func002Func002Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 0 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func002Func003Func002Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 1 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func002Func003Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 2 in Ballisticz. Xp " ) ) + ( I2S(udg_Job_Ballistic_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func002Func002Func003Func002Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_4640" )
else
endif
endif
endif
endif
else
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001C() ) then
if ( Trig_Achievements_Func001Func002Func001Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 0 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 225" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func002Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 1 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 675" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 2 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 1350" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func002Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_4637" )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003C() ) then
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 0 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 225" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func002Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 1 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 675" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 2 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 1350" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func002Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_4461" )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func003C() ) then
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 0 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 225" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 1 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 675" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll tribe is Lvl 2 in Economicz. Xp " ) ) + ( I2S(udg_Job_Merchant_Xp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 1350" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func002Func003Func003Func002Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_4451" )
else
endif
endif
endif
endif
else
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Beastz Taming. Xp " ) ) + ( I2S(udg_Job_BeastMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Beastz Taming. Xp " ) ) + ( I2S(udg_Job_BeastMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Beastz Taming. Xp " ) ) + ( I2S(udg_Job_BeastMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64 " + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "'s troll Beastz Taming skill be level 3. He be the greatest, mon!" ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Cookin'. Xp " ) ) + ( I2S(udg_Job_Cooking_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Cookin'. Xp " ) ) + ( I2S(udg_Job_Cooking_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Cookin'. Xp " ) ) + ( I2S(udg_Job_Cooking_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " / 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64 " + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "'s troll Cookin' skill be level 3. He be the greatest, mon!" ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Destroya. Xp " ) ) + ( I2S(udg_Job_Destroyer_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Destroya. Xp " ) ) + ( I2S(udg_Job_Destroyer_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Destroya. Xp " ) ) + ( I2S(udg_Job_Destroyer_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Destroya' skill be level 3. He be the greatest, mon!" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Fishin'. Xp " ) ) + ( I2S(udg_Job_Fishing_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Fishin'. Xp " ) ) + ( I2S(udg_Job_Fishing_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Fishin'. Xp " ) ) + ( I2S(udg_Job_Fishing_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Fishermon skill be level 3. He be the greatest, mon!" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Revival Voodoo. Xp " ) ) + ( I2S(udg_Job_PuppetMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Revival Voodoo. Xp " ) ) + ( I2S(udg_Job_PuppetMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Revival Voodoo. Xp " ) ) + ( I2S(udg_Job_PuppetMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Master of Puppetz skill be level 3. Masta! Masta! Masta of Puppetz me pullin' ya stringz!..." ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Minin'. Xp " ) ) + ( I2S(udg_Job_Mining_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Minin'. Xp " ) ) + ( I2S(udg_Job_Mining_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Minin'. Xp " ) ) + ( I2S(udg_Job_Mining_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func001Func003Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Miner skill be level 3. He be the greatest, mon!" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Explozivez. Xp " ) ) + ( I2S(udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Explozivez. Xp " ) ) + ( I2S(udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Explozivez. Xp " ) ) + ( I2S(udg_Job_Bomber_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Bomber skill be level 3. He be the greatest, mon!" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Tacticz. Xp " ) ) + ( I2S(udg_Job_TacticalMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Tacticz. Xp " ) ) + ( I2S(udg_Job_TacticalMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Tacticz. Xp " ) ) + ( I2S(udg_Job_TacticalMaster_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Tactician skill be level 3. He be the greatest, mon!`" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Way of Godz. Xp " ) ) + ( I2S(udg_Job_ChosenOne_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Way of Godz. Xp " ) ) + ( I2S(udg_Job_ChosenOne_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Way of Godz. Xp " ) ) + ( I2S(udg_Job_ChosenOne_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll The Chozen One skill be level 3. He be the Prophet, mon! The Prophet!" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002C() ) then
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 0 in Beastz Trappin'. Xp " ) ) + ( I2S(udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 100" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 1 in Beastz Trappin'. Xp " ) ) + ( I2S(udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 300" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll is Lvl 2 in Beastz Trappin'. Xp " ) ) + ( I2S(udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + "/ 600" ) ) )
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func001Func003Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "'s troll Trapper skill be level 3. He be the greatest, mon!" ) ) )
else
endif
endif
endif
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, ( "|c009966ffOld Troll:|r |c00ffff64 " + ( ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " troll survived for " ) + ( I2S(( R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit())) / 500 )) + " dayz in the Jungle.|r" ) ) ) )
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, ( "|c00ffff64He be slayin' " + ( I2S(udg_Kill_worthy[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + " worthy opponentz.|r" ) ) )
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, "TRIGSTR_030" )
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, "TRIGSTR_040" )
else
endif
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func004C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, "TRIGSTR_190" )
else
endif
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func005C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, "TRIGSTR_261" )
else
endif
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func004Func006C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 10.00, "TRIGSTR_297" )
else
endif
else
endif
else
if ( Trig_Achievements_Func001Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func002Func002Func002Func003C() ) then
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( "|c009966ffOld Troll:|r |c00ffff64 " + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " troll still haz a soul. It be a wize troll!|r" ) ) )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Achievements takes nothing returns nothing
set gg_trg_Achievements = CreateTrigger( )
call TriggerAddAction( gg_trg_Achievements, function Trig_Achievements_Actions )
endfunction
function Trig_Ritual_of_Blood_start_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0N0' ) ) then
return false
endif
return true
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004Func001001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[1]) == true )
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004Func001002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetSpellTargetUnit()), udg_Team[1]) == true )
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004Func002001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[2]) == true )
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004Func002002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetSpellTargetUnit()), udg_Team[2]) == true )
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004Func003001 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[3]) == true )
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004Func003002 takes nothing returns boolean
return ( IsPlayerInForce(GetOwningPlayer(GetSpellTargetUnit()), udg_Team[3]) == true )
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001Func004C takes nothing returns boolean
if ( GetBooleanAnd( Trig_Ritual_of_Blood_start_Func006Func001Func004Func001001(), Trig_Ritual_of_Blood_start_Func006Func001Func004Func001002() ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Ritual_of_Blood_start_Func006Func001Func004Func002001(), Trig_Ritual_of_Blood_start_Func006Func001Func004Func002002() ) ) then
return true
endif
if ( GetBooleanAnd( Trig_Ritual_of_Blood_start_Func006Func001Func004Func003001(), Trig_Ritual_of_Blood_start_Func006Func001Func004Func003002() ) ) then
return true
endif
return false
endfunction
function Trig_Ritual_of_Blood_start_Func006Func001C takes nothing returns boolean
if ( not Trig_Ritual_of_Blood_start_Func006Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Ritual_of_Blood_start_Func006C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ritual_of_Blood_start_Actions takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetSpellTargetUnit() )
call RemoveLocation(udg_Loc)
if ( Trig_Ritual_of_Blood_start_Func006C() ) then
if ( Trig_Ritual_of_Blood_start_Func006Func001C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 5.00, "TRIGSTR_3204" )
set udg_TempTarget_VoodooDoll[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = null
else
set udg_TempTarget_VoodooDoll[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = GetSpellTargetUnit()
endif
else
set udg_TempTarget_VoodooDoll[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = null
endif
endfunction
//===========================================================================
function InitTrig_Ritual_of_Blood_start takes nothing returns nothing
set gg_trg_Ritual_of_Blood_start = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ritual_of_Blood_start, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ritual_of_Blood_start, Condition( function Trig_Ritual_of_Blood_start_Conditions ) )
call TriggerAddAction( gg_trg_Ritual_of_Blood_start, function Trig_Ritual_of_Blood_start_Actions )
endfunction
library Hawk
public function Swoop takes unit caster, unit target, integer spell returns nothing
local unit dummy
local integer targetid
local player owner
local player victim
local integer number
local integer number2
local integer ground
local integer air
local real maxlife
local real life
local real divehawk
local real divedmg
local real x
local real y
set targetid = GetUnitTypeId(target)
if targetid == 'h02F' or targetid == 'n011' or targetid == 'n000' then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "|c009966ffOld Troll:|r |c00ffff64The hawk canna swoop this target, mon.|r" )
call UnitRemoveAbility( caster, spell )
call UnitAddAbility( caster, spell )
set caster = null
set target = null
else
set owner = GetOwningPlayer(caster)
set number = GetPlayerId(owner) + 1
set victim = GetOwningPlayer(target)
set number2 = GetPlayerId(victim) + 1
set maxlife = GetUnitState( target, UNIT_STATE_MAX_LIFE)
set life = GetUnitState( target, UNIT_STATE_LIFE)
set udg_Swoop[number] = true
if spell == 'A0JW' then
set divehawk = 40.00
set ground = 'S00E'
set air = 'S00G'
elseif spell == 'A0K0' then
set divehawk = 60.00
set ground = 'S00C'
set air = 'S00H'
elseif spell == 'A0K1' then
set divehawk = 80.00
set ground = 'S00D'
set air = 'S00F'
elseif spell == 'A0KF' then
set divehawk = 100.00
set ground = 'S00V'
set air = 'S009'
endif
set divedmg = divehawk / 2.00
if targetid == 'H000' or targetid == 'H001' or targetid == 'H002' or targetid == 'H003' then
if udg_MaskOwned[number2] != 0 then
set divedmg = 0
endif
elseif targetid == 'h01Q' or targetid == 'h019' or targetid == 'h01C' or targetid == 'h02I' or targetid == 'h02X' or targetid == 'h02U' or targetid == 'h032' or targetid == 'h02V' or targetid == 'h033' then
set divedmg = 150
endif
// Hide the Hawk and order dummy to cast stun on target, the spell missile effect is the hawk model
set x = GetUnitX(caster)
set y = GetUnitY(caster)
call SelectUnit( caster, false )
call ShowUnit( caster, false )
set dummy = CreateUnit( owner, 'n01F', x, y, bj_UNIT_FACING )
call PlaySoundOnUnitBJ( gg_snd_HawkYes2, 100, dummy )
call UnitAddAbility( dummy, 'A0KH' )
call IssueTargetOrder( dummy, "creepthunderbolt", target )
call TriggerSleepAction( 0.80 )
// move the hawk to the target location and unhide it
set x = GetUnitX(target)
set y = GetUnitY(target)
call SetUnitPosition( caster, x, y )
call ShowUnit( caster, true )
call SelectUnit( caster, true )
set dummy = null
// check if target is air or ground, if ground check if target maxhp < swoop ability
if IsUnitIdType(targetid, UNIT_TYPE_FLYING) then
call UnitRemoveBuffBJ( 'BPSE', target )
call IssueTargetOrder( caster, "attack", target )
else
call UnitAddAbility( caster, ground )
if divedmg > life then
call KillUnit(target)
call SetUnitState( caster, UNIT_STATE_MANA, GetUnitState( caster, UNIT_STATE_MANA ) + I2R(GetUnitPointValueByType(GetUnitTypeId(target))) )
elseif maxlife > divehawk then
call UnitDamageTarget(caster, target, divedmg, false, false, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
call TriggerSleepAction( 2.00 )
call UnitRemoveBuffBJ( 'BPSE', target )
else
set x = GetUnitX(caster)
set y = GetUnitY(caster)
set dummy = CreateUnit( Player(bj_PLAYER_NEUTRAL_EXTRA), 'n00N', x, y, bj_UNIT_FACING )
call UnitAddAbility( dummy, 'ACsi' )
call IssuePointOrder( dummy, "silence", x, y )
set udg_Hawk[number] = true
set udg_HawkDamage[number] = divedmg
set udg_HawkPrey[number] = target
set udg_HawkPrey[( number + 12 )] = caster
set udg_HawkPreyHp[number] = life
call ShowUnit( udg_HawkPrey[number], false )
call EnableTrigger( gg_trg_Hawk_Swoop_Damage_JASS )
endif
call TriggerSleepAction( 1.50 )
call UnitAddAbility( caster, air )
set udg_Swoop[number] = false
endif
endif
set caster = null
set target = null
set owner = null
set victim = null
set dummy = null
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Hawk_Damage takes nothing returns nothing
local integer i
local integer j
local real x
local real y
local real array dmg
set i = 1
set j = 0
loop
exitwhen i > 12
if udg_Hawk[i] == false then
set j = j + 1
endif
set i = i + 1
endloop
if j == 12 then
call DisableTrigger( GetTriggeringTrigger() )
return
else
set i = 1
loop
exitwhen i > 12
if udg_Hawk[i] == true then
set dmg[i] = GetRandomReal(10.00, udg_HawkDamage[i])
set j = (i - 1)
if udg_HawkPreyHp[i] > dmg[i] then
set udg_HawkPreyHp[i] = udg_HawkPreyHp[i] - dmg[i]
else
set x = GetUnitX(udg_HawkPrey[( i + 12 )])
set y = GetUnitY(udg_HawkPrey[( i + 12 )])
call SetUnitPosition( udg_HawkPrey[i], x, y )
call ShowUnit( udg_HawkPrey[i], true )
call KillUnit( udg_HawkPrey[i] )
call SetUnitState( udg_HawkPrey[i + 12], UNIT_STATE_MANA, ( GetUnitState( udg_HawkPrey[i + 12], UNIT_STATE_MANA ) + I2R(GetUnitPointValueByType(GetUnitTypeId(udg_HawkPrey[i]))) ) )
set udg_Hawk[i] = false
call UnitRemoveBuffBJ( 'BNsi', udg_HawkPrey[( i + 12 )] )
endif
endif
set i = i + 1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Hawk_Swoop_Damage_JASS takes nothing returns nothing
set gg_trg_Hawk_Swoop_Damage_JASS = CreateTrigger( )
call DisableTrigger( gg_trg_Hawk_Swoop_Damage_JASS )
call TriggerRegisterTimerEvent( gg_trg_Hawk_Swoop_Damage_JASS, 5.00, true )
call TriggerAddAction( gg_trg_Hawk_Swoop_Damage_JASS, function Hawk_Damage )
endfunction
function Trig_Unit_is_Attacked_Global_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_Ruin_2, GetAttacker()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h012' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func001Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttacker()) == 'h035' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'uloc' ) ) then
return true
endif
return false
endfunction
function Trig_Unit_is_Attacked_Global_Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'uloc' ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B015') == false ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h035' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func001Func001C takes nothing returns boolean
if ( not Trig_Unit_is_Attacked_Global_Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func001C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttacker(), 'Aloc') == true ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func003Func007C takes nothing returns boolean
if ( ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B017') == true ) ) then
return true
endif
if ( ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BOae') == true ) ) then
return true
endif
if ( ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B01M') == true ) ) then
return true
endif
return false
endfunction
function Trig_Unit_is_Attacked_Global_Func003C takes nothing returns boolean
if ( not Trig_Unit_is_Attacked_Global_Func003Func007C() ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func001Func006C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttackedUnitBJ(), 'Asal') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 5) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func001C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttackedUnitBJ(), 'A0MJ') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func002Func004Func001Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_TOWNHALL) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func002Func004Func001Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'nmg1' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'h02K' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'h027' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'h004' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func002Func004Func001C takes nothing returns boolean
if ( not Trig_Unit_is_Attacked_Global_Func004Func002Func004Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func002Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h00X' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetAttacker()) != 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func002Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h00W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01J' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h025' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h026' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h028' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h029' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02A' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02D' ) ) then
return true
endif
return false
endfunction
function Trig_Unit_is_Attacked_Global_Func004Func002C takes nothing returns boolean
if ( not Trig_Unit_is_Attacked_Global_Func004Func002Func005C() ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_STRUCTURE) == true ) ) then
return false
endif
if ( not ( IsUnitOwnedByPlayer(GetTriggerUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func005Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetAttackedUnitBJ()) >= 1.00 ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func005C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'h02E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttackedUnitBJ()) == 'h00Q' ) ) then
return true
endif
return false
endfunction
function Trig_Unit_is_Attacked_Global_Func006Func003001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'u001' )
endfunction
function Trig_Unit_is_Attacked_Global_Func006Func003002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GetAttacker() )
endfunction
function Trig_Unit_is_Attacked_Global_Func006C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'u001' ) ) then
return false
endif
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Func007Func005001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'u001' )
endfunction
function Trig_Unit_is_Attacked_Global_Func007Func005002 takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", GetAttacker() )
endfunction
function Trig_Unit_is_Attacked_Global_Func007C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'nmg1' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_is_Attacked_Global_Actions takes nothing returns nothing
if ( Trig_Unit_is_Attacked_Global_Func001C() ) then
if ( Trig_Unit_is_Attacked_Global_Func001Func001C() ) then
if ( Trig_Unit_is_Attacked_Global_Func001Func001Func003C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "locustswarm" )
else
if ( Trig_Unit_is_Attacked_Global_Func001Func001Func003Func001C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
else
endif
endif
else
if ( Trig_Unit_is_Attacked_Global_Func001Func001Func001C() ) then
if ( Trig_Unit_is_Attacked_Global_Func001Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Arrive_Left)
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_Loc )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetAttackedUnitBJ()), udg_Loc, 0 )
call RemoveLocation(udg_Loc)
else
set udg_Loc = GetRectCenter(gg_rct_Arrive_Right)
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_Loc )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetAttackedUnitBJ()), udg_Loc, 0 )
call RemoveLocation(udg_Loc)
endif
call SelectUnitForPlayerSingle( GetAttackedUnitBJ(), GetOwningPlayer(GetAttackedUnitBJ()) )
else
endif
endif
else
call ConditionalTriggerExecute( gg_trg_Attacking_Units )
endif
// ========== Attacked Units ==========
if ( Trig_Unit_is_Attacked_Global_Func003C() ) then
call UnitRemoveBuffBJ( 'B017', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'SCae', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'BOae', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'A0DY', GetTriggerUnit() )
call UnitRemoveAbilityBJ( 'S00W', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B01M', GetTriggerUnit() )
else
endif
if ( Trig_Unit_is_Attacked_Global_Func004C() ) then
if ( Trig_Unit_is_Attacked_Global_Func004Func002C() ) then
set udg_TempUnit = GetTriggerUnit()
set udg_TempPickedUnit = GetAttacker()
call ConditionalTriggerExecute( gg_trg_Mining_Resource )
else
if ( Trig_Unit_is_Attacked_Global_Func004Func002Func004C() ) then
else
if ( Trig_Unit_is_Attacked_Global_Func004Func002Func004Func001C() ) then
call SetUnitOwner( GetTriggerUnit(), GetOwningPlayer(GetAttacker()), true )
if ( Trig_Unit_is_Attacked_Global_Func004Func002Func004Func001Func002C() ) then
call UnitAddAbilityBJ( 'Aall', GetTriggerUnit() )
call UnitRemoveTypeBJ( UNIT_TYPE_TOWNHALL, GetTriggerUnit() )
else
endif
else
endif
endif
endif
else
if ( Trig_Unit_is_Attacked_Global_Func004Func001C() ) then
set udg_Loc = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0J5', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetAttacker() )
call RemoveLocation(udg_Loc)
else
if ( Trig_Unit_is_Attacked_Global_Func004Func001Func006C() ) then
set udg_Loc = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'Aspo', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attackonce", GetAttacker() )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
if ( Trig_Unit_is_Attacked_Global_Func005C() ) then
if ( Trig_Unit_is_Attacked_Global_Func005Func001C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateItemLoc( 'I08T', udg_Loc )
call RemoveLocation(udg_Loc)
call SetUnitManaBJ( GetAttackedUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetAttackedUnitBJ()) - 1 ) )
call SetUnitLifeBJ( GetAttackedUnitBJ(), GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetAttackedUnitBJ()) )
else
call SetUnitLifeBJ( GetAttackedUnitBJ(), GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetAttackedUnitBJ()) )
endif
else
endif
if ( Trig_Unit_is_Attacked_Global_Func006C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(800.00, udg_Loc, Condition(function Trig_Unit_is_Attacked_Global_Func006Func003001003)), function Trig_Unit_is_Attacked_Global_Func006Func003002 )
call RemoveLocation(udg_Loc)
else
endif
if ( Trig_Unit_is_Attacked_Global_Func007C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(1200.00, udg_Loc, Condition(function Trig_Unit_is_Attacked_Global_Func007Func005001003)), function Trig_Unit_is_Attacked_Global_Func007Func005002 )
call RemoveLocation(udg_Loc)
else
endif
endfunction
//===========================================================================
function InitTrig_Unit_is_Attacked_Global takes nothing returns nothing
set gg_trg_Unit_is_Attacked_Global = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unit_is_Attacked_Global, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Unit_is_Attacked_Global, function Trig_Unit_is_Attacked_Global_Actions )
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I0A2') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I0A1') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I0A0') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09Z') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09Y') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09X') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09W') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09V') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09U') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09Q') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09P') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09O') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09N') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09M') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09L') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09K') == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func002Func003C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09K') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09L') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09M') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09N') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09O') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09P') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09Q') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09R') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09S') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09U') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09V') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09W') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09X') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09Y') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I09Z') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I0A0') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I0A1') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetAttacker(), 'I0A2') == true ) ) then
return true
endif
return false
endfunction
function Trig_Attacking_Units_Func002C takes nothing returns boolean
if ( not ( udg_ThrowDaggerSpear[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] == false ) ) then
return false
endif
if ( not Trig_Attacking_Units_Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_EatWolf == false ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttacker()) == 'h02F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'n00U' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'n00X' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'n015' ) ) then
return true
endif
return false
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttacker()) == 'h01O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'h01P' ) ) then
return true
endif
return false
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h02K' ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttacker()) == 'h01I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'h01K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'h01M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'h01L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 'h02W' ) ) then
return true
endif
return false
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h02H' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h018' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h02T' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h00N' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func003Func005C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) <= udg_Job_Trapper_Lvl[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetAttacker()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetAttacker()) ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h01Y' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func002Func001C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetOwningPlayer(GetAttacker()), GetOwningPlayer(GetAttackedUnitBJ())) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetAttacker()) == GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetAttacker()) ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h00D' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func005C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h00V' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func007Func001Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetAttacker()), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func007Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetAttacker()), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003Func007C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetAttacker()), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'h01F' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n01E' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n010' ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func002Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func002Func008C takes nothing returns boolean
if ( not ( udg_Critical_current >= udg_Critblock_current ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func002C takes nothing returns boolean
if ( not ( udg_ChainsawOn[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_GROUND) == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func003C takes nothing returns boolean
if ( ( HasUnitAbility(GetAttackedUnitBJ(), 'A083') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetAttackedUnitBJ(), 'A0B9') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetAttackedUnitBJ(), 'A06Q') == true ) ) then
return true
endif
if ( ( HasUnitAbility(GetAttackedUnitBJ(), 'A08W') == true ) ) then
return true
endif
return false
endfunction
function Trig_Attacking_Units_Func005Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func004C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == GetOwningPlayer(GetTriggerUnit()) ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetRandomInt(1, 12) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttackedUnitBJ(), 'A083') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 6 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func005Func005Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func001Func001Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttackedUnitBJ(), 'A0B9') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func001Func001C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func005Func005Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func001Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttackedUnitBJ(), 'A06Q') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 4 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func001C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func005Func005Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttackedUnitBJ(), 'A08W') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 6) >= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005Func005C takes nothing returns boolean
if ( not Trig_Attacking_Units_Func005Func005Func003C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func005C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttacker(), 'A0E1') == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_FLYING) == false ) ) then
return false
endif
if ( not Trig_Attacking_Units_Func005Func003C() ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Func006C takes nothing returns boolean
if ( not ( HasUnitAbility(GetAttacker(), 'A0HU') == true ) ) then
return false
endif
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Attacking_Units_Actions takes nothing returns nothing
// ========== Attacking Units Have Poisoned Weapons ==========
if ( Trig_Attacking_Units_Func002C() ) then
if ( Trig_Attacking_Units_Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09K')
if ( Trig_Attacking_Units_Func002Func002Func003C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00Y', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09L')
if ( Trig_Attacking_Units_Func002Func002Func001Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00Y', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09M')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00Y', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09N')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04L', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09O')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04L', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09P')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04L', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09Q')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04R', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09R')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04R', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09S')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04R', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09U')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func003C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I000', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09V')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I000', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09W')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I000', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09X')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04I', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09Y')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04I', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I09Z')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04I', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I0A0')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04J', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I0A1')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002Func004C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04J', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetAttacker(), 'I0A2')
if ( Trig_Attacking_Units_Func002Func002Func001Func002Func002Func002Func002Func002Func002Func002Func001Func001Func002Func002Func002Func002Func002Func002Func002Func003C() ) then
set udg_TempPlayerGroup2 = GetForceOfPlayer(GetOwningPlayer(GetAttacker()))
call DisplayTimedTextToForce( udg_TempPlayerGroup2, 4.00, "TRIGSTR_035" )
call DestroyForce(udg_TempPlayerGroup2)
call UnitRemoveItemSwapped( udg_TempItem, GetAttacker() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04J', GetAttacker() )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] - 1 )
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
endif
// ========== Attacking Units ==========
if ( Trig_Attacking_Units_Func004C() ) then
if ( Trig_Attacking_Units_Func004Func002C() ) then
set udg_Critical_current = ( udg_Crit_power[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + GetRandomInt(1, 10) )
if ( Trig_Attacking_Units_Func004Func002Func002C() ) then
set udg_Critblock_current = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetAttackedUnitBJ()))] + 10 )
else
set udg_Critblock_current = 10
endif
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
if ( Trig_Attacking_Units_Func004Func002Func008C() ) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), GetRandomReal(50.00, 150.00), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
set udg_TextType[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = 3
call ConditionalTriggerExecute( udg_FloatingTextTrigger[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] )
else
endif
else
endif
if ( Trig_Attacking_Units_Func004Func003C() ) then
set udg_A = GetRandomInt(1, 15)
set udg_N = GetRandomInt(1, 15)
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetAttackedUnitBJ())), 4.00, ( "|c0000c400Troll " + ( GetPlayerName(GetOwningPlayer(GetAttacker())) + ( ":|r |c00ffff64Me iz gonna " + ( udg_TauntVerbs[udg_A] + ( udg_TauntAdjectives[udg_N] + ( GetPlayerName(GetOwningPlayer(GetAttackedUnitBJ())) + "!|r" ) ) ) ) ) ) )
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetAttacker())), 4.00, ( "|c0000c400Troll " + ( GetPlayerName(GetOwningPlayer(GetAttacker())) + ( ":|r |c00ffff64Me iz gonna " + ( udg_TauntVerbs[udg_A] + ( udg_TauntAdjectives[udg_N] + ( GetPlayerName(GetOwningPlayer(GetAttackedUnitBJ())) + "!|r" ) ) ) ) ) ) )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001C() ) then
if ( Trig_Attacking_Units_Func004Func001Func003C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0JC', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "drunkenhaze", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
call PlaySoundOnUnitBJ( gg_snd_DragonWhat1, 100, GetAttacker() )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func001C() ) then
call PlaySoundOnUnitBJ( gg_snd_DragonWhat1, 100, GetAttacker() )
call ConditionalTriggerExecute( gg_trg_Wolf_Swallow_JASS )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
set udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + ( GetUnitPointValue(GetTriggerUnit()) / 2 ) )
set udg_Job2 = GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))
call ConditionalTriggerExecute( gg_trg_Trapper_Lvl )
set udg_Loc = GetUnitLoc(GetAttacker())
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func007C() ) then
call PingMinimapLocForForceEx( udg_Team[1], udg_Loc, 2.00, bj_MINIMAPPINGSTYLE_ATTACK, 100, 100, 100 )
call DisplayTextToForce( udg_Team[1], "TRIGSTR_448" )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func007Func001C() ) then
call PingMinimapLocForForceEx( udg_Team[2], udg_Loc, 2.00, bj_MINIMAPPINGSTYLE_ATTACK, 100, 100, 100 )
call DisplayTextToForce( udg_Team[1], "TRIGSTR_448" )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func007Func001Func001C() ) then
call PingMinimapLocForForceEx( udg_Team[3], udg_Loc, 2.00, bj_MINIMAPPINGSTYLE_ATTACK, 100, 100, 100 )
call DisplayTextToForce( udg_Team[1], "TRIGSTR_448" )
else
endif
endif
endif
call RemoveLocation(udg_Loc)
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005C() ) then
call KillUnit( GetAttacker() )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func002C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func002Func001C() ) then
set udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + ( GetUnitPointValue(GetTriggerUnit()) / 2 ) )
else
endif
set udg_Loc = GetUnitLoc(GetAttacker())
call SetUnitPositionLoc( GetAttackedUnitBJ(), udg_Loc )
call UnitAddAbilityBJ( 'S00J', GetAttacker() )
call RemoveLocation(udg_Loc)
set udg_Job2 = GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))
call ConditionalTriggerExecute( gg_trg_Trapper_Lvl )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func003C() ) then
set udg_Loc = GetUnitLoc(GetAttacker())
set udg_Loc2 = PolarProjectionBJ(udg_Loc, GetRandomReal(50.00, 200.00), GetRandomDirectionDeg())
call CreateNUnitsAtLoc( 1, 'ndwm', GetOwningPlayer(GetAttacker()), udg_Loc2, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0KV', GetLastCreatedUnit() )
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func003Func005C() ) then
call SetUnitAbilityLevelSwapped( 'A0KV', GetLastCreatedUnit(), 2 )
else
call SetUnitAbilityLevelSwapped( 'A0KV', GetLastCreatedUnit(), 1 )
endif
call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetAttackedUnitBJ() )
set udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + ( GetUnitPointValue(GetTriggerUnit()) / 2 ) )
set udg_Job2 = GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))
call ConditionalTriggerExecute( gg_trg_Trapper_Lvl )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func001C() ) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), GetRandomReal(10.00, 40.00), ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
set udg_Loc = GetUnitLoc(GetAttacker())
call RemoveLocation(udg_Loc)
set udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + ( GetUnitPointValue(GetTriggerUnit()) / 2 ) )
set udg_Job2 = GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))
call ConditionalTriggerExecute( gg_trg_Trapper_Lvl )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func001C() ) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), GetRandomReal(15.00, 50.00), ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
set udg_Loc = GetUnitLoc(GetAttacker())
call RemoveLocation(udg_Loc)
set udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_Job_Trapper_XP[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + ( GetUnitPointValue(GetTriggerUnit()) / 2 ) )
set udg_Job2 = GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))
call ConditionalTriggerExecute( gg_trg_Trapper_Lvl )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002C() ) then
call IssueTargetOrder( GetAttacker(), "ensnare", GetAttackedUnitBJ() )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func003C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0JC', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "drunkenhaze", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
call PlaySoundOnUnitBJ( gg_snd_LocustSwarmLoop, 50.00, GetAttacker() )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A05H', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "lightningshield", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
call PlaySoundOnUnitBJ( gg_snd_RatWhat1, 50.00, GetAttacker() )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001C() ) then
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func003C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A05H', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "lightningshield", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
call PlaySoundOnUnitBJ( gg_snd_RatWhat1, 50.00, GetAttacker() )
else
endif
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002C() ) then
call UnitUseItemTarget( GetAttacker(), UnitItemInSlotBJ(GetAttacker(), 1), GetAttackedUnitBJ() )
else
if ( Trig_Attacking_Units_Func004Func001Func002Func003Func005Func001Func001Func001Func002Func002Func001Func002Func001Func002Func001C() ) then
call IssueImmediateOrder( GetAttackedUnitBJ(), "berserk" )
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
set udg_Loc2 = PolarProjectionBJ(udg_Loc, GetRandomReal(500.00, 2000.00), GetRandomDirectionDeg())
call IssuePointOrderLocBJ( GetAttackedUnitBJ(), "move", udg_Loc2 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetAttackedUnitBJ()), 0, 0, 6.00, "TRIGSTR_3066" )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
if ( Trig_Attacking_Units_Func005C() ) then
if ( Trig_Attacking_Units_Func005Func004C() ) then
if ( Trig_Attacking_Units_Func005Func004Func001C() ) then
call UnitRemoveAbilityBJ( 'A007', GetTriggerUnit() )
call SetUnitOwner( GetTriggerUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetAttacker()), 0, 0, 6.00, "TRIGSTR_167" )
else
endif
else
endif
if ( Trig_Attacking_Units_Func005Func005C() ) then
call IssueTargetOrderBJ( GetAttackedUnitBJ(), "attack", GetAttacker() )
else
if ( Trig_Attacking_Units_Func005Func005Func001C() ) then
call IssueTargetOrderBJ( GetAttackedUnitBJ(), "attack", GetAttacker() )
else
if ( Trig_Attacking_Units_Func005Func005Func001Func001C() ) then
call IssueTargetOrderBJ( GetAttackedUnitBJ(), "attack", GetAttacker() )
else
if ( Trig_Attacking_Units_Func005Func005Func001Func001Func001C() ) then
call IssueTargetOrderBJ( GetAttackedUnitBJ(), "attack", GetAttacker() )
else
endif
endif
endif
endif
else
endif
if ( Trig_Attacking_Units_Func006C() ) then
set udg_Loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A0K5', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetAttackedUnitBJ() )
call RemoveLocation(udg_Loc)
else
endif
endfunction
//===========================================================================
function InitTrig_Attacking_Units takes nothing returns nothing
set gg_trg_Attacking_Units = CreateTrigger( )
call TriggerAddAction( gg_trg_Attacking_Units, function Trig_Attacking_Units_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function WolfSwallow takes nothing returns nothing
local real x = GetUnitX(GetAttacker())
local real y = GetUnitY(GetAttacker())
local unit dummy
set udg_EatWolf = true
set udg_SwallowedUnit = GetTriggerUnit()
set udg_WolfBoss = GetAttacker()
set udg_WolfTimer = 6
set dummy = CreateUnit( GetOwningPlayer(GetTriggerUnit()), 'n00N', x, y, bj_UNIT_FACING )
call UnitAddAbility( dummy, 'Afae' )
call TriggerSleepAction( 0.10 )
call IssueTargetOrder( dummy, "faeriefire", GetAttacker() )
call SetUnitPosition( GetTriggerUnit(), -1000, -300 )
call ShowUnitHide( udg_SwallowedUnit )
call EnableTrigger( gg_trg_Wolf_Swallow_Damage__JASS)
if ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) then
set udg_Eaten[GetPlayerId(GetOwningPlayer(udg_SwallowedUnit)) + 1] = true
call SelectUnitForPlayerSingle( GetAttacker(), GetOwningPlayer(udg_SwallowedUnit) )
call DisplayTimedTextToPlayer( GetOwningPlayer(udg_SwallowedUnit), 0, 0, 6.00, "TRIGSTR_1117" )
endif
endfunction
//===========================================================================
function InitTrig_Wolf_Swallow_JASS takes nothing returns nothing
set gg_trg_Wolf_Swallow_JASS = CreateTrigger( )
call TriggerAddAction( gg_trg_Wolf_Swallow_JASS, function WolfSwallow )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Wolf_Damage takes nothing returns nothing
local real dmg
if ( udg_EatWolf == true ) then
if ( udg_WolfTimer != 0 ) then
set dmg = ( GetRandomReal(12.00, 16.00) )
set udg_WolfTimer = udg_WolfTimer - 1
if (( GetUnitState( udg_SwallowedUnit, UNIT_STATE_LIFE) <= dmg )) then
call UnitRemoveBuffBJ( 'Bfae', udg_WolfBoss )
set udg_EatWolf = false
if ( IsUnitType(udg_SwallowedUnit, UNIT_TYPE_HERO) == true ) then
set udg_Eaten[GetPlayerId(GetOwningPlayer(udg_SwallowedUnit)) + 1] = false
endif
set udg_Loc = GetUnitLoc(udg_WolfBoss)
call SetUnitPositionLoc( udg_SwallowedUnit, udg_Loc )
call RemoveLocation(udg_Loc)
call ShowUnitShow( udg_SwallowedUnit )
call KillUnit( udg_SwallowedUnit )
else
call SetUnitState( udg_SwallowedUnit, UNIT_STATE_LIFE, ( GetUnitState( udg_SwallowedUnit, UNIT_STATE_LIFE ) - dmg ))
endif
else
call UnitRemoveBuffBJ( 'Bfae', udg_WolfBoss )
set udg_EatWolf = false
if ( IsUnitType(udg_SwallowedUnit, UNIT_TYPE_HERO) == true ) then
set udg_Eaten[GetPlayerId(GetOwningPlayer(udg_SwallowedUnit)) + 1] = false
endif
set udg_Loc = GetUnitLoc(udg_WolfBoss)
call SetUnitPositionLoc( udg_SwallowedUnit, udg_Loc )
call RemoveLocation(udg_Loc)
call ShowUnitShow( udg_SwallowedUnit )
endif
else
call DisableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Wolf_Swallow_Damage__JASS takes nothing returns nothing
set gg_trg_Wolf_Swallow_Damage__JASS = CreateTrigger( )
call DisableTrigger( gg_trg_Wolf_Swallow_Damage__JASS )
call TriggerRegisterTimerEvent( gg_trg_Wolf_Swallow_Damage__JASS, 4.00, true )
call TriggerAddAction( gg_trg_Wolf_Swallow_Damage__JASS, function Wolf_Damage )
endfunction
function Trig_Global_Unit_Die_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SUMMONED) == false ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(udg_TempUnitArray[0], udg_Team[udg_N]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func002C takes nothing returns boolean
if ( ( udg_TempUnitType[0] == 'h01I' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h01K' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h01M' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h01L' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004Func004Func004C takes nothing returns boolean
if ( ( udg_TempUnitType[0] == 'n007' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'nskg' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n017' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01J' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01M' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02B' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n008' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02L' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n002' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02R' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02G' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00O' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00E' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00H' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n001' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n016' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02N' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00C' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n014' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02M' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n004' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01A' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02P' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00D' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00F' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02C' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n009' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02K' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02F' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n003' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02Q' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h02H' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h01O' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'njg1' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'nwen' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'nwlg' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'nwwg' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'ntrg' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004Func004C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004Func004Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004Func005C takes nothing returns boolean
if ( ( udg_TempUnitType[0] == 'h00V' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h011' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01N' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00G' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00S' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004Func005C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_TempUnitType[0] == 'n00S' ) ) then
return false
endif
if ( not ( udg_TempPlayerArray[0] != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func002C takes nothing returns boolean
if ( ( udg_TempUnitType[0] == 'ndwm' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00G' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'nskk' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func003C takes nothing returns boolean
if ( ( IsUnitType(udg_TempUnitArray[0], UNIT_TYPE_HERO) == true ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002Func005C takes nothing returns boolean
if ( not ( udg_TempUnitType[0] == 'H003' ) ) then
return false
endif
if ( not ( udg_TempIntegerArray[1] > 10 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func004Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004Func003C takes nothing returns boolean
if ( ( udg_TempUnitType[0] == 'n00Y' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01R' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01Q' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01P' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01S' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00V' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01H' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01U' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01T' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01I' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00U' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00X' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n015' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002Func004C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func004Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012Func002Func005C takes nothing returns boolean
if ( ( udg_TempUnitType[0] == 'n024' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02T' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n020' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'u000' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01X' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n00I' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01W' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02I' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n022' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n023' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n029' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n021' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n026' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01Z' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n01V' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'n02S' ) ) then
return true
endif
if ( ( udg_TempUnitType[0] == 'h01P' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func012Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func012Func002Func005C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func012C takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'A05G') == false ) ) then
return false
endif
if ( not ( GetPlayerController(udg_TempPlayerArray[0]) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func001C takes nothing returns boolean
if ( not ( udg_ChainsawOn[udg_TempIntegerArray[3]] == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_Hardcore == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func002Func001Func003C takes nothing returns boolean
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_POWERUP ) ) then
return true
endif
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_ARTIFACT ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func014Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func014Func002Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func020Func001C takes nothing returns boolean
if ( not ( udg_Hero_Deaths[udg_TempIntegerArray[3]] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func020C takes nothing returns boolean
if ( not ( udg_Hero_Deaths[udg_TempIntegerArray[3]] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func029C takes nothing returns boolean
if ( not ( GetPlayerController(udg_TempPlayerArray[1]) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014Func030C takes nothing returns boolean
if ( not ( udg_Boat[udg_TempIntegerArray[3]] == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func014C takes nothing returns boolean
if ( not ( IsUnitType(udg_TempUnitArray[1], UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func016Func007Func001C takes nothing returns boolean
if ( not ( udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )] != null ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func016C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n000' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func001Func002Func001Func002C takes nothing returns boolean
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_POWERUP ) ) then
return true
endif
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_ARTIFACT ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func001Func002Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func001Func003C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n026' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01Z' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01X' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'u000' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) <= udg_Job_PuppetMaster_Lvl[udg_TempIntegerArray[3]] ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func001Func001C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n00C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n014' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02M' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func001Func003Func001Func002C takes nothing returns boolean
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_POWERUP ) ) then
return true
endif
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_ARTIFACT ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func001Func003Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func001C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n00Y' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01R' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01Q' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01P' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01S' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00V' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01H' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01U' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n013' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n019' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func003Func001Func002C takes nothing returns boolean
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_POWERUP ) ) then
return true
endif
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_ARTIFACT ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func003Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func004Func003C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n01H' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01U' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n013' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n019' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func004C takes nothing returns boolean
if ( not ( udg_Hawk[udg_TempIntegerArray[3]] == true ) ) then
return false
endif
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func004Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n01K' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01M' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'njg1' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'u001' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001Func003Func001Func002C takes nothing returns boolean
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_POWERUP ) ) then
return true
endif
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_ARTIFACT ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001Func003Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func002Func001Func002C takes nothing returns boolean
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_POWERUP ) ) then
return true
endif
if ( ( GetItemType(UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)) == ITEM_TYPE_ARTIFACT ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func002Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func003Func001Func004C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h01H' ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetDyingUnit()) == 1.00 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func003Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h02L' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func006C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'h016' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h015' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00K' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00Z' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00Y' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00G' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h005' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00H' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02Y' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01K' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01M' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01L' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00L' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h021' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h022' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00O' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02G' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h006' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h024' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h008' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h023' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h013' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01Z' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00J' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func006C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'h00B' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00A' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01X' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00X' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h012' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h011' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00V' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'o000' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n011' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00P' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00Q' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'ndwm' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00N' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00G' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'nskk' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00Z' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n025' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'opeo' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00S' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00R' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n00S' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func003C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n02B' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02D' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02E' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02F' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02G' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02O' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'nwlg' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02L' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'nwwg' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02Q' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02R' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'nwen' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01K' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01M' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'njg1' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02U' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h032' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02V' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h033' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00O' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00H' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'u001' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01O' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002Func003C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'H003' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'H002' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'H000' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'H001' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n002' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02A' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n005' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n003' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n008' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n006' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00E' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n004' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01A' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02P' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00D' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00F' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h019' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00Y' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01R' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01Q' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01P' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01S' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00V' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01H' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01U' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n013' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n019' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02H' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01Q' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002Func004C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n007' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'nskg' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n017' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01B' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01D' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n001' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n016' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02N' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'ntrg' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02K' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n009' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00A' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00B' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n012' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'nska' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01Y' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n018' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n014' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02M' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003Func002C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func003Func003C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n01L' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01E' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n010' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01G' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00M' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h036' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h028' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h029' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02A' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02B' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02D' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01N' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h025' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h026' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00E' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00S' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00U' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01O' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01G' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n027' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018Func003C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func003Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Func018Func004C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'n02T' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n026' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01X' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n021' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n029' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n020' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n02S' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n024' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01Z' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01V' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n01W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n022' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n023' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'u000' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'n00I' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01P' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Unit_Die_Func018C takes nothing returns boolean
if ( not Trig_Global_Unit_Die_Func018Func004C() ) then
return false
endif
return true
endfunction
function Trig_Global_Unit_Die_Actions takes nothing returns nothing
set udg_TempUnitArray[0] = GetKillingUnitBJ()
set udg_TempUnitType[0] = GetUnitTypeId(GetKillingUnitBJ())
set udg_TempIntegerArray[0] = GetUnitPointValueByType(udg_TempUnitType[0])
set udg_TempPlayerArray[0] = GetOwningPlayer(udg_TempUnitArray[0])
set udg_TempIntegerArray[2] = GetConvertedPlayerId(udg_TempPlayerArray[0])
set udg_TempUnitArray[1] = GetTriggerUnit()
set udg_TempUnitType[1] = GetUnitTypeId(GetTriggerUnit())
set udg_TempIntegerArray[1] = GetUnitPointValueByType(udg_TempUnitType[1])
set udg_TempPlayerArray[1] = GetOwningPlayer(udg_TempUnitArray[1])
set udg_TempIntegerArray[3] = GetConvertedPlayerId(udg_TempPlayerArray[1])
// ========== Killing Unit Check and XP ==========
if ( Trig_Global_Unit_Die_Func012C() ) then
// Rotten Beast
if ( Trig_Global_Unit_Die_Func012Func002C() ) then
set udg_Job_PuppetMaster_XP[udg_TempIntegerArray[2]] = ( udg_Job_PuppetMaster_XP[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
call ConditionalTriggerExecute( gg_trg_Puppet_Master_Lvl )
else
// Pets
if ( Trig_Global_Unit_Die_Func012Func002Func004C() ) then
call SetUnitManaBJ( udg_TempUnitArray[0], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_TempUnitArray[0]) + I2R(udg_TempIntegerArray[1]) ) )
else
// Troll
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002C() ) then
call AddHeroXPSwapped( udg_TempIntegerArray[1], udg_TempUnitArray[0], false )
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func005C() ) then
set udg_Job_TacticalMaster_XP[udg_TempIntegerArray[2]] = ( udg_Job_TacticalMaster_XP[udg_TempIntegerArray[2]] + 22 )
call ConditionalTriggerExecute( gg_trg_Tactical_Master_Lvl )
else
endif
else
// Dummy
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func002C() ) then
call AddHeroXPSwapped( udg_TempIntegerArray[1], udg_Hero_Troll[udg_TempIntegerArray[2]], false )
else
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001C() ) then
call AddHeroXPSwapped( udg_TempIntegerArray[1], udg_Hero_Troll[udg_TempIntegerArray[2]], false )
else
// Towers
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005C() ) then
set udg_N = 1
loop
exitwhen udg_N > 3
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func001Func001C() ) then
set udg_Job_Ballistic_Xp[udg_N] = ( udg_Job_Ballistic_Xp[udg_N] + udg_TempIntegerArray[1] )
call ConditionalTriggerExecute( gg_trg_Ballistics_Lvl )
else
endif
set udg_N = udg_N + 1
endloop
else
// Bombs
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004C() ) then
set udg_Job_Bomber_XP[udg_TempIntegerArray[2]] = ( udg_Job_Bomber_XP[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
call ConditionalTriggerExecute( gg_trg_Bomber_Lvl )
else
// Wild Animals
if ( Trig_Global_Unit_Die_Func012Func002Func004Func002Func002Func001Func005Func004Func004C() ) then
set udg_Job_BeastMaster_XP[udg_TempIntegerArray[2]] = ( udg_Job_BeastMaster_XP[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
set udg_Job1 = udg_TempIntegerArray[2]
call ConditionalTriggerExecute( gg_trg_Beast_Master_Lvl )
else
endif
endif
endif
endif
endif
endif
endif
endif
else
endif
// ========== Hero Die Special Action ==========
/*if ( Trig_Global_Unit_Die_Func014C() ) then
if ( Trig_Global_Unit_Die_Func014Func001C() ) then
set udg_ChainsawOn[udg_TempIntegerArray[3]] = false
call UnitRemoveItemSwapped( udg_ChainSawItem[udg_TempIntegerArray[3]], udg_TempUnitArray[1] )
call RemoveItem( udg_ChainSawItem[udg_TempIntegerArray[3]] )
call UnitAddItemByIdSwapped( 'I05S', udg_TempUnitArray[1] )
call SetItemUserData( GetLastCreatedItem(), udg_ChainSawValue[udg_TempIntegerArray[3]] )
else
endif
set udg_N = 1
loop
exitwhen udg_N > 6
if ( Trig_Global_Unit_Die_Func014Func002Func001C() ) then
if ( Trig_Global_Unit_Die_Func014Func002Func001Func001C() ) then
set udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )] = null
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
else
call DisableTrigger( gg_trg_Global_Item_Drop )
set udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )] = UnitItemInSlotBJ(udg_TempUnitArray[1], udg_N)
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
call SetItemVisibleBJ( false, udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )] )
call EnableTrigger( gg_trg_Global_Item_Drop )
endif
else
set udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )] = null
endif
set udg_N = udg_N + 1
endloop
set udg_RightHand[udg_TempIntegerArray[3]] = 0
set udg_LeftHand[udg_TempIntegerArray[3]] = 0
set udg_SpellBook_Owned[udg_TempIntegerArray[3]] = 0
set udg_DollOwned[udg_TempIntegerArray[3]] = 0
set udg_ArmorOwned[udg_TempIntegerArray[3]] = 0
set udg_BootsOwned[udg_TempIntegerArray[3]] = 0
set udg_GauntletsOwned[udg_TempIntegerArray[3]] = 0
set udg_MaskOwned[udg_TempIntegerArray[3]] = 0
set udg_Headpiece_owned[udg_TempIntegerArray[3]] = 0
set udg_Hero_Xp[udg_TempIntegerArray[3]] = GetHeroXP(udg_TempUnitArray[1])
set udg_Hero_Agility[udg_TempIntegerArray[3]] = GetHeroStatBJ(bj_HEROSTAT_AGI, udg_TempUnitArray[1], false)
set udg_Hero_Intelligence[udg_TempIntegerArray[3]] = GetHeroStatBJ(bj_HEROSTAT_INT, udg_TempUnitArray[1], false)
set udg_Hero_Strength[udg_TempIntegerArray[3]] = GetHeroStatBJ(bj_HEROSTAT_STR, udg_TempUnitArray[1], false)
set udg_DiseaseResist[udg_TempIntegerArray[3]] = 50
set udg_run_energy[udg_TempIntegerArray[3]] = 10.00
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateNUnitsAtLoc( 1, 'n000', udg_TempPlayerArray[1], udg_Loc, bj_UNIT_FACING )
if ( Trig_Global_Unit_Die_Func014Func020C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(udg_TempPlayerArray[1]) ) + " troll be dead!|r" ) )
call DisplayTimedTextToPlayer( udg_TempPlayerArray[1], 0, 0, 6.00, "TRIGSTR_2343" )
set udg_Hero_Deaths[udg_TempIntegerArray[3]] = 1
else
if ( Trig_Global_Unit_Die_Func014Func020Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(udg_TempPlayerArray[1]) ) + " troll be dead!|r" ) )
call DisplayTimedTextToPlayer( udg_TempPlayerArray[1], 0, 0, 6.00, "TRIGSTR_1855" )
call SetUnitAbilityLevelSwapped( 'A084', GetLastCreatedUnit(), udg_Hero_Deaths[udg_TempIntegerArray[3]] + 1)
set udg_Hero_Deaths[udg_TempIntegerArray[3]] = ( udg_Hero_Deaths[udg_TempIntegerArray[3]] + 1 )
else
endif
endif
call RemoveLocation(udg_Loc)
set udg_Troll_Spirit[udg_TempIntegerArray[3]] = GetLastCreatedUnit()
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), udg_TempPlayerArray[1] )
set udg_Heat[udg_TempIntegerArray[3]] = 0
call SetPlayerStateBJ( ConvertedPlayer(udg_TempIntegerArray[3]), PLAYER_STATE_RESOURCE_GOLD, 0 )
call SetPlayerStateBJ( ConvertedPlayer(udg_TempIntegerArray[3]), PLAYER_STATE_RESOURCE_LUMBER, 0 )
call UnitRemoveAbilityBJ( 'A0DQ', udg_Score_Memorial[udg_TempIntegerArray[3]] )
call UnitAddAbilityBJ( 'A0DS', udg_Score_Memorial[udg_TempIntegerArray[3]] )
if ( Trig_Global_Unit_Die_Func014Func029C() ) then
call KillUnit( GetLastCreatedUnit() )
else
endif
if ( Trig_Global_Unit_Die_Func014Func030C() ) then
call UnitAddAbilityBJ( 'S004', udg_BoatLoaded[udg_TempIntegerArray[3]] )
else
endif
else
endif
// ========== Troll Soul ==========
if ( Trig_Global_Unit_Die_Func016C() ) then
call DisplayTimedTextToPlayer( udg_TempPlayerArray[1], 0, 0, 6.00, "TRIGSTR_2475" )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( "|c009966ffOld Troll:|r |c00ffff64 " + ( GetPlayerName(udg_TempPlayerArray[1]) + " troll survived for " ) ) + ( I2S(( R2I(GetUnitStateSwap(UNIT_STATE_LIFE, udg_Score_Memorial[udg_TempIntegerArray[3]])) / 500 )) + ( " dayz in the Jungle. He be slayed " + ( I2S(udg_Kill_worthy[udg_TempIntegerArray[3]]) + ( " worthy oponentz and ate " + ( I2S(udg_Eaten_Hearts[udg_TempIntegerArray[3]]) + " epic beast heartz!|r" ) ) ) ) ) ) )
call SetUnitAbilityLevelSwapped( 'A0DS', udg_Score_Memorial[udg_TempIntegerArray[3]], 2 )
call UnitRemoveItemFromSlotSwapped( 1, udg_Troll_Spirit[udg_TempIntegerArray[3]] )
// give back and drop all equiped item hidden when the troll died
set udg_N = 1
loop
exitwhen udg_N > 6
if ( Trig_Global_Unit_Die_Func016Func007Func001C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call SetItemVisibleBJ( true, udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )] )
call SetItemPositionLoc( udg_EquipItem[( ( udg_N * 100 ) + udg_TempIntegerArray[3] )], udg_Loc )
call RemoveLocation(udg_Loc)
else
endif
set udg_N = udg_N + 1
endloop
set udg_Defeat_Loc[udg_TempIntegerArray[3]] = GetUnitLoc(udg_TempUnitArray[1])
set udg_Defeated = ConvertedPlayer(udg_TempIntegerArray[3])
call ConditionalTriggerExecute( gg_trg_Player_Defeat )
else
endif*/
// ========== Corpse Items Drop and Remove ==========
if ( Trig_Global_Unit_Die_Func018C() ) then
if ( Trig_Global_Unit_Die_Func018Func001C() ) then
set udg_A = UnitInventorySizeBJ(udg_TempUnitArray[1])
set udg_N = 1
loop
exitwhen udg_N > udg_A
if ( Trig_Global_Unit_Die_Func018Func001Func002Func001C() ) then
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
else
endif
set udg_N = udg_N + 1
endloop
else
endif
if ( Trig_Global_Unit_Die_Func018Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Reanimation )
else
call ConditionalTriggerExecute( gg_trg_Rotten_Animal_Death )
endif
else
if ( Trig_Global_Unit_Die_Func018Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Boss_and_Environment_Death )
else
if ( Trig_Global_Unit_Die_Func018Func003Func002C() ) then
if ( Trig_Global_Unit_Die_Func018Func003Func002Func001C() ) then
set udg_A = UnitInventorySizeBJ(udg_TempUnitArray[1])
set udg_N = 1
loop
exitwhen udg_N > udg_A
if ( Trig_Global_Unit_Die_Func018Func003Func002Func001Func003Func001C() ) then
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
else
endif
set udg_N = udg_N + 1
endloop
else
endif
call ConditionalTriggerExecute( gg_trg_Water_Animal_Death )
else
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002C() ) then
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func001C() ) then
set udg_A = UnitInventorySizeBJ(udg_TempUnitArray[1])
set udg_N = 1
loop
exitwhen udg_N > udg_A
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func003Func001C() ) then
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
else
endif
set udg_N = udg_N + 1
endloop
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func001Func004C() ) then
call ConditionalTriggerExecute( gg_trg_Hawk_Swoop_die )
else
endif
else
endif
call ConditionalTriggerExecute( gg_trg_Animal_Death )
else
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002C() ) then
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001C() ) then
set udg_A = UnitInventorySizeBJ(udg_TempUnitArray[1])
set udg_N = 1
loop
exitwhen udg_N > udg_A
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func001Func003Func001C() ) then
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
else
endif
set udg_N = udg_N + 1
endloop
else
endif
call ConditionalTriggerExecute( gg_trg_Animal_Death_2 )
else
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002C() ) then
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func003C() ) then
call ConditionalTriggerExecute( gg_trg_ForestFire_Spread_JASS )
else
call ConditionalTriggerExecute( gg_trg_Dummy_Death )
endif
else
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001C() ) then
set udg_A = UnitInventorySizeBJ(udg_TempUnitArray[1])
set udg_N = 1
loop
exitwhen udg_N > udg_A
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func002Func001C() ) then
call UnitRemoveItemFromSlotSwapped( udg_N, udg_TempUnitArray[1] )
else
endif
set udg_N = udg_N + 1
endloop
set udg_Kill_Building[udg_TempIntegerArray[2]] = ( udg_Kill_Building[udg_TempIntegerArray[2]] + 1 )
call ConditionalTriggerExecute( gg_trg_Building_Death )
else
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func003C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_745" )
else
if ( Trig_Global_Unit_Die_Func018Func003Func002Func002Func002Func002Func001Func003Func001C() ) then
set udg_Loc = GetUnitLoc(GetDyingUnit())
call CreateItemLoc( 'I07J', udg_Loc )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Global_Unit_Die takes nothing returns nothing
set gg_trg_Global_Unit_Die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Global_Unit_Die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Global_Unit_Die, Condition( function Trig_Global_Unit_Die_Conditions ) )
call TriggerAddAction( gg_trg_Global_Unit_Die, function Trig_Global_Unit_Die_Actions )
endfunction
scope TrollDie initializer onInit
globals
//Globals used in Troll Death
private constant integer ut_soul = 'n000'
private constant string msg0 = "|c009966ffOld Troll:|r |c00ffff64"
private constant string msg1 = " troll be dead!|r"
private constant string death0 = "|c00ffff64No worriz, me dear troll, Godz luv ya! So in 1 day ya can ask dem to revive ya!|r"
private constant string death1 = "|c00ffff64Troll, y u die again?! Go make someone offer sacrifices to the totem! So you can ask the Godz for revival.|r"
private constant integer revId = 'A084'
private constant integer id_alive = 'A0DQ'
private constant integer id_dead = 'A0DS'
private constant string leave = "|c00ec0000Troll God:|r |c00ffff64ME CAME TO GET YER SOUL!|r"
private constant string msg2 = " troll survived for "
private constant string msg3 = " dayz in the jungle. He be slayed "
private constant string msg4 = " worthy opponentz and ate "
private constant string msg5 = " epic beast heartz!|r "
//GLobals used in Troll Revival
private constant integer Rev_Soul = 'A084'
private constant integer Rev_Totem = 'A008'
private constant integer Rev_Ring = 'A08Z'
private constant string msg6 = "|c009966ffOld Troll:|r |c00ffff64Be happy, mon! Ye Spirit haz been revived!|r"
private constant integer Rev_BACKPACKID = 'BPCK'
endglobals
private function onDeath takes nothing returns boolean
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local integer idp = GetPlayerId(p) + 1
local item chainsaw = null
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real face = GetUnitFacing(u)
local unit u1 = null
local string playername = GetPlayerName(p)
local integer i
local integer days = R2I(GetUnitState(udg_Score_Memorial[idp], UNIT_STATE_LIFE) / 500.)
local integer iloop = 0
local integer itmtype
if (IsUnitType(u, UNIT_TYPE_HERO)) and not (IsUnitIllusion(u)) then
if (udg_ChainsawOn[idp] == true) then //Check if the chainsaw is on. If it is, then turn it off before troll officially dies.
set udg_ChainsawOn[idp] = false
call UnitRemoveItem(u, udg_ChainSawItem[idp])
set chainsaw = UnitAddItemById(u, 'I05S')
call SetItemUserData(chainsaw, udg_ChainSawValue[idp])
endif
set u1 = CreateUnit(p, ut_soul, x, y, face) //Creates soul once died.
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS, 6., msg0 + playername + msg1)
set udg_Hero_Deaths[idp] = udg_Hero_Deaths[idp] + 1
if (udg_Hero_Deaths[idp] == 1) then //If died first time, send the appropraite message
call DisplayTimedTextToPlayer(p, 0, 0, 6., death0)
elseif (udg_Hero_Deaths[idp] > 1) then
if (udg_Hero_Deaths[idp] > 10) then
set i = 10
else
set i = udg_Hero_Deaths[idp]
endif
call DisplayTimedTextToPlayer(p, 0, 0, 6., death1)
call SetUnitAbilityLevel(u1, revId, i) //Set the "Miracle" ability of the soul based on how many the troll's death.
endif
set udg_Troll_Spirit[idp] = u1
set udg_Heat[idp] = 0
call SetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD, 0)
call SetPlayerState(p, PLAYER_STATE_RESOURCE_LUMBER, 0)
call UnitRemoveAbility(udg_Score_Memorial[idp], id_alive) //Change troll status from living to dead in the memorial.
call UnitAddAbility(udg_Score_Memorial[idp], id_dead)
if (GetPlayerController(p) == MAP_CONTROL_COMPUTER) then
call KillUnit(u1)
endif
if (udg_Boat[idp] == true) then //If inside the boat, change the boat to the "building version where it doesn't move."
call UnitAddAbility(udg_BoatLoaded[idp], 'S004')
endif
endif
if (GetUnitTypeId(u) == ut_soul) then //If soul dies, that means the player has left the game.
call DisplayTimedTextToPlayer(p, 0, 0, 6., leave)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS, 10., msg0 + playername + msg2 + I2S(days) + msg3 + I2S(udg_Kill_worthy[idp]) + msg4 + I2S(udg_Eaten_Hearts[idp]) + msg5)
call SetUnitAbilityLevel(udg_Score_Memorial[idp], id_dead, 2)
call UnitRemoveItemFromSlot(udg_Troll_Spirit[idp], 1)
loop //Removes all items from the dead troll and recreating them in the soul's position.
exitwhen (iloop == 6)
set iloop = iloop + 1
set itmtype = GetItemTypeId(UnitItemInSlot(udg_Hero_Troll[idp], iloop))
call CreateItem(itmtype, x, y)
endloop
call RemoveUnit(udg_Hero_Troll[idp])
set udg_Defeat_Loc[idp] = GetUnitLoc(u)
call SetUnitPosition(udg_Score_Memorial[idp], x, y)
call BlzSetUnitName(udg_Score_Memorial[idp], GetPlayerName(p))
call SetUnitInvulnerable(udg_Score_Memorial[idp], true)
call UnitRemoveAbility(udg_Score_Memorial[idp], 'A0E2')
set udg_Defeated = Player(idp)
call ConditionalTriggerExecute( gg_trg_Player_Defeat )
endif
//Cleaning
set u = null
set p = null
set chainsaw = null
set u1 = null
set playername = null
return false
endfunction
private function onCast takes nothing returns boolean
local unit u = GetTriggerUnit()
local unit u1 = GetSpellTargetUnit()
local player p = GetOwningPlayer(u)
local player p1 = GetOwningPlayer(u1)
local integer idp = GetPlayerId(p) + 1
local integer idp1 = GetPlayerId(p1) + 1
local integer team = 0
local real x = 0
local real y = 0
local unit b = null
local effect sfx = null
if (IsPlayerInForce(p, udg_Team[1])) then //Recognize what team the reviving troll belongs to.
set team = 1
elseif (IsPlayerInForce(p, udg_Team[2])) then
set team = 2
elseif (IsPlayerInForce(p, udg_Team[3])) then
set team = 3
endif
set x = GetUnitX(udg_Totem[team]) //Setting team totem's position as revive point.
set y = GetUnitY(udg_Totem[team])
//If troll is revived via totem or reurrection ring...
if ((GetSpellAbilityId() == Rev_Totem) or (GetSpellAbilityId() == Rev_Ring)) and (GetUnitTypeId(u1) == ut_soul) then
call ShowUnit(udg_Hero_Troll[idp1], true) //Shows the hero that was hidden when died "Trigger: Animal Death"
call ReviveHero(udg_Hero_Troll[idp1], x, y, false)
call SetPlayerStateBJ(p1, PLAYER_STATE_RESOURCE_GOLD, 300) //Doesn't meatter since there's a system in this game that limits the food and body heat automatically.
call SetPlayerStateBJ(p1, PLAYER_STATE_RESOURCE_LUMBER, 300)
call RemoveUnit(u1)
set sfx = AddSpellEffectById('AHhb', EFFECT_TYPE_TARGET, GetUnitX(udg_Hero_Troll[idp1]), GetUnitY(udg_Hero_Troll[idp1]))
//Setting up the backpack...
set b = LoadUnitHandle(NEW_GlobalHash, GetHandleId(udg_Hero_Troll[idp1]), StringHash("Backpack_Unit"))
if b != null and GetUnitLifePercent(b) > 0 then
call RemoveUnit(b)
endif
set b = CreateUnit(p1, Rev_BACKPACKID, GetUnitX(udg_Hero_Troll[idp1]), GetUnitY(udg_Hero_Troll[idp1]), 0)
call SaveUnitHandle(NEW_GlobalHash, GetHandleId(udg_Hero_Troll[idp1]), StringHash("Backpack_Unit"), b)
call SaveUnitHandle(NEW_GlobalHash, GetHandleId(b), StringHash("Backpack_Parent"), udg_Hero_Troll[idp1])
call SaveUnitHandle(NEW_GlobalHash, StringHash("Backpack_Heroes"), GetPlayerId(p1), udg_Hero_Troll[idp1])
//Changing the status in the memorial and showing the notification.
call UnitRemoveAbility(udg_Score_Memorial[idp1], id_dead)
call UnitAddAbility(udg_Score_Memorial[idp1], id_alive)
call DisplayTimedTextToPlayer(p1, 0, 0, 6.00, msg6)
//If troll is revived via soul's "Miracle" ability...
elseif (GetSpellAbilityId() == Rev_Soul) then
call ShowUnit(udg_Hero_Troll[idp], true)
call ReviveHero(udg_Hero_Troll[idp], x, y, false)
call SetPlayerStateBJ(p, PLAYER_STATE_RESOURCE_GOLD, 300)
call SetPlayerStateBJ(p, PLAYER_STATE_RESOURCE_LUMBER, 300)
call RemoveUnit(u)
set sfx = AddSpellEffectById('AHhb', EFFECT_TYPE_TARGET, GetUnitX(udg_Hero_Troll[idp]), GetUnitY(udg_Hero_Troll[idp]))
//Setting up the backpack...
set b = LoadUnitHandle(NEW_GlobalHash, GetHandleId(udg_Hero_Troll[idp]), StringHash("Backpack_Unit"))
if b != null and GetUnitLifePercent(b) > 0 then
call RemoveUnit(b)
endif
set b = CreateUnit(p, Rev_BACKPACKID, GetUnitX(udg_Hero_Troll[idp]), GetUnitY(udg_Hero_Troll[idp]), 0)
call SaveUnitHandle(NEW_GlobalHash, GetHandleId(udg_Hero_Troll[idp]), StringHash("Backpack_Unit"), b)
call SaveUnitHandle(NEW_GlobalHash, GetHandleId(b), StringHash("Backpack_Parent"), udg_Hero_Troll[idp])
call SaveUnitHandle(NEW_GlobalHash, StringHash("Backpack_Heroes"), GetPlayerId(p), udg_Hero_Troll[idp])
//Changing the status in the memorial and showing the notification.
call UnitRemoveAbility(udg_Score_Memorial[idp], id_dead)
call UnitAddAbility(udg_Score_Memorial[idp], id_alive)
call DisplayTimedTextToPlayer(p, 0, 0, 6.00, msg6)
endif
//Cleaning
set u = null
set u1 = null
set p = null
set p1 = null
set b = null
call DestroyEffect(sfx)
set sfx = null
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t, Condition(function onDeath))
set t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function onCast))
set t = null
endfunction
endscope
function Trig_Troll_Revive_Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'n000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellTargetUnit()) == 'n000' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Revive_Conditions takes nothing returns boolean
if ( not Trig_Troll_Revive_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func003001 takes nothing returns boolean
return ( udg_Hero_Type[udg_A] == 'H001' )
endfunction
function Trig_Troll_Revive_Func004Func001Func004001 takes nothing returns boolean
return ( udg_Hero_Type[udg_A] == 'H000' )
endfunction
function Trig_Troll_Revive_Func004Func001Func007Func001Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(udg_Hero_Troll[udg_A]), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func007Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(udg_Hero_Troll[udg_A]), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func007C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(udg_Hero_Troll[udg_A]), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func020C takes nothing returns boolean
if ( not ( udg_Heart_Grizzly[udg_A] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func021Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(udg_Hero_Troll[udg_A]) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func021C takes nothing returns boolean
if ( not ( udg_Heart_Snake[udg_A] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func022C takes nothing returns boolean
if ( not ( udg_Heart_Werewolf[udg_A] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001Func026Func001C takes nothing returns boolean
if ( not ( udg_EquipItem[( ( udg_N * 100 ) + udg_A )] != null ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A084' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A008' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08Z' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Revive_Func004Func005001 takes nothing returns boolean
return ( udg_Hero_Type[udg_A] == 'H001' )
endfunction
function Trig_Troll_Revive_Func004Func006001 takes nothing returns boolean
return ( udg_Hero_Type[udg_A] == 'H000' )
endfunction
function Trig_Troll_Revive_Func004Func011Func001Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(udg_Hero_Troll[udg_A]), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func011Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(udg_Hero_Troll[udg_A]), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func011C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(udg_Hero_Troll[udg_A]), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func024C takes nothing returns boolean
if ( not ( udg_Heart_Grizzly[udg_A] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func025Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(udg_Hero_Troll[udg_A]) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func025C takes nothing returns boolean
if ( not ( udg_Heart_Snake[udg_A] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004Func026C takes nothing returns boolean
if ( not ( udg_Heart_Werewolf[udg_A] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Func004C takes nothing returns boolean
if ( not Trig_Troll_Revive_Func004Func004C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Revive_Actions takes nothing returns nothing
local unit u
local integer id
if ( Trig_Troll_Revive_Func004C() ) then
set udg_A = GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))
call UnitRemoveItemFromSlotSwapped( 1, udg_Troll_Spirit[udg_A] )
if ( Trig_Troll_Revive_Func004Func005001() ) then
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_GOLD, 250 )
else
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_GOLD, 200 )
endif
if ( Trig_Troll_Revive_Func004Func006001() ) then
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER, 125 )
else
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER, 100 )
endif
call ReplaceUnitBJ( udg_Troll_Spirit[udg_A], udg_Hero_Type[udg_A], bj_UNIT_STATE_METHOD_MAXIMUM )
set udg_Hero_Troll[udg_A] = GetLastReplacedUnitBJ()
set u = udg_Hero_Troll[udg_A]
set id = 1+GetPlayerId(GetOwningPlayer(GetSpellTargetUnit()))
if ( Trig_Troll_Revive_Func004Func011C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[1])
else
if ( Trig_Troll_Revive_Func004Func011Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[2])
else
if ( Trig_Troll_Revive_Func004Func011Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[3])
else
set udg_Loc = GetUnitLoc(udg_Hero_Troll[udg_A])
endif
endif
endif
call SetUnitPositionLoc( udg_Hero_Troll[udg_A], udg_Loc )
call AddSpellEffectByIdLoc( 'AHhb', EFFECT_TYPE_TARGET, udg_Loc )
set udg_Revive[udg_A] = GetLastCreatedEffectBJ()
call RemoveLocation(udg_Loc)
call AddHeroXPSwapped( udg_Hero_Xp[udg_A], udg_Hero_Troll[udg_A], false )
call SetHeroStr( udg_Hero_Troll[udg_A], udg_Hero_Strength[udg_A], true )
call SetHeroInt( udg_Hero_Troll[udg_A], udg_Hero_Intelligence[udg_A], true )
call SetHeroAgi( udg_Hero_Troll[udg_A], udg_Hero_Agility[udg_A], true )
call SetUnitAbilityLevelSwapped( 'ACba', udg_Hero_Troll[udg_A], udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', udg_Hero_Troll[udg_A], udg_GameDiff )
call SelectUnitForPlayerSingle( udg_Hero_Troll[udg_A], ConvertedPlayer(udg_A) )
call IssueImmediateOrder( udg_Hero_Troll[udg_A], "replenishon" )
if ( Trig_Troll_Revive_Func004Func024C() ) then
set udg_Heat[udg_A] = ( udg_Heat[udg_A] + 10 )
else
endif
if ( Trig_Troll_Revive_Func004Func025C() ) then
set udg_Crit_block[udg_A] = ( udg_Crit_block[udg_A] + 1 )
if ( Trig_Troll_Revive_Func004Func025Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A07Z', udg_Hero_Troll[udg_A], 2 )
else
call SetUnitAbilityLevelSwapped( 'Arpb', udg_Hero_Troll[udg_A], 2 )
endif
else
endif
if ( Trig_Troll_Revive_Func004Func026C() ) then
set udg_Crit_power[udg_A] = ( udg_Crit_power[udg_A] + 1 )
else
endif
call DisplayTimedTextToPlayer( ConvertedPlayer(udg_A), 0, 0, 6.00, "TRIGSTR_1453" )
call UnitRemoveAbilityBJ( 'A0DS', udg_Score_Memorial[udg_A] )
call UnitAddAbilityBJ( 'A0DQ', udg_Score_Memorial[udg_A] )
set id = 1+GetPlayerId(GetOwningPlayer(GetSpellTargetUnit()))
set udg_N = 1
loop
exitwhen udg_N > 6
call DisableTrigger( gg_trg_Global_Item_Drop )
call SetItemVisibleBJ( true, udg_EquipItem[( ( udg_N * 100 ) + udg_A )] )
call UnitAddItemSwapped( udg_EquipItem[( ( udg_N * 100 ) + udg_A )], udg_Hero_Troll[udg_A] )
call EnableTrigger( gg_trg_Global_Item_Drop )
set udg_N = udg_N + 1
endloop
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_Revive[udg_A] )
else
if ( Trig_Troll_Revive_Func004Func001C() ) then
set udg_A = GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))
call UnitRemoveItemFromSlotSwapped( 1, udg_Troll_Spirit[udg_A] )
if ( Trig_Troll_Revive_Func004Func001Func003001() ) then
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_GOLD, 250 )
else
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_GOLD, 200 )
endif
if ( Trig_Troll_Revive_Func004Func001Func004001() ) then
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER, 125 )
else
call SetPlayerStateBJ( ConvertedPlayer(udg_A), PLAYER_STATE_RESOURCE_LUMBER, 100 )
endif
call ReplaceUnitBJ( udg_Troll_Spirit[udg_A], udg_Hero_Type[udg_A], bj_UNIT_STATE_METHOD_MAXIMUM )
set udg_Hero_Troll[udg_A] = GetLastReplacedUnitBJ()
if ( Trig_Troll_Revive_Func004Func001Func007C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[1])
else
if ( Trig_Troll_Revive_Func004Func001Func007Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[2])
else
if ( Trig_Troll_Revive_Func004Func001Func007Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_Totem[3])
else
set udg_Loc = GetUnitLoc(udg_Hero_Troll[udg_A])
endif
endif
endif
call SetUnitPositionLoc( udg_Hero_Troll[udg_A], udg_Loc )
call AddSpellEffectByIdLoc( 'AHhb', EFFECT_TYPE_TARGET, udg_Loc )
set udg_Revive[udg_A] = GetLastCreatedEffectBJ()
call RemoveLocation(udg_Loc)
call AddHeroXPSwapped( udg_Hero_Xp[udg_A], udg_Hero_Troll[udg_A], false )
call SetHeroStr( udg_Hero_Troll[udg_A], udg_Hero_Strength[udg_A], true )
call SetHeroInt( udg_Hero_Troll[udg_A], udg_Hero_Intelligence[udg_A], true )
call SetHeroAgi( udg_Hero_Troll[udg_A], udg_Hero_Agility[udg_A], true )
call SetUnitAbilityLevelSwapped( 'ACba', udg_Hero_Troll[udg_A], udg_GameDiff )
call SetUnitAbilityLevelSwapped( 'ACnr', udg_Hero_Troll[udg_A], udg_GameDiff )
call SelectUnitForPlayerSingle( udg_Hero_Troll[udg_A], ConvertedPlayer(udg_A) )
call IssueImmediateOrder( udg_Hero_Troll[udg_A], "replenishon" )
if ( Trig_Troll_Revive_Func004Func001Func020C() ) then
set udg_Heat[udg_A] = ( udg_Heat[udg_A] + 10 )
else
endif
if ( Trig_Troll_Revive_Func004Func001Func021C() ) then
set udg_Crit_block[udg_A] = ( udg_Crit_block[udg_A] + 1 )
if ( Trig_Troll_Revive_Func004Func001Func021Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A07Z', udg_Hero_Troll[udg_A], 2 )
else
call SetUnitAbilityLevelSwapped( 'Arpb', udg_Hero_Troll[udg_A], 2 )
endif
else
endif
if ( Trig_Troll_Revive_Func004Func001Func022C() ) then
set udg_Crit_power[udg_A] = ( udg_Crit_power[udg_A] + 1 )
else
endif
call DisplayTimedTextToPlayer( ConvertedPlayer(udg_A), 0, 0, 6.00, "TRIGSTR_1453" )
call UnitRemoveAbilityBJ( 'A0DS', udg_Score_Memorial[udg_A] )
call UnitAddAbilityBJ( 'A0DQ', udg_Score_Memorial[udg_A] )
set udg_N = 1
loop
exitwhen udg_N > 6
if ( Trig_Troll_Revive_Func004Func001Func026Func001C() ) then
call DisableTrigger( gg_trg_Global_Item_Drop )
call SetItemVisibleBJ( true, udg_EquipItem[( ( udg_N * 100 ) + udg_A )] )
call UnitAddItemSwapped( udg_EquipItem[( ( udg_N * 100 ) + udg_A )], udg_Hero_Troll[udg_A] )
call EnableTrigger( gg_trg_Global_Item_Drop )
else
endif
set udg_N = udg_N + 1
endloop
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_Revive[udg_A] )
else
endif
endif
endfunction
//===========================================================================
function InitTrig_Troll_Revive takes nothing returns nothing
set gg_trg_Troll_Revive = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Troll_Revive, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Troll_Revive, Condition( function Trig_Troll_Revive_Conditions ) )
call TriggerAddAction( gg_trg_Troll_Revive, function Trig_Troll_Revive_Actions )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func004001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func005001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), bj_FORCE_PLAYER[PLAYER_NEUTRAL_AGGRESSIVE]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n027' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func005001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func009001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), bj_FORCE_PLAYER[PLAYER_NEUTRAL_AGGRESSIVE]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n01G' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func005001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func009001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), bj_FORCE_PLAYER[PLAYER_NEUTRAL_AGGRESSIVE]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n01O' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func005C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func008C takes nothing returns boolean
if ( not ( udg_TempPlayerArray[1] == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h00U' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func005C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func008C takes nothing returns boolean
if ( not ( udg_TempPlayerArray[1] == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h00T' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func005C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func008C takes nothing returns boolean
if ( not ( udg_TempPlayerArray[1] == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h00S' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func007C takes nothing returns boolean
if ( not ( udg_TempPlayerArray[1] == Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h00E' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func006C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'h028' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h029' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02A' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02B' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02C' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h02D' ) ) then
return true
endif
return false
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006C takes nothing returns boolean
if ( not Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func006C() ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func007C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'h00W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01J' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01N' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h01W' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h025' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h026' ) ) then
return true
endif
return false
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005C takes nothing returns boolean
if ( not Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func007C() ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h036' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func005C takes nothing returns boolean
if ( ( udg_TempUnitType[1] == 'h02O' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00M' ) ) then
return true
endif
if ( ( udg_TempUnitType[1] == 'h00R' ) ) then
return true
endif
return false
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003C takes nothing returns boolean
if ( not Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func005C() ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h01G' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'hMEP' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'h02F' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func016001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func017001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func018001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func019001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func007C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n010' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func015001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func016001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func017001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007Func018001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func007C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n01C' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func015001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func016001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func017001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007Func018001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func007C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n01E' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Func002Func013001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[1]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func014001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[2]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func015001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[3]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002Func016001 takes nothing returns boolean
return ( IsUnitInForce(GetKillingUnitBJ(), udg_Team[4]) == true )
endfunction
function Trig_Boss_and_Environment_Death_Func002C takes nothing returns boolean
if ( not ( udg_TempUnitType[1] == 'n01L' ) ) then
return false
endif
return true
endfunction
function Trig_Boss_and_Environment_Death_Actions takes nothing returns nothing
// Giant Vulture
if ( Trig_Boss_and_Environment_Death_Func002C() ) then
set udg_Kill_BossGiantVulture[udg_TempIntegerArray[2]] = ( udg_Kill_BossGiantVulture[udg_TempIntegerArray[2]] + 1 )
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
call SetUnitManaBJ( gg_unit_h00F_0043, ( GetUnitStateSwap(UNIT_STATE_MANA, gg_unit_h00F_0043) + 1 ) )
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I003', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 4 )
call CreateItemLoc( 'I0B1', udg_Loc )
call CreateItemLoc( 'I054', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 3 )
call CreateItemLoc( 'I018', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func013001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3603" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func014001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3870" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func015001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3957" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func016001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_4125" )
else
call DoNothing( )
endif
call RemoveLocation(udg_Loc)
call TriggerSleepAction( 0.50 )
call RemoveUnit( GetDyingUnit() )
else
// Big Bad Wolf
if ( Trig_Boss_and_Environment_Death_Func002Func007C() ) then
set udg_Kill_BossWolf[udg_TempIntegerArray[2]] = ( udg_Kill_BossWolf[udg_TempIntegerArray[2]] + 1 )
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
call SetUnitManaBJ( gg_unit_h00F_0043, ( GetUnitStateSwap(UNIT_STATE_MANA, gg_unit_h00F_0043) + 1 ) )
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I003', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 6 )
call CreateItemLoc( 'I0B2', udg_Loc )
call CreateItemLoc( 'I004', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 3 )
call CreateItemLoc( 'I054', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 3 )
call CreateItemLoc( 'I03T', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func015001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_4378" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func016001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_4733" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func017001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_4761" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func018001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_4896" )
else
call DoNothing( )
endif
call RemoveLocation(udg_Loc)
call TriggerSleepAction( 0.50 )
call RemoveUnit( GetDyingUnit() )
else
// Grizzly
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007C() ) then
set udg_Kill_BossGrizzli[udg_TempIntegerArray[2]] = ( udg_Kill_BossGrizzli[udg_TempIntegerArray[2]] + 1 )
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
call SetUnitManaBJ( gg_unit_h00F_0043, ( GetUnitStateSwap(UNIT_STATE_MANA, gg_unit_h00F_0043) + 1 ) )
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I003', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 10 )
call CreateItemLoc( 'I09F', udg_Loc )
call CreateItemLoc( 'I004', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 5 )
call CreateItemLoc( 'I054', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 3 )
call CreateItemLoc( 'I03S', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func015001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5120" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func016001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5279" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func017001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5361" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func018001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5374" )
else
call DoNothing( )
endif
call RemoveLocation(udg_Loc)
call TriggerSleepAction( 0.50 )
call RemoveUnit( GetDyingUnit() )
else
// Comodo Dragon
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007C() ) then
set udg_Kill_BossComodo[udg_TempIntegerArray[2]] = ( udg_Kill_BossComodo[udg_TempIntegerArray[2]] + 1 )
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
call SetUnitManaBJ( gg_unit_h00F_0043, ( GetUnitStateSwap(UNIT_STATE_MANA, gg_unit_h00F_0043) + 1 ) )
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I003', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 8 )
call CreateItemLoc( 'I004', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 8 )
call CreateItemLoc( 'I0B0', udg_Loc )
call CreateItemLoc( 'I054', udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 3 )
call CreateItemLoc( 'I02H', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func016001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5450" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func017001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5511" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func018001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5604" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func019001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_5580" )
else
call DoNothing( )
endif
call RemoveLocation(udg_Loc)
call TriggerSleepAction( 0.50 )
call RemoveUnit( GetDyingUnit() )
else
// Mosquitoes
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005C() ) then
set udg_Kill_Mosquito[udg_TempIntegerArray[2]] = ( udg_Kill_Mosquito[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
else
// Carnivorous Plants
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I012', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func003C() ) then
call CreateItemLoc( 'I0B4', udg_Loc )
else
endif
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
else
// Tree
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateDestructableLoc( 'ZTtw', udg_Loc, 90.00, 1.00, GetRandomInt(1, 10) )
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
else
// Berry Tree
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I012', udg_Loc )
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
else
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002C() ) then
call RemoveUnit( udg_BeeSwarm[GetUnitUserData(GetDyingUnit())] )
call RemoveUnit( GetDyingUnit() )
else
// Stone Mine
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005C() ) then
set udg_TempUnit = GetDyingUnit()
set udg_TempPickedUnit = GetKillingUnitBJ()
call ConditionalTriggerExecute( gg_trg_Mining_Resource )
call RemoveUnit( GetDyingUnit() )
else
// Flint Mine
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006C() ) then
set udg_TempUnit = GetDyingUnit()
set udg_TempPickedUnit = GetKillingUnitBJ()
call ConditionalTriggerExecute( gg_trg_Mining_Resource )
call RemoveUnit( GetDyingUnit() )
else
// Aria Sprout
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I012', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func004C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I07O', udg_Loc )
else
endif
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func007C() ) then
set udg_count_Plants = ( udg_count_Plants - 1 )
else
endif
else
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I012', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func005C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I07P', udg_Loc )
else
endif
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func008C() ) then
set udg_count_Plants = ( udg_count_Plants - 1 )
else
endif
else
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I012', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func005C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I07Q', udg_Loc )
else
endif
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func008C() ) then
set udg_count_Plants = ( udg_count_Plants - 1 )
else
endif
else
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I012', udg_Loc )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func005C() ) then
set udg_Loc = GetUnitLoc(udg_TempUnitArray[1])
call CreateItemLoc( 'I07R', udg_Loc )
else
endif
call RemoveLocation(udg_Loc)
call RemoveUnit( GetDyingUnit() )
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func008C() ) then
set udg_count_Plants = ( udg_count_Plants - 1 )
else
endif
else
// Guardian Beast
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001C() ) then
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
set udg_Beast_owned[1] = false
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func005001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Bloodspear Tribe be slayed the Bloodspear's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func006001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Goldtooth Tribe be slayed the Bloodspear's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func007001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Stoneskin Tribe be slayed the Bloodspear's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func008001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64An Exile be slayed the Bloodspear's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func009001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Jungle be taken the Bloodspear's Totem Guardian!|r" )
else
call DoNothing( )
endif
call UnitRemoveAbilityBJ( 'Avul', udg_Totem[1] )
call RemoveUnit( GetDyingUnit() )
else
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001C() ) then
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
set udg_Beast_owned[2] = false
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func005001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Bloodspear Tribe be slayed the Goldtooth's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func006001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Goldtooth Tribe be slayed the Goldtooth's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func007001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Stoneskin Tribe be slayed the Goldtooth's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func008001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64An Exile be slayed the Goldtooth's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func009001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Jungle be taken the Goldtooth's Totem Guardian!|r" )
else
call DoNothing( )
endif
call UnitRemoveAbilityBJ( 'Avul', udg_Totem[2] )
call RemoveUnit( GetDyingUnit() )
else
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001C() ) then
set udg_Kill_worthy[udg_TempIntegerArray[2]] = ( udg_Kill_worthy[udg_TempIntegerArray[2]] + 1 )
set udg_Points[udg_TempIntegerArray[2]] = ( udg_Points[udg_TempIntegerArray[2]] + udg_TempIntegerArray[1] )
set udg_Beast_owned[3] = false
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func004001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Bloodspear Tribe be slayed the Stoneskin's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func005001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Goldtooth Tribe be slayed the Stoneskin's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Stoneskin Tribe be slayed the Stoneskin's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64An Exile be slayed the Stoneskin's Totem Guardian!|r" )
else
call DoNothing( )
endif
if ( Trig_Boss_and_Environment_Death_Func002Func007Func007Func007Func005Func004Func008Func003Func002Func005Func006Func005Func003Func003Func003Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "|c009966ffOld Troll:|r |c00ffff64The Jungle be taken the Stoneskin's Totem Guardian!|r" )
else
call DoNothing( )
endif
call UnitRemoveAbilityBJ( 'Avul', udg_Totem[3] )
call RemoveUnit( GetDyingUnit() )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Boss_and_Environment_Death takes nothing returns nothing
set gg_trg_Boss_and_Environment_Death = CreateTrigger( )
call TriggerAddAction( gg_trg_Boss_and_Environment_Death, function Trig_Boss_and_Environment_Death_Actions )
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func006Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 8) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func006Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 9) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func006C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03R' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I05Z' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I09E' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03P' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func005C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I09A' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I09J' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'sorf' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'gmfr' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'bzbf' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'bzbe' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I069' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Eat_Func002Func002Func002Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Eat_Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Troll_Eat_Func002Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func002C takes nothing returns boolean
if ( not Trig_Troll_Eat_Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func003C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I069' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Eat_Func002Func004Func001Func002Func004Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func001Func002Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func001Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I069' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func001Func006C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) > udg_TempReal ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) <= 4 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func002Func001Func006C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) > udg_TempReal ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) <= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 20) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I069' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func001Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) > udg_TempReal ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) > udg_TempReal ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func002Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 20) <= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002Func002C takes nothing returns boolean
if ( not ( GetRandomInt(1, 20) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I069' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002Func004C takes nothing returns boolean
if ( not ( udg_Heart_Werewolf[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Func002C takes nothing returns boolean
if ( not Trig_Troll_Eat_Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_Actions takes nothing returns nothing
local effect udg_LocalEffect
if ( Trig_Troll_Eat_Func002C() ) then
if ( Trig_Troll_Eat_Func002Func002C() ) then
call AdjustPlayerStateBJ( 50, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
if ( Trig_Troll_Eat_Func002Func002Func002C() ) then
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
endif
endif
if ( Trig_Troll_Eat_Func002Func004C() ) then
if ( Trig_Troll_Eat_Func002Func004Func001C() ) then
set udg_Eaten_TrollMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_TrollMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4308" )
else
if ( Trig_Troll_Eat_Func002Func004Func001Func002C() ) then
set udg_Eaten_RawMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_RawMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4388" )
else
if ( Trig_Troll_Eat_Func002Func004Func001Func002Func004C() ) then
set udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4389" )
else
if ( Trig_Troll_Eat_Func002Func004Func001Func002Func004Func004C() ) then
set udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4393" )
else
endif
endif
endif
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func002C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func002C() ) then
set udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) - GetRandomInt(50, 150) ) )
call PlaySoundOnUnitBJ( gg_snd_Vomit, 35.00, GetTriggerUnit() )
call PauseUnitBJ( true, GetTriggerUnit() )
call SetUnitAnimation( GetTriggerUnit(), "Death" )
set udg_TempReal = GetUnitFacing(GetTriggerUnit())
set udg_Loc2 = GetUnitLoc(GetTriggerUnit())
set udg_Loc = PolarProjectionBJ(udg_Loc2, 75.00, udg_TempReal)
call AddSpecialEffectLocBJ( udg_Loc, "Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl" )
set udg_LocalEffect = GetLastCreatedEffectBJ()
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4331" )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_LocalEffect )
call PauseUnitBJ( false, GetTriggerUnit() )
else
set udg_Eaten_TrollMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_TrollMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4308" )
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func001C() ) then
set udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) - GetRandomInt(50, 150) ) )
call PlaySoundOnUnitBJ( gg_snd_Vomit, 35.00, GetTriggerUnit() )
call PauseUnitBJ( true, GetTriggerUnit() )
call SetUnitAnimation( GetTriggerUnit(), "Death" )
set udg_TempReal = GetUnitFacing(GetTriggerUnit())
set udg_Loc2 = GetUnitLoc(GetTriggerUnit())
set udg_Loc = PolarProjectionBJ(udg_Loc2, 75.00, udg_TempReal)
call AddSpecialEffectLocBJ( udg_Loc, "Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl" )
set udg_LocalEffect = GetLastCreatedEffectBJ()
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4331" )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_LocalEffect )
call PauseUnitBJ( false, GetTriggerUnit() )
else
set udg_Eaten_RawMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_RawMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4396" )
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func001C() ) then
set udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call PlaySoundOnUnitBJ( gg_snd_CrackTeeth, 35.00, GetTriggerUnit() )
set udg_TempReal = GetRandomReal(10.00, 30.00)
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func001Func004C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - udg_TempReal ) )
else
call KillUnit( GetTriggerUnit() )
set udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4403" )
else
set udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4389" )
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func002C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func002Func001C() ) then
set udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call PlaySoundOnUnitBJ( gg_snd_CrackTeeth, 35.00, GetTriggerUnit() )
set udg_TempReal = GetRandomReal(10.00, 50.00)
if ( Trig_Troll_Eat_Func002Func004Func002Func002Func001Func003Func002Func001Func004C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - udg_TempReal ) )
else
call KillUnit( GetTriggerUnit() )
set udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4512" )
else
set udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4393" )
endif
else
endif
endif
endif
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func001C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func002C() ) then
set udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) - GetRandomInt(50, 150) ) )
call PlaySoundOnUnitBJ( gg_snd_Vomit, 35.00, GetTriggerUnit() )
call PauseUnitBJ( true, GetTriggerUnit() )
call SetUnitAnimation( GetTriggerUnit(), "Death" )
set udg_TempReal = GetUnitFacing(GetTriggerUnit())
set udg_Loc2 = GetUnitLoc(GetTriggerUnit())
set udg_Loc = PolarProjectionBJ(udg_Loc2, 75.00, udg_TempReal)
call AddSpecialEffectLocBJ( udg_Loc, "Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl" )
set udg_LocalEffect = GetLastCreatedEffectBJ()
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4331" )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_LocalEffect )
call PauseUnitBJ( false, GetTriggerUnit() )
else
set udg_Eaten_TrollMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_TrollMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4309" )
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func001C() ) then
set udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Vomit[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) - GetRandomInt(50, 150) ) )
call PlaySoundOnUnitBJ( gg_snd_Vomit, 35.00, GetTriggerUnit() )
call PauseUnitBJ( true, GetTriggerUnit() )
call SetUnitAnimation( GetTriggerUnit(), "Death" )
set udg_TempReal = GetUnitFacing(GetTriggerUnit())
set udg_Loc2 = GetUnitLoc(GetTriggerUnit())
set udg_Loc = PolarProjectionBJ(udg_Loc2, 75.00, udg_TempReal)
call AddSpecialEffectLocBJ( udg_Loc, "Objects\\Spawnmodels\\Naga\\NagaBlood\\NagaBloodWindserpent.mdl" )
set udg_LocalEffect = GetLastCreatedEffectBJ()
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4331" )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_LocalEffect )
call PauseUnitBJ( false, GetTriggerUnit() )
else
set udg_Eaten_RawMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_RawMeat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4399" )
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func001C() ) then
set udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call PlaySoundOnUnitBJ( gg_snd_CrackTeeth, 35.00, GetTriggerUnit() )
set udg_TempReal = GetRandomReal(10.00, 30.00)
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func001Func006C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - udg_TempReal ) )
else
call KillUnit( GetTriggerUnit() )
set udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4489" )
else
set udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4389" )
endif
else
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func002C() ) then
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func002Func001C() ) then
set udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_CrackedTeeth[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call PlaySoundOnUnitBJ( gg_snd_CrackTeeth, 35.00, GetTriggerUnit() )
set udg_TempReal = GetRandomReal(10.00, 50.00)
if ( Trig_Troll_Eat_Func002Func004Func002Func001Func001Func003Func002Func001Func006C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - udg_TempReal ) )
else
call KillUnit( GetTriggerUnit() )
set udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Die_Self[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4526" )
else
set udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_BoneFishbone[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4393" )
endif
else
endif
endif
endif
endif
endif
endif
else
if ( Trig_Troll_Eat_Func002Func001C() ) then
set udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 40, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3415" )
else
if ( Trig_Troll_Eat_Func002Func001Func002C() ) then
set udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3414" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 40, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 20, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3398" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001C() ) then
set udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3893" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001C() ) then
set udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3415" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002C() ) then
set udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 50, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3414" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3398" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002C() ) then
set udg_Eaten_Honey[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Honey[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 15, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func005C() ) then
call UnitRemoveBuffBJ( 'Brej', GetTriggerUnit() )
else
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4540" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4539" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4539" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005C() ) then
set udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_StewCooked[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 50, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_3893" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002C() ) then
set udg_Eaten_OldTrollCake[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_OldTrollCake[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func006C() ) then
call ModifyHeroStat( bj_HEROSTAT_STR, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 2 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4535" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func006Func001C() ) then
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 2 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4535" )
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func006Func001Func001C() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 2 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4535" )
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4533" )
endif
endif
endif
else
if ( Trig_Troll_Eat_Func002Func001Func002Func002Func001Func001Func002Func002Func002Func002Func001Func005Func002Func002C() ) then
set udg_Eaten_Berry[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Berry[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4530" )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Troll_Eat takes nothing returns nothing
set gg_trg_Troll_Eat = CreateTrigger( )
call TriggerAddAction( gg_trg_Troll_Eat, function Trig_Troll_Eat_Actions )
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'skrt' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I054' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04X' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I042' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func003A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func005A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func007A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func009A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func011A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func013A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForceEx( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), udg_Loc, 10.00, bj_MINIMAPPINGSTYLE_SIMPLE, 50.00, 50.00, 100 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func003A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( udg_Team[GetForLoopIndexA()], udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func005A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( udg_Team[GetForLoopIndexA()], udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func007A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( udg_Team[GetForLoopIndexA()], udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func009A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( udg_Team[GetForLoopIndexA()], udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func011A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForce( udg_Team[GetForLoopIndexA()], udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func013A takes nothing returns nothing
set udg_Loc = GetUnitLoc(GetEnumUnit())
call PingMinimapLocForForceEx( udg_Team[GetForLoopIndexA()], udg_Loc, 10.00, bj_MINIMAPPINGSTYLE_SIMPLE, 50.00, 50.00, 100 )
call RemoveLocation(udg_Loc)
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[4]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I09D' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_Heart_Werewolf[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03T' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_Heart_Grizzly[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03S' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func002C takes nothing returns boolean
if ( not ( udg_Heart_Vulture[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I018' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func002Func007C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( udg_Heart_Snake[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02H' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func008C takes nothing returns boolean
if ( ( RectContainsUnit(gg_rct_Hot_Spring_south_2, GetTriggerUnit()) == true ) ) then
return true
endif
if ( ( RectContainsUnit(gg_rct_Hot_Spring_north_2, GetTriggerUnit()) == true ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02Q' ) ) then
return false
endif
if ( not Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func008C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I047' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I022' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) > 25.00 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02M' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01W' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01A' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func005C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01A' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func006C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func007C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func008C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func005C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01A' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01B' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001C takes nothing returns boolean
if ( not Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func005C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I043' ) ) then
return false
endif
if ( not ( udg_PactWithTheDevil[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I043' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I06H' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I0AK' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I08Z' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I03Q' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eat_2_Actions takes nothing returns nothing
if ( Trig_Troll_Eat_2_Func001C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4539" )
else
if ( Trig_Troll_Eat_2_Func001Func002C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4539" )
else
if ( Trig_Troll_Eat_2_Func001Func002Func002C() ) then
set udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_EggOmelette[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4539" )
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002C() ) then
set udg_Eaten_SkullHeads[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_SkullHeads[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 3 )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 3 )
call ModifyHeroStat( bj_HEROSTAT_INT, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 3 )
call SetUnitManaBJ( udg_Warrior_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Warrior_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call SetUnitManaBJ( udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call SetUnitManaBJ( udg_Inventor_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Inventor_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call SetUnitManaBJ( udg_Shaman_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Shaman_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4550" )
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002C() ) then
set udg_Eaten_SkullHeads[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_SkullHeads[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 3 )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 3 )
call ModifyHeroStat( bj_HEROSTAT_INT, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], bj_MODIFYMETHOD_ADD, 3 )
call SetUnitManaBJ( udg_Warrior_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Warrior_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call SetUnitManaBJ( udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hunter_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call SetUnitManaBJ( udg_Inventor_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Inventor_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call SetUnitManaBJ( udg_Shaman_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Shaman_Crafting[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]) + 10.00 ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_4549" )
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func002C() ) then
call RemoveItem( GetManipulatedItem() )
set udg_PactWithTheDevil[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
set udg_MB_Soul[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = "|cffFF8040yes|r"
call ConditionalTriggerExecute( gg_trg_Update_MultiBoard )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_4548" )
else
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001C() ) then
set udg_Eaten_Plants[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Plants[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func005C() ) then
call AdjustPlayerStateBJ( 60, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
endif
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func006C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 30.00 ) )
else
endif
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func007C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + 30.00 ) )
else
endif
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func008C() ) then
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
else
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func001C() ) then
call AdjustPlayerStateBJ( 30, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
endif
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func002C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 15.00 ) )
else
endif
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func003C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + 15.00 ) )
else
endif
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func004Func004C() ) then
call AdjustPlayerStateBJ( 15, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
else
endif
endif
else
// Strong Liquor
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER) + 100 ) )
set udg_Loc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A026', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "curse", GetTriggerUnit() )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_1606" )
else
// Diet Drink
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func003C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - 25.00 ) )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) + 100 ) )
else
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) + ( R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit())) * 4 ) ) )
call SetUnitLifeBJ( GetTriggerUnit(), 1.00 )
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 3.00, "TRIGSTR_2253" )
else
// Cure Poison
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002C() ) then
set udg_DiseaseResist[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 100
set udg_Loc = GetRectCenter(gg_rct_GardenOfEden)
call CreateNUnitsAtLoc( 1, 'opeo', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call RemoveLocation(udg_Loc)
call UnitRemoveBuffBJ( 'B00A', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'Bssd', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'Bspo', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'Bpsd', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'Bpoi', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00I', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00H', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'Brej', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B012', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B013', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00X', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00W', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B011', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B010', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00Z', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00Y', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00S', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00T', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B009', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00Q', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00V', GetTriggerUnit() )
call UnitRemoveBuffBJ( 'B00U', GetTriggerUnit() )
else
// Greatest Elixir
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD) + 80 ) )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER) + 40 ) )
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + 40.00 ) )
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + 40.00 ) )
else
// Empty Though
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002C() ) then
set udg_Loc = GetUnitLoc(GetTriggerUnit())
call RemoveItem( GetManipulatedItem() )
call CreateItemLoc( 'I02B', udg_Loc )
call RemoveLocation(udg_Loc)
else
// Boss Beast Heart
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func002C() ) then
call AdjustPlayerStateBJ( 80, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_Heart_Snake[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
set udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerTechResearchedSwap( 'R000', 1, GetOwningPlayer(GetTriggerUnit()) )
set udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Crit_block[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func002Func007C() ) then
call SetUnitAbilityLevelSwapped( 'A07Z', GetTriggerUnit(), 2 )
else
call SetUnitAbilityLevelSwapped( 'Arpb', GetTriggerUnit(), 2 )
endif
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2021" )
else
call UnitAddItemByIdSwapped( 'I02H', GetTriggerUnit() )
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func002C() ) then
call AdjustPlayerStateBJ( 80, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_Heart_Vulture[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
set udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerTechResearchedSwap( 'R001', 1, GetOwningPlayer(GetTriggerUnit()) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2428" )
else
call UnitAddItemByIdSwapped( 'I018', GetTriggerUnit() )
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func002C() ) then
call AdjustPlayerStateBJ( 80, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_Heart_Grizzly[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
set udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call ModifyHeroStat( bj_HEROSTAT_STR, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 10 )
set udg_Heat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Heat[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 10 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2702" )
else
call UnitAddItemByIdSwapped( 'I03S', GetTriggerUnit() )
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func002C() ) then
call AdjustPlayerStateBJ( 80, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_Heart_Werewolf[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
set udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Eaten_Hearts[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call SetPlayerTechResearchedSwap( 'R002', 1, GetOwningPlayer(GetTriggerUnit()) )
set udg_Crit_power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_Crit_power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2713" )
else
call UnitAddItemByIdSwapped( 'I03T', GetTriggerUnit() )
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001C() ) then
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 3
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DisplayTimedTextToForce( udg_Team[GetForLoopIndexA()], 10.00, "TRIGSTR_1461" )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('n00M'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func003A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H001'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func005A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H000'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func007A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H002'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func009A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H003'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func011A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('n000'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func014Func013A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1461" )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('n00M'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func003A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H001'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func005A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H000'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func007A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H002'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func009A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('H003'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func011A )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfTypeIdAll('n000'), function Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func002Func013A )
endif
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func001C() ) then
call AddHeroXPSwapped( 200, udg_Hero_Troll[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], false )
else
if ( Trig_Troll_Eat_2_Func001Func002Func002Func002Func002Func003Func001Func003Func002Func002Func002Func002Func002Func001Func001Func001Func001Func001Func001C() ) then
call SetUnitAnimation( GetTriggerUnit(), "stand - 1" )
set udg_Loc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A019', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", GetTriggerUnit() )
call RemoveLocation(udg_Loc)
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Troll_Eat_2 takes nothing returns nothing
set gg_trg_Troll_Eat_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Troll_Eat_2, function Trig_Troll_Eat_2_Actions )
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func003A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", udg_Hero_Troll[udg_N] )
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 5) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 6) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 7) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 8) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 9) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func006C takes nothing returns boolean
if ( not ( GetRandomInt(1, 2) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009C takes nothing returns boolean
if ( not ( GetRandomInt(1, 6) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 7) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 8) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004C takes nothing returns boolean
if ( not ( GetRandomInt(1, 9) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001Func009C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Hero_Troll[udg_N]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(udg_N)) != PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Func001Func004C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 12 ) ) then
return true
endif
return false
endfunction
function Trig_Voodoo_Doll_Func001C takes nothing returns boolean
if ( not Trig_Voodoo_Doll_Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_Voodoo_Doll_Actions takes nothing returns nothing
if ( Trig_Voodoo_Doll_Func001C() ) then
set udg_N = GetItemUserData(GetManipulatedItem())
if ( Trig_Voodoo_Doll_Func001Func003C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'vddl', GetTriggerUnit() )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Heh, thiz fool be left our world. Me be findin' another fool!|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001C() ) then
set udg_LocalPlayer = GetOwningPlayer(udg_Hero_Troll[udg_N])
set udg_Loc = GetUnitLoc(udg_Hero_Troll[udg_N])
call CreateNUnitsAtLoc( 1, 'oeye', GetOwningPlayer(GetTriggerUnit()), udg_Loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "move", udg_Hero_Troll[udg_N] )
call RemoveLocation(udg_Loc)
call SelectUnitForPlayerSingle( udg_Hero_Troll[udg_N], GetOwningPlayer(GetTriggerUnit()) )
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009C() ) then
call SetPlayerStateBJ( udg_LocalPlayer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(udg_LocalPlayer, PLAYER_STATE_RESOURCE_GOLD) - GetRandomInt(1, 200) ) )
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Die starving, mon, die in pain!...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Die starving, mon, die in pain!...|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004C() ) then
call SetPlayerStateBJ( udg_LocalPlayer, PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(udg_LocalPlayer, PLAYER_STATE_RESOURCE_LUMBER) - GetRandomInt(1, 100) ) )
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Feelin' cold, mon? It iz the cold hand of Death, heheheheee...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Feelin' cold, mon? It iz the cold hand of Death, heheheheee...|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004C() ) then
call SetUnitManaBJ( udg_Hero_Troll[udg_N], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_Hero_Troll[udg_N]) - GetRandomReal(1.00, 200.00) ) )
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Feelin' sleepy, mon? Eheheheheee...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Feelin' sleepy, mon? Eheheheheee...|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004C() ) then
set udg_Loc = GetUnitLoc(udg_Hero_Troll[udg_N])
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07S', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", udg_Hero_Troll[udg_N] )
call RemoveLocation(udg_Loc)
call SetUnitLifeBJ( udg_Hero_Troll[udg_N], ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_Hero_Troll[udg_N]) - GetRandomReal(1.00, 50.00) ) )
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Me iz happy to see ya sufferin'!...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Me iz happy to see ya sufferin'!...|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009C() ) then
set udg_Loc = GetUnitLoc(udg_Hero_Troll[udg_N])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsInRangeOfLocAll(1500.00, udg_Loc), function Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func003A )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Muahahahaa, now be funny!...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Muahahahaa, now be funny!...|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007C() ) then
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Mojo_Anaconda)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Mojo_Tarantula)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Pirahnas_1)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Pirahnas_2)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Pirahnas_3)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Pirahnas_4)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Moving_Sand)
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_Loc = GetRectCenter(gg_rct_Moving_Sand_2)
else
set udg_Loc = GetRectCenter(udg_ground_vermin[GetRandomInt(1, 42)])
endif
endif
endif
endif
endif
endif
endif
endif
call SetUnitPositionLoc( udg_Hero_Troll[udg_N], udg_Loc )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Me hopez ya be teleported straight to hell!...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Me hopez ya be teleported straight to hell!...|r" ) )
else
if ( Trig_Voodoo_Doll_Func001Func003Func001Func009Func004Func004Func004Func009Func007Func006C() ) then
set udg_Loc = GetUnitLoc(udg_Hero_Troll[udg_N])
call CreateNUnitsAtLoc( 1, 'ndwm', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'AOhx', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", udg_Hero_Troll[udg_N] )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Turn into ya true form, heheheeee!...|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ":|r |c00ffff64Turn into ya true form, heheheeee!...|r" ) )
else
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_621" )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_764" )
endif
endif
endif
endif
endif
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + ":|r |c00ffff64Hum... Me canna feel hiz Spirit, seemz he be dead.|r" ) )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_3205" )
endif
endfunction
//===========================================================================
function InitTrig_Voodoo_Doll takes nothing returns nothing
set gg_trg_Voodoo_Doll = CreateTrigger( )
call TriggerAddAction( gg_trg_Voodoo_Doll, function Trig_Voodoo_Doll_Actions )
endfunction
function Trig_Ammo_add_Func001Func001Func001Func011C takes nothing returns boolean
if ( ( GetItemUserData(GetManipulatedItem()) == 1 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 2 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 3 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 4 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 5 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 6 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 7 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 8 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 9 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 10 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 11 ) ) then
return true
endif
if ( ( GetItemUserData(GetManipulatedItem()) == 12 ) ) then
return true
endif
return false
endfunction
function Trig_Ammo_add_Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Ammo_add_Func001Func001Func001Func011C() ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'vddl') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AU') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func015001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AT') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func015001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AQ') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I02P') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func003Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I02T') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func003Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I02O') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02N' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AN') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001Func015001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AP') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func003Func002C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func003Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func003Func002C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func003Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I045') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I046' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func002Func001Func005Func002C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func002Func001Func005Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func002Func001Func005C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I029') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func002Func015001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AS') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02C' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04W') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AR') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AO') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I044') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I027' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func002C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I0AV' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I0AM' ) ) then
return true
endif
return false
endfunction
function Trig_Ammo_add_Func001Func003Func003Func001Func004Func003Func002001 takes nothing returns boolean
return ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] > udg_AmmoMax[GetItemUserData(udg_TempItem)] )
endfunction
function Trig_Ammo_add_Func001Func003Func003Func001Func004Func003Func005001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func003Func001Func004Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func003Func001Func004Func010001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func003Func001Func004C takes nothing returns boolean
if ( not ( GetItemUserData(udg_TempItem) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func003Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I099') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func003Func003Func003Func002001 takes nothing returns boolean
return ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] > udg_AmmoMax[GetItemUserData(udg_TempItem)] )
endfunction
function Trig_Ammo_add_Func001Func003Func003Func003Func003Func005001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func003Func003Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func003Func003Func010001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_add_Func001Func003Func003Func003C takes nothing returns boolean
if ( not ( GetItemUserData(udg_TempItem) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I02W') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001Func003C takes nothing returns boolean
if ( not Trig_Ammo_add_Func001Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'pspd' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_add_Actions takes nothing returns nothing
if ( Trig_Ammo_add_Func001C() ) then
if ( Trig_Ammo_add_Func001Func001C() ) then
if ( Trig_Ammo_add_Func001Func001Func001C() ) then
set udg_A = GetItemUserData(GetManipulatedItem())
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'vddl')
call RemoveItem( GetManipulatedItem() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'horl', GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), GetRandomInt(5, 10) )
call SetItemUserData( GetLastCreatedItem(), udg_A )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, ( ( "|c0000c400Troll Shaman " + GetPlayerName(GetTriggerPlayer()) ) + ( ":|r |c00ffff64Yeah! Me haz Voodoo powah over " + ( GetPlayerName(ConvertedPlayer(udg_A)) + "'z body!|r" ) ) ) )
else
call RemoveItem( GetManipulatedItem() )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_3101" )
endif
else
call SetItemCharges( GetManipulatedItem(), 1 )
endif
else
if ( Trig_Ammo_add_Func001Func003C() ) then
if ( Trig_Ammo_add_Func001Func003Func003C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I02W')
if ( Trig_Ammo_add_Func001Func003Func003Func003C() ) then
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 20
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func003Func003Func010001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I02W')
if ( Trig_Ammo_add_Func001Func003Func003Func003Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2174" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
if ( Trig_Ammo_add_Func001Func003Func003Func003Func003Func002001() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
call DoNothing( )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func003Func003Func003Func005001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func003Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I099')
if ( Trig_Ammo_add_Func001Func003Func003Func001Func004C() ) then
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 20
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func003Func001Func004Func010001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I099')
if ( Trig_Ammo_add_Func001Func003Func003Func001Func004Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2174" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
if ( Trig_Ammo_add_Func001Func003Func003Func001Func004Func003Func002001() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
call DoNothing( )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func003Func001Func004Func003Func005001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
endif
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), 6.00, "TRIGSTR_2133" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001C() ) then
if ( Trig_Ammo_add_Func001Func003Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I044')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00S', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 1
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AO')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04W', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 1
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AR')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I05R', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 1
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00S')
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04W')
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05R')
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func002Func001Func001Func001Func001Func001Func004Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2044" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
endif
endif
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001C() ) then
if ( Trig_Ammo_add_Func001Func003Func001Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AS')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I029', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 15
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func002Func015001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I029')
if ( Trig_Ammo_add_Func001Func003Func001Func001Func002Func001Func005C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2001" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func002Func001Func005Func002C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func002Func001Func005Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1994" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001C() ) then
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I045')
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1992" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func003Func002C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func003Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05S')
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1005" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func003Func002C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func003Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AP')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I045', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 10
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001Func015001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AN')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I05S', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 10
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func002Func001Func001Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1989" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001C() ) then
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I02O')
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1971" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func003Func002C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func003Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I02T')
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1971" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func003Func002C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func003Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I02P')
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1963" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003Func002C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 5 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AQ')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I02O', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 5
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func015001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AT')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I02T', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 5
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func015001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AU')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I02P', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 5
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 5 )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_add_Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_1896" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
endif
endif
endif
endif
else
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Ammo_add takes nothing returns nothing
set gg_trg_Ammo_add = CreateTrigger( )
call TriggerAddAction( gg_trg_Ammo_add, function Trig_Ammo_add_Actions )
endfunction
function Trig_Ammo_poison_Func001Func001C takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return true
endif
if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04K' ) ) then
return true
endif
return false
endfunction
function Trig_Ammo_poison_Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00Y') == false ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04L') == false ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04R') == false ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I000') == false ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04I') == false ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04J') == false ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func001Func002Func004C takes nothing returns boolean
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09K') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09L') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09M') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09N') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09O') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09P') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09Q') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09R') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09S') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09U') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09V') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09W') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09X') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09Y') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I09Z') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0A0') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0A1') == true ) ) then
return true
endif
if ( ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0A2') == true ) ) then
return true
endif
return false
endfunction
function Trig_Ammo_poison_Func001Func002C takes nothing returns boolean
if ( not Trig_Ammo_poison_Func001Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func001C takes nothing returns boolean
if ( not Trig_Ammo_poison_Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04W') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AR') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AO') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I044') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I0A5' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04W') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AR') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AO') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I044') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I0A4' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04W') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003Func001Func005C takes nothing returns boolean
if ( not ( ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 ) > udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003Func001Func008001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_AmmoType[GetItemUserData(udg_TempItem)] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] == udg_AmmoMax[GetItemUserData(udg_TempItem)] ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00S') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AR') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I0AO') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003Func016001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I044') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I0A3' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001Func001Func013001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04J') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04I') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I000') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04L') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00Y') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04K' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001Func001Func013001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04J') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04I') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I000') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04L') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001Func002Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func001Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00Y') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001Func001Func013001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04J') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04I') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I000') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func002Func001Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func002Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I04L') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002Func002Func014001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 0 )
endfunction
function Trig_Ammo_poison_Func002Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I00Y') == true ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then
return false
endif
return true
endfunction
function Trig_Ammo_poison_Actions takes nothing returns nothing
if ( Trig_Ammo_poison_Func001C() ) then
if ( Trig_Ammo_poison_Func001Func002C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_3228" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
else
if ( Trig_Ammo_poison_Func001Func002Func001C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_640" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
else
endif
endif
else
endif
if ( Trig_Ammo_poison_Func002C() ) then
if ( Trig_Ammo_poison_Func002Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00Y')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09K', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func002Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04L')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09N', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func002Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04R')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09Q', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I000')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09U', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04I')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09X', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04J')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I0A0', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func002Func001Func001Func001Func001Func001Func013001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
endif
endif
endif
endif
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001C() ) then
if ( Trig_Ammo_poison_Func002Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00Y')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09L', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func002Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04L')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09O', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04R')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09R', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I000')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09V', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04I')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09Y', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04J')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I0A1', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func002Func001Func001Func001Func001Func001Func013001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
endif
endif
endif
endif
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001C() ) then
if ( Trig_Ammo_poison_Func002Func001Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00Y')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09M', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04L')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09P', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04R')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09S', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I000')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09W', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04I')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I09Z', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001Func014001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04J')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I0A2', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_A = 10
set udg_AmmoMax[udg_C] = udg_A
set udg_AmmoAmmount[udg_C] = udg_A
if ( Trig_Ammo_poison_Func002Func001Func001Func002Func001Func001Func001Func001Func001Func013001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
endif
endif
endif
endif
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001C() ) then
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I044')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00S', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 2
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AO')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04W', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 2
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AR')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I05R', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 2
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00S')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04W')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05R')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2044" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
endif
endif
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001C() ) then
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I044')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00S', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 3
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AO')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04W', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 3
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AR')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I05R', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 3
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00S')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04W')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05R')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func004Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2044" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
endif
endif
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001C() ) then
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I044')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I00S', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 4
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AO')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I04W', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 4
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I0AR')
call UnitRemoveItemSwapped( udg_TempItem, GetTriggerUnit() )
call RemoveItem( udg_TempItem )
call UnitAddItemByIdSwapped( 'I05R', GetTriggerUnit() )
set udg_TempItem = GetLastCreatedItem()
call SetItemCharges( udg_TempItem, 1 )
set udg_C = ( udg_C + 1 )
call SetItemUserData( udg_TempItem, udg_C )
set udg_AmmoContainer[udg_C] = udg_TempItem
set udg_AmmoMax[udg_C] = 30
set udg_AmmoAmmount[udg_C] = ( udg_AmmoAmmount[udg_C] + 15 )
set udg_AmmoType[udg_C] = 4
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[udg_C] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[udg_C] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func016001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00S')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I04W')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func003Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001C() ) then
set udg_TempItem = GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05R')
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004C() ) then
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2050" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
else
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004Func001C() ) then
call SetItemCharges( udg_TempItem, 1 )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004Func001Func005C() ) then
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = udg_AmmoMax[GetItemUserData(udg_TempItem)]
else
set udg_AmmoAmmount[GetItemUserData(udg_TempItem)] = ( udg_AmmoAmmount[GetItemUserData(udg_TempItem)] + 15 )
endif
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, udg_AmmoAmmount[GetItemUserData(udg_TempItem)] )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, udg_AmmoMax[GetItemUserData(udg_TempItem)] )
if ( Trig_Ammo_poison_Func002Func001Func001Func001Func001Func001Func002Func001Func001Func001Func001Func001Func004Func001Func008001() ) then
call RemoveItem( GetManipulatedItem() )
else
call DoNothing( )
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2634" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
call SetItemCharges( udg_TempItem, 1 )
endif
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetTriggerUnit()), 0, 0, 6.00, "TRIGSTR_2044" )
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) + 1 ) )
endif
endif
endif
endif
endif
endif
else
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Ammo_poison takes nothing returns nothing
set gg_trg_Ammo_poison = CreateTrigger( )
call TriggerAddAction( gg_trg_Ammo_poison, function Trig_Ammo_poison_Actions )
endfunction
library Food
globals
constant integer ARIA_BLOSSOM_ID = 'I01A'
constant integer BARDANE_PETAL_ID = 'I01B'
constant integer CORIAN_LEAVE_ID = 'I01C'
constant integer DRAXIMOR_BELL_ID = 'I01D'
constant integer TINDER_ID = 'I012'
constant integer BERRY_ID = 'I002'
constant integer ARIA_SEED_ID = 'I07O'
constant integer BARDANE_SEED_ID = 'I07P'
constant integer CORIAN_SEED_ID = 'I07Q'
constant integer DRAXIMOR_SEED_ID = 'I07R'
constant integer PLANTS_SEED_ID = 'I0B4'
constant integer TREE_SEED_ID = 'I02I'
constant integer BERRY_SEED_ID = 'I087'
constant integer HONEY_ID = 'I09A'
constant integer OLDTROLL_CAKE_ID = 'I03R'
constant integer RAWMEAT_ID = 'I003'
constant integer TROLLMEAT_ID = 'I069'
constant integer ROTTENMEAT_ID = 'I0AV'
constant integer STINKYSMALLFISH_ID = 'I0AM'
constant integer COOKEDMEAT_ID = 'I001'
constant integer COOKEDMEAT_TASTY_ID = 'bzbf'
constant integer MEATSTEW_ID = 'I05Z'
constant integer MEATSTEW_TASTY_ID = 'sorf'
constant integer BONE_ID = 'I004'
constant integer SKULL_ID = 'I054'
constant integer ELDERSKULL_ID = 'skrt'
constant integer SHRUNKENHEAD_ID = 'I06H'
constant integer BOUILLON_ID = 'I09J'
constant integer BOUILLON_TASTY_ID = 'bzbe'
constant integer FISHBONE_ID = 'I00E'
constant integer EGG_ALLIGATOR_ID = 'I09E'
constant integer EGG_BIRD_ID = 'I08Z'
constant integer EGG_SNAKE_ID = 'I0AK'
constant integer EGG_SPIDER_ID = 'I03Q'
constant integer EGG_TORTOISE_ID = 'I03P'
constant integer OMELETTE_ID = 'I061'
constant integer OMELETTE_TASTY_ID = 'gmfr'
constant integer Heal_1020_ID = 'A08X'
constant integer Heal_20_ID = 'A0KG'
constant integer Heal_2040_ID = 'A0JY'
constant integer Heal_40_ID = 'A0KI'
constant integer Heal_60_ID = 'A0KJ'
endglobals
public function Healing takes unit caster, integer spell returns nothing
local unit dummy
local real x
local real y
set x = GetUnitX(caster)
set y = GetUnitY(caster)
set dummy = CreateUnit( Player(PLAYER_NEUTRAL_PASSIVE), 'ndwm', x, y, bj_UNIT_FACING )
call UnitAddAbility( dummy, spell )
call IssueTargetOrder( dummy, "rejuvination", caster )
set dummy = null
endfunction
public function FeedAnimal takes unit caster returns nothing
local integer casterid
local item food
local integer id
local integer charge
local integer chance = 0
local integer spell
local boolean eat = false
set food = UnitItemInSlot(caster, 0)
set id = GetItemTypeId(food)
set casterid = GetUnitTypeId(caster)
set charge = GetItemCharges(food)
// ===== Feed Animals =====
// ===== Carnivore =====
if GetUnitAbilityLevel(caster,'A06Q') > 0 then
if id == TROLLMEAT_ID or id == RAWMEAT_ID or id == COOKEDMEAT_ID or id == COOKEDMEAT_TASTY_ID or id == MEATSTEW_ID or id == MEATSTEW_TASTY_ID or id == BONE_ID or id == BOUILLON_ID or id == BOUILLON_TASTY_ID or id == FISHBONE_ID or id == EGG_BIRD_ID or id == EGG_SNAKE_ID or id == OMELETTE_ID or id == OMELETTE_TASTY_ID or id == ROTTENMEAT_ID or id == STINKYSMALLFISH_ID then
set spell = Heal_1020_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
elseif id == EGG_TORTOISE_ID or id == EGG_ALLIGATOR_ID or id == EGG_SPIDER_ID or id == SKULL_ID or id == ELDERSKULL_ID or id == SHRUNKENHEAD_ID then
set spell = Heal_2040_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
endif
// ===== Herbivore =====
elseif GetUnitAbilityLevel(caster,'A083') > 0 then
if id == HONEY_ID or id == OLDTROLL_CAKE_ID or id == ARIA_SEED_ID or id == BARDANE_SEED_ID or id == CORIAN_SEED_ID or id == DRAXIMOR_SEED_ID or id == PLANTS_SEED_ID or id == TREE_SEED_ID or id == BERRY_SEED_ID then
set spell = Heal_2040_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
elseif id == ARIA_BLOSSOM_ID or id == BARDANE_PETAL_ID or id == CORIAN_LEAVE_ID or id == DRAXIMOR_BELL_ID or id == TINDER_ID or id == BERRY_ID then
set spell = Heal_1020_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
endif
// ===== Omnivore =====
elseif GetUnitAbilityLevel(caster,'A0B9') > 0 then
if id == HONEY_ID or id == OLDTROLL_CAKE_ID or id == ARIA_SEED_ID or id == BARDANE_SEED_ID or id == CORIAN_SEED_ID or id == DRAXIMOR_SEED_ID or id == PLANTS_SEED_ID or id == TREE_SEED_ID or id == BERRY_SEED_ID or id == EGG_TORTOISE_ID or id == EGG_ALLIGATOR_ID or id == EGG_SPIDER_ID or id == SKULL_ID or id == ELDERSKULL_ID or id == SHRUNKENHEAD_ID then
set spell = Heal_2040_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
elseif id == TROLLMEAT_ID or id == RAWMEAT_ID or id == COOKEDMEAT_ID or id == COOKEDMEAT_TASTY_ID or id == MEATSTEW_ID or id == MEATSTEW_TASTY_ID or id == BONE_ID or id == BOUILLON_ID or id == BOUILLON_TASTY_ID or id == FISHBONE_ID or id == EGG_BIRD_ID or id == EGG_SNAKE_ID or id == OMELETTE_ID or id == OMELETTE_TASTY_ID or id == ROTTENMEAT_ID or id == STINKYSMALLFISH_ID or id == ARIA_BLOSSOM_ID or id == BARDANE_PETAL_ID or id == CORIAN_LEAVE_ID or id == DRAXIMOR_BELL_ID or id == TINDER_ID or id == BERRY_ID then
set spell = Heal_1020_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
endif
// ===== Monster =====
elseif GetUnitAbilityLevel(caster,'A08W') > 0 then
if id == ROTTENMEAT_ID or id == RAWMEAT_ID or id == COOKEDMEAT_ID or id == COOKEDMEAT_TASTY_ID or id == MEATSTEW_ID or id == MEATSTEW_TASTY_ID or id == BONE_ID or id == BOUILLON_ID or id == BOUILLON_TASTY_ID or id == FISHBONE_ID or id == EGG_BIRD_ID or id == EGG_SNAKE_ID or id == OMELETTE_ID or id == OMELETTE_TASTY_ID or id == STINKYSMALLFISH_ID then
set spell = Heal_20_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
elseif id == TROLLMEAT_ID or id == EGG_SPIDER_ID or id == EGG_TORTOISE_ID or id == EGG_ALLIGATOR_ID then
set spell = Heal_40_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
elseif id == SHRUNKENHEAD_ID or id == SKULL_ID or id == ELDERSKULL_ID then
set spell = Heal_60_ID
set chance = GetRandomInt(1, 10)
set eat = true
call Healing(caster,spell)
endif
endif
if eat then
if charge == 1 then
call RemoveItem( food )
else
call SetItemCharges( food, ( charge - 1 ))
endif
if chance == 1 then
call UnitRemoveBuffBJ( 'B00I', caster )
call UnitRemoveBuffBJ( 'B00H', caster )
call UnitRemoveBuffBJ( 'Brej', caster )
endif
endif
set food = null
endfunction
endlibrary
function Trig_Items_Limit_Func008Func001Func001Func001C takes nothing returns boolean
if ( not ( RectContainsUnit(udg_Area[udg_N], GetTriggerUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func008Func001C takes nothing returns boolean
if ( not ( GetItemUserData(GetManipulatedItem()) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func008C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I011' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func010Func001Func001C takes nothing returns boolean
if ( not ( GetManipulatedItem() == udg_TotemKit[3] ) ) then
return false
endif
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[3]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func010Func001C takes nothing returns boolean
if ( not ( GetManipulatedItem() == udg_TotemKit[2] ) ) then
return false
endif
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[2]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func010C takes nothing returns boolean
if ( not ( GetManipulatedItem() == udg_TotemKit[1] ) ) then
return false
endif
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[1]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_Wood == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01U' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01T' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01J' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01X' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n014' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n026' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01Z' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I054' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'skrt' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I004' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'bzbe' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I09J' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I00E' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I002' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01A' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01B' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01C' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01D' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I003' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I069' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'bzbf' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I001' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'sorf' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I05Z' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'gmfr' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I061' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I08Z' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AK' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I03P' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I03Q' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I021' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01R' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02D' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02E' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I022' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02M' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01W' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I023' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I04M' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I024' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I047' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I03T' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I018' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I03S' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I06H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I014' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I036' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02X' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02K' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AV' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I09E' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h004' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func001Func003Func003001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 1 )
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func001Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) == 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I037' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func003Func003001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 1 )
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func003C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) == 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I014' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01N' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func003Func001Func001001 takes nothing returns boolean
return ( GetItemCharges(GetManipulatedItem()) == 1 )
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) == 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I014' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h01Y' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02W' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func003Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I014' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I035' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I00S' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I044' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I04W' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AO' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I05R' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AR' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02O' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AQ' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02T' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AT' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02P' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AU' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I045' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AP' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I00Y' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I04L' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I04R' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I000' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I04I' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I04J' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I028' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01S' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I00H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02F' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I094' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I095' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I096' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I097' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I029' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AS' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01V' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I08V' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I0AG' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I00Z' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I073' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I075' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I078' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I07H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I07C' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I07D' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I07G' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I07K' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00U' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00X' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n015' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02T' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n024' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n021' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n020' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02S' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n022' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n023' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n029' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'u000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n000' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_Wood != 9 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n006' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02A' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n002' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02R' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n001' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n016' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00O' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func003Func002C takes nothing returns boolean
if ( not ( udg_Wood != 8 ) ) then
return false
endif
if ( not ( udg_Wood != 9 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02D' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02J' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func003C takes nothing returns boolean
if ( not ( udg_Wood != 8 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01R' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01S' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n003' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n009' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n01A' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n02P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00D' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00H' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( not ( udg_Wood != 9 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'u000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'u001' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func004Func001C takes nothing returns boolean
if ( ( udg_Wood == 3 ) ) then
return true
endif
if ( ( udg_Wood == 5 ) ) then
return true
endif
if ( ( udg_Wood == 6 ) ) then
return true
endif
if ( ( udg_Wood == 7 ) ) then
return true
endif
if ( ( udg_Wood == 10 ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002Func004C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func004Func001C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func003Func001C takes nothing returns boolean
if ( ( udg_Wood == 5 ) ) then
return true
endif
if ( ( udg_Wood == 6 ) ) then
return true
endif
if ( ( udg_Wood == 7 ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func002Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002Func003Func001C takes nothing returns boolean
if ( ( udg_Wood == 4 ) ) then
return true
endif
if ( ( udg_Wood == 6 ) ) then
return true
endif
if ( ( udg_Wood == 7 ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func002Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func002Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002Func003Func001C takes nothing returns boolean
if ( ( udg_Wood == 4 ) ) then
return true
endif
if ( ( udg_Wood == 5 ) ) then
return true
endif
if ( ( udg_Wood == 7 ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func002Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func002Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012Func003Func004C takes nothing returns boolean
if ( ( udg_Wood == 2 ) ) then
return true
endif
if ( ( udg_Wood == 4 ) ) then
return true
endif
if ( ( udg_Wood == 5 ) ) then
return true
endif
if ( ( udg_Wood == 6 ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func012Func003C takes nothing returns boolean
if ( not Trig_Items_Limit_Func012Func003Func004C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func012C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func002002001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) )
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func002002001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) )
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func002002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func002002001002001(), Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func002002001002002() )
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'u001' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func004A takes nothing returns nothing
if ( Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func004Func001C() ) then
call UnitAddAbilityBJ( 'ACct', GetEnumUnit() )
call UnitAddAbilityBJ( 'ANde', GetEnumUnit() )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_Loc )
else
endif
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func009002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'h004' )
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func011Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'u001' ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(GetEnumUnit()) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func011A takes nothing returns nothing
if ( Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func011Func001C() ) then
call UnitAddAbilityBJ( 'ACct', GetEnumUnit() )
call UnitAddAbilityBJ( 'ANde', GetEnumUnit() )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", udg_Loc )
else
endif
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func015C takes nothing returns boolean
if ( ( udg_TotemOwned[1] == true ) ) then
return true
endif
if ( ( udg_TotemOwned[2] == true ) ) then
return true
endif
if ( ( udg_TotemOwned[3] == true ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func015C() ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfr2' ) ) then
return false
endif
if ( not ( udg_Froll_Huts == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfr2' ) ) then
return false
endif
if ( not ( udg_Froll_Huts == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nfr2' ) ) then
return false
endif
if ( not ( udg_Froll_Huts == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nmg1' ) ) then
return false
endif
if ( not ( udg_Froll_Villages <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001Func002Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'nmg1' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'nfr2' ) ) then
return true
endif
return false
endfunction
function Trig_Items_Limit_Func013Func001Func002C takes nothing returns boolean
if ( not Trig_Items_Limit_Func013Func001Func002Func001C() ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I036' ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Func013C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetManipulatingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Items_Limit_Actions takes nothing returns nothing
set udg_TempInteger = 0
set udg_Wood = 0
set udg_TempInteger = GetItemTypeId(GetManipulatedItem())
if udg_TempInteger != 0 then
set udg_Wood = GetItemWoodCostById(udg_TempInteger)
endif
// ========== Area Drop Ressource Limits ==========
if ( Trig_Items_Limit_Func008C() ) then
if ( Trig_Items_Limit_Func008Func001C() ) then
set udg_N = 1
loop
exitwhen udg_N > 9
if ( Trig_Items_Limit_Func008Func001Func001Func001C() ) then
call SetItemUserData( GetManipulatedItem(), 99 )
set udg_count_Wood[udg_N] = ( udg_count_Wood[udg_N] - 1 )
else
endif
set udg_N = udg_N + 1
endloop
else
endif
else
endif
// ========== TotemKit Protection ==========
if ( Trig_Items_Limit_Func010C() ) then
call UnitRemoveItemSwapped( udg_TotemKit[1], GetTriggerUnit() )
else
if ( Trig_Items_Limit_Func010Func001C() ) then
call UnitRemoveItemSwapped( udg_TotemKit[2], GetTriggerUnit() )
else
if ( Trig_Items_Limit_Func010Func001Func001C() ) then
call UnitRemoveItemSwapped( udg_TotemKit[3], GetTriggerUnit() )
else
endif
endif
endif
// ========== Troll Class Items Limits ==========
if ( Trig_Items_Limit_Func012C() ) then
if ( Trig_Items_Limit_Func012Func003C() ) then
call DisableTrigger( gg_trg_Global_Item_Drop )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call EnableTrigger( gg_trg_Global_Item_Drop )
else
endif
else
if ( Trig_Items_Limit_Func012Func002C() ) then
if ( Trig_Items_Limit_Func012Func002Func003C() ) then
call DisableTrigger( gg_trg_Global_Item_Drop )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call EnableTrigger( gg_trg_Global_Item_Drop )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func003C() ) then
call DisableTrigger( gg_trg_Global_Item_Drop )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call EnableTrigger( gg_trg_Global_Item_Drop )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func003C() ) then
call DisableTrigger( gg_trg_Global_Item_Drop )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call EnableTrigger( gg_trg_Global_Item_Drop )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func004C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
// ========== Animals and Building Items Limits ==========
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func001C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func003C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func003Func001C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func003Func001Func001001() ) then
call RemoveItem( GetManipulatedItem() )
else
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) - 1 ) )
endif
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + 50.00 ) )
endif
else
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call UnitRemoveAbilityBJ( 'A0MM', GetTriggerUnit() )
call UnitAddAbilityBJ( 'A08J', GetTriggerUnit() )
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func003Func003001() ) then
call RemoveItem( GetManipulatedItem() )
else
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) - 1 ) )
endif
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + 50.00 ) )
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func001Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call UnitRemoveAbilityBJ( 'A08J', GetTriggerUnit() )
call UnitAddAbilityBJ( 'A0MM', GetTriggerUnit() )
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func003Func001Func003Func003001() ) then
call RemoveItem( GetManipulatedItem() )
else
call SetItemCharges( GetManipulatedItem(), ( GetItemCharges(GetManipulatedItem()) - 1 ) )
endif
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + 50.00 ) )
endif
else
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endif
endif
else
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Items_Limit_Func012Func002Func002Func002Func002Func002Func001Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 1), GetTriggerUnit() )
else
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
if ( Trig_Items_Limit_Func013C() ) then
if ( Trig_Items_Limit_Func013Func001C() ) then
if ( Trig_Items_Limit_Func013Func001Func001C() ) then
call ReplaceUnitBJ( GetTriggerUnit(), 'nfr2', bj_UNIT_STATE_METHOD_RELATIVE )
set udg_Froll_Villages = ( udg_Froll_Villages + 1 )
call UnitAddItemByIdSwapped( 'I036', GetLastReplacedUnitBJ() )
else
if ( Trig_Items_Limit_Func013Func001Func001Func001C() ) then
set udg_Loc = GetRandomLocInRect(gg_rct_FrollFishing1)
call CreateNUnitsAtLoc( 1, 'nmg1', Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Loc, bj_UNIT_FACING )
set udg_Froll_Huts = 1
call RemoveLocation(udg_Loc)
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3094" )
else
if ( Trig_Items_Limit_Func013Func001Func001Func001Func001C() ) then
set udg_Loc = GetRandomLocInRect(gg_rct_FrollFishing1)
call CreateNUnitsAtLoc( 1, 'nmg1', Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Loc, bj_UNIT_FACING )
set udg_Froll_Huts = 2
call RemoveLocation(udg_Loc)
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3096" )
else
if ( Trig_Items_Limit_Func013Func001Func001Func001Func001Func001C() ) then
if ( Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001C() ) then
set udg_Loc2 = GetUnitLoc(GetTriggerUnit())
set udg_Loc = GetUnitLoc(FindNextUnitMatching(udg_Loc2, Condition(function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func009002001002)))
set udg_TempGroup = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( udg_TempGroup, function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func011A )
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3214" )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
else
set udg_Loc2 = GetUnitLoc(GetTriggerUnit())
set udg_Loc = GetUnitLoc(FindNextUnitMatching(udg_Loc2, Condition(function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func002002001002)))
set udg_TempGroup = GetUnitsInRectAll(GetPlayableMapRect())
call ForGroupBJ( udg_TempGroup, function Trig_Items_Limit_Func013Func001Func001Func001Func001Func001Func001Func004A )
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_3214" )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
endif
else
endif
endif
endif
endif
else
if ( Trig_Items_Limit_Func013Func001Func002C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( 2.00 * I2R(GetItemCharges(GetManipulatedItem())) ) ) )
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + ( 6.00 * I2R(GetItemCharges(GetManipulatedItem())) ) ) )
call RemoveItem( GetManipulatedItem() )
else
endif
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Items_Limit takes nothing returns nothing
set gg_trg_Items_Limit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Items_Limit, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_Items_Limit, function Trig_Items_Limit_Actions )
endfunction
function Trig_Building_ProgressBar_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00J' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h01Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'n01N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h01I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h02W' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h021' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h006' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h016' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h015' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h013' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h01Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'n00L' ) ) then
return true
endif
return false
endfunction
function Trig_Building_ProgressBar_Conditions takes nothing returns boolean
if ( not Trig_Building_ProgressBar_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_TotemOwned[1] == false ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func002Func003Func001C takes nothing returns boolean
if ( not ( udg_TotemOwned[2] == false ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func002Func003Func003Func004C takes nothing returns boolean
if ( not ( udg_TotemOwned[3] == false ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func002Func003Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetConstructingStructure()), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func002Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetConstructingStructure()), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func002C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetConstructingStructure()), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func004Func001Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h013' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h01Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'n00L' ) ) then
return true
endif
return false
endfunction
function Trig_Building_ProgressBar_Func001Func004Func001Func002C takes nothing returns boolean
if ( not Trig_Building_ProgressBar_Func001Func004Func001Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func004Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h021' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h006' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h016' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h015' ) ) then
return true
endif
return false
endfunction
function Trig_Building_ProgressBar_Func001Func004Func001C takes nothing returns boolean
if ( not Trig_Building_ProgressBar_Func001Func004Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001Func004Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h00J' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h01Y' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'n01N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h01I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetConstructingStructure()) == 'h02W' ) ) then
return true
endif
return false
endfunction
function Trig_Building_ProgressBar_Func001Func004C takes nothing returns boolean
if ( not Trig_Building_ProgressBar_Func001Func004Func003C() ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetConstructingStructure()) == 'h004' ) ) then
return false
endif
return true
endfunction
function Trig_Building_ProgressBar_Actions takes nothing returns nothing
if ( Trig_Building_ProgressBar_Func001C() ) then
set udg_Loc = GetUnitLoc(GetConstructingStructure())
if ( Trig_Building_ProgressBar_Func001Func002C() ) then
if ( Trig_Building_ProgressBar_Func001Func002Func001C() ) then
call RemoveUnit( GetConstructingStructure() )
call CreateNUnitsAtLoc( 1, 'h004', GetOwningPlayer(GetConstructingStructure()), udg_Loc, bj_UNIT_FACING )
set udg_Totem[1] = GetLastCreatedUnit()
set udg_TotemOwned[1] = true
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call IssueImmediateOrder( GetLastCreatedUnit(), "divineshield" )
set udg_Beast_owned[1] = true
set udg_TotemKit[1] = null
call DisplayTimedTextToForce( udg_Team[1], 10.00, "TRIGSTR_1741" )
call DisplayTimedTextToForce( udg_Team[2], 10.00, "TRIGSTR_1758" )
call DisplayTimedTextToForce( udg_Team[3], 10.00, "TRIGSTR_1758" )
else
call RemoveUnit( GetConstructingStructure() )
call CreateItemLoc( 'I01M', udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetConstructingStructure()), 0, 0, 6.00, "TRIGSTR_1643" )
endif
else
if ( Trig_Building_ProgressBar_Func001Func002Func003C() ) then
if ( Trig_Building_ProgressBar_Func001Func002Func003Func001C() ) then
call RemoveUnit( GetConstructingStructure() )
call CreateNUnitsAtLoc( 1, 'h004', GetOwningPlayer(GetConstructingStructure()), udg_Loc, bj_UNIT_FACING )
set udg_Totem[2] = GetLastCreatedUnit()
set udg_TotemOwned[2] = true
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call IssueImmediateOrder( GetLastCreatedUnit(), "divineshield" )
set udg_Beast_owned[2] = true
set udg_TotemKit[2] = null
call DisplayTimedTextToForce( udg_Team[2], 10.00, "TRIGSTR_1741" )
call DisplayTimedTextToForce( udg_Team[1], 10.00, "TRIGSTR_2075" )
call DisplayTimedTextToForce( udg_Team[3], 10.00, "TRIGSTR_2075" )
else
call RemoveUnit( GetConstructingStructure() )
call CreateItemLoc( 'I01M', udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetConstructingStructure()), 0, 0, 6.00, "TRIGSTR_1643" )
endif
else
if ( Trig_Building_ProgressBar_Func001Func002Func003Func003C() ) then
if ( Trig_Building_ProgressBar_Func001Func002Func003Func003Func004C() ) then
call RemoveUnit( GetConstructingStructure() )
call CreateNUnitsAtLoc( 1, 'h004', GetOwningPlayer(GetConstructingStructure()), udg_Loc, bj_UNIT_FACING )
set udg_Totem[3] = GetLastCreatedUnit()
set udg_TotemOwned[3] = true
call UnitAddAbilityBJ( 'Avul', GetLastCreatedUnit() )
call SetUnitManaPercentBJ( GetLastCreatedUnit(), 100 )
call IssueImmediateOrder( GetLastCreatedUnit(), "divineshield" )
set udg_Beast_owned[3] = true
set udg_TotemKit[3] = null
call DisplayTimedTextToForce( udg_Team[3], 10.00, "TRIGSTR_1741" )
call DisplayTimedTextToForce( udg_Team[1], 10.00, "TRIGSTR_2313" )
call DisplayTimedTextToForce( udg_Team[2], 10.00, "TRIGSTR_2313" )
else
call RemoveUnit( GetConstructingStructure() )
call CreateItemLoc( 'I01M', udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetConstructingStructure()), 0, 0, 6.00, "TRIGSTR_1643" )
endif
else
call RemoveUnit( GetConstructingStructure() )
call CreateItemLoc( 'I01M', udg_Loc )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetConstructingStructure()), 0, 0, 6.00, "TRIGSTR_2212" )
endif
endif
endif
call RemoveLocation(udg_Loc)
else
if ( Trig_Building_ProgressBar_Func001Func004C() ) then
call UnitRemoveAbilityBJ( 'A00A', GetConstructingStructure() )
else
if ( Trig_Building_ProgressBar_Func001Func004Func001C() ) then
call UnitRemoveAbilityBJ( 'A01C', GetConstructingStructure() )
else
if ( Trig_Building_ProgressBar_Func001Func004Func001Func002C() ) then
call UnitRemoveAbilityBJ( 'A014', GetConstructingStructure() )
else
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Building_ProgressBar takes nothing returns nothing
set gg_trg_Building_ProgressBar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Building_ProgressBar, EVENT_PLAYER_UNIT_CONSTRUCT_START )
call TriggerAddCondition( gg_trg_Building_ProgressBar, Condition( function Trig_Building_ProgressBar_Conditions ) )
call TriggerAddAction( gg_trg_Building_ProgressBar, function Trig_Building_ProgressBar_Actions )
endfunction
function Trig_Global_Ability_Recipe_Conditions takes nothing returns boolean
if ( not ( HasUnitAbility(GetTriggerUnit(), 'Aloc') == false ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0A4' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0D1' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EM' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A7' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A9' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AA' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A8' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A6' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AB' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0AP' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AW' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CT' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BT' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AR' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AQ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CQ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CR' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0DC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DG' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0B3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GH' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0KS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CP' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0B4' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GI' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0B7' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0F2' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A08U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08T' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'h01I' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'h01K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'h01M' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C8' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A06S' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06R' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h00H' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func003C takes nothing returns boolean
if ( not ( DistanceBetweenPoints(udg_Loc, udg_Loc2) <= 400.00 ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func006C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0OU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A073' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A072' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A077' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A070' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A074' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func001Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0EG' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EI' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0EE' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08B' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A047' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03O' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03P' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03T' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03S' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A00U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09F' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func006C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h013' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01Z' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02M' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01R' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h01H' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05O' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05P' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06L' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CN' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0DH' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08I' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A076' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07H' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07A' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A08G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DV' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05S' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05Q' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h006' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h024' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h00C' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A020' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09H' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05X' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05W' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0G3' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05Z' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02O' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A068' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A04Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CY' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0MH' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02D' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h02G' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A098' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07K' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09A' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CF' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002Func002Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0G4' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0G5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A060' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A061' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A062' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A066' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A067' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06I' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h021' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h022' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'h023' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A09D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C4' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CX' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A063' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0FE' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A082' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A080' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0F8' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0ES' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0ET' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C2' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h004' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A035' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A054' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A01W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A005' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A059' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A01Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GD' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'h00I' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A04B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0GC' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A01F' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0H3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A00F' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BR' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0KN' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0DE' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A069' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06J' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BQ' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06A' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BP' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A04D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0G2' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0A0' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09S' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09T' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09X' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09Z' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func001C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func002Func001Func003C takes nothing returns boolean
if ( not ( IsTriggerEnabled(gg_trg_Dismount_1) == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func002Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) >= ( 25.00 + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) / 4.00 ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func002Func002Func003Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'Arpb' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07Z' ) ) then
return true
endif
return false
endfunction
function Trig_Global_Ability_Recipe_Func001Func002Func002Func003C takes nothing returns boolean
if ( not Trig_Global_Ability_Recipe_Func001Func002Func002Func003Func001C() ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AQ' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03H' ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Global_Ability_Recipe_Actions takes nothing returns nothing
if ( Trig_Global_Ability_Recipe_Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func002C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func002Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func002Func001Func003C() ) then
call SetUnitManaBJ( GetSpellAbilityUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellAbilityUnit()) - ( 25.00 + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) / 4.00 ) ) ) )
set udg_TempTargetUnit[1] = GetSpellTargetUnit()
call ConditionalTriggerExecute( gg_trg_Dismount_1 )
else
endif
else
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellAbilityUnit()), 0, 0, 10.00, ( "|c0000c400Troll:|r |c00ffff64Me needz to rest before doin' this hard task. It requirez " + ( R2S(( 25.00 + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) / 4.00 ) )) + " energy!|r" ) ) )
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Invention )
else
if ( Trig_Global_Ability_Recipe_Func001Func002Func002Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Resting_JASS )
else
endif
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Basic_Recipes )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Hunter_Recipes )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Inventor_Recipes )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Shaman_Recipes )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Warrior_Recipes )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Voodoo_Revive )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Pack_Buildings_and_Trap )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func002C() ) then
set udg_LocalPlayer = udg_SelectTempPlayer[GetUnitUserData(GetSpellAbilityUnit())]
call ConditionalTriggerExecute( gg_trg_Recipe_Cauldron )
else
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Totem_Ability_and_Effects )
else
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Armory_A )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func003Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Armory_B )
else
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Tannery_A )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Tannery_B )
else
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Workshop_A )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Workshop_B )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func002Func002Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Craft_an_Invention )
else
endif
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Voodoo_Hut )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_SpellBooks )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Imbue_Staff_and_Wand )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func002Func002Func002Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Imbue_Gauntlets_and_Boots )
else
endif
endif
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002C() ) then
set udg_Loc = GetUnitLoc(gg_unit_h01R_0069)
set udg_Loc2 = GetUnitLoc(udg_Hero_Troll[GetConvertedPlayerId(udg_SelectTempPlayer[13])])
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func003C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Troll_Merchant )
else
call DisplayTimedTextToPlayer( udg_LocalPlayer, 0, 0, 6.00, "TRIGSTR_217" )
endif
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Buy )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Sell )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func002Func007Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Voting )
else
endif
endif
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Recipe_Forge )
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func002Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Dissassemble_Item_1 )
else
endif
endif
else
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Global_Ability_Recipe_Func001Func001Func001Func002Func002Func002Func001Func001Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
call ConditionalTriggerExecute( gg_trg_Upgrade_Tower )
else
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Global_Ability_Recipe takes nothing returns nothing
set gg_trg_Global_Ability_Recipe = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Global_Ability_Recipe, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Global_Ability_Recipe, Condition( function Trig_Global_Ability_Recipe_Conditions ) )
call TriggerAddAction( gg_trg_Global_Ability_Recipe, function Trig_Global_Ability_Recipe_Actions )
endfunction
//TESH.scrollpos=145
//TESH.alwaysfold=0
function Voodoo_Revive takes nothing returns nothing
local integer i
local integer j
local integer id = 0
local integer ic = 0
local item it = null
local real x
local real y
local integer array itemId
local integer array recipeNumber
local unit shaman
local unit zombie
local player owner
// ------------- Set the variable ---------------
set shaman = udg_Hero_Troll[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1]
set x = GetUnitX(shaman)
set y = GetUnitY(shaman)
set owner = GetOwningPlayer(shaman)
set itemId[2] = 'I003'
set itemId[3] = 'I004'
set itemId[4] = 'I054'
set itemId[5] = 'I069'
set itemId[6] = 'I006'
set itemId[7] = 'I00B'
set itemId[8] = 'I03O'
set itemId[9] = 'I04K'
set itemId[10] = 'I005'
set itemId[11] = 'I05U'
set itemId[12] = 'I067'
set itemId[13] = 'I009'
set itemId[14] = 'I00D'
set itemId[15] = 'I00F'
set itemId[16] = 'I00A'
set itemId[17] = 'I01F'
set itemId[18] = 'I00C'
set itemId[19] = 'I01E'
set itemId[20] = 'I007'
set itemId[21] = 'I008'
set i = 1
loop
exitwhen i > 21
set recipeNumber[i] = 0
set i = i + 1
endloop
// ---------- " Here the trigger go through the inventory and take all the items needed for every recipes " ----------
// ------ in Jass when use the native:"UnitItemInSlot" the slot goes from 0 to 5 ----- the GUI Bj is "UnitItemInSlotSwapped" and goes from 1 to 6 (because it do slot+1) ------
set i = 0
loop
exitwhen i > 5
set id = GetItemTypeId(UnitItemInSlot(shaman, i))
set ic = GetItemCharges(UnitItemInSlot(shaman, i))
set it = UnitItemInSlot(shaman, i)
set j = 1
loop
exitwhen j > 21
if id == itemId[j] then
set recipeNumber[j] = recipeNumber[j] + ic
call RemoveItem(it)
endif
set j = j + 1
endloop
set i = i + 1
endloop
// ---------- " Here the trigger check if there are enough items to create the recipe " ----------
// ----------- recipe are checked from most powerfull to least powerfull, as soon as one recipe = true the trigger stop searching ----------
// --------- GetLastCreatedUnit() don't work with the non Bj (native) so i use a local variable --> zombie to store the unit to use in GetUnitName() -----
if ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 100.00 ) and recipeNumber[3] >= 2 and recipeNumber[4] >= 1 and recipeNumber[5] >= 4 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 100 ))
set recipeNumber[3] = recipeNumber[3] - 2
set recipeNumber[4] = recipeNumber[4] - 1
set recipeNumber[5] = recipeNumber[5] - 4
set zombie = CreateUnit(owner, 'u000', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, "|c0000c400Troll:|r |c00ffff64It'z alive! It'z ALIVE! Muahahahaaa!...|r" )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 200.00 ) and recipeNumber[2] >= 8 and recipeNumber[3] >= 3 and recipeNumber[6] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 200 ))
set recipeNumber[2] = recipeNumber[2] - 8
set recipeNumber[3] = recipeNumber[3] - 3
set recipeNumber[6] = recipeNumber[6] - 1
set zombie = CreateUnit(owner, 'n01W', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 200.00 ) and recipeNumber[2] >= 5 and recipeNumber[3] >= 4 and recipeNumber[7] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 200 ))
set recipeNumber[2] = recipeNumber[2] - 5
set recipeNumber[3] = recipeNumber[3] - 4
set recipeNumber[7] = recipeNumber[7] - 1
set zombie = CreateUnit(owner, 'n01V', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 100.00 ) and recipeNumber[2] >= 6 and recipeNumber[3] >= 2 and recipeNumber[8] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 100 ))
set recipeNumber[2] = recipeNumber[2] - 6
set recipeNumber[3] = recipeNumber[3] - 2
set recipeNumber[8] = recipeNumber[8] - 1
set zombie = CreateUnit(owner, 'n01Z', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 100.00 ) and recipeNumber[2] >= 2 and recipeNumber[9] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 100 ))
set recipeNumber[2] = recipeNumber[2] - 2
set recipeNumber[9] = recipeNumber[9] - 1
set zombie = CreateUnit(owner, 'n024', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 100.00 ) and recipeNumber[2] >= 3 and recipeNumber[3] >= 1 and recipeNumber[10] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 100 ))
set recipeNumber[2] = recipeNumber[2] - 3
set recipeNumber[3] = recipeNumber[3] - 1
set recipeNumber[10] = recipeNumber[10] - 1
set zombie = CreateUnit(owner, 'n02S', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 100.00 ) and recipeNumber[2] >= 6 and recipeNumber[3] >= 1 and recipeNumber[11] >= 1 and recipeNumber[12] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 100 ))
set recipeNumber[2] = recipeNumber[2] - 6
set recipeNumber[3] = recipeNumber[3] - 2
set recipeNumber[11] = recipeNumber[11] - 1
set recipeNumber[12] = recipeNumber[12] - 1
set zombie = CreateUnit(owner, 'n00I', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 80.00 ) and recipeNumber[2] >= 5 and recipeNumber[3] >= 1 and recipeNumber[12] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 80 ))
set recipeNumber[2] = recipeNumber[2] - 5
set recipeNumber[3] = recipeNumber[3] - 2
set recipeNumber[12] = recipeNumber[12] - 1
set zombie = CreateUnit(owner, 'n01X', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 80.00 ) and recipeNumber[2] >= 6 and recipeNumber[3] >= 2 and recipeNumber[13] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 80 ))
set recipeNumber[2] = recipeNumber[2] - 6
set recipeNumber[3] = recipeNumber[3] - 2
set recipeNumber[13] = recipeNumber[13] - 1
set zombie = CreateUnit(owner, 'n02I', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 60.00 ) and recipeNumber[2] >= 3 and recipeNumber[14] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 60 ))
set recipeNumber[2] = recipeNumber[2] - 3
set recipeNumber[14] = recipeNumber[14] - 1
set zombie = CreateUnit(owner, 'n021', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 60.00 ) and recipeNumber[2] >= 2 and recipeNumber[15] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 60 ))
set recipeNumber[2] = recipeNumber[2] - 2
set recipeNumber[15] = recipeNumber[15] - 1
set zombie = CreateUnit(owner, 'n029', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 60.00 ) and recipeNumber[2] >= 1 and recipeNumber[16] >= 1 and recipeNumber[17] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 60 ))
set recipeNumber[2] = recipeNumber[2] - 1
set recipeNumber[16] = recipeNumber[16] - 1
set recipeNumber[17] = recipeNumber[17] - 1
set zombie = CreateUnit(owner, 'n020', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 30.00 ) and recipeNumber[2] >= 2 and recipeNumber[18] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 30 ))
set recipeNumber[2] = recipeNumber[2] - 2
set recipeNumber[18] = recipeNumber[18] - 1
set zombie = CreateUnit(owner, 'n026', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 30.00 ) and recipeNumber[19] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 30 ))
set recipeNumber[19] = recipeNumber[19] - 1
set zombie = CreateUnit(owner, 'n02T', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 20.00 ) and recipeNumber[2] >= 1 and recipeNumber[20] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 20 ))
set recipeNumber[2] = recipeNumber[2] - 1
set recipeNumber[20] = recipeNumber[20] - 1
set zombie = CreateUnit(owner, 'n022', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 20.00 ) and recipeNumber[2] >= 1 and recipeNumber[21] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 20 ))
set recipeNumber[2] = recipeNumber[2] - 1
set recipeNumber[21] = recipeNumber[21] - 1
set zombie = CreateUnit(owner, 'n023', x, y, bj_UNIT_FACING )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
elseif ( GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) >= 30.00 ) and recipeNumber[2] >= 1 then
call SetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA, (GetUnitState(udg_Shaman_Crafting[GetPlayerId(GetOwningPlayer(GetTriggerUnit())) + 1], UNIT_STATE_MANA) - 30 ))
set recipeNumber[2] = recipeNumber[2] - 1
set zombie = CreateUnit(owner, 'h01P', x, y, bj_UNIT_FACING )
call SetUnitAbilityLevel(zombie, 'A0E0', 2 )
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz raised from the Dead a " + GetUnitName(zombie) + "!|r" ) )
else
call DisplayTimedTextToPlayer(owner, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64Me haz no powah or body partz for thiz Voodoo.|r" ) )
endif
set zombie = null
set owner = null
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set i = 1
loop
exitwhen i > 21
if recipeNumber[i] > 0 then
set id = itemId[i]
loop
exitwhen recipeNumber[i] == 0
set it = CreateItem(id, x, y )
call UnitAddItem(shaman, it )
set recipeNumber[i] = recipeNumber[i] - 1
endloop
endif
set i = i + 1
endloop
set shaman = null
endfunction
//===========================================================================
function InitTrig_Recipe_Voodoo_Revive takes nothing returns nothing
set gg_trg_Recipe_Voodoo_Revive = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Voodoo_Revive, function Voodoo_Revive )
endfunction
function Trig_Recipe_Cauldron_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0GD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Y' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03N' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08D' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A059' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A005' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05B' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03Q' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01W' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A054' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func019C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A035' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func021Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func021Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func021Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func021Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Cauldron_Func023Func001Func001Func001Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001Func001Func001Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Cauldron_Func023Func001Func001Func001Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001Func001Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Cauldron_Func023Func001Func001Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0GD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func002Func006Func003C takes nothing returns boolean
if ( not ( GetRandomInt(1, 4) <= udg_Job_Alchemy_Lvl[GetConvertedPlayerId(udg_LocalPlayer)] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func002Func006C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) <= udg_Job_Alchemy_Lvl[GetConvertedPlayerId(udg_LocalPlayer)] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func002Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func002C takes nothing returns boolean
if ( not Trig_Recipe_Cauldron_Func023Func002Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func023Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A035' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A054' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A01W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03Q' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05B' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A005' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A059' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A03N' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A01Y' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Cauldron_Func023C takes nothing returns boolean
if ( not Trig_Recipe_Cauldron_Func023Func003C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Func025Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Cauldron_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Cauldron_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Cauldron_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Cauldron_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Cauldron_Func019C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01A'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01B'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Aria and 1 Bardane." + "|r" ) )
set udg_RecipeName = "a Cure Wound Drink!|r"
set udg_RecipeItemType[7] = 'I021'
else
if ( Trig_Recipe_Cauldron_Func019Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01C'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01B'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Corian and 1 Bardane." + "|r" ) )
set udg_RecipeName = "a Stamina Booster!|r"
set udg_RecipeItemType[7] = 'I01R'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01A'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01D'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Aria and 1 Draximor." + "|r" ) )
set udg_RecipeName = "a Diet Drink!|r"
set udg_RecipeItemType[7] = 'I02M'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01A'
set udg_RecipeItemNumber[1] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 2 Aria." + "|r" ) )
set udg_RecipeName = "a Regeneration Balm!|r"
set udg_RecipeItemType[7] = 'I02D'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01C'
set udg_RecipeItemNumber[1] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 2 Corian." + "|r" ) )
set udg_RecipeName = "an Energizer Balm!|r"
set udg_RecipeItemType[7] = 'I02E'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01B'
set udg_RecipeItemNumber[1] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 2 Bardane." + "|r" ) )
set udg_RecipeName = "an Antidote!|r"
set udg_RecipeItemType[7] = 'I022'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01D'
set udg_RecipeItemNumber[1] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 2 Draximor." + "|r" ) )
set udg_RecipeName = "a Strong Liquor!|r"
set udg_RecipeItemType[7] = 'I01W'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01D'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01B'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Draximor and 1 Bardane." + "|r" ) )
set udg_RecipeName = "an Invisibility Elixir!|r"
set udg_RecipeItemType[7] = 'I024'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01A'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01C'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Aria and 1 Corian." + "|r" ) )
set udg_RecipeName = "a Frenzy Elixir!|r"
set udg_RecipeItemType[7] = 'I023'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01D'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01C'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Corian and 1 Draximor." + "|r" ) )
set udg_RecipeName = "a Vampire Elixir!|r"
set udg_RecipeItemType[7] = 'I04M'
else
if ( Trig_Recipe_Cauldron_Func019Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I027'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I04K'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01F'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I01E'
set udg_RecipeItemNumber[4] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "Me needz 1 Arrowz and 1 Venom." + "|r" ) )
set udg_RecipeName = "Envenomed Arrowz!|r"
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Cauldron_Func021Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Cauldron_Func021Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Cauldron_Func021Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Cauldron_Func021Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Cauldron_Func023C() ) then
if ( Trig_Recipe_Cauldron_Func023Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_Loc = GetUnitLoc(udg_RecipeUnit)
if ( Trig_Recipe_Cauldron_Func023Func002Func006C() ) then
call CreateItemLoc( 'kpin', udg_Loc )
set udg_Job_Alchemy_XP[GetConvertedPlayerId(udg_LocalPlayer)] = ( udg_Job_Alchemy_XP[GetConvertedPlayerId(udg_LocalPlayer)] + 50 )
else
call CreateItemLoc( udg_RecipeItemType[7], udg_Loc )
set udg_Job_Alchemy_XP[GetConvertedPlayerId(udg_LocalPlayer)] = ( udg_Job_Alchemy_XP[GetConvertedPlayerId(udg_LocalPlayer)] + 20 )
if ( Trig_Recipe_Cauldron_Func023Func002Func006Func003C() ) then
call CreateItemLoc( 'I047', udg_Loc )
else
endif
endif
call UnitAddItemSwapped( GetLastCreatedItem(), udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
call ConditionalTriggerExecute( gg_trg_Alchemy_Lvl )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Cauldron_Func023Func001C() ) then
if ( Trig_Recipe_Cauldron_Func023Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeName = "Tarantula Poisoned Arrowz!|r"
set udg_RecipeItemType[7] = 'I0A5'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Cauldron_Func023Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "Snake Poisoned Arrowz!|r"
set udg_RecipeItemType[7] = 'I0A4'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Cauldron_Func023Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeName = "Spider Poisoned Arrowz!|r"
set udg_RecipeItemType[7] = 'I0A3'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
else
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Cauldron_Func025Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Cauldron takes nothing returns nothing
set gg_trg_Recipe_Cauldron = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Cauldron, function Trig_Recipe_Cauldron_Actions )
endfunction
function Trig_Recipe_Armory_A_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C2' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0ET' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0ES' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0F8' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06U' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A080' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func037C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func039Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A080' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A082' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A080' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func004Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A080' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func004Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A080' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func004Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A080' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001Func003C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func001Func003Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06U' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0FD' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FE' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func001Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FE' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FD' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003Func007C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001Func003C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func003Func007C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0C2' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0ET' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0ES' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0F8' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Armory_A_Func041Func003Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041Func003C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func003Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func041C takes nothing returns boolean
if ( not Trig_Recipe_Armory_A_Func041Func002C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Func043Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_A_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Armory_A_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Armory_A_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Armory_A_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ========== Here are the basic null value for items ==========
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItem[6] = 0
set udg_RecipeItem[7] = 0
set udg_RecipeItem[8] = 0
set udg_RecipeItem[9] = 0
set udg_RecipeItem[10] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
set udg_RecipeItemType[5] = 'ward'
set udg_RecipeItemNumber[5] = 0
set udg_RecipeItemType[6] = 'ward'
set udg_RecipeItemNumber[6] = 0
set udg_RecipeItemType[7] = 'ward'
set udg_RecipeItemNumber[7] = 0
set udg_RecipeItemType[8] = 'ward'
set udg_RecipeItemNumber[8] = 0
set udg_RecipeItemType[9] = 'ward'
set udg_RecipeItemNumber[9] = 0
set udg_RecipeItemType[10] = 'ward'
set udg_RecipeItemNumber[10] = 0
// ========== Here Check wich ability has been casted ==========
if ( Trig_Recipe_Armory_A_Func037C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I04N'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I04Q'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I04O'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I04P'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I03I'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I03H'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I00Q'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I00P'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I01Q'
set udg_RecipeItemNumber[9] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 pair of Pig, Crab, Snake or Alligator Bootz or Bootz of Haste and 1 Bronze Bar.|r"
set udg_RecipeName = "Bronze Bootz!|r"
else
if ( Trig_Recipe_Armory_A_Func037Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I05Q'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I05I'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I05N'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I05O'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I051'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I05G'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I05B'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I05D'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I01Q'
set udg_RecipeItemNumber[9] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 pair of Pig, Crab, Snake or Alligator Gauntletz or Gauntletz of Fury and 1 Bronze Bar.|r"
set udg_RecipeName = "Bronze Gauntletz!|r"
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I039'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01U'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01T'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I03A'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I01Z'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Bronze Scale, Cuirass, Mail or Plate and 2 Iron Bar.|r"
set udg_RecipeName = "an Iron Armor!|r"
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00O'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I03G'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I03L'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I00N'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I01Q'
set udg_RecipeItemNumber[5] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Pig, Crab, Snake or Alligator Leather Coat and 2 Bronze Bar.|r"
set udg_RecipeName = "a Bronze Armor!|r"
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I08G'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I08P'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I08L'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I08I'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I00V'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I00U'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I03K'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I03J'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I03O'
set udg_RecipeItemNumber[9] = 1
set udg_RecipeItemType[10] = 'I010'
set udg_RecipeItemNumber[10] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Fur Coat or Lined Fur Coat, 1 Giant Shell and 1 Rope.|r"
set udg_RecipeName = "a Tortoise Armor!|r"
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I03U'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I06A'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Horned Shield and 1 Petrified Wood.|r"
set udg_RecipeName = "an Ironwood Shield!|r"
set udg_RecipeItemType[11] = 'I04E'
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00M'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I05U'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Tortoize Shield and 1 Antelope Horns.|r"
set udg_RecipeName = "a Horned Shield!|r"
set udg_RecipeItemType[11] = 'I03U'
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00C'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I011'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Tortoize Shell, 1 Wood and 1 Rope.|r"
set udg_RecipeName = "a Tortoize Shield!|r"
set udg_RecipeItemType[11] = 'I00M'
else
if ( Trig_Recipe_Armory_A_Func037Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I013'
set udg_RecipeItemNumber[1] = 3
set udg_RecipeItemType[2] = 'I08T'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 3 Flint and 1 Oil.|r"
set udg_RecipeName = "a Forge kit!|r"
set udg_RecipeItemType[11] = 'I01J'
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Armory_A_Func039Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_A_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Armory_A_Func041C() ) then
if ( Trig_Recipe_Armory_A_Func041Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Armory_A_Func041Func001C() ) then
if ( Trig_Recipe_Armory_A_Func041Func001Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func004C() ) then
set udg_RecipeName = "Bronze Alligator Leather Gauntletz of Fury!|r"
set udg_RecipeItemType[11] = 'I07Z'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func004Func001C() ) then
set udg_RecipeName = "Bronze Alligator Leather Bootz of Haste!|r"
set udg_RecipeItemType[11] = 'I07T'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func004C() ) then
set udg_RecipeName = "Bronze Snake Leather Gauntletz of Fury!|r"
set udg_RecipeItemType[11] = 'I082'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func004Func001C() ) then
set udg_RecipeName = "Bronze Snake Leather Bootz of Haste!|r"
set udg_RecipeItemType[11] = 'I07W'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func004C() ) then
set udg_RecipeName = "Bronze Crab Chitin Gauntletz of Fury!|r"
set udg_RecipeItemType[11] = 'I080'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func004Func001C() ) then
set udg_RecipeName = "Bronze Crab Chitin Bootz of Haste!|r"
set udg_RecipeItemType[11] = 'I07U'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func004C() ) then
set udg_RecipeName = "Bronze Pig Skin Gauntletz of Fury!|r"
set udg_RecipeItemType[11] = 'I081'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func004Func001C() ) then
set udg_RecipeName = "Bronze Pig Skin Bootz of Haste!|r"
set udg_RecipeItemType[11] = 'I07V'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func004C() ) then
set udg_RecipeName = "Bronze Alligator Leather Gauntletz!|r"
set udg_RecipeItemType[11] = 'I07S'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func004Func001C() ) then
set udg_RecipeName = "Bronze Alligator Leather Bootz!|r"
set udg_RecipeItemType[11] = 'I05Y'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func004C() ) then
set udg_RecipeName = "Bronze Snake Leather Gauntletz!|r"
set udg_RecipeItemType[11] = 'I086'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func004Func001C() ) then
set udg_RecipeName = "Bronze Snake Leather Bootz!|r"
set udg_RecipeItemType[11] = 'I085'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func004C() ) then
set udg_RecipeName = "Bronze Crab Chitin Gauntletz!|r"
set udg_RecipeItemType[11] = 'I07Y'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func004Func001C() ) then
set udg_RecipeName = "Bronze Crab Chitin Bootz!|r"
set udg_RecipeItemType[11] = 'I07X'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003C() ) then
set udg_RecipeName = "Bronze Pig Skin Gauntletz!|r"
set udg_RecipeItemType[11] = 'I084'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func003Func001Func001Func001Func001Func001Func001Func001Func003Func001C() ) then
set udg_RecipeName = "Bronze Pig Skin Bootz!|r"
set udg_RecipeItemType[11] = 'I083'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001C() ) then
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Lined Bear Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I0A9'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Lined Sabretooth Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I0AC'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Lined Racoon Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I0AB'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Lined Rabbit Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I0AA'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Bear Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I049'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Wolf Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I04G'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Racoon Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I09T'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Rabbit Fur Tortoize Armor!|r"
set udg_RecipeItemType[11] = 'I04F'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001C() ) then
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func004C() ) then
set udg_RecipeName = "a Bronze Plate!|r"
set udg_RecipeItemType[11] = 'I039'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func004Func003C() ) then
set udg_RecipeName = "an Iron Plate!|r"
set udg_RecipeItemType[11] = 'I04D'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func004C() ) then
set udg_RecipeName = "a Bronze Mail!|r"
set udg_RecipeItemType[11] = 'I01U'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func004Func004C() ) then
set udg_RecipeName = "an Iron Mail!|r"
set udg_RecipeItemType[11] = 'I04A'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func004C() ) then
set udg_RecipeName = "a Bronze Cuirass!|r"
set udg_RecipeItemType[11] = 'I01T'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func004Func004C() ) then
set udg_RecipeName = "an Iron Cuirass!|r"
set udg_RecipeItemType[11] = 'I04B'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001Func003C() ) then
set udg_RecipeName = "a Bronze Scale!|r"
set udg_RecipeItemType[11] = 'I03A'
else
if ( Trig_Recipe_Armory_A_Func041Func001Func001Func001Func002Func001Func001Func001Func003Func003C() ) then
set udg_RecipeName = "an Iron Scale!|r"
set udg_RecipeItemType[11] = 'I04C'
else
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
else
endif
endif
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Armory_A_Func043Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Armory_A takes nothing returns nothing
set gg_trg_Recipe_Armory_A = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Armory_A, function Trig_Recipe_Armory_A_Actions )
endfunction
function Trig_Recipe_Armory_B_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A063' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09G' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CX' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C5' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C4' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CU' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BV' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BU' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BS' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func020C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09D' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func022Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func022Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func022Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func022Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func022Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func001Func001Func012C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_B_Func024Func001Func001Func012C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A09G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A063' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Armory_B_Func024Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_B_Func024Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func002Func001Func009C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func002Func001C takes nothing returns boolean
if ( not Trig_Recipe_Armory_B_Func024Func002Func001Func009C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func002Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func002C takes nothing returns boolean
if ( not Trig_Recipe_Armory_B_Func024Func002Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func024Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A09D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0BV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CU' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C4' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C5' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CX' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Armory_B_Func024C takes nothing returns boolean
if ( not Trig_Recipe_Armory_B_Func024Func003C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Func026Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Armory_B_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Armory_B_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Armory_B_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Armory_B_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ========== Here are the basic null value for items ==========
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Armory_B_Func020C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I004'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Bone and 1 Rope.|r"
set udg_RecipeName = "a Bone Axe!|r"
set udg_RecipeItemType[7] = 'I028'
else
if ( Trig_Recipe_Armory_B_Func020Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I014'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c0000c400" + ( "You Need 1 Wood, 1 Stone and 1 Rope !!" + "|r" ) )
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Stone and 1 Rope.|r"
set udg_RecipeName = "a Stone Axe!|r"
set udg_RecipeItemType[7] = 'I01S'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01Q'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Bronze Bar and 1 Rope.|r"
set udg_RecipeName = "a Bronze Axe!|r"
set udg_RecipeItemType[7] = 'I00H'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01Z'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Iron Bar and 1 Rope.|r"
set udg_RecipeName = "an Iron Axe!|r"
set udg_RecipeItemType[7] = 'I02F'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I004'
set udg_RecipeItemNumber[2] = 2
set udg_RecipeItemType[3] = 'I012'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 2 Bone and 1 Tinder.|r"
set udg_RecipeName = "a Bone Club!|r"
set udg_RecipeItemType[7] = 'I02Z'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I004'
set udg_RecipeItemNumber[2] = 4
set udg_RecipeItemType[3] = 'I012'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 4 Bone and 1 Tinder.|r"
set udg_RecipeName = "a Big Bone Club!|r"
set udg_RecipeItemType[7] = 'I00G'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I05U'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I012'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Antelope Hornz and 1 Tinder.|r"
set udg_RecipeName = "a Spiked Club!|r"
set udg_RecipeItemType[7] = 'I00T'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I05U'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I012'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I054'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'skrt'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Antelope Hornz, 1 Skull and 1 Tinder.|r"
set udg_RecipeName = "a Big Spiked Club!|r"
set udg_RecipeItemType[7] = 'I017'
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I013'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Flint and 1 Rope.|r"
set udg_RecipeName = "Javelinz!|r"
set udg_RecipeItemType[7] = 'I08V'
set udg_RecipeItemNumber[7] = 10
else
if ( Trig_Recipe_Armory_B_Func020Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I014'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Stone and 1 Rope.|r"
set udg_RecipeName = "Throwing Axez!|r"
set udg_RecipeItemType[7] = 'I01V'
set udg_RecipeItemNumber[7] = 10
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Armory_B_Func022Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_B_Func022Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_B_Func022Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_B_Func022Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Armory_B_Func022Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Armory_B_Func024C() ) then
if ( Trig_Recipe_Armory_B_Func024Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Armory_B_Func024Func002Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
else
if ( Trig_Recipe_Armory_B_Func024Func001C() ) then
if ( Trig_Recipe_Armory_B_Func024Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_Loc = GetUnitLoc(udg_RecipeUnit)
call CreateItemLoc( udg_RecipeItemType[7], udg_Loc )
call SetItemCharges( GetLastCreatedItem(), udg_RecipeItemNumber[7] )
call UnitAddItemSwapped( GetLastCreatedItem(), udg_RecipeUnit )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Armory_B_Func026Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Armory_B takes nothing returns nothing
set gg_trg_Recipe_Armory_B = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Armory_B, function Trig_Recipe_Armory_B_Actions )
endfunction
function Trig_Recipe_Tannery_A_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CF' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05D' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09A' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0GB' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07K' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func022C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A098' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func024Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func024Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func024Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func024Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func024Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func002Func004Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func002Func004C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09A' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A09A' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05D' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CF' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0GB' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A098' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07K' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001Func005Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001Func005Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001Func005C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A098' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func004Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func004Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A098' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func004Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func004Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A098' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func004Func003Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func004Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A098' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026Func003C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func026C takes nothing returns boolean
if ( not Trig_Recipe_Tannery_A_Func026Func002C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Func028Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_A_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Tannery_A_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Tannery_A_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Tannery_A_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
set udg_RecipeItemType[5] = 'ward'
set udg_RecipeItemNumber[5] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Tannery_A_Func022C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I010'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I006'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I005'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I008'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I007'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Animal Fur and 1 Rope.|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I010'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I006'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I005'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I008'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I007'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Animal Fur and 1 Rope.|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I010'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00B'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I00A'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I00D'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I009'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Leather, Skin or Chitin and 1 Rope.|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I010'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00B'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I00A'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I00D'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I009'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Leather, Skin or Chitin and 1 Rope.|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I014'
set udg_RecipeItemNumber[2] = 2
set udg_RecipeItemType[3] = 'I009'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "We needz 2 Stone, 2 Wood and 1 Pig Skin." + "|r" ) )
set udg_RecipeName = "Troll Hut kit!|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I04R'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I04L'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I00Y'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I011'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I010'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Rope and 1 Dagger.|r"
set udg_RecipeName = "a Spear!|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I05U'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I013'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I004'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Bone or 1 Flint or 1 Antelope Hornz.|r"
set udg_RecipeName = "a Dagger!|r"
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I010'
set udg_RecipeItemNumber[1] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Rope.|r"
set udg_RecipeName = "a Net!|r"
set udg_RecipeItemType[7] = 'I00Z'
else
if ( Trig_Recipe_Tannery_A_Func022Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I012'
set udg_RecipeItemNumber[1] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Tinder.|r"
set udg_RecipeName = "Linen Cloth!|r"
set udg_RecipeItemType[7] = 'I05C'
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Tannery_A_Func024Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_A_Func024Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_A_Func024Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_A_Func024Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_A_Func024Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Tannery_A_Func026C() ) then
if ( Trig_Recipe_Tannery_A_Func026Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
if ( Trig_Recipe_Tannery_A_Func026Func003Func004C() ) then
set udg_RecipeName = "Bear Fur Bootz!|r"
set udg_RecipeItemType[7] = 'I03E'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func004Func003C() ) then
set udg_RecipeName = "Bear Fur Gauntletz!|r"
set udg_RecipeItemType[7] = 'I04Y'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func004Func003Func003C() ) then
set udg_RecipeName = "Alligator Leather Bootz!|r"
set udg_RecipeItemType[7] = 'I03I'
else
set udg_RecipeName = "Alligator Leather Gauntletz!|r"
set udg_RecipeItemType[7] = 'I051'
endif
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func004C() ) then
set udg_RecipeName = "Sabretooth Fur Bootz!|r"
set udg_RecipeItemType[7] = 'I03F'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func004Func003C() ) then
set udg_RecipeName = "Sabretooth Fur Gauntletz!|r"
set udg_RecipeItemType[7] = 'I05H'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func004Func003Func003C() ) then
set udg_RecipeName = "Snake Leather Bootz!|r"
set udg_RecipeItemType[7] = 'I03H'
else
set udg_RecipeName = "Snake Leather Gauntletz!|r"
set udg_RecipeItemType[7] = 'I05G'
endif
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func004C() ) then
set udg_RecipeName = "Racoon Fur Bootz!|r"
set udg_RecipeItemType[7] = 'I00X'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func004Func003C() ) then
set udg_RecipeName = "Racoon Fur Gauntletz!|r"
set udg_RecipeItemType[7] = 'I05F'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func004Func003Func003C() ) then
set udg_RecipeName = "Crab Chitin Bootz!|r"
set udg_RecipeItemType[7] = 'I00Q'
else
set udg_RecipeName = "Crab Chitin Gauntletz!|r"
set udg_RecipeItemType[7] = 'I05B'
endif
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001Func005C() ) then
set udg_RecipeName = "Rabbit Fur Bootz!|r"
set udg_RecipeItemType[7] = 'I00W'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001Func005Func003C() ) then
set udg_RecipeName = "Rabbit Fur Gauntletz!|r"
set udg_RecipeItemType[7] = 'I05E'
else
if ( Trig_Recipe_Tannery_A_Func026Func003Func001Func001Func001Func005Func003Func003C() ) then
set udg_RecipeName = "Pig Skin Bootz!|r"
set udg_RecipeItemType[7] = 'I00P'
else
set udg_RecipeName = "Pig Skin Gauntletz!|r"
set udg_RecipeItemType[7] = 'I05D'
endif
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
else
if ( Trig_Recipe_Tannery_A_Func026Func001C() ) then
if ( Trig_Recipe_Tannery_A_Func026Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "a Troll Hut kit!|r"
set udg_RecipeItemType[7] = 'I01I'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001C() ) then
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Horn Spear!|r"
set udg_RecipeItemType[7] = 'I04J'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func002Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "an Obsidian Spear!|r"
set udg_RecipeItemType[7] = 'I04I'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func002Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Bone Spear!|r"
set udg_RecipeItemType[7] = 'I000'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func001C() ) then
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001C() ) then
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeName = "a Horn Dagger!|r"
set udg_RecipeItemType[7] = 'I04R'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func002Func004C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeName = "an Obsidian Dagger!|r"
set udg_RecipeItemType[7] = 'I04L'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func002Func004Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "a Bone Dagger!|r"
set udg_RecipeItemType[7] = 'I00Y'
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
else
if ( Trig_Recipe_Tannery_A_Func026Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
else
endif
endif
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Tannery_A_Func028Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Tannery_A takes nothing returns nothing
set gg_trg_Recipe_Tannery_A = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Tannery_A, function Trig_Recipe_Tannery_A_Actions )
endfunction
function Trig_Recipe_Tannery_B_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06I' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06E' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A067' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A066' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A062' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A061' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A060' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05Y' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0G5' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func058C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0G4' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[16] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[15] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[14] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[13] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[12] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[11] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func060Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func001Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A060' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A061' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A062' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A066' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A067' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06I' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Tannery_B_Func062Func001Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0G5' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[16] >= udg_RecipeItemNumber[16] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[15] >= udg_RecipeItemNumber[15] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[14] >= udg_RecipeItemNumber[14] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[13] >= udg_RecipeItemNumber[13] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[12] >= udg_RecipeItemNumber[12] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[11] >= udg_RecipeItemNumber[11] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func062C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0G4' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Func064Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Tannery_B_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Tannery_B_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Tannery_B_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Tannery_B_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItem[6] = 0
set udg_RecipeItem[7] = 0
set udg_RecipeItem[8] = 0
set udg_RecipeItem[9] = 0
set udg_RecipeItem[10] = 0
set udg_RecipeItem[11] = 0
set udg_RecipeItem[12] = 0
set udg_RecipeItem[13] = 0
set udg_RecipeItem[14] = 0
set udg_RecipeItem[15] = 0
set udg_RecipeItem[16] = 0
set udg_RecipeItem[17] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
set udg_RecipeItemType[5] = 'ward'
set udg_RecipeItemNumber[5] = 0
set udg_RecipeItemType[6] = 'ward'
set udg_RecipeItemNumber[6] = 0
set udg_RecipeItemType[7] = 'ward'
set udg_RecipeItemNumber[7] = 0
set udg_RecipeItemType[8] = 'ward'
set udg_RecipeItemNumber[8] = 0
set udg_RecipeItemType[9] = 'ward'
set udg_RecipeItemNumber[9] = 0
set udg_RecipeItemType[10] = 'ward'
set udg_RecipeItemNumber[10] = 0
set udg_RecipeItemType[11] = 'ward'
set udg_RecipeItemNumber[11] = 0
set udg_RecipeItemType[12] = 'ward'
set udg_RecipeItemNumber[12] = 0
set udg_RecipeItemType[13] = 'ward'
set udg_RecipeItemNumber[13] = 0
set udg_RecipeItemType[14] = 'ward'
set udg_RecipeItemNumber[14] = 0
set udg_RecipeItemType[15] = 'ward'
set udg_RecipeItemNumber[15] = 0
set udg_RecipeItemType[16] = 'ward'
set udg_RecipeItemNumber[16] = 0
set udg_RecipeItemType[17] = 'ward'
set udg_RecipeItemNumber[17] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Tannery_B_Func058C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I05M'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I05K'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I05L'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I05P'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I056'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I055'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I058'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I057'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I04Y'
set udg_RecipeItemNumber[9] = 1
set udg_RecipeItemType[10] = 'I05H'
set udg_RecipeItemNumber[10] = 1
set udg_RecipeItemType[11] = 'I05F'
set udg_RecipeItemNumber[11] = 1
set udg_RecipeItemType[12] = 'I05E'
set udg_RecipeItemNumber[12] = 1
set udg_RecipeItemType[13] = 'I03E'
set udg_RecipeItemNumber[13] = 1
set udg_RecipeItemType[14] = 'I03F'
set udg_RecipeItemNumber[14] = 1
set udg_RecipeItemType[15] = 'I00X'
set udg_RecipeItemNumber[15] = 1
set udg_RecipeItemType[16] = 'I00W'
set udg_RecipeItemNumber[16] = 1
set udg_RecipeItemType[17] = 'I05C'
set udg_RecipeItemNumber[17] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 pair of Rabbit, Racoon, Sabretooth or Bear Gauntletz or Bootz and 1 Linen Cloth.|r"
set udg_RecipeName = "Lined Gauntletz or Bootz!|r"
else
if ( Trig_Recipe_Tannery_B_Func058Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00V'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00U'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I03K'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I03J'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I05C'
set udg_RecipeItemNumber[5] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Rabbit, Racoon, Sabretooth or Bear Coat and 2 Linen Cloth.|r"
set udg_RecipeName = "a Lined Coat!|r"
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I007'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Rabbit Fur, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Rabbit Fur Coat!|r"
set udg_RecipeItemType[18] = 'I03J'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I008'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Racoon Fur, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Racoon Fur Coat!|r"
set udg_RecipeItemType[18] = 'I03K'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I005'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Sabretooth Fur, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Sabretooth Fur Coat!|r"
set udg_RecipeItemType[18] = 'I00U'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I006'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Bear Fur, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Bear Fur Coat!|r"
set udg_RecipeItemType[18] = 'I00V'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I009'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Pig Skin, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Pig Skin Coat!|r"
set udg_RecipeItemType[18] = 'I00N'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00D'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Crab Chitin, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Crab Chitin Coat!|r"
set udg_RecipeItemType[18] = 'I03L'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00A'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Snake Leather, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "a Snake Leather Coat!|r"
set udg_RecipeItemType[18] = 'I03G'
else
if ( Trig_Recipe_Tannery_B_Func058Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I00B'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I010'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I067'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Alligator Leather, 1 Antelope Leather and 1 Rope.|r"
set udg_RecipeName = "an Alligator Leather Coat!|r"
set udg_RecipeItemType[18] = 'I00O'
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Tannery_B_Func060Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[11] = ( udg_RecipeItem[11] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[12] = ( udg_RecipeItem[12] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[13] = ( udg_RecipeItem[13] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[14] = ( udg_RecipeItem[14] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[15] = ( udg_RecipeItem[15] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[16] = ( udg_RecipeItem[16] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Tannery_B_Func060Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[17] = ( udg_RecipeItem[17] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Tannery_B_Func062C() ) then
if ( Trig_Recipe_Tannery_B_Func062Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Bear Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[18] = 'I08Q'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Wolf Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[18] = 'I08F'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Racoon Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[18] = 'I08E'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Rabbit Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[18] = 'I08D'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Bear Fur Bootz of Haste!|r"
set udg_RecipeItemType[18] = 'I08A'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Wolf Fur Bootz of Haste!|r"
set udg_RecipeItemType[18] = 'I08C'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Racoon Fur Bootz of Haste!|r"
set udg_RecipeItemType[18] = 'I08B'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Rabbit Fur Bootz of Haste!|r"
set udg_RecipeItemType[18] = 'I08R'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Bear Fur Gauntletz!|r"
set udg_RecipeItemType[18] = 'I089'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Wolf Fur Gauntletz!|r"
set udg_RecipeItemType[18] = 'I08O'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[11] = ( udg_RecipeItem[11] - udg_RecipeItemNumber[11] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Racoon Fur Gauntletz!|r"
set udg_RecipeItemType[18] = 'I08M'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[12] = ( udg_RecipeItem[12] - udg_RecipeItemNumber[12] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Rabbit Fur Gauntletz!|r"
set udg_RecipeItemType[18] = 'I08J'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[13] = ( udg_RecipeItem[13] - udg_RecipeItemNumber[13] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Bear Fur Bootz!|r"
set udg_RecipeItemType[18] = 'I088'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[14] = ( udg_RecipeItem[14] - udg_RecipeItemNumber[14] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Wolf Fur Bootz!|r"
set udg_RecipeItemType[18] = 'I08N'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[15] = ( udg_RecipeItem[15] - udg_RecipeItemNumber[15] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Racoon Fur Bootz!|r"
set udg_RecipeItemType[18] = 'I08K'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[16] = ( udg_RecipeItem[16] - udg_RecipeItemNumber[16] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "Lined Rabbit Fur Bootz!|r"
set udg_RecipeItemType[18] = 'I08H'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_Tannery_B_Func062Func001C() ) then
if ( Trig_Recipe_Tannery_B_Func062Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Lined Bear Fur Coat!|r"
set udg_RecipeItemType[18] = 'I08G'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func001Func002Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Lined Wolf Fur Coat!|r"
set udg_RecipeItemType[18] = 'I08P'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func001Func002Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Lined Racoon Fur Coat!|r"
set udg_RecipeItemType[18] = 'I08L'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Tannery_B_Func062Func001Func002Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Lined Rabbit Fur Coat!|r"
set udg_RecipeItemType[18] = 'I08I'
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
else
if ( Trig_Recipe_Tannery_B_Func062Func001Func001C() ) then
if ( Trig_Recipe_Tannery_B_Func062Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[18], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
endif
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 17
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Tannery_B_Func064Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Tannery_B takes nothing returns nothing
set gg_trg_Recipe_Tannery_B = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Tannery_B, function Trig_Recipe_Tannery_B_Actions )
endfunction
function Trig_Recipe_Workshop_A_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05W' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FB' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C3' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05X' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09H' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08C' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07Y' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func016C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A020' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func018Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func018Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func018Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func020Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A020' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07Y' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A09H' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05X' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0C3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FB' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05W' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Workshop_A_Func020Func002Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func020Func002C takes nothing returns boolean
if ( not Trig_Recipe_Workshop_A_Func020Func002Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func020C takes nothing returns boolean
if ( not Trig_Recipe_Workshop_A_Func020Func001C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Func022Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_A_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Workshop_A_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Workshop_A_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Workshop_A_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Workshop_A_Func016C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I03O'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I011'
set udg_RecipeItemNumber[2] = 2
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Giant Shell and 2 Wood.|r"
set udg_RecipeName = "a Boat kit!|r"
set udg_RecipeItemType[7] = 'I025'
else
if ( Trig_Recipe_Workshop_A_Func016Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I014'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Stone and 1 Rope.|r"
set udg_RecipeName = "a Repair Hammer!|r"
set udg_RecipeItemType[7] = 'I02G'
else
if ( Trig_Recipe_Workshop_A_Func016Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01Q'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I010'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Bronze Bar and 1 Rope.|r"
set udg_RecipeName = "a Mining Pick!|r"
set udg_RecipeItemType[7] = 'I09I'
else
if ( Trig_Recipe_Workshop_A_Func016Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood.|r"
set udg_RecipeName = "a Stockage Box kit!|r"
set udg_RecipeItemType[7] = 'I01L'
else
if ( Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I014'
set udg_RecipeItemNumber[1] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Stone.|r"
set udg_RecipeName = "a Wall kit!|r"
set udg_RecipeItemType[7] = 'I05J'
else
if ( Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 3
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 3 Wood.|r"
set udg_RecipeName = "a Watch Tower kit!|r"
set udg_RecipeItemType[7] = 'I02J'
else
if ( Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 3
set udg_RecipeItemType[2] = 'I08X'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 3 Wood and 1 Engine.|r"
set udg_RecipeName = "a Siege Tower kit!|r"
set udg_RecipeItemType[7] = 'I0AL'
else
if ( Trig_Recipe_Workshop_A_Func016Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I08X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I011'
set udg_RecipeItemNumber[2] = 3
set udg_RecipeItemType[3] = 'I01Q'
set udg_RecipeItemNumber[3] = 3
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Engine, 3 Wood and 3 Bronze Bar.|r"
set udg_RecipeName = "a Siege Machine kit!|r"
set udg_RecipeItemType[7] = 'I02L'
else
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Workshop_A_Func018Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Workshop_A_Func018Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Workshop_A_Func018Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Workshop_A_Func020C() ) then
if ( Trig_Recipe_Workshop_A_Func020Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 3
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Workshop_A_Func022Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Workshop_A takes nothing returns nothing
set gg_trg_Recipe_Workshop_A = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Workshop_A, function Trig_Recipe_Workshop_A_Actions )
endfunction
function Trig_Recipe_Workshop_B_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02D' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0MH' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CY' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AS' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0FV' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04Y' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06G' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A068' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02O' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func021C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05Z' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func023Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func023Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func023Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func023Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02D' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02O' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05Z' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04Y' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func025Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A068' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0FV' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0CY' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0MH' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Workshop_B_Func025C takes nothing returns boolean
if ( not Trig_Recipe_Workshop_B_Func025Func003C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Func027Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Workshop_B_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Workshop_B_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Workshop_B_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Workshop_B_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
set udg_RecipeItemType[7] = 'ward'
set udg_RecipeItemNumber[7] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Workshop_B_Func021C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02T'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01L'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01Q'
set udg_RecipeItemNumber[3] = 2
set udg_RecipeItemType[4] = 'I0AT'
set udg_RecipeItemNumber[4] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Shotgun, 1 Stockage Box kit and 2 Bronze Bar.|r"
set udg_RecipeName = "a Flamethrower!|r"
set udg_RecipeItemType[7] = 'I0AP'
else
if ( Trig_Recipe_Workshop_B_Func021Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02O'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I036'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I0AQ'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Gun and 1 Mana Crystal.|r"
set udg_RecipeName = "a Sniper Gun!|r"
set udg_RecipeItemType[7] = 'I0AU'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I013'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I011'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01Q'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Flint and 1 Bronze Bar.|r"
set udg_RecipeName = "a Gun!|r"
set udg_RecipeItemType[7] = 'I0AQ'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I013'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I011'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01Q'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Flint and 1 Bronze Bar.|r"
set udg_RecipeName = "a Shotgun!|r"
set udg_RecipeItemType[7] = 'I0AT'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02N'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01Q'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I046'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Bronze Bar, 1 Black Powder and 1 Fuel.|r"
set udg_RecipeName = "Rocketz!|r"
set udg_RecipeItemType[7] = 'I065'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02N'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I01Q'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Bronze Bar and 1 Black Powder.|r"
set udg_RecipeName = "a Remote Mine!|r"
set udg_RecipeItemType[7] = 'I02U'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02U'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I046'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Remote Mine and 2 Fuel.|r"
set udg_RecipeName = "a Bomb!|r"
set udg_RecipeItemType[7] = 'I037'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I033'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01Q'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I046'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Planz for Engine, 1 Bronze Bar and 1 Fuel.|r"
set udg_RecipeName = "an Engine!|r"
set udg_RecipeItemType[7] = 'I08X'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I08T'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood and 1 Oil.|r"
set udg_RecipeName = "a Torch!|r"
set udg_RecipeItemType[7] = 'I035'
else
if ( Trig_Recipe_Workshop_B_Func021Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I04K'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01E'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Spider, Snake or Tarantula Venom.|r"
set udg_RecipeName = "Poizon Gaz!|r"
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Workshop_B_Func023Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Workshop_B_Func023Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Workshop_B_Func023Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Workshop_B_Func023Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Workshop_B_Func025C() ) then
if ( Trig_Recipe_Workshop_B_Func025Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Workshop_B_Func025Func001C() ) then
if ( Trig_Recipe_Workshop_B_Func025Func001Func001C() ) then
set udg_Loc = GetUnitLoc(udg_RecipeUnit)
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call CreateItemLoc( udg_RecipeItemType[7], udg_Loc )
call SetItemCharges( GetLastCreatedItem(), 3 )
call UnitAddItemSwapped( GetLastCreatedItem(), udg_RecipeUnit )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003C() ) then
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002C() ) then
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002C() ) then
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002Func001C() ) then
set udg_RecipeName = "Strong Poizon Gaz!|n"
set udg_RecipeItemType[7] = 'I01X'
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002Func001Func001C() ) then
set udg_RecipeName = "Medium Poison Gaz!|r"
set udg_RecipeItemType[7] = 'I01Y'
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Workshop_B_Func025Func001Func003Func002Func002Func001Func001Func001C() ) then
set udg_RecipeName = "Weak Poison Gas!|r"
set udg_RecipeItemType[7] = 'I020'
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
else
endif
endif
endif
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 4
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Workshop_B_Func027Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Workshop_B takes nothing returns nothing
set gg_trg_Recipe_Workshop_B = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Workshop_B, function Trig_Recipe_Workshop_B_Actions )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func001001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 5)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func009001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I0B6' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I01A' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I01B' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) == 'I01C' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 5)) == 'I01D' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 5)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 5 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I0B5' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I08X' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I014' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I090' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I017' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I04U' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I090' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I00T' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I04U' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I090' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I00G' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I04U' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I090' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I02Z' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I04U' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 10 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func005001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I00R' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I002' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 10 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I01W' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I098' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I02F' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I031' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I098' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I00H' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I031' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I098' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I01S' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I031' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I098' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I028' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I031' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func005001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func006001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func009001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func010001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001Func011001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I0AH' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I011' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I05U' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) == 'I010' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func005001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func006001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func007001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func009001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func010001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001Func011001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I0AE' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I03O' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I067' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) == 'I010' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Func001Func002001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func003001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func004001 takes nothing returns boolean
return ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 1 )
endfunction
function Trig_Craft_an_Invention_Func001Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[1]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[2]) == true )
endfunction
function Trig_Craft_an_Invention_Func001Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetSpellAbilityUnit(), udg_Team[3]) == true )
endfunction
function Trig_Craft_an_Invention_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) == 'I05X' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) == 'I08X' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) >= 1 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) == 'I01Z' ) ) then
return false
endif
if ( not ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Craft_an_Invention_Actions takes nothing returns nothing
if ( Trig_Craft_an_Invention_Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I0AN', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3465" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3465" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3465" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func005001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func006001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func007001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 4) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 4), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I0AD', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func009001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3479" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func010001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3479" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func011001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3479" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func005001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func006001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 4) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 4), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I0AG', GetSpellAbilityUnit() )
call SetItemCharges( GetLastCreatedItem(), 10 )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func009001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3492" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func010001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3492" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func011001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3492" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I094', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3507" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3507" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3507" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I095', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3525" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3525" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3525" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I096', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3547" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3547" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3547" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I097', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3580" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3580" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3580" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 10 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I03R', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func005001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3610" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3610" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3610" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I053', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3667" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3667" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3667" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I091', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3686" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3686" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3686" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I092', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3692" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3692" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3692" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I093', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_3696" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_3696" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_3696" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 1), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 1)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 5 ) )
endif
call UnitAddItemByIdSwapped( 'I08S', GetSpellAbilityUnit() )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_1223" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_1223" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_1223" )
else
call DoNothing( )
endif
else
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func001001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 2), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 2)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func002001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 3), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 3)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func003001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 4) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 4), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 4)) - 1 ) )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func004001() ) then
call RemoveItem( UnitItemInSlotBJ(GetSpellAbilityUnit(), 5) )
else
call SetItemCharges( UnitItemInSlotBJ(GetSpellAbilityUnit(), 5), ( GetItemCharges(UnitItemInSlotBJ(GetSpellAbilityUnit(), 5)) - 1 ) )
endif
call UnitAddItemByIdSwapped( 'I047', GetSpellAbilityUnit() )
call SetItemCharges( GetLastCreatedItem(), 2 )
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func007001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, "TRIGSTR_6876" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func008001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, "TRIGSTR_6876" )
else
call DoNothing( )
endif
if ( Trig_Craft_an_Invention_Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func009001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, "TRIGSTR_6876" )
else
call DoNothing( )
endif
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Craft_an_Invention takes nothing returns nothing
set gg_trg_Craft_an_Invention = CreateTrigger( )
call TriggerAddAction( gg_trg_Craft_an_Invention, function Trig_Craft_an_Invention_Actions )
endfunction
function Trig_Recipe_Voodoo_Hut_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func031Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CN' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func031Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05K' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func031Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06L' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func031Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05P' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func031Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05O' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func031C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05N' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func033Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CN' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05K' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func004Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05P' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func004C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05O' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func005Func006Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05P' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func005Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05O' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func005C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05O' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05P' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06L' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func001C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001Func001Func011C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001Func001Func011C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func001C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002Func010C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035Func002C takes nothing returns boolean
if ( not Trig_Recipe_Voodoo_Hut_Func035Func002Func010C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func035C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05N' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Func037Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Voodoo_Hut_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Voodoo_Hut_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Voodoo_Hut_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Voodoo_Hut_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItem[6] = 0
set udg_RecipeItem[7] = 0
set udg_RecipeItem[8] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
set udg_RecipeItemType[5] = 'ward'
set udg_RecipeItemNumber[5] = 0
set udg_RecipeItemType[6] = 'ward'
set udg_RecipeItemNumber[6] = 0
set udg_RecipeItemType[7] = 'ward'
set udg_RecipeItemNumber[7] = 0
set udg_RecipeItemType[8] = 'ward'
set udg_RecipeItemNumber[8] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Voodoo_Hut_Func031C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I06K'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01N'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I036'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I03P'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I03Q'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I09E'
set udg_RecipeItemNumber[6] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Voodoo Mask, 1 Mana Stone and 1 Giant Egg.|r"
set udg_RecipeName = "a magical Voodoo Mask!|r"
else
if ( Trig_Recipe_Voodoo_Hut_Func031Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I06K'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01N'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I036'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I05U'
set udg_RecipeItemNumber[4] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Voodoo Mask, 1 Mana Stone and 1 Antelope Horns.|r"
set udg_RecipeName = "a magical Voodoo Mask!|r"
else
if ( Trig_Recipe_Voodoo_Hut_Func031Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I06K'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01N'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I036'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I06H'
set udg_RecipeItemNumber[4] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Voodoo Mask, 1 Mana Stone and 1 Shrunken Head.|r"
set udg_RecipeName = "a magical Voodoo Mask!|r"
else
if ( Trig_Recipe_Voodoo_Hut_Func031Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I06A'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I011'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I00E'
set udg_RecipeItemNumber[3] = 2
set udg_RecipeItemType[4] = 'I00F'
set udg_RecipeItemNumber[4] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood or Petrified Wood, 2 Fish Bone and 1 Feather.|r"
set udg_RecipeName = "a Voodoo Mask!|r"
else
if ( Trig_Recipe_Voodoo_Hut_Func031Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I011'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I014'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I013'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I08T'
set udg_RecipeItemNumber[4] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Wood, 1 Stone, 1 Flint and 1 Oil.|r"
set udg_RecipeName = "a Cauldron kit!|r"
set udg_RecipeItemType[8] = 'I016'
else
if ( Trig_Recipe_Voodoo_Hut_Func031Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I01A'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01B'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01C'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I01D'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I002'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I011'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I047'
set udg_RecipeItemNumber[7] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "We needz 1 Greatest Elixir and 1 Herb, Berry or Wood." + "|r" ) )
set udg_RecipeName = "magical Seedz!|r"
else
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Voodoo_Hut_Func033Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Voodoo_Hut_Func033Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Voodoo_Hut_Func033Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Voodoo_Hut_Func035C() ) then
if ( Trig_Recipe_Voodoo_Hut_Func035Func002C() ) then
set udg_RecipeName = "a Petrified Voodoo Mask of Life!|r"
set udg_RecipeItemType[8] = 'I06N'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func002Func001C() ) then
set udg_RecipeName = "a Petrified Voodoo Mask of Life!|r"
set udg_RecipeItemType[8] = 'I06N'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002C() ) then
set udg_RecipeName = "a Voodoo Mask of Life!|r"
set udg_RecipeItemType[8] = 'I03V'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001C() ) then
set udg_RecipeName = "a Voodoo Mask of Life!|r"
set udg_RecipeItemType[8] = 'I03V'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001C() ) then
set udg_RecipeName = "a Voodoo Mask of Life!|r"
set udg_RecipeItemType[8] = 'I03V'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func002Func001Func002Func001Func001Func001C() ) then
set udg_RecipeName = "a Petrified Voodoo Mask of Life!|r"
set udg_RecipeItemType[8] = 'I06N'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001C() ) then
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func004C() ) then
set udg_RecipeName = "a Petrified Demonic Voodoo Mask!|r"
set udg_RecipeItemType[8] = 'I074'
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func004Func001C() ) then
set udg_RecipeName = "a Petrified Ghostly Voodoo Mask!|r"
set udg_RecipeItemType[8] = 'I06X'
else
set udg_RecipeName = "a Petrified Voodoo Mask!|r"
set udg_RecipeItemType[8] = 'I06K'
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func005C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func005Func006C() ) then
set udg_RecipeName = "a Demonic Voodoo Mask!|r"
set udg_RecipeItemType[8] = 'I03W'
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func002Func005Func006Func001C() ) then
set udg_RecipeName = "a Ghostly Voodoo Mask!|r"
set udg_RecipeItemType[8] = 'I03X'
else
set udg_RecipeName = "a Voodoo Mask!|r"
set udg_RecipeItemType[8] = 'I01N'
endif
endif
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001C() ) then
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001C() ) then
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Seed of Aria!|r"
set udg_RecipeItemType[8] = 'I07O'
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz extracted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Seed of Bardane!|r"
set udg_RecipeItemType[8] = 'I07P'
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz extracted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Seed of Corian!|r"
set udg_RecipeItemType[8] = 'I07Q'
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz extracted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Seed of Draximor!|r"
set udg_RecipeItemType[8] = 'I07R'
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz extracted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Berry Seed!|r"
set udg_RecipeItemType[8] = 'I087'
call UnitAddItemByIdSwapped( udg_RecipeItemType[8], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz extracted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Voodoo_Hut_Func035Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "Tree Seedz!|r"
set udg_RecipeItemType[8] = 'I02I'
set udg_Loc = GetUnitLoc(udg_RecipeUnit)
call CreateItemLoc( udg_RecipeItemType[8], udg_Loc )
call SetItemCharges( GetLastCreatedItem(), GetRandomInt(5, 10) )
call UnitAddItemSwapped( GetLastCreatedItem(), udg_RecipeUnit )
call RemoveLocation(udg_Loc)
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz extracted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
else
endif
endif
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 7
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Voodoo_Hut_Func037Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Voodoo_Hut takes nothing returns nothing
set gg_trg_Recipe_Voodoo_Hut = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Voodoo_Hut, function Trig_Recipe_Voodoo_Hut_Actions )
endfunction
function Trig_Recipe_SpellBooks_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07A' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02R' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05U' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06V' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07H' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06W' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A076' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07E' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02E' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08I' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func037C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DH' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func039Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07A' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A02E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07E' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A076' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06W' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A07H' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05U' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A02R' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_SpellBooks_Func041Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001Func002C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08I' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041Func003C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func041C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DH' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Func043Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_SpellBooks_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_SpellBooks_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_SpellBooks_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_SpellBooks_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItem[6] = 0
set udg_RecipeItem[7] = 0
set udg_RecipeItem[8] = 0
set udg_RecipeItem[9] = 0
set udg_RecipeItem[10] = 0
set udg_RecipeItemType[1] = 'ward'
set udg_RecipeItemNumber[1] = 0
set udg_RecipeItemType[2] = 'ward'
set udg_RecipeItemNumber[2] = 0
set udg_RecipeItemType[3] = 'ward'
set udg_RecipeItemNumber[3] = 0
set udg_RecipeItemType[4] = 'ward'
set udg_RecipeItemNumber[4] = 0
set udg_RecipeItemType[5] = 'ward'
set udg_RecipeItemNumber[5] = 0
set udg_RecipeItemType[6] = 'ward'
set udg_RecipeItemNumber[6] = 0
set udg_RecipeItemType[7] = 'ward'
set udg_RecipeItemNumber[7] = 0
set udg_RecipeItemType[8] = 'ward'
set udg_RecipeItemNumber[8] = 0
set udg_RecipeItemType[9] = 'ward'
set udg_RecipeItemNumber[9] = 0
set udg_RecipeItemType[10] = 'ward'
set udg_RecipeItemNumber[10] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_SpellBooks_Func037C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I036'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I034'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I04Z'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I02A'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I031'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I02Y'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I032'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I050'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I059'
set udg_RecipeItemNumber[9] = 1
set udg_RecipeItemType[10] = 'I030'
set udg_RecipeItemNumber[10] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "We needz 1 minor Spell Book and 1 Mana Crystal." + "|r" ) )
set udg_RecipeName = "an empowered Spell Book!|r"
else
if ( Trig_Recipe_SpellBooks_Func037Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I04V'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I06C'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I06B'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I04U'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I04T'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I04S'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I06D'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I05A'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I052'
set udg_RecipeItemNumber[9] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = ( "|c00ffff64" + ( "We needz 2 different major Spell Books of the same magicz - Light, Shadow or Dark." + "|r" ) )
set udg_RecipeName = "an Arcanum!|r"
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01R'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Stamina Booster.|r"
set udg_RecipeName = "a Spell Book of Blink!|r"
set udg_RecipeItemType[11] = 'I034'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01W'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Strong Liquor.|r"
set udg_RecipeName = "a Spell Book of Mirror Imagez!|r"
set udg_RecipeItemType[11] = 'I04Z'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I024'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Invisibility Elixir.|r"
set udg_RecipeName = "a Spell Book of Vanish!|r"
set udg_RecipeItemType[11] = 'I02A'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I02E'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Energizer Balm.|r"
set udg_RecipeName = "a Spell Book of Haste!|r"
set udg_RecipeItemType[11] = 'I050'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I02M'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Diet Drink.|r"
set udg_RecipeName = "a Spell Book of Torture!|r"
set udg_RecipeItemType[11] = 'I030'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I02D'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Regeneration Balm.|r"
set udg_RecipeName = "a Spell Book of Regeneration!|r"
set udg_RecipeItemType[11] = 'I059'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I023'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Frenzy Elixir.|r"
set udg_RecipeName = "a Spell Book of Fireball!|r"
set udg_RecipeItemType[11] = 'I031'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I02X'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I00F'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I04M'
set udg_RecipeItemNumber[3] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Vampire Elixir.|r"
set udg_RecipeName = "a Spell Book of Handz of the Dead!|r"
set udg_RecipeItemType[11] = 'I02Y'
else
if ( Trig_Recipe_SpellBooks_Func037Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I020'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I01Y'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I01X'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I02X'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I00F'
set udg_RecipeItemNumber[5] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Parchment, 1 Feather and 1 Poison of any type.|r"
set udg_RecipeName = "a Spell Book of Malaria!|r"
set udg_RecipeItemType[11] = 'I032'
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_SpellBooks_Func039Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_SpellBooks_Func039Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_SpellBooks_Func041C() ) then
if ( Trig_Recipe_SpellBooks_Func041Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeName = "a Spell Book of Teleport!|r"
set udg_RecipeItemType[11] = 'I04V'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "a Spell Book of Double!|r"
set udg_RecipeItemType[11] = 'I06C'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeName = "a Spell Book of Invisibility!|r"
set udg_RecipeItemType[11] = 'I06B'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Spell Book of Lightning!|r"
set udg_RecipeItemType[11] = 'I04U'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeName = "a Spell Book of Freeze!|r"
set udg_RecipeItemType[11] = 'I04T'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Spell Book of Plague!|r"
set udg_RecipeItemType[11] = 'I04S'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeName = "a Spell Book of Group Haste!|r"
set udg_RecipeItemType[11] = 'I06D'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeName = "a Spell Book of Mass Heal!|r"
set udg_RecipeItemType[11] = 'I05A'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func003Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Spell Book of Hex!|r"
set udg_RecipeItemType[11] = 'I052'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz empowered " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_SpellBooks_Func041Func001C() ) then
if ( Trig_Recipe_SpellBooks_Func041Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeName = "an Arcanum of Shadow!|r"
set udg_RecipeItemType[11] = 'I060'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "an Arcanum of Shadow!|r"
set udg_RecipeItemType[11] = 'I060'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "an Arcanum of Shadow!|r"
set udg_RecipeItemType[11] = 'I060'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "an Arcanum of Darkness!|r"
set udg_RecipeItemType[11] = 'I062'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeName = "an Arcanum of Darkness!|r"
set udg_RecipeItemType[11] = 'I062'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeName = "an Arcanum of Darkness!|r"
set udg_RecipeItemType[11] = 'I062'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeName = "an Arcanum of Light!|r"
set udg_RecipeItemType[11] = 'I063'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeName = "an Arcanum of Light!|r"
set udg_RecipeItemType[11] = 'I063'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func002Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeName = "an Arcanum of Light!|r"
set udg_RecipeItemType[11] = 'I063'
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz created " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func001C() ) then
if ( Trig_Recipe_SpellBooks_Func041Func001Func001Func002C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz conjured " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func001Func001C() ) then
if ( Trig_Recipe_SpellBooks_Func041Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz conjured " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz conjured " + udg_RecipeName ) )
else
if ( Trig_Recipe_SpellBooks_Func041Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
call UnitAddItemByIdSwapped( udg_RecipeItemType[11], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz conjured " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
else
endif
endif
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_SpellBooks_Func043Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_SpellBooks takes nothing returns nothing
set gg_trg_Recipe_SpellBooks = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_SpellBooks, function Trig_Recipe_SpellBooks_Actions )
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func027Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A08G' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DV' ) ) then
return true
endif
return false
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func027Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DV' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func027C takes nothing returns boolean
if ( not Trig_Recipe_Imbue_Staff_and_Wand_Func027Func001C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[20] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[19] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[16] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[15] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[14] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[13] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[12] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[11] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[20] >= udg_RecipeItemNumber[20] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[19] >= udg_RecipeItemNumber[19] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[16] >= udg_RecipeItemNumber[16] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[15] >= udg_RecipeItemNumber[15] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[14] >= udg_RecipeItemNumber[14] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[13] >= udg_RecipeItemNumber[13] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[12] >= udg_RecipeItemNumber[12] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[11] >= udg_RecipeItemNumber[11] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08G' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[20] >= udg_RecipeItemNumber[20] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[19] >= udg_RecipeItemNumber[19] ) ) then
return false
endif
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[16] >= udg_RecipeItemNumber[16] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[15] >= udg_RecipeItemNumber[15] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[14] >= udg_RecipeItemNumber[14] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[13] >= udg_RecipeItemNumber[13] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[12] >= udg_RecipeItemNumber[12] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[11] >= udg_RecipeItemNumber[11] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func031C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DV' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Func033Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Staff_and_Wand_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItem[6] = 0
set udg_RecipeItem[7] = 0
set udg_RecipeItem[8] = 0
set udg_RecipeItem[9] = 0
set udg_RecipeItem[10] = 0
set udg_RecipeItem[11] = 0
set udg_RecipeItem[12] = 0
set udg_RecipeItem[13] = 0
set udg_RecipeItem[14] = 0
set udg_RecipeItem[15] = 0
set udg_RecipeItem[16] = 0
set udg_RecipeItem[17] = 0
set udg_RecipeItem[18] = 0
set udg_RecipeItem[19] = 0
set udg_RecipeItem[20] = 0
// ---------- " Here Check which ability has been casted" ----------
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func027C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func027Func003C() ) then
set udg_RecipeItemType[1] = 'I05W'
set udg_RecipeText = "|c00ffff64We needz 1 Staff and a Spell Book.|r"
set udg_RecipeName = "an imbued Staff!|r"
else
set udg_RecipeItemType[1] = 'I05V'
set udg_RecipeText = "|c00ffff64We needz 1 Wand and a Spell Book.|r"
set udg_RecipeName = "an imbued Wand!|r"
endif
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[3] = 'I034'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I06C'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I06B'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I04Z'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I04V'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I02A'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I031'
set udg_RecipeItemNumber[9] = 1
set udg_RecipeItemType[10] = 'I04T'
set udg_RecipeItemNumber[10] = 1
set udg_RecipeItemType[11] = 'I02Y'
set udg_RecipeItemNumber[11] = 1
set udg_RecipeItemType[12] = 'I04U'
set udg_RecipeItemNumber[12] = 1
set udg_RecipeItemType[13] = 'I032'
set udg_RecipeItemNumber[13] = 1
set udg_RecipeItemType[14] = 'I04S'
set udg_RecipeItemNumber[14] = 1
set udg_RecipeItemType[15] = 'I06D'
set udg_RecipeItemNumber[15] = 1
set udg_RecipeItemType[16] = 'I050'
set udg_RecipeItemNumber[16] = 1
set udg_RecipeItemType[17] = 'I052'
set udg_RecipeItemNumber[17] = 1
set udg_RecipeItemType[18] = 'I05A'
set udg_RecipeItemNumber[18] = 1
set udg_RecipeItemType[19] = 'I059'
set udg_RecipeItemNumber[19] = 1
set udg_RecipeItemType[20] = 'I030'
set udg_RecipeItemNumber[20] = 1
else
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[11] = ( udg_RecipeItem[11] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[12] = ( udg_RecipeItem[12] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[13] = ( udg_RecipeItem[13] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[14] = ( udg_RecipeItem[14] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[15] = ( udg_RecipeItem[15] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[16] = ( udg_RecipeItem[16] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[17] = ( udg_RecipeItem[17] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[18] = ( udg_RecipeItem[18] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[19] = ( udg_RecipeItem[19] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[20] = ( udg_RecipeItem[20] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031C() ) then
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "a Staff of Blink!|r"
set udg_RecipeItemType[22] = 'I071'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeName = "a Staff of Double!|r"
set udg_RecipeItemType[22] = 'I072'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Staff of Invisibility!|r"
set udg_RecipeItemType[22] = 'I07B'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeName = "a Staff of Mirror Imagez!|r"
set udg_RecipeItemType[22] = 'I07F'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Staff of Teleport!|r"
set udg_RecipeItemType[22] = 'I07M'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeName = "a Staff of Vanish!|r"
set udg_RecipeItemType[22] = 'I07N'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeName = "a Staff of Fireball!|r"
set udg_RecipeItemType[22] = 'I073'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Staff of Freeze!|r"
set udg_RecipeItemType[22] = 'I075'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[11] = ( udg_RecipeItem[11] - udg_RecipeItemNumber[11] )
set udg_RecipeName = "a Staff of Handz of the Dead!|r"
set udg_RecipeItemType[22] = 'I078'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[12] = ( udg_RecipeItem[12] - udg_RecipeItemNumber[12] )
set udg_RecipeName = "a Staff of Lightning!|r"
set udg_RecipeItemType[22] = 'I07C'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[13] = ( udg_RecipeItem[13] - udg_RecipeItemNumber[13] )
set udg_RecipeName = "a Staff of Malaria!|r"
set udg_RecipeItemType[22] = 'I07D'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[14] = ( udg_RecipeItem[14] - udg_RecipeItemNumber[14] )
set udg_RecipeName = "a Staff of Plague!|r"
set udg_RecipeItemType[22] = 'I07G'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[15] = ( udg_RecipeItem[15] - udg_RecipeItemNumber[15] )
set udg_RecipeName = "a Staff of Group Haste!|r"
set udg_RecipeItemType[22] = 'I076'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[16] = ( udg_RecipeItem[16] - udg_RecipeItemNumber[16] )
set udg_RecipeName = "a Staff of Haste!|r"
set udg_RecipeItemType[22] = 'I079'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "a Staff of Hex!|r"
set udg_RecipeItemType[22] = 'I07H'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "a Staff of Mass Heal!|r"
set udg_RecipeItemType[22] = 'I07E'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[19] = ( udg_RecipeItem[19] - udg_RecipeItemNumber[19] )
set udg_RecipeName = "a Staff of Regeneration!|r"
set udg_RecipeItemType[22] = 'I07I'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func003Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[20] = ( udg_RecipeItem[20] - udg_RecipeItemNumber[20] )
set udg_RecipeName = "a Staff of Torture!|r"
set udg_RecipeItemType[22] = 'I07K'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001C() ) then
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeName = "a Wand of Blink!|r"
set udg_RecipeItemType[22] = 'I06E'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeName = "a Wand of Double!|r"
set udg_RecipeItemType[22] = 'I06F'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeName = "a Wand of Invisibility!|r"
set udg_RecipeItemType[22] = 'I06O'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeName = "a Wand of Mirror Imagez!|r"
set udg_RecipeItemType[22] = 'I06S'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeName = "a Wand of Teleport!|r"
set udg_RecipeItemType[22] = 'I06Y'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeName = "a Wand of Vanish!|r"
set udg_RecipeItemType[22] = 'I06Z'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeName = "a Wand of Fireball!|r"
set udg_RecipeItemType[22] = 'I06G'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeName = "a Wand of Freeze!|r"
set udg_RecipeItemType[22] = 'I06I'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[11] = ( udg_RecipeItem[11] - udg_RecipeItemNumber[11] )
set udg_RecipeName = "a Wand of Handz of the Dead!|r"
set udg_RecipeItemType[22] = 'I06L'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[12] = ( udg_RecipeItem[12] - udg_RecipeItemNumber[12] )
set udg_RecipeName = "a Wand of Lightning!|r"
set udg_RecipeItemType[22] = 'I06P'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[13] = ( udg_RecipeItem[13] - udg_RecipeItemNumber[13] )
set udg_RecipeName = "a Wand of Malaria!|r"
set udg_RecipeItemType[22] = 'I06Q'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[14] = ( udg_RecipeItem[14] - udg_RecipeItemNumber[14] )
set udg_RecipeName = "a Wand of Plague!|r"
set udg_RecipeItemType[22] = 'I06T'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[15] = ( udg_RecipeItem[15] - udg_RecipeItemNumber[15] )
set udg_RecipeName = "a Wand of Group Haste!|r"
set udg_RecipeItemType[22] = 'I06J'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[16] = ( udg_RecipeItem[16] - udg_RecipeItemNumber[16] )
set udg_RecipeName = "a Wand of Haste!|r"
set udg_RecipeItemType[22] = 'I06M'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeName = "a Wand of Hex!|r"
set udg_RecipeItemType[22] = 'I06U'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "a Wand of Mass Heal!|r"
set udg_RecipeItemType[22] = 'I06R'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[19] = ( udg_RecipeItem[19] - udg_RecipeItemNumber[19] )
set udg_RecipeName = "a Wand of Regeneration!|r"
set udg_RecipeItemType[22] = 'I06V'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func031Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[20] = ( udg_RecipeItem[20] - udg_RecipeItemNumber[20] )
set udg_RecipeName = "a Wand of Torture!|r"
set udg_RecipeItemType[22] = 'I06W'
call UnitAddItemByIdSwapped( udg_RecipeItemType[22], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 20
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Imbue_Staff_and_Wand_Func033Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Imbue_Staff_and_Wand takes nothing returns nothing
set gg_trg_Recipe_Imbue_Staff_and_Wand = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Imbue_Staff_and_Wand, function Trig_Recipe_Imbue_Staff_and_Wand_Actions )
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func004Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func004C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func025Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05Q' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func025C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05S' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[17] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[16] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[15] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[14] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[13] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[12] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[11] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[10] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[9] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[8] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[7] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[6] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[5] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[4] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[3] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[16] >= udg_RecipeItemNumber[16] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[15] >= udg_RecipeItemNumber[15] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[14] >= udg_RecipeItemNumber[14] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[13] >= udg_RecipeItemNumber[13] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[12] >= udg_RecipeItemNumber[12] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[11] >= udg_RecipeItemNumber[11] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[16] >= udg_RecipeItemNumber[16] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[15] >= udg_RecipeItemNumber[15] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[14] >= udg_RecipeItemNumber[14] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[13] >= udg_RecipeItemNumber[13] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[12] >= udg_RecipeItemNumber[12] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[11] >= udg_RecipeItemNumber[11] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[10] >= udg_RecipeItemNumber[10] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[9] >= udg_RecipeItemNumber[9] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[8] >= udg_RecipeItemNumber[8] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[7] >= udg_RecipeItemNumber[7] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[6] >= udg_RecipeItemNumber[6] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[5] >= udg_RecipeItemNumber[5] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[4] >= udg_RecipeItemNumber[4] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[3] >= udg_RecipeItemNumber[3] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[17] >= udg_RecipeItemNumber[17] ) ) then
return false
endif
if ( not ( udg_RecipeItem[18] >= udg_RecipeItemNumber[18] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05Q' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05S' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Func031Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Imbue_Gauntlets_and_Boots_Actions takes nothing returns nothing
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func004C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func004Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func004Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
set udg_RecipeItem[3] = 0
set udg_RecipeItem[4] = 0
set udg_RecipeItem[5] = 0
set udg_RecipeItem[6] = 0
set udg_RecipeItem[7] = 0
set udg_RecipeItem[8] = 0
set udg_RecipeItem[9] = 0
set udg_RecipeItem[10] = 0
set udg_RecipeItem[11] = 0
set udg_RecipeItem[12] = 0
set udg_RecipeItem[13] = 0
set udg_RecipeItem[14] = 0
set udg_RecipeItem[15] = 0
set udg_RecipeItem[16] = 0
set udg_RecipeItem[17] = 0
set udg_RecipeItem[18] = 0
// ========== Here Check wich ability has been casted ==========
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func025C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I07S'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I086'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I07Y'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I084'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I089'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I08O'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I08M'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I08J'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I04Y'
set udg_RecipeItemNumber[9] = 1
set udg_RecipeItemType[10] = 'I05H'
set udg_RecipeItemNumber[10] = 1
set udg_RecipeItemType[11] = 'I05F'
set udg_RecipeItemNumber[11] = 1
set udg_RecipeItemType[12] = 'I05E'
set udg_RecipeItemNumber[12] = 1
set udg_RecipeItemType[13] = 'I051'
set udg_RecipeItemNumber[13] = 1
set udg_RecipeItemType[14] = 'I05G'
set udg_RecipeItemNumber[14] = 1
set udg_RecipeItemType[15] = 'I05B'
set udg_RecipeItemNumber[15] = 1
set udg_RecipeItemType[16] = 'I05D'
set udg_RecipeItemNumber[16] = 1
set udg_RecipeItemType[17] = 'I036'
set udg_RecipeItemNumber[17] = 1
set udg_RecipeItemType[18] = 'I00F'
set udg_RecipeItemNumber[18] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 pair of any Gauntletz, 1 Mana Stone and 1 Feather.|r"
set udg_RecipeName = "imbued Gauntletz!|r"
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func025Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I05Y'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I085'
set udg_RecipeItemNumber[2] = 1
set udg_RecipeItemType[3] = 'I07X'
set udg_RecipeItemNumber[3] = 1
set udg_RecipeItemType[4] = 'I083'
set udg_RecipeItemNumber[4] = 1
set udg_RecipeItemType[5] = 'I088'
set udg_RecipeItemNumber[5] = 1
set udg_RecipeItemType[6] = 'I08N'
set udg_RecipeItemNumber[6] = 1
set udg_RecipeItemType[7] = 'I08K'
set udg_RecipeItemNumber[7] = 1
set udg_RecipeItemType[8] = 'I08H'
set udg_RecipeItemNumber[8] = 1
set udg_RecipeItemType[9] = 'I03E'
set udg_RecipeItemNumber[9] = 1
set udg_RecipeItemType[10] = 'I03F'
set udg_RecipeItemNumber[10] = 1
set udg_RecipeItemType[11] = 'I00X'
set udg_RecipeItemNumber[11] = 1
set udg_RecipeItemType[12] = 'I00W'
set udg_RecipeItemNumber[12] = 1
set udg_RecipeItemType[13] = 'I03I'
set udg_RecipeItemNumber[13] = 1
set udg_RecipeItemType[14] = 'I03H'
set udg_RecipeItemNumber[14] = 1
set udg_RecipeItemType[15] = 'I00Q'
set udg_RecipeItemNumber[15] = 1
set udg_RecipeItemType[16] = 'I00P'
set udg_RecipeItemNumber[16] = 1
set udg_RecipeItemType[17] = 'I036'
set udg_RecipeItemNumber[17] = 1
set udg_RecipeItemType[18] = 'I00F'
set udg_RecipeItemNumber[18] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 pair of any Bootz, 1 Mana Stone and 1 Feather.|r"
set udg_RecipeName = "imbued Bootz!|r"
else
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[11] = ( udg_RecipeItem[11] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[12] = ( udg_RecipeItem[12] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[13] = ( udg_RecipeItem[13] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[14] = ( udg_RecipeItem[14] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[15] = ( udg_RecipeItem[15] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[16] = ( udg_RecipeItem[16] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[17] = ( udg_RecipeItem[17] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func027Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[18] = ( udg_RecipeItem[18] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029C() ) then
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Alligator Leather Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I07Z'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Snake Leather Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I082'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Crab Chitin Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I080'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Pig Skin Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I081'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Bear Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I08Q'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Sabretooth Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I08F'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Racoon Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I08E'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Rabbit Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I08D'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bear Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05M'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Sabretooth Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05K'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[11] = ( udg_RecipeItem[11] - udg_RecipeItemNumber[11] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Racoon Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05L'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[12] = ( udg_RecipeItem[12] - udg_RecipeItemNumber[12] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Rabbit Fur Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05P'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[13] = ( udg_RecipeItem[13] - udg_RecipeItemNumber[13] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Alligator Leather Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05Q'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[14] = ( udg_RecipeItem[14] - udg_RecipeItemNumber[14] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Snake Leather Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05I'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[15] = ( udg_RecipeItem[15] - udg_RecipeItemNumber[15] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Crab Chitin Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05N'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[16] = ( udg_RecipeItem[16] - udg_RecipeItemNumber[16] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Pig Skin Gauntletz of Fury!|r"
set udg_RecipeItemType[19] = 'I05O'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002C() ) then
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Alligator Leather Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I07T'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Snake Leather Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I07W'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001C() ) then
set udg_RecipeItem[3] = ( udg_RecipeItem[3] - udg_RecipeItemNumber[3] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Crab Chitin Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I07U'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001C() ) then
set udg_RecipeItem[4] = ( udg_RecipeItem[4] - udg_RecipeItemNumber[4] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bronze Pig Skin Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I07V'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[5] = ( udg_RecipeItem[5] - udg_RecipeItemNumber[5] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Bear Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I08A'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[6] = ( udg_RecipeItem[6] - udg_RecipeItemNumber[6] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Sabretooth Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I08C'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[7] = ( udg_RecipeItem[7] - udg_RecipeItemNumber[7] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Racoon Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I08B'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[8] = ( udg_RecipeItem[8] - udg_RecipeItemNumber[8] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Lined Rabbit Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I08R'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[9] = ( udg_RecipeItem[9] - udg_RecipeItemNumber[9] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Bear Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I056'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[10] = ( udg_RecipeItem[10] - udg_RecipeItemNumber[10] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Sabretooth Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I055'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[11] = ( udg_RecipeItem[11] - udg_RecipeItemNumber[11] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Racoon Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I058'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[12] = ( udg_RecipeItem[12] - udg_RecipeItemNumber[12] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Rabbit Fur Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I057'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[13] = ( udg_RecipeItem[13] - udg_RecipeItemNumber[13] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Alligator Leather Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I04N'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[14] = ( udg_RecipeItem[14] - udg_RecipeItemNumber[14] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Snake Leather Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I04Q'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[15] = ( udg_RecipeItem[15] - udg_RecipeItemNumber[15] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Crab Chitin Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I04O'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func029Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
set udg_RecipeItem[16] = ( udg_RecipeItem[16] - udg_RecipeItemNumber[16] )
set udg_RecipeItem[17] = ( udg_RecipeItem[17] - udg_RecipeItemNumber[17] )
set udg_RecipeItem[18] = ( udg_RecipeItem[18] - udg_RecipeItemNumber[18] )
set udg_RecipeName = "Pig Skin Bootz of Haste!|r"
set udg_RecipeItemType[19] = 'I04P'
call UnitAddItemByIdSwapped( udg_RecipeItemType[19], udg_RecipeUnit )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz crafted " + udg_RecipeName ) )
else
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 18
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Imbue_Gauntlets_and_Boots_Func031Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Imbue_Gauntlets_and_Boots takes nothing returns nothing
set gg_trg_Recipe_Imbue_Gauntlets_and_Boots = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Imbue_Gauntlets_and_Boots, function Trig_Recipe_Imbue_Gauntlets_and_Boots_Actions )
endfunction
//TESH.scrollpos=60
//TESH.alwaysfold=0
function Troll_Merchant takes nothing returns nothing
local integer price1 = 0
local integer price2 = 0
local integer quantity1 = 0
local integer quantity2 = 0
local integer itemId = 0
local integer itemId1 = 0
local integer itemId2 = 0
local integer id = 0
local integer ic = 0
local integer abi = 0
local integer i = 0
local boolean bought = false
local string itemName
local string itemText
local real x
local real y
local unit merchant
local player buyer
local item it = null
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set merchant = GetTriggerUnit()
set x = GetUnitX(merchant)
set y = GetUnitY(merchant)
set abi = GetSpellAbilityId()
set buyer = udg_SelectTempPlayer[13]
// ---------- " Here Check which ability has been casted" ----------
if abi == 'A073' then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set itemId1 = 'I03B'
set price1 = 100
set itemId2 = 'I02V'
set price2 = 1
set itemText = "|c00ffff64We needz 1 Pact with the Devil and 100 Gold.|r"
set itemName = "a New Soul Pact!|r"
set itemId = 'I043'
elseif abi == 'A072' then
set itemId1 = 'I03B'
set price1 = 20
set itemId2 = 'I02X'
set itemText = "|c00ffff64We needz 20 Gold.|r"
set itemName = "a Pipe of Joy!|r"
set itemId = 'I042'
elseif abi == 'A077' then
set itemId1 = 'I03B'
set price1 = 10
set itemText = "|c00ffff64We needz 10 Gold.|r"
set itemName = "a Greatest Elixir!|r"
set itemId = 'I047'
elseif abi == 'A070' then
set itemId2 = 'I02X'
set price2 = 1
set itemText = "|c00ffff64We needz 1 Parchment.|r"
set itemName = "a Trading Agreement!|r"
set itemId = 'I03Z'
elseif abi == 'A074' then
set itemId1 = 'I03B'
set price1 = 25
set itemText = "|c00ffff64We needz 25 Gold.|r"
set itemName = "a Soul Map!|r"
set itemId = 'I09D'
elseif abi == 'A0OU' then
set itemId1 = 'I03B'
set price1 = 5
set itemText = "|c00ffff64We needz 5 Gold.|r"
set itemName = "a Parchment!|r"
set itemId = 'I02X'
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
loop
exitwhen i > 5
set id = GetItemTypeId(UnitItemInSlot(merchant, i))
set ic = GetItemCharges(UnitItemInSlot(merchant, i))
set it = UnitItemInSlot(merchant, i)
if id == itemId1 then
set quantity1 = quantity1 + ic
call RemoveItem( it )
elseif id == itemId2 then
set quantity2 = quantity2 + ic
call RemoveItem( it )
endif
set i = i + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if abi == 'A0OU' or abi == 'A077' or abi == 'A074' then
if quantity1 >= price1 then
set quantity1 = quantity1 - price1
set bought = true
endif
elseif abi == 'A070' then
if quantity2 >= price2 then
set quantity2 = quantity2 - price2
set bought = true
endif
elseif abi == 'A073' or abi == 'A072' then
if quantity1 >= price1 and quantity2 >= price2 then
set quantity1 = quantity1 - price1
set quantity2 = quantity2 - price2
set bought = true
endif
endif
if bought then
call CreateItem( itemId, x, y )
call DisplayTimedTextToPlayer( buyer, 0, 0, 6.00, "|c0000c400Troll:|r |c00ffff64We haz bought " + itemName )
else
call DisplayTimedTextToPlayer( buyer, 0, 0, 6.00, "|c0000c400Troll:|r |c00ffff64We haz no gold for " + itemName )
call DisplayTimedTextToPlayer( buyer, 0, 0, 6.00, itemText )
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
if quantity1 > 0 then
set it = CreateItem( 'I03B', x, y )
call SetItemCharges( it, quantity1 )
call UnitAddItem( merchant, it )
endif
loop
exitwhen quantity2 == 0
call UnitAddItemById( merchant, itemId2 )
set quantity2 = quantity2 - 1
endloop
set it = null
set merchant = null
set buyer = null
endfunction
//===========================================================================
function InitTrig_Recipe_Troll_Merchant takes nothing returns nothing
set gg_trg_Recipe_Troll_Merchant = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Troll_Merchant, function Troll_Merchant )
endfunction
//TESH.scrollpos=69
//TESH.alwaysfold=0
function Recipe_Buy takes nothing returns nothing
local integer i = 0
local integer gold = 0
local integer price = 0
local integer itemId = 0
local integer abi = 0
local integer team = 0
local integer id = 0
local integer ic = 0
local real x
local real y
local string itemName
local string itemPrice
local unit merchant
local item it = null
local player buyer
// ---------- " set the variable " ----------
set merchant = GetTriggerUnit()
set buyer = udg_SelectTempPlayer[GetUnitUserData(merchant)]
set abi = GetSpellAbilityId()
set x = GetUnitX(merchant)
set y = GetUnitY(merchant)
if IsUnitInForce(merchant, udg_Team[1]) == true then
set team = 1
elseif IsUnitInForce(merchant, udg_Team[2]) == true then
set team = 2
elseif IsUnitInForce(merchant, udg_Team[3]) == true then
set team = 3
endif
// ---------- " Check the ability casted and set the price, the item type and the text displayed" ----------
if abi == 'A03W' or abi == 'A047' or abi == 'A03O' or abi == 'A03R' or abi == 'A03P' or abi == 'A03S' or abi == 'A03T' or abi == 'A03U' then
set price = 4
set itemPrice = "|c00ffff64We needz 4 Gold.|r"
if abi == 'A03W' then
set itemName = "Aria!|r"
set itemId = 'I01A'
elseif abi == 'A047' then
set itemName = "Bardane!|r"
set itemId = 'I01B'
elseif abi == 'A03O' then
set itemName = "Corian!|r"
set itemId = 'I01C'
elseif abi == 'A03R' then
set itemName = "Draximor!|r"
set itemId = 'I01D'
elseif abi == 'A03P' then
set itemName = "Wood!|r"
set itemId = 'I011'
elseif abi == 'A03S' then
set itemName = "Stone!|r"
set itemId = 'I014'
elseif abi == 'A03T' then
set itemName = "Flint!|r"
set itemId = 'I013'
elseif abi == 'A03U' then
set itemName = "Tinder!|r"
set itemId = 'I012'
endif
elseif abi == 'A00U' then
set price = 10
set itemPrice = "|c00ffff64We needz 10 Gold.|r"
set itemName = "Oil!|r"
set itemId = 'I08T'
elseif abi == 'A09F' then
set price = 20
set itemPrice = "|c00ffff64We needz 20 Gold.|r"
set itemName = "Mana Stone!|r"
set itemId = 'I036'
endif
// ---------- " Here the trigger go through the inventory and take all golds " ----------
loop
exitwhen i > 5
set id = GetItemTypeId(UnitItemInSlot(merchant, i))
set ic = GetItemCharges(UnitItemInSlot(merchant, i))
set it = UnitItemInSlot(merchant, i)
if id == 'I03B' then
set gold = gold + ic
call RemoveItem(it)
set it = null
endif
set i = i + 1
endloop
// ---------- " Here the trigger check the gold versus the price and create the item and give back the gold " ----------
if gold >= price then
set gold = gold - price
set it = CreateItem( itemId, x, y )
call UnitAddItem( merchant, it )
if gold > 0 then
set it = CreateItem( 'I03B', x, y )
call SetItemCharges( it, gold )
call UnitAddItem( merchant, it )
endif
call DisplayTimedTextToPlayer( buyer, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz bought " + itemName ) )
// --------- " Add Xp to merchant ability for buying items and check if ability is leveled up" -------------
set udg_Job_Merchant_Xp[team] = ( udg_Job_Merchant_Xp[team] + ( price * 2 ) )
if udg_Job_Merchant_Lvl[team] < 3 then
set udg_B = team
call TriggerExecute( gg_trg_Merchant_Lvl )
endif
else
call DisplayTimedTextToPlayer( buyer, 0, 0, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no gold for " + itemName ) )
call DisplayTimedTextToPlayer( buyer, 0, 0, 6.00, itemPrice )
if gold > 0 then
set it = CreateItem( 'I03B', x, y )
call SetItemCharges( it, gold )
call UnitAddItem( merchant, it )
endif
endif
set it = null
set buyer = null
set merchant = null
endfunction
//===========================================================================
function InitTrig_Recipe_Buy takes nothing returns nothing
set gg_trg_Recipe_Buy = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Buy, function Recipe_Buy )
endfunction
//TESH.scrollpos=35
//TESH.alwaysfold=0
function Sell_Actions takes nothing returns nothing
local integer i = 0
local integer value = 0
local integer quantity = 0
local integer total = 0
local integer team = 0
local integer bonus = 0
local integer bonus1 = 0
local integer bonus2 = 0
local real x
local real y
local unit seller
local item it = null
local player owner
// Set variables
set seller = GetTriggerUnit()
set x = GetUnitX(seller)
set y = GetUnitY(seller)
set owner = udg_SelectTempPlayer[GetUnitUserData(seller)]
// Set team of selling unit
if IsUnitInForce(seller, udg_Team[1]) == true then
set team = 1
elseif IsUnitInForce(seller, udg_Team[2]) == true then
set team = 2
elseif IsUnitInForce(seller, udg_Team[3]) == true then
set team = 3
endif
// This loop in the inventory of selling unit, check if slot has an item, if so it run the function "GetItemGoldCostById()" to find the gold cost of item and store it into 'value'.
// it store the charge of the item in 'quantity' and add the (value x quantity) to the 'total'.
loop
exitwhen i > 5
if UnitItemInSlot(seller, i) != null then
set value = GetItemGoldCostById(GetItemTypeId(UnitItemInSlot(seller, i)))
set quantity = GetItemCharges(UnitItemInSlot(seller, i))
set it = UnitItemInSlot(seller, i)
if value > 0 then
set total = total + ( value * quantity )
call RemoveItem( it )
endif
endif
if GetItemTypeId(UnitItemInSlot(seller, i)) == 'I066' then
set udg_Ring_boolean = false
call KillUnit( udg_Ring_Resurrect )
endif
set i = i + 1
endloop
if total != 0 then
if team != 0 then
set udg_Job_Merchant_Xp[team] = ( udg_Job_Merchant_Xp[team] + ( total * 2 ) )
if udg_Job_Merchant_Lvl[team] < 3 then
set udg_B = team
call TriggerExecute( gg_trg_Merchant_Lvl )
endif
if udg_Job_Merchant_Lvl[team] > 0 then
set bonus1 = total * udg_Job_Merchant_Lvl[team]
set bonus2 = bonus1 / 10
if bonus2 >= 1 then
set bonus = bonus2
endif
endif
endif
set it = CreateItem( 'I03B', x, y )
call SetItemCharges( it, ( total + bonus ) )
call UnitAddItem( seller, it )
call DisplayTimedTextToPlayer( owner, 0, 0, 6.00, "|c0000c400Troll:|r |c00ffff64Me haz made " + I2S(total) + " Goldz with|r |c00ffff64" + I2S(bonus) + " bonus.|r" )
else
call DisplayTimedTextToPlayer( owner, 0, 0, 6.00, "|c0000c400Troll:|r |c00ffff64Ther'z no valuable itemz to sell, mon!|r" )
endif
set seller = null
set it = null
set owner = null
endfunction
//===========================================================================
function InitTrig_Recipe_Sell takes nothing returns nothing
set gg_trg_Recipe_Sell = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Sell, function Sell_Actions )
endfunction
function Trig_Recipe_Forge_Func005Func001Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func005Func001C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func005C takes nothing returns boolean
if ( not ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func010Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06T' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func010Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06R' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func010C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06S' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func012Func001Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func012Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) == udg_RecipeItemType[1] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func014Func001Func001Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func014Func001Func001C takes nothing returns boolean
if ( not Trig_Recipe_Forge_Func014Func001Func001Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func014Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06R' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func014Func003Func008C takes nothing returns boolean
if ( not ( udg_RecipeItem[1] >= udg_RecipeItemNumber[1] ) ) then
return false
endif
if ( not ( udg_RecipeItem[2] >= udg_RecipeItemNumber[2] ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func014Func003C takes nothing returns boolean
if ( not Trig_Recipe_Forge_Func014Func003Func008C() ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func014C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06S' ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Func016Func001C takes nothing returns boolean
if ( not ( udg_RecipeItem[GetForLoopIndexB()] > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Recipe_Forge_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'S00T', GetTriggerUnit() )
// ---------- " Here it get the inventory size of the unit doing the recipe " ----------
set udg_RecipeUnit = GetTriggerUnit()
set udg_MaxSlot = UnitInventorySizeBJ(GetTriggerUnit())
if ( Trig_Recipe_Forge_Func005C() ) then
set udg_RecipeTeam = udg_Team[1]
else
if ( Trig_Recipe_Forge_Func005Func001C() ) then
set udg_RecipeTeam = udg_Team[2]
else
if ( Trig_Recipe_Forge_Func005Func001Func001C() ) then
set udg_RecipeTeam = udg_Team[3]
else
set udg_RecipeTeam = GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit()))
endif
endif
endif
// ---------- " Here are the basic null value for items" ----------
set udg_RecipeItem[1] = 0
set udg_RecipeItem[2] = 0
// ---------- " Here Check wich ability has been casted" ----------
if ( Trig_Recipe_Forge_Func010C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I014'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I013'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Flint and 1 Stone.|r"
else
if ( Trig_Recipe_Forge_Func010Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I014'
set udg_RecipeItemNumber[1] = 2
set udg_RecipeItemType[2] = 'I08T'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 2 Stone and 1 Oil.|r"
else
if ( Trig_Recipe_Forge_Func010Func001Func001C() ) then
// ---------- " Here enter the Recipe : Item Type/ Number of Item/ Max stack of Item" ----------
set udg_RecipeItemType[1] = 'I036'
set udg_RecipeItemNumber[1] = 1
set udg_RecipeItemType[2] = 'I08T'
set udg_RecipeItemNumber[2] = 1
// ---------- " Here put the item that will be created by recipe " ----------
set udg_RecipeText = "|c00ffff64We needz 1 Mana Stone and 1 Oil.|r"
else
endif
endif
endif
// ---------- " Here the trigger go through the inventory and take all the items needed in the recipe from inventory " ----------
set udg_N = 1
loop
exitwhen udg_N > udg_MaxSlot
if ( Trig_Recipe_Forge_Func012Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
if ( Trig_Recipe_Forge_Func012Func001Func001C() ) then
set udg_RecipeItem[2] = ( udg_RecipeItem[2] + GetItemCharges(UnitItemInSlotBJ(udg_RecipeUnit, udg_N)) )
call RemoveItem( UnitItemInSlotBJ(udg_RecipeUnit, udg_N) )
else
endif
endif
set udg_N = udg_N + 1
endloop
// ---------- " Here the trigger check there are enough items to create the recipe " ----------
if ( Trig_Recipe_Forge_Func014C() ) then
if ( Trig_Recipe_Forge_Func014Func003C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
call ConditionalTriggerExecute( gg_trg_Create_Bronze_Bar )
else
call TriggerSleepAction( 0.50 )
call UnitAddAbilityBJ( 'S00U', GetTriggerUnit() )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
if ( Trig_Recipe_Forge_Func014Func001C() ) then
if ( Trig_Recipe_Forge_Func014Func001Func001C() ) then
set udg_RecipeItem[1] = ( udg_RecipeItem[1] - udg_RecipeItemNumber[1] )
set udg_RecipeItem[2] = ( udg_RecipeItem[2] - udg_RecipeItemNumber[2] )
call ConditionalTriggerExecute( gg_trg_Create_Iron_Bar )
else
call TriggerSleepAction( 0.50 )
call UnitAddAbilityBJ( 'S00U', GetTriggerUnit() )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz no resourcez for " + udg_RecipeName ) )
call DisplayTimedTextToForce( udg_RecipeTeam, 6.00, udg_RecipeText )
endif
else
endif
endif
// ---------- " Here the trigger give back the remaining items to the unit " ----------
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 2
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Recipe_Forge_Func016Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_RecipeItem[GetForLoopIndexB()]
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped( udg_RecipeItemType[GetForLoopIndexB()], udg_RecipeUnit )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Recipe_Forge takes nothing returns nothing
set gg_trg_Recipe_Forge = CreateTrigger( )
call TriggerAddAction( gg_trg_Recipe_Forge, function Trig_Recipe_Forge_Actions )
endfunction
function Trig_Create_Bronze_Bar_Func006Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true )
endfunction
function Trig_Create_Bronze_Bar_Func006Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true )
endfunction
function Trig_Create_Bronze_Bar_Func006Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true )
endfunction
function Trig_Create_Bronze_Bar_Func006C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Create_Bronze_Bar_Actions takes nothing returns nothing
local effect udg_LocalEffect
call AddSpecialEffectLocBJ( udg_Loc, "Doodads\\Cinematic\\FireTrapUp\\FireTrapUp.mdl" )
set udg_LocalEffect = GetLastCreatedEffectBJ()
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_LocalEffect )
if ( Trig_Create_Bronze_Bar_Func006C() ) then
set udg_RecipeName = "a Bronze Bar"
set udg_RecipeItemType[7] = 'I01Q'
set udg_RecipeItemNumber[7] = 1
call UnitAddAbilityBJ( 'S00U', GetTriggerUnit() )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], GetTriggerUnit() )
if ( Trig_Create_Bronze_Bar_Func006Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz smelted " + ( udg_RecipeName + " in the Forge.|r" ) ) )
else
call DoNothing( )
endif
if ( Trig_Create_Bronze_Bar_Func006Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz smelted " + ( udg_RecipeName + " in the Forge.|r" ) ) )
else
call DoNothing( )
endif
if ( Trig_Create_Bronze_Bar_Func006Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz smelted " + ( udg_RecipeName + " in the Forge.|r" ) ) )
else
call DoNothing( )
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Create_Bronze_Bar takes nothing returns nothing
set gg_trg_Create_Bronze_Bar = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_Bronze_Bar, function Trig_Create_Bronze_Bar_Actions )
endfunction
function Trig_Create_Iron_Bar_Func007Func006001 takes nothing returns boolean
return ( IsUnitInForce(GetTriggerUnit(), udg_Team[1]) == true )
endfunction
function Trig_Create_Iron_Bar_Func007Func007001 takes nothing returns boolean
return ( IsUnitInForce(GetTriggerUnit(), udg_Team[2]) == true )
endfunction
function Trig_Create_Iron_Bar_Func007Func008001 takes nothing returns boolean
return ( IsUnitInForce(GetTriggerUnit(), udg_Team[3]) == true )
endfunction
function Trig_Create_Iron_Bar_Func007C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Create_Iron_Bar_Actions takes nothing returns nothing
local effect udg_LocalEffect
call AddSpecialEffectLocBJ( udg_Loc, "Doodads\\Cinematic\\FireTrapUp\\FireTrapUp.mdl" )
set udg_LocalEffect = GetLastCreatedEffectBJ()
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( udg_LocalEffect )
call ForceClear( udg_PlayerGroup_Show[udg_i] )
if ( Trig_Create_Iron_Bar_Func007C() ) then
set udg_RecipeName = "an Iron Bar!"
set udg_RecipeItemType[7] = 'I01Z'
set udg_RecipeItemNumber[7] = 1
call UnitAddAbilityBJ( 'S00U', GetTriggerUnit() )
call UnitAddItemByIdSwapped( udg_RecipeItemType[7], GetTriggerUnit() )
if ( Trig_Create_Iron_Bar_Func007Func006001() ) then
call DisplayTimedTextToForce( udg_Team[1], 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz smelted a " + ( udg_RecipeName + " in the Forge.|r" ) ) )
else
call DoNothing( )
endif
if ( Trig_Create_Iron_Bar_Func007Func007001() ) then
call DisplayTimedTextToForce( udg_Team[2], 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz smelted a " + ( udg_RecipeName + " in the Forge.|r" ) ) )
else
call DoNothing( )
endif
if ( Trig_Create_Iron_Bar_Func007Func008001() ) then
call DisplayTimedTextToForce( udg_Team[3], 6.00, ( "|c0000c400Troll:|r |c00ffff64We haz smelted a " + ( udg_RecipeName + " in the Forge.|r" ) ) )
else
call DoNothing( )
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Create_Iron_Bar takes nothing returns nothing
set gg_trg_Create_Iron_Bar = CreateTrigger( )
call TriggerAddAction( gg_trg_Create_Iron_Bar, function Trig_Create_Iron_Bar_Actions )
endfunction
function Trig_Change_Tribe_global_Func001Func003Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Change_Tribe_global_Func001Func003C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Change_Tribe_global_Func001C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Change_Tribe_global_Actions takes nothing returns nothing
if ( Trig_Change_Tribe_global_Func001C() ) then
set udg_TribeJoin_number[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = 1
set udg_TribeJoin_started[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = true
call DisplayTimedTextToForce( udg_Team[1], 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64Ye have allowed troll " + GetPlayerName(GetOwningPlayer(GetSpellTargetUnit())) ) + " to join ye great tribe.|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellTargetUnit()), 0, 0, 6.00, "TRIGSTR_6363" )
call StartTimerBJ( udg_TribeJoin_timer[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], false, ( 50.00 + I2R(GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))) ) )
call CreateTimerDialogBJ( udg_TribeJoin_timer[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], "TRIGSTR_6414" )
set udg_TribeJoin_window[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = GetLastCreatedTimerDialogBJ()
call TimerDialogDisplayForPlayerBJ( true, udg_TribeJoin_window[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], GetOwningPlayer(GetSpellTargetUnit()) )
else
if ( Trig_Change_Tribe_global_Func001Func003C() ) then
set udg_TribeJoin_number[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = 2
set udg_TribeJoin_started[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = true
call DisplayTimedTextToForce( udg_Team[2], 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64Ye have allowed troll " + GetPlayerName(GetOwningPlayer(GetSpellTargetUnit())) ) + " to join ye great tribe.|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellTargetUnit()), 0, 0, 6.00, "TRIGSTR_6418" )
call StartTimerBJ( udg_TribeJoin_timer[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], false, ( 50.00 + I2R(GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))) ) )
call CreateTimerDialogBJ( udg_TribeJoin_timer[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], "TRIGSTR_6489" )
set udg_TribeJoin_window[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = GetLastCreatedTimerDialogBJ()
call TimerDialogDisplayForPlayerBJ( true, udg_TribeJoin_window[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], GetOwningPlayer(GetSpellTargetUnit()) )
else
if ( Trig_Change_Tribe_global_Func001Func003Func003C() ) then
set udg_TribeJoin_number[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = 3
set udg_TribeJoin_started[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = true
call DisplayTimedTextToForce( udg_Team[3], 6.00, ( ( "|c009966ffOld Troll:|r |c00ffff64Ye have allowed troll " + GetPlayerName(GetOwningPlayer(GetSpellTargetUnit())) ) + " to join ye great tribe.|r" ) )
call DisplayTimedTextToPlayer( GetOwningPlayer(GetSpellTargetUnit()), 0, 0, 6.00, "TRIGSTR_6782" )
call StartTimerBJ( udg_TribeJoin_timer[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], false, ( 50.00 + I2R(GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))) ) )
call CreateTimerDialogBJ( udg_TribeJoin_timer[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], "TRIGSTR_6870" )
set udg_TribeJoin_window[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))] = GetLastCreatedTimerDialogBJ()
call TimerDialogDisplayForPlayerBJ( true, udg_TribeJoin_window[GetConvertedPlayerId(GetOwningPlayer(GetSpellTargetUnit()))], GetOwningPlayer(GetSpellTargetUnit()) )
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Change_Tribe_global takes nothing returns nothing
set gg_trg_Change_Tribe_global = CreateTrigger( )
call TriggerAddAction( gg_trg_Change_Tribe_global, function Trig_Change_Tribe_global_Actions )
endfunction
function Trig_Yes_global_Func001Func004Func005Func001C takes nothing returns boolean
if ( not ( udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func005C takes nothing returns boolean
if ( not ( udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func006Func001C takes nothing returns boolean
if ( not ( udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func006C takes nothing returns boolean
if ( not ( udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())] == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func002001001 takes nothing returns boolean
return ( GetFilterPlayer() != GetTriggerPlayer() )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func006002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func007Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetEnumUnit(), 'Aall') == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func007A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
if ( Trig_Yes_global_Func001Func004Func006Func002Func007Func007Func002C() ) then
call UnitRemoveAbilityBJ( 'Aall', GetEnumUnit() )
call UnitAddTypeBJ( UNIT_TYPE_TOWNHALL, GetEnumUnit() )
else
endif
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func010001001 takes nothing returns boolean
return ( GetFilterPlayer() != GetTriggerPlayer() )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func013001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func013002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, true )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func015001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n027' )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007Func015002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, false )
endfunction
function Trig_Yes_global_Func001Func004Func006Func002Func007C takes nothing returns boolean
if ( not ( udg_TeamNumber[3] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func002C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_Team[3]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func006Func001C takes nothing returns boolean
if ( not ( udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func006C takes nothing returns boolean
if ( not ( udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())] == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func002001001 takes nothing returns boolean
return ( GetFilterPlayer() != GetTriggerPlayer() )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func006002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func007Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetEnumUnit(), 'Aall') == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func007A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
if ( Trig_Yes_global_Func001Func004Func006Func007Func007Func002C() ) then
call UnitRemoveAbilityBJ( 'Aall', GetEnumUnit() )
call UnitAddTypeBJ( UNIT_TYPE_TOWNHALL, GetEnumUnit() )
else
endif
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func010001001 takes nothing returns boolean
return ( GetFilterPlayer() != GetTriggerPlayer() )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func013001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func013002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, true )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func015001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n01G' )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007Func015002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, false )
endfunction
function Trig_Yes_global_Func001Func004Func006Func007C takes nothing returns boolean
if ( not ( udg_TeamNumber[2] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func006C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_Team[2]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func007Func002001001 takes nothing returns boolean
return ( GetFilterPlayer() != GetTriggerPlayer() )
endfunction
function Trig_Yes_global_Func001Func004Func007Func005001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Yes_global_Func001Func004Func007Func005002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, true )
endfunction
function Trig_Yes_global_Func001Func004Func007Func007001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n01O' )
endfunction
function Trig_Yes_global_Func001Func004Func007Func007002 takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), udg_LocalPlayer, false )
endfunction
function Trig_Yes_global_Func001Func004Func007Func010001001 takes nothing returns boolean
return ( GetFilterPlayer() != GetTriggerPlayer() )
endfunction
function Trig_Yes_global_Func001Func004Func007Func014002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_Yes_global_Func001Func004Func007Func015Func002C takes nothing returns boolean
if ( not ( HasUnitAbility(GetEnumUnit(), 'Aall') == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004Func007Func015A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true )
if ( Trig_Yes_global_Func001Func004Func007Func015Func002C() ) then
call UnitRemoveAbilityBJ( 'Aall', GetEnumUnit() )
call UnitAddTypeBJ( UNIT_TYPE_TOWNHALL, GetEnumUnit() )
else
endif
endfunction
function Trig_Yes_global_Func001Func004Func007C takes nothing returns boolean
if ( not ( udg_TeamNumber[1] == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func004C takes nothing returns boolean
if ( not ( IsPlayerInForce(GetTriggerPlayer(), udg_Team[1]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func007A takes nothing returns nothing
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), GetEnumPlayer(), bj_ALLIANCE_ALLIED_VISION )
call SetPlayerAllianceStateBJ( GetEnumPlayer(), GetTriggerPlayer(), bj_ALLIANCE_ALLIED_VISION )
endfunction
function Trig_Yes_global_Func001Func008Func002Func001C takes nothing returns boolean
if ( not ( HasUnitAbility(GetEnumUnit(), 'Aall') == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Func001Func008Func002A takes nothing returns nothing
if ( Trig_Yes_global_Func001Func008Func002Func001C() ) then
call UnitRemoveAbilityBJ( 'Aall', GetEnumUnit() )
call UnitAddAbilityBJ( 'Aall', GetEnumUnit() )
else
endif
endfunction
function Trig_Yes_global_Func001Func008A takes nothing returns nothing
set udg_TempGroup = GetUnitsOfPlayerAll(GetEnumPlayer())
call ForGroupBJ( udg_TempGroup, function Trig_Yes_global_Func001Func008Func002A )
call DestroyGroup(udg_TempGroup)
endfunction
function Trig_Yes_global_Func001C takes nothing returns boolean
if ( not ( udg_TribeJoin_started[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
return true
endfunction
function Trig_Yes_global_Actions takes nothing returns nothing
if ( Trig_Yes_global_Func001C() ) then
call PauseTimerBJ( true, udg_TribeJoin_timer[GetConvertedPlayerId(GetTriggerPlayer())] )
call DestroyTimerDialogBJ( udg_TribeJoin_window[GetConvertedPlayerId(GetTriggerPlayer())] )
set udg_TribeJoin_started[GetConvertedPlayerId(GetTriggerPlayer())] = false
if ( Trig_Yes_global_Func001Func004C() ) then
set udg_Old_team[GetConvertedPlayerId(GetTriggerPlayer())] = 1
call UnitRemoveAbilityBJ( 'A0GP', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
call ForceRemovePlayerSimple( GetTriggerPlayer(), udg_Team[1] )
set udg_TeamNumber[1] = ( udg_TeamNumber[1] - 1 )
if ( Trig_Yes_global_Func001Func004Func005C() ) then
call ForceAddPlayerSimple( GetTriggerPlayer(), udg_Team[2] )
set udg_TeamNumber[2] = ( udg_TeamNumber[2] + 1 )
call UnitAddAbilityBJ( 'A0GQ', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
else
if ( Trig_Yes_global_Func001Func004Func005Func001C() ) then
call ForceAddPlayerSimple( GetTriggerPlayer(), udg_Team[3] )
set udg_TeamNumber[3] = ( udg_TeamNumber[3] + 1 )
call UnitAddAbilityBJ( 'A0H5', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
else
endif
endif
if ( Trig_Yes_global_Func001Func004Func007C() ) then
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_4716" )
call DisplayTimedTextToForce( GetPlayersMatching(Condition(function Trig_Yes_global_Func001Func004Func007Func010001001)), 6.00, ( ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + ( " the " + GetUnitName(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) ) ) + " be leavin' hiz tribe!|r" ) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2690" )
set udg_Defeat_Tribe[1] = true
call KillUnit( udg_Totem[1] )
set udg_TempGroup = GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func007Func014002002))
call ForGroupBJ( udg_TempGroup, function Trig_Yes_global_Func001Func004Func007Func015A )
call DestroyGroup(udg_TempGroup)
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_4716" )
call DisplayTimedTextToForce( GetPlayersMatching(Condition(function Trig_Yes_global_Func001Func004Func007Func002001001)), 6.00, ( ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + ( " the " + GetUnitName(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) ) ) + " be leavin' hiz tribe!|r" ) )
set udg_LocalPlayer = ForcePickRandomPlayer(udg_Team[1])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func007Func005001002)), function Trig_Yes_global_Func001Func004Func007Func005002 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func007Func007001002)), function Trig_Yes_global_Func001Func004Func007Func007002 )
set udg_LocalPlayer = null
endif
else
if ( Trig_Yes_global_Func001Func004Func006C() ) then
set udg_Old_team[GetConvertedPlayerId(GetTriggerPlayer())] = 2
call UnitRemoveAbilityBJ( 'A0GQ', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
call ForceRemovePlayerSimple( GetTriggerPlayer(), udg_Team[2] )
set udg_TeamNumber[2] = ( udg_TeamNumber[2] - 1 )
if ( Trig_Yes_global_Func001Func004Func006Func006C() ) then
call ForceAddPlayerSimple( GetTriggerPlayer(), udg_Team[1] )
set udg_TeamNumber[1] = ( udg_TeamNumber[1] + 1 )
call UnitAddAbilityBJ( 'A0GP', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
else
if ( Trig_Yes_global_Func001Func004Func006Func006Func001C() ) then
call ForceAddPlayerSimple( GetTriggerPlayer(), udg_Team[3] )
set udg_TeamNumber[3] = ( udg_TeamNumber[3] + 1 )
call UnitAddAbilityBJ( 'A0H5', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
else
endif
endif
if ( Trig_Yes_global_Func001Func004Func006Func007C() ) then
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_1547" )
call DisplayTimedTextToForce( GetPlayersMatching(Condition(function Trig_Yes_global_Func001Func004Func006Func007Func002001001)), 6.00, ( ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + ( " the " + GetUnitName(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) ) ) + " be leavin' hiz tribe!|r" ) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2293" )
set udg_Defeat_Tribe[2] = true
call KillUnit( udg_Totem[2] )
set udg_TempGroup = GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func006Func007Func006002002))
call ForGroupBJ( udg_TempGroup, function Trig_Yes_global_Func001Func004Func006Func007Func007A )
call DestroyGroup(udg_TempGroup)
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_1547" )
call DisplayTimedTextToForce( GetPlayersMatching(Condition(function Trig_Yes_global_Func001Func004Func006Func007Func010001001)), 6.00, ( ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + ( " the " + GetUnitName(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) ) ) + " be leavin' hiz tribe!|r" ) )
set udg_LocalPlayer = ForcePickRandomPlayer(udg_Team[2])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func006Func007Func013001002)), function Trig_Yes_global_Func001Func004Func006Func007Func013002 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func006Func007Func015001002)), function Trig_Yes_global_Func001Func004Func006Func007Func015002 )
set udg_LocalPlayer = null
endif
else
if ( Trig_Yes_global_Func001Func004Func006Func002C() ) then
set udg_Old_team[GetConvertedPlayerId(GetTriggerPlayer())] = 3
call UnitRemoveAbilityBJ( 'A0H5', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
call ForceRemovePlayerSimple( GetTriggerPlayer(), udg_Team[3] )
set udg_TeamNumber[3] = ( udg_TeamNumber[3] - 1 )
if ( Trig_Yes_global_Func001Func004Func006Func002Func006C() ) then
call ForceAddPlayerSimple( GetTriggerPlayer(), udg_Team[2] )
set udg_TeamNumber[2] = ( udg_TeamNumber[2] + 1 )
call UnitAddAbilityBJ( 'A0GQ', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
else
if ( Trig_Yes_global_Func001Func004Func006Func002Func006Func001C() ) then
call ForceAddPlayerSimple( GetTriggerPlayer(), udg_Team[1] )
set udg_TeamNumber[1] = ( udg_TeamNumber[1] + 1 )
call UnitAddAbilityBJ( 'A0GP', udg_Score_Memorial[GetConvertedPlayerId(GetTriggerPlayer())] )
else
endif
endif
if ( Trig_Yes_global_Func001Func004Func006Func002Func007C() ) then
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_444" )
call DisplayTimedTextToForce( GetPlayersMatching(Condition(function Trig_Yes_global_Func001Func004Func006Func002Func007Func002001001)), 6.00, ( ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + ( " the " + GetUnitName(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) ) ) + " be leavin' hiz tribe!|r" ) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_465" )
set udg_Defeat_Tribe[3] = true
call KillUnit( udg_Totem[3] )
set udg_TempGroup = GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func006Func002Func007Func006002002))
call ForGroupBJ( udg_TempGroup, function Trig_Yes_global_Func001Func004Func006Func002Func007Func007A )
call DestroyGroup(udg_TempGroup)
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_444" )
call DisplayTimedTextToForce( GetPlayersMatching(Condition(function Trig_Yes_global_Func001Func004Func006Func002Func007Func010001001)), 6.00, ( ( ( "|c009966ffOld Troll:|r |c00ffff64" + GetPlayerName(GetTriggerPlayer()) ) + ( " the " + GetUnitName(udg_Hero_Troll[GetConvertedPlayerId(GetTriggerPlayer())]) ) ) + " be leavin' hiz tribe!|r" ) )
set udg_LocalPlayer = ForcePickRandomPlayer(udg_Team[3])
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func006Func002Func007Func013001002)), function Trig_Yes_global_Func001Func004Func006Func002Func007Func013002 )
set bj_wantDestroyGroup=true
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_Yes_global_Func001Func004Func006Func002Func007Func015001002)), function Trig_Yes_global_Func001Func004Func006Func002Func007Func015002 )
set udg_LocalPlayer = null
endif
else
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 6.00, "TRIGSTR_390" )
endif
endif
endif
call TriggerSleepAction( 0.10 )
set udg_A = 1
loop
exitwhen udg_A > 12
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A), GetTriggerPlayer(), bj_ALLIANCE_UNALLIED )
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), ConvertedPlayer(udg_A), bj_ALLIANCE_UNALLIED )
set udg_A = udg_A + 1
endloop
call ForForce( udg_Team[udg_TribeJoin_number[GetConvertedPlayerId(GetTriggerPlayer())]], function Trig_Yes_global_Func001Func007A )
call ForForce( udg_Team[udg_Old_team[GetConvertedPlayerId(GetTriggerPlayer())]], function Trig_Yes_global_Func001Func008A )
else
endif
endfunction
//===========================================================================
function InitTrig_Yes_global takes nothing returns nothing
set gg_trg_Yes_global = CreateTrigger( )
call TriggerAddAction( gg_trg_Yes_global, function Trig_Yes_global_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_TribeTimer takes nothing returns nothing
local integer i = 1
loop
exitwhen i > 12
if GetExpiredTimer() == udg_TribeJoin_timer[i] then
set udg_TribeJoin_started[i] = false
set udg_TribeJoin_number[i] = 0
call PauseTimer( udg_TribeJoin_timer[i] )
call DestroyTimerDialog( udg_TribeJoin_window[i] )
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_TribeTimer_JASS takes nothing returns nothing
set gg_trg_TribeTimer_JASS = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[1] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[2] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[3] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[4] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[5] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[6] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[7] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[8] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[9] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[10] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[11] )
call TriggerRegisterTimerExpireEvent( gg_trg_TribeTimer_JASS, udg_TribeJoin_timer[12] )
call TriggerAddAction( gg_trg_TribeTimer_JASS, function Trig_TribeTimer )
endfunction
function Trig_Voting_Func001Func001Func001Func005Func001C takes nothing returns boolean
if ( not ( ( GetUnitUserData(udg_VotingUnit) * 1 ) >= ( udg_count_VotingSpirits - GetUnitUserData(udg_VotingUnit) ) ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001Func001Func005Func002C takes nothing returns boolean
if ( not ( ( GetUnitUserData(udg_VotingUnit) * 2 ) >= ( udg_count_VotingSpirits - GetUnitUserData(udg_VotingUnit) ) ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001Func001Func005C takes nothing returns boolean
if ( not ( udg_TenDays == true ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0EE' ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001Func006Func001C takes nothing returns boolean
if ( not ( ( R2I(GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit)) * 1 ) > ( ( udg_count_VotingSpirits - R2I(GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit)) ) * 1 ) ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001Func006Func002C takes nothing returns boolean
if ( not ( ( R2I(GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit)) * 1 ) > ( ( udg_count_VotingSpirits - R2I(GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit)) ) * 2 ) ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001Func006C takes nothing returns boolean
if ( not ( udg_TenDays == true ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0EI' ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func007Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( udg_Defeat[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func007Func001Func003Func008C takes nothing returns boolean
if ( not ( udg_TenDays == true ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func007Func001Func003Func020C takes nothing returns boolean
if ( not ( udg_TenDays == true ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func007Func001Func003C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Hero_Troll[GetForLoopIndexA()]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001Func007Func001C takes nothing returns boolean
if ( not Trig_Voting_Func001Func007Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Voting_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0EG' ) ) then
return false
endif
return true
endfunction
function Trig_Voting_Actions takes nothing returns nothing
if ( Trig_Voting_Func001C() ) then
set udg_count_VotingSpirits = 0
set udg_Loc = GetRectCenter(gg_rct_Voting)
call CreateNUnitsAtLoc( 1, 'h02L', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, bj_UNIT_FACING )
set udg_VotingUnit = GetLastCreatedUnit()
call RemoveLocation(udg_Loc)
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Voting_Func001Func007Func001C() ) then
set udg_count_VotingSpirits = ( udg_count_VotingSpirits + 1 )
if ( Trig_Voting_Func001Func007Func001Func003C() ) then
set udg_Loc = GetUnitLoc(udg_Hero_Troll[GetForLoopIndexA()])
call CreateNUnitsAtLoc( 1, 'h01H', ConvertedPlayer(GetForLoopIndexA()), udg_Loc, bj_UNIT_FACING )
set udg_VotingSpirit[GetForLoopIndexA()] = GetLastCreatedUnit()
call UnitRemoveAbilityBJ( 'A0A1', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0EI', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0EE', GetLastCreatedUnit() )
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), ConvertedPlayer(GetForLoopIndexA()) )
if ( Trig_Voting_Func001Func007Func001Func003Func020C() ) then
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_3095" )
else
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_3200" )
endif
set udg_TempPlayerGroup2 = GetForceOfPlayer(ConvertedPlayer(GetForLoopIndexA()))
call PingMinimapLocForForce( udg_TempPlayerGroup2, udg_Loc, 10.00 )
call DestroyForce(udg_TempPlayerGroup2)
call RemoveLocation(udg_Loc)
else
set udg_Loc = GetUnitLoc(udg_Troll_Spirit[GetForLoopIndexA()])
call CreateNUnitsAtLoc( 1, 'h01H', ConvertedPlayer(GetForLoopIndexA()), udg_Loc, bj_UNIT_FACING )
call UnitRemoveAbilityBJ( 'A0A1', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0EI', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0EE', GetLastCreatedUnit() )
set udg_VotingSpirit[GetForLoopIndexA()] = GetLastCreatedUnit()
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), ConvertedPlayer(GetForLoopIndexA()) )
if ( Trig_Voting_Func001Func007Func001Func003Func008C() ) then
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_3095" )
else
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_3200" )
endif
set udg_TempPlayerGroup2 = GetForceOfPlayer(ConvertedPlayer(GetForLoopIndexA()))
call PingMinimapLocForForce( udg_TempPlayerGroup2, udg_Loc, 10.00 )
call DestroyForce(udg_TempPlayerGroup2)
call RemoveLocation(udg_Loc)
endif
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
if ( Trig_Voting_Func001Func001C() ) then
call UnitAddAbilityBJ( 'A0ED', udg_VotingUnit )
call RemoveUnit( udg_VotingSpirit[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
call SetUnitManaBJ( udg_VotingUnit, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit) + 1 ) )
call DisplayTimedTextToForce( GetPlayersAll(), 4.00, ( "|c009966ffVoodoo Merchant:|r |c00ffff64Troll " + ( GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit())) + " votez YES.|r" ) ) )
if ( Trig_Voting_Func001Func001Func006C() ) then
if ( Trig_Voting_Func001Func001Func006Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_1101" )
call CreateFogModifierRectBJ( true, ConvertedPlayer(GetForLoopIndexA()), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
call RemoveUnit( udg_VotingSpirit[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( udg_VotingUnit )
call UnitRemoveAbilityBJ( 'A0EG', gg_unit_h01R_0069 )
else
call SelectUnitForPlayerSingle( udg_VotingUnit, GetOwningPlayer(GetSpellAbilityUnit()) )
endif
else
if ( Trig_Voting_Func001Func001Func006Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_1101" )
call CreateFogModifierRectBJ( true, ConvertedPlayer(GetForLoopIndexA()), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
call RemoveUnit( udg_VotingSpirit[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( udg_VotingUnit )
call UnitRemoveAbilityBJ( 'A0EG', gg_unit_h01R_0069 )
else
call SelectUnitForPlayerSingle( udg_VotingUnit, GetOwningPlayer(GetSpellAbilityUnit()) )
endif
endif
call DisplayTimedTextToForce( GetPlayersAll(), 4.00, ( ( "|c009966ffVoodoo Merchant:|r |c00ffff64 " + I2S(R2I(GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit))) ) + ( " / " + ( I2S(GetUnitUserData(udg_VotingUnit)) + " votez.|r" ) ) ) )
else
if ( Trig_Voting_Func001Func001Func001C() ) then
call UnitAddAbilityBJ( 'A0EK', udg_VotingUnit )
call RemoveUnit( udg_VotingSpirit[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
call SetUnitUserData( udg_VotingUnit, ( GetUnitUserData(udg_VotingUnit) + 1 ) )
call DisplayTimedTextToForce( GetPlayersAll(), 4.00, ( "|c009966ffVoodoo Merchant:|r |c00ffff64Troll " + ( GetPlayerName(GetOwningPlayer(GetSpellAbilityUnit())) + " votez NO.|r" ) ) )
if ( Trig_Voting_Func001Func001Func001Func005C() ) then
if ( Trig_Voting_Func001Func001Func001Func005Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_745" )
call RemoveUnit( udg_VotingSpirit[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( udg_VotingUnit )
else
call SelectUnitForPlayerSingle( udg_VotingUnit, GetOwningPlayer(GetSpellAbilityUnit()) )
endif
else
if ( Trig_Voting_Func001Func001Func001Func005Func002C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DisplayTimedTextToPlayer( ConvertedPlayer(GetForLoopIndexA()), 0, 0, 10.00, "TRIGSTR_745" )
call RemoveUnit( udg_VotingSpirit[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( udg_VotingUnit )
else
call SelectUnitForPlayerSingle( udg_VotingUnit, GetOwningPlayer(GetSpellAbilityUnit()) )
endif
endif
call DisplayTimedTextToForce( GetPlayersAll(), 4.00, ( ( "|c009966ffVoodoo Merchant:|r |c00ffff64 " + I2S(R2I(GetUnitStateSwap(UNIT_STATE_MANA, udg_VotingUnit))) ) + ( " / " + ( I2S(GetUnitUserData(udg_VotingUnit)) + " votez.|r" ) ) ) )
else
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Voting takes nothing returns nothing
set gg_trg_Voting = CreateTrigger( )
call TriggerAddAction( gg_trg_Voting, function Trig_Voting_Actions )
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func003C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0C9') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 8 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001Func001Func012C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A08K') == false ) ) then
return false
endif
if ( not ( udg_Ring_boolean == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 11 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001Func001Func012C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001Func004C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0HC') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 10 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func011C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0HE') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 9 ) ) then
return false
endif
if ( not ( UnitTypeIsInRegion(gg_rct_Hot_Spring_north_2, 'n01B') == false ) ) then
return false
endif
if ( not ( UnitTypeIsInRegion(gg_rct_Hot_Spring_north_2, 'n01D') == false ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func011C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func008C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0HD') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 7 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func008C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func012C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0DF') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 6 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func012C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001Func004C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0HA') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 5 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001Func004C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0H9') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 4 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007Func004C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0GN') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 3 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func007C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func007Func004C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001Func013C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0GM') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func001Func013C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001Func004C takes nothing returns boolean
if ( not ( HasUnitAbility(gg_unit_h00F_0043, 'A0FC') == false ) ) then
return false
endif
if ( not ( GetUnitUserData(gg_unit_h00F_0043) <= 1 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002Func001C takes nothing returns boolean
if ( not Trig_New_quest_Func002Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_New_quest_Func002C takes nothing returns boolean
if ( not ( GetUnitUserData(gg_unit_h00F_0043) >= 12 ) ) then
return false
endif
return true
endfunction
function Trig_New_quest_Actions takes nothing returns nothing
call SetUnitUserData( gg_unit_h00F_0043, ( udg_Day + GetRandomInt(-5, 10) ) )
if ( Trig_New_quest_Func002C() ) then
call ConditionalTriggerExecute( gg_trg_Bosses )
else
if ( Trig_New_quest_Func002Func001C() ) then
call UnitAddAbilityBJ( 'A0FC', gg_unit_h00F_0043 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "|c009966ffOld Troll:|r |c00ffff64Me kidz, this old troll here needz something sweet. Bring some berries and strong liquor and I'll teach ya a good ol' recipe how cook 'em!|r" )
else
if ( Trig_New_quest_Func002Func001Func001C() ) then
set udg_Loc = GetUnitLoc(gg_unit_h00F_0043)
call CreateItemLoc( 'I02Q', udg_Loc )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_1221" )
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Hot_Spring_north_1)
set udg_Loc2 = GetRectCenter(gg_rct_Hot_Spring_south_1)
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc, 10.00 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc2, 10.00 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call UnitAddAbilityBJ( 'A0GM', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_1047" )
call UnitAddAbilityBJ( 'A0GN', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_897" )
call UnitAddAbilityBJ( 'A0H9', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_687" )
call UnitAddAbilityBJ( 'A0HA', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_996" )
set udg_Loc = GetRectCenter(gg_rct_Teleporter_left)
call CreateItemLoc( 'I09G', udg_Loc )
set udg_Loc2 = GetRectCenter(gg_rct_Teleporter_right)
call CreateItemLoc( 'I0A7', udg_Loc2 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc, 10.00 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc2, 10.00 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call UnitAddAbilityBJ( 'A0DF', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2851" )
set udg_Loc = GetRectCenter(gg_rct_Black_Pirahnas_Area)
call CreateNUnitsAtLoc( 10, 'n01Y', Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Loc, 1.00 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0HD', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2416" )
call UnitAddAbilityBJ( 'A0C9', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_970" )
set udg_Loc = GetUnitLoc(gg_unit_h00F_0043)
call CreateItemLoc( 'I0A8', udg_Loc )
call RemoveLocation(udg_Loc)
set udg_Loc = GetRectCenter(gg_rct_Hot_Spring_north_2)
call CreateNUnitsAtLoc( 1, 'n01B', Player(PLAYER_NEUTRAL_PASSIVE), udg_Loc, 90.00 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc, 10.00 )
call RemoveLocation(udg_Loc)
call UnitAddAbilityBJ( 'A0HE', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_2826" )
call UnitAddAbilityBJ( 'A0HC', gg_unit_h00F_0043 )
else
if ( Trig_New_quest_Func002Func001Func001Func007Func001Func001Func001Func001Func001Func004Func001Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_1594" )
set udg_Loc = GetRectCenter(gg_rct_Mojo_Anaconda)
set udg_Loc2 = GetRectCenter(gg_rct_Mojo_Tarantula)
call CreateItemLoc( 'rde2', udg_Loc )
call CreateItemLoc( 'rde3', udg_Loc2 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc, 10.00 )
call PingMinimapLocForForce( GetPlayersAll(), udg_Loc2, 10.00 )
call RemoveLocation(udg_Loc)
call RemoveLocation(udg_Loc2)
call UnitAddAbilityBJ( 'A08K', gg_unit_h00F_0043 )
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_1063" )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_New_quest takes nothing returns nothing
set gg_trg_New_quest = CreateTrigger( )
call TriggerAddAction( gg_trg_New_quest, function Trig_New_quest_Actions )
endfunction
globals
hashtable NEW_GlobalHash = InitHashtable()
// Orders
constant integer ORDER_healingwand = 852609
constant integer ORDER_wandillusion = 852274
constant integer ORDER_absorb = 852529
constant integer ORDER_acidbomb = 852662
constant integer ORDER_acolyteharvest = 852185
constant integer ORDER_AImove = 851988
constant integer ORDER_ambush = 852131
constant integer ORDER_ancestralspirit = 852490
constant integer ORDER_ancestralspirittarget = 852491
constant integer ORDER_animatedead = 852217
constant integer ORDER_antimagicshell = 852186
constant integer ORDER_attack = 851983
constant integer ORDER_attackground = 851984
constant integer ORDER_attackonce = 851985
constant integer ORDER_attributemodskill = 852576
constant integer ORDER_auraunholy = 852215
constant integer ORDER_auravampiric = 852216
constant integer ORDER_autodispel = 852132
constant integer ORDER_autodispeloff = 852134
constant integer ORDER_autodispelon = 852133
constant integer ORDER_autoentangle = 852505
constant integer ORDER_autoentangleinstant = 852506
constant integer ORDER_autoharvestgold = 852021
constant integer ORDER_autoharvestlumber = 852022
constant integer ORDER_avatar = 852086
constant integer ORDER_avengerform = 852531
constant integer ORDER_awaken = 852466
constant integer ORDER_banish = 852486
constant integer ORDER_barkskin = 852135
constant integer ORDER_barkskinoff = 852137
constant integer ORDER_barkskinon = 852136
constant integer ORDER_battleroar = 852099
constant integer ORDER_battlestations = 852099
constant integer ORDER_bearform = 852138
constant integer ORDER_berserk = 852100
constant integer ORDER_blackarrow = 852577
constant integer ORDER_blackarrowoff = 852579
constant integer ORDER_blackarrowon = 852578
constant integer ORDER_blight = 852187
constant integer ORDER_blink = 852525
constant integer ORDER_blizzard = 852089
constant integer ORDER_bloodlust = 852101
constant integer ORDER_bloodlustoff = 852103
constant integer ORDER_bloodluston = 852102
constant integer ORDER_board = 852043
constant integer ORDER_breathoffire = 852580
constant integer ORDER_breathoffrost = 852560
constant integer ORDER_build = 851994
constant integer ORDER_burrow = 852533
constant integer ORDER_cannibalize = 852188
constant integer ORDER_carrionscarabs = 852551
constant integer ORDER_carrionscarabsinstant = 852554
constant integer ORDER_carrionscarabsoff = 852553
constant integer ORDER_carrionscarabson = 852552
constant integer ORDER_carrionswarm = 852218
constant integer ORDER_chainlightning = 852119
constant integer ORDER_channel = 852600
constant integer ORDER_charm = 852581
constant integer ORDER_chemicalrage = 852663
constant integer ORDER_cloudoffog = 852473
constant integer ORDER_clusterrockets = 852652
constant integer ORDER_coldarrows = 852244
constant integer ORDER_coldarrowstarg = 852243
constant integer ORDER_controlmagic = 852474
constant integer ORDER_corporealform = 852493
constant integer ORDER_corrosivebreath = 852140
constant integer ORDER_coupleinstant = 852508
constant integer ORDER_coupletarget = 852507
constant integer ORDER_creepanimatedead = 852246
constant integer ORDER_creepdevour = 852247
constant integer ORDER_creepheal = 852248
constant integer ORDER_creephealoff = 852250
constant integer ORDER_creephealon = 852249
constant integer ORDER_creepthunderbolt = 852252
constant integer ORDER_creepthunderclap = 852253
constant integer ORDER_cripple = 852189
constant integer ORDER_curse = 852190
constant integer ORDER_curseoff = 852192
constant integer ORDER_curseon = 852191
constant integer ORDER_cyclone = 852144
constant integer ORDER_darkconversion = 852228
constant integer ORDER_darkportal = 852229
constant integer ORDER_darkritual = 852219
constant integer ORDER_darksummoning = 852220
constant integer ORDER_deathanddecay = 852221
constant integer ORDER_deathcoil = 852222
constant integer ORDER_deathpact = 852223
constant integer ORDER_decouple = 852509
constant integer ORDER_defend = 852055
constant integer ORDER_detectaoe = 852015
constant integer ORDER_detonate = 852145
constant integer ORDER_devour = 852104
constant integer ORDER_devourmagic = 852536
constant integer ORDER_disassociate = 852240
constant integer ORDER_disenchant = 852495
constant integer ORDER_dismount = 852470
constant integer ORDER_dispel = 852057
constant integer ORDER_divineshield = 852090
constant integer ORDER_doom = 852583
constant integer ORDER_drain = 852487
constant integer ORDER_dreadlordinferno = 852224
constant integer ORDER_dropitem = 852001
constant integer ORDER_drunkenhaze = 852585
constant integer ORDER_earthquake = 852121
constant integer ORDER_eattree = 852146
constant integer ORDER_elementalfury = 852586
constant integer ORDER_ensnare = 852106
constant integer ORDER_ensnareoff = 852108
constant integer ORDER_ensnareon = 852107
constant integer ORDER_entangle = 852147
constant integer ORDER_entangleinstant = 852148
constant integer ORDER_entanglingroots = 852171
constant integer ORDER_etherealform = 852496
constant integer ORDER_evileye = 852105
constant integer ORDER_faeriefire = 852149
constant integer ORDER_faeriefireoff = 852151
constant integer ORDER_faeriefireon = 852150
constant integer ORDER_fanofknives = 852526
constant integer ORDER_farsight = 852122
constant integer ORDER_fingerofdeath = 852230
constant integer ORDER_firebolt = 852231
constant integer ORDER_flamestrike = 852488
constant integer ORDER_flamingarrows = 852174
constant integer ORDER_flamingarrowstarg = 852173
constant integer ORDER_flamingattack = 852540
constant integer ORDER_flamingattacktarg = 852539
constant integer ORDER_flare = 852060
constant integer ORDER_forceboard = 852044
constant integer ORDER_forceofnature = 852176
constant integer ORDER_forkedlightning = 852587
constant integer ORDER_freezingbreath = 852195
constant integer ORDER_frenzy = 852561
constant integer ORDER_frenzyoff = 852563
constant integer ORDER_frenzyon = 852562
constant integer ORDER_frostarmor = 852225
constant integer ORDER_frostarmoroff = 852459
constant integer ORDER_frostarmoron = 852458
constant integer ORDER_frostnova = 852226
constant integer ORDER_getitem = 851981
constant integer ORDER_gold2lumber = 852233
constant integer ORDER_grabtree = 852511
constant integer ORDER_harvest = 852018
constant integer ORDER_heal = 852063
constant integer ORDER_healingspray = 852664
constant integer ORDER_healingward = 852109
constant integer ORDER_healingwave = 852501
constant integer ORDER_healoff = 852065
constant integer ORDER_healon = 852064
constant integer ORDER_hex = 852502
constant integer ORDER_holdposition = 851993
constant integer ORDER_holybolt = 852092
constant integer ORDER_howlofterror = 852588
constant integer ORDER_humanbuild = 851995
constant integer ORDER_immolation = 852177
constant integer ORDER_impale = 852555
constant integer ORDER_incineratearrow = 852670
constant integer ORDER_incineratearrowoff = 852672
constant integer ORDER_incineratearrowon = 852671
constant integer ORDER_inferno = 852232
constant integer ORDER_innerfire = 852066
constant integer ORDER_innerfireoff = 852068
constant integer ORDER_innerfireon = 852067
constant integer ORDER_instant = 852200
constant integer ORDER_invisibility = 852069
constant integer ORDER_lavamonster = 852667
constant integer ORDER_lightningshield = 852110
constant integer ORDER_load = 852046
constant integer ORDER_loadarcher = 852142
constant integer ORDER_loadcorpse = 852050
constant integer ORDER_loadcorpseinstant = 852053
constant integer ORDER_locustswarm = 852556
constant integer ORDER_lumber2gold = 852234
constant integer ORDER_magicdefense = 852478
constant integer ORDER_magicleash = 852480
constant integer ORDER_magicundefense = 852479
constant integer ORDER_manaburn = 852179
constant integer ORDER_manaflareoff = 852513
constant integer ORDER_manaflareon = 852512
constant integer ORDER_manashieldoff = 852590
constant integer ORDER_manashieldon = 852589
constant integer ORDER_massteleport = 852093
constant integer ORDER_mechanicalcritter = 852564
constant integer ORDER_metamorphosis = 852180
constant integer ORDER_militia = 852072
constant integer ORDER_militiaconvert = 852071
constant integer ORDER_militiaoff = 852073
constant integer ORDER_militiaunconvert = 852651
constant integer ORDER_mindrot = 852565
constant integer ORDER_mirrorimage = 852123
constant integer ORDER_monsoon = 852591
constant integer ORDER_mount = 852469
constant integer ORDER_mounthippogryph = 852143
constant integer ORDER_move = 851986
constant integer ORDER_nagabuild = 852467
constant integer ORDER_neutraldetectaoe = 852023
constant integer ORDER_neutralinteract = 852566
constant integer ORDER_neutralspell = 852630
constant integer ORDER_nightelfbuild = 851997
constant integer ORDER_orcbuild = 851996
constant integer ORDER_parasite = 852601
constant integer ORDER_parasiteoff = 852603
constant integer ORDER_parasiteon = 852602
constant integer ORDER_patrol = 851990
constant integer ORDER_phaseshift = 852514
constant integer ORDER_phaseshiftinstant = 852517
constant integer ORDER_phaseshiftoff = 852516
constant integer ORDER_phaseshifton = 852515
constant integer ORDER_phoenixfire = 852481
constant integer ORDER_phoenixmorph = 852482
constant integer ORDER_poisonarrows = 852255
constant integer ORDER_poisonarrowstarg = 852254
constant integer ORDER_polymorph = 852074
constant integer ORDER_possession = 852196
constant integer ORDER_preservation = 852568
constant integer ORDER_purge = 852111
constant integer ORDER_rainofchaos = 852237
constant integer ORDER_rainoffire = 852238
constant integer ORDER_raisedead = 852197
constant integer ORDER_raisedeadoff = 852199
constant integer ORDER_raisedeadon = 852198
constant integer ORDER_ravenform = 852155
constant integer ORDER_recharge = 852157
constant integer ORDER_rechargeoff = 852159
constant integer ORDER_rechargeon = 852158
constant integer ORDER_rejuvination = 852160
constant integer ORDER_renew = 852161
constant integer ORDER_renewoff = 852163
constant integer ORDER_renewon = 852162
constant integer ORDER_repair = 852024
constant integer ORDER_repairoff = 852026
constant integer ORDER_repairon = 852025
constant integer ORDER_replenish = 852542
constant integer ORDER_replenishlife = 852545
constant integer ORDER_replenishlifeoff = 852547
constant integer ORDER_replenishlifeon = 852546
constant integer ORDER_replenishmana = 852548
constant integer ORDER_replenishmanaoff = 852550
constant integer ORDER_replenishmanaon = 852549
constant integer ORDER_replenishoff = 852544
constant integer ORDER_replenishon = 852543
constant integer ORDER_request_hero = 852239
constant integer ORDER_requestsacrifice = 852201
constant integer ORDER_restoration = 852202
constant integer ORDER_restorationoff = 852204
constant integer ORDER_restorationon = 852203
constant integer ORDER_resumebuild = 851999
constant integer ORDER_resumeharvesting = 852017
constant integer ORDER_resurrection = 852094
constant integer ORDER_returnresources = 852020
constant integer ORDER_revenge = 852241
constant integer ORDER_revive = 852039
constant integer ORDER_roar = 852164
constant integer ORDER_robogoblin = 852656
constant integer ORDER_root = 852165
constant integer ORDER_sacrifice = 852205
constant integer ORDER_sanctuary = 852569
constant integer ORDER_scout = 852181
constant integer ORDER_selfdestruct = 852040
constant integer ORDER_selfdestructoff = 852042
constant integer ORDER_selfdestructon = 852041
constant integer ORDER_sentinel = 852182
constant integer ORDER_setrally = 851980
constant integer ORDER_shadowsight = 852570
constant integer ORDER_shadowstrike = 852527
constant integer ORDER_shockwave = 852125
constant integer ORDER_silence = 852592
constant integer ORDER_sleep = 852227
constant integer ORDER_slow = 852075
constant integer ORDER_slowoff = 852077
constant integer ORDER_slowon = 852076
constant integer ORDER_smart = 851971
constant integer ORDER_soulburn = 852668
constant integer ORDER_soulpreservation = 852242
constant integer ORDER_spellshield = 852571
constant integer ORDER_spellshieldaoe = 852572
constant integer ORDER_spellsteal = 852483
constant integer ORDER_spellstealoff = 852485
constant integer ORDER_spellstealon = 852484
constant integer ORDER_spies = 852235
constant integer ORDER_spiritlink = 852499
constant integer ORDER_spiritofvengeance = 852528
constant integer ORDER_spirittroll = 852573
constant integer ORDER_spiritwolf = 852126
constant integer ORDER_stampede = 852593
constant integer ORDER_standdown = 852113
constant integer ORDER_starfall = 852183
constant integer ORDER_stasistrap = 852114
constant integer ORDER_steal = 852574
constant integer ORDER_stomp = 852127
constant integer ORDER_stoneform = 852206
constant integer ORDER_stop = 851972
constant integer ORDER_submerge = 852604
constant integer ORDER_summonfactory = 852658
constant integer ORDER_summongrizzly = 852594
constant integer ORDER_summonphoenix = 852489
constant integer ORDER_summonquillbeast = 852595
constant integer ORDER_summonwareagle = 852596
constant integer ORDER_tankdroppilot = 852079
constant integer ORDER_tankloadpilot = 852080
constant integer ORDER_tankpilot = 852081
constant integer ORDER_taunt = 852520
constant integer ORDER_thunderbolt = 852095
constant integer ORDER_thunderclap = 852096
constant integer ORDER_tornado = 852597
constant integer ORDER_townbelloff = 852083
constant integer ORDER_townbellon = 852082
constant integer ORDER_tranquility = 852184
constant integer ORDER_transmute = 852665
constant integer ORDER_unavatar = 852087
constant integer ORDER_unavengerform = 852532
constant integer ORDER_unbearform = 852139
constant integer ORDER_unburrow = 852534
constant integer ORDER_uncoldarrows = 852245
constant integer ORDER_uncorporealform = 852494
constant integer ORDER_undeadbuild = 851998
constant integer ORDER_undefend = 852056
constant integer ORDER_undivineshield = 852091
constant integer ORDER_unetherealform = 852497
constant integer ORDER_unflamingarrows = 852175
constant integer ORDER_unflamingattack = 852541
constant integer ORDER_unholyfrenzy = 852209
constant integer ORDER_unimmolation = 852178
constant integer ORDER_unload = 852047
constant integer ORDER_unloadall = 852048
constant integer ORDER_unloadallcorpses = 852054
constant integer ORDER_unloadallinstant = 852049
constant integer ORDER_unpoisonarrows = 852256
constant integer ORDER_unravenform = 852156
constant integer ORDER_unrobogoblin = 852657
constant integer ORDER_unroot = 852166
constant integer ORDER_unstableconcoction = 852500
constant integer ORDER_unstoneform = 852207
constant integer ORDER_unsubmerge = 852605
constant integer ORDER_unsummon = 852210
constant integer ORDER_unwindwalk = 852130
constant integer ORDER_vengeance = 852521
constant integer ORDER_vengeanceinstant = 852524
constant integer ORDER_vengeanceoff = 852523
constant integer ORDER_vengeanceon = 852522
constant integer ORDER_volcano = 852669
constant integer ORDER_voodoo = 852503
constant integer ORDER_ward = 852504
constant integer ORDER_waterelemental = 852097
constant integer ORDER_wateryminion = 852598
constant integer ORDER_web = 852211
constant integer ORDER_weboff = 852213
constant integer ORDER_webon = 852212
constant integer ORDER_whirlwind = 852128
constant integer ORDER_windwalk = 852129
constant integer ORDER_wispharvest = 852214
constant integer ORDER_scrollofspeed = 852285
constant integer ORDER_cancel = 851976
constant integer ORDER_moveslot1 = 852002
constant integer ORDER_moveslot2 = 852003
constant integer ORDER_moveslot3 = 852004
constant integer ORDER_moveslot4 = 852005
constant integer ORDER_moveslot5 = 852006
constant integer ORDER_moveslot6 = 852007
constant integer ORDER_useslot1 = 852008
constant integer ORDER_useslot2 = 852009
constant integer ORDER_useslot3 = 852010
constant integer ORDER_useslot4 = 852011
constant integer ORDER_useslot5 = 852012
constant integer ORDER_useslot6 = 852013
constant integer ORDER_skillmenu = 852000
constant integer ORDER_stunned = 851973
constant integer ORDER_instant1 = 851991 //patrol sub - order
constant integer ORDER_instant2 = 851987 //?
constant integer ORDER_instant3 = 851975 //?
constant integer ORDER_instant4 = 852019 //?
endglobals
scope Backpack initializer onInit
globals
private constant integer BACKPACK_ID = 'BPCK'
endglobals
// Always move bag to owner and check HP
private function onPeriodic takes nothing returns nothing
local integer i = 0
local integer k = 0
local integer j = 0
local unit u = null
local unit b = null
loop
exitwhen i > 11
set u = LoadUnitHandle(NEW_GlobalHash, StringHash("Backpack_Heroes"), i)
set k = GetHandleId(u)
set b = LoadUnitHandle(NEW_GlobalHash, k, StringHash("Backpack_Unit"))
set j = 0
if (u != null and b != null and GetWidgetLife(u) > 0.405) then
call SetUnitX(b, GetUnitX(u))
call SetUnitY(b, GetUnitY(u))
elseif (b != null and (u == null or GetWidgetLife(u) <= 0.405)) then
// Drop all items from backpack
loop
exitwhen j > 5
call UnitRemoveItemFromSlot(b, j)
set j = j + 1
endloop
//call KillUnit(b)
call RemoveUnit(b)
call RemoveSavedHandle(NEW_GlobalHash, k, StringHash("Backpack_Unit"))
call RemoveSavedHandle(NEW_GlobalHash, StringHash("Backpack_Heroes"), i)
endif
set i = i + 1
endloop
set u = null
set b = null
endfunction
// Let the owner mimic the bag's orders
private function onOrder takes nothing returns boolean
local unit u = GetTriggerUnit()
local unit b = null
local widget t = GetOrderTarget()
local real x = GetOrderPointX()
local real y = GetOrderPointY()
local integer i = GetIssuedOrderId()
if (GetUnitTypeId(u) == BACKPACK_ID) then
set b = LoadUnitHandle(NEW_GlobalHash, GetHandleId(u), StringHash("Backpack_Parent"))
// Add a check to see if the parent unit is alive
if (b != null and GetUnitState(b, UNIT_STATE_LIFE) > 0.0) then
if (t != null and x == 0.000 and y == 0.000) then
// Target Order
call IssueTargetOrderById(b, ORDER_move, t)
elseif (t == null and x != 0.000 and y != 0.000) then
// Point Order
call IssuePointOrderById(b, i, x, y)
elseif (t == null and x == 0.000 and y == 0.000) then
// No-targer Order
call IssueImmediateOrderById(b, i)
endif
endif
endif
set u = null
set b = null
set t = null
return false
endfunction
// Create a backpack for Troll hero at entering the map
private function onEnter takes nothing returns boolean
local unit u = GetTriggerUnit()
local unit b = null
local integer i = GetUnitTypeId(u)
local player p = GetOwningPlayer(u)
if not IsUnitIllusion(u) and (i == 'H000' or i == 'H001' or i == 'H002' or i == 'H003') and GetUnitLifePercent(u) > 0 then
// Check if the hero already has a backpack unit
set b = LoadUnitHandle(NEW_GlobalHash, GetHandleId(u), StringHash("Backpack_Unit"))
if b != null and GetUnitLifePercent(b) > 0 then
// Remove the old backpack unit if it exists
call RemoveUnit(b)
endif
// Create a new backpack unit
set b = CreateUnit(p, BACKPACK_ID, GetUnitX(u), GetUnitY(u), 0)
call SaveUnitHandle(NEW_GlobalHash, GetHandleId(u), StringHash("Backpack_Unit"), b)
call SaveUnitHandle(NEW_GlobalHash, GetHandleId(b), StringHash("Backpack_Parent"), u)
call SaveUnitHandle(NEW_GlobalHash, StringHash("Backpack_Heroes"), GetPlayerId(p), u)
endif
set u = null
set b = null
set p = null
return true
endfunction
private function onInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TimerStart(CreateTimer(), 0.25, true, function onPeriodic)
call TriggerRegisterEnterRectSimple(t, bj_mapInitialPlayableArea)
call TriggerAddCondition(t, Condition(function onEnter))
set t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(t, Condition(function onOrder))
set t = null
endfunction
endscope
scope BackpackAbilities initializer onInit
globals
private constant integer SPELL_DROP = 'A0I7'
private constant integer SPELL_GIVE = 'A0I8'
endglobals
private function onCast takes nothing returns boolean
local unit u = GetTriggerUnit()
local unit u1 = LoadUnitHandle(NEW_GlobalHash, GetHandleId(u), StringHash("Backpack_Parent"))
local integer i = 0
if (GetSpellAbilityId() == SPELL_DROP) then
loop
exitwhen i > 5
call UnitRemoveItemFromSlot(u, i)
set i = i + 1
endloop
elseif (GetSpellAbilityId() == SPELL_GIVE) then
loop
exitwhen i > 5
call UnitAddItem(u1, UnitItemInSlot(u, i))
set i = i + 1
endloop
endif
set u = null
set u1 = null
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function onCast))
set t = null
endfunction
endscope