[Request or Help] Simple LUA Item menu

User Tag List

Results 1 to 10 of 10
  1. #1
    freeride474's Avatar Contributor
    Reputation
    127
    Join Date
    Aug 2006
    Posts
    278
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request or Help] Simple LUA Item

    Hello guys, I am trying to create a Summoning Horn for a custom quest, all I want is and script that upon using item, npcid 67699 is spawned to (map: 169, X: -218, Y: 2885, Z: 95.6, orientation: 95.5055) and after 45 seconds if npcid 67699 has not already been killed it despawns.
    The spell used with item for gossip script is (33208, Gossip NPC Periodic - Talk)

    The Script which I have attempted at and using is:

    Code:
    function emeralddrakehorn(item, event, player)
    	if player:IsInCombat() == false then
    		item:GossipCreateMenu(34832, player, 0)
    		item:GossipMenuAddItem(5, "Blow this horn if you wish to challenge the Emerald Drake for ownership as a mount!", 1, 0)
    		item:GossipSendMenu(player)
    else
    		player:SendAreaTriggerMessage("You are currently in Combat!")
    	end
    end
    
    function emeralddrakehorn(item, event, player, id, intid, code)
    	if(intid == 1) then
    		item:GossipCreateMenu(3433, player, 0)
    		item:GossipMenuAddItem(5, "Blow Horn", 200, 0)
    		item:GossipSendMenu(player)
    	end
    
    	if(intid == 200) then
    	player:SpawnCreature(67699, -218, 2885, 95.6, 95.5055, 14, 45000)
    	player:GossipComplete()
    	end
    end
    
    RegisterItemGossipEvent(80077, 1, "emeralddrakehorn")
    RegisterItemGossipEvent(80077, 2, "emeralddrakehorn")

    The Problems with my script are, I am creating multiple "summoning horns" I just need one working script i can edit to make more of. But with this script I would create a copy using different ids for item and creature however all of the "summoning horns" would spawn the same creature.
    also
    The menus for the item do not work, when using horn it would instantly spawn npc without the gossip menus, however this is unimportant to me I don't need there to be any gossip menus.

    If anyone can help me out your help would be greatly appreciated - +Repx4,
    Thanks ~freeride474~
    Last edited by freeride474; 04-10-2010 at 02:56 PM.
    Join My Guild (Gilneas, Horde US) - <Blue Thunder>
    Website Traffic Appreciated - Help*Me*Get*Benefits

    yEE~

    [Request or Help] Simple LUA Item
  2. #2
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1192
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to the correct section.
    If you need me you have my skype, if you don't have my skype then you don't need me.

  3. #3
    freeride474's Avatar Contributor
    Reputation
    127
    Join Date
    Aug 2006
    Posts
    278
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My mistake, thank you for moving.
    Join My Guild (Gilneas, Horde US) - <Blue Thunder>
    Website Traffic Appreciated - Help*Me*Get*Benefits

    yEE~

  4. #4
    P1raten's Avatar Banned
    Reputation
    500
    Join Date
    Mar 2008
    Posts
    1,323
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can't really find any errors. Try recompiling core so that you have a fully working Lua engine since i believe thats where the issue is.

  5. #5
    freeride474's Avatar Contributor
    Reputation
    127
    Join Date
    Aug 2006
    Posts
    278
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alright ill try that, thanks P1raten
    Join My Guild (Gilneas, Horde US) - <Blue Thunder>
    Website Traffic Appreciated - Help*Me*Get*Benefits

    yEE~

  6. #6
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you add a "Nevermind" option the gossip menu will appear, not just spawn the mob directly.



    Code:
    function emeralddrakehorn(item, event, player)
        if player:IsInCombat() == false then
            item:GossipCreateMenu(34832, player, 0)
            item:GossipMenuAddItem(5, "Blow this horn if you wish to challenge the Emerald Drake for ownership as a mount!", 1, 0)
            item:GossipMenuAddItem(5, "Nevermind", 2, 0)
            item:GossipSendMenu(player)
    else
            player:SendAreaTriggerMessage("You are currently in Combat!")
        end
    end
    
    function emeralddrakehorn(item, event, player, id, intid, code)
        if(intid == 1) then
            item:GossipCreateMenu(3433, player, 0)
            item:GossipMenuAddItem(5, "Blow Horn", 200, 0)
            item:GossipMenuAddItem(5, "Nevermind", 2, 0)
            item:GossipSendMenu(player)
        end
    
        if (intid == 2) then
            player:GossipComplete()
    
        if(intid == 200) then
        player:SpawnCreature(67699, -218, 2885, 95.6, 95.5055, 14, 45000)
        player:GossipComplete()
        end
    end
    
    RegisterItemGossipEvent(80077, 1, "emeralddrakehorn")
    RegisterItemGossipEvent(80077, 2, "emeralddrakehorn")


    like so, or something.



    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  7. #7
    P1raten's Avatar Banned
    Reputation
    500
    Join Date
    Mar 2008
    Posts
    1,323
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Reflection View Post
    If you add a "Nevermind" option the gossip menu will appear, not just spawn the mob directly.



    Code:
    function emeralddrakehorn(item, event, player)
        if player:IsInCombat() == false then
            item:GossipCreateMenu(34832, player, 0)
            item:GossipMenuAddItem(5, "Blow this horn if you wish to challenge the Emerald Drake for ownership as a mount!", 1, 0)
            item:GossipMenuAddItem(5, "Nevermind", 2, 0)
            item:GossipSendMenu(player)
    else
            player:SendAreaTriggerMessage("You are currently in Combat!")
        end
    end
    
    function emeralddrakehorn(item, event, player, id, intid, code)
        if(intid == 1) then
            item:GossipCreateMenu(3433, player, 0)
            item:GossipMenuAddItem(5, "Blow Horn", 200, 0)
            item:GossipMenuAddItem(5, "Nevermind", 2, 0)
            item:GossipSendMenu(player)
        end
    
        if (intid == 2) then
            player:GossipComplete()
    
        if(intid == 200) then
        player:SpawnCreature(67699, -218, 2885, 95.6, 95.5055, 14, 45000)
        player:GossipComplete()
        end
    end
    
    RegisterItemGossipEvent(80077, 1, "emeralddrakehorn")
    RegisterItemGossipEvent(80077, 2, "emeralddrakehorn")


    like so, or something.


    Doesnt matter if you have the Nevermind option or not.

  8. #8
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by P1raten View Post

    Doesnt matter if you have the Nevermind option or not.

    Did for me. At least with an unit. Kinda logical though, with only one option a menu would be unnecessary.

    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  9. #9
    P1raten's Avatar Banned
    Reputation
    500
    Join Date
    Mar 2008
    Posts
    1,323
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Reflection View Post

    Did for me. At least with an unit. Kinda logical though, with only one option a menu would be unnecessary.

    You might be right now that i think about it.

  10. #10
    freeride474's Avatar Contributor
    Reputation
    127
    Join Date
    Aug 2006
    Posts
    278
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you guys, i have tried recompiling and using script with no success. I will try out Reflections solution and post with results soon.

    UPDATE: I tried your solution with no success Reflections, how ever the creature did not spawn neither did any menus work =/?
    Last edited by freeride474; 04-11-2010 at 10:32 AM.
    Join My Guild (Gilneas, Horde US) - <Blue Thunder>
    Website Traffic Appreciated - Help*Me*Get*Benefits

    yEE~

Similar Threads

  1. Simple LUA Script Help
    By Wolfly in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-02-2008, 04:22 PM
  2. [Request] Need help! I get Strange things in LUA -_-
    By sheepking in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 05-11-2008, 06:15 PM
  3. [Request] I need some help with lua script (boss on death)
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-03-2008, 03:47 PM
  4. [Request] I need this simple lua
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 02-29-2008, 03:18 PM
  5. Simple Lua Script , not working need help!
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 12-30-2007, 02:06 PM
All times are GMT -5. The time now is 04:21 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