Pārlūkot izejas kodu

FarJourneyFreeport disabling targetable and ChangeHandIcon for treasure chests (WIP)

image 4 gadi atpakaļ
vecāks
revīzija
a7a6d9b7a4

+ 1 - 0
server/Quests/FarJourneyFreeport/TasksaboardtheFarJourney.lua

@@ -109,6 +109,7 @@ function CurrentStep(Quest, QuestGiver, Player)
 			spawn = GetSpawnFromList(spawns, i-1)
 			if spawn then
 				ChangeHandIcon(spawn, 1)
+				SpawnSet(NPC, "targetable", 1, true, true)
 			end
 			i = i + 1
 		until spawn == Nil

+ 7 - 0
server/SpawnScripts/FarJourneyFreeport/atreasurechest.lua

@@ -7,7 +7,12 @@
 --]]
 
 function spawn(NPC)
+	ChangeHandIcon(NPC, 0)
+	SpawnSet(NPC, "targetable", 0, true, true)
+end
 
+function respawn(NPC)
+	spawn(NPC)
 end
 
 function open(NPC, Player)
@@ -20,6 +25,8 @@ function open(NPC, Player)
 		SetTutorialStep(player, 16)
 	else
 		DisplayText(Player, 12, "This box is empty.")
+		ChangeHandIcon(NPC, 0)
+		SpawnSet(NPC, "targetable", 0, true, true)
 	end
 end