Hey guys, i have been trying to do some Lua scripting because i thought it would be a fun way.i have been testing scripts on an own server I just put up just to test scripts.
I was trying to do an algalon script, step by step, but got some errors on my way:
1)Server crashes when trying to spawn Gift of the Observer, the code im using for that is just:
Code:
function Algalon_Defeat (pUnit, Event)
if Algalon:GetHealthPct() < 2 then
Algalon:RemoveEvents()
Algalon:Despawn(1000, 0)
Algalon:SpawnGameObject(194821, x, y, z, o, 0) ---Dont remember the cords btw, deleted it from the script when it crashed server.
end
end
2)Server crashes when trying to make voids phase players, using this code:
Code:
function BlackHole_Spells (pUnit, Event)
x=math.random (1, 5)
plr=BlackHole:GetClosestPlayer()
BlackHole:CastSpell (64017)
if plr:GetDistance() <= x then
plr:SetPhase(2)
3)Server crashes when im using an ulduar teleporter, which I didnt create, it was in the RePack im using.Here is the script:
Code:
-- Ulduar Teleporter pads
-- coded by xalcon
--remake by newmoon
ul_locations = { { "Expedition Base Camp", { -707.3, -92.7, 430.3 } },
{ "Formation Grounds", { 132.2, -35.4, 410.3 } },
{ "Colossal Forge", { 554.4, -12.2, 410.1 } },
{ "Scrapyard", { 927.1, -11.4, 419 } },
{ "Antechamber of Ulduar", { 1499, -24, 421 } },
{ "Shattered Walkway", { 1859, -24, 449 } },
{ "Conservatory of Life", { 2102.2, -24, 421.244 } },
{ "Spark of Imagination", { 2520, 2569, 412.5 } },
{ "Descent into Madness", { 1853.4, -24.7, 334.2 } }, }
ul_mapid = 603
-- Dynamic Teleport-List Builder :D
function UL_TeleportOnView(pUnit, event, player)
pUnit:GossipObjectCreateMenu(100, player, 0)
for i=1, table.getn(ul_locations), 1 do
pUnit:GossipObjectMenuAddItem(0, ul_locations[i][1], i, 0)
end
pUnit:GossipObjectSendMenu(player)
end
function UL_TeleportOnUse(pUnit, event, player, id, intid)
player:GossipComplete()
local x = ul_locations[intid][2][1]
local y = ul_locations[intid][2][2]
local z = ul_locations[intid][2][3]
player:Teleport(ul_mapid,x,y,z)
end
RegisterGameObjectEvent (194569, 4, "UL_TeleportOnView")
RegisterGOGossipEvent(194569, 2, "UL_TeleportOnUse")
Repack im using is NetherEmu for 3.3.0a.
And while im asking, do anyone know how to make the Celestial Planetarium (the place Algalon is) look like it does after Algalon turns it into pure space look?
thx