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 7 of 7

Thread: Need Help

  1. #1
    Beginner
    Rigamaru's Avatar
    Join Date
    Aug 2009
    Location
    N/A
    Posts
    40
    Post Thanks / Like
    Rep Power
    15
    Reputation
    3

    Smile Need Help


    Register to remove this ad
    Ok so I have this script that I got I changed the entry ID with an Npc that I made but nothing happened Its Lua scripts and I'm ripping my brains out because nothink happens to the NPC when I scripts it please help.




    › See More: Need Help



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

  3. #2
    Banned

    Join Date
    Sep 2009
    Posts
    90
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Post the script please.

    Questions:
    Did the script before you changed the entry id on the npc?

  4. #3
    Contributor
    LiLLeCarl's Avatar
    Join Date
    Jan 2009
    Posts
    106
    Post Thanks / Like
    Rep Power
    17
    Reputation
    84
    use C++ instead of lua for better control of what your doing

  5. #4
    Banned

    Join Date
    Sep 2009
    Posts
    90
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Quote Originally Posted by LiLLeCarl View Post
    use C++ instead of lua for better control of what your doing
    LUA is more simple, and not everybody wants to learn C++.

  6. #5
    Beginner
    Rigamaru's Avatar
    Join Date
    Aug 2009
    Location
    N/A
    Posts
    40
    Post Thanks / Like
    Rep Power
    15
    Reputation
    3
    HTML Code:
    local SpawnID =120000
    
    local NPCNAME =Illidanius
    
    local SPAWNNAME =Illidan's Brother
    
    local NPCID =120000
    
    
    
    
    -- Start function --
    
    
    
    function NPCNAME_OnEnterCombat(pUnit,Event)
    pUnit:SetModel(22917)
    pUnit:/PlaySoundToSet(22917)
    pUnit:SetScale(2)
    pUnit:SetCombatCapable(1)
    pUnit:SetFaction(35)
    pUnit:SendChatMessage(14, 0, "How Dare you?")
    pUnit:RegisterEvent("NPCNAME_TalkStart1", 5000, 0)
    end
    
    
    -- Phase one --
    
    function NPCNAME_SpellpUnitShear,Event)
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    
    end
    
    
    function NPCNAME_SpellFlameCrash(pUnit,Event)
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    
    end
    
    
    function NPCNAME_Phaseone(pUnit,Event)
    Choice=math.random(1, 2, 3, 4)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40904,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    
    end
    end
    if nit:GetHealthPct() <= 80 then
    Unit:RegisterEvent("NPCNAME_Phasetwo", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phaseone", 1000, 0)
    end
    
    --Phase two--
    
    
    function NPCNAME_Phasetwo(pUnit,Event)
    Choice=math.random(1, 2, 3)
    if Choice==1 then
    pUnit:CastSpellOnTarget(40018,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40598,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(40585,pUnit:GetRandomPlaye r(0))
    end
    pUnit:SendChatMessage(14, 0, "You are just little pigs, Let me fight Knaur and il show you!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart2", 5000, 0)
    end
    if nit:GetHealthPct() <= 70 then
    Unit:RegisterEvent("NPCNAME_Phasethree", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasetwo", 1000, 0
    end
    
    --Phase 3--
    
    function NPCNAME_SpellpUnitShear,Event)
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    
    end
    
    
    function NPCNAME_SpellFlameCrash(pUnit,Event)
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    
    end
    
    
    function NPCNAME_Phasethree(pUnit,Event)
    Choice=math.random(1, 2, 3, 4, 5)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40904,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    end
    if Choice==5 then
    pUnit:CastSpellOnTarget(40932,pUnit:GetRandomPlaye r(0))
    end
    pUnit:SendChatMessage(14, 0, "Mohahahha, You dont have a chance against me!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart3", 5000, 0)
    end
    end
    if nit:GetHealthPct() <= 50 then
    Unit:RegisterEvent("NPCNAME_Phasefour", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasethree", 1000, 0)
    end
    
    --Phase 4--
    
    
    function NPCNAME_SpellR(pUnit,Event)
    Choice=math.random(1, 2, 3, 4)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41078,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(41126,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(41142,pUnit:GetRandomPlaye r(0))
    end
    pUnit:SendChatMessage(14, 0, "Gaaah, That hurt!! Now boy, you signed your own death!!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart4", 5000, 0)
    end
    end
    if nit:GetHealthPct() <= 25 then
    Unit:RegisterEvent("NPCNAME_Phasefive", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasefour", 1000, 0)
    end
    
    --Phase 5--
    
    function NPCNAME_SpellpUnitShear,Event)
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    end
    
    
    function NPCNAME_SpellFlameCrash(pUnit,Event)
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    end
    
    
    
    function NPCNAME_SpellR(pUnit,Event)
    Choice=math.random(1, 2, 3, 4, 5, 6, 7)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetMainTank(0) )
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40904,pUnit:GetMainTank(0) )
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41032,pUnit:GetMainTank(0) )
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(40832,pUnit:GetMainTank(0) )
    end
    if Choice==5 then
    pUnit:CastSpellOnTarget(40932,pUnit:GetRandomPlaye r(0))
    end
    if Choice==6 then
    pUnit:CastSpellOnTarget(40647,pUnit:GetRandomPlaye r(0))
    pUnit:SendChatMessage(14, 0, "Forgive me Brother I will Fall!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart5", 5000, 0)
    end
    if Choice==7 then
    pUnit:CastSpellOnTarget(40683,pUnit:GetRandomPlaye r(0))
    if nit:GetHealthPct() <= o then
    Unit:RegisterEvent("NPCNAME_death", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasefive", 1000, 0
    
    end
    -- Extra --
    
    
    
    function NPCNAME_Death(pUnit)
    pUnit:SetScale(2)
    pUnit:/PlaySoundToSet(22917)
    pUnit:RemoveEvents()
    
    
    function NPCNAME_OnLeaveCombat(pUnit, event)
    pUnit:RemoveEvents()
    pUnit:SetModel(22917)
    pUnit:SetScale(2)
    end
    
    
    function NPCNAME_OnKilledTarget(pUnit)
    pUnit:/PlaySoundToSet(22917)
    end
    
    
    
    
    
    -- Start functions --
    
    
    RegisterUnitEvent(NPCID, 1, "NPCNAME_OnEnterCombat")
    RegisterUnitEvent(NPCID, 2, "NPCNAME_OnLeaveCombat")
    RegisterUnitEvent(NPCID, 3, "NPCNAME_OnKilledTarget")
    RegisterUnitEvent(NPCID, 4, "NPCNAME_Death")
    Thats the script, and no it didnt come with the id i had to change it.
    Last edited by Rigamaru; 21-09-09 at 05:46 PM.

  7. #6
    Contributor
    Lbniese's Avatar
    Join Date
    Aug 2009
    Location
    C# Developer
    Posts
    381
    Post Thanks / Like
    Rep Power
    16
    Reputation
    91
    Hmmm i updated it and fixed it MAYBE please try it... delete you npc from the db and then put the lua in and then extract the npc :P

    Code:
     
    #local SpawnID =120000#
    #
    #local NPCNAME =Illidanius#
    #
    #local SPAWNNAME =Illidan's Brother#
    #
    #local NPCID =120000#
     
     
     
    function Illidanius_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Fools!, you cant kill me...")
    pUnit:RegisterEvent("Phase_1", 1000, 0)
    end
    function Illidanius_OnDied(pUnit, Event)
    pUnit:RemoveEvents()
    end
    function Illidanius_LeaveCombat (pUnit, Event)
    pUnit:RemoveEvents()
    end
     
     
    function Illidanius_OnEnterCombat(pUnit,Event)
    pUnit:SetModel(22917)
    pUnit:/PlaySoundToSet(22917)
    pUnit:SetScale(2)
    pUnit:SetCombatCapable(1)
    pUnit:SetFaction(35)
    pUnit:SendChatMessage(14, 0, "How Dare you?")
    pUnit:RegisterEvent("NPCNAME_TalkStart1", 5000, 0)
    end
     
     
    -- Phase one --
     
    function Illidanius_SpellpUnitShear,Event)
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
     
    end
     
     
    function Illidanius_SpellFlameCrash(pUnit,Event)
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
     
    end
     
     
    function Illidanius_Phaseone(pUnit,Event)
    Choice=math.random(1, 2, 3, 4)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40904,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
     
    end
    end
    if nit:GetHealthPct() <= 80 then
    Unit:RegisterEvent("NPCNAME_Phasetwo", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phaseone", 1000, 0)
    end
     
    --Phase two--
     
     
    function Illidanius_Phasetwo(pUnit,Event)
    Choice=math.random(1, 2, 3)
    if Choice==1 then
    pUnit:CastSpellOnTarget(40018,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40598,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(40585,pUnit:GetRandomPlaye r(0))
    end
    pUnit:SendChatMessage(14, 0, "You are just little pigs, Let me fight Knaur and il show you!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart2", 5000, 0)
    end
    if nit:GetHealthPct() <= 70 then
    Unit:RegisterEvent("NPCNAME_Phasethree", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasetwo", 1000, 0
    end
     
    --Phase 3--
     
    function Illidanius_SpellpUnitShear,Event)
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
     
    end
     
     
    function Illidanius_SpellFlameCrash(pUnit,Event)
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
     
    end
     
     
    function Illidanius_Phasethree(pUnit,Event)
    Choice=math.random(1, 2, 3, 4, 5)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40904,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    end
    if Choice==5 then
    pUnit:CastSpellOnTarget(40932,pUnit:GetRandomPlaye r(0))
    end
    pUnit:SendChatMessage(14, 0, "Mohahahha, You dont have a chance against me!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart3", 5000, 0)
    end
    end
    if nit:GetHealthPct() <= 50 then
    Unit:RegisterEvent("NPCNAME_Phasefour", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasethree", 1000, 0)
    end
     
    --Phase 4--
     
     
    function Illidanius_SpellR(pUnit,Event)
    Choice=math.random(1, 2, 3, 4)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41078,pUnit:GetRandomPlaye r(0))
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(41126,pUnit:GetRandomPlaye r(0))
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetRandomPlaye r(0))
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(41142,pUnit:GetRandomPlaye r(0))
    end
    pUnit:SendChatMessage(14, 0, "Gaaah, That hurt!! Now boy, you signed your own death!!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart4", 5000, 0)
    end
    end
    if nit:GetHealthPct() <= 25 then
    Unit:RegisterEvent("NPCNAME_Phasefive", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasefour", 1000, 0)
    end
     
    --Phase 5--
     
    function Illidanius_SpellpUnitShear,Event)
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(41032,pUnit:GetRandomPlaye r(0))
    end
     
     
    function Illidanius_SpellFlameCrash(pUnit,Event)
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    pUnit:CastSpellOnTarget(40832,pUnit:GetRandomPlaye r(0))
    end
     
     
     
    function Illidanius_SpellR(pUnit,Event)
    Choice=math.random(1, 2, 3, 4, 5, 6, 7)
    if Choice==1 then
    pUnit:CastSpellOnTarget(41117,pUnit:GetMainTank(0) )
    end
    if Choice==2 then
    pUnit:CastSpellOnTarget(40904,pUnit:GetMainTank(0) )
    end
    if Choice==3 then
    pUnit:CastSpellOnTarget(41032,pUnit:GetMainTank(0) )
    end
    if Choice==4 then
    pUnit:CastSpellOnTarget(40832,pUnit:GetMainTank(0) )
    end
    if Choice==5 then
    pUnit:CastSpellOnTarget(40932,pUnit:GetRandomPlaye r(0))
    end
    if Choice==6 then
    pUnit:CastSpellOnTarget(40647,pUnit:GetRandomPlaye r(0))
    pUnit:SendChatMessage(14, 0, "Forgive me Brother I will Fall!!")
    pUnit:RegisterEvent("NPCNAME_TalkStart5", 5000, 0)
    end
    if Choice==7 then
    pUnit:CastSpellOnTarget(40683,pUnit:GetRandomPlaye r(0))
    if nit:GetHealthPct() <= o then
    Unit:RegisterEvent("NPCNAME_death", 1000, 0)
    not Unit:RegisterEvent("NPCNAME_Phasefive", 1000, 0
     
    end
     
     
    #-- Extra --#
     
     
     
    function Illidanius_Death(pUnit)
    pUnit:SetScale(2)
    pUnit:/PlaySoundToSet(22917)
    pUnit:RemoveEvents()
     
     
    function Illidanius_OnLeaveCombat(pUnit, event)
    pUnit:RemoveEvents()
    pUnit:SetModel(22917)
    pUnit:SetScale(2)
    end
     
     
    function Illidanius_OnKilledTarget(pUnit)
    pUnit:/PlaySoundToSet(22917)
    end
     
     
     
    RegisterUnitEvent(120000, 1, "Illidanius_OnEnterCombat")
    RegisterUnitEvent(120000, 2, "Illidanius_OnLeaveCombat")
    RegisterUnitEvent(120000, 3, "Illidanius_OnKilledTarget")
    RegisterUnitEvent(120000, 4, "Illidanius_Death")
     
    #Fixed by Lbniese ™#

  8. #7
    Beginner
    Rigamaru's Avatar
    Join Date
    Aug 2009
    Location
    N/A
    Posts
    40
    Post Thanks / Like
    Rep Power
    15
    Reputation
    3

    Register to remove this ad
    Oh thanks.

 

 

Visitors found this page by searching for:

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

Tags for this Thread

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 06:02 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