Simple question. What is/are the best bank(s) to use for stationary scripts? In terms of a balance between avoiding bans and not being uber crowded so that speed and performance suffers.
Simple question. What is/are the best bank(s) to use for stationary scripts? In terms of a balance between avoiding bans and not being uber crowded so that speed and performance suffers.
Champion's Guild chest, Player Owned Ports chest. Both are instanced, so you will never be reported. Note that if you log out, the instance deletes, so you will not log in next to the chest, you will have to re-enter the area.
Additionally, Rush of Blood has an instanced bank.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Regarding conversion of an already functioning color script, does anyone have these colors of either Champ's or PoP banks handy?
prif on a populated world is also pretty good
I found the chest in Black Knights' Fortress being kinda good, noone ever walks through there, and noone knows/thinks about it.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Could you explain how I would go about making an object for the PoP bank for an existing script?
Would highly depend on the existing script and how it handles banking. Post the script or banking part of the script you are using. For an OpenGL script, you would simply switch the model IDs of the bank. IDs can be seen by activating the model debug mode.
Simba Code:ogl.setDebugMode('models');
For a color script, you would need to alter its color search using data obtained via ACA.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
https://github.com/SRL/SRL-6/blob/ma...en.simba#L2060
as far as all the numbers go...
[[Color1, tolerance1, [ctstype_normally2, [modifiers]],[col2, tol2, [ctstype, [modifiers]]]]
you only need 1 color, but 2 works well, like the main color then the trim.
modifiers are different for each cts setting. for 2, its [hue, sat, 0] for 3, its [L*, a*, b*] (i forget what we call them though).
Get the colors, tolerance, and hue/sat from ACA.
Add your own line tp assign the variable, and declare the variable (where the others are declared).
then simply call bankscreen.open(bank_chest_pop_storehousetype);
(chests change colors as you upgrade the storehouse.
Thanks for the reply, I appreciate the help.
The script I'm modifying is: (Master Xehanort Transmutation [Barebones])
As for the code it uses, seems to be what Turpinator is referring to in the post above this.
Firstly, the script i'm attempting to edit uses this syntax:
Simba Code:procedure bank(); //Opens the bank, and uses defined preset to withdraw
var //Declare our local variables
x, y, timesTriedOpening, timesTriedWithdrawing: integer;
begin
timesTriedOpening := 0; //Using this as a failsafe for opening the bank
timesTriedWithdrawing := 0; //Using this as a failsafe for withdrawing items
repeat //Keep trying to open the bank until we detect the bankscreen
begin
[B][SIZE=5]bankScreen.open(BANK_NPC_BLUE);[/SIZE][/B] //Open a bank with a blue NPC (Edgeville)
inc(timesTriedOpening); //Increase the number of timesTried
if (timesTriedOpening > 10) then //If we've tried to open the bank unsuccessfully more than 10 times
begin //Terminate the script and let the user know we can't find the bank
terminateScript();
writeLn('Could not open the bank!');
end;
end;
until (bankScreen.isOpen()); //If we detect the bankscreen is open, continue on!
repeat //Keep trying to withdraw using preset one
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(randomRange(400, 500));
inc(timesTriedWithdrawing); //Increase the number of timesTried
if (timesTriedOpening > 10) then //If we've tried to withdraw unsuccessfully more than 10 times
begin //Terminate the script and let the user know
terminateScript();
writeLn('Could not withdraw items!');
end;
until (findDTM(itemDTM, x, y, tabBackPack.getBounds())); //Until we see the item we are transmutating in our backpack
inc(LoadsDone); //Increase the number of loads done for progress report
end;
Secondly, this is the code that the script ultimately calls in the end.
Simba Code:function TRSBankScreen.__open(bankType: Integer): Boolean;
var
i, x, y: Integer;
cols: T2DColorData;
TPA, ATPA: T2DPointArray;
begin
print('TRSBankscreen.__open()', TDebug.HEADER);
case bankType of
BANK_NPC_BLUE: cols := bankColors.__getProfileColor('BANK_NPC_BLUE');
BANK_NPC_GREY: cols := bankColors.__getProfileColor('BANK_NPC_GREY');
BANK_NPC_GREEN: cols := bankColors.__getProfileColor('BANK_NPC_GREEN');
BANK_NPC_DRAYNOR: cols := bankColors.__getProfileColor('BANK_NPC_DRAYNOR');
BANK_TABLE_BURTHORPE: cols := bankColors.__getProfileColor('BANK_TABLE_BURTHORPE');
BANK_CHEST_LUMBRIDGE: cols := bankColors.__getProfileColor('BANK_CHEST_LUMBRIDGE');
// I will update these ones when I have access to them
BANK_BOOTH: cols := [[3237496, 6, [2, [0.18, 0.68, 0.00]]]];
BANK_CHEST_SW: cols := [[8946555, 15, [2, [0.18, 0.18, 0.00]]], [5863053, 10, [2, [0.13, 0.10, 0.00]]]];
BANK_CHEST_SHANTAY: cols := [[4335674, 6, [2, [0.38, 1.96, 0.00]]], [7247287, 6, [2, [0.16, 1.41, 0.00]]]];
BANK_CHEST_DUEL: cols := [[11512192, 18, [2, [0.39, 0.57, 0.00]]], [6586289, 10, [2, [0.21, 1.00, 0.00]]]];
BANK_CHEST_CW: cols := [[8088922, 16, [2, [0.06, 0.17, 0.00]]], [4808312, 17, [2, [0.03, 0.17, 0.00]]]];
BANK_CHEST_GROTTO: cols := [[6842737, 6, [2, [0.31, 0.08, 0.00]]], [2570316, 4, [2, [0.15, 1.35, 0.00]]]];
BANK_CHEST_PRIFDDINAS: cols := [[2729983, 12, [1, [0.07, 0.00, 0.00]]], [7528447, 16, [2, [0.24, 0.00, 0.00]]]];
BANK_CHEST_BARB_OUTPOST: cols := [[10258280, 19, [2, [0.06, 0.49, 0.00]]], [3424082, 8, [2, [0.12, 0.21, 0.00]]]];
end;
So it seems that the "OpenGL" method wouldn't be what I need in this scenario, although thank you for your input. I will look into the ACA data, and come back with any questions I come across.
I guess another question I have initially is, is there API's like those for java coding, for example like the page that comes up when you google "java arraylist api"
Still getting used to the format, bear with me. (not sure why it attached the images, but wouldnt let me insert them)
Last edited by DontForgetThis; 05-03-2016 at 03:01 AM. Reason: formatting
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
So, for example, the code uses
Would this be like: [[color1, tolerance for color1, [unsure what this variable is, [what are these values refferring to?]]][[repeat]]?Simba Code:BANK_CHEST_SW: cols := [[8946555, 15, [2, [0.18, 0.18, 0.00]]], [5863053, 10, [2, [0.13, 0.10, 0.00]]]];
I used DTM tool in simba to generate:
Simba Code:DTMString := 'mlwAAAHicY2dgYEhlZ2BIB+IcII4D4mAgjgXiAiBWZWJgkABiLSA2BGI1IBYDYjkgtvOwY9Ax1mEwtjZmSPQ1Y3A2U2WwNlAEs/EBRjwYCgB0qgjY';
And, then I used the ACA tool to generate
Simba Code:function TRSBankScreen.__open(bankType: Integer): Boolean;
var
i, x, y: Integer;
cols: T2DColorData;
TPA, ATPA: T2DPointArray;
begin
print('TRSBankscreen.__open()', TDebug.HEADER);
case bankType of
BANK_NPC_BLUE: cols := bankColors.__getProfileColor('BANK_NPC_BLUE');
BANK_NPC_GREY: cols := bankColors.__getProfileColor('BANK_NPC_GREY');
BANK_NPC_GREEN: cols := bankColors.__getProfileColor('BANK_NPC_GREEN');
BANK_NPC_DRAYNOR: cols := bankColors.__getProfileColor('BANK_NPC_DRAYNOR');
BANK_TABLE_BURTHORPE: cols := bankColors.__getProfileColor('BANK_TABLE_BURTHORPE');
BANK_CHEST_LUMBRIDGE: cols := bankColors.__getProfileColor('BANK_CHEST_LUMBRIDGE');
// I will update these ones when I have access to them
BANK_BOOTH: cols := [[3237496, 6, [2, [0.18, 0.68, 0.00]]]];
BANK_CHEST_SW: cols := [[8946555, 15, [2, [0.18, 0.18, 0.00]]], [5863053, 10, [2, [0.13, 0.10, 0.00]]]];
BANK_CHEST_SHANTAY: cols := [[4335674, 6, [2, [0.38, 1.96, 0.00]]], [7247287, 6, [2, [0.16, 1.41, 0.00]]]];
BANK_CHEST_DUEL: cols := [[11512192, 18, [2, [0.39, 0.57, 0.00]]], [6586289, 10, [2, [0.21, 1.00, 0.00]]]];
BANK_CHEST_CW: cols := [[8088922, 16, [2, [0.06, 0.17, 0.00]]], [4808312, 17, [2, [0.03, 0.17, 0.00]]]];
BANK_CHEST_GROTTO: cols := [[6842737, 6, [2, [0.31, 0.08, 0.00]]], [2570316, 4, [2, [0.15, 1.35, 0.00]]]];
BANK_CHEST_PRIFDDINAS: cols := [[2729983, 12, [1, [0.07, 0.00, 0.00]]], [7528447, 16, [2, [0.24, 0.00, 0.00]]]];
BANK_CHEST_BARB_OUTPOST: cols := [[10258280, 19, [2, [0.06, 0.49, 0.00]]], [3424082, 8, [2, [0.12, 0.21, 0.00]]]];
//my new code starts here
///////////////////////////////
BANK_CHEST_POP_REVAMPED: cols := [[9793576, 8, [2, [0.02, 0.17, 0.00]]]];
///////////////////////////////
//ends here
end;
setLength(TPA, length(cols));
for i := 0 to high(cols) do
begin
if cols[i].gatherIn(TPA[i], mainScreen.getBounds()) then
mainscreen.filterPointsPlayer(TPA[i]);
if (length(TPA[i]) < 10) then
begin
print('TRSBankScreen.__open(): Didn''t find enough bank color ' + toStr(i), TDebug.FOOTER);
exit();
end;
end;
But, I'm off to bed for the night. I tested it slightly, it didn't want to do anything for me, granted I never tested the original script either. Oh yeah, and I'm at the last port upgrade - so the trim for the bank is gold. I tried to get the second color, but as I highlighted the best match, it showed it matching with a bunch of things outside of the bank, so i scrapped it. And one last small thing, the DTM i used is for adamant ore (incase anybody was wondering)
Last edited by DontForgetThis; 05-03-2016 at 03:52 AM.
Simba Code:program QuickTransmutate; //Name your program! Can litererally be anything you want
{$DEFINE SMART} //Every script must have this line to use SMART
{$I SRL-6/SRL.simba} //MOST IMPORTANT LINE. Trust me, you need this.
{$I SPS/lib/SPS-RS3.Simba} //Can be used if you want to include maps, not always necessary
var //Setup our global variables
itemDTM, loadsDone, priceWeBought, priceWeSell, productsMade: integer;
xpPerTransmutation: extended;
DTMString: string;
//////////////////////////////////
/////////PLAYER SETUP/////////////
//////////////////////////////////
procedure declarePlayers();
begin
priceWeBought := 960; //Change 1000 to whatever value you bought the item to be transmuted
priceWeSell := 10350; //Change 2000 to the value you plan to sell the product at
xpPerTransmutation := 28.3; //Change 15.7 to whatever xp you earn per transmuted item
productsMade := 4; //Change 9 to however many products are made per inventory
//Create a DTM of the initial item and insert the string into the '' (Default DTM is mithril Ore)
DTMString := 'mggAAAHicY2NgYIhmYmDwB+I0II4F4nAgTgLieYwMDPOBeCYQTwXi5UC8GIjNzYMYwl0NGDKCrRhMTPwYIt0NwTQ/0CxsmBEHhgAAp2MLEg==';
setLength(players, 1);
with players[0] do
begin
loginName := 'MasterXehanort';
password := '';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;
//////////////////////////////////
/////////END SETUP////////////////
//////////////////////////////////
procedure randomRightClickInventory(); //Used in antiban, I don't like the one in the include
var
i: integer;
begin
for i:= randomRange(1, 28) to 100 do
begin
tabBackPack.mouseSlot(i, MOUSE_RIGHT);
break;
end;
if (random(2) = 0) then
chooseOption.select(['xamine'])
else
chooseOption.select(['ancel']);
end;
procedure antiBan();
var
time: TTimeMarker;
begin
if not isLoggedIn() then
exit;
case random(50000) of
1..500: randomRightClickInventory(); //Random right click in our inventory
501..6000: mouseOffClient(OFF_CLIENT_RANDOM);//Move the mouse off the client in a random direction
6001..7100: MouseMovingObject(); //Move the mouse around
1101..2000: hoverSkill(Skill_DIVINATION); //Check our divination level
end;
end;
procedure initializeDTMs(); //Setup and load our DTMs
begin
itemDTM := DTMFromString(DTMString);
end;
procedure bank(); //Opens the bank, and uses defined preset to withdraw
var //Declare our local variables
x, y, timesTriedOpening, timesTriedWithdrawing: integer;
begin
timesTriedOpening := 0; //Using this as a failsafe for opening the bank
timesTriedWithdrawing := 0; //Using this as a failsafe for withdrawing items
repeat //Keep trying to open the bank until we detect the bankscreen
begin
bankScreen.open(BANK_NPC_BLUE); //Open a bank with a blue NPC (Edgeville)
inc(timesTriedOpening); //Increase the number of timesTried
if (timesTriedOpening > 10) then //If we've tried to open the bank unsuccessfully more than 10 times
begin //Terminate the script and let the user know we can't find the bank
terminateScript();
writeLn('Could not open the bank!');
end;
end;
until (bankScreen.isOpen()); //If we detect the bankscreen is open, continue on!
repeat //Keep trying to withdraw using preset one
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(randomRange(400, 500));
inc(timesTriedWithdrawing); //Increase the number of timesTried
if (timesTriedOpening > 10) then //If we've tried to withdraw unsuccessfully more than 10 times
begin //Terminate the script and let the user know
terminateScript();
writeLn('Could not withdraw items!');
end;
until (findDTM(itemDTM, x, y, tabBackPack.getBounds())); //Until we see the item we are transmutating in our backpack
inc(LoadsDone); //Increase the number of loads done for progress report
end;
procedure openProductionScreen(); //Uses our energies that is on the first action slot
var
waitCounter:integer;
begin
waitCounter := 0; //Set our failsafe counter to 0
repeat
begin
sendKeys('1', 100, 30); //Have the keyboard press '1' (We will have our energies bound to slot one in the action bar)
wait(randomRange(500, 600)); //Wait a little for the production screen to pop up
inc(waitCounter); //Increase the failsafe waitCounter
if (waitCounter > 10) then //If we cannot use the energies more than 10 times, terminate the script
begin
terminateScript(); //Let the user know what went wrong
writeLn('Could not use Energies!');
end;
end;
until (productionScreen.isOpen()); //If we detect the production screen is open, continue
end;
procedure waitWhileTransmuting();
var
failSafeCounter, x, y: integer;
begin
failSafeCounter := 0; //set our failsafe counter to 0
repeat //Keep waiting until we do not detect our original item in the backpack
begin
wait(randomRange(600, 700));
antiBan(); //Perform our antiban while our character is transmutating!
inc(failSafeCounter); //Increase our failsafe counter
if (failSafeCounter > 2000) then //If we have waited longer than two minutes to finish transmutating. Increasing counter 2000 times after waiting ~0.6 seconds per try
begin //Exit this procedure if we waited too long
writeLn('Could not successfully transmutate all our items!');
writeLn('Banking stuff and starting over!');
exit;
end;
end;
until not (findDTM(itemDTM, x, y, tabBackPack.getBounds())); //If we do not detect our original item in the backback, continue!
end;
procedure transmutateItems(); //Transmutates the item!
begin
openProductionScreen(); //Begin transmutation using the production screen
productionScreen.clickStart();
waitWhileTransmuting(); //wait until we are done
end;
function areWeOutOfSupplies():boolean; //Checks if we are out of supplies. Requires us to have game messages on
begin
if chatbox.findTextOnLines(['Item could not'], [0..3]) then //If the textbox shows that we did not withdraw all our items
begin
result := true //Then we are out of supplies
end
else
result := false; //If not, then we still have supplies
end;
procedure progressReport();
var
transmutationsDone, goldEarned, goldPerHour: integer;
xp, xpPerHour: extended;
begin
transmutationsDone := LoadsDone * productsMade;
goldEarned := (priceWeSell - PriceWeBought) * transmutationsDone;
goldPerHour := round((goldEarned * 60) / (getTimeRunning() / 60000));
xp := (transmutationsDone * xpPerTransmutation);
xpPerHour := round((xp * 60) / (getTimeRunning() / 60000));
writeLn('========================================================');
writeLn('MasterXehanorts Transmuter');
writeLn('Time Ran: ' + timeRunning);
writeLn('Transmutations Done: ' + intToStr(transmutationsDone));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Gold Made: ' + intToStr(goldEarned));
writeLn('Gold per Hour ' + intToStr(goldPerHour));
writeLn('Experience Gainzzzz: ' + floatToStr(xp));
writeLn('Experience Per Hour: ' + floatToStr(xpPerHour));
writeLn('========================================================');
end;
procedure mainLoop(); //Our main loop that will be repeated over and over!
begin //Not lengthy due to the nature of this script, but yeah. . .
bank();
progressReport();
transmutateItems();
end;
///////////////////////////////////////////
/////////Putting our script together///////
///////////////////////////////////////////
begin
setupSRL();
initializeDTMs(); //Setup our DTMs (only done once)
clearDebug(); //Clear the SRL debug box
smartEnableDrawing := true; //Allow for smart drawing (used for more advanced scripts to debug)
disableSRLDebug := True; //Set to false if you want to see everything simba processes, set true if you just want the main things we set with writeLn
disableSRLLog := true;
declarePlayers();
repeat
if not isLoggedIn() then //If the player is not logged in, then log us in
begin
players[currentPlayer].login();
exitSquealOfFortune(); //Close the SOF
minimap.setAngle(MM_DIRECTION_NORTH); //Set our camera angle to North
mainScreen.setAngle(MS_ANGLE_HIGH); //Set our camera angle to high
end;
//If we are logged in, then disregard the previous if statement and continue to mainLoop
mainLoop(); //NOTE mainLoop is in the repeat portion, so the script will keep executing mainLoop
until (areWeOutOfSupplies); //mainLoop will be repeated until we are out of supplies.
players[currentPlayer].logout(); //Logout when we're out of supplies
end. //Ta Da!
Much better, thanks, let me remedy my previous post.
Last edited by DontForgetThis; 05-03-2016 at 03:00 AM. Reason: formatting
I believe the values correspond to:
Simba Code:BANK_CHEST_SW: cols := [[color1, tolerance1, [ctsAlgorithm, [hue1, sat1, 0.00]]], [color2, tolerance2, [ctsAlgorithm, [hue2, sat2, 0.00]]];
In this case the ctsAlgorithm we are using is algorithm 2. Here is info about the different CTS algorithms:
CTS0 is the simplest, and each algorithm gets more thorough, but also taking a bit more time to analyze. I know very little about CTS2 vs CTS3, someone else can comment on that. IIRC CTS3 is a more human-like vision analysis approach?Colour tolerance
Simba contains several algorithms for determining if two colours are equal given a tolerance. There are three algorithms, from fastest to slowest:
CTS 0: Quick and dirty comparison. Matches if the differences between the three RGB values are <= Tolerance
CTS 1: RGB comparison that uses the Pythagorean distance in the RGB cube to define tolerance. Matches if the distance <= Tolerance.
CTS 2: HSL comparison. It has two modifiers that modify the result tolerance, Hue and Saturation. The lower the modifier, the higher tolerance required for a match. They can be set seperately and therefore used to distinguish very specific colours. Some differ a lot in saturation, but very little in hue. Luminance is assigned a somewhat static function, and has no modifier.
CTS 3: Comparison using CIE L*a*b colour space, uses Pythagorean distance.
Usually we use CTS2, such as in this banking function, which takes color, tolerance, hue, and sat values, for TWO different colors. The 0.00 is a placeholder value since it is only used for real when we are using CTS3.
If we were using CTS3, the values would be:
Simba Code:BANK_CHEST_SW: cols := [[color1, tolerance1, [3, [L1, a1, b1]]], [color2, tolerance2, [3, [L1, a1, b1]]];
Last edited by Clarity; 05-03-2016 at 06:01 AM.
Scripts: ClarityNex | ClaritySlayer | ClarityElfThief | ClarityBurialArmour | ClarityMudRunes | ClarityWells | ClarityProTables | ClarityArmadyl | ClarityHarps
ClarityDominonTower | ClarityAltar | ClarityCitadel | ClarityBarrows | ClarityEsswraith | ChampionScrollCamperTools & Extensions: OpenGL ID Highlight Tool | SRL-6 Messaging System | SRL Companion | Item DTM Generator | BBCode Converter
Thanks so much for your replies, TSN and Clarity. The script might not have ran because I used the CTS2 algorithm, but I only input one color. Ill go back and try it with two and see if it works then! Thanks for explaining that to me, it helped a lot.
you dont need 2 colors. 1 will do fine. Buut. When you put the colors into ACA (aka click on the thing until its all red), you will need 2+ colors there. Through math/algorothims, you get the color, tolerance, hue, and sat. Those 4 items gets you a range of colors that matches all the colors you had clicked on/highlighted.
As for CTS3, just skip it. Its slow and in almost no way superior to CTS2.
There are currently 1 users browsing this thread. (0 members and 1 guests)