Need help fixing some simple lua scripts :-) menu

Shout-Out

User Tag List

Results 1 to 8 of 8
  1. #1
    kaato's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help fixing some simple lua scripts :-)

    Hey =)

    I have made 3 lua scripts.. The problem is that i can't get them to work

    Here they are:

    1: Fixed =D

    2: Fixed =D

    3: This Script should spawn a teleporter NPC named "Chia".
    Code:
    local itemid = 100001
    function Item_Trigger(item, event, player)
    Item_menu(item, player)
    end
    
    function Item_menu(item, player)
    
    if (player:IsInCombat() == true) then
    player:SendAreaTriggerMessage("You can not spawn a Chia while in combat!")
    else  
    item:GossipCreateMenu(5555, player, 0) 
    item:GossipMenuAddItem(8, "Please spawn a Chia for me", 600, 0)  
    item:GossipSendMenu(player)
    end
    end
    
    function OnSelect(item, event, player, id, intid, code, misc)
    if (intid == 110) then
    local x =player:GetX ()
    local y =player:GetY ()
    local z =player:GetZ ()
    local o =player:GetO ()
    player:SpawnCreature (35001, x, y, z, o, 35, 70000)
    player:GossipComplete()
    end
    end
    
    RegisterItemGossipEvent(100001,1,"Item_Trigger")
    RegisterItemGossipEvent(100001,2,"OnSelect")
    I have tried fixing them self, but with no luck

    +Rep+Rep+Rep for help <3<3
    Last edited by kaato; 04-10-2009 at 02:53 PM.
    https://nordicwow.servegame.com/ +Rep

    Need help fixing some simple lua scripts :-)
  2. #2
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We need to know "how" they aren't working... Like is it an error on the startup or is an error when you try to use the npc, or does the script just not start. You need to actually tell us an error

  3. #3
    kaato's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    :O I thought "pro's" could see whats wrong in the script ^^
    but well, the 3rd script loads, i got the item- then nothing.

    the 2nd: he will not spawn a menu, just instandly makes me a topper mcnabb :P

    1st: it spawns a menu- but is not clickable :P
    https://nordicwow.servegame.com/ +Rep

  4. #4
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well we could generally But you never know for sure. Um. Make sure the item has the proper flags. Also when you try to use the item does it give an error in the console?

  5. #5
    kaato's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The item is fine..

    I cannot even load the script, because " X.lua:29 '<eof>' expected near 'end' "
    https://nordicwow.servegame.com/ +Rep

  6. #6
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats what I was looking for I don't see any error there though.. Hmm... It looks right.
    Last edited by Dr. Livingstone; 04-10-2009 at 05:50 PM.

  7. #7
    Linkn's Avatar Contributor
    Reputation
    90
    Join Date
    Mar 2009
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On line 29, error near end is what thats basically saying. I know it seems nooby but check for capitalization and spacing etc. Grammar mistakes are often the smallest but have some big impacts.

  8. #8
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya. Try this
    Code:
    local itemid = 100001
    function Item_Trigger(item, event, player)
    Item_menu(item, player)
    end
    
    function Item_menu(item, player)
    
    if (player:IsInCombat() == true) then
    player:SendAreaTriggerMessage("You can not spawn a Chia while in combat!")
    else  
    item:GossipCreateMenu(5555, player, 0) 
    item:GossipMenuAddItem(8, "Please spawn a Chia for me", 600, 0)  
    item:GossipSendMenu(player)
    end
    end
    
    function OnSelect(item, event, player, id, intid, code, misc)
    if (intid == 110) then
    local x =player:GetX ()
    local y =player:GetY ()
    local z =player:GetZ ()
    local o =player:GetO ()
    player:SpawnCreature (35001, x, y, z, o, 35, 70000)
    player:GossipComplete()
    end
    end
    
    RegisterItemGossipEvent(100001, 1, "Item_Trigger")
    RegisterItemGossipEvent(100001, 2, "OnSelect")

Similar Threads

  1. Need Help on a simple 58sec script
    By Knighttan in forum Diablo 3 Bots and Programs
    Replies: 5
    Last Post: 08-06-2012, 02:12 PM
  2. [Lua Script] [HELP] I need help for a boss lua script
    By simoxx in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 05-24-2012, 07:23 PM
  3. Simple LUA Script Help
    By Wolfly in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-02-2008, 04:22 PM
  4. need help fixing some private server problems please.
    By ninjinmugen in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-08-2008, 06:07 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 06:57 AM. 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