BST Reward - Poultice Regen and Roborant Erase

Post Reply
Tenbatsu
Posts: 2
Joined: Fri Apr 12, 2013 9:53 am

BST Reward - Poultice Regen and Roborant Erase

Post by Tenbatsu » Fri Apr 12, 2013 10:44 am

This patch applies the 1% hp/tic for BST pets from poultice and also adds the erase from Roborant.

Thanks to Teven for this.

Code: Select all

Index: reward.lua
===================================================================
--- reward.lua	(revision 3257)
+++ reward.lua	(working copy)
@@ -10,20 +10,45 @@
 -- OnUseAbility
 -----------------------------------
 
-function OnAbilityCheck(player,target,ability)
+function OnAbilityCheck(player,target,ability)
 	if (player:getPet() == nil) then
 		return MSGBASIC_REQUIRES_A_PET,0;
 	else
 		local id = player:getEquipID(SLOT_AMMO);
-		if(id >= 17016 and id <= 17023) then
+		if(id >= 17016 and id <= 17023 or id == 19252) then
 			player:setBattleSubTarget(player:getPet());
 			return 0,0;
+		elseif(id == 19251) then
+		local pet = player:getPet();
+			player:setBattleSubTarget(player:getPet());
+			pet:delStatusEffect(EFFECT_PARALYSIS);
+			pet:delStatusEffect(EFFECT_POISON);
+			pet:delStatusEffect(EFFECT_BLINDNESS);
+			pet:delStatusEffect(EFFECT_WEIGHT);
+			pet:delStatusEffect(EFFECT_SLOW);
+			pet:delStatusEffect(EFFECT_SILENCE);
+			pet:delStatusEffect(EFFECT_CHOKE);
+			pet:delStatusEffect(EFFECT_RASP);
+			pet:delStatusEffect(EFFECT_PLAGUE);
+			pet:delStatusEffect(EFFECT_DISEASE);
+			pet:delStatusEffect(EFFECT_FROST);
+			pet:delStatusEffect(EFFECT_BURN);
+			pet:delStatusEffect(EFFECT_STUN);
+			pet:delStatusEffect(EFFECT_PETRIFICATION);
+			pet:delStatusEffect(EFFECT_ADDLE);
+			pet:delStatusEffect(EFFECT_BIND);
+			pet:delStatusEffect(EFFECT_CURSE_I);
+			pet:delStatusEffect(EFFECT_CURSE_II);
+			pet:delStatusEffect(EFFECT_ATTACK_DOWN);
+			pet:delStatusEffect(EFFECT_DEFENSE_DOWN);
+			return 0;
 		else
+
 			return MSGBASIC_MUST_HAVE_FOOD,0;
 		end
-	end
-end;
-
+	end
+end;
+
 function OnUseAbility(player, target, ability)
 
 	-- 1st need to get the pet food is equipped in the range slot.
@@ -94,6 +119,14 @@
 			regenAmount = 20;
 			totalHealing = math.floor(minimumHealing + 4*(playerMnd-55));
 			end,
+		[19252] = function (x) -- pet poultice
+			-- printf("Food: pet Poultice.");
+			minimumHealing = 0;
+			regenAmount = math.floor(petMaxHP / 100);
+			totalHealing = 0;
+			regenTime = 300;
+			end,
+
 	}
Attachments
reward.lua.patch
Adds poultice regen and roborant erase for BST reward.
(2.08 KiB) Downloaded 181 times

Post Reply