check below for uptext.rar
check below for uptext.rar
Assign an integer variable/handler to load the bitmap with BitmapFromString, then use that variable as the first parameter of FindBitmap. The second and third parameter are the point in which the bitmap is located (if found).
Simba Code:program fighte;
Const
// fill out
NPC=10468317;
loot=8345019;
tolorence=15;
time=3; // in seconds
rwait=1000;
tleft= 93;
tright = 139;
bleft=630;
bright=447;
// player detection
playerx1=259;
playery1=160;
playerx2=275;
playery2=189;
// hitbar
hpx1=242;
hpy1=159;
hpx2=296;
hpy2=165;
hpcol=50036;
procedure clicknpc;
var
X,Y: Integer;
begin
if FindColorTolerance(X,Y,NPC,tleft,tright,bleft,bright,tolerence)
movemouse(x, y);
Wait(120 + Random(80));
ClickMouse(x, y, Mouse_Left)
waitloot; //Make sure this is declared before
Wait((time*1000) + Random(rwait));
if FindColorTolerance(X,Y,hpcol,hpx1,hpy1,hpx2,hpy2,tolerence)
then waitloot //Don't put a semi colon after a then, that also has an else in it
else
loot;
if FindColorTolerance(X,Y,loot,tleft,tright,bleft,bright,tolerence)
movemouse(x, y);
Wait(120 + Random(80));
ClickMouse(x, y, Mouse_right)
FindBitmap(14, 12, 'meJyTUdd2mPAfGcmoa+NCEAUMYI' +
'BfMVwlGptylXAEcQamFB53oonjsR2NTVOVxPgIiBhQAXLIYBXEjwD' +
'OzpG+');
// ?? no idea what to do from here.
else
Writeln('Failed to Find Npc')
wait(500);
procedure clicknpc;
end;
end;
begin
repeat
clicknpc;
until (False);
end.
Man, you need a lesson on the basics of pascal first. Take a look at the TuT in my signature first, get a basic understanding. You have many concept flaws. Finally, Please...Dear god...Please...Use the tab button more efficiently :').
For the bitmaps, I would try FindObjectDeformed. Take a look at this.
Also, take a look at Coh3ns guide after mine, that should clear your doubts.
~Rez
Last edited by Rezozo; 11-23-2012 at 04:48 AM.
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
Did you make a procedure that waits for the loot? There is no such function/procedure pre defined by SRL, to my knowledge.
~Rez
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
The procedure im using checks to see if the hp bar is above the player. as soon as it goes away it is suposed to then right click the search for the bitmap
Is that called waitloot? Did you even include it in the program? As far as I see, that isn't there.
Also, another thing for your bitmaps: Here.
~Rez
Last edited by Rezozo; 11-23-2012 at 04:59 AM.
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
sec im following tut, gonna rewrite and see what i get
Ok so i tried to do a dry run.. and it did not work(i got no errors)
going to be be on again tomorowSimba Code:Program TestBitMap;
Var
X, Y, charm: Integer; {All the script variables were declared here}
Procedure CallThings;
Begin
charm := BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59mMJMl' +
'VnHMdIvf8WjKiBGnEQIAUtQGXA==');
End;
Procedure FreeThings;
Begin
FreeBitMap(charm);
End;
Procedure pickup;
Begin
FindColorTolerance(X,Y,1479346,183,125,334,231,15)
movemouse(x, y);
Wait(120 + Random(80));
ClickMouse(x, y, Mouse_right)
If FindBitMapToleranceIn(charm, X, Y,248, 197, 270, 214, 65) Then
Begin
WriteLn('Debug: We Found charm');
movemouse(X, Y);
ClickMouse(X, Y, Mouse_left)
End Else
WriteLn('Debug: We Could Not Find The charm');
End;
Begin
CallThings;
//AddOnTerminate('FreeThings');
Repeat
Until(False)
FreeThings;
Terminatescript();
End.
Last edited by rj; 11-23-2012 at 05:19 AM.
It's pretty hard to pickup things with simba. The colour detection is not the best with items on the ground
Currently Working on:
Mining:77/80
Herblore:55/80
For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip
There are currently 1 users browsing this thread. (0 members and 1 guests)