CODE:char poiskRXP[5];
char maskRXP[5];
win w;
int prc;
int adr;
int x, y;
int hps;
char xp[4];
//////////////////////////
//A1 30 20 7A 02
poiskRXP[0]=161;//a1
poiskRXP[1]=48;//30
poiskRXP[2]=32;//20
poiskRXP[3]=122;//7a
poiskRXP[4]=2;//02
//////////////////////////
maskRXP[0]=1;
maskRXP[1]=1;
maskRXP[2]=1;
maskRXP[3]=1;
maskRXP[4]=1;
//////////////////////////
okno();
poiskRealXP();
enabletimer(0);
//
loop()
{
sleep(50);
}
//////////////////////////
function okno()
{
textout(0, 0, 20, "Óêàæèòå îêíî èãðû íàæìèòå ¨", 1);
r: if (getkeystate(192)!=1)
{
sleep(50);
goto r;
}
getmouse(x, y);
w=getwindow(1, x, y);
textout(0, 0, 20, "óêàçàòåëü ïîëó÷åí" +" "+ w.name +" "+ w.class , 1);
sleep(1000);
}
//
function poiskRealXP()
{
prc=openprocess(w);
if (findmemorymask (1, #poiskRXP[0], 5, #adr, 0, #maskRXP[0], 100, prc)==1)
{
textout(0, 10, 40, "íàøëî àäðåñ",0);
}
else
{
textout(0, 10, 40, "îøèáêà findmemory",0);
}
}
//
CREATE_TIMER(0, 1000)//Íîìåð òàéìåðà, âûïîëíåíèå òàéìåðà ÷åðåç ìñåê.
{
if (w!=0)//Èãðà åñòü
{
if (readmemory(#xp[0], 4, adr, prc)!=0)
{
hps=codhexi(#xp[0], 4);
}
else
{
textout(0, 10, 40, "îøèáêà readmemory",0);
}
textout(0, 30, 40, "ñêîëüêî ÕÏ - "+format(hps)+" "+format(adr), 0);
}
}