Beruflich Dokumente
Kultur Dokumente
--------------------------------------------------------------------------------
--
-- DATA
--------------------------------------------------------------------------------
--
-- Constants
-- Base search for the player
local RANGE = 600;
local ANGLE = 90;
-- Used for the explosion
local RANGE_explo = 200;
local ANGLE_explo = 360;
local CLASS_ID = GetPyOID("ClassTable", "Spell_Lightning_1");
-- Cached values
local skill level;
local mana_cost;
local target;
local gameobject;
--------------------------------------------------------------------------------
--
-- EVENTS
--------------------------------------------------------------------------------
--
local function DoExplode(target)
/\
||
||
||
||
||
||
||
||
THIS IS WHERE THE SCRIPT WOULD GO BUT I DONT KNOW HOW TO SOLVE THIS PART PLEASE
HELP!
||
||
||
||
||
||
||
||
\/
end
--------------------------------------------------------------------------------
--
-- CALLBACKS
--------------------------------------------------------------------------------
--
--------------------------------------------------------------------------------
--
local function OnSkillInfo_(slvl)
-- Get the skill information for HUD display
return cooldown_timer;
end
--------------------------------------------------------------------------------
--
local function OnSkillUpdate_()
-- Update skill information each time the skill is updated by the player (level
up or menu access)
local plvl = GetProp(GetPyStruct("CharacterProperties", "Level"));
local slvl = GetCurrentSpellInfo();
skill_level = slvl;
end
--------------------------------------------------------------------------------
--
local function OnSkillCheck_()
-- Check if the player can cast the skill based on the remaining mana
return HasMana(mana_cost), false;
end
--------------------------------------------------------------------------------
--
local function OnPreSkill_()
-- Executed just before starting the skill
SetTargetListCharacterFilter(GetPyCst("AITargetList_CharacterFilter", "E
nemy"));
SetTargetListObjectFilter(GetPyCst("AITargetList_ObjectFilter", "Attacka
bleOnly"));
SetTargetListSorting(GetPyCst("AITargetList_Sorting", "NoSort"));
TargetListSearch(RANGE, ANGLE);
UseMana(mana_cost);
PlayFX(GetPyOID("AnimatedEffectTable", "Celest_Level_1_Player"));
if(IsTargetListEmpty()) then
Trace("No Target, FAIL SOUND!");
PlaySound("StaticBallKilled",false,0,false);
target, gameobject = GetTargetListTop();
end
end
--------------------------------------------------------------------------------
--
local function OnSkill_()
-- Executed when the skill event is received from the player
ApplyPropClass(CLASS_ID + skill_level);
if(gameobject) then
local dmg = SpellCombatRoll(target);
if(dmg > 0) then â - Integrity check, if dmg > 0 it means it's a char
acter
target:PlayFX(GetPyOID("AnimatedEffectTable", "Celest_Le
vel_1_Main"));
DoExplode(target);
end
end
end
--------------------------------------------------------------------------------
--