Name | Type | is_array | initial_value |
AutoAttack | boolean | Yes | |
avexDialog | dialog | Yes | |
BannedPlayer | player | Yes | |
BanPlayer | player | No | |
Barbossa | boolean | No | |
Barrel1 | destructable | Yes | |
Barrel10 | destructable | Yes | |
Barrel11 | destructable | Yes | |
Barrel12 | destructable | Yes | |
Barrel13 | destructable | Yes | |
Barrel14 | destructable | Yes | |
Barrel15 | destructable | Yes | |
Barrel16 | destructable | Yes | |
Barrel2 | destructable | Yes | |
Barrel3 | destructable | Yes | |
Barrel4 | destructable | Yes | |
Barrel5 | destructable | Yes | |
Barrel6 | destructable | Yes | |
Barrel7 | destructable | Yes | |
Barrel8 | destructable | Yes | |
Barrel9 | destructable | Yes | |
BarrelItem | item | Yes | |
BarrelWrath | unit | Yes | |
BashIntenger | integer | No | |
Beckett | boolean | No | |
BestHull | abilcode | No | |
Bloodlust | boolean | No | |
BombarderNorth | boolean | No | |
BombarderSouth | boolean | No | |
Boostup | integer | Yes | |
BracePosition | real | Yes | |
camnr | integer | No | |
CaptainBox | unit | Yes | |
Card1 | integer | Yes | |
Card2 | integer | Yes | |
Card3 | integer | Yes | |
ChainLightning | integer | No | |
CItemType | itemcode | Yes | |
Crew | integer | No | |
Cruisers | boolean | No | |
DavyJones | boolean | No | |
DeadTimer | timer | Yes | |
DeadTimerWindow | timerdialog | Yes | |
Deaths | integer | Yes | 0 |
DeathSave | integer | Yes | |
DeathTimerNumber | integer | Yes | 0 |
Decoy1 | unit | Yes | |
DontChangeAgain | boolean | No | |
DoubleKill | integer | No | |
Earlygame | boolean | No | |
ElapsedTime | integer | No | |
Elizabeth | boolean | No | |
ElsePowerup | integer | No | |
Enforcer | integer | Yes | |
ExtraStreak_Chcker | boolean | Yes | |
ExtraStreak_Kills | integer | Yes | |
ExtraStreak_Sounds | sound | Yes | |
ExtraStreak_Strings | string | Yes | |
ExtraStreak_Timer | integer | Yes | |
ExtraStreakInt | integervar | No | |
FireMissileEffect | effect | Yes | |
FireMissileEffect2 | effect | Yes | |
FishermanNorth | unit | No | |
FishermanSouth | unit | No | |
FredrikDialog | dialog | Yes | |
GameModes | boolean | No | |
gameon | boolean | No | |
General_Point | location | Yes | |
General_String | string | Yes | |
General_Unitgroup | group | Yes | |
Ghostmode | effect | Yes | |
Gibbs | boolean | No | |
GimasDialog | dialog | Yes | |
Habour1NorthDie | boolean | No | |
Habour2NorthDie_Copy | boolean | No | |
HandyLife | integer | Yes | |
Harbour2South | boolean | No | |
Harbour2South_Copy | boolean | No | |
HeartofDestrctuion | item | No | |
HeroAssistAttacker | unit | Yes | |
HeroAssistAttacker_Copy | unit | Yes | |
HeroAssistReal | player | Yes | |
HeroAssistTarget | unit | Yes | |
HeroAssistTarget_Copy | unit | Yes | |
HeroXPnorth | real | No | |
HeroXpReal | integer | No | |
HeroXPsouth | real | No | |
Holdercard | integer | Yes | |
HoldPosition | boolean | Yes | |
Honor | integer | Yes | |
HonorSave | integer | Yes | |
Hull | integer | No | |
HullExplodedActivated | boolean | Yes | |
HullSkillAi | abilcode | No | |
InterSeaPunHull | abilcode | No | |
ItemsAI | itemcode | Yes | |
JackSold | boolean | No | |
JackSoldEffect | boolean | No | |
JackSparrow | boolean | No | |
JossaDialog | dialog | Yes | |
JunkedCrewActivated | boolean | Yes | |
KickBoard | multiboard | No | |
KickButtonBack | button | No | |
KickButtonNo | button | No | |
KickButtonPlayer | button | Yes | |
KickButtonYes | button | No | |
KickDialogHelp | dialog | No | |
KickDialogMenu | dialog | No | |
KickDialogVote | dialog | No | |
KickDialogWarning | dialog | No | |
KickOn | boolean | No | |
KickPlayer | player | No | |
KickVoteDone | boolean | No | |
KickVotesNo | integer | No | |
KickVotesYes | integer | No | |
Kill | integer | Yes | |
Kills | integer | Yes | 0 |
KillsSave | integer | Yes | |
KrakeTime | boolean | No | |
KrakeTradeTIme | boolean | No | |
larssaDialog | dialog | Yes | |
LumberPieces | integer | Yes | 0 |
Maximum | integer | No | |
MaxpointBlackjack | integer | Yes | |
Maxrune | integer | No | |
MechnichSkillAi | abilcode | No | |
Middlegame | boolean | No | |
ModeNoBP | boolean | No | false |
ModeNoPearlAndNoTraders | boolean | No | false |
ModeNoTraders | boolean | No | false |
ModeOnlySailors | boolean | No | false |
ModeOnlyTraders | boolean | No | false |
ModeQuickGame | boolean | No | |
Monster | integer | No | |
Multiboard | multiboard | No | |
MultiKill | integer | No | |
NameSave | player | Yes | |
NNN | boolean | No | |
Noblackjack | boolean | Yes | |
NOBUG | boolean | Yes | |
NOFUCKINGCHEAT | boolean | Yes | |
NOMORETHIS | boolean | Yes | |
NoMoreVoting | boolean | No | false |
NormalPlay | boolean | No | |
Norrington | boolean | No | |
NorthFishingBoat | unit | No | |
NorthRepairOn | boolean | No | false |
NorthRepairUnit | unit | No | |
NorthRepairUsed | boolean | No | false |
NorthTeam | integer | No | 5 |
NR | boolean | No | |
NS | boolean | No | |
OhoyAble | boolean | Yes | |
OhoyText | texttag | Yes | |
Pirate | integer | Yes | |
PirateBrigand | integer | Yes | |
PirateKills | integer | Yes | |
Pirates | group | Yes | |
PiratesEffect | integer | Yes | |
PIRATESTOP | boolean | Yes | |
PlayerBoat | unit | Yes | |
PlayerBox | unit | Yes | |
PlayerCheckHull | boolean | Yes | |
PlayerCheckSails | boolean | Yes | |
PlayerColors | string | Yes | |
PlayerFleet | group | Yes | |
PlayerHandyMan | unit | Yes | |
PlayerIsKicked | boolean | Yes | false |
PlayerKickable | boolean | Yes | |
PlayerLumber | integer | Yes | 0 |
PlayerNumber | integer | No | |
PlayerSwitched | player | No | |
Powerup | integer | No | |
Powerup1 | item | No | |
Powerup1taken | boolean | No | |
Powerup2 | item | No | |
Powerup2Taken | boolean | No | |
Powerup3 | item | No | |
Powerup3taken | boolean | No | |
Powerup4 | item | No | |
PowerupUsed | boolean | Yes | |
Quiezettha | boolean | No | |
RandomNumber | integer | No | 0 |
RandomNumber2 | integer | No | 0 |
RandomSkill | integer | No | |
RandomSound | integer | No | |
Rank1 | boolean | No | |
Rank10 | boolean | No | |
Rank2 | boolean | No | |
Rank3 | boolean | No | |
Rank4 | boolean | No | |
Rank5 | boolean | No | |
Rank6 | boolean | No | |
Rank7 | boolean | No | |
Rank8 | boolean | No | |
Rank9 | boolean | No | |
Repairedownership | player | Yes | |
RepairN | boolean | No | |
RepairS | boolean | No | |
RespawnEffect | effect | Yes | |
RewardExp | integer | Yes | 0 |
RewardFish | integer | Yes | 100 |
RewardGold | integer | Yes | 0 |
RewardGoldMine | integer | No | 200 |
RewardLumber | integer | Yes | 0 |
RewardRecieved | boolean | No | |
RollTheRUneDIce | integer | No | |
Sail | integer | No | |
SailbuyMaxmimum | integer | Yes | |
SailFireActivated | boolean | Yes | |
SailSkillAi | abilcode | No | |
Saying_Player | force | No | |
SaySoundLeave | integer | No | 1 |
SeamonsterUnit | unit | Yes | |
SecondGoldPeopleNorth | integer | No | |
SecondGoldPeopleSouth | integer | No | |
SellItem | item | Yes | |
SetHour | integer | No | |
Sharky | boolean | No | |
ShipChange | boolean | No | |
ShoppingtimeAI | boolean | No | |
ShoreLeaveShip | unit | Yes | |
skedDialog | dialog | Yes | |
skedKickOn | boolean | No | |
SkillAi | abilcode | Yes | |
SouthFishingBoat | unit | No | |
SouthRepairOn | boolean | No | false |
SouthRepairUnit | unit | No | |
SouthRepairUsed | boolean | No | false |
SouthTeam | integer | No | 5 |
Spamama | integer | No | |
SpawnShipsCount | integer | No | |
SpawnShipsType | unitcode | No | |
SpawnShipsType2 | unitcode | No | |
SpawnShipsType2_Copy | unitcode | No | |
SpawnShipsType_Copy | unitcode | No | |
Special | effect | Yes | |
Special2 | effect | Yes | |
SpecialEffect1 | effect | No | |
SpecialEffect2 | effect | No | |
SpecialEffect3 | effect | No | |
SR | boolean | No | |
SSS | boolean | No | |
StandardFish | boolean | Yes | |
StayingALive | integer | No | |
Streak_Kills | integer | Yes | |
Streak_Sounds | sound | Yes | |
Streak_Strings | string | Yes | |
Submerge | unit | Yes | |
SubmergeBuff | buffcode | No | |
SuperhelpHomicide13 | integer | No | |
SuperSound | integer | No | |
switchinit | boolean | No | |
switchon | boolean | No | |
switchyesvote | integer | No | |
TechTypeString | string | No | |
TempMoney | integer | No | |
Text | integer | Yes | |
TheMothershiip | unit | No | |
TimeElapsed | integer | No | |
TimeElapsedMin | integer | No | |
TotalVotes | integer | No | |
UnitOrder | ordercode | Yes | |
UnitRoyalRifle | integer | Yes | |
UnitSoldRoyalSoldier | integer | Yes | |
UpgradeCheckNorth | boolean | No | true |
UpgradeCheckSouth | boolean | No | true |
Upgrades | integer | No | |
view | real | No | |
Visibilitynorth | fogmodifier | No | |
VisibilitySouth | fogmodifier | No | |
VoteBoard | multiboard | No | |
VotedAlready | integer | Yes | |
VoteDialog | dialog | No | |
VoteDone | button | No | |
VoteDoneBool | boolean | No | false |
VoteNoBlackPearl | button | No | |
VoteNoPearlAndNoTraders | button | No | |
VoteNormalPlay | button | No | |
VoteNoTraders | button | No | |
VoteNumberNoBP | integer | No | 0 |
VoteNumberNoPearlAndNoTraders | integer | No | 0 |
VoteNumberNormalPlay | integer | No | 0 |
VoteNumberNoTraders | integer | No | 0 |
VoteNumberOnlySailors | integer | No | 0 |
VoteNumberOnlyTraders | integer | No | 0 |
VoteNumberQuickGame | integer | No | |
VoteOnlySailors | button | No | |
VoteOnlyTraders | button | No | |
VoteQuickGame | button | No | |
VoteTimer | integer | No | 0 |
VotingPlayersDone | integer | No | |
VotingPlayersTotal | integer | No | |
WeatherEffect | weathereffect | No | |
WhaleFish | boolean | Yes | |
WhatRune | integer | No | |
WhatSpot | integer | Yes | 1 |
WillTurner | boolean | No | |
WillTurner1time | boolean | No | |
ZlegganDialog | dialog | Yes |
//TESH.scrollpos=0
//TESH.alwaysfold=0
library DDItemCombineBasic initializer Init
globals
// *** Edit to your own will ***
private constant string ITEM_COMBINE_EFFECT = "Abilities\\Spells\\Items\\AIlm\\AIlmTarget.mdl"
private constant string ATTACH_POINT = "origin"
// *** End edit ***
private sound ItemCombineSound = null
private integer array CType[8191]
private integer ItemN = 0
endglobals
function NewItemGroup takes nothing returns nothing
local integer i = ItemN*6 + 7
local integer h = 1
set ItemN = ItemN + 1
loop
exitwhen (h == 7)
set udg_CItemType[i] = udg_CItemType[h]
set udg_CItemType[h] = 0
set h = h + 1
set i = i + 1
endloop
set CType[ItemN-1] = udg_CItemType[0]
set udg_CItemType[0] = 0
endfunction
private function UnitRemoveItemById takes unit whichUnit, integer itemId returns nothing
local integer i = 0
local item it
loop
exitwhen (i >= bj_MAX_INVENTORY)
set it = UnitItemInSlot(whichUnit, i)
if GetItemTypeId(it) == itemId then
call RemoveItem(it)
exitwhen (true)
endif
set i = i + 1
endloop
set it = null
endfunction
private function Actions takes nothing returns nothing
local integer n = 0
local integer array it
local integer i = 7
local integer h = 0
local integer x = 0
local unit u = GetTriggerUnit()
local boolean b = true
local integer y = 0
local integer z = 0
local integer array hero_item_type
// Get hero items
loop
exitwhen (x >= bj_MAX_INVENTORY)
set hero_item_type[x] = GetItemTypeId(UnitItemInSlot(u, x))
set x = x + 1
endloop
loop
exitwhen (n >= ItemN)
set h = i + 6
set x = 0
set it[x] = hero_item_type[x]
set x = x + 1
set it[x] = hero_item_type[x]
set x = x + 1
set it[x] = hero_item_type[x]
set x = x + 1
set it[x] = hero_item_type[x]
set x = x + 1
set it[x] = hero_item_type[x]
set x = x + 1
set it[x] = hero_item_type[x]
set x = x + 1
set y = 0 // N of items that hero has ()
set z = 0 // N of items needed ()
loop
exitwhen (i >= h or udg_CItemType[i] == 0)
set z = z + 1
// Does unit contain item n
set x = 0
loop
exitwhen (x >= bj_MAX_INVENTORY)
if (it[x] == udg_CItemType[i]) then
// Kick out the item
set it[x] = 0
set y = y + 1
// And increase by 1
exitwhen (true)
endif
set x = x + 1
endloop
set i = i + 1
endloop
set i = h
if (y == z) then
set h = i
set i = i-6
loop
exitwhen (i > h or udg_CItemType[i] == 0)
call UnitRemoveItemById(u, udg_CItemType[i])
set i = i + 1
endloop
call UnitAddItemById(u, CType[n])
call SetSoundPosition(ItemCombineSound, GetUnitX(u), GetUnitY(u), 0.)
call StartSound(ItemCombineSound)
call DestroyEffect(AddSpecialEffectTarget(ITEM_COMBINE_EFFECT, u, ATTACH_POINT))
set u = null
return
endif
set n = n + 1
endloop
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( t, function Actions )
call Preload(ITEM_COMBINE_EFFECT)
set ItemCombineSound = CreateSound( "Abilities\\Spells\\Orc\\AncestralSpirit\\AncestralSpirit.wav", false, true, true, 10, 10, "" )
call SetSoundParamsFromLabel( ItemCombineSound, "AncestralSpirit" )
call SetSoundDuration( ItemCombineSound, 1756 )
call SetSoundPitch(ItemCombineSound, 1.2)
call SetSoundVolume(ItemCombineSound, 100)
endfunction
endlibrary
function Trig_Powerup_Works_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02M' ) ) then
return false
endif
if ( not ( udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] == false ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func001C takes nothing returns boolean
if ( not ( udg_ElsePowerup >= 61 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_ElsePowerup <= 60 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 11 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004A takes nothing returns nothing
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func001C() ) then
call SetUnitLifePercentBJ( GetEnumUnit(), 20.00 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 6.00, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 0, 0, 0, 0 )
else
call DoNothing( )
endif
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func002002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func003002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func004002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func005002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func006002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func007002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetOwningPlayer(GetManipulatingUnit()), Player(1)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func002002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func003002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func004002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func005002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func006002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func007002 takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetOwningPlayer(GetManipulatingUnit()), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 9 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 8 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 7 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 6 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 6 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002Func001C takes nothing returns boolean
if ( not ( udg_Powerup == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006Func002C takes nothing returns boolean
if ( not ( udg_Powerup == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Func002Func006C takes nothing returns boolean
return true
endfunction
function Trig_Powerup_Works_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == GetUnitTypeId(udg_PlayerBoat[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))]) ) ) then
return false
endif
return true
endfunction
function Trig_Powerup_Works_Actions takes nothing returns nothing
set udg_Maximum = ( udg_Maximum - 1 )
if ( Trig_Powerup_Works_Func002C() ) then
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = true
set udg_Powerup = GetRandomInt(1, 13)
if ( Trig_Powerup_Works_Func002Func006C() ) then
if ( Trig_Powerup_Works_Func002Func006Func002C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " picked up a Powerup Box and is now getting repaired for 20 seconds." ) )
call AddSpecialEffectTargetUnitBJ( "chest", GetManipulatingUnit(), "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call TriggerSleepAction( 2 )
call AddSpecialEffectTargetUnitBJ( "Body", GetManipulatingUnit(), "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 7.00 ) )
call TriggerSleepAction( 2 )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call TriggerSleepAction( 2 )
call AddSpecialEffectTargetUnitBJ( "Body", GetManipulatingUnit(), "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 7.00 ) )
call TriggerSleepAction( 2 )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call TriggerSleepAction( 2 )
call AddSpecialEffectTargetUnitBJ( "chest", GetManipulatingUnit(), "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 6.00 ) )
call TriggerSleepAction( 2 )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 7.00 ) )
call TriggerSleepAction( 2 )
call AddSpecialEffectTargetUnitBJ( "chest", GetManipulatingUnit(), "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call TriggerSleepAction( 2 )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call TriggerSleepAction( 2 )
call AddSpecialEffectTargetUnitBJ( "chest", GetManipulatingUnit(), "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call TriggerSleepAction( 2 )
call SetUnitLifePercentBJ( GetManipulatingUnit(), ( GetUnitLifePercent(GetManipulatingUnit()) + 3.00 ) )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " is no longer being repaired." ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " picked up a Powerup Box and are now in \"Ghost Mode\" for10 seconds." ) )
call AddSpecialEffectTargetUnitBJ( "Body", GetManipulatingUnit(), "Abilities\\Spells\\Human\\Banish\\BanishTarget.mdl" )
set udg_Ghostmode[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = GetLastCreatedEffectBJ()
call SetUnitInvulnerable( GetManipulatingUnit(), true )
call SetUnitMoveSpeed( GetManipulatingUnit(), 300.00 )
call TriggerSleepAction( 10.00 )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call DestroyEffectBJ( udg_Ghostmode[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] )
call SetUnitInvulnerable( GetManipulatingUnit(), false )
call SetUnitMoveSpeed( GetManipulatingUnit(), GetUnitDefaultMoveSpeed(GetManipulatingUnit()) )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " are no longer ghost mode." ) )
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " picked up a powerup box and got destroyed by a bomb." ) )
call KillUnit( GetManipulatingUnit() )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " Found unused ship in a powerup box and has now taken control of it." ) )
call CreateNUnitsAtLoc( 1, 'h00M', GetOwningPlayer(GetManipulatingUnit()), GetUnitLoc(GetManipulatingUnit()), bj_UNIT_FACING )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a treasure in a Powerup Box. Enjoy 500 gold!" ) )
call AdjustPlayerStateBJ( 500, GetOwningPlayer(GetManipulatingUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a \"Golden Sail\" in a Powerup Box. 300 Sail speed for 10 seconds!" ) )
call SetUnitMoveSpeed( GetManipulatingUnit(), 300.00 )
call TriggerSleepAction( 10.00 )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " has no longer got \"Golden Sail.\"" ) )
call SetUnitMoveSpeed( GetManipulatingUnit(), GetUnitDefaultMoveSpeed(GetManipulatingUnit()) )
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " Found a Golden sail in a Poweup Box. 300 Sail speed for 50 seconds!" ) )
call SetUnitMoveSpeed( GetManipulatingUnit(), 300.00 )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a \"Magic Barrier\" in a Powerup Box! Enjoy 10 seconds Invulnerable time!" ) )
call SetUnitInvulnerable( GetManipulatingUnit(), true )
call TriggerSleepAction( 10.00 )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call SetUnitInvulnerable( GetManipulatingUnit(), false )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " are now vulnerable again." ) )
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a Powerup Box with another powerup box inside. Enjoy 500 gold." ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call AdjustPlayerStateBJ( 500, GetOwningPlayer(GetManipulatingUnit()), PLAYER_STATE_RESOURCE_GOLD )
call CreateItemLoc( 'I02M', GetUnitLoc(GetManipulatingUnit()) )
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a watch in a Powerup Box! TIME STOP enemies for 5 seconds!" ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004C() ) then
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(2)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func002002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(3)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func003002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(4)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func004002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(5)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func005002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(6)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func006002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(0)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004Func007002 )
call PauseUnitBJ( false, GetManipulatingUnit() )
call TriggerSleepAction( 5.00 )
call PauseAllUnitsBJ( false )
else
call DoNothing( )
endif
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005C() ) then
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(7)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func002002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(8)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func003002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(9)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func004002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(10)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func005002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(11)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func006002 )
call ForGroupBJ( GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(1)), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func005Func007002 )
call PauseUnitBJ( false, GetManipulatingUnit() )
call TriggerSleepAction( 5.00 )
call PauseAllUnitsBJ( false )
else
call DoNothing( )
endif
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a Powerup Box! A so called \"Hero Bay Bomb\" appeared. -80% hp to heroes." ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func004A )
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a crew in a Powerup Box! Enjoy 3 \"Royal Soldiers\" and 2 \"Pirate Brigands!\"" ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call CreateNUnitsAtLoc( 3, 'hfoo', GetOwningPlayer(GetManipulatingUnit()), GetUnitLoc(GetManipulatingUnit()), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nbrg', GetOwningPlayer(GetManipulatingUnit()), GetUnitLoc(GetManipulatingUnit()), bj_UNIT_FACING )
else
set udg_ElsePowerup = GetRandomInt(1, 101)
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " found a treasure in a Powerup Box. Enjoy 1500 gold!" ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call AdjustPlayerStateBJ( 1500, GetOwningPlayer(GetManipulatingUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
if ( Trig_Powerup_Works_Func002Func006Func002Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func001Func002Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetManipulatingUnit())) + " has been Robbed by a group of pirates in a Powerup Box and lost 1500 gold." ) )
set udg_PowerupUsed[GetConvertedPlayerId(GetOwningPlayer(GetManipulatingUnit()))] = false
call AdjustPlayerStateBJ( -1500, GetOwningPlayer(GetManipulatingUnit()), PLAYER_STATE_RESOURCE_GOLD )
else
call DoNothing( )
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
else
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_8328" )
endif
else
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetManipulatingUnit())), "TRIGSTR_8327" )
call CreateItemLoc( 'I02M', GetUnitLoc(GetManipulatingUnit()) )
endif
endfunction
//===========================================================================
function InitTrig_Powerup_Works takes nothing returns nothing
set gg_trg_Powerup_Works = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Powerup_Works, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Powerup_Works, Condition( function Trig_Powerup_Works_Conditions ) )
call TriggerAddAction( gg_trg_Powerup_Works, function Trig_Powerup_Works_Actions )
endfunction