LUA Script question.. [AI_Tick?] menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    Lakotaness's Avatar Member
    Reputation
    4
    Join Date
    Oct 2006
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA Script question.. [AI_Tick?]

    So my question is what is this event do? The ID for it is 5 [AKA RegisterUnitEvent(71002, 5, "Atali_poision") ] And I'm wondering is this like an AI_Agent almost? Like it would cast a certain percent of times or something.

    My aim is to make a mob that cast an AOE posion at random times through combat, hoever AI_Agents on my server are really screwy. They always cast at spawn requardless of the event ID and keep casting untill the allowed castamount is reached but thats not what I need.

    Basic question: Is there a way to script a mob in LUA so that it would randomly cast a spell throught the fight at a set chance? Not like at health intervals.. or is that how I would have to do it?

    [Edit: More like 2 questions ]

    LUA Script question.. [AI_Tick?]
  2. #2
    Whitethebunny's Avatar Member
    Reputation
    2
    Join Date
    Apr 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did find a command in a script from the LUA++ SVN (http://mmoforge.org/svn/luaplusplus/) that would let you set a variable as a random number. Which you might be able to manipulate to cast the spell randomly, or at least a random chance to cast every _ seconds.

    (From the Gehennas 100% blizzlike script)

    local rand = math.random(#,#)

    From the looks of it:
    Change the first # to the starting number, and the second # to the finishing number.

    i.e. (1,5)

    Would be a random number from 1 to 5.

    -!- Not sure if this activates the math.random command but at the top of the script it has: math.randomseed(os.time())

  3. #3
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AI_Tick procs at a set interval. In C++ scripts you can set it yourself. I suspect that Lua scripts set the AI Tick to weapon speed.

Similar Threads

  1. [Lua] Newbie Lua scripting question (SOLVED)
    By Maybepie in forum WoW EMU Questions & Requests
    Replies: 10
    Last Post: 04-16-2010, 07:21 AM
  2. lua scripting question
    By deep6ixed in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-08-2009, 06:31 AM
  3. Lua Scripting question.
    By gregzoid2 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 07-06-2008, 02:45 PM
  4. LUA script question
    By Zordin in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-08-2008, 06:24 AM
  5. LUA Script Question
    By abndrew82 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-08-2008, 02:55 PM
All times are GMT -5. The time now is 04:22 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