SRL Archive - RS3 Script Requests

Taking Function request!


Home

2011-12-15 14:08:38

Hello.

I'm taking function reguests.

It can be object finding pretty much anything, doesn't matter if it's small or big.

I will post them here.



~Home

Stark

2011-12-15 14:12:35

You typed "reguests" in the title and in the post… no functions though. Sorry.

logical

2011-12-15 14:13:57

A function to toggle certain spells under the magic tab and order them

e.g. combat spells, teles etc..

Not really needed but … :D

Home

2011-12-15 14:14:26

From: logical
A function to toggle certain spells under the magic tab and order them

e.g. combat spells, teles etc..

Not really needed but … :D


Look in skills magic.scar


~Home

logical

2011-12-15 14:23:55

do you mean under the msi folder?
!! :O never saw these
how do i include these in my scripts?

Home

2011-12-15 14:25:13

From: logical
do you mean under the msi folder?
!! :O never saw these
how do i include these in my scripts?


{$I SRL/SRL.scar}
{$I srl/srl/skill/magic.scar}


~Home

'Toxin

2011-12-15 14:38:11

Home, how about a proper function that'll find the correct spot where to click on the falador west wall (low climb)? :D It's a pain, and I talked to Coh3n about it a while back, even he was having a hard time getting it to work for MSI.

MSI and I would benefit greatly from this :)

Troll

2011-12-15 14:43:03

A function to turn 1 gp to 10 mill please :)

Nah it would be good if you could make a finding function that finds a colour and compares it to colours right next to it to see if it is right. I tryed it here for a mining script but did'nt work. http://villavu.com/forum/showthread.php?t=68777

weequ

2011-12-15 14:43:52

Fix FindColoredArea/FindColoredAreaTolerance in Simba. I think those are still broken. They give a positive match with even higher MinArea than the length of colors found with FindColorsTolerance.

Tip: I think you would need to use an algorithm called "FloodFill". Simba has some FloodFill algorithms built in, like FloodFillTPA.

Home

2011-12-15 14:45:23

From: XxX Toxin XxX
Home, how about a proper function that'll find the correct spot where to click on the falador west wall (low climb)? :D It's a pain, and I talked to Coh3n about it a while back, even he was having a hard time getting it to work for MSI.

MSI and I would benefit greatly from this :)



I need an account and where it is, and extaclty what you wna't it to do.

From: Troll
A function to turn 1 gp to 10 mill please :)

Nah it would be good if you could make a finding function that finds a colour and compares it to colours right next to it to see if it is right. I tryed it here for a mining script but did'nt work. http://villavu.com/forum/showthread.php?t=68777



I will tell you what to do.

First get first color.

Then get all other colors, and put them into TIntegerArray.

Then If Color in Array Reult True.

~Home

'Toxin

2011-12-16 08:37:12

From: Home
I need an account and where it is, and extaclty what you wna't it to do.




I will tell you what to do.

First get first color.

Then get all other colors, and put them into TIntegerArray.

Then If Color in Array Reult True.

~Home


I'll MSN you details later on today.

Flight

2011-12-22 07:23:11

I have a request for ya… If you could, I really, really need a function that grabs the "XP gained" when you have your XP bar (near the MM) open. Not the number inside the bar, but the number you get when you gain any kind of XP at all, the one that appears and floats downward.

This is a must for my ZMI Extreme script, without it there will be no XP counting. Lemme know if you can do it and/or need more details.

Mark

2011-12-22 07:43:59

Isn't there already I function that get the xpbar total
Could you just save it as a integer or ewateva like this
A:=xpbartotal;

Then after ur done wateva
B:=xpbartotal - A;

Flight

2011-12-22 08:16:40

From: CRU1Z1N
Isn't there already I function that get the xpbar total
Could you just save it as a integer or ewateva like this
A:=xpbartotal;

Then after ur done wateva
B:=xpbartotal - A;


Ah yeah, now there's a thought. Same concept as I've been using all along, just in a different spot. Thanks for the suggestion!

sadzx1

2011-12-22 09:15:50

