Likes: 0
Results 1 to 10 of 10
-
15-11-09, 01:33 PM #1
[Lua]Kerp's and Wolferine's Sample Escort Quest
Register to remove this adCode:--[[ This sample escort quest is scripted by Wolferine and Kerp. Do not claim this to be yours. Do not re-release without my permission. Do not remove these credits. ]] local NPC_ID = Npc ID here local QUEST_ID = Quest ID here local NPC_ID2 = Npc ID Spawn 2 local NPC_ID3 = Npc ID Spawn 3 local NPC_ID4 = NPC ID Spawn 4 function OnQuestAccept(event, pPlayer, pQuestGiver, questId) if(pQuestGiver == NPC_ID) and (questId == QUEST_ID) then pUnit:SendChatMessage(12, 0, "We better be going else they will notice I left!") pUnit:RegisterEvent("Escort_Move", 1000, 1) end end function Escort_Move(pUnit, Event) pUnit:GetX() pUnit:GetY() pUnit:GetZ() pUnit:MoveTo(0, x+10, y, z) pUnit:RegisterEvent("Escort_Move2", 5000, 1) end function Escort_Move2(pUnit, Event) pUnit:GetX() pUnit:GetY() pUnit:GetZ() pUnit:MoveTo(0, x+10, y, z) pUnit:RegisterEvent("Escort_Move3", 10000, 1) end function Escort_Move3(pUnit, Event) pUnit:SendChatMessage(12, 0, "I really need to catch breath...") pUnit:RegisterEvent("Escort_Spawn", 5000, 1) end function Escort_Spawn(pUnit, Event) pUnit:SendChatMessage(12, 0, "Watch out!") pUnit:GetX() pUnit:GetY() pUnit:GetZ() pUnit:SpawnCreature(NPC_ID2, x+5, z+5, y, 0) pUnit:SpawnCreature(NPC_ID3, x+10, z+5, y, 0) pUnit:SpawnCreature(NPC_ID4, x+7, z+7, y, 0) pUnit:RegisterEvent("Escort_Move4", 40000, 1) end function Escort_Move4(pUnit, Event) pUnit:SendChatMessage(12, 0, "Phew, that was close.") pUnit:GetX() pUnit:GetY() pUnit:GetZ() pUnit:MoveTo(1, x+10, z, y, 0) pUnit:RegisterEvent("Escort_Complete", 10000, 1) end function Escort_Complete(pUnit, Event) pUnit:SendChatMessage(12, 0, "Thanks for helping me man!") player:QuestComplete(QUEST_ID) pUnit:Despawn() end RegisterServerHook(14, "OnQuestAccept")
This scripts will trigger with an additional server hook( added in LuaHypArc) if you accept the quest the npc will begin to move.
Do notice this will not work without LuaHypArc.
If you have any questions about the script, add my msn, [email protected]
Feel free to add me for just a chat also.
› See More: [Lua]Kerp's and Wolferine's Sample Escort Quest
-
15-11-09, 01:45 PM #2
1. try to use normal words not "phew" ... etc..etc
2. "Thanks for helping me man!"... what if it is a female ? ...
3. Goodluck and keep up the good work
Regards, Dimman (axel)Last edited by Dimman; 15-11-09 at 02:30 PM.
No touching please.
-
15-11-09, 02:06 PM #3
It's a sample script, read for once.
-
15-11-09, 02:30 PM #4
-
15-11-09, 09:26 PM #5
-
16-11-09, 03:58 AM #6
Bah, Dinman said what I wanted to..
me if I have helped you in anyway ^^ Example: Sharing a repack, answering questions... Well you know the rest xD. As long as I help you!
-
16-11-09, 09:57 AM #7
Thanks for your comments =)
-
17-11-09, 03:30 AM #8
Improve it a bit more and release a 2nd version
me if I have helped you in anyway ^^ Example: Sharing a repack, answering questions... Well you know the rest xD. As long as I help you!
-
17-11-09, 09:06 AM #9
-
18-11-09, 03:29 AM #10
Register to remove this adBuy more time x)
me if I have helped you in anyway ^^ Example: Sharing a repack, answering questions... Well you know the rest xD. As long as I help you!