shadowslayer133
24-03-10, 05:52 PM
Based off of Stoneharry's intro idea. I composed a script for a horde intro.
go into playercreate_info and set intro to 0
I also reccomend placing the starting zone area above the ground, just for a little bit of effect.
and then put this script into your scripts folder.
Create two creatures with the entry IDs of
99887
99888
then spawn them close to the starting area.
http://www.youtube.com/watch?v=5PpULoDMY7o
local PlayerB = nil
local NPC_SPAWNER_C = nil
local NPC_SPAWNER_D = nil
function NPCGIA_GJOEAOJG_HXOJZ(pUnit, Event)
NPC_SPAWNER_C = pUnit
end
RegisterUnitEvent(99887, 18, "NPCGIA_GJOEAOJG_HXOJZ")
function NPCGIA_GJOEAOJG_HXOJ_ZZ(pUnit, Event)
NPC_SPAWNER_D = pUnit
end
RegisterUnitEvent(99888, 18, "NPCGIA_GJOEAOJG_HXOJ_ZZ")
function zzz_OnFirstEnterWorldZ(event, pPlayer) -- When they first enter world
if PlayerB == nil then
local race = pPlayer:GetPlayerRace()
if race == 2 or race == 5 or race == 6 or race == 8 or race == 10 then
pPlayer:Emote(12)
pPlayer:CastSpell(50010)
pPlayer:CastSpell(30237)
pPlayer:CastSpell(60342)
pPlayer:SetPlayerLock(1)
pPlayer:MovePlayerTo(pPlayer:GetX(),pPlayer:GetY() ,pPlayer:GetZ()+0.1, pPlayer:GetO(), 12288)
pPlayer:CastSpell(50010)
pPlayer:CastSpell(30237)
pPlayer:CastSpell(60342)
pPlayer:CastSpell(63893)
PlayerB = pPlayer
RegisterTimedEvent("TesttestTesttestTest_zzogjeZ", 4000, 1)
RegisterTimedEvent("TesttestTesttestTest_zzogje_zZ", 500, 2)
else
PlayerB = nil
end
else
pPlayer:RemoveAura(50010)
pPlayer:RemoveAura(30237)
pPlayer:RemoveAura(60342)
pPlayer:RemoveAura(63893)
end
end
function TesttestTesttestTest_zzogje_zZ(pUnit, Event)
PlayerB:CastSpell(60342)
end
function TesttestTesttestTest_zzogjeZ(pUnit, Event)
NPC_SPAWNER_C:SendChatMessage(12,0,"The Lich King sent us another one!")
NPC_SPAWNER_C:ChannelSpell(51361, PlayerB) -- Visual
NPC_SPAWNER_D:ChannelSpell(51361, PlayerB) -- Visual
NPC_SPAWNER_C:RegisterEvent("SayHelloToMyLittleFriend_Z_z_ZZ", 5000, 1)
end
function SayHelloToMyLittleFriend_Z_z_ZZ(pUnit, Event)
local Name = PlayerB:GetName()
NPC_SPAWNER_D:SendChatMessage(12, 0, "Haha "..Name.."! Your lucky to have been chosen by the Lich King to deal with the alliance.")
NPC_SPAWNER_C:RegisterEvent("CastReviveVisualThingyTeheTeheTeheZ", 4000, 1)
end
function CastReviveVisualThingyTeheTeheTeheZ(pUnit, Event)
NPC_SPAWNER_C:StopChannel()
NPC_SPAWNER_D:StopChannel()
NPC_SPAWNER_D:FullCastSpellOnTarget(37755, PlayerB)
NPC_SPAWNER_C:FullCastSpellOnTarget(37755, PlayerB)
NPC_SPAWNER_C:RegisterEvent("LetPlayerMoveaogyaoheaZ", 2400, 1)
end
function LetPlayerMoveaogyaoheaZ(pUnit, Event)
PlayerB:SetPlayerLock(0)
PlayerB:CastSpell(21074)
PlayerB:RemoveAura(50010)
PlayerB:RemoveAura(30237)
PlayerB:RemoveAura(60342)
PlayerB:RemoveAura(63893)
NPC_SPAWNER_C:SendChatMessage(12, 0, "You are all set to go, slay the alliance scum in the name of the Lich King!")
NPC_SPAWNER_C:RegisterEvent("MassDespawnAndResetoajphaeZ", 1000, 1)
end
function MassDespawnAndResetoajphaeZ(pUnit, Event)
PlayerB = nil
end
RegisterServerHook(3, "zzz_OnFirstEnterWorldZ")
Cool :3 Thanks for contributing +Rep
shadowslayer133
24-03-10, 06:05 PM
Thanks, I'll post the youtube video once its done uploading
stoneharry
30-03-10, 01:41 PM
All you did was change text and race ids... Visuals + code + timers is exactly the same, this is my horde version:
http://www.youtube.com/watch?v=OQqDptYGf00
It's quite nice. & Stone, we'll look through that.
StickyIcky
30-03-10, 03:13 PM
That shit is COOL as **** stoneharry...
All you did was change text and race ids... Visuals + code + timers is exactly the same, this is my horde version:
http://www.youtube.com/watch?v=OQqDptYGf00
Jesus christ stone, i remember when you were still learning and now your ****ing a thousand times better then me.
+rep for epic video
& You havn't even seen his alliance leveling thingy preview than..
StickyIcky
30-03-10, 08:32 PM
I wanna make this in C++ for my server...
Stoneharry, can you hook up the LUA script?
stoneharry
31-03-10, 03:08 AM
http://www.youtube.com/watch?v=rRDK9PyigxU
^ That shows the original Alliance intro.
For both scripts combined into one:
local PlayerA
local NPC_SPAWNER_A
local NPC_SPAWNER_B
local PlayerB
local NPC_A
local NPC_B
local Count = 0
function NPCGIA_GJOEAOJG_HXOJ(pUnit, Event)
NPC_SPAWNER_A = pUnit
end
RegisterUnitEvent(99955, 18, "NPCGIA_GJOEAOJG_HXOJ")
function NPCGIA_GJOEAOJG_HXOJ_Z(pUnit, Event)
NPC_SPAWNER_B = pUnit
end
RegisterUnitEvent(99954, 18, "NPCGIA_GJOEAOJG_HXOJ_Z")
function GHOUL_SPAWNED_CARION(pUnit, Event)
NPC_A = pUnit
end
RegisterUnitEvent(26515, 18, "GHOUL_SPAWNED_CARION")
function NECROMANCER_MASTER_SPAWN(pUnit, Event)
NPC_B = pUnit
end
RegisterUnitEvent(232771, 18, "NECROMANCER_MASTER_SPAWN")
function zzz_OnFirstEnterWorld(event, pPlayer)
local race = pPlayer:GetPlayerRace() -- We get the race of the person that we shall use
if race == 1 or race == 3 or race == 4 or race == 7 or race == 11 then -- THIS IS THE ALLIANCE RACES, change to what you want.
if PlayerA == nil then
pPlayer:CastSpell(50010) -- Visual
pPlayer:CastSpell(53658) -- Visual
pPlayer:SetPlayerLock(1) -- Stop him moving
pPlayer:MovePlayerTo(pPlayer:GetX(),pPlayer:GetY() ,pPlayer:GetZ()+0.1, pPlayer:GetO(), 12288) -- Move him slightly to play client side effects and shizzle
pPlayer:CastSpell(50010) -- More visuals
pPlayer:CastSpell(28330) -- More visuals
pPlayer:CastSpell(53658) -- More visuals
PlayerA = pPlayer -- Here we tell the script we are now using a player
RegisterTimedEvent("TesttestTesttestTest_zzogje", 4000, 1) -- players cant register events so we use a world event
RegisterTimedEvent("TesttestTesttestTest_zzogje_z", 500, 2) -- See above
end
else
if PlayerB == nil then -- Horde
pPlayer:SetPlayerLock(1)
pPlayer:CastSpell(46940) -- Bleed
pPlayer:SetStandState(7)
PlayerB = pPlayer
RegisterTimedEvent("GHOUL_PLAY_EMOTE", 1000, 1)
RegisterTimedEvent("GHOUL_PLAY_EMOTE_STOP", 5000, 1)
end
end
end
function GHOUL_PLAY_EMOTE(pUnit, Event)
NPC_A:Emote(398, 10000)
NPC_B:SetNPCFlags(1)
--PlayerB:CastSpell(57626) -- Feign Death
end
function GHOUL_PLAY_EMOTE_STOP(pUnit, Event)
NPC_B:SendChatMessage(12,0,"What have you found ghoul?")
NPC_B:MoveTo(-6431, -2047, 260.5, 2.605783)
NPC_B:RegisterEvent("Hangon_A_Moment_nubcake", 4700, 1)
end
function Hangon_A_Moment_nubcake(pUnit, Event)
NPC_B:SendChatMessage(12,0,"Ah.. I should be able to save this creature.")
NPC_B:Emote(1, 4000)
PlayerB:SetStandState(0)
NPC_B:RegisterEvent("Hangon_A_Moment_nubcake_z", 4500, 1)
end
function Hangon_A_Moment_nubcake_z(pUnit, Event)
NPC_B:ChannelSpell(57797, PlayerB)
PlayerB:SetStandState(0)
NPC_B:RegisterEvent("Hangon_A_Moment_nubcake_zz", 6000, 1)
end
function Hangon_A_Moment_nubcake_zz(pUnit, Event)
NPC_B:StopChannel()
PlayerB:SetStandState(0)
NPC_B:SendChatMessage(12,0,"Your fine. Get up, you look pathetic... Come on, try and move!")
PlayerB:SendBroadcastMessage("Hint: Try to move left or right to stand up.")
PlayerB:SendAreaTriggerMessage("Hint: Try to move left or right to stand up.")
PlayerB:SetPlayerLock(0)
PlayerB:RemoveAura(46940) -- Bleed
PlayerB:CastSpell(61126)
NPC_B:RegisterEvent("Hangon_A_Moment_nubcake_zzz", 3000, 1)
end
function Hangon_A_Moment_nubcake_zzz(pUnit, Event)
PlayerB = nil
NPC_B:SetNPCFlags(2)
NPC_B:ReturnToSpawnPoint()
end
-- Below is alliance shit
function TesttestTesttestTest_zzogje_z(pUnit, Event)
PlayerA:CastSpell(53658) -- Some random visual because moving them is buggy and disables it
end
function TesttestTesttestTest_zzogje(pUnit, Event)
--[[if NPC_SPAWNER_A == nil then -- if 1 is nil
NPC_SPAWNER_A = PlayerA:GetCreatureNearestCoords(-8399, -2772.4, 194.8, 99955)
if NPC_SPAWNER_A == nil then -- still nil reset
PlayerA:RemoveAura(53658)
playerA:RemoveAura(28330)
PlayerA = nil
else -- otherwise we have value
if NPC_SPAWNER_B == nil then -- if 2 is nil
PlayerA:GetCreatureNearestCoords(-8402, -2765.85, 195, 99954)
if NPC_SPAWNER_B == nil then -- still nil
PlayerA:RemoveAura(53658)
playerA:RemoveAura(28330)
PlayerA = nil
else -- otherwise
NPC_SPAWNER_A:SendChatMessage(12,0,"We got another live one!") -- ok, our first npc is doing something
NPC_SPAWNER_A:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_B:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_A:RegisterEvent("SayHelloToMyLittleFriend_Z_z_Z", 5000, 1) -- now we can use the npc to control the event rather than the idiotic world event
end
else
NPC_SPAWNER_A:SendChatMessage(12,0,"We got another live one!") -- ok, our first npc is doing something
NPC_SPAWNER_A:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_B:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_A:RegisterEvent("SayHelloToMyLittleFriend_Z_z_Z", 5000, 1) -- now we can use the npc to control the event rather than the idiotic world event
end
end
else
if NPC_SPAWNER_B == nil then -- if 2 is nil
PlayerA:GetCreatureNearestCoords(-8402, -2765.85, 195, 99954)
if NPC_SPAWNER_B == nil then -- still nil
PlayerA:RemoveAura(53658)
playerA:RemoveAura(28330)
PlayerA = nil
else -- otherwise
NPC_SPAWNER_A:SendChatMessage(12,0,"We got another live one!") -- ok, our first npc is doing something
NPC_SPAWNER_A:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_B:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_A:RegisterEvent("SayHelloToMyLittleFriend_Z_z_Z", 5000, 1) -- now we can use the npc to control the event rather than the idiotic world event
end
else
]]
-- All of the above code was me trying to debug what I found out to be Tikki's idiotic copy + paste on spawn functions >_< RRAGGEEEEE
NPC_SPAWNER_A:SendChatMessage(12,0,"We got another live one!") -- ok, our first npc is doing something
NPC_SPAWNER_A:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_B:ChannelSpell(51361, PlayerA) -- Visual
NPC_SPAWNER_A:RegisterEvent("SayHelloToMyLittleFriend_Z_z_Z", 5000, 1) -- now we can use the npc to control the event rather than the idiotic world event
--end
--end
end
RegisterServerHook(3, "zzz_OnFirstEnterWorld") -- Register the on first enter world
function SayHelloToMyLittleFriend_Z_z_Z(pUnit, Event)
local Name = PlayerA:GetName() -- Get his name
NPC_SPAWNER_B:SendChatMessage(12, 0, "Woah, are you alright "..Name.."? Your lucky to be alive! Here let me give you a hand.") -- Send a message including his name
NPC_SPAWNER_A:RegisterEvent("CastReviveVisualThingyTeheTeheTehe", 4000, 1) -- next event
end
function CastReviveVisualThingyTeheTeheTehe(pUnit, Event)
NPC_SPAWNER_A:StopChannel() -- stop it
NPC_SPAWNER_B:StopChannel() -- stop it
NPC_SPAWNER_B:FullCastSpellOnTarget(37755, PlayerA) -- ress visual
NPC_SPAWNER_A:FullCastSpellOnTarget(37755, PlayerA) -- ress visual
NPC_SPAWNER_A:RegisterEvent("LetPlayerMoveaogyaohea", 2400, 1) -- reset player
end
function LetPlayerMoveaogyaohea(pUnit, Event)
PlayerA:SetPlayerLock(0) -- let the player move
PlayerA:CastSpell(21074) -- ress visual
PlayerA:RemoveAura(50010) -- delete visual
PlayerA:RemoveAura(28330) -- delete visual
PlayerA:RemoveAura(53658) -- delete visual
NPC_SPAWNER_A:SendChatMessage(12, 0, "There we go! You should go see if you can help around the camp now.") -- ohai a message
NPC_SPAWNER_A:RegisterEvent("MassDespawnAndResetoajphae", 1000, 1) -- reset event
end
function MassDespawnAndResetoajphae(pUnit, Event)
PlayerA = nil -- All we need to do is say that the slot for a creating character is nil again
end
P1raten
31-03-10, 03:48 AM
What do you use the variable Count for? :) always wondered.
stoneharry
31-03-10, 12:26 PM
Nothing, it was originally when I was testing the script with ~5 people logging in at once etc and I needed to count the amount of times it was triggered and such.
StickyIcky
31-03-10, 02:09 PM
This is awesome
I'll release my C++ version when i'm done...Thanks Stone!
shadowslayer133
04-04-10, 02:37 AM
All you did was change text and race ids... Visuals + code + timers is exactly the same, this is my horde version:
http://www.youtube.com/watch?v=OQqDptYGf00
I said in the post it was off your idea
stoneharry
05-04-10, 12:23 PM
I said in the post it was off your idea
An idea is not a script. It's not even based of the script. It's an altered script. :p
.SalMAX™
08-04-10, 12:46 AM
Stoneharry. I have to say this your scripts are amazing I mean you never disappoint anyone when you post your Scripts this out of all I like. I can't wait to see what else you have in store. So please keep up the good work. And to Shadowslayer1333 Good Script and Release.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.