[b30] Prox can drown without dropping note. patch included

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

[b30] Prox can drown without dropping note. patch included

#1 Post by tiger_eye »

Prox can die by drowning, in which case he may not drop the final note. Here is a patch to ensure the note gets dropped:

Code: Select all

Index: game/modules/tome/data/zones/trollmire/npcs.lua
===================================================================
--- game/modules/tome/data/zones/trollmire/npcs.lua	(revision 3922)
+++ game/modules/tome/data/zones/trollmire/npcs.lua	(working copy)
@@ -77,6 +77,14 @@
 	end,
 
 	on_die = function(self, who)
+		--force the note to drop if it hasn't dropped already (such as if he died via drowning)
+		if self.on_takehit then
+			local n = game.zone:makeEntityByName(game.level, "object", "PROX_NOTE")
+			if n then
+				self.on_takehit = nil
+				game.zone:addEntity(game.level, n, "object", self.x, self.y)
+			end
+		end
 		game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!")
 		game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire")
 	end,
Attachments
prox_drown_note.txt
(843 Bytes) Downloaded 91 times

Final Master
Sher'Tul
Posts: 1022
Joined: Fri May 21, 2010 8:16 pm
Location: Inside the minds of all
Contact:

Re: [b30] Prox can drown without dropping note. patch inclu

#2 Post by Final Master »

That's actually quiet true as he is suppose to drop it once his hp hits a certain point. Good fix tiger!
Final Master's Character Guides
Final Master's Guide to the Arena
Edge: Final Master... official Tome 4 (thread) necromancer.
Zonk: I'd rather be sick than on fire! :D

Post Reply