PDA

View Full Version : Soulsplit Fighter [Beta]



rj
01-07-2014, 10:20 PM
Soulsplit Fighter [Beta]
Requested by numerous people




This script is in BETA mode. The combat detection is a little bit scratchy ATM. So don't cry when it does not detect combat well :)


You need my RSPS include from https://github.com/officerBarbrady/srlRSPS

Use 'old school' graphics on Soulsplit. Your simba interpreter must be set to 'lape'.

By default it is set up to kill cave crawlers

Hoodz
01-07-2014, 10:27 PM
nice release!

just one question, i see you are using this function a lot:
function center(bx: TBox): TPoint;
begin
if ((bx.X1 > bx.X2) or (bx.Y1 > bx.Y2)) then
begin
if (bx.X1 > bx.X2) then
Swap(bx.X1, bx.X2);
if (bx.Y1 > bx.Y2) then
Swap(bx.Y1, bx.Y2);
end;
Result := Point(Round(bx.X1 + ((bx.X2 - bx.X1) div 2)), Round(bx.Y1 + ((bx.Y2 - bx.Y1) div 2)));
end;


why dont you include it in your rsps include?

rj
01-07-2014, 10:33 PM
nice release!

just one question, i see you are using this function a lot:
function center(bx: TBox): TPoint;
begin
if ((bx.X1 > bx.X2) or (bx.Y1 > bx.Y2)) then
begin
if (bx.X1 > bx.X2) then
Swap(bx.X1, bx.X2);
if (bx.Y1 > bx.Y2) then
Swap(bx.Y1, bx.Y2);
end;
Result := Point(Round(bx.X1 + ((bx.X2 - bx.X1) div 2)), Round(bx.Y1 + ((bx.Y2 - bx.Y1) div 2)));
end;


why dont you include it in your rsps include?
it's in there under inventory type forgot :s

Olly
01-07-2014, 10:35 PM
Or could just use MiddleBox, which is even faster ;)

rj
01-07-2014, 10:36 PM
Or could just use MiddleBox, which is even faster ;)

Yea I have had a habbit of using centerbox because Jani sent to me with explode box in a snippet a long time ago and I used them both ever sense

womanjuice
01-12-2014, 02:10 PM
Hey thanks for the script, ran it all night at the cave crawlers and worked great. I'm new to the Simba scene and don't fully understand the code yet; if I am trying to change the monster I want it to attack I'm assuming the values I would change would be color,health,uptext, and name. Does anything else have to be modified?

Spiritkid
01-14-2014, 09:10 PM
it's in there under inventory type forgot :s

hey, im using your script it says this:

Compiled successfully in 312 ms.
Successfully executed.
Compiled successfully in 343 ms.
Successfully executed.
Compiled successfully in 312 ms.
Successfully executed.
Compiled successfully in 343 ms.
Successfully executed.

when i click run it stops after 2-3 secs

rj
01-14-2014, 09:12 PM
hey, im using your script it says this:

Compiled successfully in 312 ms.
Successfully executed.
Compiled successfully in 343 ms.
Successfully executed.
Compiled successfully in 312 ms.
Successfully executed.
Compiled successfully in 343 ms.
Successfully executed.

when i click run it stops after 2-3 secs
Did you select the client?

Spiritkid
01-14-2014, 09:32 PM
Did you select the client?

fixed it, had set so "lape", then reload simba,

but now i have some problems to select other mother like moss giant :P

Spiritkid
01-14-2014, 09:43 PM
Did you select the client?

can you probs. help me what do i need to change when i want fight other monsters?:)

trashcan
01-19-2014, 07:46 AM
"Exception in Script: Don't know which overloaded method to call with params (Int32, AnsiString, function():AnsiString, function():array of record [0]AnsiString; [4]record [0]Int32; [4]Int32; [8]Int32; [12]Int32; end; [20]record [0]Int32; [4]Int32; [8]Int32; [12]Int32; end; end) at line 229, column 6"
how do i fix this?

rj
01-19-2014, 08:05 PM
"Exception in Script: Don't know which overloaded method to call with params (Int32, AnsiString, function():AnsiString, function():array of record [0]AnsiString; [4]record [0]Int32; [4]Int32; [8]Int32; [12]Int32; end; [20]record [0]Int32; [4]Int32; [8]Int32; [12]Int32; end; end) at line 229, column 6"
how do i fix this?

