Skip to content

Commit 8842196

Browse files
authored
fix(npc): Cipfried and Dallheim don't cure burning (#4096)
Update Cipfried and Dallheim so their free healing dialogue also handles players affected by CONDITION_FIRE. Root cause: - Both NPCs already offered free healing but only checked CONDITION_POISON. - Burning players could request healing and still receive the normal healthy response while remaining on fire. - Other healer NPCs such as Quentin, Alia, Amanda, Azalea, and Cedrik already handle fire conditions. Main changes: - Add a heal branch for CONDITION_FIRE to Cipfried. - Add the same fire-healing behavior to Dallheim. - Check the fire condition before the poison branch. - Restore player health up to 65 when required. - Remove CONDITION_FIRE. - Show CONST_ME_MAGIC_GREEN after healing. - Preserve the existing poison-healing behavior unchanged. Behavior: - Burning players now receive the appropriate healing response. - Fire is removed when requesting healing from either NPC. - Players below 65 health are restored up to 65 health. - Poison treatment continues to work as before. This brings Cipfried and Dallheim in line with the existing healer NPC behavior and fixes a noticeable issue for players in Rookgaard and starter areas.
1 parent 2ed962a commit 8842196

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

data-otservbr-global/npc/cipfried.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ keywordHandler:addAliasKeyword({ "wolves" })
133133
keywordHandler:addKeyword({ "adventure" }, StdModule.say, { npcHandler = npcHandler, text = "I can see a bright future for you... you will soon embark on a very big adventure and explore the world of {Tibia} - maybe even influence history!" })
134134
keywordHandler:addAliasKeyword({ "explore" })
135135

136+
keywordHandler:addKeyword({ "heal" }, StdModule.say, { npcHandler = npcHandler, text = "You are burning. Let me quench those flames." }, function(player)
137+
return player:getCondition(CONDITION_FIRE)
138+
end, function(player)
139+
local health = player:getHealth()
140+
if health < 65 then
141+
player:addHealth(65 - health)
142+
end
143+
player:removeCondition(CONDITION_FIRE)
144+
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
145+
end)
136146
keywordHandler:addKeyword({ "heal" }, StdModule.say, { npcHandler = npcHandler, text = "You are poisoned. I will help you." }, function(player)
137147
return player:getCondition(CONDITION_POISON)
138148
end, function(player)

data-otservbr-global/npc/dallheim.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,16 @@ keywordHandler:addKeyword({ "billy" }, StdModule.say, { npcHandler = npcHandler,
194194
keywordHandler:addAliasKeyword({ "willie" })
195195

196196
-- Healing
197+
keywordHandler:addKeyword({ "heal" }, StdModule.say, { npcHandler = npcHandler, text = "You are burning. Let me quench those flames." }, function(player)
198+
return player:getCondition(CONDITION_FIRE) ~= nil
199+
end, function(player)
200+
local health = player:getHealth()
201+
if health < 65 then
202+
player:addHealth(65 - health)
203+
end
204+
player:removeCondition(CONDITION_FIRE)
205+
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
206+
end)
197207
keywordHandler:addKeyword({ "heal" }, StdModule.say, { npcHandler = npcHandler, text = "You are poisoned. I will help you." }, function(player)
198208
return player:getCondition(CONDITION_POISON) ~= nil
199209
end, function(player)

0 commit comments

Comments
 (0)