Whats wrong with my LUA script? menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    controlsx2's Avatar Member
    Reputation
    16
    Join Date
    Jun 2007
    Posts
    223
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whats wrong with my LUA script?

    I adapted the script from another one so that it just teleported to mall, i then tried to add remove res sickness to it. I lost the old script so made this one from scratch. Its not working though anyone know why?

    Code:
    function Item_Trigger(item, event, player)
        Item_menu(item, player)
    end
    
    function Item_menu(item, player)
    item:GossipCreateMenu(5555, player, 0)
    item:GossipMenuAddItem(6, "Teleport to Mall", 600, 0)
    item:GossipMenuAddItem(6, "Remove Res Sickness", 601, 0)
    item:GossipSendMenu(player)
    end
    
    
    function OnSelect(item, event, player, id, intid, code, misc)
    if (intid == 600) then
    player:Teleport(1, 4642.753418, -3801.198, 942.023804)
    player:GossipComplete()
    end
    
    if (intid == 601) then
    if(player:HasAura(15007) == true) then
    player:RemoveAura(15007)
    player:GossipComplete()
    end
    end
    end
    
    RegisterItemGossipEvent(92341,1,"Item_Trigger")
    RegisterItemGossipEvent(92341,2,"OnSelect")
    Last edited by controlsx2; 03-02-2009 at 02:19 PM.

    Whats wrong with my LUA script?
  2. #2
    1ns0mnia's Avatar Active Member
    Reputation
    67
    Join Date
    Nov 2007
    Posts
    428
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when it loads on your world.exe, when it goes onto laoding the LUA's it will show an error.... tell us the error, form this we can determine the line fo the error and fix it for you

  3. #3
    controlsx2's Avatar Member
    Reputation
    16
    Join Date
    Jun 2007
    Posts
    223
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no error, it loads successfully
    Last edited by controlsx2; 03-01-2009 at 11:45 AM.

  4. #4
    ZestyJ's Avatar Contributor
    Reputation
    86
    Join Date
    Mar 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What part is not working or will it just not show up on the npc?
    -Zesty
    Formerly Known as Wickedshadow/KingMitch

  5. #5
    controlsx2's Avatar Member
    Reputation
    16
    Join Date
    Jun 2007
    Posts
    223
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by KingMitch View Post
    What part is not working or will it just not show up on the npc?
    when you use the item nothing happens

  6. #6
    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)
    I havn't even looked at the script but just because no errors I can almost gurantee you that it's the item not the script. If you give me a couple of minutes i'll whip up a sql for you.

    Edit:


    Code:
    insert into `items` (`entry`, `class`, `subclass`, `field4`, `name1`, `name2`, `name3`, `name4`, `displayid`, `quality`, `flags`, `buyprice`, `sellprice`, `inventorytype`, `allowableclass`, `allowablerace`, `itemlevel`, `requiredlevel`, `RequiredSkill`, `RequiredSkillRank`, `RequiredSkillSubRank`, `RequiredPlayerRank1`, `RequiredPlayerRank2`, `RequiredFaction`, `RequiredFactionStanding`, `Unique`, `maxcount`, `ContainerSlots`, `itemstatscount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScaledStatsDistributionId`, `ScaledStatsDistributionFlags`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `dmg_min3`, `dmg_max3`, `dmg_type3`, `dmg_min4`, `dmg_max4`, `dmg_type4`, `dmg_min5`, `dmg_max5`, `dmg_type5`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `range`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `page_id`, `page_language`, `page_material`, `quest_id`, `lock_id`, `lock_material`, `sheathID`, `randomprop`, `unk203_1`, `block`, `itemset`, `MaxDurability`, `ZoneNameID`, `mapid`, `bagfamily`, `TotemCategory`, `socket_color_1`, `unk201_3`, `socket_color_2`, `unk201_5`, `socket_color_3`, `unk201_7`, `socket_bonus`, `GemProperties`, `ReqDisenchantSkill`, `unk2`, `existingduration`, `ItemLimitCategoryId`) values('44819','15','0','-1','Teleporter Stone','','','','35133','1','0','0','0','0','-1','-1','100','0','0','0','0','0','0','0','0','1','1','0','10','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1500','0','0','46642','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','Right click while targeting yourself on this to use the Magical Powers within.','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','-1','0','0','0');

    Change the script to id 44819 once executed, restart the server and add your self it.
    If you get a error executing do
    Code:
    delete from `items` where `entry` = '44819'
    Then execute again.
    Last edited by stoneharry; 03-01-2009 at 01:44 PM.

  7. #7
    controlsx2's Avatar Member
    Reputation
    16
    Join Date
    Jun 2007
    Posts
    223
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope same issue, right click does nothing. It worked with the old script doesnt seem to work with the res sickness though

  8. #8
    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)
    ok; well my second guess would be to change Lua engines. Looked at the script but can not see any obvious errors, if your using the default aspire one of sun++ it wont work last time I checked. Use LuaAppArc (on arcemu website) or gastrc's engine (in releases section) then if it still doesn't work say

  9. #9
    controlsx2's Avatar Member
    Reputation
    16
    Join Date
    Jun 2007
    Posts
    223
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How exactly do i change it?

Similar Threads

  1. Whats wrong with this LUA Script?
    By controlsx2 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 06-16-2009, 01:01 AM
  2. whats wrong with this LUA?
    By Envoke in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 02-22-2009, 10:06 AM
  3. [helpzerz] What is wrong with this lua script?
    By w21froster in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-21-2008, 09:45 PM
  4. Whats wrong with this LUA Script?
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-20-2008, 03:03 PM
All times are GMT -5. The time now is 03:05 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