Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 6 of 6
  1. #1
    Senior Sergeant
    Milation's Avatar
    Join Date
    Aug 2008
    Posts
    109
    Post Thanks / Like
    Rep Power
    17
    Reputation
    73

    Is My LUA Boss script right?


    Register to remove this ad
    Written By Havokk
    function Super Boss_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "Haha you fools")
    Unit:RegisterEvent("Super Boss_Haha", 2000, 0)
    Unit:RegisterEvent("Super Boss_Haha", 2000, 0)
    Unit:RegisterEvent("Super Boss_Super Boss",1000,0)
    Unit:RegisterEvent("Super Boss_Super Boss",1000,0)
    Unit:RegisterEvent("Super Boss_Super Boss",1000,0)
    function Super Boss_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    function Super Boss_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    function Super Boss_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    function Super Boss_OnKilledTarget(Unit, Event)
    end
    RegisterUnitEvent(50000, 1, "Super Boss_OnCombat")
    RegisterUnitEvent(50000, 2, "Super Boss_OnLeaveCombat")
    RegisterUnitEvent(50000, 3, "Super Boss_OnKilledTarget")
    RegisterUnitEvent(50000, 4, "Super Boss_OnDied")



    › See More: Is My LUA Boss script right?

  2. #2
    Sergeant

    Join Date
    Jul 2008
    Location
    In Earth
    Posts
    84
    Post Thanks / Like
    Rep Power
    17
    Reputation
    11
    Dont think so... WigSplitta can confirm this

  3. #3
    Scout

    Join Date
    Sep 2008
    Posts
    10
    Post Thanks / Like
    Rep Power
    17
    Reputation
    8
    Quote Originally Posted by havokk View Post
    Written By Havokk
    function Super Boss_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "Haha you fools")
    Unit:RegisterEvent("Super Boss_Haha", 2000, 0)
    Unit:RegisterEvent("Super Boss_Haha", 2000, 0)
    Unit:RegisterEvent("Super Boss_Super Boss",1000,0)
    Unit:RegisterEvent("Super Boss_Super Boss",1000,0)
    Unit:RegisterEvent("Super Boss_Super Boss",1000,0)
    function Super Boss_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    function Super Boss_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end
    function Super Boss_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    function Super Boss_OnKilledTarget(Unit, Event)
    end
    RegisterUnitEvent(50000, 1, "Super Boss_OnCombat")
    RegisterUnitEvent(50000, 2, "Super Boss_OnLeaveCombat")
    RegisterUnitEvent(50000, 3, "Super Boss_OnKilledTarget")
    RegisterUnitEvent(50000, 4, "Super Boss_OnDied")
    The reason why its wrong is because you have events registered, but you dont have the events themselves. Plus, you only need to register an even once, not three times.

  4. #4
    Contributor
    StickyIcky's Avatar
    Join Date
    Jul 2008
    Location
    127.0.0.1
    Posts
    747
    Post Thanks / Like
    Rep Power
    19
    Reputation
    188
    Uhm Ghost...I only know C++...i dont **** around with LUA lol

  5. #5
    Sergeant
    Knaur's Avatar
    Join Date
    Aug 2008
    Location
    No Way (Norway)
    Posts
    70
    Post Thanks / Like
    Rep Power
    19
    Reputation
    171
    also you should rename all Super Boss to SuperBoss or something
    cause lua dont like spaces mostly.

    and you should maybe upgrade your lua code a bit

    to pUnit instead of Unit, some cores read pUnit better than Unit of some reason

    try this one:


    Written By Havokk
    function SuperBoss_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Haha you fools")
    pUnit:RegisterEvent("SuperBoss_Haha", 2000, 0)
    pUnit:RegisterEvent("Super Boss_SuperBoss",1000,0)
    end

    function SuperBoss_Haha(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Haha Hihi Hoho")
    end

    function SuperBoss_SuperBoss(pUnit, Event)
    pUnit:SendChatMessage(12, 0, "Im Da Almigthy Super Boss")
    end

    function SuperBoss_OnLeaveCombat(pUnit, Event)
    pUnit:RemoveEvents()
    end

    function SuperBoss_OnDied(pUnit, Event)
    pUnit:RemoveEvents()
    end

    function SuperBoss_OnKilledTarget(pUnit, Event)
    pUnit:RemoveEvents()
    end

    RegisterUnitEvent(50000, 1, "SuperBoss_OnCombat")
    RegisterUnitEvent(50000, 2, "SuperBoss_OnLeaveCombat")
    RegisterUnitEvent(50000, 3, "SuperBoss_OnKilledTarget")
    RegisterUnitEvent(50000, 4, "SuperBoss_OnDied")

    ofcourse he will not do any spells and so on with your script,
    only talk. since you didnt add any spells or spell commands here
    also every event must have a unique name
    Last edited by Knaur; 03-09-08 at 11:08 AM.
    Knaur - Founder of Norwegian Elite Team & Creator of Norwegian Elite Databases

  6. #6
    Contributor
    Boxxy's Avatar
    Join Date
    Aug 2008
    Location
    Florida
    Posts
    351
    Post Thanks / Like
    Rep Power
    18
    Reputation
    136

    Register to remove this ad
    Luas experts here and yes thats wrong XD /\/\

    your mother



  7. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 08:58 PM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org