[LUA/SQL] What could I be doing wrong with ALL of my scripts? menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    davidknag's Avatar Active Member
    Reputation
    49
    Join Date
    Nov 2009
    Posts
    201
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA/SQL] What could I be doing wrong with ALL of my scripts?

    here is 1 of the scripts thats "bugged" on my server

    Code:
    function Leveler_OnTalk(pUnit, event, player)
    LevelerMenu(pUnit, player)
    end
    
    local npcid = 7
    
    function LevelerMenu(pUnit, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(4, "Level 255, Please!", 100, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Leveler_OnSelect(pUnit, event, player, id, intid, code, pMisc)
    
    if(intid == 100) then
    pUnit:SendChatMessage(12, 0, "You have been granted level 255. Thanks for playing on GM-WoW!")
    player:SetPlayerLevel(255)
    player:Teleport(1, 16200,16207, 1)
    end

    and the SQL for the teleporter
    Code:
    insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `killcredit1`, `killcredit2`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `leader`) 
    values ('7', "GM-WoW Starter Kit", "www.GM-WoW.com", '', '0', '10', '0', '0', '0', '0', '27475', '0', '0', '0', '1', '1', '0');
    
    insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`, `summonguard`) 
    values ('7', '255', '1', '35', '1337', '1337', '1337', '1', '1', '500', '0', '190', '99999', '0', '0', '0', '0', '60000', '111111', '99999999', '99999999', '99999999', '99999999', '99999999', '99999999', '0', '0', "0", '0', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0', '0');

    what could be wrong?

    [LUA/SQL] What could I be doing wrong with ALL of my scripts?
  2. #2
    mag1212's Avatar Active Member
    Reputation
    55
    Join Date
    Aug 2009
    Posts
    352
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uhhm
    Code:
    function Leveler_OnTalk(pUnit, event, player)
    LevelerMenu(pUnit, player)
    end
    
    local npcid = 7
    
    function LevelerMenu(pUnit, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(4, "Level 255, Please!", 100, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Leveler_OnSelect(pUnit, event, player, id, intid, code, pMisc)
    
    if(intid == 100) then
    pUnit:SendChatMessage(12, 0, "You have been granted level 255. Thanks for playing on GM-WoW!")
    player:SetPlayerLevel(255)
    player:Teleport(1, 16200,16207, 1)
    end
    thats the error u didnt tell that function what to do

  3. #3
    davidknag's Avatar Active Member
    Reputation
    49
    Join Date
    Nov 2009
    Posts
    201
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mag1212 View Post
    uhhm
    Code:
    function Leveler_OnTalk(pUnit, event, player)
    LevelerMenu(pUnit, player)
    end
    
    local npcid = 7
    
    function LevelerMenu(pUnit, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(4, "Level 255, Please!", 100, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Leveler_OnSelect(pUnit, event, player, id, intid, code, pMisc)
    
    if(intid == 100) then
    pUnit:SendChatMessage(12, 0, "You have been granted level 255. Thanks for playing on GM-WoW!")
    player:SetPlayerLevel(255)
    player:Teleport(1, 16200,16207, 1)
    end
    thats the error u didnt tell that function what to do
    rofl still just says "hello, playername"

  4. #4
    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)
    ... Did you even try and correct it? Or just Copy and paste what he wrote? He didnt cahnge anything.




  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)
    You forgot to register your functions at the bottom.

    RegisterUnitGossipEvent(NPCID, 1, "
    Leveler_OnTalk") and
    RegisterUnitGossipEvent(NPCID, 2 "Levelermenu")

  6. #6
    davidknag's Avatar Active Member
    Reputation
    49
    Join Date
    Nov 2009
    Posts
    201
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh and 1 more thing

    for items u gotta add a spell to do lua

    thats what was wrong with items :P

Similar Threads

  1. What am i doing wrong this time?
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 01-01-2008, 10:49 AM
  2. What am I doing wrong WoW.exe does not appear on WPE.
    By Eliteplague in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 10-30-2007, 04:21 AM
  3. [Question] errr what am i doing wrong?
    By Demonshade in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 10-10-2007, 04:22 AM
  4. DynDNS help. What am I doing wrong?
    By xxtennisdudexx in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 09-23-2007, 05:23 PM
  5. what am i doing wrong...
    By tiliqua in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 09-16-2007, 01:18 AM
All times are GMT -5. The time now is 09:42 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