[Lua Help] Undead Quest menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua Help] Undead Quest

    Hello Mmowned,

    I recently created a small script. The transforming part works perfect but the demorphing doesn't. Any idea why, and if anymore could, could u add :PlaySpellVisual(guid, spell) to be cast onto the player by id: 93150 on the demorph. A spell i would like is like one with a green ray to it. Not too long though like 2 seconds long.

    Script:
    [spoiler]function OnFirstEnterWorld(event, pPlayer)
    local race = pPlayer:GetPlayerRace()
    if race == 5 then
    pPlayer:SetModel(10979)
    end
    end

    RegisterServerHook(3, "OnFirstEnterWorld")

    function OnQuestFinished(event, pPlayer, questId, pQuestGiver)
    if pPlayer:HasFinishedQuest(93150) then
    pPlayer:DeMorph()
    end
    end

    RegisterServerHook(22, "OnQuestFinished")[/spoiler]

    Thanks

    [Lua Help] Undead Quest
  2. #2
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    if pPlayer:HasFinishedQuest(93150) then
    You are asking if this is something, then not said what.

    Code:
    if pPlayer:HasFinishedQuest(93150) == 1 then
    hey ervyone whats up gamboys

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Print to make sure the function is being called, remove the if statement from on quest finished to test if that is the issue.

    If it's not being called it all, OnQuestFinished hook is still broken as it always has been (I haven't tested in ages though so it might work).

    edit: Facerolling, you can't be more wrong! HasFinishedQuest(x) returns as a boolean (true/false). To be technical, it should be:

    if pPlayer:HasFinishedQuest(93150) == true then

    However, you do not need the == true and in most languages a ! can be added before the statement to reverse the boolean.

  4. #4
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    KK am testing now

    edit
    -----------------------
    Gives an error when I delete the if, says unexpected symbol near "Then", like then isn't suppose to be there anymore.
    Last edited by BanzBoyz77; 03-06-2011 at 03:44 PM.

  5. #5
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just realised, I was treating it as a Get function D:
    hey ervyone whats up gamboys

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DeathToDeathwing77 View Post
    KK am testing now

    edit
    -----------------------
    Gives an error when I delete the if, says unexpected symbol near "Then", like then isn't suppose to be there anymore.
    ...You did delete the end that goes with it, right?

    Code:
    function OnQuestFinished(event, pPlayer, questId, pQuestGiver)
    pPlayer:DeMorph()
    print("Function called")
    if pPlayer:HasFinishedQuest(93150) then
    print("player has finished 93150")
    end
    end

  7. #7
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yep i deleted the end and it says same thing

  8. #8
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function OnFirstEnterWorld(event, pPlayer)
    	if pPlayer:GetPlayerRace() == 5 then
    		pPlayer:SetModel(10979)
    	end
    end
    
    RegisterServerHook(3, "OnFirstEnterWorld")
    
    function OnQuestFinished(event, pPlayer, questId, pQuestGiver)
    	pPlayer:DeMorph()
    	print("on quest finished function called")
    	if pPlayer:HasFinishedQuest(93150) == true then
    		print("Player has finished quest 93150")
    	end
    end
    
    RegisterServerHook(22, "OnQuestFinished")

  9. #9
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Na, the script above didn't work. But then again, don't every race have a displayid that when you transform into them, it basicly does same thing as demorph? Since morphing seems to work.

  10. #10
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DeathToDeathwing77 View Post
    Na, the script above didn't work. But then again, don't every race have a displayid that when you transform into them, it basicly does same thing as demorph? Since morphing seems to work.
    Are you actually receiving the prints into console? Or is the function not firing at all?

  11. #11
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works, just takes a few seconds to take effect (2-3 seconds). Although Stoneharry, are you able to add that Spell visual thing, seems odd that the player just suddenly changes back into an undead without any visuals to help them understand whats going on ( Trying for most blizzlike scripts as possible, with least amount of help, sadly theres still much i dont no)

  12. #12
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    pPlayer:PlaySpellVisual(pPlayer:GetGUID(pPlayer), spell)
    Unit Commands - ArcEmu-wiki
    hey ervyone whats up gamboys

  13. #13
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I no what the command is, just dont no how to use it.

  14. #14
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just did it for you, you just have to fill the spellid in ._.
    hey ervyone whats up gamboys

  15. #15
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your command works, but i need the npc ( id 91351) to cast it on the player, here the guy casts it on himself, and it looks so weird.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Lua Help] Orc Quest
    By BanzBoyz77 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 03-02-2011, 03:36 PM
  2. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  3. Lua help
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-18-2008, 07:03 PM
  4. Lua help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-04-2008, 12:17 PM
  5. Help on Quests
    By friendofdar in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 09-27-2007, 07:30 PM
All times are GMT -5. The time now is 05:14 AM. 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