Small errors in script layout, need help! menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    B1ng's Avatar Private
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Small errors in script layout, need help!

    Alright so I need some soultions on these 5 scripts!

    Script 1:

    Fixed

    Script 2:

    Fixed

    Script 3:

    Error is '(' expected near pUnit

    Code:
    function gut_OnCombat(pUnit, Event)
    end 
    
    (pUnit:SendChatMessage(14, 0, "Fun Time")
    
    function gut_OnTargetDied
    pUnit:SendChatMessage(14, 0, "Daddy, I did it!")
    end
    
    function gut_OnLeave
    pUnit:RemoveEvent()
    end
    
    function gut_OnDie
    pUnit:SendChatMessage(14, 0, "Da...Daddy...")
    pUnit:SendChatMessage(14, 0, "Oh, Festergut. You were always my favorite. Next to Rotface. The good news is you left behind so much gas, I can practically taste it!"
    end
    
    
    
    RegisterUnitEvent(npcid, 1, gut_OnCombat)
    RegisterUnitEvent(npcid, 2, gut_OnLeave)
    RegisterUnitEvent(npcid, 4, gut_OnDied)
    RegisterUnitEvent(npcid, 3, gut_OnTargetDied)
    Script 4:

    Error is '<eof>' expected near 'end'

    Code:
    --[[ Made by kjanko (http://cataclysm-gaming.com)
    				Credits for helping me:
    					Hypersniper
    						GrandElf
    							Do not re-release without mine permission
    
    What you need to do:
    Fill data for RegisterUnitEvent(mobid, event, function)
    Fill data for PerformIngameSpawn(type,entry,map,x,y,z,o,facOrScale, duration, 0, 0, 0, pUnit:GetInstanceID()
    Fill data for GetGameObjectNearestCoords(x, y, z, gameobjectid) This is used when despawning the flame/shadow circle
    								E				N				Y			O			Y							--]]
    
    
    RUBY = {}
    
    RUBY.Spells = {
    	Cleave = 74524,
    	Fiery_Combustion = 74562,
    	Flame_Breath = {74525, 74526, 74528},
    	Tail_Lash = 74531,
    }
    
    RUBY.zSpells = {
    	zCleave = 74524,
    	Dark_Breath = {74806, 75954, 75956},
    	Soul_Consuption = 74792,
    	zTail_Lash = 74531,
    }
    
    function RefreshPhase()
    	if (#phase_table == 0) then
    		max_phase = 8
    		table.insert(phase_table, 8)
    	else
    		max_phase = math.pow(2, #phase_table+4)
    		table.insert(phase_table, max_phase)
    	end
    end
    
    function PhaseGet(leader)
    	for k, v in pairs(RUBY) do
    		if (k == tostring(leader)) then
    			return v.phase
    		end
    	end
    end
    
    function SavePhase(pUnit)
    	local tbl = {}
    	RefreshPhase()
    	while (true) do
    		for k, v in pairs(pUnit:GetInRangePlayers()) do
    			if(v:IsInGroup()) then
    				local leader = v:GetGroupLeader()
    				RUBY[tostring(leader)] = {phase = max_phase}
    			end
    		end
    		break;
    	end
    end
    
    
    function RUBY.Halion_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id] = {}
    	RUBY[id].Halion = pUnit
    	RUBY[id].Halion:SendChatMessage(14, 0, "Meddlesome insects, you're too late! The Ruby Sanctum is lost.")
    	pUnit:PlaySoundToSet(17499)
    	pUnit:AddAura(78243)
    	end
    end
    
    RegisterUnitEvent(HalionID, 18, "RUBY.Halion_Spawn")
    
    function RUBY.Tleh_Animation_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].tleh = pUnit
    	pUnit:RegisterEvent("RUBY.CheckForDeadDrakes", 1000, 0)
    end
    
    RegisterUnitEvent()
    
    function RUBY.Halion_Phased_Spawn(pUnit, Event)
    	pUnit:SetPhase(PhaseGet(plr:GetGroupLeader()))
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id][phase] = {}
    	RUBY[id][phase].Halionz = pUnit
    	local health = RUBY[id].Halion:GetHealthPct()
    	RUBY[id][phase].Halionz:SetHealthPct(health)
    	RUBY[id][phase].Halionz:AddAura(78243)
    end
    
    RegisterUnitEvent()
    
    function RUBY.Orb_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id][phase].Orb = pUnit
    	pUnit:SetPhase(PhaseGet(plr:GetGroupLeader()))
    	pUnit:RegisterEvent("RUBY.Orb_Move", 1000, 1)
    end
    
    function RUBY.Orb2_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id][phase].Orb2 = pUnit
    	pUnit:SetPhase(PhaseGet(plr:GetGroupLeader()))
    end
    
    function RUBY.Drake1_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].Drake1 = pUnit
    	pUnit:RegisterEvent("RUBY.Orb2_Move", 1000, 1)
    end
    
    RegisterUnitEvent(Drake1ID, 18, "RUBY.Drake1_Spawn")
    
    function RUBY.Drake2_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].Drake2 = pUnit
    end
    
    RegisterUnitEvent(Drake2ID, 18, "RUBY.Drake2_Spawn")
    
    function RUBY.Drake3_Spawn(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].Drake3 = pUnit
    end
    
    RegisterUnitEvent(Drake3ID, 18, "RUBY.Drake3_Spawn")
    
    function RUBY.CheckForDeadDrakes(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	if(RUBY[id].Drake1:IsDead() and RUBY[id].Drake2:IsDead() and RUBY[id].Drake3:IsDead()) then
    	RUBY[id].tleh:FullCastSpell(76006)
    	RUBY[id].tleh:RegisterEvent("RUBY.Explosion_Animation", 16000, 1)
    	end
    end
    
    function RUBY.Explosion_Animation(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].tleh:FullCastSpell(76010)
    	RUBY[id].tleh:SpawnCreature(HalionID, pUnit:GetX(), pUnit:GetY(), pUnit:GetZ(), pUnit:GetO(), 14, 0) -- Halion --
    end
    
    function RUBY.Halion_OnCombat(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].Halion:SendChatMessage(14, 0, "Your world teeters on the brink of annihilation. You will ALL bear witness to the coming of a new age of DESTRUCTION!")
    	pUnit:PlaySoundToSet(17500)
    	PerformIngameSpawn() -- Spawn a firewall in the psyhics phase --
    	PerformIngameSpawn() -- Spawn a firewall in the twillight world --
    	SavePhase(pUnit)
    	RUBY[id].Halion:RegisterEvent("RUBY.Spell1", 5000, 1)
    	RUBY[id].Halion:RegisterEvent("RUBY.Phase2", 1000, 0)
    	RegisterTimedEvent("RUBY.Enrage", 600000, 1)
    	RUBY[id].Halion:RegisterEvent("RUBY.Spell5", 13000, 0)
    end
    
    function RUBY.Phase2(pUnit, Event)
    	if RUBY[id].Halion:GetHealthPct() <= 75 then
    	RUBY[id].Halion:RemoveEvents()
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id].Halion:SendChatMessage(14, 0, "You will find only suffering within the realm of twilight! Enter if you dare!")
    	pUnit:PlaySoundToSet(17507)
    	PerformIngameSpawn() --Portal to Twilight Realm--
    	PerformIngameSpawn() --The phased Halion--
    	SpawnOrbs(pUnit)
    	RUBY[id].Halion:CastSpell(74809)
    	RUBY[id].Halion:SetCombatCapalbe(0)
    	RUBY[id].Halion:SetFaction(35)
    	RUBY[id].Halion:SetScale(0.0000001)
    	RUBY[id][phase].Halionz:RegisterEvent("RUBY.zSpell1", 5000, 1)
    	RUBY[id][phase].Halionz:RegisterEvent("RUBY.zSpell5", 13000, 0)
    	RUBY[id].Halion:RegisterEvent("RUBY.Phase3", 1000, 0)
    	RUBY[id][phase].Halionz:RegisterEvent("RUBY.CheckForNearPlayersAndGiveThemAuraYay", 1000, 1)
    	end
    end
    
    function RUBY.Spell5(pUnit, Event)
    	pUnit:CastSpellOnTarget(RUBY.zSpells["Soul_Consuption"], pUnit:GetRandomPlayer(0))
    end
    
    function RUBY.CheckForNearPlayersAndGiveThemAuraYay(pUnit, Event)
    	--[[local plrs = pUnit:GetInRangePlayers()
    	for k, v in pairs(plrs) do
    	if v:HasAura(75476) == false then
    	v:AddAura(75476)
    	end
    	end--]]
    	pUnit:FullCastSpell(75476)
    end
    
    function RUBY.TwilightPortal_OnClick(obj, event, plr)
    	plr:SetPhase(PhaseGet(plr:GetGroupLeader()))
    	plr:CastSpell(57620)
    	plr:CastSpell(74807)
    end
    
    RegisterGameObjectEvent()
    
    function RUBY.Phase3(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	local hlth = RUBY[id][phase].Halionz:GetHealthPct()
    	if RUBY[id][phase].Halionz:GetHealthPct() <= 50 then
    	RUBY[id][phase].Halionz:RemoveEvents()
    	RUBY[id].Halion:SetHealthPct(hlth)
    	RUBY[id].Halion:SendChatMessage(14, 0, "I am the light and the darkness! Cower, mortals, before the herald of Deathwing!")
    	pUnit:PlaySoundToSet(17508)
    	local Players = pUnit:GetInRangePlayers()
    		for k, v in pairs(Players) do
    			v:CastSpell(75063)
    	RUBY[id].Halion:SetCombatCapalbe(1)
    	RUBY[id].Halion:SetFaction(14)
    	RUBY[id].Halion:SetScale(1)
    	RUBY[id].Halion:RegisterEvent("RUBY.Spell1", 5000, 1)
    	RUBY[id][phase].Halionz:RegisterEvent("RUBY.zSpell1", 5000, 1)
    	RUBY[id][phase].Halionz:RegisterEvent("RUBY.zSpell5", 13000, 0)
    	RUBY[id].Halion:RegisterEvent("RUBY.Spell5", 13000, 0)
    	RUBY[id].Halion:RegisterEvent("RUBY.Corporeality", 5000, 0)
    	RUBY[id][phase].Halionz:RegisterEvent("RUBY.Corporeality", 5000, 0)
    	end
    	end
    end
    
    function RUBY.Spell5(pUnit, Event)
    	pUnit:CastSpellOnTarget(RUBY.Spells["Fiery_Combustion"], pUnit:GetRandomPlayer(0))
    end
    
    function RUBY.zSpell4_CircleActivate(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id][phase].Orb:ChannelSpell(77844, RUBY[id][phase].Orb2)
    	pUnit:SendChatMessage(42, 0, "The orbiting spheres pulse with dark energy!")
    	RUBY[id][phase].Halionz:SendChatMessage(14, 0, "Beware the shadow!")
    	RUBY[id][phase].Halionz:PlaySoundToSet(17506)
    	RegisterTimedEvent("RUBY.Circle_Check", 500, 20)
    	RegisterTimedEvent("RUBY.Orbs_StopChannel", 10000, 1)
    end
    
    function RUBY.Circle_Check(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	local x1, y1 = RUBY[id][phase].Orb:GetLocation()
        local x2, y2 = RUBY[id][phase].Orb1:GetLocation()
        local m = (y1-y2) / (x1-x2)
        for k, v in pairs(pUnit:GetInRangePlayers()) do
    	local x, y = v:GetLocation()
    	if (math.abs(m * (x-x1) + y1 - y) < 5) then
             RUBY[id][phase].Halionz:Kill(v)
    
          end
       end
    end
    
    local function _DistToPoint(x,y,z,x2,y2,z2)
       local posTar = {x, y, z}
       local posNow = {x2, y2, z2}
       local distance = 0
       for i,v in ipairs(posNow) do
          distance = distance + (v-posTar[i])^2
       end
       return math.sqrt(distance) --yards
    end
    
    local function _TimeToPoint(x,y,z,x2,y2,z2,speed)
       local dist = _DistToPoint(x,y,z,x2,y2,z2)
       return math.floor((dist / speed) * 1000)-400
    end
    
    local speed = 3 --their movement speed
    local corners = 15 --number of 'corners' on the circle. 15 is a good number.
    local radius = 5 --how far away from the boss they are
    local entry = 1 --orb entry id
    
    function SpawnOrbs(pUnit)
       local id = pUnit:GetInstanceID()
       local phase = pUnit:GetPhase()
       local ox, oy = RUBY[id][phase].Halionz:GetLocation()     --13201, 272 centre of circle here.--
       local ang1 = math.pi --initial angle
       local ang2 = 0 --this will make them on opposite sides of circle
       local x = ox + radius * math.cos(ang1)
       local y = oy + radius * math.sin(ang1)
       local z = pUnit:GetZ()
    
       local u = pUnit:SpawnCreature(entry,x,y,z,0,35,0)
    
       local x = ox + radius * math.cos(ang2)
       local y = oy + radius * math.sin(ang2)
       local z = pUnit:GetZ()
    
       local u2 = pUnit:SpawnCreature(entry,x,y,z,0,35,0)
    
       u:SetPhase(PhaseGet(plr:GetGroupLeader()))
       u2:SetPhase(PhaseGet(plr:GetGroupLeader())) -- We have to phase the both circles --
       u:ModifyRunSpeed(speed)
       u2:ModifyRunSpeed(speed)
       DoWalk(u, ang1, ox, oy)
       DoWalk(u2, ang2, ox, oy)
       pUnit:RegisterEvent("RUBY.zSpell4_CircleActivate", 1000, 1)
    end
    
    function DoWalk(pUnit, lastAng, ox, oy)
       local ang = lastAng + ((2 * math.pi) / corners)
       local x1, y1, z1 = pUnit:GetLocation()
       local x2 = ox + radius * math.cos(ang)
       local y2 = oy + radius * math.sin(ang)
       local z2 = pUnit:GetZ() --z will always be the same on flat ground
       local t = _TimeToPoint(x1,y1,z1,x2,y2,z2,speed)
       pUnit:MoveTo(x2,y2,z2,0)
       pUnit:CreateLuaEvent(function() DoWalk(pUnit, ang, ox, oy) end, t, 1)
    end
    
    function RUBY.Orbs_StopChannel(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	RUBY[id][phase].Orb:StopChannel()
    	RegisterTimedEvent("RUBY.zSpell4_CircleActivate", 20000, 1)
    end
    
    function RUBY.Spell1(pUnit, Event)
    	pUnit:FullCastSpellOnTarget(RUBY.Spells["Cleave"], pUnit:GetMainTank())
    	RegisterTimedEvent("RUBY.Spell2", 2500, 1)
    end
    
    function RUBY.Spell2(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	RUBY[id].DD = pUnit:GetDungeonDifficulty() + 1
    	pUnit:FullCastSpellOnTarget(RUBY.Spells["Flame_Breath"][RUBY[id].DD], pUnit:GetMainTank())
    	RegisterTimedEvent("RUBY.Spell3", 1500, 1)
    end
    
    function RUBY.Spell3(pUnit, Event)
    	local plrs = pUnit:GetInRangePlayers()
    	for k, v in pairs(plrs) do
    	if v:IsInBack(pUnit) then
    	pUnit:FullCastSpellOnTarget(RUBY.Spells["Tail_Lash"], v)
    	RegisterTimedEvent("RUBY.Spell1", 2000, 1)
    	end
    	end
    end
    
    function RUBY.zSpell1(pUnit, Event)
    	pUnit:FullCastSpellOnTarget(RUBY.Spells["zCleave"], pUnit:GetMainTank())
    	RegisterTimedEvent("RUBY.zSpell2", 2500, 1)
    end
    
    function RUBY.zSpell2(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	pUnit:FullCastSpellOnTarget(RUBY.Spells["Dark_Breath"][RUBY[id].DD], pUnit:GetMainTank())
    	RegisterTimedEvent("RUBY.zSpell3", 2500, 1)
    end
    
    function RUBY.zSpell3(pUnit, Event)
    	local plrs = pUnit:GetInRangePlayers()
    	for k, v in pairs(plrs) do
    	if v:IsInBack(pUnit) then
    	pUnit:FullCastSpellOnTarget(RUBY.Spells["zTail_Last"], v)
    	RegisterTimedEvent("RUBY.zSpell1", 1500, 1)
    	end
    	end
    end
    
    function RUBY.Enrage(pUnit, Event)
    	pUnit:FullCastSpell(26662)
    	pUnit:SendChatMessage(14, 0, "Not good enough.")
    	pUnit:PlaySoundToSet(17504)
    end
    
    function RUBY.Halion_Dead(pUnit, Event)
    	pUnit:SendChatMessage(14, 0, "Relish this victory, mortals, for it will be your last! This world will burn with the master's return!")
    	pUnit:PlaySoundToSet(17503)
    	pUnit:RemoveEvents()
    	local flame_circle = pUnit:GetGameObjectNearestCoords()
    	if flame_circle ~= nil then
    	flame_circle:Despawn() -- Dunno if this is correct, we want to despawn the flame circle --
    	if RUBY[id][phase].Halionz ~= nil then
    	RUBY[id][phase].Halionz:Despawn(1, 0)
    	local shadow_portal = pUnit:GetGameObjectNearestCoords()
    	if shadow_portal ~= nil then
    	shadow_portal:Despawn() -- The portal that leads to twilight realm --
    	end
    	end
    	end
    end
    
    RegisterUnitEvent()
    
    function RUBY.Halion_LeaveCombat(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	pUnit:RemoveEvents()
    	local flame_circle = pUnit:GetGameObjectNearestCoords()
    	if flame_circle ~= nil then
    	flame_circle:Despawn() -- Dunno if this is correct, we want to despawn the flame circle --
    	if RUBY[id][phase].Halionz ~= nil then
    	RUBY[id][phase].Halionz:Despawn(1, 0)
    	local shadow_portal = pUnit:GetGameObjectNearestCoords()
    	if shadow_portal ~= nil then
    	shadow_portal:Despawn() -- The portal that leads to twilight realm --
    	end
    	end
    	end
    end
    
    RegisterUnitEvent()
    
    function ComepareHp(pUnit, Unit)
    	local hp1 = pUnit:GetHealthPct() - 25
    	local hp2 = Unit:GetHealthPct()
    	local Difference = hp1 - hp2
    	return Difference;
    end
    
    function RUBY.Corporeality(pUnit, Event)
    	local id = pUnit:GetInstanceID()
    	local phase = pUnit:GetPhase()
    	local Halion = RUBY[id].Halion
    	local Halionz = RUBY[id][phase].Halionz
    	local diff = CompareHp(RUBY[id].Halion, RUBY[id][phase].Halionz)
    	--------------------Let's start the Odyseyy-----------------------
    	if(diff == 3) then
    	Halion:RemoveAuras()
    	Halionz:RemoveAuras()
    	Halion:AddAura(74827)
    	Halionz:AddAura(74832)
    	end
    	if(diff == -3) then
    	Halion:RemoveAuras()
    	Halionz:RemoveAuras()
    	Halionz:AddAura(74828)
    	Halion:AddAura(74833)
    	end
    	if(diff == 4) then
    	Halion:RemoveAuras()
    	Halionz:RemoveAuras()
    	Halion:AddAura(74829)
    	Halionz:AddAura(74834)
    	end
    	if(diff == -4) then
    	Halion:RemoveAuras()
    	Halionz:RemoveAuras()
    	Halionz:AddAura(74830)
    	Halion:AddAura(74835)
    	end
    	if(diff == 5) then
    	Halion:RemoveAuras()
    	Halionz:RemoveAuras()
    	Halion:AddAura(74831)
    	Halionz:AddAura(74836)
    	end
    	if(diff == -5) then
    	Halion:RemoveAuras()
    	Halionz:RemoveAuras()
    	Halionz:AddAura(74831)
    	Halion:AddAura(74836)
    	end
    	if(diff == 2) then
    	Halion:RemoveAuras()
    	Halion:AddAura(74826)
    	end
    	if(diff == -2) then
    	Halionz:RemoveAuras()
    	Halionz:AddAura(74826)
    	end
    	if(diff == 1) then
    	Halion:RemoveAuras()
    	Halion:AddAura(74826)
    	end
    	if(diff == -1) then
    	Halionz:RemoveAuras()
    	Halionz:AddAura(74826)
    	end
    end
    
    print("((--Made by kjanko from http://cataclysm-gaming.com--))")
    Script 5:

    Error is unexpected symbol near ')'

    Code:
    crusader = {}
    crusader.Tirion = {}
    crusader.Barron = {}
    crusader.Gormok = {}
    crusader.Acidmaw = {}
    crusader.Dreadscale = {}
    crusader.Icehowl = {}
    crusader.Jaraxxus = {}
    crusader.GWF = {}
    crusader.Garrosh = {}
    crusader.Wrynn = {}
    crusader.Twins = {}
    crusader.Twins.one = {}
    crusader.Twins.two = {}
    crusader.Lich = {}
    crusader.c = {}
    
    function crusader.c.spawn(pUnit, Event)
    	crusader.c_one[pUnit:GetInstanceID()] = {}
    	crusader.c_one[pUnit:GetInstanceID()].one = pUnit:GetCreatureNearestCoords()
    end
    
    function crusader.c.spawn2(pUnit, Event)
    	crusader.c_two[pUnit:GetInstanceID()] = {}
    	crusader.c_two[pUnit:GetInstanceID()].two = pUnit:GetCreatureNearestCoords()
    end
    
    function crusader.c.spawn3(pUnit, Event)
    	crusader.c_three[pUnit:GetInstanceID()] = {}
    	crusader.c_three[pUnit:GetInstanceID()].three = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(c1, 18, "crusader.c.spawn")
    RegisterUnitEvent(c2, 18, "crusader.c.spawn2")
    RegisterUnitEvent(c3, 18, "crusader.c.spawn3")
    
    function crusader.Lich.spawn(pUnit, Event)
    	crusader.Lich[pUnit:GetInstanceID()] = {}
    	crusader.Lich[pUnit:GetInstanceID()].Moob = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(lich, 18, "crusader.Lich.spawn")
    
    function crusader.Twins.one(pUnit, Event)
    	crusader.Twins.one[pUnit:GetInstanceID()] = {}
    	crusader.Twins.one[pUnit:GetInstanceID()].one = pUnit:GetCreatureNearestCoords()
    end
    
    function crusader.Twins.two(pUnit, Event)
    	crusader.Twins.two[pUnit:GetInstanceID()] = {}
    	crusader.Twins.two[pUnit:GetInstanceID()].two = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(id1, 18, "crusader.Twins.one")
    RegisterUnitEvent(id2, 18, "crusader.Twins.two")
    
    function crusader.Garrosh.spawn(pUnit, Event)
    	crusader.Garrosh[pUnit:GetInstanceID()] = {}
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    function crusader.Wrynn.spawn(pUnit, Event)
    	crusader.Wrynn[pUnit:GetInstanceID()] = {}
    	crusader.Wrynn[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(gid, 18, "crusader.Garrosh.spawn")
    RegisterUnitEvent(wid, 18, "crusader.Wrynn.spawn")
    
    function crusader.Tirion.spawn(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()] = {}
    	crusader.Tirion[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(tirion_id, 18, "crusader.Tirion.spawn")
    
    function crusader.Barron.spawn(pUnit, Event)
    	crusader.Barron[pUnit:GetInstanceID()] = {}
    	crusader.Barron[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(Barron_Ramsey_id, 18, "crusader.Tirion.spawn")
    
    function crusader.Gormok.spawn(pUnit, Event)
    	crusader.Gormok[pUnit:GetInstanceID()] = {}
    	crusader.Gormok[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(Gormok_id, 18, "crusader.Gormok.spawn")
    
    function crusader.Acidmaw.spawn(pUnit, Event)
    	crusader.Acidmaw[pUnit:GetInstanceID()] = {}
    	crusader.Acidmaw[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(Acidmaw, 18, "crusader.Acidmaw.spawn")
    
    function crusader.Dreadscale.spawn(pUnit, Event)
    	crusader.Dreadscale[pUnit:GetInstanceID()] = {}
    	crusader.Dreadscale[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(Dreadscale, 18, "crusader.Dreadscale.spawn")
    
    function crusader.Icehowl.spawn(pUnit, Event)
    	crusader.Icehowl[pUnit:GetInstanceID()] = {}
    	crusader.Icehowl[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(Icehowl_id, 18, "crusader.Icehowl.spawn")
    
    function crusader.Jaraxxus.spawn(pUnit, Event)
    	crusader.Jaraxxus[pUnit:GetInstanceID()] = {}
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    	pUnit:SetCombatCapable(1)
    	pUnit:SetCombatMeleeCapable(1)
    	pUnit:SetCombatSpellCapable(1)
    	pUnit:SetCombatRangedCapable(1)
    	pUnit:SetCombatTargetingCapable(1)
    end
    
    RegisterUnitEvent(jaraxxus_id, 18, "crusader.Jaraxxus.spawn")
    
    function crusader.GWF.spawn(pUnit, Event)
    	crusader.GWF[pUnit:GetInstanceID()] = {}
    	crusader.GWF[pUnit:GetInstanceID()].Cre = pUnit:GetCreatureNearestCoords()
    end
    
    RegisterUnitEvent(gfw_id, 18, "crusader.GWF.spawn")
    
    function crusader.Tirion.Start(pUnit, Event)
    	local check = crusader.Barron[pUnit:GetInstanceID()].Cre:GetInRangePlayers()
    	for k, v in pairs(check) do
    	if v ~= nil then
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Welcome champions! You have heard the call of the Argent Crusade, and you are boughly answered! It is here, in the Crusader's Coliseum that you will face your greatest challenges. Those of you who survive the riggers of the coliseum will join the Argent Crusade on it's march to Icecrown Citadel!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16036)
    	end
    	end
    end
    
    function crusader.Barron.OnGossip(pUnit, Event, player)
    	crusader.Barron[pUnit:GetInstanceID()].Cre:GossipCreateMenu(150, player, 0)
    	crusader.Barron[pUnit:GetInstanceID()].Cre:GossipMenuAddItem(0, "We are ready.", 1, 0)
    	crusader.Barron[pUnit:GetInstanceID()].Cre:GossipSendMenu(player)
    end
    
    function crusader.Barron.OnGossipSelect(pUnit, Event, player, id, intid, code)
    	if (intid == 1) then
    	player:GossipComplete()
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Hailing from the deepest darkest caverns of the Storm Peaks, Gormok the Impaler! Battle on heroes.")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16038)
    	crusader.Barron[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Barron[pUnit:GetInstanceID()].Cre:Despawn(1, 0)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.Gormok.defeat", 1000, 0)
    	end
    end
    
    function crusader.Gormok.defeat(pUnit, Event)
    	if (crusader.crusader.Gormok[pUnit:GetInstanceID()].Cre:IsDead() == true) then
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.worms", 180000, 1)
    	end
    end
    
    function crusader.worms(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Steel yourselves heroes, for the twin terrors, Acidmaw and Dreadscale. Enter the arena!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16039)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDo)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDo)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.acidmaw.defeat")
    end
    
    function crusader.Acidmaw.defeat(pUnit, Event)
    	if (crusader.Acidmaw[pUnit:GetInstanceID()].Cre:IsDead() and crusader.Dreadscale[pUnit:GetInstanceID()].Cre:IsDead()) then
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.Icehowl.spawn", 180000, 1)
    	end
    end
    
    function crusader.beast(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "The air itself freezes with the introduction of our next combatant, Icehowl! Kill or be killed, champions!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16040)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.Icehowl.defeat", 1000, 0)
    end
    
    function crusader.Icehowl.defeat(pUnit, Event)
    	if (crusader.Icehowl[pUnit:GetInstanceID()].Cre:IsDead() == true) then
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "The monster's vinagiry has been vanquished!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16041)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.Jaraxxus_spawn", 180000, 1)
    	end
    end
    
    function crusader.Jaraxxus_spawn(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16043)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDOGWF_SPAWN)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("speech1", 8000, 1)
    end
    
    function speech1(pUnit, Event)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Thank you, Highlord! Now challengers, I will begin the ritual of summoning. When I am done, a fearsome doomguard will appear.")
    	crusader.GWF[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16268)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:RegisterEvent("speech2", 1000, 1)
    end
    
    function speech2(pUnit, Event)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:Emote(468, 30000)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:ChannelSpell(ToDO)
    	PerformIngameSpawn() -- Portal for Jaraxxus
    	crusader.GWF[pUnit:GetInstanceID()].Cre:SpawnCreature(id, 563.700, 139.595, 393.868, 4.729359, 35, 9000) --Jaraxxus--
    	crusader.GWF[pUnit:GetInstanceID()].Cre:RegisterEvent("speech3", 1000, 1)
    end
    
    function speech3(pUnit, Event)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Prepare for oblivion!")
    	crusader.GWF[pUnit:GetInstanceID()].Cre:SpawnCreature(id, 563.700, 139.595, 393.868, 4.729359, 35, 9000)
    	crusader.GWF[pUnit:GetInstanceID()].CrePlaySoundToSet(16269)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:RegisterEvent("speech4", 1000, 1)
    end
    
    function speech4(pUnit, Event)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Haha, I have done it! Behold the absolute power of Wilfred Fizzlebang, Master Summoner! You are bound to me, demon.")
    	crusader.GWF[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16270)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:Emote(0, 1600000)
    	crusader.GWF[pUnit:GetInstanceID()].Cre:RegisterEvent("speech5", 8000, 1)
    end
    
    function speech5(pUnit, Event)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Triffeling gnome! Your arrogance will be your undoing!")
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16143)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:Kill(crusader.GWF)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:SetCombatMeleeCapable(0)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:SetCombatSpellCapable(0)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:SetCombatRangedCapable(0)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:SetCombatTargetingCapable(0)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:Emote(333, 10000)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16044)
    	crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.Jaraxxus.isdead", 1000, 0)
    end
    
    function crusader.Jaraxxus.isdead(pUnit, Event)
    	if (crusader.Jaraxxus[pUnit:GetInstanceID()].Cre:IsDead() == true) then
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16045)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("Argue", 15000, 1)
    	end
    end
    
    function Argue(pUnit, Event)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!")
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16021)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:RegisterEvent("Argue123", 7000, 1)
    end
    
    function Argue123(pUnit, Event)
    	crusader.Wrynn[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "The Alliance doesn't need the help of a demon lord to deal with Horde filth. Come, pig!")
    	crusader.Wrynn[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16064)
    	crusader.Wrynn[pUnit:GetInstanceID()].Cre:RegisterEvent("Argue2", 5000, 1)
    end
    
    function Argue2(pUnit, Event)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!")
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16023)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:RegisterEvent("Argue3", 8000, 1)
    end
    
    function Argue3(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Very well, I will allow it. Fight with honor!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16048)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("Argue4", 5000, 1)
    end
    
    function Argue4(pUnit, Event)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Show them no mercy, Horde champions! LOK'TAR OGAR!")
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16022)
    	local player = crusader.Garrosh[pUnit:GetInstanceID()].Cre:GetRandomPlayer(0))
    	if(player:GetTeam() == 0) then
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	if(player:GetTeam() == 1) then
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Garrosh[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.c.dead", 1000, 0)
    end
    
    function crusader.champions.dead(pUnit, Event)
    	if (crusader.c_one[pUnit:GetInstanceID()].one:IsDead() and crusader.c_one[pUnit:GetInstanceID()].two:IsDead() and crusader.c_one[pUnit:GetInstanceID()].three:IsDead()) then
    	crusader.Wrynn[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Glory to the Alliance!")
    	crusader.Wrynn[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16067)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16049)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("crusader.Twins.spawn", 180000, 1)
    	end
    end
    
    function crusader.Twins.spawn(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Only by working together will you overcome the final challenge. From the deaths of icecrown come two of the scourge's most powerful lieutenants! Fearsome Val'kyr, winged avengers of the Lich King!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16050)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("Drama", 1000, 0)
    end
    
    function Drama(pUnit, Event)
    	if (crusader.Twins.one[pUnit:GetInstanceID()].one:IsDead() and crusader.Twins.two[pUnit:GetInstanceID()].two:IsDead()) then
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16051)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SpawnCreature(ToDO, Lich)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("Lich1", 7000, 1)
    	end
    end
    
    function Lich1(pUnit, Event)
    	crusader.Lich[pUnit:GetInstanceID()].Moob:SendChatMessage(14, 0, "You will have your challenge, Fordring.")
    	crusader.Lich[pUnit:GetInstanceID()].Moob:PlaySoundToSet(16321)
    	crusader.Lich[pUnit:GetInstanceID()].Moob:RegisterEvent("Lich2", 5000, 1)
    end
    
    function Lich2(pUnit, Event)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:SendChatMessage(14, 0, "Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a swift death.")
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:PlaySoundToSet(16052)
    	crusader.Tirion[pUnit:GetInstanceID()].Cre:RegisterEvent("Lich3", 8000, 1)
    end
    
    function Lich3(pUnit, Event)
    	crusader.Lich[pUnit:GetInstanceID()].Moob:SendChatMessage(14, 0, "The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.")
    	crusader.Lich[pUnit:GetInstanceID()].Moob:PlaySoundToSet(16322)
    	crusader.Lich[pUnit:GetInstanceID()].Moob:RegisterEvent("Lich4", 12000, 1)
    end
    
    function Lich4(pUnit, Event)
    	crusader.Lich[pUnit:GetInstanceID()].Moob:SendChatMessage(14, 0, "The souls of your fallen champions will be mine, Fordring.")
            crusader.Lich[pUnit:GetInstanceID()].Moob:PlaySoundToSet(16323)
            --[[local floor = pUnit:GetGameObjectNearestCoords(ToDO);
    		if floor ~= nil then
    			floor:SetUInt32Value(33, 1)
    		end]]--
    end
    Last edited by B1ng; 07-22-2010 at 10:01 PM.

    Small errors in script layout, need help!
  2. #2
    Frostic's Avatar Banned
    Reputation
    7
    Join Date
    May 2009
    Posts
    90
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i could be wrong but it seems its in the line
    (pUnit:SendChatMessage(14, 0, "Fun Time")

    try

    pUnit:SendChatMessage(14, 0, "Fun Time")

    second line of the code you got a ( at the begining of that line
    and it seems to be out there by its self and not in a function
    try removing the ( and if that dont work try moving it inside the function and removing the extra (

    i think!!!

    ---------- Post added at 12:59 AM ---------- Previous post was at 12:52 AM ----------

    print("((--Made by kjanko from http://cataclysm-gaming.com--))")

    try removing the last line as it is sent after the last end statement <EOF>

    and for the last one that is a hard one to find maybe if you fix the extra ( in script 3 script 5 wont have an error closing the brackets () but i am a noob to this but this is wat catches my eye looking at the post

    nice script anyways if you can get in going
    Last edited by Frostic; 07-23-2010 at 12:18 AM.

  3. #3
    marcelo_20xx's Avatar Active Member
    Reputation
    25
    Join Date
    Sep 2008
    Posts
    165
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    --(pUnit:SendChatMessage(14, 0, "Fun Time")
    and it should work.

Similar Threads

  1. [Question] Need help with Lua Script error
    By Rempage in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 11-12-2016, 08:06 PM
  2. Small Project, need help.
    By Dalamar in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 10-31-2007, 12:38 AM
  3. i need help with script, im a noob
    By orangegold in forum WoW UI, Macros and Talent Specs
    Replies: 2
    Last Post: 10-27-2007, 05:47 PM
  4. Need Help Pls!ptr Error
    By gh0st420 in forum World of Warcraft General
    Replies: 0
    Last Post: 10-15-2007, 03:34 PM
  5. Need help with glider! Error
    By sneakks in forum World of Warcraft General
    Replies: 0
    Last Post: 08-10-2007, 03:11 PM
All times are GMT -5. The time now is 06:23 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search