RiperHax
06-03-2009, 07:46 PM
Hey There this is my first script that i have e made and released.
SQL
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('133333', "V-07-TR-0N", "", '', '0', '9', '0', '3', '0', '0', '24108', '0', '0', '0', '1', '1', '0', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('133333', '83', '83', '14', '4532000', '4532000', '8732', '5', '0', '3200', '0', '15320', '17320', '0', '0', '0', '0', '0', '13420', '0', '0', '0', '0', '0', '0', '0', '0', "0", '1', '3200000', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
SCRIPT
--V-07-TR-0N--
--Scripted----
----by--------
--RiperHax----
--------------
function V07TR0N_Combat(pUnit, event)
pUnit:SendChatMessage(12, 0, "Orbital Defense System Activated!")
pUnit:RegisterEvent("Chain", 15000, 0)
pUnit:RegisterEvent("Thunder", 14000, 0)
pUnit:RegisterEvent("Nova", 33000, 0)
pUnit:RegisterEvent("Shock", 40000, 0)
end
function V07TR0N_Killed(pUnit, event)
local Choice = math.random(1, 2)
if Choice == 1 then
pUnit:SendChatMessage(12, 0, "Target Threat Level: 0")
end
if Choice == 2 then
pUnit:SendChatMessage(12, 0, "Target Eliminated. Acquiring New Target.")
end
end
function V07TR0N_Leave(pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Ah a moment to rest and Recharge!")
end
function V07TR0N_Died(pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Total systems failure. Defense protocols breached. V-07-TR-0N Unit shutting down.")
end
RegisterUnitEvent(133333, 1, "V07TR0N_Combat")
RegisterUnitEvent(133333, 3, "V07TR0N_Killed")
RegisterUnitEvent(133333, 2, "V07TR0N_Leave")
RegisterUnitEvent(133333, 4, "V07TR0N_Died")
----------
--Spells--
----------
function Chain(pUnit, event)
local MAINTANKKK = pUnit:GetMainTank()
if(MAINTANKKK ~=nil) then
pUnit:FullCastSpellOnTarget(59517, MAINTANKKK)
else
end
end
function Thunder(pUnit, event)
pUnit:CastSpell(60029)
end
function Nova(pUnit, event)
local MAINTANKkk = pUnit:GetMainTank()
if(MAINTANKkk ~= nil) then
pUnit:FullCastSpell(59835, MAINTANKkk)
else
end
end
function shock(pUnit, event)
pUnit:CastSpell(33686)
end
Hope you Enjoy it
Tested works perfectly
SQL
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('133333', "V-07-TR-0N", "", '', '0', '9', '0', '3', '0', '0', '24108', '0', '0', '0', '1', '1', '0', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('133333', '83', '83', '14', '4532000', '4532000', '8732', '5', '0', '3200', '0', '15320', '17320', '0', '0', '0', '0', '0', '13420', '0', '0', '0', '0', '0', '0', '0', '0', "0", '1', '3200000', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
SCRIPT
--V-07-TR-0N--
--Scripted----
----by--------
--RiperHax----
--------------
function V07TR0N_Combat(pUnit, event)
pUnit:SendChatMessage(12, 0, "Orbital Defense System Activated!")
pUnit:RegisterEvent("Chain", 15000, 0)
pUnit:RegisterEvent("Thunder", 14000, 0)
pUnit:RegisterEvent("Nova", 33000, 0)
pUnit:RegisterEvent("Shock", 40000, 0)
end
function V07TR0N_Killed(pUnit, event)
local Choice = math.random(1, 2)
if Choice == 1 then
pUnit:SendChatMessage(12, 0, "Target Threat Level: 0")
end
if Choice == 2 then
pUnit:SendChatMessage(12, 0, "Target Eliminated. Acquiring New Target.")
end
end
function V07TR0N_Leave(pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Ah a moment to rest and Recharge!")
end
function V07TR0N_Died(pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Total systems failure. Defense protocols breached. V-07-TR-0N Unit shutting down.")
end
RegisterUnitEvent(133333, 1, "V07TR0N_Combat")
RegisterUnitEvent(133333, 3, "V07TR0N_Killed")
RegisterUnitEvent(133333, 2, "V07TR0N_Leave")
RegisterUnitEvent(133333, 4, "V07TR0N_Died")
----------
--Spells--
----------
function Chain(pUnit, event)
local MAINTANKKK = pUnit:GetMainTank()
if(MAINTANKKK ~=nil) then
pUnit:FullCastSpellOnTarget(59517, MAINTANKKK)
else
end
end
function Thunder(pUnit, event)
pUnit:CastSpell(60029)
end
function Nova(pUnit, event)
local MAINTANKkk = pUnit:GetMainTank()
if(MAINTANKkk ~= nil) then
pUnit:FullCastSpell(59835, MAINTANKkk)
else
end
end
function shock(pUnit, event)
pUnit:CastSpell(33686)
end
Hope you Enjoy it
Tested works perfectly