SRL Archive - OSR Help

Couple of basic questions and a couple of questions for scripting RSPS's


Twinki

2013-06-02 22:06:25

I've started scripting for a 714 RSPS that is almost the exact same as EoC. So far i've been able to script some bots that work pretty well that get about 10 hour+ proggies, but I have been looking at multiple guides like SPS Mapping. I have other questions that are listed below.

Note: The RSPS i've been scripting is almost the EXACT same as EoC. The world map is about 99% the same. The only difference is that EoC has abilities, this RSPS uses the old combat system.


[LEFT]SPS Mapping for an RSPS[/LEFT]
Can you create a SPS map for a 714 RSPS? The world map is almost the exact same as the current EoC world map. If so how exactly does SPS mapping work? For example I have created a script in Kuradal's Dungeon that will run to a safespot and eat then run back but the problem is that everytime I reload the client all the colors change, and I have to re-do the colors. Note: I do learn better from an example, even if it's a script example.


[LEFT]Is there some tool or a way to draw a box on the window / client?[/LEFT]
Is there some sort of tool or code I can use to draw a box from the coordinates I give it on the activated window / client?


[LEFT]How would I make the bot right click where a monster dies and looks for loot?[/LEFT]
I've been able to make a script that attacks a monster (It can find the monster and click it.. but it's not flawless I use AveragePixelShift and sometimes it's a little off and will attack the monster again) eats and banks. Now the monster always drops loot like Dragon Bones for example, but I have no idea how to make it right click where the monster died and look for loot.
This is for an RSPS.

I will probably end up thinking about more questions to ask and will probably edit this thread.

tealc

2013-06-02 22:54:30

These should get you started post if you have more questions

Custom sps maps
http://villavu.com/forum/showthread.php?t=84360

Stuff for drawing on the screen, it only works with smart
https://github.com/SRL/SRL-5/blob/master/SRL/misc/SmartGraphics.simba


When you use an include you can use all the functions and variables in the include
topix has a custom include (topixtools) it can be found here http://villavu.com/forum/showthread.php?t=92160

rj

2013-06-02 23:02:15

You could edit sps, all you need it mm coords, mm length, and a dtm of the flag. Look for it under research and development lounge, ill help you when I get home in a week with a custom sps include.

Twinki

2013-06-02 23:42:36

From: tealc
These should get you started post if you have more questions

Custom sps maps
http://villavu.com/forum/showthread.php?t=84360

Stuff for drawing on the screen, it only works with smart
https://github.com/SRL/SRL-5/blob/master/SRL/misc/SmartGraphics.simba


When you use an include you can use all the functions and variables in the include
topix has a custom include (topixtools) it can be found here http://villavu.com/forum/showthread.php?t=92160


That sucks that there isn't a tool for drawing boxes.. I don't think I'm able to use the RSPS client with SMART..

Thanks :) I'll take a look at that include and see if I can figure it out.. :P

From: Officer Barbrady
You could edit sps, all you need it mm coords, mm length, and a dtm of the flag. Look for it under research and development lounge, ill help you when I get home in a week with a custom sps include.


I have no idea how to even work SPS maps, I haven't even attempted to make one. Do you know if the SPS Path Generator will also work with a RSPS?


Another thing: The coordinates for this RSPS are off by 7 from EoC on the y axis. At Least I hope it is.. I noticed that when I was doing my 2nd script.

rj

2013-06-02 23:46:44

From: Twinki
That sucks that there isn't a tool for drawing boxes.. I don't think I'm able to use the RSPS client with SMART..

Thanks :) I'll take a look at that include and see if I can figure it out.. :P



I have no idea how to even work SPS maps, I haven't even attempted to make one. Do you know if the SPS Path Generator will also work with a RSPS?


Yes it should, use a custom map. Ill have to take a look at Dannyrs edited sps (for a 2006 server)(I know for sure all I have to do is edit flag dtm and coords) and the official sps(not sure what I what have to do with this)

Twinki

2013-06-02 23:50:58

From: Officer Barbrady
Yes it should, use a custom map. Ill have to take a look at Dannyrs edited sps (for a 2006 server)(I know for sure all I have to do is edit flag dtm and coords) and the official sps(not sure what I what have to do with this)

