Please help with npc script menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Aferi's Avatar Private
    Reputation
    5
    Join Date
    Oct 2011
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please help with npc script

    Ok i am trying to make zone npc weather changer. I took only PLAYER weather changer and put in zone commands. Everything runs nice, no erros in world after clicking gossips, but weather doesnt change. Please help guys, i really need this for my funserver. Will realase with your credits if you solve this for me
    SCRIPT:
    Code:
        local NPCID =264
    
         
        function WeatherChangerOnunitTrigger(unit, event, player)
        Creature_menu(unit, player)
        end
         
        function Creature_menu(unit, player)
                unit:GossipCreateMenu(1, player, 0)
                        unit:GossipMenuAddItem(10, "Sun", 2, 0)
                        unit:GossipMenuAddItem(10, "Rain", 4, 0)
                        unit:GossipMenuAddItem(10, "Heavy rain", 5, 0)
                        unit:GossipMenuAddItem(10, "Snow", 6, 0)
    	  unit:GossipMenuAddItem(10, "Ugasi", 8, 0)
                unit:GossipSendMenu(player)
        end
         
        function WeatherChangerOnSelect(unit, event, player, id, intid, code)
        if (intid == 1) then
                unit:GossipCreateMenu(1, player, 0)
                        unit:GossipMenuAddItem(10, "Sun", 2, 0)
                        unit:GossipMenuAddItem(10, "Rain", 4, 0)
                        unit:GossipMenuAddItem(10, "Heavy rain", 5, 0)
                        unit:GossipMenuAddItem(10, "Snow", 6, 0)
    	  unit:GossipMenuAddItem(10, "Nevermind", 8, 0)
                unit:GossipSendMenu(player)
        end
         
        if(intid == 2) then
                Unit:SetZoneWeather(35,1,1)
                player:SendBroadcastMessage("Better put your sunglasses on!")
                player:GossipComplete()
        end
         
        if(intid == 4) then
                Unit:SetZoneWeather(35,2, 1)
                player:SendBroadcastMessage("It's raining, it's pouring...")
                player:GossipComplete()
        end
         
        if(intid == 5) then
                Unit:SetZoneWeather(35,4, 1)
                player:SendBroadcastMessage("Why would you start a hurricane?")
                player:GossipComplete()
        end
         
        if(intid == 6) then
                Unit:SetZoneWeather(35,8, 1)
                player:SendBroadcastMessage("Buuuur, it just started snowing!")
                player:GossipComplete()
        end
         
         if(intid == 8) then
                player:SendBroadcastMessage("Goodbye!")
                player:GossipComplete()
                end
        end
        RegisterUnitGossipEvent(NPCID, 1, "WeatherChangerOnunitTrigger")
        RegisterUnitGossipEvent(NPCID, 2, "WeatherChangerOnSelect")
    Cheers you can use this for yourself if you get it Please post answer for me
    PS: Zone i am trying to make change is Booty Bay, i trink its area id is 35. (should be, database checked)
    Last edited by stoneharry; 10-10-2011 at 10:04 AM. Reason: Added code box.

    Please help with npc script
  2. #2
    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)
    Some weathers simply do not work for some reason, the command must be wrong or another one needed.

    Rain will work with a command such as:

    player:SetPlayerWeather(4,2)

    So it's really a case of debugging it.

  3. #3
    Aferi's Avatar Private
    Reputation
    5
    Join Date
    Oct 2011
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok man i got an idea. I will test all numbers and then reply which ones work on which commands (player or zone)
    cheers

Similar Threads

  1. [C++ Script] [Mangos] [C++ Script] Please help with Channeling + Haste
    By Jaymovez in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 07-26-2010, 10:55 AM
  2. need help with npc script
    By bitty in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-16-2008, 06:21 AM
  3. Please help with Lua Script
    By Silentnvd in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 09-23-2008, 11:16 PM
  4. Please ! Help with My Warcraft Studio!
    By Loteeh in forum World of Warcraft General
    Replies: 0
    Last Post: 03-04-2007, 08:59 AM
  5. Please help with the PTR
    By KenshinHimora in forum World of Warcraft General
    Replies: 2
    Last Post: 09-16-2006, 10:14 AM
All times are GMT -5. The time now is 04:30 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