SRL Archive - OSR Help

Various questions/ideas/problems with my script


GodFiend

2012-09-20 17:26:30

Alright, so I've written a script that mines the various ores and coal in the deep wilderness mage arena mine and attempts to bank the loot in the mage arena bank when the inventory is full. The walking code I use to move between Gundai in the mage arena bank and the mine itself was actually not that hard when using a combination of static DTMs and color picking.

However, finding Gundai in the bank is hard because the script repeatedly hovers over that rune shop guy (I forget his name) before moving to Gundai and banking with him. Are there any defining characteristics of Gundai that the rune shop guy does not share?

Another problem I have run into is the pkers killing me while I'm attempting to bank. I was wondering if there is an SRL function that can detect the overall "climate" of the area. By "climate", I mean that the wilderness is generally dark grey, but Edgeville is generally a light green. By detecting the color shift, my script could detect that you have just been pwned and could use more static DTMs to return to the mine to continue.

As some extensions, I was looking for ideas about how to extend the script. One idea I had was to take a fire staff and a stack of nature runes and use the coal to cast superheat ore to make bars and bank those. As an extension to that, I could smith the bars on the anvil just northeast of the mine into platebodies and alch them rather than banking. ;) The obvious flaw is that the coins do not enter your inventory and, worse, the stack of nature runes is lost when pked. This isn't really a moneymaking script–it's just being written for fun, so suggestions don't have to make large profits.

Footy

2012-09-20 17:32:23

I'm not Great with TPA's, so I'll let someone else explain those to you, but for the climate thing, you can use countcolor with tolerance, like this.

if countcolor(greencolor, 10) > 500 then
writeln('We are in edgeville') else
writeln('We are not in edgeville');
//NOTE Those arent actual parameters, dont use those, :p

Le Jingle

2012-09-20 17:37:57

For finding the correct NPC when trying to bank, I'd suggest using TPA's and picking colors that define the Banker NPC.

Dealing with pkers - for your "climate" problem, as you state/describe it, you could use a percetcolorMM, which would be (ideally) a knock off of the one in the include that finds the black percentage. This way you could look for the grey, instead (replicating the wildy), and if you don't find the heavy amount of grey (with the exception of banking, as there's less grey and quite a bit of black) then you know you've been pk'd. –> Using some MM search functions for white player dots may also help you; you could try to log out, hop/pause, then log back in, in attempt to avoid death.

Personally, as a suggestion, I'd make sure you are confident in the script before perusing additive features. I think making a strong mining + banking script would be good itself.

Good luck & Cheers,
Lj