Alright thanks, also added another question :)

rj

2013-06-02 23:56:51

From: Twinki
Alright thanks, also added another question :)


Look into atpas for picking up loot, it's a bit more advanced, making your own include isn't too hard. An include it pretty much a script on top of your script. I'm not at a computer ATM otherwise I would give you an example

tealc

2013-06-03 00:15:27

Can you link me to the server i'll see if I can get smart to load it

Twinki

2013-06-03 01:45:14

From: tealc
Can you link me to the server i'll see if I can get smart to load it


It has a desktop client, a .jar. I'd think SMART would be able to load it.

PMed you.

Twinki

2013-06-03 05:38:22

I was able to make an include.. it doesn't contain really anything though. All it has is the variables for the Inventory.

Also i've ran into an issue with one of my scripts, it simply eats or drinks a potion or food but it's totally ignoring the top inventory row.. i've tried changing the coordinates but it's still doing it..

Twinki

2013-06-03 09:14:35

From: Officer Barbrady
Yes it should, use a custom map. Ill have to take a look at Dannyrs edited sps (for a 2006 server)(I know for sure all I have to do is edit flag dtm and coords) and the official sps(not sure what I what have to do with this)


Tried using a custom map and it didn't seem to work.. :(

rj

2013-06-03 09:22:55

From: Twinki
Tried using a custom map and it didn't seem to work.. :(


Ill try to edit sps for you when I get back, did you make your compass perfect north?

Twinki

2013-06-03 09:30:47

From: Officer Barbrady
Ill try to edit sps for you when I get back, did you make your compass perfect north?


:duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh:

I'm also confused on how the code works.. never used SPS and the guide's code didn't seem to work at all…

rj

2013-06-03 09:33:17

From: Twinki
:duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh: :duh:

I'm also confused on how the code works.. never used SPS and the guide's code didn't seem to work at all…


You have to edit minimap coords, minimap width(I think), fflag function, and make compass('n')

Twinki

2013-06-03 09:50:39

From: Officer Barbrady
You have to edit minimap coords, minimap width(I think), fflag function, and make compass('n')


I honestly have no idea how to do that, I looked at the FFlag function but only saw 4 lines of code no coordinates or anything. The client is only off by 7 Coordinates on the Y Axis then on EoC.

Edit: Also Flag works perfectly

Twinki

2013-06-03 23:55:55

From: Officer Barbrady
You have to edit minimap coords, minimap width(I think), fflag function, and make compass('n')


Where do I edit those? I looked at FFlag but didn't see anything I need to edit.

rj

2013-06-04 00:23:04

From: Twinki
Where do I edit those? I looked at FFlag but didn't see anything I need to edit.


You might need to edit the flag dtm

Twinki

2013-06-04 01:16:59

From: Officer Barbrady
You might need to edit the flag dtm

Well the Flag function works perfectly, it detects the flag and everything. IDK about FFlag, not sure how to set it up.

Twinki

2013-06-05 03:17:09

From: Officer Barbrady
You might need to edit the flag dtm


Wait so should I be editing the SPS Source code? Like the SPS_GatherMinimap function?

Do I just edit the coordinates?

Enslaved

2013-06-05 11:20:42

From: Twinki
Wait so should I be editing the SPS Source code? Like the SPS_GatherMinimap function?

Do I just edit the coordinates?


#1 , plz dont double post
#2 , if you say that the flag detects fine then it is not an issue with the Flag DTM.
#3 i) FFlag is a wait function that waits until the flag is a certain amount of pixels from your player.
ii) If you cannot do it, remake the FFlag function is not that hard :p, just set the DTM and stick the search in a loop whist constantly checking the distance from the center spot( your player) and also the bottom of the flag. that way it should work fine. remember to break out of the loop when it is within the range and as well as that add a failsafe that Returns a "FALSE" if a certain amount of time has passed and still not within that range as a Failsafe

Twinki

2013-06-13 15:49:28

From: Officer Barbrady
You might need to edit the flag dtm


Sadly I still can't get the SPS maps to work :(