Welcome to XOXOXOXO@blogspot.com
Use the arrow keys to move the character
Press the space-key to interact with objects
JASS (Programming language)
Wednesday, March 31, 2010
Pfft.
I tried to get xiian to learn programming =x
Not sure if she will ever try, her excuse is that she can't even understand "HTML"

Jesus Christ!
HTML and JASS are 2 different things!

Besides, JASS was made by Blizzard so that idiots like her and I can learn programming basics.
I mean, how hard is it to understand THIS!:

scope Familiar2 initializer Familiar2

globals
unit array familiardef
boolean array FamiliarActivate
unit array DefTarget
endglobals

private struct Fam
private static Fam data = 0
private static hashtable ht = InitHashtable()
group FamiliarRange = CreateGroup()
unit caster //Hero
unit familiar //Familiar
integer A01PLevel //Napalm Blade
integer AGI //Hero Agility
integer ticks=0 //Number of cycles
timer t //Time in between commands
real Cx //Caster X
real Cy //Caster Y
real Fx //Familiar X
real Fy //Familiar Y
real rad //Radian
real r = 400.00 //Distance Between Hero and Familiar
integer A01YLevel //Familiar Level
group damagedunits = CreateGroup() //Ensures units are damaged once per round?
integer arrayunit = 1 //For FamiliarDef to associate with the spawned dummy
boolean FirstTimeActive = false //Sets life-time of dummy when Devition is cast
static method FamGroup takes nothing returns boolean
local unit u = GetFilterUnit()
local Fam f = Fam.data
local real damage
local location l = Location(GetUnitX(u), GetUnitY(u))
if IsUnitEnemy(u, GetOwningPlayer(f.caster)) == true and IsUnitInGroup(u, f.damagedunits) == false then
set damage = I2R(R2I(((((f.A01PLevel * 0.11) + 0.11 ) * f.AGI)) + (f.A01PLevel * 5) * (f.A01YLevel * 0.1)))
call UnitAddAbility(u, 'A026')
call IssueTargetOrder(u, "bloodlust", u)
call UnitRemoveAbility(u, 'A026')
call DestroyEffect(AddSpecialEffectTarget("Environment\\UndeadBuildingFire\\UndeadLargeBuildingFire2.mdl", u, "chest"))
call CreateTextTagLocBJ( I2S(R2I(damage))+"!", l, 0, 10, 100, 0,0, 0 )
call SetTextTagLifespanBJ( bj_lastCreatedTextTag, 1.00 )
call SetTextTagPermanentBJ( bj_lastCreatedTextTag, false )
call UnitDamageTarget(f.caster,u,damage,false,false,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_FIRE,null)
call GroupAddUnit(f.damagedunits, u)
endif
set u = null
call RemoveLocation(l)
set l = null
return false
endmethod


static method FamTimer takes nothing returns nothing
local Fam f = LoadInteger(Fam.ht, GetHandleId(GetExpiredTimer()), 0)
local integer tickcount
if f.ticks < firsttimeactive ="="" ticks =" R2I(640" firsttimeactive =" true" rad =" f.rad" cx =" GetUnitX(DefTarget[f.arrayunit])" cy =" GetUnitY(DefTarget[f.arrayunit])" fx =" f.Cx" fy =" f.Cy" rad =" f.rad" cx =" GetUnitX(f.caster)" cy =" GetUnitY(f.caster)" fx =" f.Cx" fy =" f.Cy" ticks =" f.ticks+1" data =" f" tickcount =" ModuloInteger(f.ticks," tickcount ="="" f =" Fam.allocate()" caster =" GetTriggerUnit()" cx =" GetUnitX(f.caster)" cy =" GetUnitY(f.caster)" rad =" GetUnitFacing(f.caster)" fx =" f.Cx" fy =" f.Cx" a01plevel =" GetUnitAbilityLevel(f.caster," agi =" GetHeroAgi(f.caster," t =" CreateTimer()" a01ylevel =" GetUnitAbilityLevel(f.caster," udg_klivenapalmlevel =" GetUnitAbilityLevel(GetTriggerUnit()," familiar =" CreateUnit(GetOwningPlayer(f.caster)," udg_napalmbearer =" f.caster" arrayunit ="="" arrayunit =" f.arrayunit+1" caster =" null" familiar =" null" damagedunits =" null"> 0
endfunction


//===========================================================================
private function Familiar2 takes nothing returns nothing
local trigger t = CreateTrigger( )
local integer i = 0
loop
exitwhen i == 8
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set i = i+1
endloop
call TriggerAddCondition(t, Condition(function FamCond))
call TriggerAddAction( t, function Fam.FamAct )
endfunction

endscope




Ehh..
Okay, so it might be a teensy bit more complicated than I make it out to be.
But everything takes time..
This post was made @ 11:01 PM
Name : Justin
D.O.B : Jan 08' 1994
Course : Game and Entertainment Technology @ TP
Is in a relationship with Dyana ~