Simba Code:
// Do Pottery Crafting Of Choice
procedure MakePottery(Choice:Integer);
var
x, y, T, PlusOne, PotteryCounter, ClayCounter, LoopCounter: Integer;
Wheel: Boolean;
label
Start;
Begin
Start:
if(not(LoggedIn))then
exit;
ClayCounter := 0;
PotteryCounter := 0;
// Open Inventory to count the amount of clay
ClayCounter := CountInvItems('color', 669001, [4, 50]);
WriteLn('SoftClay In Inventory ' + IntToStr(ClayCounter));
// Setup Pottery For Finding Item To Use
// If Pottery Then Find Wheel
// If Pottery Is made Find Oven
WriteLn('In Pottery Shop');
// Wheel := False;
SetAngle(SRL_ANGLE_HIGH); // Set Camera Angle
MakeCompass('W');
x:=MSCX; // This is the Center Of the Main Screen Where Your Character is standing at the moment
y:=MSCY; // The Search for your object will start from this location outwards in a spiral
WriteLn('Looking For Pottery Wheel');
MakeCompass('W');
If FindObjTPA(x, y, 9079697, 6, 1, 15, 60, 50, ['Pott']) then
Begin
While IsMoving do
Wait(100);
Case random(2) of
0: Begin
WriteLn('Left Clicked Potters Wheel');
GetMousePos(x,y); // Get Mouse Current Position
mouse(x, y, 5, 5, True); // Left Click On Potters Wheel
Wait(2000 + random(400));
End;
1: Begin
WriteLn('Right Clicked Potters Wheel');
GetMousePos(x,y); // Get Mouse Current Position
mouse(x, y, 5, 5, False); // Right Click To Bring Up Options
WaitOption('Form', 500); // Wait A Certain X Amount Of Seconds Before Clicking Option
Wait(2000 + random(400));
End;
End;
End;
// Chooce Option For Which Pottery To Make
// First Get Player Crafting Experience, If not enougth expereince for
// chosen option exit procedure goto Global FailSafe and execute
Case Choice of
// First Case Make a Pot
0: Begin
Case random(1) of
0: Begin // Left Click On Pot To Make
WriteLn('Left Clicked Pot');
ClayCounter := CountInvItems('color', 669001, [4, 50]);
if (CountInvItems('color', 669001, [4, 50]) > 0) then
Begin
mouse(164, 428, 5, 5, True); // Left Click On Potters Wheel
Wait(1000 + random(400));
MarkTime(T);
PotteryCounter := CountInvItems('color', 803419, [3, 50]);
WriteLn('Amount Of pots In Inventorry ' + IntToStr(CountInvItems('color', 803419, [3, 50])));
While (CountInvItems('color', 803419, [3, 50]) < 28) or (TimeFromMark(T) < 15000) do
Wait(1000+Random(500));
WriteLn('Test 1 pottery');
if(TimeFromMark(T) > 15000) then
WriteLn('Test 2 pottery');
if (CountInvItems('color', 803419, [3, 50]) > 1) then
// goto Start;
WriteLn('Goto Banking');
FindNormalRandoms;
Players[CurrentPlayer].Loc:='Potting';
{if (ClayCounter > 0) then
Exit
else}
WriteLn('No More Clay To Craft');
BankFromPottery;
DepositItems;
Exit;
End;
// Start Count for Clay Turned into Pots
End;
1: Begin // Rigt Clicked On Pot
WriteLn('Right Clicked Pot');
mouse(162, 417, 5, 5, False); // Right Click To Bring Up Options
WaitOption('All', 500); // Wait A Certain X Amount Of Seconds Before Clicking Option
Wait(1000 + random(400));
if (ClayCounter > 0) then // If This Condition Is True Do Loop Otherwise Do Next Step
Wait(500 + random(400)) // Check Status Again
else
WriteLn('No More Clay To Craft');
BankFromPottery;
Exit;
End;
End;
End;
// Make Urns
1: Begin
End;
// Make a Pie Dish
2: Begin
End;
// Make a Bowl
3: Begin
End;
End;
ClayCounter := CountInvItems('color', 669001, [4, 50]);
if (ClayCounter > 0) then
Goto Start;
End;