Script Question menu

User Tag List

Results 1 to 1 of 1
  1. #1
    Xmaily's Avatar Master Sergeant
    Reputation
    14
    Join Date
    May 2013
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Script Question

    I Was looking through Ownedcore today and I found this awesome custom BG script created by stoneharry! In the script he has a temorary function that allows players to join the Queue from typing #joinbg

    This is whats in the script....

    function OnChat_Hook_ToJoinBG(event, plr, message, pType, pLanguage, pMisc)
    local message = string.lower(message)
    if message == "#joinbg" then
    JoinQue(plr)
    elseif message == "#finbg" then
    ResetBG()
    end
    if message == "test" then
    if math.random(1,2) == 1 then
    local pack = LuaPacket:CreatePacket(SMSG_UPDATE_WORLD_STATE,
    pack:WriteULong(2314) -- ID
    HordeLives = HordeLives - 1
    pack:WriteULong(HordeLives) -- Amount, Horde
    plr:SendPacketToPlayer(pack)
    else
    local pack = LuaPacket:CreatePacket(SMSG_UPDATE_WORLD_STATE,
    pack:WriteULong(2313) -- ID
    AllianceLives = AllianceLives - 1
    pack:WriteULong(AllianceLives) -- Amount, Alliance
    plr:SendPacketToPlayer(pack)
    end
    end
    end


    I want to make It so you can queue up for the bg using a npc. I created this part below but it doesn't work I get a error that says player is nill value.

    function BG_OnGossip(Unit, Event, Player)
    Unit:GossipCreateMenu(100, Player, 0)
    Unit:GossipMenuAddItem(0, "Click Here To leave the battle.", 1, 0)
    Unit:GossipSendMenu(Player)
    end

    function BG_OnSelect(Unit, Event, Player, MenuId, id, Code)
    if (id == 1) then
    JoinQue(plr)
    player:GossipComplete(player)
    end
    end

    Script Question

Similar Threads

  1. LUA script question
    By Zordin in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-08-2008, 06:24 AM
  2. LUA Script Question
    By abndrew82 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-08-2008, 02:55 PM
  3. Whats the money script question
    By Duplicity in forum World of Warcraft General
    Replies: 3
    Last Post: 09-30-2007, 07:30 PM
  4. Mac Scripting Question
    By Renek in forum World of Warcraft General
    Replies: 0
    Last Post: 06-27-2007, 02:53 PM
  5. quick mac script question
    By lars1414 in forum World of Warcraft General
    Replies: 0
    Last Post: 12-28-2006, 02:37 PM
All times are GMT -5. The time now is 08:12 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