[Request Lua] Orc Battlefield Quest menu

User Tag List

Results 1 to 11 of 11
  1. #1
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Request Lua] Orc Battlefield Quest

    Hey guys, I'm here to ask for a mega big and awesome script. Since I'm a beginner Lua scripter but my server has high demands on lua quests, I decided to ask you guys for help. The lua is to contain the following for Rep:

    • Mounting of a Horde Demolisher upon accepting quest id 94000.
    • Spawn one npc in multipule places (Battle feeling) Npc Ids: 94003, 94010,94011, 94006
    • Dismount Player from Demolisher after quest 94000 is complete. Keep army spawned
    • After quest id 94001 is accepted, Alliance Catapults appear, npc id: 94012
    • Army respawns over and over.
    • Upon accepting quest id: 94000, a song starts playing: Put a sign in the song numbers place and put a note what I need to replace.
    • Song repeats playing untill forced to stop at the end of completeing quest id: 94001
    • At beginning of quest accept 94000, npc 94004 says: Scouting of Alliance Forces, prepare for battle!
    • After npc 94004 says his line, npc 94000 says: Go recruit, help us fight off the Alliance from Durotar.


    That's it. It seems like a lot but for an expert Lua scripting its an estimated 10 mins of work for 3 reps. Thanks guys

    [Request Lua] Orc Battlefield Quest
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I'll do this later if nobody else does. Busy atm.

  3. #3
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ty Stoneharry, also forgot to mention. Npc 94003, 94010,94011, 94006 are suppose to disappear after quest complete 94001.

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I gave this script a shot, however the logic behind it is not clear. Also it would be much, much more effective to do this via phasing. Npc's appearing/disappearing depending on quest + respawning? Phasing sounds perfect to me.

    Phase 1 is default, phase 2 is a separate realm. So when quest is accepted, change to phase 3 (you can see 1 and 2) but have the enemies and the vehicle in phase 2. That way it works as normal but you can only see them on the quest.

    However I have not used phasing in the basic script I have created so far, let me know what you want to do and I can fix up the script to your liking:

    Code:
    local Call = nil
    
    function OnQuestAccept(event, plr, questId, pUnit)
    	if (questId == 94000) then
    		plr:SetMount(1) -- Mount(displayID) - ArcEmu does not support vehicles by default
    		pUnit:SpawnCreature(94003, x, y, z, o, faction, 0) -- Fill this in
    		pUnit:SpawnCreature(94010, x, y, z, o, faction, 0) -- Fill this in
    		pUnit:SpawnCreature(94011, x, y, z, o, faction, 0) -- Fill this in
    		pUnit:SpawnCreature(94006, x, y, z, o, faction, 0) -- Fill this in
    		pUnit:PlaySoundToSet(soundID) -- Fill this in
    		RegisterTimedEvent("Check_If_Player_On_Quest", 120000, 0, plr) -- 120000 = 120 seconds = 2mins, change to duration of song
    		Call:SendChatMessage(12,0,"Alliance scouted, prepare for battle!")
    		RegisterTimedEvent("Let_The_Main_Guy_Talk_quest", 4000, 1, pUnit)
    	elseif (questId == 94001) then
    		pUnit:SpawnCreature(94012, x, y, z, o, faction, 0) -- Fill this in
    	end
    end
    
    function zzz_OnQuestFinished(event, plr, QuestId, pQuestGiver)
    	if (QuestId == 94000) then
    		plr:Dismount() -- Reset
    	end
    end
    
    RegisterServerHook(14, "zzz_OnQuestAccept")
    RegisterServerHook(22, "zzz_OnQuestFinished")
    
    function OnSpawn_Define_ToCall(pUnit, Event)
    	Call = pUnit
    end
    
    RegisterUnitEvent(94004, 18, "OnSpawn_Define_ToCall")
    
    function Check_If_Player_On_Quest(plr)
    	if plr ~= nil then
    		if plr:HasQuest(94000) then
    			plr:PlaySoundToSet(soundID) -- Play Sound
    		else
    			RemoveTimedEvents()
    		end
    	else
    		RemoveTimedEvents()
    	end
    end
    
    function Let_The_Main_Guy_Talk_quest(pUnit)
    	pUnit:SendChatMessage(12,0,"Go recruit, help us fight off the Alliance from Durotar.")
    end
    
    --[[
    Mounting of a Horde Demolisher upon accepting quest id 94000.
    Spawn one npc in multipule places (Battle feeling) Npc Ids: 94003, 94010,94011, 94006
    Dismount Player from Demolisher after quest 94000 is complete. Keep army spawned
    After quest id 94001 is accepted, Alliance Catapults appear, npc id: 94012
    Army respawns over and over. -- NOT DONE
    Upon accepting quest id: 94000, a song starts playing: Put a sign in the song numbers place and put a note what I need to replace.
    Song repeats playing untill forced to stop at the end of completeing quest id: 94001
    At beginning of quest accept 94000, npc 94004 says: Scouting of Alliance Forces, prepare for battle!
    After npc 94004 says his line, npc 94000 says: Go recruit, help us fight off the Alliance from Durotar.
    
    Npc 94003, 94010,94011, 94006 are suppose to disappear after quest complete 94001.
    ]]
    I highly recommend the use of phasing! Without it this quest would be messy and buggy, however with it, it would be fluent and look good.

  5. #5
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Say I wanted to use phase, could you script the new script without spawning of npcs? Just replace the spawning of npcs with changing phases on accepting quests plz. and then it will be perfect and full of rep.

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Is the second NPC that sends the message already spawned (permanently)?

    So far:

    Code:
    local Call = nil
    
    function OnQuestAccept(event, plr, questId, pUnit)
    	if (questId == 94000) then
    		plr:SetMount(1) -- Mount(displayID) - ArcEmu does not support vehicles by default
    		plr:SetPhase(3) -- 1 (default) and 2
    		pUnit:PlaySoundToSet(soundID) -- Fill this in, it's the sound ID of the song
    		RegisterTimedEvent("Check_If_Player_On_Quest", 120000, 0, plr) -- 120000 = 120 seconds = 2mins, change to duration of song
    		Call:SendChatMessage(12,0,"Alliance scouted, prepare for battle!")
    		RegisterTimedEvent("Let_The_Main_Guy_Talk_quest", 4000, 1, pUnit)
    	elseif (questId == 94001) then
    		pUnit:SpawnCreature(94012, x, y, z, o, faction, 0) -- Fill this in, npc that spawns on next quest
    	end
    end
    
    function zzz_OnQuestFinished(event, plr, QuestId, pQuestGiver)
    	if (QuestId == 94000) then
    		plr:Dismount() -- Reset
    		plr:SetPhase(1) -- Back to normal
    	end
    end
    
    RegisterServerHook(14, "zzz_OnQuestAccept")
    RegisterServerHook(22, "zzz_OnQuestFinished")
    
    function OnSpawn_Define_ToCall(pUnit, Event)
    	Call = pUnit
    end
    
    RegisterUnitEvent(94004, 18, "OnSpawn_Define_ToCall")
    
    function Check_If_Player_On_Quest(plr)
    	if plr ~= nil then
    		if plr:HasQuest(94000) then
    			plr:PlaySoundToSet(soundID) -- Play Sound ID
    		else
    			RemoveTimedEvents()
    		end
    	else
    		RemoveTimedEvents()
    	end
    end
    
    function Let_The_Main_Guy_Talk_quest(pUnit)
    	pUnit:SendChatMessage(12,0,"Go recruit, help us fight off the Alliance from Durotar.")
    end
    
    --[[
    Mounting of a Horde Demolisher upon accepting quest id 94000.
    Spawn one npc in multipule places (Battle feeling) Npc Ids: 94003, 94010,94011, 94006
    Dismount Player from Demolisher after quest 94000 is complete. Keep army spawned
    After quest id 94001 is accepted, Alliance Catapults appear, npc id: 94012
    Army respawns over and over. -- NOT DONE
    Upon accepting quest id: 94000, a song starts playing: Put a sign in the song numbers place and put a note what I need to replace.
    Song repeats playing untill forced to stop at the end of completeing quest id: 94001
    At beginning of quest accept 94000, npc 94004 says: Scouting of Alliance Forces, prepare for battle!
    After npc 94004 says his line, npc 94000 says: Go recruit, help us fight off the Alliance from Durotar.
    
    Npc 94003, 94010,94011, 94006 are suppose to disappear after quest complete 94001.
    You will need to fill parts in.

  7. #7
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes the second npc is already spawned, he is quest giver. And how does the vehicle thing work. Do they get abilities?

  8. #8
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    "Mounting of a Horde Demolisher upon accepting quest id 94000."
    ^
    ArcEmu does not support vehicles so I don't know how you want me to do this...

  9. #9
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    GOT IT, replace mounting demolisher with changing their displayid. Ill give them an item that they will use to cast the demolisher spells

  10. #10
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Code:
    local Call = nil
    
    function OnQuestAccept(event, plr, questId, pUnit)
    	if (questId == 94000) then
    		plr:SetModel(4) -- Change to DisplayID of demolisher
    		plr:SetPhase(3) -- 1 (default) and 2
    		pUnit:PlaySoundToSet(soundID) -- Fill this in, it's the sound ID of the song
    		RegisterTimedEvent("Check_If_Player_On_Quest", 120000, 0, plr) -- 120000 = 120 seconds = 2mins, change to duration of song
    		Call:SendChatMessage(12,0,"Alliance scouted, prepare for battle!")
    		RegisterTimedEvent("Let_The_Main_Guy_Talk_quest", 4000, 1, pUnit)
    	elseif (questId == 94001) then
    		pUnit:SpawnCreature(94012, x, y, z, o, faction, 0) -- Fill this in, npc that spawns on next quest
    	end
    end
    
    function zzz_OnQuestFinished(event, plr, QuestId, pQuestGiver)
    	if (QuestId == 94000) then
    		plr:Demorph()
    		plr:SetPhase(1) -- Back to normal
    	end
    end
    
    RegisterServerHook(14, "zzz_OnQuestAccept")
    RegisterServerHook(22, "zzz_OnQuestFinished")
    
    function OnSpawn_Define_ToCall(pUnit, Event)
    	Call = pUnit
    end
    
    RegisterUnitEvent(94004, 18, "OnSpawn_Define_ToCall")
    
    function Check_If_Player_On_Quest(plr)
    	if plr ~= nil then
    		if plr:HasQuest(94000) then
    			plr:PlaySoundToSet(soundID) -- Play Sound ID
    		else
    			RemoveTimedEvents()
    		end
    	else
    		RemoveTimedEvents()
    	end
    end
    
    function Let_The_Main_Guy_Talk_quest(pUnit)
    	pUnit:SendChatMessage(12,0,"Go recruit, help us fight off the Alliance from Durotar.")
    end
    That script does everything you want, however you will have to setup the enemies etc in the second phase through the DB (spawning in game while in phase 2).

  11. #11
    BanzBoyz77's Avatar Contributor
    Reputation
    83
    Join Date
    Aug 2010
    Posts
    258
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks mate, +rep

Similar Threads

  1. [Request Race] Orc Male -- felorc
    By pumkins in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 11-01-2007, 09:27 PM
  2. request: "REAL" Orc Male > UD Male
    By jpz109 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 08-07-2007, 06:32 PM
  3. [REQUEST] male orc -> noggenfogger
    By DemonSheep in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-09-2007, 08:48 PM
  4. {REQUEST} Gnome----> Orc or Fel Orc
    By Mongus in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 05-14-2007, 10:05 PM
  5. Simple request. Troll-Orc
    By Hultis in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 01-06-2007, 01:02 PM
All times are GMT -5. The time now is 12:13 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