Spawning a mon once a spell is cast and/or finished [Lua] menu

User Tag List

Results 1 to 3 of 3
  1. #1
    felindalei's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spawning a mon once a spell is cast and/or finished [Lua]

    I was wondering on how to spawn a mob after a mob casts a spell, or a mob s
    pawns on the player once the spell's duration is finished, this would be a BIG help if anyone can, plz and thank you.

    Spawning a mon once a spell is cast and/or finished [Lua]
  2. #2
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in the phase where he casts the spell add
    x = pUnit:GetX()
    y = pUnit:GetY()
    z = pUnit:GetZ()
    o = pUnit:GetO()
    pUnit:SpawnCreature(npcid, x, y, z, o, faction, how long you want him out in milliseconds)

    (btw 0 is permanent)

    example
    Code:
    function Boar_Mini (pUnit, Event)
             x = pUnit:GetX();
             y = pUnit:GetY();
             z = pUnit:GetZ();
             o = pUnit:GetO();
    pUnit:SpawnCreature(800009, x-10, y-2, z, 20, 14, 0);
    pUnit:SendChatMessage(42, 0, "Agathelos Spawns a Minion!")
    end
    the sendchatmessage above as 42 is a raid warning. I added -10 so the mob appears a little bit away instead of right on him.

    if you dont have pUnit, you could use Unit instead

    Code:
    function Boar_Mini (Unit, Event)
             x = Unit:GetX();
             y = Unit:GetY();
             z = Unit:GetZ();
             o = Unit:GetO();
    Unit:SpawnCreature(800009, x-10, y-2, z, 20, 14, 0);
    Unit:SendChatMessage(42, 0, "Agathelos Spawns a Minion!")
    end
    Last edited by thebigman; 07-18-2010 at 07:32 PM.

  3. #3
    marcelo_20xx's Avatar Active Member
    Reputation
    25
    Join Date
    Sep 2008
    Posts
    165
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is better if you write:

    Code:
    Unit:SpawnCreature(800009, Unit:GetX()+2, Unit:GetY()+2, Unit:GetZ()+0.1, Unit:GetO(), Unit:GetFaction(), 0)
    Because that way you don't define global variables unnecessarily.

Similar Threads

  1. "player.spell(xxx).casted < 1" what does this mean?
    By Mackdaddy2887 in forum PE Support forum
    Replies: 9
    Last Post: 01-01-2015, 04:21 PM
  2. [PQR] Spell locked, casting in other magic school
    By G0tha in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 07-27-2013, 02:48 PM
  3. Spell interrupted, cast same school spell anyways!
    By Trufox in forum World of Warcraft Exploits
    Replies: 7
    Last Post: 01-31-2009, 07:22 AM
  4. [Lua] Make mobs channel spell then cast?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 01-18-2008, 03:24 PM
All times are GMT -5. The time now is 08:20 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