Redownload it, uploading a new version that fixed the error (I updated the include and the script got outdated)

koryperson
01-19-2014, 08:24 PM
can you probs. help me what do i need to change when i want fight other monsters?:)


procedure _monster.init;
begin
with self do
begin
color := [9148055]; //change 9148055 to the color of your monster
tol := [15];
health := 22; //input how much health it has
filter := 130;
hue := [0.10];
sat := [0.15];
uptext := ['ave','rawl','raw']; //change the ave rawl and raw to the words of your monster, Moss Giant = ['oss', 'iant']
options := ['ttack','tack'];
rightClick := true;
useUptext := true;
checkCombat := false;
name := 'Cave crawler'; //change to the name of your monster
end;
end;

trashcan
01-20-2014, 03:19 AM
thanks for the fix, but after running for 10s, i get this error

"Uptext [ave, rawl, raw] not found
Unexpected out of combat"

koryperson
01-20-2014, 06:51 AM
thanks for the fix, but after running for 10s, i get this error

"Uptext [ave, rawl, raw] not found
Unexpected out of combat"

Are you using the built in cave crawler colors n stuff, or trying to use your own monster? If you are using your own, be sure to change the uptext to match your monster, and always leave out the first letter. Moss Giant = ['oss', 'iant']

trashcan
01-20-2014, 08:32 AM
Are you using the built in cave crawler colors n stuff, or trying to use your own monster? If you are using your own, be sure to change the uptext to match your monster, and always leave out the first letter. Moss Giant = ['oss', 'iant']

built-in cave crawlers

Volture
01-20-2014, 12:19 PM
Is this for the soul split that just came out, or the one that's been out?

koryperson
01-20-2014, 07:35 PM
built-in cave crawlers

Are you using the settings it says to use? OldSchool graphics?

trashcan
01-21-2014, 11:05 AM
Are you using the settings it says to use? OldSchool graphics?
I did everything as instructed.

hossie
01-21-2014, 02:50 PM
I'm getting this error :
Exception in Script: File "RSPS/srlRSPS.Simba" not found at line 1, column 5
I think I got to install srlRSPS.simba, but where do I get it and how do I install it?

rj
01-21-2014, 08:18 PM
I'm getting this error :
Exception in Script: File "RSPS/srlRSPS.Simba" not found at line 1, column 5
I think I got to install srlRSPS.simba, but where do I get it and how do I install it?

Download the .zip from the link, extract it to c:/simba/includes, and then rename 'srlRSPs-master' to 'srlRSPS'

koryperson
01-21-2014, 09:56 PM
By the way Brady, what do the functions in your include support? Only 317?

And if it isn't too much hassle, do you have a small list of the most useful functions in your include as well?

rj
01-21-2014, 10:16 PM
By the way Brady, what do the functions in your include support? Only 317?

And if it isn't too much hassle, do you have a small list of the most useful functions in your include as well?

Yea I was planning on making a list, the include is rather difficult to use if you are not familar with lape. When I am finished I will be writing a tutorial on how to use it. All of the follows are available for 317 servers:


-317 functions -

chatbox.simba

function _317_getchat(line:integer;colors:tintegerArray):st ring;
function _rsps_server.getChatText(line:integer):string;
function _rsps_server.getChatText:tstringarray; overload;
function _rsps_server.clickNpcText(text:string):boolean;

inventory.simba

function rsps_inventory.slotFull(slot:Integer):Boolean;
function rsps_inventory.count:Integer;
function rsps_inventory.full:Boolean;
procedure rsps_inventory.interactItem(slot:Integer; Button:Integer);
function rsps_inventory.searchBitmap(BMPSearch, tol:Integer;click, cont:Boolean):Boolean;
function rsps_inventory.countBitmap(bmpSearch, tol:Integer):Integer;
function rsps_inventory.countDTM(DTMSearch:Integer):Integer ;
function rsps_inventory.searchDTM(DTMSearch:Integer;click, cont:Boolean;button:Integer):Boolean;
function rsps_inventory.searchDTM(DTMSearch:Integer;cont:Bo olean;button:Integer):Boolean; overload;
function rsps_inventory.searchDTM(DTMSearch:Integer;button: Integer):Boolean; overload;

mainscreen.simba

