[LUA Help] Enter Stealth on Spawn menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LUA Help] Enter Stealth on Spawn

    I am almost finished scripting all of UBRS for the launch of our PreBC realm tomorrow. One thing I am stuck on is making Blackhand Assassin's go into stealth when they spawn. I'm open to all suggestions on how to do this.

    +Rep for a solution that works.

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

    [LUA Help] Enter Stealth on Spawn
  2. #2
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, this is how u do it

    Function NPCName_OnSpawn(Unit)
    Unit:CastSpell(Stealth Spell)
    end


    and then when you register

    RegisterUnitEvent(EntryId, 6, "NPCNAME_OnSpawn")

    and bam done if you have any more questions ask away

    DA Gift From Mr. Blain

  3. #3
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh ok 6 = onspawn I was using 5.

    Also one more.. how can I make a rookery egg which is a game object spawn a whelp if bumped into?

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

  4. #4
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would need to code it in C++, as there is no way to get a player's distance using LUA.
    Life Puzzler WoW - Website | Forums

  5. #5
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes Gastric is there now a way... But I think it is coming up in the newest Patch.... Let me see if I can find the Function

    DA Gift From Mr. Blain

  6. #6
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the stealth didn't work.. I tried both

    Code:
    function BlackhandAssassin_OnSpawn(Unit)
    Unit:CastSpell(32615)
    end
    
    RegisterUnitEvent(10318, 6, "BlackhandAssassin_OnSpawn")
    and

    Code:
    function BlackhandAssassin_OnSpawn(pUnit)
    pUnit:CastSpell(32615)
    end
    
    RegisterUnitEvent(10318, 6, "BlackhandAssassin_OnSpawn")

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

  7. #7
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wel.... Let me see the whole script, there might be another problem... or is that the only script?...and also get rid of caps in the name... it can mess it up

    DA Gift From Mr. Blain

  8. #8
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OO U might need to update your LUA stuff.... Though

    Also this is my script that i tested and works, Fine
    function Felrogue_Strike(pUnit)
    pUnit:FullCastSpellOnTarget(30013, pUnit:GetMainTank())
    end

    function Felrogue_Hemo(pUnit)
    pUnit:FullCastSpellOnTarget(45897, pUnit:GetMainTank())
    end

    function Felrogue_OnCombat(Unit)
    Unit:RegisterEvent("Felrogue_Strike", 10000, 2)
    Unit:RegisterEvent("Felrogue_Hemo", 8000, 0)
    end

    function Felrogue_OnDeath(Unit)
    Unit:RemoveEvents()
    end

    function Felrogue_OnSpawn(Unit)
    Unit:CastSpell(32199)
    end

    RegisterUnitEvent(40004, 1, "Felrogue_OnCombat")
    RegisterUnitEvent(40004, 4, "Felrogue_OnDeath")
    RegisterUnitEvent(40004, 6, "Felrogue_OnSpawn")
    Hope this helps

    DA Gift From Mr. Blain

  9. #9
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found some of the functions, for the egg thing,
    U might be able to use
    :GetPlayerCountInRadius()
    :GetDistance()
    :IsMoving

    There is more, but maybe you can make some thing with those.. Tryz.
    Looking for the others

    DA Gift From Mr. Blain

  10. #10
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried your script.. only thing i changed was the mob entry id.. still not working

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

  11. #11
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hm.. then your LUA engine or what it is called is updated I think... It works fine on everyother server I have tried.. Did you put the NPC in the DB???, also U have to restart the server each time you change a script.

    DA Gift From Mr. Blain

  12. #12
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I added

    function Felrogue_OnCombat(Unit)
    Unit:SendChatMessage(12,0,"Fools! Our cause is righteous!")

    to assure it is loading.. He now says the chat message when I pull.. but still out of stealth. Even tried a fresh respawn. So the script is loading for sure.

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

  13. #13
    Juicyz's Avatar Active Member
    Reputation
    34
    Join Date
    Dec 2006
    Posts
    298
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hm..., I think your engine is different than mine...... some servers dont like GetMainTank() soo it might be bugging it.... But it should stealth., try instead of CastSpell, try FullCastSpell(id)

    DA Gift From Mr. Blain

  14. #14
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I now have

    function Felrogue_OnSpawn(Unit)
    Unit:FullCastSpell(32199)
    end

    Still no dice

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

  15. #15
    Stabatha's Avatar Contributor
    Reputation
    84
    Join Date
    Dec 2007
    Posts
    345
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok it works on my 19 twink server, which is running a older version of moonscripts. I recompiled using the LUAScripting from that and it works now.. +Rep for all the help


    Update:
    Now on my gate going to Beast after you kill Rend now errors about the gameobject having a nil value. This worked before the recompile.

    Code:
    function Renddoor_OnDied(pUnit)
        local Renddoor = pUnit:GetGameObjectNearestCoords(108.472649,-420.327850,110.922310,170556)
        pUnit:RemoveEvents()
        Renddoor:ActivateGameObject()
    end
    
    
    RegisterUnitEvent(10429,4,"Renddoor_OnDied")

    GoblinCity.net -
    Home of the only Cataclysm Twink Server
    Instant Level 49 * Custom Gear * Scripted Raids * Tons More
    We are the oldest private twink server community - Open since 2007

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] Need LUA help? Post here!
    By EcHoEs in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 10-03-2010, 01:18 PM
  2. [LUA HELP] Boss spawning npc when he dies
    By Moaradin in forum WoW EMU Questions & Requests
    Replies: 12
    Last Post: 04-19-2009, 11:03 AM
  3. Lua help
    By reconz in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-18-2008, 07:03 PM
  4. Lua help
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-04-2008, 12:17 PM
  5. Help,spawnpoints don't spawn anymore
    By Raijin in forum World of Warcraft General
    Replies: 2
    Last Post: 11-14-2006, 04:01 PM
All times are GMT -5. The time now is 12:56 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