[FIX] This Lua. Script plzzzZ? menu

User Tag List

Results 1 to 7 of 7
  1. #1
    cello1993's Avatar Member
    Reputation
    4
    Join Date
    Sep 2006
    Posts
    121
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [FIX] This Lua. Script plzzzZ?

    Code:
    function Ro_OnCombat(pUnit, event)
    Unit:SendChatMessage(14, 0, "Wanna play with cold You will get frozen")
    end
    RegisterUnitEvent(99008, 1, "Ro_OnCombat")
    function Ro_CastFrostbolt(pUnit, event)
    Unit:FullCastSpellOnTarget(61594, pUnit:GetRandomPlayer(0))
    Unit:SendChatMessage(14, 0, "Frost vaess! Wux geou lapiet malrak ias Ro uikulph arcaniss!")
    end
    RegisterUnitEvent(99008, 1, "Ro_CastFrostbolt")
    function Ro_OnCombat(pUnit, event)
    Unit:RegisterEvent("Ro_CastFrostbolt", 180000, 1)
    end
    function Ro_SummonGulSpeak1(pUnit, event) 
    if Unit:GetHealthPct() <= 75 then
    Unit:SendChatMessage(14, 0, "De wer veditoa part di wer malrunwa, sI symmn thes Gul!")
    end
    end
    RegisterUnitEvent(99008, 1, "Ro_SummonGulSpeak1")
    function Ro_SummonGul1(pUnit, event) 
    if Unit:GetHealthPct() <= 75 then
    Unit:SpawnCreature(99009, -6.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -6.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.93875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.73875, 156.701659, 40.384003)
    end
    end
    RegisterUnitEvent(99008, 1, "Ro_SummonGul1")
    function Ro_SummonGulSpeak2(pUnit, Event)
    if Unit:GetHealthPct() <= 50 then
    Unit:SendChatMessage(14, 0, "De wer veditoa part di wer malrunwa, sI symmn thes Gul!")
    end
    end
    RegisterUnitEvent(99008, 1, "Ro_SummonGulSpeak2")
    function Ro_SummonGul2(pUnit, Event)
    if Unit:GetHealthPct() <= 50 then
    Unit:SpawnCreature(99009, -6.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -6.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.93875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.73875, 156.701659, 40.384003)
    end
    end
    RegisterUnitEvent(99008, 1, "Ro_SummonGul2")
    function Ro_SummonGulSpeak3(pUnit, Event)
    if Unit:GetHealthPct() <= 25 then
    Unit:SendChatMessage(14, 0, "De wer veditoa part di wer malrunwa, sI symmn thes Gul!")
    end
    end
    RegisterUnitEvent(99008, 1, "Ro_SummonGulSpeak3") 
    function Ro_SummonGul3(pUnit, Event)
    if Unit:GetHealthPct() <= 25 then
    Unit:SpawnCreature(99009, -6.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -6.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.93875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.73875, 156.701659, 40.384003)
    end
    end
    RegisterUnitEvent(99008, 1, "Ro_SummonGul3")
    Whats wrong??? I was having a "unable to load" arcemu.world error, then I chnged it this way and loads fine but ..... THE DAMN NPC doesn't do anything!!! I'm getting crazy!

    Please somebody have mercy and tell me what's wrong >.<

    [FIX] This Lua. Script plzzzZ?
  2. #2
    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)
    Why are you registering every function for the oncombat hook? Ie:
    RegisterUnitEvent(99008, 1, "Ro_OnCombat")
    RegisterUnitEvent(99008, 1, "Ro_CastFrostbolt")
    RegisterUnitEvent(99008, 1, "Ro_SummonGulSpeak1")
    RegisterUnitEvent(99008, 1, "Ro_SummonGul3")
    etc
    etc
    etc
    Life Puzzler WoW - Website | Forums

  3. #3
    Mircast's Avatar Member
    Reputation
    14
    Join Date
    Sep 2008
    Posts
    139
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Gastricpenguin View Post
    Why are you registering every function for the oncombat hook? Ie:
    RegisterUnitEvent(99008, 1, "Ro_OnCombat")
    RegisterUnitEvent(99008, 1, "Ro_CastFrostbolt")
    RegisterUnitEvent(99008, 1, "Ro_SummonGulSpeak1")
    RegisterUnitEvent(99008, 1, "Ro_SummonGul3")
    etc
    etc
    etc
    I'm guessing he hasn't learned lua completely.

  4. #4
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you are registering all of the phases in no mans land basically.

    you need to register the events inside the end statements.


  5. #5
    cello1993's Avatar Member
    Reputation
    4
    Join Date
    Sep 2006
    Posts
    121
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    humm .... yea I'm new to lua. scripting sorry .... I didn't understand well what you guys said =S could you maybe post an exemple of how it should looks like? Thanks!

  6. #6
    Linkn's Avatar Contributor
    Reputation
    90
    Join Date
    Mar 2009
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    function Ro_OnCombat(Unit, Event)
    Unit:SendChatMessage(14, 0, "Wanna play with cold, You will get frozen")
    Unit:RegisterEvent("Ro_CastFrostbolt", 9000, 0)
    end

    function Ro_CastFrostbolt(Unit, Event)
    Unit:FullCastSpellOnTarget(61594, Unit:GetRandomPlayer(0))
    Unit:SendChatMessage(14, 0, "Frost vaess! Wux geou lapiet malrak ias Ro uikulph arcaniss!")
    Unit:RegisterEvent("Ro_SummonGul1", 1000, 0)
    end

    function Ro_SummonGul1(Unit, event)
    if Unit:GetHealthPct() <= 75 then
    Unit:SendChatMessage(14, 0, "De wer veditoa part di wer malrunwa, sI symmn thes Gul!")
    Unit:SpawnCreature(99009, -6.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -6.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.93875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.73875, 156.701659, 40.384003)
    Unit:RegisterEvent("Ro_SummonGul2", 1000, 0)
    end
    end

    function Ro_SummonGul2(Unit, Event)
    if Unit:GetHealthPct() <= 50 then
    Unit:SendChatMessage(14, 0, "De wer veditoa part di wer malrunwa, sI symmn thes Gul!")
    Unit:SpawnCreature(99009, -6.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -6.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.93875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.73875, 156.701659, 40.384003)
    Unit:RegisterEvent("Ro_SummonGul3", 1000, 0)
    end
    end

    function Ro_SummonGul3(Unit, Event)
    if Unit:GetHealthPct() <= 25 then
    Unit:SendChatMessage(14, 0, "De wer veditoa part di wer malrunwa, sI symmn thes Gul!")
    Unit:SpawnCreature(99009, -6.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -6.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -7.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.53875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -8.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -9.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.63875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -10.93875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -11.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.03875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.33875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.73875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -12.83875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.13875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.43875, 156.701659, 40.384003)
    Unit:SpawnCreature(99009, -13.73875, 156.701659, 40.384003)
    end
    end

    function Ro_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end

    function Ro_OnKilledTarget(Unit, Event)
    end

    function Ro_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end

    RegisterUnitEvent(99008, 1, "Ro_OnCombat")
    RegisterUnitEvent(99008, 2, "Ro_OnLeaveCombat")
    RegisterUnitEvent(99008, 3, "Ro_OnKilledTarget")
    RegisterUnitEvent(99008, 4, "Ro_OnDied")

  7. #7
    cello1993's Avatar Member
    Reputation
    4
    Join Date
    Sep 2006
    Posts
    121
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    YeA i managed to make it work ^^ I'm using "local x: Get Unit x" (or somethin like that you know?) ... sounds easier and quite better, but the problem is that all NPCs spawns at the smae point >.< and to make them not to occupe the same spot, I'm looking after on how to enable COLLISION .... I made another thread about it, If you got any information plzz help me there =/

    Thanks you all ^^"

Similar Threads

  1. Fix my LUA script.
    By [Stefon] in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 06-30-2008, 04:09 PM
  2. [helpzerz] What is wrong with this lua script?
    By w21froster in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-21-2008, 09:45 PM
  3. Whats wrong with this LUA Script?
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-20-2008, 03:03 PM
  4. Help with this LUA script
    By jordash in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 03-08-2008, 04:19 PM
  5. How to fix this LUA Script???
    By marcosgue in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-08-2008, 07:51 AM
All times are GMT -5. The time now is 06:19 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search