Hey people,
first of all happy new year to everyone.
Now about my problem:
I use Trinitycore Eluna ( Comunity Repack) and TrinityCores last Rev., for the very first time because I had to leave Arcemu.
I have a problem with making my Lua Script work with my Custom Quest NPC.
This Npc is the first login Quest in my World. I added quests into The required Templates inside Database and made in addition to That a small Escort Script.
maybe I set some Value of my NPC wrong or my script ist Wrong, because everytime I reload Eluna Engine it doesnt show any errors. So it should normaly work but it doesn´t at all.
The Script I did running on TrinityCore Eluna:
Well thanks for reading
greats ^^
first of all happy new year to everyone.
Now about my problem:
I use Trinitycore Eluna ( Comunity Repack) and TrinityCores last Rev., for the very first time because I had to leave Arcemu.
I have a problem with making my Lua Script work with my Custom Quest NPC.
This Npc is the first login Quest in my World. I added quests into The required Templates inside Database and made in addition to That a small Escort Script.
maybe I set some Value of my NPC wrong or my script ist Wrong, because everytime I reload Eluna Engine it doesnt show any errors. So it should normaly work but it doesn´t at all.
The Script I did running on TrinityCore Eluna:
Code:
local NAME = "test"
local NPC_ID = 300000
local NPC_ID2 = 300001
local QUEST_ID = 1234567
function test_OnQuestAccept(event, plr, creature, quest)
if(creature:GetEntry() == NPC_ID) and (quest:GetId() == QUEST_ID) then
creature:SendChatMessageToPlayer(12, 0, "Wir sollten uns lieber beeilen!", plr)
creature:RegisterEvent("Escort_Move", 1000, 1)
end
end
function test_EscortMove(creature, event)
creature:GetX()
creature:GetY()
creature:GetZ()
creature:MoveTo(1, -2865.35, -1481.59, 10.154058)
creature:RegisterEvent("Escort_Complete", 10000, 1)
end
function test_EscortComplete(creature, event)
creature:SendChatMessageToPlayer(12, 0, "So, hier sind wir sicher", plr)
plr:CompleteQuest(QUEST_ID)
creature:SpawnCreature( NPC_ID2, -2855.366455, -1478.071289, 10.153750, 3.324098, 8, 0)
end
RegisterCreatureEvent( NPC_ID, 1, test_OnQuestAccept, 0)
RegisterCreatureEvent( NPC_ID, 2, test_EscortMove, 0)
RegisterCreatureEvent( NPC_ID, 3, test_EscortComplete, 0)
Well thanks for reading
greats ^^
Last edited: