Code:
--[[
THIS IS A TEST TO BECOME A DEV ON The Sanctum
IF YOU GET ABOVE AN 75% YOU HAVE PASSED
--]]
1.)What would be the output of this code?
--Precondition: x is a variable containing the correct spawn ID
function Boss_OnEnterCombat(Unit, Event)
Unit:SendChatMessage(14, 0, "I WILL KILL YOU")
end
RegisterUnitEvent(x, 4, "Boss_OnEnterCombat")
A.)The boss will yell "I WILL KILL YOU" in the universal language, when combat ends
b.)The boss will say "I WILL KILL YOU" in the universal language, when combat starts
c.)The boss will yell "I WILL KILL YOU" in common, when combat starts
d.)The boss will yell "I WILL KILL YOU" in orcish, when combat ends
e.)A run-time error
2.)Debug this code
function Boss_OnEnterCombat (Event, Unit)
Unit:SendCHatMessage(12, 0, "YOU SUCK!)
Unit:RegisterEvent("Boss_PhaseOne", 5000, 0)
end
function Boss_Phaseone(Unit, Event)
Unit:FullCastSpellOnTarget(4)
Unit:SendChatMessage(14, 0,"DIE"
end
3.)Which wont cause an error?
I local s = Unit:SpawnCreature(133701, pPlayer:GetX() + 1, pPlayer:GetY() - 1, pPlayer:GetZ(), pPlayer:GetO(), 90000)
II local t = {
{1, 2, 3}
{4, 5, 6}
{7, 8, 9}}
III local v = {}
print v[1]
A.)I only
B.)II only
C.)III only
D.)I, II
E.)II, II
F.)They all cause error's
4.) Create a boss script that gets the main tank, stores it to a table, prints his name, then pacifys him. At 50% health the boss should enter a flying phase, where you cant click on him but he will summon NPC's cast a spell on a random enemy every 12 seconds.
Bookmarks