Lua script doesnt work (trying to script Kurinnaxx) menu

User Tag List

Results 1 to 7 of 7
  1. #1
    zlo's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2006
    Posts
    92
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lua script doesnt work (trying to script Kurinnaxx)

    Im having a bit problem with the LUA script i did today wonder if anyone can help
    Code:
    function Kurinnaxx_SandTrap(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(25656, pUnit:GetRandomPlayer(0)) 
    end
    
    
    
    :function _OnCombat(Unit, Event) 
    :Unit:SendChatMessage(12, 0, "Blaarrgh i smell fresh meat!")
    end
    
    function _OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Bluuurgh you've lost!") 
    end
    
    function _OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Glaarrbhh") 
    end
    
    RegisterUnitEvent(15348,1,"Kurinnaxx")
    i know its very very short but its my first try so^^ anyone know whats the problem is...? I get a error that says :
    Tried to call invalid LUA function "kurinnaxx" From ArcEmu <unit>!
    He doesnt cast the spell that i made him do and he doesnt say anything


    Lua script doesnt work (trying to script Kurinnaxx)
  2. #2
    Shao111's Avatar Active Member
    Reputation
    33
    Join Date
    Jul 2007
    Posts
    281
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Been a while since Ive done any LUA, but, give this a shot:

    Code:
    function Kurinnaxx_SandTrap(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(25656, pUnit:GetRandomPlayer(0)) 
    end
    
    
    
    function _OnCombat(pUnit, Event) 
    pUnit:SendChatMessage(12, 0, "Blaarrgh i smell fresh meat!")
    end
    
    function _OnLeaveCombat(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Bluuurgh you've lost!") 
    end
    
    function _OnDied(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Glaarrbhh") 
    end
    
    RegisterUnitEvent(15348,1,"Kurinnaxx")

  3. #3
    damon160's Avatar Member
    Reputation
    8
    Join Date
    Oct 2007
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Top post read

    ------ deleted it -------------

    beated me to it XD
    Last edited by damon160; 08-13-2008 at 10:51 PM.

  4. #4
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
     function Kurinnaxx_OnCombat(Unit, Event) 
    pUnit:SendChatMessage(12, 0, "Blaarrgh i smell fresh meat!")
    pUnit:RegisterEvent("Kurinnaxx_SandTrap", TIME, 0)
    end
    
    function Kurinnaxx_SandTrap(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(25656, pUnit:GetRandomPlayer(0)) 
    end
    
    function _OnLeaveCombat(Unit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Bluuurgh you've lost!") 
    end
    
    function _OnDied(Unit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Glaarrbhh") 
    end
    
    RegisterUnitEvent(15348, 1, "Kurinnaxx_OnCombat")
    RegisterUnitEvent(15348, 2, "Kurinnaxx_OnLeaveCombat")
    RegisterUnitEvent(15348, 4, "Kurinnaxx_OnDied")
    There we go, I fixed it for you,
    You forgot to register his Sand Trap and aswell Leave Combat and OnDied.
    Edit the red into desired time, e.x. If you put in 10000, he will do sand trap every 10 seconds.

    Hope this helped ; )

    ~~ Babbaa
    Last edited by Babbaa; 08-14-2008 at 05:20 AM.

  5. #5
    EcHoEs's Avatar lol why u mad
    Reputation
    374
    Join Date
    Sep 2006
    Posts
    1,647
    Thanks G/R
    3/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Babbaa View Post
    Code:
     function Kurinnaxx_OnCombat(pUnit, Event) 
    pUnit:SendChatMessage(12, 0, "Blaarrgh i smell fresh meat!")
    pUnit:RegisterEvent("Kurinnaxx_SandTrap", TIME, 0)
    end
    
    function Kurinnaxx_SandTrap(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(25656, pUnit:GetRandomPlayer(0)) 
    end
    
    function _OnLeaveCombat(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Bluuurgh you've lost!") 
    end
    
    function _OnDied(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Glaarrbhh") 
    end
    
    RegisterUnitEvent(15348, 1, "Kurinnaxx_OnCombat")
    RegisterUnitEvent(15348, 2, "Kurinnaxx_OnLeaveCombat")
    RegisterUnitEvent(15348, 4, "Kurinnaxx_OnDied")
    There we go, I fixed it for you,
    You forgot to register his Sand Trap and aswell Leave Combat and OnDied.
    Edit the red into desired time, e.x. If you put in 10000, he will do sand trap every 10 seconds.

    Hope this helped ; )

    ~~ Babbaa
    Code:
     function Kurinnaxx_OnCombat(pUnit, Event) 
    pUnit:SendChatMessage(12, 0, "Blaarrgh i smell fresh meat!")
    pUnit:RegisterEvent("Kurinnaxx_SandTrap", TIME, 0)
    end
    
    function Kurinnaxx_SandTrap(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(25656, pUnit:GetRandomPlayer(0)) 
    end
    
    function _OnLeaveCombat(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Bluuurgh you've lost!") 
    end
    
    function _OnDied(pUnit, Event) 
    pUnit:RemoveEvents() 
    pUnit:SendChatMessage(12, 0, "Glaarrbhh") 
    end
    
    RegisterUnitEvent(15348, 1, "Kurinnaxx_OnCombat")
    RegisterUnitEvent(15348, 2, "Kurinnaxx_OnLeaveCombat")
    RegisterUnitEvent(15348, 4, "Kurinnaxx_OnDied")

    If you use Unit , you can't use pUnit at commands


  6. #6
    zlo's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2006
    Posts
    92
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still doesnt work but i get another error, the onlything that works is onCombat he says Blaargh i smell fresh meat
    The errors i get is Tried to call an invalid lua function "kurinnaxx_onleavecombat" from arcemu <unit>
    Tried to call an invalid lua function "kurinnaxx_onDied" from arcemu <unit>
    And he cant cast the spell for some reason, it automaticly changed the value (the time it casts) to 0 again cause it says theres something wrong
    Last edited by zlo; 08-14-2008 at 10:45 AM.


  7. #7
    zlo's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2006
    Posts
    92
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone? :S


Similar Threads

  1. [Lua Script] (Solved) Lua suicide doesnt work.. would like some help.
    By DaynNight in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 02-03-2012, 03:40 PM
  2. Will this teleporter npc lua script work?
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 05-22-2008, 11:50 AM
  3. Lua GetHealthPct doesnt work?
    By thijsd in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 05-18-2008, 01:39 PM
  4. [Help] Lua Script Not Working
    By Muruk in forum World of Warcraft Emulator Servers
    Replies: 26
    Last Post: 03-16-2008, 02:13 PM
  5. Simple Lua Script , not working need help!
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 12-30-2007, 02:06 PM
All times are GMT -5. The time now is 02:25 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