Edit: working now! thanks to everyone that helped me! =D
Edit: working now! thanks to everyone that helped me! =D
Last edited by thpthpthp; 08-26-2008 at 05:51 PM.
dont use
'
that should work*
[/COLOR]
thanks though when i took out the ' in Dragon's Breath now i get this error
and i took out all the ' in the scriptCode:03:45 Nn LuaEngine: Diablo.lua... failed. <could not load> scriptsDiablo.lua:13: '<' expected near 'breath'
got any ideas?
PS: +2rep anyways
Diablo_DragonsBreath
Try not using Spaces in commands..
Code:function Diablo_OnCombat(Unit, Event) Unit:SendChatMessage(12, 0, "Not even death can save you from me!") Unit:RegisterEvent("Diablo_DragonsBreath", 12, 99) Unit:RegisterEvent("Diablo_FlameWave", 9000, 99) Unit:RegisterEvent("Diablo_Blastwave", 7000, 99) Unit:RegisterEvent("Diablo_CrystalPrison", 18000, 99) Unit:RegisterEvent("Diablo_ColdTouch", 17000, 99) Unit:RegisterEvent("Diablo_ConeofFire", 9000, 99) Unit:RegisterEvent("Diablo_RainofFire", 10000, 99) Unit:RegisterEvent("Diablo_StingerCharge", 17000, 99) end function Diablo_DragonsBreath(pUnit, Event) pUnit:FullCastSpellOnTarget(37289, pUnit:GetClosestPlayer()) end function Diablo_ConeofFire(pUnit, Event) pUnit:FullCastSpellOnTarget(36876, pUnit:GetMainTank()) end function Diablo_BlastWave(pUnit, Event) pUnit:CastSpell(38536) end function Diablo_CrystalPrison(pUnit, Event) pUnit:FullCastSpellOnTarget(40846, pUnit:GetRandomPlayer(7)) end function Diablo_ColdTouch(pUnit, Event) pUnit:FullCastSpellOnTarget(39230, pUnit:GetRandomPlayer(6)) end function Diablo_RainofFire(pUnit, Event) pUnit:FullCastSpellOnTarget(42023, pUnit:GetRandomPlayer(5)) end function Diablo_StingerCharge(pUnit, Event) pUnit:FullCastSpellOnTarget(26082, pUnit:GetRandomPlayer(4)) end function diablo_OnDied(Unit, Event) Unit:RemoveEvents() Unit:SendChatMessage(12, 0, "arrrrahhg") end function diable_LeaveCombat(Unit, event) Unit:RemoveEvents() end RegisterUnitEvent(55555, 1, "Diablo_OnCombat") RegisterUnitEvent(55555, 2, "_OnLeaveCombat") RegisterUnitEvent(55555, 4, "Diablo_OnDied")
Now I've modified it.
Keep up the work man!
~~ Babbaa
thanks a ton you two +rep you both =)
edit: i used the modified version and now I'm getting another error in arcemu-world.exe
this script just doesn't want to work -_-Code:"19:09 N LuaEngine: Diablo.lua... failed. <could not load> scriptsDiablo.lua:2: '<name>' expected neat 'function' "
Last edited by thpthpthp; 08-23-2008 at 11:27 PM.
as a start, it should be Diable_OnLeaveCombatRegisterUnitEvent(55555, 2, "_OnLeaveCombat")
[/COLOR]
You have mixed pUnit and Unit all over the script, I would edit all "Unit" to "pUnit" , that will work.
Also if you want the RegisterEvent command to continue forever, you could put 0 instead of 99. Unless you don't want it to go on for 99 times only
Hope it helped.
- Myzt
tryed what you both said but its still is giveing me
"19:09 N LuaEngine: Diablo.lua...
failed. <could not load>
scriptsDiablo.lua:2: '<name>' expected neat 'function' "
is there just a problem with my server?
answered you in the request tread.. hope that will make it work
[/COLOR]
Heres the version of the script im using.. Sorry i changed a few spells quickly earlier today cause he was doing 7k with one of them LOl
For me it loads up and works just fine..Code:function Diablo_OnCombat(Unit, Event) Unit:SendChatMessage(12, 0, "Not even death can save you from me!") Unit:RegisterEvent("Diablo_DragonsBreath", 12, 99) Unit:RegisterEvent("Diablo_FlameWave", 9000, 99) Unit:RegisterEvent("Diablo_Blastwave", 7000, 99) Unit:RegisterEvent("Diablo_CrystalPrison", 18000, 99) Unit:RegisterEvent("Diablo_ColdTouch", 17000, 99) Unit:RegisterEvent("Diablo_ConeofFire", 9000, 99) Unit:RegisterEvent("Diablo_RainofFire", 10000, 99) Unit:RegisterEvent("Diablo_StingerCharge", 17000, 99) end function Diablo_DragonsBreath(pUnit, Event) pUnit:FullCastSpellOnTarget(37289, pUnit:GetClosestPlayer()) end function Diablo_ConeofFire(pUnit, Event) pUnit:FullCastSpellOnTarget(10854, pUnit:GetMainTank()) end function Diablo_BlastWave(pUnit, Event) pUnit:CastSpell(42023) end function Diablo_CrystalPrison(pUnit, Event) pUnit:FullCastSpellOnTarget(40846, pUnit:GetRandomPlayer(7)) end function Diablo_ColdTouch(pUnit, Event) pUnit:FullCastSpellOnTarget(39230, pUnit:GetRandomPlayer(6)) end function Diablo_RainofFire(pUnit, Event) pUnit:FullCastSpellOnTarget(42023, pUnit:GetRandomPlayer(5)) end function Diablo_StingerCharge(pUnit, Event) pUnit:FullCastSpellOnTarget(26082, pUnit:GetRandomPlayer(4)) end function diablo_OnDied(Unit, Event) Unit:RemoveEvents() Unit:SendChatMessage(12, 0, "Fear me.....") end function diablo_onLeaveCombat(Unit, event) Unit:RemoveEvents() end RegisterUnitEvent(95122, 1, "Diablo_OnCombat") RegisterUnitEvent(95122, 2, "diablo_OnLeaveCombat") RegisterUnitEvent(95122, 4, "diablo_OnDied")
Maybe your Version doesnt support Lua++? what rev are you using... ALso note that i changed the NPC ID in mine to 95122?
hmm.. the script u have got a problem with getmaintank.. only on some servers that work (only a few).. maybe you should chose something else
[/COLOR]
got it working now thanks for the help will rep you when i can (gave out to much already -_-)