i need a function to walk to bank, deposit empty jug and withdraw jug of wine, and walk back pls.


also which part shd i edit/del to remove tool detection in the code below (yet ensuring the script works):

thanks v much!

function MSI_SetupFishing(): Boolean;
var
i, j, t, x, y: Integer;
tools, intObjs, newObjs: TIntegerArray;
toWithdraw: array of TIntegerArray;
objReady: TBooleanArray;
curScript: TScript;
fishSpot: TMSObject;
b, canBank, found: Boolean;
begin
if (not LoggedIn) then
Exit;

MSI_AddHeader('MSI_SetupFishing');

with MSI_Players[CurrentPlayer] do
begin
SetLength(objReady, Length(Scripts[CurrentScript].FishSpots));
SetLength(toWithdraw, Length(Scripts[CurrentScript].FishSpots));
curScript := MSI_Scripts[Scripts[CurrentScript].Name];
intObjs := Scripts[CurrentScript].FishSpots;

MSI_Debug('FishSpots: ' + ToStr(Scripts[CurrentScript].FishSpots));

// Loops through the player objects checking for the required tools for each
for i := 0 to High(intObjs) do
begin
tools := MSI_FishingTools(intObjs[i]); // Gets the required fishing tools for the fishing spot

for j := 0 to High(tools) do
begin
found := MSI_FindTool(tools[j], TAB_INV, x, y);
if (not found) then
if (MSI_Items[tools[j]].EquipLevel > 0) then
found := MSI_FindTool(tools[j], TAB_EQUIP, x, y);

if (not found) then
begin
setLength(toWithdraw[i], length(toWithdraw[i]) + 1);
toWithdraw[i][high(toWithdraw[i])] := tools[j]; // Adds to the array if the tool isn't found
end;
end;
end;

// In a separate loop so it only opens the bank once
for i := 0 to High(intObjs) do
if (Length(toWithdraw[i]) <= 0) then // If all tools are found
objReady[i] := True
else begin // if 1+ tools aren't found
canBank := MSI_Locations[Location].AtBank;
if (not canBank) then
canBank := MSI_WalkPath(curScript.pathInfo, false);

if (canBank) then
if (MSI_OpenBank(curScript.WhichBank, Pin)) then
if (MSI_Withdraw(toWithdraw[i], [])) then
begin
for j := 0 to High(toWithdraw[i]) do
begin
t := GetSystemTime + 2000;
while (GetSystemTime < t) do
begin
Wait(300 + Random(200));
if (MSI_FindTool(toWithdraw[i][j], TAB_INV, x, y)) then
Break;
end;

if (j = High(toWithdraw[i])) then
objReady[i] := True;
end;
end;
end;

for i := 0 to High(objReady) do
if (objReady[i]) then
begin
setLength(newObjs, length(newObjs) + 1);
newObjs[high(newObjs)] := intObjs[i];
end else begin
fishSpot := MSI_GetObject(intObjs[i]);
MSI_Debug(fishSpot.name + ': Required tools not found');
MSI_Deposit(MSI_FishingTools(intObjs[i]), [], b);
end;

// Resets the objects so if the tools aren't found it will still fish in the spots for which the tools were found
Scripts[CurrentScript].FishSpots := newObjs;
Result := (Length(Scripts[CurrentScript].FishSpots) > 0);

for i := 0 to High(Scripts[CurrentScript].FishSpots) do
begin
fishSpot := MSI_GetObject(Scripts[CurrentScript].FishSpots[i]);
MSI_Debug('Fishing spot ' + IntToStr(i) + ': ' + fishSpot.name);
end;

if (MSI_Locations[Location].AtBank) or
(MSI_Scripts[Scripts[CurrentScript].Name].BankType = NPC) then
if (InvFull) then
MSI_Scripts[Scripts[CurrentScript].Name].BankObjects();
end;

MSI_CloseHeader('MSI_SetupFishing: ' + BoolToStr(Result));
end;

Mark

2011-12-22 09:33:00

That's not one function your requesting there you should check out scripting tutorials