[Lua] Profession stone menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Summer's Avatar Active Member
    Reputation
    16
    Join Date
    Sep 2007
    Posts
    308
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Profession stone

    Im trying to make profession stone's for every profession a stone that takes the players profession skill from 1 to 300 when u click it but cant get it to work

    this is what i got

    Code:
    function Item_Trigger(item, event, player)
        Item_menu(item, player)
    end
    
    function Item_menu(item, player)
     
        if (player:IsInCombat() == true) then
        player:SendAreaTriggerMessage("You are in combat!") 
        else                          
        item:GossipCreateMenu(3543, player, 0)
        item:GossipMenuAddItem(4, "Enchanting Stone", 1, 0)
        item:GossipSendMenu(player)
    end
    
    
    function gearonselect(item, event, player, id, intid, code)
     
        if (intid == 1) then
        player:AdvanceSkill(333, 299);
        player:GossipComplete()
    end
    
    end
    end
    
    RegisterItemGossipEvent(90900,1,"Item_Trigger")
    RegisterItemGossipEvent(90900,2,"gearonselect")
    but it dosent work plz help me
    Last edited by Ground Zero; 03-10-2010 at 11:36 AM. Reason: Code tags

    [Lua] Profession stone
  2. #2
    The-Eradicator's Avatar Contributor

    Reputation
    149
    Join Date
    May 2007
    Posts
    829
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the sticky.
    The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed.
    Albert Einstein

  3. #3
    Kiev's Avatar Contributor
    Reputation
    288
    Join Date
    Nov 2007
    Posts
    1,819
    Thanks G/R
    0/4
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing when posting something like this, post a picture of the error, or else were just looking at code and wasting time.




  4. #4
    Aellya's Avatar Sergeant
    Reputation
    21
    Join Date
    Mar 2010
    Posts
    56
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have too many 'end' just before your first RegisterItemGossipEvent() that might be causing the script file to finish before it registers?

    I don't know much about lua scripts (only lua addons) so i might be wrong.

    :edit:

    Looks like you have the right number of 'end's but the function gearonselect() is inside the Item_menu() function, was this intentional?

  5. #5
    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)
    Fixed. I don't know why you had a useless function at the top.
    You registered your function to the wrong name.


    Code:
    function Item_menu(item, player)
        if (player:IsInCombat() == true) then
            player:SendAreaTriggerMessage("You are in combat!")
        else
        item:GossipCreateMenu(3543, player, 0)
        item:GossipMenuAddItem(4, "Enchanting Stone", 1, 0)
        item:GossipSendMenu(player)
        end
    end
    
    
    function gearonselect(item, event, player, id, intid, code)
    
        if (intid == 1) then
            player:AdvanceSkill(333, 299)
            player:GossipComplete()
        end
    end
    RegisterItemGossipEvent(90900, 1, "Item_menu")
    RegisterItemGossipEvent(90900, 2, "gearonselect")

Similar Threads

  1. [Lua] Infinity Stone
    By Ground Zero in forum WoW EMU General Releases
    Replies: 18
    Last Post: 12-27-2009, 11:39 AM
  2. LUA Wishing Stone?
    By EmuX in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 11-08-2009, 10:59 PM
  3. LUA Professions Trainer
    By rampage in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 04-14-2009, 06:48 AM
  4. [LUA] Revive Stone
    By marco1234 in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 04-05-2009, 12:41 PM
  5. [LUA] Teleport Stone Issue
    By marco1234 in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 03-29-2009, 07:05 AM
All times are GMT -5. The time now is 09:26 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