PDA

View Full Version : [FireMaking] [OGL] Bonfire



Chaos-Energy
07-05-2015, 01:33 PM
[OGL] Bonfire

This script burns logs by throwing them in a bonfire at the Grand Exchange or at the deposit box at the Summer Beach Event.

Extra features


Support for all logs.
Interacts with Fire Spirits.
Works at various resolutions
Reports progress
Automatically updates


Installation

The easiest way is to download the ChaosUpdater script below and run it. It should have OGLBonfire added to the scripts array which makes it download the latest version for you. You can also download or clone the script from GitHub manually. Remember that you also need the cLib include for this script to work. If you're downloading the script manually you'll have to download this include manually as well from this thread (https://villavu.com/forum/showthread.php?t=113750).

Known bugs

None

Changelog (https://raw.githubusercontent.com/yuri-moens/simba-scripts/master/OGLBonfire.changelog)

This run was done with a 5% experience boost at the Summer Beach Event.


=========================================
Running for: 0h 32m
Logs burnt: 504
Logs burnt per hour: 940
Experience earned: 89511
Experience per hour: 167033
=========================================

Lucidity
07-05-2015, 02:04 PM
Congratulations on your release!

Edit : your auto updater doesn't exactly work, just a heads up!

Obscurity
07-05-2015, 05:57 PM
Rather then use player IDs to check if you're firemaking, I found it worked great to periodically check your inventory count. If the count hasn't changed in x-amount of time, you're not burning. For example:

procedure waitWhileBurning;
var
funcBreak:boolean;
funcCountCurrent,
funcCountLast:int32;
funcWait:tCountDown;
begin
repeat
if funcWait.isFinished() then
if ((funcCountCurrent:=inventory.getItems(123456).ind exes())=funcCountLast) or (funcCountCurrent=0) then
funcBreak:=true
else
begin
funcCountLast:=funcCountCurrent;
funcWait.setTime(normalRandom(2000,5000));
end;
until funcBreak;
end;

I don't remember the exact times, so 2000,5000 is just a guess.

Not needed, of course, but for those who are clueless as to how to get the player ID or too damn lazy. :P.

The Mayor
07-05-2015, 06:07 PM
Congratulations on your release!

Edit : your auto updater doesn't exactly work, just a heads up!

Because Simba doesn't support https, unless you have the prosocks plugin.

Chaos-Energy
07-05-2015, 07:07 PM
Rather then use player IDs to check if you're firemaking, I found it worked great to periodically check your inventory count. If the count hasn't changed in x-amount of time, you're not burning. For example:

procedure waitWhileBurning;
var
funcBreak:boolean;
funcCountCurrent,
funcCountLast:int32;
funcWait:tCountDown;
begin
repeat
if funcWait.isFinished() then
if ((funcCountCurrent:=inventory.getItems(123456).ind exes())=funcCountLast) or (funcCountCurrent=0) then
funcBreak:=true
else
begin
funcCountLast:=funcCountCurrent;
funcWait.setTime(normalRandom(2000,5000));
end;
until funcBreak;
end;

I don't remember the exact times, so 2000,5000 is just a guess.

Not needed, of course, but for those who are clueless as to how to get the player ID or too damn lazy. :P.

That's the method I originally used but I changed it to using models because the active waiting method feels a lot less responsive to me. Throwing a log on a bonfire takes 6 in-game ticks which is 3.6 seconds so in the best case scenario we only know we're not burning after 3.6 seconds of actually having stopped. Another reason I opted for the models option is that the script doesn't get stuck in an active waiting loop. While burning we can still loop through all the other checks really quickly (Fire Spirits or execute the, albeit limited, antiban). The disadvantage is indeed the fact that everyone has to get their own models but I feel the benefits outweigh the advantages.


Because Simba doesn't support https, unless you have the prosocks plugin.

I had no idea about this. Can't even remember me ever getting the ProSocks plugin so thanks for this.

Lucidity
07-05-2015, 08:19 PM
That's the method I originally used but I changed it to using models because the active waiting method feels a lot less responsive to me. Throwing a log on a bonfire takes 6 in-game ticks which is 3.6 seconds so in the best case scenario we only know we're not burning after 3.6 seconds of actually having stopped. Another reason I opted for the models option is that the script doesn't get stuck in an active waiting loop. While burning we can still loop through all the other checks really quickly (Fire Spirits or execute the, albeit limited, antiban). The disadvantage is indeed the fact that everyone has to get their own models but I feel the benefits outweigh the advantages.



I had no idea about this. Can't even remember me ever getting the ProSocks plugin so thanks for this.

I use this for my divination script, you could use it.

Generally players ID's are more unique than the surrounding models. They generally have a TID of 1000+, with said you could easily sort out the player ID and have the script get it.

var playerID: uInt32;

The following will make a box around the center point (where your character is) and it'll assign the ID found of the TID>=1000 and assign it to playerID, just call getPlayerID in script start up.

function getPlayerID(): uInt32;
var
models: glModelArray;
wantedPoint, clientCenter: TPoint;
playerBox: TBox;
i: integer;
begin
models:=ogl.getModels();
clientCenter:=ogl.getClientMidPoint();
playerBox:=intToBox(clientCenter.x-60, clientCenter.y-25, clientCenter.x+40, clientCenter.y+40);
if length(models) then
begin
for i := 0 to models.maxIndex() do
begin
if (models[i].TID >= 1000) then
begin
wantedPoint:=models[i].toPoint();
if pointInBox(wantedPoint, playerBox) then
begin
result:=(models[i].ID);
playerID:=(result);
end;
end;
end;
end;
end;

Example of usage (in your scenario)
function isFiremaking(): boolean;
begin
if ogl.getModels(playerID).isEmpty() then
begin
exit(true);
end else
exit(false);
end;

Chaos-Energy
07-06-2015, 08:31 AM
Great idea, never bothered looking at the TID compared to other models so I never thought about doing it like that. I edited the function a bit to make it shorter though.


function getPlayerId: integer;
var
funcModels: glModelArray;
funcPlayerModelBox: tBox;
i: integer;
begin
funcPlayerModelBox := intToBox(clientCenter.x - 60, clientCenter.y - 25, clientCenter.x + 40, clientCenter.y + 40);
funcModels := ogl.getModels(funcPlayerModelBox);

if (length(funcModels)) then
begin
for i := low(funcModels) to high(funcModels) do
if (funcModels[i].TID >= 1000) then
result := funcModels[i].ID;
end;
end;

Mackster
07-09-2015, 01:07 PM
DirectX Compatible please?

Clarity
07-09-2015, 02:20 PM
DirectX Compatible please?
OGL interception scripts can only be used with OpenGL graphics mode. If you need a DirectX script, you will have to use color for now.

Here is Ashaman's SRL-6 (color) bonfire script: https://villavu.com/forum/showthread.php?t=89746

Lstew51
08-02-2015, 10:39 PM
Getting this error..

until (production.hasProduction()) or (funcTimeout.isFinished());
at line 147

Chaos-Energy
08-03-2015, 05:44 PM
Getting this error..

until (production.hasProduction()) or (funcTimeout.isFinished());
at line 147

Fixed in 2.3.4.

Lstew51
08-03-2015, 06:38 PM
Thanks gonna go try it out now. Thanks

Lstew51
08-03-2015, 06:51 PM
13:49:53 | OGLBonfire > setup
[S.M.A.R.T] Found your java path @ C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe
Error: "4
" is an invalid integer at line 574
Execution failed.
The following bitmaps were not freed: [0]


Still having this issue.

Chaos-Energy
08-03-2015, 07:49 PM
Seems like a plug-in of my editor added a newline to the version files which caused the error. You should be able to update now.

General_Patrick
08-04-2015, 04:19 AM
I really want to try this script out, but I am getting this error:

Error: Operator "cmp_Equal" not compatible with types "(False=0, True=1)" and "AnsiString" at line 428

Chaos-Energy
08-04-2015, 08:17 AM
Have you updated ogLib?

General_Patrick
08-11-2015, 01:46 AM
Here's another error that i'm getting:

Oops! It appears I have crashed.
Error: Access violation at line 212
exit((funcPointerSize>3) and ((funcPointer+oglTextureSize)^.id=6887954) or ((funcPointer+2*oglTextureSize)^.id=6887954));
Execution failed.
The following bitmaps were not freed: [0]

This one looks like it comes from the login process. I never get to the point where it types my password.

Xei
08-11-2015, 05:08 AM
It keeps Crashing :C

General_Patrick
08-16-2015, 12:03 AM
For those trying to use this script to properly, I have done it. If you still have not figured out how to get it to work, here are my tips to get it started :



Have the latest version of OGL bonfire.

Have the latest version of cLib.

Have the latest version of OgLib.

You can use standard SMART settings for this script, but I am not sure if any new bugs will arise from doing so.

If you cannot have the full SMART screen be shown. You have the option to change the dimensions. This will NOT break the bot. Just change the resolution on lines 49 & 50. If you're using standard SMART settings, you choose 800x600

Make sure that bank preset 1 has been set to have a full inventory of your chosen log. Note that this script works with ALL logs.

Ensure that your log of choice in your action bar. This is crucial if you want the bot to function.

Make sure you have set your chosen log on line 38 of the script.

If the script is having trouble logging into your account, you can manually login and select the world of your choice. Again, this will not break the bot.



For Mr.Miner :

Here is a quick xp log that i got from your script. Since I am not as skilled in programming as you are, I hope you can fix this issue or at least tell me how to fix it.


=========================================
Running for: 0h 12m
Logs burnt: 56
Logs burnt per hour: 279
Experience earned: 0
Experience per hour: 0
=========================================

Secondly, there seems to be a bug when there is a red dragon pet flying. The bot thinks it is a fire spirit even though it is obviously not. Because of this quirk, the bot goes on an endless loop of clicking in the same spot. Currently, I am in the process of finding another color to fix this issue. I will let you know when i have found a better color.