//TESH.scrollpos=0
//TESH.alwaysfold=0
//TESH.scrollpos=0
//TESH.alwaysfold=0
library ParabolicMovement2
function ParabolaZ2 takes real y0, real y1, real h, real d, real x returns real
local real A = (2*(y0+y1)-4*h)/(d*d)
local real B = (y1-y0-A*d*d)/d
return A*x*x + B*x + y0
endfunction
endlibrary
Name | Type | is_array | initial_value |
AAA_nro | integer | No | |
AAA_Unit | unit | Yes | |
AcidCastGroup | group | No | |
AcidGroup | group | No | |
AfterGroup | group | No | |
Alive | integer | No | 0 |
Angle | real | No | |
angle | real | Yes | |
BBGroup | group | No | |
Bladedgroup | group | No | |
BladeGroup | group | No | |
BlindingPowder | group | No | |
Bloop | string | No | |
BombardGroup | group | No | |
BrightBullets | group | No | |
BSGroup | group | No | |
BSpGroup | group | No | |
BulBarGroup | group | No | |
BurningGroup | group | No | |
BurrowCheck | group | No | |
BurrowTimer | group | No | |
CasterLoc | location | No | |
ChillStorm | group | No | |
CloneMasta | unit | No | |
ColdStepGroup | group | No | |
ComradGroup | group | No | |
CurrentDist | real | No | |
CurrentIndex | integer | No | |
CurrentTavern | group | No | |
d | unit | Yes | |
DangerLimit | timer | Yes | |
DangerZone | timer | No | |
dangerzone1 | trigger | No | |
dangerzoneforest | timer | No | |
dangerzonegraveyard | timer | No | |
dangerzoneland | timer | No | |
dangerzonemontains | timer | No | |
dangerzonevillage | timer | No | |
dangerzonewater | timer | No | |
dangerzonewaterfall | timer | No | |
DashAngle | real | No | |
DashAOE | real | No | |
DashDamage | real | No | |
DashDistance | real | No | |
DashEffectAbilID | abilcode | Yes | |
DashEffectNumb | real | No | |
DashNSFX | string | No | |
DashNSGlobalGroup | group | No | |
DashNSTempGroup | group | No | |
DashSpeed | real | No | |
DashTarg | unit | No | |
DashTime | real | No | |
DashType | real | No | |
DashType2 | real | No | |
DCheck | group | No | |
Dead | integer | No | 0 |
DeadIcons | string | Yes | |
DefAngle | real | No | |
DGraspGroup | group | No | |
DiagButtons | button | Yes | |
DiagVotes | integer | Yes | |
DoTGroup | group | No | |
DTimers | hashtable | No | |
DZInt | integer | No | |
Dzone | group | No | |
DZoneLeave | trigger | Yes | |
DZoneRects | rect | Yes | |
DZones | trigger | Yes | |
DZString | string | Yes | |
DZTimeGroup | group | No | |
EarthQGroup | group | No | |
Explosive | group | No | |
F_Integers | integer | Yes | |
F_ReachedFading | real | Yes | |
F_Time | real | Yes | |
F_Unit | unit | Yes | |
FA_Time | real | No | |
FA_Unit | unit | No | |
FirstNames | string | Yes | |
FnP | group | No | |
Forestdangerzone | weathereffect | No | |
forestfog | weathereffect | No | |
FountPoints | location | Yes | |
FShadowGroup | group | No | |
GameType | integer | No | |
GlobalBlackHole | group | No | |
GlobalChargeGroup | group | No | |
GlobalCritPassive | group | No | |
GlobalDGgroup | group | No | |
GlobalEvadePassive | group | No | |
GlobalPDGroup | group | No | |
GlobalRJGroup | group | No | |
GrappleAngle | real | No | |
GrappleGroup | group | No | |
GrappleUnits | group | No | |
graveyarddangerzone | weathereffect | No | |
GreatWindGroup | group | No | |
GrenadeGlobalGroup | group | No | |
H | real | No | |
Hash_Acid | hashtable | No | |
Hash_ActiveDuration1 | hashtable | No | |
Hash_Aftershock | hashtable | No | |
Hash_BHole | hashtable | No | |
Hash_Bladewoven | hashtable | No | |
Hash_Bombard | hashtable | No | |
Hash_Charge | hashtable | No | |
Hash_Comraderie | hashtable | No | |
Hash_DashNoStops | hashtable | No | |
Hash_DGrasp | hashtable | No | |
Hash_DoT | hashtable | No | |
Hash_DTimers | hashtable | No | |
Hash_DWaygate | hashtable | No | |
Hash_Dzones | hashtable | No | |
Hash_Explosive | hashtable | No | |
Hash_FrozenEffect | hashtable | No | |
Hash_Grapple | hashtable | No | |
Hash_GreatWind | hashtable | No | |
Hash_Hurl | hashtable | No | |
Hash_Illusions | hashtable | No | |
Hash_Knockbacks | hashtable | No | |
Hash_Lives | hashtable | No | |
Hash_Missiles | hashtable | No | |
Hash_MWaves | hashtable | No | |
Hash_PassiveActive | hashtable | No | |
Hash_PassiveActive2 | hashtable | No | |
Hash_Pursuit | hashtable | No | |
Hash_SelfHandles2 | hashtable | No | |
Hash_ShadowCheck | hashtable | No | |
Hash_ShadowTrack | hashtable | No | |
Hash_Shunpo | hashtable | No | |
Hash_Spawns | hashtable | No | |
Hash_SpecEffects | hashtable | No | |
Hash_StarRAIN | hashtable | No | |
Hash_Throw | hashtable | No | |
Hash_TrapHole | hashtable | No | |
Hash_TRift | hashtable | No | |
Hash_Turncoat | hashtable | No | |
Hash_UStorms | hashtable | No | |
Hash_WallFire | hashtable | No | |
Hash_WayMoving | hashtable | No | |
Hash_WoF | hashtable | No | |
HashInt_PassiveActive | integer | No | |
Icons | string | Yes | |
IcyBGroup | group | No | |
InitiatVoteInt | integer | No | |
Integer | integer | No | |
KnockAngle | real | No | |
KnockArc | real | No | |
KnockBackDirection | real | Yes | |
KnockBackDistance | real | Yes | |
KnockbackGlobalGroup | group | No | |
KnockbackUnit | unit | Yes | |
KnockCast | unit | No | |
KnockDist | real | No | |
KnockEffect | real | No | |
KnockSpeed | real | No | |
KnockTime | real | No | |
Landsdangerzone | weathereffect | No | |
LeapGroup | group | No | |
LifeBoard | multiboard | No | |
LimitWindow | timerdialog | No | |
MasCharGroup | group | No | |
MaxLives | integer | No | |
MinionSpawnGroup | group | No | |
MissileGlobalGroup | group | No | |
ModeDiag | dialog | No | |
ModeType | integer | No | |
Mountiansdangerzone | weathereffect | No | |
MoveDelayTime | real | Yes | |
MWaveAbilityCode | abilcode | Yes | |
MWaveAbilityIDNumb | real | No | |
MWaveAngle | real | No | |
MWaveCastingCheck | boolean | No | |
MWaveGlobalGroup | group | No | |
MWaveMax | real | No | |
MWaveMaxWave | real | No | |
MWaveMin | real | No | |
MWaveWaves | real | No | |
NadeCurrentDist | real | No | |
NadeDist | real | No | |
NinTGroup | group | No | |
OptionName | string | Yes | |
Overview | dialog | No | |
Overview2 | trigger | Yes | |
P_attacking | real | Yes | |
PD_Angle | real | Yes | |
PD_Distances | real | Yes | |
PD_Integers | integer | Yes | |
PD_ReachedDistance | real | Yes | |
PD_RealTimer | real | Yes | |
PD_SpeedUnits | real | Yes | |
PD_TempPoint | location | Yes | |
PD_TestGroup | group | No | |
PD_TreesDestroy | boolean | Yes | |
PD_Unit | unit | Yes | |
PDefending | boolean | Yes | |
PeriodicAng | real | No | |
PeriodicCasting | real | No | |
PeriodicDMG | real | No | |
PeriodicTime | real | No | |
PeriodicType | real | No | |
PeriodShotCheck | group | No | |
PeriodTimeCheck | real | No | |
PHeight | real | No | |
Player1 | player | No | Player00 |
player5 | player | No | Player04 |
Player_Color | string | Yes | |
PlayerCam | real | Yes | 2000.00 |
PlayerKills | integer | Yes | |
PlayerLeaderPos | integer | Yes | |
PlayerLives | integer | Yes | |
PlayerOrder | string | Yes | |
PlayersRemaining | group | No | |
PlayerUnit | unit | Yes | |
PlayerUnitName | string | Yes | |
PlayerUnitType | unitcode | Yes | |
Point | location | No | |
Point2 | location | No | |
Point3 | location | No | |
Pond | unit | No | |
Pond2 | unit | No | |
PulseGroup | group | No | |
PursReal | real | No | |
PursuitFireballs | group | No | |
RemainingVoters | integer | No | |
RespawnGroup | group | No | |
SandAttack | group | No | |
SB_Hash | hashtable | No | |
SBGroup | group | No | |
SCharge | group | No | |
Selection | timer | No | |
SelectionGroup | group | No | |
SelectionTavern2 | location | No | |
SelectionTavernSpot | location | No | |
SelGroupPoint | location | No | |
SelGroupUnit | unit | Yes | |
SelTempGroup | group | No | |
SelUnitTypes | unitcode | Yes | |
SelWindow | timerdialog | No | |
sentryward | unitcode | No | oeye |
ShadeCharge | group | No | |
ShadeForm | group | No | |
ShadowBlades | group | No | |
ShadowCheck | group | No | |
ShadowCloneGroup | group | No | |
ShadowDanceCopies | group | No | |
ShadowDanceGroup | group | No | |
ShadStepGroup | group | No | |
ShadTrack | group | No | |
SHDGroup | group | No | |
SHDStormGroup | group | No | |
SHeatGroup | group | No | |
ShieldInt | integer | No | |
Shinigami | group | No | |
ShunpGroup | group | No | |
SkiVote | boolean | No | |
SleepyGroup | group | No | |
SmkGroup | group | No | |
SpawnPoints | location | Yes | |
SpawnSelection | location | No | |
SpearGroup | group | No | |
SpFXAngle | real | No | |
SpFXAoE | real | No | |
SpFxArcPoint | real | No | |
SpFXCast | unit | No | |
SpFxCountdown | real | No | |
SpFXDist | real | No | |
SpFXDMG | real | No | |
SpFxExTyper | real | No | |
SpFXFX | string | No | |
SpFxGoingDown | real | No | |
SpFXPush | real | No | |
SpFXPushAoE | real | No | |
SpFXPushTime | real | No | |
SpFXSpeed | real | No | |
SpFXTime | real | No | |
SStriGroup | group | No | |
StarEffect | group | No | |
Stasistrap | unitcode | No | otot |
SurgeGroup | group | No | |
TargetPoint | location | No | |
Tavern | unit | No | |
TemInt | integer | No | |
TempDZInt | integer | No | |
TempHandle | integer | No | |
TempHandle2 | integer | No | |
TempLightning | lightning | No | |
TempPGroup | force | No | |
TempPoin | location | No | |
TempPoin2 | location | No | |
TempPoin3 | location | No | |
TempPoin4 | location | No | |
TempPoint | location | No | |
TempReal | real | No | |
TempReal2 | real | No | |
TempTime | real | No | |
TempUnit | unit | No | |
TempUnitSelection | unit | Yes | |
TempWinnerGroup | force | No | |
TestyGroup | group | No | |
ThrowGroup | group | No | |
TI | integer | No | |
TI2 | integer | No | |
TimeLim | real | No | 900.00 |
Timelimit | timer | No | |
TInt | integer | No | |
TP | location | No | |
TP2 | location | No | |
TP3 | location | No | |
TPlayerInt | integer | Yes | |
TR | real | No | |
TR2 | real | No | |
TremorGroup | group | No | |
TRGroup | group | No | |
TU | unit | No | |
TU2 | unit | No | |
TurnCD | group | No | |
TurnCoated | group | No | |
UC_Counter | integer | Yes | |
UC_Groups | group | Yes | |
UC_Inv | boolean | Yes | |
UC_SETTINGS_AreaOfEffect | real | Yes | |
UC_SETTINGS_Collosion | boolean | No | |
UC_SETTINGS_DestroyTrees_Dash | boolean | No | |
UC_SETTINGS_Invulnerable | boolean | No | |
UC_SETTINGS_Speed | real | No | |
UC_Target | unit | No | |
UC_TempPoint | location | Yes | |
UFT | unit | Yes | |
UnitGroupsForTrigs | group | Yes | |
USGroup | group | No | |
UsingPortal | group | No | |
VengeanceGroup | group | No | |
villagedangerzone | weathereffect | No | |
VisModifiers | fogmodifier | Yes | |
VoidTrash | group | No | |
Voted | boolean | No | |
VotedAlready | boolean | Yes | |
VoteInt | integer | No | |
WatDragAngle | real | Yes | |
waterdangerzone | weathereffect | No | |
waterfalldangerzone | weathereffect | No | |
Way1 | unit | No | |
Way2 | unit | No | |
WE | weathereffect | Yes | |
WESet | weathereffect | Yes | |
wholemap | fogmodifier | No | |
WoFGG | group | No | |
y0 | real | No | |
y1 | real | No | |
ZoneIntSet | integer | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
library SimError initializer init
globals
private sound error
endglobals
function SimError takes player ForPlayer, string msg returns nothing
set msg="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00"+msg+"|r"
if (GetLocalPlayer() == ForPlayer) then
call ClearTextMessages()
call DisplayTimedTextToPlayer( ForPlayer, 0.52, 0.98, 2.00, msg )
call StartSound( error )
endif
endfunction
private function init takes nothing returns nothing
set error=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
endfunction
endlibrary
//TESH.scrollpos=45
//TESH.alwaysfold=0
library DroneSystem initializer init
// this system allows you to add drones to a unit which follow/surround it.
// useful for example for space maps: use this system to add weapons to ships
// the weapons will fire even if the ship moves
//
// functions in this system:
//
//
//call CreateDrone( TargetUnit, DroneRawcode, DistanceToTarget, AngleToTarget, IsDroneAttackable)
// unit integer real real boolean
//
//call CreateDroneRotating( TargetUnit, DroneRawcode, DistanceToTarget, RotationSpeed, IsDroneAttackable)
// unit integer real real boolean
//
//call RemoveDrone( Drone )
// unit
//
//call RemoveAllDrones( Owner )
// unit
//
//call SetDroneRotationSpeed( Drone, NewSpeed )
// unit real
//
//call SetDroneAngle( Drone, NewAngle )
// unit real
//
//call SetDroneDistance( Drone, NewDistance )
// unit real
//
//call GetDroneRotationSpeed( Drone ) returns real
// unit
//
//call GetDroneAngle( Drone ) returns real
// unit
//
//call GetDroneDistance( Drone ) returns real
// unit
//
//
// Setup Part:
globals
//the interval of the timed execution (just change this if you have to)
private constant real interval = 0.01
endglobals
// how to implement this system in your map??
// just copy and paste this trigger into your map
//***************Don't modify anything below this line*****************
globals
private group g = CreateGroup()
private group gg = CreateGroup()
private hashtable h = InitHashtable()
endglobals
private struct data
unit u
unit array t[99]
real array d[99]
real array s[99]
real array angle[99]
integer array mode[99]
integer total = 0
endstruct
private function Execute takes nothing returns nothing
local integer i
local real x
local real y
local data dat
local real f
local unit u
call GroupAddGroup(g,gg)
loop
set u = FirstOfGroup(gg)
exitwhen u == null
set dat = LoadInteger(h,GetHandleId(u),0)
set i = 0
loop
exitwhen i >= dat.total
if dat.mode[i] == 0 then
set f = GetUnitFacing(dat.u)
set x = GetUnitX(dat.u) + dat.d[i] * Cos((f+dat.angle[i]) * bj_DEGTORAD)
set y = GetUnitY(dat.u) + dat.d[i] * Sin((f+dat.angle[i]) * bj_DEGTORAD)
else
set dat.angle[i] = dat.angle[i] + dat.s[i]
set x = GetUnitX(dat.u) + dat.d[i] * Cos((dat.angle[i]) * bj_DEGTORAD)
set y = GetUnitY(dat.u) + dat.d[i] * Sin((dat.angle[i]) * bj_DEGTORAD)
endif
call SetUnitX(dat.t[i],x)
call SetUnitY(dat.t[i],y)
if GetUnitCurrentOrder(dat.t[i]) == OrderId("move") then
call IssueImmediateOrder(dat.t[i],"stop")
endif
set i = i + 1
endloop
call GroupRemoveUnit(gg,u)
endloop
endfunction
private function Create takes unit u, integer id, real d, real a, real s, boolean attack, integer mode returns data
local data dat = LoadInteger(h,GetHandleId(u),0)
local real x = GetUnitX(u) + d * Cos((GetUnitFacing(u)+a) * bj_DEGTORAD)
local real y = GetUnitY(u) + d * Sin((GetUnitFacing(u)+a) * bj_DEGTORAD)
local integer i
if dat == 0 then
set dat = data.create()
set dat.u = u
call SaveInteger(h,GetHandleId(u),0,dat)
endif
set i = dat.total
set dat.t[i] = CreateUnit(GetOwningPlayer(u),id,x,y,GetUnitFacing(u))
if mode == 0 then
set dat.angle[i] = a
else
set dat.angle[i] = GetUnitFacing(u)+a
set dat.s[i] = s
endif
set dat.d[i] = d
set dat.mode[i] = mode
call SetUnitPathing(dat.t[i],false)
call SetUnitInvulnerable(dat.t[i], not attack)
call GroupRemoveUnit(g,u)
call GroupAddUnit(g,u)
call SaveInteger(h,GetHandleId(dat.t[i]),0,i)
call SaveUnitHandle(h,GetHandleId(dat.t[i]),1,u)
set dat.total = dat.total + 1
return dat
endfunction
function CreateDrone takes unit towhich, integer drone, real distance, real angle, boolean attackable returns unit
local data dat = Create(towhich,drone,distance,angle,0,attackable,0)
return dat.t[dat.total-1]
endfunction
function CreateDroneRotating takes unit towhich, integer drone, real distance, real speed, boolean attackable returns unit
local data dat = Create(towhich,drone,distance,0,1,attackable,1)
return dat.t[dat.total-1]
endfunction
function RemoveDrone takes unit drone returns nothing
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
if drone != null then
call FlushChildHashtable(h,GetHandleId(dat.t[i]))
call RemoveUnit(dat.t[i])
set dat.total = dat.total - 1
set dat.t[i] = dat.t[dat.total]
set dat.d[i] = dat.d[dat.total]
set dat.s[i] = dat.s[dat.total]
set dat.angle[i] = dat.angle[dat.total]
set dat.mode[i] = dat.mode[dat.total]
endif
set u = null
endfunction
function RemoveAllDrones takes unit owner returns nothing
local data dat = LoadInteger(h,GetHandleId(owner),0)
local integer i = 0
loop
exitwhen i >= dat.total
call FlushChildHashtable(h,GetHandleId(dat.t[i]))
call RemoveUnit(dat.t[i])
set i = i + 1
endloop
set dat.total = 0
endfunction
function SetDroneRotationSpeed takes unit drone, real speed returns nothing
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
set dat.s[i] = speed
set u = null
endfunction
function SetDroneAngle takes unit drone, real angle returns nothing
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
set dat.angle[i] = angle
set u = null
endfunction
function SetDroneDistance takes unit drone, real distance returns nothing
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
set dat.d[i] = distance
set u = null
endfunction
function GetDroneRotationSpeed takes unit drone returns real
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
set u = null
return dat.s[i]
endfunction
function GetDroneAngle takes unit drone returns real
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
set u = null
return dat.angle[i]
endfunction
function GetDroneDistance takes unit drone returns real
local unit u = LoadUnitHandle(h,GetHandleId(drone),1)
local integer i = LoadInteger(h,GetHandleId(drone),0)
local data dat = LoadInteger(h,GetHandleId(u),0)
set u = null
return dat.d[i]
endfunction
private function remove takes nothing returns boolean
if LoadUnitHandle(h,GetHandleId(GetTriggerUnit()),1) != null then
call RemoveDrone(GetTriggerUnit())
endif
return false
endfunction
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(t,Condition(function remove))
set t = CreateTrigger()
call TriggerRegisterTimerEvent( t, interval,true )
call TriggerAddAction(t,function Execute)
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_IssueOrderByUnID_Actions takes nothing returns nothing
endfunction
call IssueTargetOrderById(GetLastCreatedUnit(),852274,IllusionCaster)
//===========================================================================
function InitTrig_IssueOrderByUnID takes nothing returns nothing
set gg_trg_IssueOrderByUnID = CreateTrigger( )
call TriggerAddAction( gg_trg_IssueOrderByUnID, function Trig_IssueOrderByUnID_Actions )
endfunction