What is wrong with this script!? menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Cuodin's Avatar Member
    Reputation
    5
    Join Date
    Aug 2009
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is wrong with this script!?

    I've been busting my butt to try and find the problem, but I just can't see it! (it's a cinematic)

    local npcid = 81021

    function Ambassador_OnGossipTalk(pUnit, event, player, pMisc)
    pUnit:GossipCreateMenu(1, player, 0)
    pUnit:GossipMenuAddItem(0, "Who the hell are you?", 1, 0)
    pUnit:GossipMenuAddItem(5, "Nevermind", 2, 0)
    pUnit:GossipSendMenu(player)
    end


    function Ambassador_OnSelect(pUnit, event, player, id, intid, code)
    if (intid == 1) then
    pUnit:GossipCreateMenu(1, player, 0)
    pUnit:GossipMenuAddItem(4, "Proceed", 11, 0)
    pUnit:GossipMenuAddItem(4, "Forget it", 2, 0)
    pUnit:GossipSendMenu(player)
    end

    if(intid == 11) then
    pUnit:SendChatMessage(12, 0, "I am Ambassador Kharr, the great Darklord of the Twilight Legion. I am in charge of succeeding in our plans of destroying and conquering the whole world... Enough about me, I got better things to do!!!")
    pUnit:MoveTo(-8515.610352, 2014.859985, 104.526001, -2.506109)
    player:GossipComplete()
    pUnit:RegisterEvent("Ambassador_Start", 8000, 1)
    end


    if(intid == 2) then
    pUnit:SendChatMessage(12, 0, "What, Are you scared?")
    player:GossipComplete()
    end
    end

    function Ambassador_Start(pUnit, event)
    pUnit:SpawnCreature(81020, -8566.162109, 1977.575684, 100.220535, 2.263582, 14, 0, 0)
    pUnitespawn(1000, 0)
    end



    RegisterUnitGossipEvent(81021, 1, "Ambassador_OnGossipTalk")
    RegisterUnitGossipEvent(81021, 2, "Ambassador_OnSelect")
    Problems: He doesn't walk to the specified coords
    - He doesnt despawn
    - He doesnt spawn the boss
    Last edited by stoneharry; 04-05-2011 at 09:58 AM. Reason: Added prefix because apparently you can't read the stickied thread saying the rules.

    What is wrong with this script!?
  2. #2
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I'm aware you can't call functions from gossip anymore, other than that just skim reading over it and it seems fine.

  3. #3
    Timmy420's Avatar Active Member
    Reputation
    16
    Join Date
    Jul 2006
    Posts
    181
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm the one that made the script he just posted it for me. Soo how would I go about calling that function than? What we are trying to do is make the guy say something while walking over to a specific location. Than once he gets to the location he will spawn the boss and than despawn himself. I tried putting it all into one function but he spawns the boss to early and I was thinking that the only way to make him spawn after he does all that is to make another function. I just don't know how I would register that function. Sorry if I am confusing you hahah

    I just thought of something. What if I made it so when you click on the right gossip option he will spawn a different version of himself and than despawn himself. Then the mob he spawned will do the entire cinematic. Let me know if this might work.
    Last edited by Timmy420; 04-05-2011 at 12:04 AM.

  4. #4
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Have a event on spawn check for whether the gossip menu has been selected or not, then continue once it has.

    Example:

    Code:
    Hook on spawn.
    
    On spawn register event to happen every few seconds.
    
    On that event, if ready == true then
    ready = false
    do stuff you wanted on gossip
    
    ----------------------
    
    Gossip menu
    on gossip select
    ready = true
    set npc flags 2 (untalkable)

Similar Threads

  1. What is wrong with this item teleportation Lua script ?
    By Wheeze201 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 08-13-2009, 08:50 AM
  2. What is wrong with this script?
    By XxCyanidexX in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 03-01-2009, 12:13 PM
  3. What is Wrong with my Script
    By Juicyz in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-23-2008, 07:37 PM
  4. [helpzerz] What is wrong with this lua script?
    By w21froster in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-21-2008, 09:45 PM
  5. [Need help] What's wrong with this script?
    By Arthas117 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-10-2008, 02:04 PM
All times are GMT -5. The time now is 04:26 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search