Tutorials:
| Utilizing the tools in Villavu | How to create Pythagoras theorem calculator in JavaScript | How to make a live signature of your Pascal Script | Concepts of Programming Tutorial | Worked on Frog Random with Justin for RS07
This is what it says after I put my info into it.
Error: Access violation at line 53
Execution failed.
The following DTMs were not freed: [0, 1, 2, 3, 4]
The following bitmaps were not freed: [SMART Debug Image]
File[C:\Simba\Includes\SRL-6/logs/SRL log (19-04-16 at 04.47.20 AM).txt] has not been freed in the script, freeing it now.
@bonsai, are you using the targetscreen.hastarget functions i've created or still using the DTM method?
Try this in blCombat.simba, would be glad to post it up.
Simba Code:function TcombatMgr.isInFight(ignoreEnemy0: boolean = false): boolean;
var
lock, healthBar, adrenaline, popup, yellowCircle, redCircle, enemy0, infight: boolean;
begin
// this is all useless junk to flash on the gui
lock := detectGoldLock();
popup := detectPopup();
redCircle := detectRedCircle();
yellowCircle := detectYellowCircle();
adrenaline := detectAdrenalineBar();
healthBar := detectHealthBar();
enemy0 := detectEnemy0();
refreshOverlay(lock, healthBar, adrenaline,
popup, yellowCircle, redCircle, enemy0, result);
if ((not ignoreEnemy0) and enemy0) then
// if we see the '0' on the enemy health, return "not in fight"
result := false
else
result := targetscreen.hasTarget();
end;
I haven't used ur fighter in ages will have a look at the code this weekend or so. I like the enemy0 thing, I might add that to my fighter scripts, because the enemy 0 target popup takes a while to close.
Was just wondering if you used the functions I created a while back.
First glance:
Can ditch the x, y: we created a wrapper func a while back
Code:result := findDTM(_combatGoldLockDTM, mainScreen.getBounds());
Same with the health/adren, also what dtm is it you look for?
Code:result := findDTM(_combatHealthDTM, x, y, b);
What DTM is this one? Was hoping you used the health bar instead of another DTM (also the x,y)
Code:if findDTM(_enemyHealth0DTM, x, y, mainscreen.getBounds()) then
Why dont you use cluster:
Code:atpa := TPAtoATPAEx(tpa, 50, 50);
Please dont determine all the booleans if you only need 3 of them :
Code:function TcombatMgr.isInFight(ignoreEnemy0: boolean = false): boolean;
Also your healthcheck calc the health 3 times, no real use since you'll have calced it three times before any form of healing has been parsed next gametick.
Either way, just using the targetscreen.hastarget has worked flawlessly for me.
Final edit:
I seem to like the code so far, but was hoping for some more stuff I could implement in my combat scripts.
Example of a style I use for combat scripts lately:
https://villavu.com/forum/showthread.php?t=115438
woudl you be able to update this script so it can continue to work? I've tried tweaking it myself but im running into quite a few errors :s
The mouse darts around after a kill and it cant find npc, when npc respawns it attacks, but then attacks another straight after, so its not waiting until one its fighting is dead before attacking next.
Error im receiving is "possible miss" did not detect start of fight" even though it did not miss and my player is mid fighting.
Do you have the combat pop-up enabled and moved to the corner as in the OP?
Locked or unlocked interfaces? I think it needs one or the other, can't recall which.
Try this mod and let us know if it works:
https://villavu.com/forum/showthread...54#post1373154
how do i implement that mod?
Hey bonsai, the SRL update fixed that problem.
For some reason now though, it doesn't detect the beginning of a fight so it runs around hitting everything and I get hit by everything in the room. What can I do to fix that?
+1 ^ this is the problem im having, can't detect start of fight still
Doesn't seem to use the melee threshold or ultimate ever. I've tried placing them in different locations, same result.
Whats the ban rate like with this script?
Interfaces locked or unlocked? Combat popup enabled and moved to the top left as in the OP?
It would be nice if ten other people are using the script if they could chime in and say it's working.
I posted some code a little ways up that can be replaces in blCombat.simba to see if it's just the lock detector.
That stuff was always messy. If using the automatic abilities (recommended) I don't think that uses the higher attacks. If manual, ultimates on the right, threshold in the middle, regular on the left. 1-9
Pretty much 0. Two or three claims in 2 years with no guarantee it was from this particular script.
Simple rule: don't bot on any account if you would honestly be upset/hurt if it got banned.
Locked interface, and I just went back and copied the op and everything it is still doing it.
I disabled XP popups thinking it was effecting it, it doesn't seem like it was.
All my setting are matching the simba set up guide. The only thing is my combat popup isn't as far left as yours, but I put it as far left that I could.
This is what it says, sometimes it kills one, but the majority of the time it runs around and aggros everything then I get smacked xD
***** TcombatMgr.attack: Fight initiated
***** TcombatMgr.attack: Probable miss, did not detect start of fight
***** TcombatMgr.attack: Fight initiated
***** TcombatMgr.attack: Probable miss, did not detect start of fight
im still getting the above error aswell, whats the go
i ran into the problem with the action bar
what worked for me was i wasusing your basic fighter as a skeleton and used your gethealth();
i reassigned the integers to my letters
it ended up coming out like sendKeys('(random letter)', 250, 40);
writeln('ate some food');
after that it started to eat .
not sure if this is even correct but its what worked for me maybe it will help someone else aswell
for some odd reason the ' ' made a difference
that being said using that modification you can copy and paste
procedure checkprayer();
begin
if ( actionBar.getPrayerPercent() < 80) then
begin
sendKeys('g', 250, 40);
writeln('potted up');
if ( actionBar.getPrayerPercent() < 10) then
begin
writeln('***** Terminating script due to prayer');
terminateScript();
end;
end;
end;
which adds prayer support instead of sgs
its your bare bones i just made a few small mods !
My script seems to attack the NPC that I have the colour file selected, but sometimes it'll get stuck by attacking a completely different NPC. For example, I'm using red spiders and it'll sometimes see a moss giant and constantly try to attack it.
I'm using range.
The script is not working with that code you posted above. I am trying to range and it wont detect the start of fights at all. It will end up terminating itself.
How are you guys getting this script to work? I used this way back but it won't scan the colors of the npcs I want to fight, could anyone help me out?
Make sure you guys have mouse over text enabled! and always show target information enabled1 both are in interface settings.
There are currently 1 users browsing this thread. (0 members and 1 guests)