Potion Script 4 all Classes
Posted: Thu Jul 13, 2017 11:11 am
Does one have a working script for all classes?
AION Patch 5.0+ Pots
for example: Sorcerer?
thanks :3
AION Patch 5.0+ Pots
for example: Sorcerer?
thanks :3
Code: Select all
function CheckPotion()
-- Retrieve the potion item.
local PotionLife = InventoryList:GetInventory( "Enhanced Recovery Serum" );
local PotionMana = InventoryList:GetInventory( "[Jakunerk] Mana Serum" );
-- Check if Currenthealth < 0.5 and uses a Life Potion.
if Player:GetHealthCurrent() < Player:GetHealthMaximum() / 2 and PotionLife ~= nil and PotionLife:GetCooldown() == 0 then
PlayerInput:Inventory( PotionLife:GetName());
return false;
end
-- Check if CurrentMana < 0.5 and uses a Mana Potion.
if Player:GetManaCurrent() < Player:GetManaMaximum() / 2 and PotionMana ~= nil and PotionMana:GetCooldown() == 0 then
PlayerInput:Inventory( PotionMana:GetName());
return false;
end
end
Code: Select all
self:CheckPotion();
Code: Select all
-- Check if this is a life potion
if string.find( Inventory:GetName(), "Design" ) == nil and ( string.find( Inventory:GetName(), "Recovery Potion" ) ~= nil or string.find( Inventory:GetName(), "Recovery Potion" ) ~= nil ) then
if string.find( Inventory:GetName(), "Fortified" ) ~= nil then
if TotalRecharge >= 2480 and BestRecharge < 2480 then
BestInventory = Inventory;
BestRecharge = 2480;
end
elseif string.find( Inventory:GetName(), "Enhanced" ) ~= nil then
if TotalRecharge >= 1540 and BestRecharge < 1540 then
BestInventory = Inventory;
BestRecharge = 1540;
end