Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 2 of 2
  1. #1
    Scout

    Join Date
    Oct 2009
    Posts
    12
    Post Thanks / Like
    Rep Power
    16
    Reputation
    7

    Multifunctional NPC, change the weather and your gender with one button!


    Register to remove this ad
    Code:
    --[[
           Multi functional NPC script.
           By Wolferine. Do not remove these credits, or claim this to be yours.
           
           WARNING:THIS SCRIPT REQUIRES LUAHYPARC!
    ]]
    
    local NPC_ID = 11111
    
    
    function MultiGossipOnTalk(pUnit, Event, player)
           pUnit::GossipCreateMenu(100, player, 0)
           pUnit:GossipMenuAddItem(0, "Change Gender.", 1, 0)
           pUnit:GossipMenuAddItem(0, "Reset Talents.", 2, 0)
           pUnit:GossipMenuAddItem(0, "I would like to see my bank.", 3, 0)
           PUnit:GossipMenuAddItem(0, "Remove Ressurection sickness.", 4, 0)
           pUnit:GossipMenuAdditem(0, "Set weather: Sunny.", 5, 0)
           pUnit:GossipMenuAddItem(0, "Set weather: Fog.", 6, 0)
           pUnit:GossipMenuAddItem(0, "Set weather: Rain.", 7, 0)
           pUnit:GossipMenuAddItem(0, "Set weather: Heavy rain.", 8, 0)
           pUnit:GossipMenuAddItem(0, "Set weather: Snow.", 9, 0)
           pUnit:GossipMenuAddItem(0, "Set weather: Sand Storm.", 10, 0)
           pUnit:GossipMenuAddItem(0, "Never mind.", 11, 0)
           pUnit:GossipSendMenu(player)
    end
    
    function MultiGossipOnSelect(pUnit, Event, player, id, intid, code, pMisc)
    	if (intid == 1) then
    		if (player:GetGender() == 0) then
    			player:SetGender(1)
    			player:SendBroadcastMessage("Gender set to Female, please relog to take effect.")
    			Unit:GossipComplete
    else
    		if (player:GetGender() == 1) then
    			player:SetGender(0)
    			player:SendBroadcastMessage("Gender set to Male, please relog to take effect.")
    			Unit:GossipComplete
    		end
    	end
    end		
    
            if (intid == 2) then
                    player:ResetTalents()
                    player:SendBroadCastMessage("Talents reset")
                    pUnit:GossipComplete()
             end
    
            if (intid == 3) then
                    player:SendBankWindow(unit)
                    pUnit:GossipComplete()
             end
    
    if (intid == 4) then
    		if (player:HasAura(15007) == true) then
    			player:SendBroadcastMessage("Resurrection Sickness has been removed.")
    			player:RemoveAura(15007)
    			Unit:GossipComplete()
    		else
    			player:SendBroadcastMessage("You do not have Resurrection Sickness!")
    			Unit:GossipComplete()
    		end
    	end
    
    if (intid == 5) then
                    player:SetPlayerWeather(0, 1)
                    pUnit:GossipComplete()
            end
    
    if (intid == 6) then
                    player:SetPlayerWeather(1, 1)
                    pUnit:GossipComplete()
            end
    
    if (intid == 7) then
                    player:SetPlayerWeather(2, 1)
                    pUnit:GossipComplete()
            end
    
    if (intid == 8) then
                    player:SetPlayerWeather(4, 1)
                    pUnit:GossipComplete()
            end
    
    if (intid == 9) then
                    player:SetPlayerWeather(8, 1) 
                    pUnit:GossipComplete()
           end
    
    if (intid == 10) then
                    player:SetPlayerWeather(16, 1)             
                    pUnit:GossipComplete()
           end
    
    if (GetLuaEngine() ~= "LuaHypArc") then --we gotta make sure they're using LuaHypArc!
    	print("LuaEngine: Did not load 'Multifunctional - NPC' script - LuaHypArc not installed.")
    	print("LuaEngine: Please visit http://luahyparc.zapto.org/ for more information.")
    	end
    end
    
    RegisterUnitGossipEvent(NPC_ID, 1, "MultiGossipOnTalk")
    RegisterUnitGossipEvent(NPC_ID, 2, "MultiGossipOnSelect")
    What does it do?



    - It changes your gender
    - It changes your personal weather
    - Resets your talents
    - Removes ress sickness
    - It shows your bank
    I hope you like it.


    › See More: Multifunctional NPC, change the weather and your gender with one button!
    Last edited by Wolferine; 31-10-09 at 10:12 AM.



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Contributor
    enegue's Avatar
    Join Date
    Aug 2008
    Location
    Before God
    Posts
    715
    Post Thanks / Like
    Rep Power
    18
    Reputation
    106

    Register to remove this ad
    Sweet.. Never saw an NPC who changes gender and weather before. Nice work!
    me if I have helped you in anyway ^^ Example: Sharing a repack, answering questions... Well you know the rest xD. As long as I help you!

 

 

Visitors found this page by searching for:

gender change button

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 09:36 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org