Pwntzyou's LUA Library menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pwntzyou's LUA Library

    This is a small library if scripts that I made while helping people throughout the forums, i created this for easy access to others with similar problems.

    I am also taking requests, pm me your request and if it is do able, it will be posted here.

    Auto Announce System
    http://www.mmowned.com/forums/emulat...announcer.html

    Lua Random chest / GO spawns
    LUA Timer
    LUA NPC Conversation



    LUA Random chest / GO spawns
    http://www.mmowned.com/forums/emulat...tml#post786059

    Code:
    chestnum = 0
    spawnduriation =
    gameobject id =

    function chestevent_spawn(pUnit, event)
    chestnum = chestnum + 1

    if chestnum == 0 then
    pUnit:SpawnGameObject(gameobjectid, x, y, z, o, spawnduriation)
    pUnit:RegisterEvent("chestevent_spawn", spawnduriation)
    end

    if chestnum == 1 then
    pUnit:SpawnGameObject(gameobjectid, x, y, z, o, spawnduriation)
    pUnit:RegisterEvent("chestevent_spawn", spawnduriation)
    end

    if chestnum == 2 then
    pUnit:SpawnGameObject(gameobjectid, x, y, z, o, spawnduriation)
    pUnit:RegisterEvent("chestevent_spawn", spawnduriation)
    end

    if chestnum == 3 then
    pUnit:SpawnGameObject(gameobjectid, x, y, z, o, spawnduriation)
    pUnit:RegisterEvent("chestevent_spawn", spawnduriation)
    chestnum = 0
    end
    end

    RegisterUnitEvent(mobid, 6, "chestevent_spawn")
    You would just have to edit the top where it says

    "spawnduriation" (its in ms so 1000 = 1 sec)
    "gameobjectid" (the id of your game object)
    X (FOR EACH OF THE IF STATMENTS!!)
    Y (FOR EACH OF THE IF STATMENTS!!)
    Z (FOR EACH OF THE IF STATMENTS!!)
    O (FOR EACH OF THE IF STATMENTS!!)
    **and you would need to change the RegisterUnitEvent()
    inside that event you need to change mobid to the id of the dummy mob that will trigger this event on spawn

    Just make the xyzo different for each gameobject spawn....
    but there are a few things you must remember

    Code:
    At the end of the script make sure you put an extra END!
    At the end of your last spawn you MUST PUT "STAGE =0" or it WILL NOT repeat the script.

    if chestnum == 3 then
    pUnit:SpawnGameObject(gameobjectid, x, y, z, o, spawnduriation)
    pUnit:RegisterEvent("chestevent_spawn", spawnduriation)
    chestnum = 0
    end
    end
    So in summary you could keep calling

    Code:
    if chestnum == # then
    pUnit:SpawnGameObject(gameobjectid, x, y, z, o, spawnduriation)
    pUnit:RegisterEvent("chestevent_spawn", spawnduriation)
    end
    Just change the # to a number, but it has to be consectutive... like...
    if your going to put the number 50 in there, the if statment before it has to be 49
    LUA Timer
    http://www.mmowned.com/forums/emulator-server-discussion/120156-lua-wait-command-script.html



    Code:
    timer = 0

    function sleep_lua(pUnit, event)

    timer = timer + 1

    if timer >= numberinseconds then
    pUnit:RegisterEvent("eventname", 1000, 1)

    else
    pUnit:RegisterEvent("sleep_lua",1000,1)
    end
    end

    A complete working script of this ==

    Code:
    timer = 0

    function sleep_lua(pUnit, event)

    timer = timer + 1
    print timer

    if timer >= 5 then
    pUnit:RegisterEvent("testmob_lua", 1000, 1)

    else
    pUnit:RegisterEvent("sleep_lua",1000,1)
    end
    end

    function testmob_lua(pUnit, event, win)
    pUnit:SendChatMessage(12, 0, "SLEEP COMMAND LULZ")
    end

    RegisterUnitEvent(939, 1, "sleep_lua")
    LUA Npc Conversation
    http://www.mmowned.com/forums/emulat...versation.html
    istalking = false

    Function talking(pUnit, event)

    If istalking == false then
    istalking = true
    pUnit:Commandtomaketheunittalk
    Sleep(timeinms)
    pUnit:Commandtomaketheunittalk
    Sleep(timeinms)
    pUnit:Commandtomaketheunittalk
    istalking = false
    end
    end


    RegisterUnitEvent(registerstuff)

    <3 MysterioussouL for the sig

    Pwntzyou's LUA Library
  2. #2
    The MMO Rolo's Avatar Member
    Reputation
    11
    Join Date
    Sep 2007
    Posts
    227
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice man +rep
    https://Future-wow.org

  3. #3
    kate1's Avatar Member
    Reputation
    147
    Join Date
    Aug 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is this a collection of things you have made??? anywya +Rep to ya for let peoples give requests...


    Graphic designer for crossfire-entertainment! And thx to Brightchild for my great sig

  4. #4
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice to see a Fresh LUA'er.
    Cheese Cake?

  5. #5
    Pwntzyou's Avatar Contributor
    Reputation
    264
    Join Date
    Dec 2007
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kate1 View Post
    is this a collection of things you have made??? anywya +Rep to ya for let peoples give requests...
    Yep, every time i see a "HELP MAH LUA THREAD" you can expect a post in it from me if the answer has not been stated already^^

    <3 MysterioussouL for the sig

Similar Threads

  1. A Library of Lua Commands
    By trinityunit in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 02-20-2010, 08:40 PM
  2. [LUA] Function Library
    By Ground Zero in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 11-09-2009, 05:14 PM
  3. ArcEmu Lua Library
    By TheZaronz in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-29-2009, 09:02 AM
  4. TUU's Guide to Scarlet Library READ DISCLAIMER
    By Örpheus in forum World of Warcraft Guides
    Replies: 2
    Last Post: 08-10-2006, 08:02 AM
  5. Get to DM library without key
    By keniz in forum World of Warcraft Exploits
    Replies: 2
    Last Post: 07-27-2006, 12:02 PM
All times are GMT -5. The time now is 05:41 PM. 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