[Lua]Kerp's and Wolferine's Sample Escort Quest menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Daimyo2704's Avatar Member
    Reputation
    37
    Join Date
    Jan 2009
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua]Kerp's and Wolferine's Sample Escort Quest

    This is scripted as a sample for further use by Lua scripters.

    Code:
    --[[ 
    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.
    Hope you like it

    [Lua]Kerp's and Wolferine's Sample Escort Quest
  2. #2
    P1raten's Avatar Banned
    Reputation
    500
    Join Date
    Mar 2008
    Posts
    1,323
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good work. +rep x3

  3. #3
    Fraktain's Avatar Private
    Reputation
    1
    Join Date
    Nov 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good Work!

  4. #4
    Hellgawd's Avatar Member
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice, first time I've seen escorts done outside of C++. +8

  5. #5
    alj03's Avatar Contributor
    Reputation
    91
    Join Date
    Feb 2008
    Posts
    1,103
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks good mate.
    Death to all but Metal.

  6. #6
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    GJ dude
    friggin neat!
    +Rep
    It's been a while

  7. #7
    Kirsebaer's Avatar Banned
    Reputation
    6
    Join Date
    Nov 2008
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great!
    Finally a good way to learn.

  8. #8
    Daimyo2704's Avatar Member
    Reputation
    37
    Join Date
    Jan 2009
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks all.

  9. #9
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great one, indeed with helgawd, never seen one WORKING outside c++ .. gj.. +Rep x2
    [/COLOR]

  10. #10
    Daimyo2704's Avatar Member
    Reputation
    37
    Join Date
    Jan 2009
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Exacute =)

    thanks to P1raten

Similar Threads

  1. [WIP] [Lua++] [C++] Health and Mana Regenerator
    By baptizein in forum WoW EMU General Releases
    Replies: 6
    Last Post: 10-05-2008, 03:32 PM
  2. [LUA++] Attumen, Moroes and adds.
    By Flannel007 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 07-12-2008, 11:43 PM
  3. LUA compiled threads and more
    By runiker in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 06-18-2008, 03:35 AM
  4. [Guide] How to make LUA portals easy and noobie too!
    By Ellenor in forum WoW EMU Guides & Tutorials
    Replies: 15
    Last Post: 03-05-2008, 09:10 PM
  5. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 04:38 AM
All times are GMT -5. The time now is 01:01 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search