Flight
2011-12-07 01:05:38
Very simple, maybe some scripters might want this. It'll added a specific tool (defined as a string) to your tool belt. If you already have that tool in your tool belt it'll return false. Just use as AddToBelt('Lobster pot');.
I don't have all of the tools defined in the function but it's quite obvious on how to add the rest. Anyways, it should cover the most popular tools.
Kinda useless but if you want it, take it.
I don't have all of the tools defined in the function but it's quite obvious on how to add the rest. Anyways, it should cover the most popular tools.
Function AddToBelt(What: String): Boolean;
var
X,Y,Slot,T,Tool: Integer;
begin
Result := False;
case What of
'Tinderbox':
Tool := DTMFromString('mggAAAHicY2NgYDjMxMBwAojPAPFpID4IxDuA+CVQ7hkQPwLiN0D8AYpNdNgZoiPDgSwmFMwFJEEYHTDiwBAAAIohC78=');
'Barbarian rod':
Tool := DTMFromString('mggAAAHicY2NgYChlYmDIAOJKIC4C4hwgzgXi+0C5d0B8D4ifAfFbIH4IxDaB0Qy6hiZAFhMK5gKSIIwOGHFgCAAAnhsJrw==');
'Knife':
Tool := DTMFromString('mbQAAAHicY2VgYHBkYmBwAGJzILYBYk8g5mJkYOAFYjEgFgZiBiBurK5miLfjBXKY4JgLSIIwMmDEgsEAAB4RA9I=');
'Hammer':
Tool := DTMFromString('mggAAAHicY2NgYLBnYmCwBmIPIDYHYisg9gXiUEYGhhAg9gTiWCCOA2IvILbT5GTw0Odi8PfxAepmgmMuIAnDyIARB4YAAPp7BZI=');
'Chisel':
Tool := DTMFromString('mbQAAAHicY2VgYNjNxMBwCIi3A/E+IN4BxCKMDAzsQCwIxSB+iDkPg56ODlAHExxzAUkQRgaMWDAYAADN9QVM');
'Small fishing net':
Tool := DTMFromString('mbQAAAHicY2VgYDjCxMBwGIjPAvFJIN4HxAaMDAwmQKwDxBZQtqOxKoORugxQBxMccwFJEEYGjFgwGAAAEFgGGQ==');
'Fishing rod':
Tool := DTMFromString('mbQAAAHicY2VgYOhjYmCYCMQLgHg2EE8FYl5GBgY+IGYCYi4gFgZiPR0dhjB7HqAOJjjmApIgjAwYsWAwAACBxQSE');
'Harpoon':
Tool := DTMFromString('mggAAAHicY2NgYMhmYmAoBuIKIE4G4iwgLgViLkYGhv9A+T9ALA5k8zFC2Gbq7Awerq4M/j4+QB4THHMBSRhGBow4MAQAAPbNCBs=');
'Lobster pot':
Tool := DTMFromString('mrAAAAHic42BgYJjFBMETgXgaEM8D4iVAPAXKfg5U8xGIPwDxJyB+C8RPgfgdEL8E4jALHjBmYGBCwcnx8WDMBeSBMDqAiTMSwDAAAK4jD/k=');
end;
if ExistsItemDTM(Tool, X, Y) then
begin
Slot := CoordsToItem(X, Y);
MouseItem(Slot, False);
Wait(RandomRange(20, 75));
WaitOption('toolbelt', 300);
end else
Result := False;
MarkTime(T);
repeat
if (TimeFromMark(T) > 3000) then
break;
if not ExistsItemDTM(Tool, X, Y) then
break;
if FindBlackChatMessage('already on') then
break;
until(false)
Result := not ExistsItemDTM(Tool, X, Y);
FreeDTM(Tool);
end;
Kinda useless but if you want it, take it.