Results 1 to 10 of 10
  1. #1
    Sergeant myil's Avatar
    Reputation
    1
    Join Date
    Dec 2007
    Posts
    66
    Thanks G/R
    0/0
    CoreCoins
    0
    Trade Feedback
    0 (0%)

    LUA quests help

    Hi everyone. I was trying to script a LUA that would make a game object(portal) activate when a specific quest is completed. Does anyone know how to make a script like that?

  2. #2
    Contributor Kaidos's Avatar
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    CoreCoins
    24
    Trade Feedback
    0 (0%)
    Code:
    function QuestPortal_OnUse(Unit, Event, player)
       if player:HasFinishedQuest(QUESTID)== true then
         player:Teleport(mapid, x, y, z)
       else
          player:SendBroadcastMessage("Before you can use the portal you need to finish the quest:'QUESTNAME'.")
       end
    end
    
    RegisterGameObjectEvent(GAMOBJECTID, 4, "QuestPortal_OnUse")
    You only need to insert your QUESTID and the GO ID.

  3. #3
    Sergeant myil's Avatar
    Reputation
    1
    Join Date
    Dec 2007
    Posts
    66
    Thanks G/R
    0/0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    Thanks a lot =)
    how bout if i want to make game object spawn when you except quest.

  4. #4
    Banned Reliable Trader CoreCoins User thebigman's Avatar
    Reputation
    84
    Join Date
    Dec 2008
    Posts
    597
    Thanks G/R
    1/0
    CoreCoins
    1407
    Trade Feedback
    23 (96%)
    then edit this line
    player:HasFinishedQuest(QUESTID)== true then

    has quest i think
    player:HasQuest(QUESTID)== true then

  5. #5
    Sergeant myil's Avatar
    Reputation
    1
    Join Date
    Dec 2007
    Posts
    66
    Thanks G/R
    0/0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    uhh how come when i press on the portal it casts that World of Recall(OLD) thing and it doesn't do anything afterwards?

  6. #6
    Contributor Kaidos's Avatar
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    CoreCoins
    24
    Trade Feedback
    0 (0%)
    Any error in the world.exe? If not try this:

    Code:
    function QuestPortal_OnUse(pUnit, Event, player)
       if player:HasFinishedQuest(QUESTID)== true then
         player:Teleport(mapid, x, y, z)
       else
          player:SendBroadcastMessage("Before you can use the portal you need to finish the quest:'QUESTNAME'.")
       end
    end
    
    RegisterGameObjectEvent(GAMOBJECTID, 2, "QuestPortal_OnUse")


    Try to change the 4 to a 2....

    If this doesnt work i could make it as a npc (the npc would like look a portal)
    Last edited by Kaidos; 08-13-2009 at 12:48 PM.

  7. #7
    Banned Reliable Trader CoreCoins User thebigman's Avatar
    Reputation
    84
    Join Date
    Dec 2008
    Posts
    597
    Thanks G/R
    1/0
    CoreCoins
    1407
    Trade Feedback
    23 (96%)
    lol why did you say 4 the first time? go back and edit it.

  8. #8
    Sergeant myil's Avatar
    Reputation
    1
    Join Date
    Dec 2007
    Posts
    66
    Thanks G/R
    0/0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    still doesn't work

  9. #9
    Sergeant myil's Avatar
    Reputation
    1
    Join Date
    Dec 2007
    Posts
    66
    Thanks G/R
    0/0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    what's up with the World Recall spell anyways?

  10. #10
    Master Sergeant Ascelyn's Avatar
    Reputation
    22
    Join Date
    Jul 2009
    Posts
    129
    Thanks G/R
    0/0
    CoreCoins
    0
    Trade Feedback
    0 (0%)
    Most likely your gameobject isnt registered with a spell >_> Gogo to Database.. it's easier to edit it through the DB Tho you wont have as much possibilitys you have with LUA

 

 

Similar Threads

  1. Lua script help and general questions from beginner
    By WinKIller0 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-23-2008, 03:38 AM
  2. [Release] Goldensun City+instance+lua+quests+items
    By Spartansp in forum World of Warcraft Emulator Servers
    Replies: 61
    Last Post: 02-08-2008, 07:40 PM
  3. Need LUA Scripting Help ?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-04-2008, 11:36 AM
  4. help .lua portal help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 01-24-2008, 02:21 PM
  5. Daily Quest HELP! 4 u!
    By greendude111 in forum World of Warcraft Guides
    Replies: 7
    Last Post: 11-21-2007, 05:07 AM
All times are GMT -5. The time now is 02:11 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search