But this is the Script in progress.
require("common\\common")
--
-- Example PLBot.
--
--
-- Configuration
--
-- Target your pling.
TargetName = "";
-- PL Class And Level, The one PLing.
PLClass = "";
PLLevel = 75;
-- This part of the configuration sets up the PL to use certain Cures
-- at a certain percent of hp of the Target your PLing.
Cure1Percent = 90;
Cure2Percent = 75;
Cure3Percent = 60;
Cure4Percent = 55;
Cure5Percent = 40;
-- Do not edit below this line.
TargetPlayer = FindPlayer(TargetName);
Player = GetPlayer()
-- List of Healing Spells
local Cures = { { Name = "Cure V", RequiredMP = 135 },
{ Name = "Cure IV", RequiredMP = 88 },
{ Name = "Cure III", RequiredMP = 46 },
{ Name = "Cure II", RequiredMP = 24 },
{ Name = "Cure", RequiredMP = 8 } };
-- List of Protectra Spells
local protectras = { { Name = "Protectra V", RequiredMP = 84 },
{ Name = "Protectra IV", RequiredMP = 65 },
{ Name = "Protectra III", RequiredMP = 46 },
{ Name = "Protectra II", RequiredMP = 28 },
{ Name = "Protectra", RequiredMP = 9 } };
-- List of Shellra Spells
local shellras = { { Name = "Shellra V", RequiredMP = 93 },
{ Name = "Shellra IV", RequiredMP = 75 },
{ Name = "Shellra III", RequiredMP = 56 },
{ Name = "Shellra II", RequiredMP = 37 },
{ Name = "Shellra", RequiredMP = 18 } };
-- List of Protect Spells
local protects = { { Name = "Protect IV", RequiredMP = 65 },
{ Name = "Protect III", RequiredMP = 46 },
{ Name = "Protect II", RequiredMP = 28 },
{ Name = "Protect", RequiredMP = 9 } };
-- List of Shell Spells
local shells = { { Name = "Shell IV", RequiredMP = 75 },
{ Name = "Shell III", RequiredMP = 56 },
{ Name = "Shell II", RequiredMP = 37 },
{ Name = "Shell", RequiredMP = 18 } };
function PLBot()
if(PLClass == "White Mage" then
if(TargetPlayer:GetHitPointPercentage() <= Cure5Percent && PLLevel >= 61) then
Cure5()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure4Percent && PLLevel >= 41) then
Cure4()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure3Percent && PLLevel >= 21) then
Cure3()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure2Percent && PLLevel >= 11) then
Cure2()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure1Percent && PLLevel >= 1) then
Cure1()
end
elseif(PLClass == "Red Mage" then
if(TargetPlayer:GetHitPointPercentage() <= Cure4Percent && PLLevel >= 48) then
Cure4()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure3Percent && PLLevel >= 26) then
Cure3()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure2Percent && PLLevel >= 14) then
Cure2()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure1Percent && PLLevel >= 3) then
Cure1()
end
elseif(PLClass == "Scholar" then
if(TargetPlayer:GetHitPointPercentage() <= Cure4Percent && PLLevel >= 55) then
Cure4()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure3Percent && PLLevel >= 30) then
Cure3()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure2Percent && PLLevel >= 17) then
Cure2()
elseif(TargetPlayer:GetHitPointPercentage() <= Cure1Percent && PLLevel >= 5) then
Cure1()
end
end
end
function Cure1()
if(Player:GetMagicPoints() >= Cures[4].RequiredMP) then
SendInput("/ma \""..Cures[4].Name.."\" "..TargetPlayer:GetName().."");
end
end
function Cure2()
if(Player:GetMagicPoints() >= Cures[3].RequiredMP) then
SendInput("/ma \""..Cures[3].Name.."\" "..TargetPlayer:GetName().."");
end
end
function Cure3()
if(Player:GetMagicPoints() >= Cures[2].RequiredMP) then
SendInput("/ma \""..Cures[2].Name.."\" "..TargetPlayer:GetName().."");
end
end
function Cure4()
if(Player:GetMagicPoints() >= Cures[1].RequiredMP) then
SendInput("/ma \""..Cures[1].Name.."\" "..TargetPlayer:GetName().."");
end
end
function Cure5()
if(Player:GetMagicPoints() >= Cures[0].RequiredMP) then
SendInput("/ma \""..Cures[0].Name.."\" "..TargetPlayer:GetName().."");
end
end
function PLBotStart()
timer = CTimer();
timer:GetOnTick():Connect(PLBot);
timer:Start(5000);
end
function PLBotStop()
timer:Stop();
end
Alias("PLStart", PLBotStart);
Alias("PLStop", PLBotStop);


Help

Back to top
MultiQuote










