Its pretty basic, I am creating a hunter pet that will spawn, follow and protect the hunter from level 1 to level 10. So far I have tried parts of the script to work but that didn't even work. Heres the script:
And the errorfunction On_Quest_Accept(event, pPlayer, questId, pQuestGiver)
if (player:GetPlayerClass() == "Hunter") then
print("class Hunter is valid")
if (player:GetPlayerRace() == "Human") then
print("race Human is valid")
if player:GetLevel() < 10 then
pPlayer:SpawnCreature(85600, -1268.229980, -5504.678223, 5.145780, pPlayer:GetO(0.00000), 71, 0)
pPlayer:CreateGuardian(85600, 0, 90, 1)
end
end
RegisterServerHook(14, "On_Quest_Accept")
If anyone can, can you add to the script so that the npc follows the player around and despawns once player hits 10?scripts\Pets.lua:17: 'end' expected <to close 'if' at line 2> near '<eof>'