function tPrayer.getPrayer(funcPrayer:string):boolean; var funcColour, funcID:int32; funcPoint:tPoint; funcPointer:^glTexture; funcPointerSize:uInt32; begin if self.getPrayerID(funcPrayer,funcID,funcColour) then begin funcPointer:=glTextures(funcPointerSize)+(oglTextureSize*(funcPointerSize-1)); for 0 to funcPointerSize-1 do begin case funcPointer^.id of 157378: if compareMem(@[funcPointer^.x,funcPointer^.y],@funcPoint,8) then begin result:=true; break; end; 21070: if ((funcPointer-oglTextureSize)^.id=73440) then break; funcID: if similarColors(funcPointer^.colourID,funcColour,oglColourTolerance) and ((funcPointer^.bounds.height()=30) and (funcPointer^.bounds.width()=30)) then funcPoint:=[funcPointer^.x,funcPointer^.y]; end; funcPointer-=oglTextureSize; end; exit(result); end; end; function tPrayer.getPrayerID(funcPrayer:string;var funcID,funcColour:int32):boolean; begin result:=true; funcPrayer:=replaceRegExpr('(\W|_)*',lowercase(funcPrayer),'',false); case funcPrayer of {Curses} 'protectitem': begin funcColour:=3811621; funcID:=112435; end; 'sapwarrior': begin funcColour:=5844782; funcID:=116521; end; 'sapranger': begin funcColour:=5319204; funcID:=117578; end; 'saprangestrength': begin funcColour:=7092783; funcID:=117772; end; 'sapmage': begin funcColour:=4729656; funcID:=114233; end; 'sapmagicstrength': begin funcColour:=6644070; funcID:=122515; end; 'sapspirit': begin funcColour:=6237988; funcID:=113707; end; 'sapdefence': begin funcColour:=6704975; funcID:=113719; end; 'sapstrength': begin funcColour:=6698801; funcID:=113713; end; 'berserker': begin funcColour:=5777496; funcID:=112775; end; 'deflectsummoning': begin funcColour:=4018271; funcID:=117309; end; 'deflectmagic': begin funcColour:=3225938; funcID:=118629; end; 'deflectmissiles': begin funcColour:=3950924; funcID:=116526; end; 'deflectmelee': begin funcColour:=3688279; funcID:=120974; end; 'leechattack': begin funcColour:=5258326; funcID:=119667; end; 'leechranged': begin funcColour:=5125960; funcID:=119202; end; 'leechrangestrength': begin funcColour:=6176582; funcID:=120001; end; 'leechmagic': begin funcColour:=4207960; funcID:=118654; end; 'leechmagicstrength': begin funcColour:=6513263; funcID:=123573; end; 'leechdefence': begin funcColour:=6379368; funcID:=117644; end; 'lightform': begin funcColour:=2320990; funcID:=112024; end; 'darkform': begin funcColour:=3816528; funcID:=112195; end; 'leechstrength': begin funcColour:=6374739; funcID:=117638; end; 'leechenergy': begin funcColour:=4928322; funcID:=117681; end; 'leechadrenaline': begin funcColour:=5783376; funcID:=117631; end; 'chronicleabsorbtion': begin funcColour:=9725487; funcID:=112173; end; 'soullink': begin funcColour:=2322527; funcID:=113043; end; 'wrath': begin funcColour:=5792074; funcID:=112179; end; 'teamworkprotection': begin funcColour:=1860428; funcID:=118540; end; 'superheatform': begin funcColour:=5396538; funcID:=111875; end; 'soulsplit': begin funcColour:=7825022; funcID:=127093; end; 'fortitude': begin funcColour:=1137477; funcID:=112124; end; 'turmoil': begin funcColour:=5856610; funcID:=112179; end; 'anguish': begin funcColour:=4937572; funcID:=112265; end; 'torment': begin funcColour:=6834776; funcID:=117766; end; {Prayers} 'steelskin': begin funcColour:=4147020; funcID:=111389 end; 'ultimatestrength': begin funcColour:=8541740; funcID:=112298 end; 'incrediblereflexes': begin funcColour:=6704427; funcID:=118969 end; 'eagleeye': begin funcColour:=6709309; funcID:=113311 end; 'overpoweringforce': begin funcColour:=5460005; funcID:=112192 end; 'mysticmight': begin funcColour:=6760756; funcID:=103295 end; 'overcharge': begin funcColour:=5336969; funcID:=122229 end; 'rapidrestore': begin funcColour:=7032598; funcID:=112192 end; 'rapidheal': begin funcColour:=6038040; funcID:=112192 end; 'protectitem': begin funcColour:=4273713; funcID:=112547 end; 'protectfromsummoning': begin funcColour:=5793387; funcID:=112918 end; 'protectfrommagic': begin funcColour:=6375736; funcID:=120363 end; 'protectfrommissiles': begin funcColour:=5463389; funcID:=119238 end; 'protectfrommelee': begin funcColour:=4739668; funcID:=115158 end; 'retribution': begin funcColour:=10774844; funcID:=112298 end; 'redemption': begin funcColour:=3943211; funcID:=112192 end; 'smite': begin funcColour:=3766675; funcID:=112298 end; 'chivalry': begin funcColour:=5461333; funcID:=116257 end; 'rapidrenewal': begin funcColour:=7353629; funcID:=112192 end; 'piety': begin funcColour:=5396315; funcID:=119918 end; 'rigour': begin funcColour:=3497506; funcID:=112288 end; 'augury': begin funcColour:=7032617; funcID:=103496 end; else result:=false; end; end; function tPrayer.setPrayer(funcPrayer:string;funcEnable:boolean):boolean; var funcBounds:tBox; funcColour, funcID:int32; funcPointer:^glTexture; funcPointerSize:uInt32; funcPoint: TPoint; begin if self.getPrayerID(funcPrayer,funcID,funcColour) then begin funcPointer:=glTextures(funcPointerSize)+(oglTextureSize*(funcPointerSize-1)); for 0 to funcPointerSize-2 do begin case funcPointer^.id of 157378: begin if pointInBox([funcPointer^.x,funcPointer^.y],funcBounds) then begin if (not funcEnable) then begin funcPoint:=funcBounds.normalizePoint(); clickMouse(funcPoint.x, funcPoint.y, 1); result:=true; end; break; end; end; 21070: begin if ((funcPointer-oglTextureSize)^.id=73440) then begin if (not compareMem(@[0,0,0,0],@funcBounds,16)) and funcEnable then begin funcPoint:=funcBounds.normalizePoint(); clickMouse(funcPoint.x, funcPoint.y, 1); result:=true; end; break; end; end; funcID: begin if similarColors(funcPointer^.colourID,funcColour,oglColourTolerance) and ((funcPointer^.bounds.height()=30) and (funcPointer^.bounds.width()=30)) then funcBounds:=funcPointer^.bounds; end; end; funcPointer-=oglTextureSize; end; exit(result); end; end;