[LUA] Proplems menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA] Proplems

    i CANNOT find the god damn bug. No console error >.<
    +Rep x2 if i can :P

    function Manwello(pUnit, event)
    pUnit:SetHealthPct(100)
    pUnit:SetFaction(35)
    end
    RegisterUnitEvent(900092, 18, "Dora")


    function Manwello_On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(1, player, 0)
    pUnit:GossipMenuAddItem(0, "I am ready to escort you!", 321, 0)
    pUnit:GossipMenuAddItem(0, "I am not ready yet.", 421, 0)
    pUnit:GossipSendMenu(player)
    end


    function Manwello_Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 321) then
    if player:IsOnQuest(100013)== true then
    pUnit:SetNPCFlags(2)
    pUnit:RegisterEvent("Manwello_Start", 1, 1)
    pUnit:SendChatMessage(12, 0, "Okay then. It took you some time but lets go!")
    player:GossipComplete()
    else
    player:SendBroadcastMessage("You need the required quest: 'Message Delivery'.")
    end
    end

    if(intid == 421) then
    player:GossipComplete()
    end

    end


    function Manwello_Start(pUnit, Event)
    pUnit:RegisterEvent("Manwello_StartEvent", 1000, 1)
    end


    function Manwello_StartEvent(pUnit, Event)
    pUnit:RegisterEvent("Manwello_Walk1", 1000, 1)
    pUnit:RegisterEvent("Manwello_Walk2", 3000, 1)
    pUnit:RegisterEvent("Manwello_Walk3", 13000, 1)
    pUnit:RegisterEvent("Manwello_Walk4", 20000, 1)
    pUnit:RegisterEvent("Manwello_Walk5", 27000, 1)
    pUnit:RegisterEvent("Manwello_Walk6", 54000, 1)
    pUnit:RegisterEvent("Manwello_Walk7", 64000, 1)
    pUnit:RegisterEvent("Manwello_Walk8", 69000, 1)
    pUnit:RegisterEvent("Manwello_Walk9", 85000, 1)
    pUnit:RegisterEvent("Manwello_Walk10", 103000, 1)
    pUnit:RegisterEvent("Manwello_Walk11", 116000, 1)
    pUnit:RegisterEvent("Manwello_Walk12", 124000, 1)
    pUnit:RegisterEvent("Manwello_Walk13", 131000, 1)
    pUnit:RegisterEvent("Manwello_Despawn", 132000, 1)
    end

    function Manwello_Walk1(pUnit, Event)
    pUnit:MoveTo(-13925, 2957, 7.348839, 4.5)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk2(pUnit, Event)
    pUnit:MoveTo(-13927, 2946, 3.695342, 4.4)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk3(pUnit, Event)
    pUnit:MoveTo(-13850, 2946, 1.488060, 0.0)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk4(pUnit, Event)
    pUnit:MoveTo(-13845, 3010, 4.261274, 1.3)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk5(pUnit, Event)
    pUnit:MoveTo(-13822, 3034, 5.000000, 0.63)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk6(pUnit, Event)
    pUnit:MoveTo(-13791, 3257, 6.970440, 1.42)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk7(pUnit, Event)
    pUnit:MoveTo(-13859, 3238, 44.731903, 3.40)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk8(pUnit, Event)
    pUnit:MoveTo(-13882, 3267, 59.115154, 2.23)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk9(pUnit, Event)
    pUnit:MoveTo(-14008, 3264, 121.847466, 3.54)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk10(pUnit, Event)
    pUnit:MoveTo(-13985, 3140, 130.639008, 3.27)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk11(pUnit, Event)
    pUnit:MoveTo(-14007, 3133, 141.619003, -0.061047)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk12(pUnit, Event)
    pUnit:MoveTo(-13998, 3140, 135.136078, 0.019246)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Walk13(pUnit, Event)
    pUnit:MoveTo(-13998, 3140, 135.136078, 0.19246)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end

    function Manwello_Despawn(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Im gonna despawn becose this was a test run!")
    pUnitespawn(15000, 20000)
    end

    RegisterUnitGossipEvent(900092, 1, "Manwello_On_Gossip")
    RegisterUnitGossipEvent(900092, 2, "Manwello_Gossip_Submenus")
    Last edited by Tikki100; 08-06-2009 at 10:35 AM.

    [LUA] Proplems
  2. #2
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well what's wrong with it...?

  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)
    As Gastric said, it would help to know what is not working, like does the menu not even open for example, or does it get to sending the first message etc etc..
    It might be that the gossip id is already taken on create menu or I'm guessing the register does not work on gossip select, registering events in gossip = really buggy.

  4. #4
    Kaidos's Avatar Contributor
    Reputation
    148
    Join Date
    Jun 2008
    Posts
    324
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    --[[ OnSpawn ]]--
    
    
    function Manwello_OnSpawn(pUnit, event)
    pUnit:RegisterEvent("Manwello_SpawnFlagsEtc", 2000, 1)
    end
    
    function Manwello_SpawnFlagsEtc(pUnit, event)
    pUnit:SetHealthPct(100)
    pUnit:SetFaction(35)
    pUnit:SetNPCFlags(1) -- need to set flags onto 1, because you set it to 2 on gossip
    end
    
    RegisterUnitEvent(900092, 18, "Manwello_OnSpawn")
    
    
    
    --[[ Gossip ]]--
    
    
    function Manwello_On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(1, player, 0)
    pUnit:GossipMenuAddItem(0, "I am ready to escort you!", 321, 0)
    pUnit:GossipMenuAddItem(0, "I am not ready yet.", 421, 0)
    pUnit:GossipSendMenu(player)
    end
    
    
    function Manwello_Gossip_Submenus(pUnit, event, player, id, intid, code)
    if(intid == 321) then
     if player:IsOnQuest(100013)== true then
     pUnit:SetNPCFlags(2)
     pUnit:RegisterEvent("Manwello_Start", 1, 1)
     pUnit:SendChatMessage(12, 0, "Okay then. It took you some time but lets go!")
     player:GossipComplete()
     else
     player:SendBroadcastMessage("You need the required quest: 'Message Delivery'.")
     end
    end
    
    if(intid == 421) then
     player:GossipComplete()
    end
    
    end
    
    
    RegisterUnitGossipEvent(900092, 1, "Manwello_On_Gossip")
    RegisterUnitGossipEvent(900092, 2, "Manwello_Gossip_Submenus") 
    
    
    
    
    --[[ Mob action (walk) ]]--
    
    
    function Manwello_Start(pUnit, Event)
     pUnit:RegisterEvent("Manwello_StartEvent", 1000, 1)
    end
    
    
    function Manwello_StartEvent(pUnit, Event)
    pUnit:RegisterEvent("Manwello_Walk1", 1000, 1)
    pUnit:RegisterEvent("Manwello_Walk2", 3000, 1)
    pUnit:RegisterEvent("Manwello_Walk3", 13000, 1)
    pUnit:RegisterEvent("Manwello_Walk4", 20000, 1)
    pUnit:RegisterEvent("Manwello_Walk5", 27000, 1)
    pUnit:RegisterEvent("Manwello_Walk6", 54000, 1)
    pUnit:RegisterEvent("Manwello_Walk7", 64000, 1)
    pUnit:RegisterEvent("Manwello_Walk8", 69000, 1)
    pUnit:RegisterEvent("Manwello_Walk9", 85000, 1)
    pUnit:RegisterEvent("Manwello_Walk10", 103000, 1)
    pUnit:RegisterEvent("Manwello_Walk11", 116000, 1)
    pUnit:RegisterEvent("Manwello_Walk12", 124000, 1)
    pUnit:RegisterEvent("Manwello_Walk13", 131000, 1)
    pUnit:RegisterEvent("Manwello_Despawn", 132000, 1)
    end
    
    function Manwello_Walk1(pUnit, Event)
    pUnit:MoveTo(-13925, 2957, 7.348839, 4.5)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk2(pUnit, Event)
    pUnit:MoveTo(-13927, 2946, 3.695342, 4.4)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk3(pUnit, Event)
    pUnit:MoveTo(-13850, 2946, 1.488060, 0.0)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk4(pUnit, Event)
    pUnit:MoveTo(-13845, 3010, 4.261274, 1.3)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk5(pUnit, Event)
    pUnit:MoveTo(-13822, 3034, 5.000000, 0.63)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk6(pUnit, Event)
    pUnit:MoveTo(-13791, 3257, 6.970440, 1.42)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk7(pUnit, Event)
    pUnit:MoveTo(-13859, 3238, 44.731903, 3.40)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk8(pUnit, Event)
    pUnit:MoveTo(-13882, 3267, 59.115154, 2.23)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk9(pUnit, Event)
    pUnit:MoveTo(-14008, 3264, 121.847466, 3.54)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk10(pUnit, Event)
    pUnit:MoveTo(-13985, 3140, 130.639008, 3.27)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk11(pUnit, Event)
    pUnit:MoveTo(-14007, 3133, 141.619003, -0.061047)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk12(pUnit, Event)
    pUnit:MoveTo(-13998, 3140, 135.136078, 0.019246)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    function Manwello_Walk13(pUnit, Event)
    pUnit:MoveTo(-13998, 3140, 135.136078, 0.19246)
    pUnit:SendChatMessage(12, 0, "Balls!")
    end
    
    
    function Manwello_Despawn(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Im gonna despawn becose this was a test run!")
    pUnit:Despawn(15000, 20000)
    end
    Try this out, i changed some things...

    If there is any error in the world.exe, please post it.
    Last edited by Kaidos; 08-08-2009 at 05:02 PM.

  5. #5
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by newtech View Post
    (Please +rep)
    Only noobs asks for Rep.

  6. #6
    Tikki100's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2008
    Posts
    83
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Xendro for the lua. And notice to Gastric penguin and stoneharry ^^

    Menu DID show up. when it was activated it should change flags and begin walk, but he did't. So that was it ^^ But xendros lua work good so thanks

    -------------
    Im still a student but im still a pro.

Similar Threads

  1. [Guide] Lua Scripting Guide is here [Updating]
    By Illidan1 in forum WoW EMU Guides & Tutorials
    Replies: 93
    Last Post: 11-04-2008, 06:56 PM
  2. New LUA Scripts
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 11-26-2007, 05:58 PM
  3. Lua Ascent Script Documentation
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 11-26-2007, 12:42 PM
  4. LUA Refrences
    By 777devil777 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 11-22-2007, 08:09 PM
All times are GMT -5. The time now is 11:40 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