Bobarkinator
08-13-2007, 02:48 PM
Ok first I would like to say that I plan to keep this an ongoing thread for as many functions as I get requests.
My first few I have already made based off the ones in Function Request Thread (http://www.villavu.com/forum/showthread.php?t=15149?p=184086), all of you who view these can request more and I will make them to the best of my abilities. I am currently working on a check if tree is their function and will probably have it out later today.
Requested by Dan Cardin
function HighestMagic(Combat: Boolean): String;
//Returns the highest magic attack you can do, you can choose comabat
//or not
var
CurrentTab: Integer;
begin
CurrentTab:= GetCurrentTab;
if (Combat) then
case GetSkillLevel('magic') of
1,2 : Result:= 'Wind Strike';
3,4 : Result:= 'Confuse';
5,6,7,8 : Result:= 'Water Strike';
9,10 : Result:= 'Earth Strike';
11,12 : Result:= 'Weaken';
13,14,15,16 : Result:= 'Fire Strike';
17,18 : Result:= 'Wind Bolt';
19 : Result:= 'Curse';
20,21,22 : Result:= 'Bind';
23,24,25,26,27,28 : Result:= 'Water Bolt';
30,31,32,33,34 : Result:= 'Earth Bolt';
35,36,37,38 : Result:= 'Fire Bolt';
39,40 : Result:= 'Crumble Undead';
41,42,43,44,45,46 : Result:= 'Wind Blast';
47,48,49 : Result:= 'Water Blast';
50,51,52 : Result:= 'Iban Blast, Snare, Magic Dart';
53,54,55,56,57,58,59: Result:= 'Earth Blast';
60,61 : Result:= 'Saradomin Strike, Claws of Guthix, Flames of Zamorak';
62,63,64 : Result:= 'Wind Wave';
65 : Result:= 'Water Wave';
66,67,68,69 : Result:= 'Vulnerability';
70,71,72 : Result:= 'Earth Wave';
73,74 : Result:= 'Enfeeble';
75,76,77,78 : Result:= 'Fire Wave';
79 : Result:= 'Entangle';
82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98 ,99: Result:= 'Stun';
end;
if (not(Combat)) then
case GetSkillLevel('magic') of
1,2,3: Result := 'Lumbridge Home Port';
4,5,6: Result := 'Crossbow Bolt Enchant';
7,8,9,10,11,12,13,14: Result:= 'Enchant Lvl-1 Jewelry';
15,16,17,18,19,20 : Result:= 'Bones to Bananas';
21,22,23,24 : Result:= 'Low Level Alchemy';
25,26 : Result:= 'Varrock Teleport';
27,28,29,30 : Result:= 'Enchant Lvl-2 Jewelry';
31,32 : Result:= 'Lumbridge Teleport';
33,34,35,36 : Result:= 'Telekinetic Grab';
37,38,39 : Result:= 'Falador Teleport';
40,41,42 : Result:= 'House Teleport';
43,44 : Result:= 'Superheat Item';
45,46,47,48 : Result:= 'Camelot Teleport';
49,50 : Result:= 'Enchant Lvl-3 Jewelry';
51,52,53,54 : Result:= 'Ardougne Teleport';
55 : Result:= 'High Level Alchemy';
56 : Result:= 'Charge Water Orb';
57 : Result:= 'Enchant Lvl-4 Jewelry';
58,59 : Result:= 'Watchtower Teleport';
60 : Result:= 'Charge Earth Orb, Bones to Peaches';
61,62 : Result:= 'Trollheim Teleport';
63 : Result:= 'Charge Fire Orb';
64,65 : Result:= 'Ape Atoll Teleport';
66,67 : Result:= 'Charge Air Orb';
68,69,70,71,72,73 : Result:= 'Enchant Lvl-5 Jewelry';
74,75,76,77,78,79 : Result:= 'Teleother Lumbridge';
80,81 : Result:= 'Charge';
82,83,84 : Result:= 'Teleother Falador';
85,86 : Result:= 'Tele Block';
87,88,89 : Result:= 'Enchant Lvl-6 Jewelry';
90,91,92,93,94,95,96,97,98,99: Result:= 'Teleother Camelot';
end;
GameTab(CurrentTab);
end;
Requested by Dan Cardin:
function ColorCloseMiddleFar(TheColor,TheTol: Integer): TPointArray;
//Finds a color, TheColor, with a Tolerance,TheTol, and returns the
//closest, farthest, and middle of that color to you. Returns in the
//format of "YourTPA[0].X,YourTPA[0].Y, thats closest, middle is 1
//and farthest is 2
var
TPA: TPointArray;
i,Index: Integer;
begin
FindColorsSpiralTolerance(MSCX,MSCY,TPA,TheColor,M SX1,MSY1,MSX2,MSY2,TheTol);
i:= Length(TPA);
SetArrayLength(Result,3);
Result[0].X:= TPA[0].X;
Result[0].Y:= TPA[0].Y;
Result[1].X:= TPA[Round(i/2)].X;
Result[1].Y:= TPA[Round(i/2)].Y;
Result[2].X:= TPA[Length(TPA)-1].X;
Result[2].Y:= TPA[Length(TPA)-1].Y;
end;
Requested by tim0suprem0:
procedure ChatWithRC(SayWhat: String);
//This is a function that will chat with your RC, if you use InChat's
//then you can have a conversation as long as you set up an autoresponder
//and remember what the bot will respond to on each saying
var
iX,iY: Integer;
begin
if (RCFindMaster(iX,iY,MCX1,MCY1,MCX2,MCY2)) then
begin
WriteLn('Found Master in chat');
GameTab(8);
if (RCHowManyOnline <> 0) then
begin
RCFindMaster(iX,iY,MIX1,MIY1,MIX2,MIY1);
Mouse(iX+2,iY+2,0,0,True);
TypeSend(SayWhat);
end;
end;
end;
My first few I have already made based off the ones in Function Request Thread (http://www.villavu.com/forum/showthread.php?t=15149?p=184086), all of you who view these can request more and I will make them to the best of my abilities. I am currently working on a check if tree is their function and will probably have it out later today.
Requested by Dan Cardin
function HighestMagic(Combat: Boolean): String;
//Returns the highest magic attack you can do, you can choose comabat
//or not
var
CurrentTab: Integer;
begin
CurrentTab:= GetCurrentTab;
if (Combat) then
case GetSkillLevel('magic') of
1,2 : Result:= 'Wind Strike';
3,4 : Result:= 'Confuse';
5,6,7,8 : Result:= 'Water Strike';
9,10 : Result:= 'Earth Strike';
11,12 : Result:= 'Weaken';
13,14,15,16 : Result:= 'Fire Strike';
17,18 : Result:= 'Wind Bolt';
19 : Result:= 'Curse';
20,21,22 : Result:= 'Bind';
23,24,25,26,27,28 : Result:= 'Water Bolt';
30,31,32,33,34 : Result:= 'Earth Bolt';
35,36,37,38 : Result:= 'Fire Bolt';
39,40 : Result:= 'Crumble Undead';
41,42,43,44,45,46 : Result:= 'Wind Blast';
47,48,49 : Result:= 'Water Blast';
50,51,52 : Result:= 'Iban Blast, Snare, Magic Dart';
53,54,55,56,57,58,59: Result:= 'Earth Blast';
60,61 : Result:= 'Saradomin Strike, Claws of Guthix, Flames of Zamorak';
62,63,64 : Result:= 'Wind Wave';
65 : Result:= 'Water Wave';
66,67,68,69 : Result:= 'Vulnerability';
70,71,72 : Result:= 'Earth Wave';
73,74 : Result:= 'Enfeeble';
75,76,77,78 : Result:= 'Fire Wave';
79 : Result:= 'Entangle';
82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98 ,99: Result:= 'Stun';
end;
if (not(Combat)) then
case GetSkillLevel('magic') of
1,2,3: Result := 'Lumbridge Home Port';
4,5,6: Result := 'Crossbow Bolt Enchant';
7,8,9,10,11,12,13,14: Result:= 'Enchant Lvl-1 Jewelry';
15,16,17,18,19,20 : Result:= 'Bones to Bananas';
21,22,23,24 : Result:= 'Low Level Alchemy';
25,26 : Result:= 'Varrock Teleport';
27,28,29,30 : Result:= 'Enchant Lvl-2 Jewelry';
31,32 : Result:= 'Lumbridge Teleport';
33,34,35,36 : Result:= 'Telekinetic Grab';
37,38,39 : Result:= 'Falador Teleport';
40,41,42 : Result:= 'House Teleport';
43,44 : Result:= 'Superheat Item';
45,46,47,48 : Result:= 'Camelot Teleport';
49,50 : Result:= 'Enchant Lvl-3 Jewelry';
51,52,53,54 : Result:= 'Ardougne Teleport';
55 : Result:= 'High Level Alchemy';
56 : Result:= 'Charge Water Orb';
57 : Result:= 'Enchant Lvl-4 Jewelry';
58,59 : Result:= 'Watchtower Teleport';
60 : Result:= 'Charge Earth Orb, Bones to Peaches';
61,62 : Result:= 'Trollheim Teleport';
63 : Result:= 'Charge Fire Orb';
64,65 : Result:= 'Ape Atoll Teleport';
66,67 : Result:= 'Charge Air Orb';
68,69,70,71,72,73 : Result:= 'Enchant Lvl-5 Jewelry';
74,75,76,77,78,79 : Result:= 'Teleother Lumbridge';
80,81 : Result:= 'Charge';
82,83,84 : Result:= 'Teleother Falador';
85,86 : Result:= 'Tele Block';
87,88,89 : Result:= 'Enchant Lvl-6 Jewelry';
90,91,92,93,94,95,96,97,98,99: Result:= 'Teleother Camelot';
end;
GameTab(CurrentTab);
end;
Requested by Dan Cardin:
function ColorCloseMiddleFar(TheColor,TheTol: Integer): TPointArray;
//Finds a color, TheColor, with a Tolerance,TheTol, and returns the
//closest, farthest, and middle of that color to you. Returns in the
//format of "YourTPA[0].X,YourTPA[0].Y, thats closest, middle is 1
//and farthest is 2
var
TPA: TPointArray;
i,Index: Integer;
begin
FindColorsSpiralTolerance(MSCX,MSCY,TPA,TheColor,M SX1,MSY1,MSX2,MSY2,TheTol);
i:= Length(TPA);
SetArrayLength(Result,3);
Result[0].X:= TPA[0].X;
Result[0].Y:= TPA[0].Y;
Result[1].X:= TPA[Round(i/2)].X;
Result[1].Y:= TPA[Round(i/2)].Y;
Result[2].X:= TPA[Length(TPA)-1].X;
Result[2].Y:= TPA[Length(TPA)-1].Y;
end;
Requested by tim0suprem0:
procedure ChatWithRC(SayWhat: String);
//This is a function that will chat with your RC, if you use InChat's
//then you can have a conversation as long as you set up an autoresponder
//and remember what the bot will respond to on each saying
var
iX,iY: Integer;
begin
if (RCFindMaster(iX,iY,MCX1,MCY1,MCX2,MCY2)) then
begin
WriteLn('Found Master in chat');
GameTab(8);
if (RCHowManyOnline <> 0) then
begin
RCFindMaster(iX,iY,MIX1,MIY1,MIX2,MIY1);
Mouse(iX+2,iY+2,0,0,True);
TypeSend(SayWhat);
end;
end;
end;