Help me with this script. menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  1. #1
    Alteir's Avatar Member
    Reputation
    2
    Join Date
    Jan 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help me with this script.

    I'm trying to get this Slot Machine script working. And when i try to spawn the NPC, it says Invalid ID, but i can look it up and it shows up.

    Code:
    x = math.random(1, 11)
    
    function Gambler_OnGossipTalk(unit, event, player)
    unit:GossipCreateMenu(50, player, 0)
    unit:GossipMenuAddItem(1, "Insert Coin", x, 0)
    unit:GossipSendMenu(player)
    end
    
    
    function Gambler_OnGossipSelect
    if(intid == 1) then
    player:RemoveItem(500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    
    
    if(intid == 2) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    
    if(intid == 3) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    if(intid == 4) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    if(intid == 5) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    if(intid == 6) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    if(intid == 7) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    if(intid == 8) then
    player:RemoveItem (500000, 1)
    pUnit:SendChatMessage(11, 0, "You lose!")
    player:GossipComplete()
    end
    
    if(intid == 9) then
    player:RemoveItem (500000, 1)
    player:Additem (500001, 1)
    pUnit:SendChatMessage(11, 0, "You get a ticket!")
    player:GossipComplete()
    end
    
    if(intid == 10) then
    player:RemoveItem (500000, 1)
    player:Additem (1337, 1)
    pUnit:SendChatMessage(11, 0, "You win a weapon!")
    player:GossipComplete()
    end
    
    if(intid == 11) then
    player:RemoveItem (500000, 1)
    player:Additem (1053, 1)
    pUnit:SendChatMessage(11, 0, "You win a cool ass bag!")
    player:GossipComplete()
    end
    
    RegisterUnitGossipEvent(50005, 1, "Gambler_OnGossipTalk")
    RegisterUnitGossipEvent(50005, 2, "Gambler_OnGossipSelect")

    MYSQL
    Code:
    INSERT INTO `creature_names` VALUES ('50005', 'Slots Machine', 'Lol beans', '', '0', '0', '0', '3', '0', null, '21019', '0', '0', '0', '1', '1', '0', null);
    INSERT INTO `creature_proto` VALUES ('50005', '70', '70', '35', '100000', '100000', '100', '1', '1', '1500', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '36000', '6807', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '2.5', '8', '14', '0', '0', '0', '0', '0', '0', '0');
    I have no idea what's working.

    Help me with this script.
  2. #2
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check that:
    1. You executed it into the right database.
    2. There was no errors when executing.
    3. If you wrote the SQL, check it over OR just manually enter it into the DB using Navicat or SQLyog.
    4. Make sure you are trying to spawn the right NPC
    Try:
    1. Spawning it in different locations.
    2. Changing the ID all together, in the lua script and the SQL file.
    3. Restart your computer and the server.
    4. Delete your Cache folder.

    I live in a shoe

  3. #3
    Alteir's Avatar Member
    Reputation
    2
    Join Date
    Jan 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Checked all of that. Still isn't working.

  4. #4
    Alteir's Avatar Member
    Reputation
    2
    Join Date
    Jan 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any help? I have no idea.

Similar Threads

  1. [Help] i need Lua help with this script...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 25
    Last Post: 03-03-2008, 03:45 PM
  2. [Need help] What's wrong with this script?
    By Arthas117 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-10-2008, 02:04 PM
  3. I'd be forever greatful if someone were able to help me with this...
    By Sundabar in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 01-07-2008, 07:35 PM
  4. Help me With this please
    By mafkees in forum WoW ME Questions and Requests
    Replies: 5
    Last Post: 09-12-2007, 09:07 AM
  5. Please help me with this noob prob
    By Oreoshakes in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 09-06-2007, 07:11 PM
All times are GMT -5. The time now is 04:50 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