function _rsps_server.findObject(Colors, tols:TintegerArray;hue,sat:TExtendedArray;dist, minLength:integer;uptext:tstringarray;Useuptext,ri ghtClick:boolean):boolean;
function _rsps_server.findObject(Color, tol:integer;hue,sat:Extended;dist, minLength:integer;uptext:tstringarray;Useuptext,ri ghtClick:boolean):boolean; overload;
function _rsps_server.findObject(Color, tol:integer;hue,sat:Extended;uptext:tstringarray): boolean; overload;

minimap.simba

function minimap.getText(b:tbox;colors:tintegerArray;font:s tring):integer;
function minimap.getHealth:integer;
function minimap.getPrayer:integer;
function minimap.getRun:integer;
function minimap.getCompassRadians:Extended;
function minimap.GetCompassAngleDegrees:Extended;
function minimap.getDots(color, tol:integer;hmod, smod:extended):integer;

mouse.simba

procedure mmouse(x, y, rx, ry: integer);
procedure mmouse(x, y:Integer);overload;
procedure ClickMouse2(button: variant);
procedure Mouse(mousex, mousey, ranx, rany: Integer; button: variant);
procedure Mouse(mousex, mousey: Integer; button: variant);overload;
procedure Mouse(mousex, mousey: Integer; button: fnct_actionOptions);overload;
procedure Mouse(mousex, mousey: Integer)overload;
procedure MouseBoxEx(x1, y1, x2, y2: Integer; Dist,ClickType: Integer);

text.simba

function _317_getuptext():string;
function _317_GetChooseOptions(): Array of TOptions;
function _rsps_server.chooseOptionMulti(Texts: TStringArray; TextType: String; Action: fnct_ActionOptions): Boolean;
function _rsps_server.chooseOptionMulti(Txt: TStringArray): Boolean; overload;
function _rsps_server.chooseOption(Txt, TextType: string): Boolean;
function _rsps_server.chooseOption(Txt: String): Boolean; overload;
procedure TypeSend(Text: string; PressEnter: Boolean);
procedure TypeSend(Text: string);overload;

timing.simba
function _rsps_server.WaitOptionMulti(S: TStringArray; TextType: string; Action: fnct_ActionOptions; Time: Integer): Boolean;
function _rsps_server.IsUpTextMulti(Text: TStringArray): Boolean;
function _rsps_server.waitOptionMulti(S: TStringArray; Time: Integer): Boolean; overload;
function _rsps_server.waitUpTextMulti(S: TStringArray; Time: Integer): Boolean;
function _rsps_server.IsUpText(UpText: string): Boolean;
function WaitFunc(Func: function: Boolean; WaitPerLoop, MaxTime: Integer): Boolean;
procedure markTime(var t:Integer);
function timeFromMark(i:Integer):Integer;
function MsToTime(MS, TheType: Integer): string;

koryperson
01-21-2014, 11:26 PM
Ahhh thanks for that, although I'm not even near familiar with Lape so I'll just avoid it x)

imonlymatty
01-25-2014, 01:39 PM
Hey, I'm new to Simba and all that, and I'm not really sure how to use this script; let alone any scripts. I am using the portable version and when I attempt to run it, I get this error: Exception in Script: Found unexpected token "(", expected "Identifier" at line 11, column 26 in file "C:\testmw\Simba\Includes\RSPS\core\inventory.simba".
Any help would be appreciated!

rj
01-25-2014, 02:40 PM
Hey, I'm new to Simba and all that, and I'm not really sure how to use this script; let alone any scripts. I am using the portable version and when I attempt to run it, I get this error: Exception in Script: Found unexpected token "(", expected "Identifier" at line 11, column 26 in file "C:\testmw\Simba\Includes\RSPS\core\inventory.simba".
Any help would be appreciated!

What do you mean portable version?

And re-download the include it has probably been updated since the last time you downloaded it

imonlymatty
01-25-2014, 03:45 PM
I didn't install Simba via administrator permissions - I downloaded it somewhere else which I cannot remember and it had a version of Simba that does not require administrator permissions.
As for re-downloading the include, I have only just downloaded it so I don't think that that is the case. However I will try this, and report back. Thank you very much for your help!

EDIT: I have tried what you have suggested: re-downloading the include. However, this does not seem to resolve the problem and still it gives me the same error.
Thank you very much for the support though!

koryperson
01-25-2014, 07:20 PM
Hey, I'm new to Simba and all that, and I'm not really sure how to use this script; let alone any scripts. I am using the portable version and when I attempt to run it, I get this error: Exception in Script: Found unexpected token "(", expected "Identifier" at line 11, column 26 in file "C:\testmw\Simba\Includes\RSPS\core\inventory.simba".
Any help would be appreciated!

