Code:
program JewelleryEnchanter;
{$DEFINE SMART}
{$i AeroLib/AeroLib.Simba}
{$i Reflection/Reflection.simba}
{--------Jewellery-Enchanter--------
---------------v1.0----------------
------------By Faceless------------
/------------\
|Instructions|
\------------/
1. Have cosmic runes in inventory
2. Equip the correct staff for the spell you are casting.
3. Put jewellery to be enchanted wherever.
4. Start at any bank chest.}
const
SPELLTOCAST = 's'; // 's' for sapphire, 'e' for emerald, 'r' for ruby, 'd' for diamond
var
statusText, ItemID, EnchantedID, BankType: String;
MyPlayer: TReflectLocalPlayer;
Item, Enchanted : TReflectInvItem;
//---------- EDIT ANYTHING BELOW THIS LINE----------\\
//------------ YOU MAY OR MAY NOT KNOW WHAT YOU ARE DOING-----------\\ ;)
procedure Login;
begin
MyPlayer.UserName := '';
MyPlayer.Password := '';
MyPlayer.Active := True;
MyPlayer.Login;
ItemID := 'Sapphire ring'; //Name for the item to enchant. Case sensitive.
EnchantedID := 'Ring of recoil'; //Name for the enchanted item. Case sensitive.
BankType := 'Bank chest'; // Name for bank. 'Bank' or 'Bank chest'. Case Sensitive
end;
Procedure AntiBan;
begin
LevelUp;
case (Random) of
1:
begin
Status('Antiban: Random right');
RandomRClick;
Wait(RandomRange(1203, 3486));
end;
2:
begin
Status('Antiban: Random movement');
RandomMovement;
Wait(RandomRange(803, 2486));
end;
3:
begin
Status('Antiban: Bored human');
BoredHuman;
Wait(RandomRange(543, 3081));
end;
4:
begin
Status('Antiban: Pick up mouse');
PickUpMouse;
Wait(RandomRange(543, 3081));
end;
5:
begin
end;
6:
begin
Status('Antiban: Random compass movement');
CompassMovement(10, 30, true);
Wait(RandomRange(543, 3081));
end;
7:
begin
Status('Antiban: Examining random inventory item');
ExamineInv;
Wait(RandomRange(487, 2427));
end;
8:
begin
Status('Antiban: Hitting random F keys');
RandomFKeys(true);
Wait(RandomRange(813, 4072));
end;
9:
begin
Status('Antiban: Moving mouse off client');
MMouseOffClient('random');
Wait(RandomRange(3813, 9072));
end;
end;
end;
procedure OpenBank;
var Bank: TReflectObject;
begin
begin // Implement bank check if this fails, exit if not
Bank.Find(objGame, BankType, 5);
Reflect.Mouse.Move(Bank.GetMSPoint, 3, 3);
writeLn('Opening Bank');
Reflect.Mouse.Click(Mouse_Left);
end;
end;
procedure Deposit;
var Bank: TReflectObject;
begin
begin
wait(1000 + (Random(1000)));
if Enchanted.Find(EnchantedID) then
begin
Reflect.Mouse.Move(Enchanted.GetPoint, 3, 3);
Reflect.Mouse.Click(Mouse_Right);
ChooseOption('sit-All');
WriteLn('Depositing Enchanted Items!')
end;
begin
if not Reflect.Bank.IsOpen then
begin
WriteLn('Cannot find Bank!');
TerminateScript;
end;
end;
end;
end;
procedure Withdraw;
begin
begin
wait(1000 + Random(1000));
if Reflect.Bank.IsOpen then
begin
Reflect.Bank.Withdraw(ItemID, -1);
Reflect.Bank.Close;
end;
end;
end;
procedure CastEnchant(spellType:String);
begin
if (spellType = 's') then
begin
GaussMouseBox(685, 233, 695, 245, mouse_Move); //You're going to need to change all these co-ords!
wait(RandomRange(150,320)); //(Top left x,y, Bottom Right x,y) of the box
Status('Casting lvl 1 enchant spell'); //Try using GaussMouseBox(, , , , Mouse_Move);
FastClick(mouse_Left);
wait(RandomRange(150,320));
end else if (spellType = 'e') then
begin
GaussMouseBox(613, 280, 623, 293, mouse_Move);
wait(RandomRange(150,320));
Status('Casting lvl 2 enchant spell');
FastClick(mouse_Left);
wait(RandomRange(150,320));
end else if (spellType = 'r') then
begin
GaussMouseBox(565, 329, 576, 339, mouse_Move);
wait(RandomRange(150,320));
Status('Casting lvl 3 enchant spell');
FastClick(mouse_Left);
wait(RandomRange(150,320));
end else if (spellType = 'd') then
begin
GaussMouseBox(590, 353, 599, 364, mouse_Move);
wait(RandomRange(150,320));
Status('Casting lvl 4 enchant spell');
FastClick(mouse_Left);
wait(RandomRange(150,320));
end else
begin
writeln('Invalid spell type');
end;
end;
Procedure UseMagics;
var
i:Integer;
begin
i := 2;
if (TabExists(tab_Magic)) then
begin
FTab(tab_Magic);
Wait(RandomRange(1000, 4000));
repeat
if (GetCurrentTab <> tab_Magic) then
FTab(tab_Magic);
CastEnchant(SPELLTOCAST);
WriteLn('casting enchant');
wait(RandomRange(150,320));
Reflect.Mouse.Move(Item.GetPoint, 3, 3);
WriteLn('Moving to item'); //This stuff may not work
wait(RandomRange(150,320));
FastClick(mouse_Left);
wait (1000 + Random(1000));
if Item.Find(ItemID) then //You'll have to change this so it recognises the item to enchant
Reflect.Mouse.Move(Item.GetPoint, 3, 3);
FastClick(mouse_Left);
wait (1000 + Random(1000));
until(false);
end;
end;
procedure MainLoop;
begin
AntiBan;
OpenBank;
Deposit;
Withdraw;
Wait(RandomRange(400, 1500));
UseMagics;
end;
begin
// Startup methods
initAL; // This is for aerolib, needed
Reflect.Setup; //This is for reflection, needed
Login; //The login procedure
// start of main loop
repeat
MainLoop;
until(false);
end.