Code:
function onQuestGiverSpawn(Unit)
Unit:RegisterEvent("QuestGiver",1000,1)
end
function QuestGiver(Unit)
QuestGiver = Unit
end
function OnQuest(Unit, Event)
pUnit = Unit
QuestGiver:RegisterEvent("TextOnAcceptQuest",500,1)
QuestGiver:RegisterEvent("QuestSpawn",5000,1)
end
function TextOnAcceptQuest(Unit)
Unit:SendChatMessage(0,0, "Ohh Thank you $N. Thank you SOOO much.")
end
function QuestSpawn(Unit)
if pUnit:GetLevel() < 20 then
Unit:SpawnGameObject(262, -8851.334961, 612.655823, 93.299080, 0, -1)
Unit:SpawnGameObject(262, 9696.72, -7286.16, 14.60, 0, -1)
Unit:SpawnGameObject(262, -4812.316895, -869.618896, 501.677551, 0, -1)
Unit:SpawnGameObject(262, -1285.56, 66.12, 128.52, 0, -1)
Unit:SpawnGameObject(262, 866.503, 2496.267, 1315.8787, 6.261198, -1)
Unit:SpawnGameObject(262, -3930.268066, -11638.26094, -138.368088, 5.321068, -1)
Unit:SpawnGameObject(262, 1595.90, 239.88, -52.14, 0, -1)
Unit:SpawnGameObject(262, 1619.84, -4449.92, 9.84, 0, -1)
elseif pUnit:GetLevel() < 30 then
elseif pUnit:GetLevel() < 40 then
elseif pUnit:GetLevel() < 50 then
elseif pUnit:GetLevel() < 60 then
elseif pUnit:GetLevel() < 70 then
end
end
function GODespawn(Unit)
Unit:Despawn(10000,0)
end
RegisterUnitEvent(50000, 6, "onQuestGiverSpawn")
RegisterQuestEvent(50000,2,"OnQuest")
RegisterGameObjectEvent(262,2,"GODespawn")
Does the pUnit:Getlevel() work or even exist.