Did you get his RSPS include?

imonlymatty
01-26-2014, 09:53 AM
Did you get his RSPS include?

Yes.

koryperson
01-27-2014, 06:00 AM
Yes.

Sorry man, I'm all outta ideas, Barbrady might know though :P

rj
01-27-2014, 08:31 PM
Sorry man, I'm all outta ideas, Barbrady might know though :P

Probably didn't even install simba 1.00


I didn't install Simba via administrator permissions - I downloaded it somewhere else which I cannot remember and it had a version of Simba that does not require administrator permissions.

rj
02-07-2014, 10:23 PM
ATTENTION

BETA VERSION 2 IS OUT

changelog:

- In combat 50000% more accurate
- Better monster filtering
- Slightly faster monster fighting
- Looting beta (buggy, loots terribly)

Future:

- Eating
- Pray pots
- Pray
- Super attack/strength pots



New debug log, anytime the script is buggy just copy and paste the simba debug and paste it here using code tags

! variable value
@ function called
# loop
$ time
% calling function
& error
* result
^ message
SRL RSPS.525 Soulsplit set up in 0 ms
@procedure _ssFight
@ function _monster.find:boolean
# for 0 to 0
% SetColorSpeed2Modifiers(0.10.15)
% findColorsTolerance([]9148055{X1 = 2, Y1 = 57, X2 = 514, Y2 = 392}15)
! matpa.length=5
# for 0 to 4
% checkCombat
% Uptext [ave, rawl, raw] not found
% Mouse(248 240 0, 0, Mouse_right)
@ end@_monster.find@
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=214
@ end@differentCount@
* True
@ end@inCombat@
^ in combat
@ function getRedDots:TPointArray
@ end@getRedDots@
# while inCombat
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=205
@ end@differentCount@
* False
@ end@inCombat@
@ function differentCount(1000): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=205
@ end@differentCount@
^ out of combat
@ function getRedDots:TPointArray
@ end@getRedDots@
@ _loot_array.pickUp(orig, dots:TPointArray)
@ function getRedDots:TPointArray
@ end@getRedDots@
# for 0 to 1
@ function ss_MMtoMsPoint({X = 619, Y = 137}):TPoint
@ procedure ss_MMToMS(619 137):Integer)
! 201 211
@ end@ss_MMToMS@
* {X = 201, Y = 211}
@ end@ss_MMtoMsPoint@
# for 0 to 1
# for 0 to 2
@ function isText([Walk here, Cancel][ake old, ld cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Gr, en cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Coi, oins]): Boolean
@ end@isText@
$ Calculations took 63 ms
@ function ss_MMtoMsPoint({X = 0, Y = 0}):TPoint
@ procedure ss_MMToMS(0 0):Integer)
! 3 3
@ end@ss_MMToMS@
* {X = 3, Y = 3}
@ end@ss_MMtoMsPoint@
# for 0 to -1
# for 0 to 2
@ function isText([][ake old, ld cha]): Boolean
@ end@isText@
@ function isText([][ake Gr, en cha]): Boolean
@ end@isText@
@ function isText([][ake Coi, oins]): Boolean
@ end@isText@
$ Calculations took 31 ms
! Loot count 0
# for 0 to 0
# for 0 to 2
& did not find [ake old, ld cha]
& did not find [ake Gr, en cha]
& did not find [ake Coi, oins]
@ end@_loot_array.pickUp@
@end@_ssFight@
@procedure _ssFight
@ function _monster.find:boolean
# for 0 to 0
% SetColorSpeed2Modifiers(0.10.15)
% findColorsTolerance([]9148055{X1 = 2, Y1 = 57, X2 = 514, Y2 = 392}15)
! matpa.length=4
# for 0 to 3
% checkCombat
% Uptext [ave, rawl, raw] not found
% Mouse(273 267 0, 0, Mouse_right)
@ end@_monster.find@
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=205
@ end@differentCount@
* True
@ end@inCombat@
^ in combat
@ function getRedDots:TPointArray
@ end@getRedDots@
# while inCombat
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=207
@ end@differentCount@
* False
@ end@inCombat@
@ function differentCount(1000): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=207
@ end@differentCount@
^ out of combat
@ function getRedDots:TPointArray
@ end@getRedDots@
@ _loot_array.pickUp(orig, dots:TPointArray)
@ function getRedDots:TPointArray
@ end@getRedDots@
# for 0 to 1
@ function ss_MMtoMsPoint({X = 627, Y = 145}):TPoint
@ procedure ss_MMToMS(627 145):Integer)
! 252 262
@ end@ss_MMToMS@
* {X = 252, Y = 262}
@ end@ss_MMtoMsPoint@
# for 0 to 1
# for 0 to 2
@ function isText([Walk here, Cancel][ake old, ld cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Gr, en cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Coi, oins]): Boolean
@ end@isText@
$ Calculations took 63 ms
@ function ss_MMtoMsPoint({X = 0, Y = 0}):TPoint
@ procedure ss_MMToMS(0 0):Integer)
! 3 3
@ end@ss_MMToMS@
* {X = 3, Y = 3}
@ end@ss_MMtoMsPoint@
# for 0 to -1
# for 0 to 2
@ function isText([][ake old, ld cha]): Boolean
@ end@isText@
@ function isText([][ake Gr, en cha]): Boolean
@ end@isText@
@ function isText([][ake Coi, oins]): Boolean
@ end@isText@
$ Calculations took 47 ms
! Loot count 0
# for 0 to 0
# for 0 to 2
& did not find [ake old, ld cha]
& did not find [ake Gr, en cha]
& did not find [ake Coi, oins]
@ end@_loot_array.pickUp@
@end@_ssFight@
@procedure _ssFight
@ function _monster.find:boolean
# for 0 to 0
% SetColorSpeed2Modifiers(0.10.15)
% findColorsTolerance([]9148055{X1 = 2, Y1 = 57, X2 = 514, Y2 = 392}15)
! matpa.length=4
# for 0 to 3
% checkCombat
% Uptext [ave, rawl, raw] not found
% Mouse(246 243 0, 0, Mouse_right)
@ end@_monster.find@
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=207
@ end@differentCount@
* False
@ end@inCombat@
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=207
@ end@differentCount@
* True
@ end@inCombat@
^ in combat
@ function getRedDots:TPointArray
@ end@getRedDots@
# while inCombat
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=209
@ end@differentCount@
* True
@ end@inCombat@
^ wait
@ function inCombat:boolean
@ function differentCount(2700): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=207
@ end@differentCount@
* False
@ end@inCombat@
@ function differentCount(1000): Boolean
@ function xpBarOpen:boolean
* True
@ end@xpBarOpen@
! _white_count=207
@ end@differentCount@
^ out of combat
@ function getRedDots:TPointArray
@ end@getRedDots@
@ _loot_array.pickUp(orig, dots:TPointArray)
@ function getRedDots:TPointArray
@ end@getRedDots@
# for 0 to 1
@ function ss_MMtoMsPoint({X = 630, Y = 142}):TPoint
@ procedure ss_MMToMS(630 142):Integer)
! 271 243
@ end@ss_MMToMS@
* {X = 271, Y = 243}
@ end@ss_MMtoMsPoint@
# for 0 to 1
# for 0 to 2
@ function isText([Walk here, Cancel][ake old, ld cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Gr, en cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Coi, oins]): Boolean
@ end@isText@
$ Calculations took 47 ms
@ function ss_MMtoMsPoint({X = 633, Y = 142}):TPoint
@ procedure ss_MMToMS(633 142):Integer)
! 290 243
@ end@ss_MMToMS@
* {X = 290, Y = 243}
@ end@ss_MMtoMsPoint@
# for 0 to 1
# for 0 to 2
@ function isText([Walk here, Cancel][ake old, ld cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Gr, en cha]): Boolean
@ end@isText@
@ function isText([Walk here, Cancel][ake Coi, oins]): Boolean
@ end@isText@
$ Calculations took 62 ms
! Loot count 0
# for 0 to 0
# for 0 to 2
& did not find [ake old, ld cha]
& did not find [ake Gr, en cha]
& did not find [ake Coi, oins]
@ end@_loot_array.pickUp@
@end@_ssFight@
@procedure _ssFight
@ function _monster.find:boolean
# for 0 to 0
% SetColorSpeed2Modifiers(0.10.15)
% findColorsTolerance([]9148055{X1 = 2, Y1 = 57, X2 = 514, Y2 = 392}15)
! matpa.length=3
Successfully executed.
The following bitmaps were not freed: [0]