Im using 2.2 and it has no problem clicking the continue button. It will play a couple of games fine and then randomly give the error.. it has been very inconsistent when the error shows which is why it doesn't make sense to me.
Just to make sure im doing it right though, you have to update oglib by redownloading it and placing it in the simba folder, correct? There isnt anything else other than that, that needs to be done, right?
You need to download oglib, delete the old folder, then extract the new and rename it to just ogLib. Also download the 2 plugins on the page. And save them to your plugins folder.
Make sure they overwrite the ones already in there.
It's weird because I haven't gotten that error in 2.2 only 2.1
--- My Scripts ---
--- My Scripts ---
--- My Scripts ---
--- My Scripts ---
Im using the 2.2 that your updater downloaded for meits driving me nuts cause i have to babysit it almost as much as if i were ACTUALLY playing haha
Code:program AdieuxsPestControl; {$i ogLib\lib\core\core.simba} { Pestcontrol Script by: Adieux at Villavu Please make sure to visit the forum post here: https://villavu.com/forum/showthread.php?t=114186 if you have any questions or comments. Set up is simple. Step 1: Read the forum post Step 2: Change the 2 Constants below to what you desire them to be Step 3: Hit run, l et SMART load, stop the script, log into account Step 4: Start outside the boat near the plank, or inside the boat, or inside Pestcontrol and hit Run again Step 5: Enable Debug in SMART if you want to see progress screen/paint If you get any bugs or errors please report them, also please post any progress reports/give feedback. Shoutouts to Obscurity for being such an awesome and helpful person. This script wouldn't be nearly as good without him Thank you for using my script! } //Change these to your preference const GAMES_TO_PLAY := 100; //Change this value to how many games you want to play, will terminate after said amount QUICK_PRAYERS := true; //Do you want to use Quick Prayers? //This scripts version LOCAL_VERSION := 2.2; var gamesPlayed, timesResetCamera, deathCounter, timesRotatedCamera, timesCompleted, timesFailed, timesKnightDied, whereDidWeStart, scriptPaintBMP: integer; rewardsLady, knightChatModel, damageModel, allModels, allPortals, veteranFlagModel, bootsModel: glModelArray; failedChat: glTextureArray; distanceFrom: extended; paintTimer, canAttack, canRotate: tCountDown; clientCenter: TPoint := ogl.getClientMidPoint (); x,y: int32; { Override until Obscurity fixes the ID's } function tDialogue.clickContinue():boolean; override; var funcPointer:pointer; funcPointerIndex, funcPointerSize:uInt32=0; funcX, funcY:int32; begin funcPointer:=glTextures(funcPointerSize)+(36*(funcPointerSize-1)); if funcPointer<>nil then begin for funcPointerIndex to funcPointerSize-1 do begin if funcPointer^= 12240 then begin clickMouse(normalRandom((funcX:=(funcPointer+12)^)-40,funcX+40),normalRandom((funcY:=(funcPointer+16)^)-10,funcY+10),1); result:=true; break; end; funcPointer:=funcPointer-36; end; end; exit(result); end; { Procedure: waitFlag; Description: Waits for the flag on the mini-map to go away, while walking, tweaked some from original. Credit: Ross ---> https://villavu.com/forum/member.php?u=148198 } procedure waitFlag; var timeWalking: tCountDown; begin timeWalking.setTime(random(20000,30000)); wait(500); while ((not ogl.getTextures(1275).isEmpty()) and (not dialogue.hasDialogue())) do begin wait(randomRange(500, 700)); end; end; { Function: tileWalk Description: Walks to the tiles sent to the function, has some randomization. Credit: Ross ---> https://villavu.com/forum/member.php?u=148198 } function tileWalk(randomization: integer; offSetTiles: TPointArray): boolean; var rx, ry, i: integer; begin for i := 0 to high(offSetTiles) do begin rx := randomrange( - (randomization), randomization); ry := randomrange( - (randomization), randomization); mouse.click(minimap.getScreenPosition(minimap.getLocalPosition().adjustposition(offsetTiles[i].x + rx, offsetTiles[i].y + ry)), 1); if ((offSetTiles[i].y > 20) or (offSetTiles[i].y < - 20)) or ((offSetTiles[i].x > 15) or (offSetTiles[i].x < - 15)) then wait(3500) else wait(1000); waitflag; end; end; { Function minimap.ClickResetCamera Description: overRides ogLibs included function because it tends to miss-click a lot changed randomizations } function tMinimap.clickResetCamera():boolean; override; var funcPointer:pointer; funcPointerIndex, funcPointerSize:uInt32=0; funcX, funcY:int32; begin funcPointer:=glTextures(funcPointerSize); if funcPointer<>nil then begin for funcPointerIndex to funcPointerSize-1 do begin if funcPointer^=147885 then begin clickMouse(random((funcX:=(funcPointer+12)^)-5,funcX+5),random((funcY:=(funcPointer+16)^)-5,funcY+5),1); result:=true; break; end; funcPointer:=funcPointer+36; end; end; exit(result); end; { Procedure: antiBan Description: Will perform antiban, pretty simple anti ban Just walks to somewhere on the boat, randomly. If anyone has any other suggestions for antiban, let me know } procedure antiBan(doWePerform: boolean); var skillTab, backPackTab: glTextureArray; skillHover: tPoint; begin if (doWePerform) then begin writeLn('Performing anti-ban'); case random(100) of 0..25: begin tileWalk(3, [[ - 2, - 3]]); end; 26..50: begin tileWalk(3, [[3, - 3]]); end; 51..75: begin tileWalk(3, [[4, 5]]); end; 76..100: begin tileWalk(3, [[ - 6, 5]]); end; end; end else if (not doWePerform) then begin writeLn('No antiban right now'); exit; end; end; { Procedure: doWePerformAntiBan Description: Desides if we do or do not perform antiban most of the time will decide not to If you prefer more anti ban, change the values below } procedure doWePerformAntiBan(); var doWe: boolean; begin case random(100) of 0..80: begin doWe := false; antiBan(doWe); end; 81..100: begin doWe := true; antiBan(doWe); end; end; end; { Procedure: convertTheTime Description: Converts the time from milliseconds to more formal time receives getTimeRunning } function convertTheTime(time: uInt32): string; var seconds, minutes, hours: extended; begin seconds := (time mod 3600000 mod 60000 div 1000); minutes := (time mod 3600000 div 60000); hours := (time div 3600000); result := (ToStr(hours) + ' hour(s) ' + toStr(minutes) + ' minutes ' + ToStr(seconds) + ' seconds'); end; { Procedure: progressReport Description: Prints out a simple progress report to the use } procedure progressReport(); var time: string; pointsEarned: integer; begin if (paintTimer.isFinished()) then begin time := ConvertTheTime(GetTimeRunning()); pointsEarned := (((timesCompleted) * 4)); smart.__Graphics.Clear; smart.__graphics.drawBitmap(scriptPaintBMP, Point(0, 465)); smart.__Graphics.DrawText('Time Running: ' + time, 'upCharsEx', point(5, 490), clWhite); smart.__Graphics.DrawText('Points Earned: ' + toStr(pointsEarned), 'upCharsEx', point(5, 510), clAqua); smart.__Graphics.DrawText('Times Knight Died: ' + toStr(timesKnightDied), 'upCharsEx', point(5, 530), clRed); smart.__Graphics.DrawText('Times Failed: ' + toStr(timesFailed), 'upCharsEx', point(5, 550), clRed); smart.__Graphics.DrawText('Version: ' + toStr(LOCAL_VERSION), 'smallChars', point(5, 580), clWhite); paintTimer.setTime(15000); end else exit; end; { Procedure: terminateTheScript Description: Terminates and frees bitmap } procedure terminateTheScript(); begin FreeBitmap(scriptPaintBMP); writeLn('Terminating...'); TerminateScript; end; { Procedure: rotateCamera Description: Rotates the camera, has a random range of rotation } procedure rotateCamera(); begin wait(randomRange(200,300)); mainScreen.setDegrees(random(0, 360), random(10,50)); canRotate.setTime(random(1500,2000)); timesRotatedCamera := timesRotatedCamera + 1; end; { Procedure: selectBoots Description: Selects minigame boots randomly Credit: Obscurity ---> https://villavu.com/forum/member.php?u=102053 } procedure selectBoots; begin writeLN('[procedure] selectBoots'); if length(bootsModel := ogl.getModels(tCardinalArray([940746976,432722987,3341867181]))) then begin if random(5)=0 then mouse.rightClickOption(bootsModel[random(3)].randomizePointEllipse(30),'Select') else mouse.click(bootsModel[random(3)].randomizePointEllipse(30)); end; wait(randomRange(4000,5000)); dialogue.clickContinue(); end; { Procedure: crossGangplank Description: Crosses the gangplank, randomly selects between right clicking and left clicking. } procedure crossGangplank(); var plankTPA: TPointArray; begin writeLn('Crossing plank'); if length(plankTPA := ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([1781393848,2892440677,3763942768,4136683396,4168949912])))) then begin case random(100) of 0..100: begin mouse.click(plankTPA[0].adjustPosition(0,5).randomizePointEllipse(4)) end; { disabled for right now due to minigame spotlight causing a lot of people to play which causes right click to be filled with a bunch of player names 0..: begin mouse.rightClickOption(plankTPA[0].adjustPosition(0,5).randomizePointEllipse(4),['Cross','Gangplank >']); end; } end; end end; { Procedure: startGame Description: Starts the game, calls crossGangplank and sets the variables needed for the paint. } procedure startGame(); var plankPosition: tPoint = [67,63]; begin wait(RandomRange(2000,2500)); rewardsLady := ogl.getModels(1538643377); knightChatModel := ogl.getModels(3360933869); failedChat := ogl.getTextures(714000); bootsModel := ogl.getModels(tCardinalArray([940746976,432722987,3341867181])).getVisible(); if (not bootsModel.isEmpty()) then selectBoots; if (not rewardsLady.isEmpty()) then begin writeLn('We won, +4 points'); timesCompleted := timesCompleted + 1; gamesPlayed := gamesPlayed + 1; end else if (not knightChatModel.isEmpty()) then begin writeLn('Knight died, RIP.'); timesKnightDied := timesKnightDied + 1; gamesPlayed := gamesPlayed + 1; end else if (not failedChat.isEmpty()) then begin writeLn('We failed to get enough damage, will try harder next time'); timesFailed := timesFailed + 1; gamesPlayed := gamesPlayed + 1; end; if (dialogue.hasDialogue()) then begin writeLn('Clicking continue'); repeat dialogue.clickContinue(); wait(randomRange(1000,1200)); until (not dialogue.hasDialogue()); end; wait(RandomRange(1200,1500)); if (timesResetCamera < 1) then begin case random(100) of 0..50: begin minimap.clickResetCamera(); timesResetCamera := timesResetCamera + 1; end; 51..100: begin mainscreen.setDegrees(0,50); timesResetCamera := timesResetCamera + 1; end; end; writeLn('Reset camera'); end; distanceFrom := (minimap.getLocalPosition().distanceFrom(plankPosition)); if (distanceFrom > 3) and (timesResetCamera <= 1) then begin writeLn('Distance from plank ' + ToStr(distanceFrom) + ' walking there now'); mouse.click(minimap.getScreenPosition([67,63]).randomizePointEllipse(12)); wait(round(distanceFrom * 1000)); end; wait(randomRange(2000,2200)); bootsModel := ogl.getModels(tCardinalArray([940746976,432722987,3341867181])).getVisible(); if (not bootsModel.isEmpty()) then selectBoots; crossGangplank(); end; { Procedure: areWeInBoat Description: Checks for the veteran flag minigame model that shows up when we get into the boat, if its not there will try to look for it again, since sometimes lag causes issues, if it cant find that checks to see if were inside pest control because sometimes the boat leaves so fast the model doesnt show up IF none of those two check out, will terminate. } procedure areWeInBoat(); begin wait(round((2 + distanceFrom) * 500)); veteranFlagModel := ogl.getModels(3040129356); if not veteranFlagModel.isEmpty() then writeLn('We made it onto the boat, cool') else if veteranFlagModel.isEmpty() then begin writeLn('WARNING: Did not make it onto the boat, checking one more time'); wait(randomRange(3000,5000)); veteranFlagModel := ogl.getModels(3040129356); damageModel := ogl.getModels(2263255518); if (not veteranFlagModel.isEmpty()) then writeLn('We actually made it in, never mind...') else if (not damageModel.isEmpty()) then writeLn('Were inside pest control...LAG?') else if (veteranFlagModel.isEmpty()) and (damageModel.isEmpty()) then begin writeLn('Still not in boat after searching, terminating...'); TerminateTheScript(); end; end; timesRotatedCamera := 0; end; { Procedure: waitForGameToStart Description: Waits until it finds the damage icon model from pest control (thanks obscurity for the idea to use that model) } procedure waitForGameToStart(); var timeWaiting: tCountDown; begin timeWaiting.setTime(random(240000, 270000)); doWePerformAntiBan(); writeLn('Waiting for game to start...'); actionBar.setQuickPrayer(false); repeat progressReport(); damageModel := ogl.getModels(2263255518); wait(randomRange(500, 700)); until not damageModel.isEmpty() or timeWaiting.isFinished(); if (not damageModel.isEmpty()) then writeLn('Game started!'); if timeWaiting.isFinished() then begin writeLn('Took too long to start game, terminating...'); TerminateTheScript(); end else exit; end; { Procedure: whereDoWeWalkTo Description: Decides what side of the game to walk to, favors the south more you can change the values to whatever you want Note: if we died, will just wait longer to start walking because of animation } procedure whereDoWeWalkTo(); begin begin damageModel := ogl.getModels(2263255518); if damageModel.isEmpty() then exit; wait(RandomRange(900, 1100)); case random(60) of 0..30: begin wait(randomRange(1000, 1500)); writeLn('Walking to the south'); tileWalk(2, [[0, 18], [0, 10], [0, 10]]); end; 31..45: begin wait(randomRange(1000, 1500)); writeLn('Walking to the west'); tileWalk(2, [[ - 10, 20], [ - 10, 5]]); end; 46..60: begin wait(randomRange(1000, 1500)); writeLn('Walking to the east'); tileWalk(2, [[15, 15], [10, 10]]); end; end end end; { Procedure: weDied Description: Dang we died, will just call whereDoWeWalkTo } procedure weDied(); begin writeLn('We died.'); repeat wait(randomRange(600,700)); until (actionbar.getLifePoints > 0) or (dialogue.hasDialogue()); if (not dialogue.hasDialogue()) then whereDoWeWalkTo() else exit; deathCounter := 0; end; { Procedure: attackPest Description: Clicks on the sent model, checks after clicking to see if we have a target or not, if we do it waits till we dont, if we dont have one will just exit } procedure attackPest(); var timeAttacking: tCountDown; pestPointArray: TPointArray; begin if length(pestPointArray := ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([1731643360,2547232634,2782989724,2899052740,3489785670,3915285997,547053328,617765920])).getVisible())) then begin case random(100) of 0..50: begin mouse.rightClickOption(pestPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20),['Attack Brawler','Attack Defiler','Attack Shifter','Attack Spinner','Attack Splatter','Attack Torcher']); end; 51..100: begin mouse.click(pestPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20)); end; end; end; canAttack.setTime(random(1500,1800)); end; procedure attackPortal(); var timeAttacking: tCountDown; portalPointArray: TPointArray; begin if length(portalPointArray := ogl.getClientMidPoint().closest(ogl.getModels(tCardinalArray([2547232634, 1446295722])).getVisible())) then begin case random(100) of 0..50: begin mouse.rightClickOption(portalPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20),['Attack Portal']); end; 51..100: begin mouse.click(portalPointArray[0].adjustPosition(0,-25).randomizePointEllipse(20)); end; end; end; canAttack.setTime(random(3000,3400)); end; { Procedure: insidePestControl Description: Loop for when inside pest control, will stop looping when it doesnt find the damage model inside of PC (the chat box that says we failed, the lady telling us we did good, and the kngiht) } procedure insidePestControl(); var timeSpentInGame, timeWaitingForNewGame: tCountDown; begin timesResetCamera := 0; whereDoWeWalkTo(); mainScreen.setDegrees(random(0,20),random(10,20)); actionbar.setQuickPrayer(QUICK_PRAYERS); timeSpentInGame.setTime(random(360000, 420000)); repeat progressReport(); allModels := ogl.getModels(TCardinalArray([1731643360,2782989724,2899052740,3489785670,3915285997,547053328,617765920])).getVisible(); allPortals := ogl.getModels(TCardinalArray([2547232634, 1446295722])).getVisible(); damageModel := ogl.getModels(2263255518); if (not allPortals.isEmpty()) and (canAttack.isFinished()) then attackPortal() else if (combat.hasTarget()) then begin writeLn('In combat, waiting...'); repeat wait(RandomRange(500,600)); allPortals := ogl.getModels(TCardinalArray([2547232634, 1446295722])).getVisible(); damageModel := ogl.getModels(2263255518); until (not combat.hasTarget()) or (timeSpentInGame.isFinished()) or (actionbar.getLifePoints <= 0) or (not allPortals.isEmpty()) or (damageModel.isEmpty()); end else if (not combat.hasTarget()) then begin if (allModels.isEmpty()) and (canRotate.isFinished()) then begin writeLn('Rotating to find pest'); rotateCamera(); end else if (not allModels.isEmpty()) and (canAttack.isFinished()) then attackPest(); end; if (actionbar.getLifePoints <= 0) then weDied(); if (timesRotatedCamera = 5) then begin writeLn('Couldnt find pests...walking south a bit to see if we can find anything'); tileWalk(2, [[0, 8]]); timesRotatedCamera := timesRotatedCamera + 1; end; until (timeSpentInGame.isFinished()) or (dialogue.hasDialogue()) or (timesRotatedCamera >= 10); if (timesRotatedCamera >= 10) then begin writeLn('Couldnt find pests after multiple camera rotates, waiting for new game [area most likely clear]'); actionbar.setQuickPrayer(false); timeWaitingForNewGame.setTime(random(210000,230000)); repeat wait(RandomRange(500,600)); damageModel := ogl.getModels(2263255518); until (timeWaitingForNewGame.isFinished()) or (damageModel.isEmpty()); if (timeWaitingForNewGame.isFinished()) then begin writeLn('Game took too long to start again'); terminateTheScript(); end; end; if (timeSpentInGame.isFinished()) then begin writeLn('Time in game lasted too long'); terminateTheScript(); end; end; { Procedure: whereAreWe(); Description: Detects where we are based on certain models will call the appropriate procedure or function (only runs once) } procedure whereAreWe(); begin wait(randomRange(500, 600)); veteranFlagModel := ogl.getModels(3040129356); damageModel := ogl.getModels(2263255518); if (veteranFlagModel.isEmpty()) and (damageModel.isEmpty()) then begin writeLn('Were outside starting script'); whereDidWeStart := 1; end else if (not veteranFlagModel.isEmpty()) then begin writeLn('Were in the boat...starting script'); whereDidWeStart := 2; end else if (not damageModel.isEmpty()) then begin writeLn('Were inside pestcontrol...starting script'); whereDidWeStart := 3; end; end; { Procedure: autoUpdateMe(); Description: Checks to see if you have the lastest version of the script Credit: Fady --> https://villavu.com/forum/member.php?u=152795 } procedure autoUpdateMe(); var newFile: integer; newScript, newFilePath: string; online_Version: extended; begin writeLn('Checking for updates...'); online_Version := strToFloat(getPage('http://static.frement.net/proxy.php?u=https://raw.githubusercontent.com/Introvertt/Adieuxs-Pestcontrol/master/Version.txt')); writeLn('Local Version ' + toStr(LOCAL_VERSION) + ', Online Version: ' + toStr(online_Version)+'.'); if online_Version > Local_Version then begin writeLn('Downloading the latest script version from GitHub'); newScript := getPage('http://static.frement.net/proxy.php?u=https://raw.githubusercontent.com/Introvertt/Adieuxs-Pestcontrol/master/Adieuxs%20Pestcontrol.simba'); newFilePath := scriptPath+ 'Adieuxs Pestcontrol v' + toStr(online_Version) +'.simba'; newFile := rewriteFile(newFilePath, true); if not writeFileString(newFile, newScript) then begin writeLn('Could not write to ' + newFilePath); terminateTheScript(); end; closeFile(newFile); writeLn('Latest script downloaded to ' + newFilePath); writeLn('Please use the new one to run the latest version!'); terminateScript(); end else writeLn('Local version is already up to date!'); end; begin autoUpdateMe(); ogl.setup(); GLXViewPort(x,y,x,y); ogl.setDebugMode(0); scriptPaintBMP := loadBitmap( AppPath + 'scripts\Adieuxs Pestcontrol\AdieuxsPestcontrolPaint.jpg'); whereAreWe(); repeat case (whereDidWeStart) of 1: begin startGame(); areWeInBoat(); waitForGameToStart(); insidePestControl(); whereDidWeStart := 0 end; 2: begin waitForGameToStart(); insidePestControl(); whereDidWeStart := 0; end; 3: begin insidePestControl(); whereDidWeStart := 0; end; end; startGame(); areWeInBoat(); waitForGameToStart(); insidePestControl(); until (gamesPlayed = GAMES_TO_PLAY); if (gamesPlayed = GAMES_TO_PLAY) then begin ClearDebug(); writeLn('We finished playing all our games. Terminating'); TerminateTheScript(); end; end.
Last edited by BuffaloBill; 08-08-2015 at 11:10 PM.
@BuffaloBill; That is so odd cause I have the exact opposite thing going on.
@BuffaloBill; thats strange it should be attacking portals and you shouldn't be getting access violation errors.
But if it does ever terminate from access violation errors your account would just be auto logged out after 5 min.
So you shouldn't worry about staying logged in, Ive also got a few failsafes and will be adding a lot more soon.
--- My Scripts ---
Oh yeah im not worried staying logged in at all im just babysitting because i talk to my clan while it does its thing and I restart it when it terminates lol
and strange is an understatement, grim is having no problems and im having all the problems :P I wish I had feedback from other people having this issue so I knew it wasnt just me because i feel like im doing something wrong -_-
It did tell me the line where the access violation was coming from once but I forgot to copy and paste it soooo im screwed haha
@Adieux; The only issue i've seen, which really isn't an issue, is this. Say we go east or west, and now that is the first portal to come up, very rarely will you not get the 5k zeal and then just sit there because everything has died. This is usually when I step in and run somewhere else to just make sure I get my points. This, like I said, happens rarely. I know it will run south to try and find more pests, but sometimes it just doesn't see them. Again, very rare. Also, I am up to 879 commendations and 589 thaler atm![]()
Damn thats a lot. Im going to work on that issue, as I've noticed it too (why going south is more common in the script)
I'll probably add it in so that if that portal is dead it will try to go to another one, it will take some time.
Also, Obscurity just sent me a fix for the continue chat issue. Will test when I get to the hotel and if it works I'll push out a quick update.
--- My Scripts ---
I am SO pissed. I was going to get a nice screen shot with 1k points but my inventory filled up and it couldn't take the boots so it terminated. At least I got the proggy.
![]()
No activity today? *GASP* Well, so far I have gotten full superior void and roughly 4.5 million exp along with fully charged silverhawk boots. Too bad this is only in the spotlight for 3 days.
--- My Scripts ---
There are currently 1 users browsing this thread. (0 members and 1 guests)