(I posted this two months ago, i was quitting and was just giving away the script i still had. I'm back now, but i guess the scripts are still good? =X) I have a bunch of random scripts left over from when i used to script Lua stuff and i figured it'd be a waste to just delete them, So i thought I'd just post them here. Some of them are pretty cool, some of them not so much. I'll upload the larger scripts to Pastebin, but I'll leave the smaller ones in this post.
[NOTE](My personal favorite is the line/carpet bomb cannon, it could be a lot cooler if you added more stuff too it)
Here they are;
===================================================
Gurubashi FFA PVP Flag capture event: Pastebin
Description: A flag spawns in gurubashi every 30 minutes. Players can pick it up and after 30 seconds they can capture it for tokens.
Notes: Its not completely finished and still needs to spawn a gameobject Overtop of the CaptureCheck NPC after 30 seconds.
===================================================
===================================================
Line Cannon/Carpet Bomb cannon: Pastebin
Description: A really cool small script, It was the last script i made. Its very compact and probably the best script I've made. What it does is; a player clicks a Go object while targeting another enemy player, and the cannon will explode the area X amount of times (Depending on the set variable) between the cannon and the target in a straight line, Then you can have a finishing big spell when it hits the target.
Heres a movie link
Notes: It may not work depending on if UNIT_FIELD_TARGET is a different number in your core.
===================================================
===================================================
Massive Gurubashi Event: Pastebin:
Description: This was one of my first scripts, Its quite sloppy but i'd still suggest reading through it as the Boss fights (Especially Sylvanas) are very neat. (For that it starts at line 1313)
Notes: This script was my first, so there is a lot of sloppy code. The massive amount of variables is probably whats going to make it awful to read through. I'll still throw it up here though.
Extras: This is the Horde raid boss fight i never finished. It still has a great concept although i couldn't figure out what path would be hard / easy mode: Pastebin
If you want to finish off the script and need an idea to another epic boss fight This is:What i was going to do
===================================================
===================================================
Gurubashi Spirit Guide:
This was just an idea (NOT TESTED) To have a spirit guide in Gurubashi. Its a small piece of code so I'll just post it here.
Code:
local SpiritCount = 0
function SpiritGuide_OnLoad(Unit, Event)
Unit:RegisterEvent("Gurubashi_IntervalRes", 1000, 0)
end
function Gurubashi_IntervalRes(Unit, Event)
SpiritCount = SpiritCount + 1
local tblInRangePlayers = Unit:GetInRangePlayers()
for i, v in pairs(tblInRangePlayers) do
if v:IsDead() == true then
if Unit:GetDistance(v) <= 225 then
if (SpiritCount == 10) then
v:ResurrectPlayer()
v:SetHealthPct(100)
SpiritCount = 0
elseif (SpiritCount == 5) then
v:SendBroadcastMessage("You will be resurected in 5 seconds")
elseif (SpiritCount == 0) then
v:SendBroadcastMessage("You will be resurected in 10 seconds")
end
elseif Unit:GetDistance(v) >= 225
if Unit:GetDistance(v) <= 1000 then
local x=Unit:GetX()
local y=Unit:GetY()
local z=Unit:GetZ()
v:Teleport(0, x, y, z)
end
end
end
end
end
end
===================================================
Hopefully these will be useful in some way or another, whether you use them, or learn from them.
Enjoy =).
08-22-2009 Is when i posted this (August 22nd). Anyway, I quit and I'm back again o.0.
Its been quite a long time... I'm reading through these and i feel so nooby =D