is it possible to add a function to a script so it longs into a certain world ? and if so and you know how could you please whip it up if you got time or show me where i can find it please and thank you
is it possible to add a function to a script so it longs into a certain world ? and if so and you know how could you please whip it up if you got time or show me where i can find it please and thank you
Is it to switch worlds? Is this not what it uses to sign into a world:
SMART_Server := 4; //this guy
SMART_Signed := True;
SMART_Members := False;
FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!!"WITH A NEW QUESTION COMES A NEW CHALLENGE"
Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc
^ Common misconception.
SMART Automatically logs into the server which Runescape says you have the least (best) ping for. Setting SMART_Server does nothing!
FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!!"WITH A NEW QUESTION COMES A NEW CHALLENGE"
Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc
The reason people leave that line in though, is because without it, a new SMART pops up each time you stop/start a script.
By leaving SmartSrver set to any # world, you are able to start/stop script as much as you want, without the SMART window closing on you each restart.
Good info from a vet!
Ciao
NM
Will implement that into script im making, I was wondering why that kept happening to me lol.
As for the problem, I might actually have found the answer. Its a function:
Simba Code:{*******************************************************************************
Function SelectWorld(W: Integer): Boolean;
by: Narcle & ZephyrsFury
Description: Switches to the specified world. Returns true if successful.
*******************************************************************************}
function SelectWorld(W: integer): boolean;
var
x, y, xx, yy, T, CurW: integer;
WRec: TWorld;
begin
if OpenWorldScreen then
begin
T := GetSystemTime + 60000;
Repeat
Wait(100+random(100));
until InRange(CountColorTolerance(SRL_WS_ARROWCOLOR, 0, 0, 716, 240, 1), 550, 650) or (GetSystemTime > T);
if (GetSystemTime > T) then
begin
Writeln('World screen did not load after a minute, please refreash.');
Exit;
end;
WS_CurrentWorld(CurW);
if (W = CurW) then
begin
Result := True;
WriteLn('Already on world ' + IntToStr(W));
Exit;
end;
if FindWorld(W) then
begin
wait(100+random(100));
if GetWorldInfo(W, WRec) then
begin
Writeln('World: '+inttostr(WRec.Number)+', Players: '+inttostr(WRec.PlayerNo)+', Members: '+Booltostr(WRec.Members)+', PvP: '+Booltostr(WRec.PVP));
if FindText(x, y, ' '+inttostr(W)+' ', StatChars, 84, 134, 140, 440) then
begin
MMouse(x, y, 500, 4);
GetMousePos(x, y);
wait(400+random(100));
if FindColor(xx, yy, 6316128, x-20, y-2, x+20, y+2) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
if FindColor(xx, yy, 19890, x-20, y-2, x+20, y+2) then
begin
Writeln('World '+inttostr(W)+' selected.');
Result := true;
end;
end;
end;
end else
if WRec.PlayerNo = -2 then
WriteLn('World ' + IntToStr(W) + ' is FULL.')
else
WriteLn('World ' + IntToStr(W) + ' is OFFLINE.')
end else
WriteLn('Failed to find World ' + IntToStr(W) + '!');
if (not(Result)) then TypeByte(vk_Escape);
end;
end;
And this to find it:
Simba Code:function FindWorld(W: integer): Boolean;
by: Narcle
Description: Scrolls to area and returns true if world was found
*******************************************************************************}
function FindWorld(W: integer): Boolean;
Var
WPos, SPos, CurPos, i, H, CurW, TextColor: integer;
BarHeight, WorldsOnScreen: integer;
p: TPoint;
TPA, TPA2, TPA3: TPointArray;
SP, SB: TBox;
begin
if not WorldScreen then
Exit;
WS_CurrentWorld(CurW);
if (W = CurW) then
begin
Result := True;
WriteLn('Already on world ' + IntToStr(W));
Exit;
end;
if (W = 0) then
begin
srl_Warn('FindWorld', 'World Number cannot be 0', warn_AllVersions);
Exit;
end;
if not WorldsOrdered then
begin
if not OrderWorlds('w', True) then
begin
Writeln('FindWorld: Could not order worlds properly.');
Exit;
end;
WorldsOrdered := true;
wait(400+random(200));
end;
FindColorsTolerance(TPA, SRL_WS_SCROLLCOLOR1, 680, 1, 705, 500, 0);//These coords determine the scroll bars general area, it deviates everything.
SB := GetTPABounds(TPA);
With SB do
begin
FindColorsTolerance(TPA2, SRL_WS_SCROLLCOLOR1, x1+3, y1, x1+3, y2, 0);//SRL_WS_SCROLLCOLOR1
FindColorsTolerance(TPA3, SRL_WS_SCROLLCOLOR2, x1+3, y1, x1+3, y2, 0);//SRL_WS_SCROLLCOLOR2
end;
TPA2 := CombineTPA(TPA2, TPA3);
SP := GetTPABounds(TPA2);
BarHeight := (SP.Y2-SP.Y1);
WorldsOnScreen := (SB.y2-SB.y1+32) div 42;//This is HALF of the worlds on screen. I don't use the full amount.
if Length(WorldArray) < 1 then
LoadWorldArrays;
WPos := -1;
H := High(WorldArray);
for i := 0 to H do
if (WorldArray[i].Number = W) then
begin
WPos := i;
if i < (WorldsOnScreen) then
WPos := 0;
if i > (H+1-(WorldsOnScreen)) then
WPos := (H+1);
if WorldArray[i].Members then
TextColor := SRL_WS_YELLOWCOLOR
else
TextColor := SRL_WS_WHITECOLOR;
Break;
end;
if WPos = -1 then
begin
srl_Warn('FindWorld', 'World '+IntToStr(W)+' does not exist in worlds.ini ', warn_AllVersions);
Exit;
end;
SPos := (SB.y1+BarHeight div 2) + (WPos)*(SB.y2-SB.y1-BarHeight) div (H+1-WorldsOnScreen);//need the 0.0 to make it extended inside ()
CurPos := (SP.y1 + BarHeight div 2);
{$IFDEF SIMBA}
Debugln('SCROLLINFO: CurPos: '+ToStr(CurPos)+' WPos: '+ToStr(WPos)+' H+1: '+ToSTr(H+1)+' SPos: '+ToStr(SPos));
{$ENDIF}
if InRange(SPos, CurPos - BarHeight, CurPos + BarHeight) then
begin//if its too close the scroll bar won't move to correct position
if (CurPos < ((SB.y1+BarHeight div 2)+ (SB.y2-SB.y1-BarHeight) div 2)) then//half point
Mouse((SB.x1 + (SB.x2-SB.x1) div 2), SB.y2, 0, 0, true)
else
Mouse((SB.x1 + (SB.x2-SB.x1) div 2), SB.y1, 0, 0, true);
end;
//Writeln('SPos := '+ToStr(SPos));
Mouse((SB.x1 + (SB.x2-SB.x1) div 2), SPos, 0, 0, true);
wait(300+Random(100));
Result := IsTextInAreaEx(84, 134, 134, 440, p.X, p.Y, IntToStr(W) + ' ', 0, StatChars, False, False, -1, 2, TextColor);
end;
FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!!"WITH A NEW QUESTION COMES A NEW CHALLENGE"
Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc
FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!!"WITH A NEW QUESTION COMES A NEW CHALLENGE"
Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc
LOL I know. It was from the function list under worldswitcher. Im all updated I just figured I would take a look for him and I found it there so I copied and pasted it. No SRL5 version for it he could use or could he rewrite that to work with SRL5??
Last edited by kevin33; 01-18-2012 at 05:18 AM.
FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!!"WITH A NEW QUESTION COMES A NEW CHALLENGE"
Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc
put that in your declare players. it would put you in world 1Simba Code:WorldInfo := [False, 1, False] //[Members, World, PVP] meaning do you want a members world?, if you want one specific world(sometimes it cant find it so it picks a random world based on the other two settings), do you want a pvp world?
There are currently 1 users browsing this thread. (0 members and 1 guests)