123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- --[[
- Script Name : SpawnScripts/FarJourneyFreeport/HelmsmanNyles.lua
- Script Author : Premierio015
- Script Date : 2022.04.30 05:04:27
- Script Purpose : Bypasses Boat/tutorial and Zones players to their cities/starting areas
- :
- --]]
- dofile("SpawnScripts/Generic/SubClassToCommoner.lua")
- function spawn(NPC)
-
- end
- function hailed(NPC, Spawn)
- local conversation = CreateConversation()
- AddConversationOption(conversation, "Yes", "leave")
- AddConversationOption(conversation, "No")
- -- AddConversationOption(conversation, "Test Remove","Test")
- if GetClass(Spawn)>0 then
- AddConversationOption(conversation, "Wait, I'm just a commoner.\n\n[CLASSIC CLASS CHANGE TO COMMONER].","Commoner")
- end
-
- StartConversation(conversation, NPC, Spawn, "Head for land?\n[Leave The Far Journey?]")
- end
- function Test(NPC,Spawn)
- PlayFlavor(NPC, "", "Done", "", 0, 0, Spawn, 0)
- if HasQuest(Spawn, 524)then -- COMPLETES REMAINING QUEST STEPS (Replace w/ quest removal once we figure that out)
- RemovePlayerQuest(Spawn,524)
- end
- end
- function leave(NPC, Spawn)
- PlayFlavor(NPC, "", "The captain's gonna kill me for this...", "", 0, 0, Spawn, 0)
- if not HasItem(Spawn,185427) then -- GIVES THREADBARE TUNIC
- SummonItem(Spawn,185427,1,1)
- end
- if not HasItem(Spawn,20902) then -- GIVES SMALL BAG
- SummonItem(Spawn,20902,1,1)
- end
- if GetLevel(Spawn)<2 then --SET LEVEL TO 2
- SetPlayerLevel(Spawn,2)
- end
- if HasQuest(Spawn, 524)then -- COMPLETES REMAINING QUEST STEPS (Replace w/ quest removal once we figure that out)
- if GetQuestStep(Spawn,524)==1 then
- SetStepComplete(Spawn,524,1)
- SetStepComplete(Spawn,524,2)
- SetStepComplete(Spawn,524,3)
- SetStepComplete(Spawn,524,4)
- SetStepComplete(Spawn,524,5)
- SetStepComplete(Spawn,524,6)
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==2 then
- SetStepComplete(Spawn,524,2)
- SetStepComplete(Spawn,524,3)
- SetStepComplete(Spawn,524,4)
- SetStepComplete(Spawn,524,5)
- SetStepComplete(Spawn,524,6)
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==3 then
- SetStepComplete(Spawn,524,3)
- SetStepComplete(Spawn,524,4)
- SetStepComplete(Spawn,524,5)
- SetStepComplete(Spawn,524,6)
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==4 then
- SetStepComplete(Spawn,524,4)
- SetStepComplete(Spawn,524,5)
- SetStepComplete(Spawn,524,6)
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==5 then
- SetStepComplete(Spawn,524,5)
- SetStepComplete(Spawn,524,6)
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==6 then
- SetStepComplete(Spawn,524,6)
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==7 then
- SetStepComplete(Spawn,524,7)
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==8 then
- SetStepComplete(Spawn,524,8)
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==9 then
- SetStepComplete(Spawn,524,9)
- SetStepComplete(Spawn,524,10)
- end
- if GetQuestStep(Spawn,524)==10 then
- SetStepComplete(Spawn,524,10)
- end
- end
- AddTimer(NPC,3300,"ToShore",1,Spawn)
- end
- function ToShore(NPC, Spawn)
- if HasItem(Spawn,9357) then --REMOVES Mariner's Charm
- RemoveItem(Spawn,9357,1)
- end
- if HasItem(Spawn,15354) then
- RemoveItem(Spawn,15354,1) --REMOVES Waulon's Hat
- end
- if HasItem(Spawn,12565) then --REMOVES Shard of Luclin
- RemoveItem(Spawn,12565,1)
- end
- if GetClass(Spawn) == 0 then
- ZoneRef = GetZone("IsleRefuge1")
- Zone(ZoneRef,Spawn)
- elseif GetDeity(Spawn) == 0 then
- ZoneRef = GetZone("OutpostOverlord")
- Zone(ZoneRef,Spawn)
-
- elseif GetDeity(Spawn) == 1 then
- ZoneRef = GetZone("QueensColony")
- Zone(ZoneRef,Spawn)
- end
- end
- function respawn(NPC)
- spawn(NPC)
- end
- function Commoner(NPC, Spawn)
- local conversation = CreateConversation()
- AddConversationOption(conversation, "Yes, I am a Commoner.", "Commoner2")
- AddConversationOption(conversation, "Nevermind.")
- StartConversation(conversation, NPC, Spawn, "Are you sure? This can't be undone. We'll take you to The Isle of Refuge if that is the case.")
- end
- function Commoner2(NPC, Spawn)
- PlayFlavor(NPC, "", "Well, so ya are. Let me help you with that.", "", 0, 0, Spawn, 0)
- RemoveGear(NPC,Spawn)
- SetAdventureClass(Spawn,0)
- SendMessage(Spawn, "You are now a Commoner.")
- SendPopUpMessage(Spawn, "You are now a Commoner.", 255, 255, 255)
- if GetTradeskillClass(Spawn)>0 then
- SetTradeskillClass(Spawn,0)
- end
- end
|