Why am i getting this?
Exception in Script: Unable to find file 'SRL/SRL/misc/SMART.simba' used from ''
Help?
Does anyone else's not work after the smartmanager restarts? When mine restarts, the mouse will be clicking the invo, quest tab, and armor tab continuously and it won't work so i have to do it manually...
they must have updated it, mine works for awhile but then just stands still
Well I've gotten 94 magic from this. 32-94... Works well. It's just the SmartManager problem I'm having.
I just use it without smartmanager, you can always log yourself in after 6 hours
Uh, we have a big problem! Look at this!
![]()
Current Goals
Learning SIMBA Progress: 5%
Maxed G-Maul Pure - 07scape: approx 10%
SRL Members: [ ]
50 Relevant Posts: [ ]
Seems to me that DTM for Ring of Kinship does not detect. Redo the DTM if the problem persists, after all this DTM has been in use for 4 solid months and I am not surprised if it finally breaks.
Script uses quick-cast after dropping, which means you should never see this. Double check if you have all settings correct.
How do I redo the DTM? Sorry, I've never scripted before :/ Could you link me to a tutorial on it or you help me?
This script works perfectly. Almost 99
THAAANKS went from 92 - 99
I've gone from 32-96Going for 99 hopefully, anyone know if the up coming updates will affect this script?
it stuck when it try to click the spell, it just right click the spell and do nothing.
Need to change line 420 to
if WaitUpText('stairs',1000) then
Script is now flawless and runs at breakneck speed.
Can someone help me out with getting a new DTM for the ring?...
I've replaced the DTM but still not working.
It says
** Warning in OpenPartyInterface: RoK is not found! **
current action is: enter
*** In Dung Lobby ***
Cannot find party interface"
For anyone having an issue with it not opening the Party Interface with the ring you need to Take the ", RoK" out on line 186
Simba Code:function OpenPartyInterface: Boolean; //185
var mx, my : integer; //186
So it will like that
Mostly Inactive, School
Just got 99 magic from this ^.^!!!
W000T. Thnx for the script! [: Went 32-99.![]()
would be nice if this were updated for the current temp fixing![]()
Updated code, it works August 3rd 2012
Simba Code:program AlternativeGateStoner;
{$DEFINE SMART}
{$DEFINE DEBUG}
{$i srl/srl.simba}
{$IFDEF SIMBAMAJOR980}
{$I SRL/SRL/MISC/PAINTSMART.SIMBA}
{$ELSE}
{$I SRL/SRL/MISC/SMARTGRAPHICS.SIMBA}
{$ENDIF}
const
version = '1.2';
SRLStats_Username = '';
SRLStats_Password = '';
CastsPerRun= 40; //125 cosmics = 41 cast -> You put 40 = (cast - 1)
CastTimeout = 180000; //this is how long you will be in dungeon casting
//if you have 225 comsics binded, change to 300000 or above
GateStoneSlot = 3; //This is where your gatestone is supposed to be created
//e.g. I'm complexity 4, so it is slot 2.
DungOptions = TRUE; //Put true if you have unlocked dung size selection
//SMART Setup
SmartWorld = 0;
Members = False;
SignedClient = True;
HighDetail = False;
var
startXP: integer;
RoK: integer; //DTM as global now
Stats: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Set to true if you want to use Player 0
end;
end;
procedure DoLogin;
var t: integer;
begin
MarkTime(t);
while (not LoggedIn) do
begin
if LogInPlayer then
break;
wait(10000+random(500));
if (TimeFromMark(t) > 180000) then
begin
writeln('Failed to login after 180s... Terminating');
TerminateScript;
end;
end;
end;
procedure WaitTillStationary;
begin
if not LoggedIn then Exit;
repeat
wait(200+random(50));
until not IsMoving;
end;
procedure ProgressReport(var startXP: integer);
var gain: integer;
begin
gain := GetXPBarTotal- startXP;
{$IFDEF DEBUG}
{$ENDIF}
writeln('Time running: ' + TimeRunning);
writeln('Exp Gained: ' + IntToStr(gain));
writeln('Est XP/H: ' + floatToStr(3600000 * 1.0 / GetTimeRunning * gain));
//SRL stats
if (TimeFromMark(Stats) > 360000) then // 6 minutes.
begin
Stats_Commit;
MarkTime(Stats);
end;
end;
{*******************************************************************************
procedure IsScreen: Boolean;
by; nosaj421
Description: Checks if the Select Level or Select Complexity Dung Screens are up
*******************************************************************************}
function IsScreen(text: String): Boolean;
var
X, Y: Integer;
begin
Result := FindText(x, y, text, UpCharsEx, 92, 03, 396, 29);
end;
{*******************************************************************************
procedure In***: Boolean;
by; nosaj421
Description: Returns true if player is in said location
*******************************************************************************}
function InLobby: Boolean;
var T: TPointArray;
begin
//Stable
//Bank symbol color from SRL
Result:= FindMMColorsSpiralTolerance(T, 2216175, 20);
{$IfDef DEBUG}
if Result then
writeln('*** In Dung Lobby ***')
else writeln('*** NOT In Dung Lobby ***');
{$EndIf}
end;
function InDungeon: Boolean;
var T, T2: TPointArray;
begin
T2:= GetMiniMapDots('npc');
// writeln(length(t2));
Result:= (length(t2) > 0) and
not FindMMColorsSpiralTolerance(T, 2216175, 20);
{$IfDef DEBUG}
if Result then
writeln('*** In Dungeon ***')
else writeln('*** NOT In Dungeon ***');
{$EndIf}
end;
function InLadder: Boolean;
var T, T2: TPointArray;
begin
if not LoggedIn then Exit;
Result:= not InLobby and not InDungeon;
// and not FindMMColorsSpiralTolerance(T, 132076, 10);
{$IfDef DEBUG}
if Result then
writeln('*** In Broken stairs ***')
else writeln('*** NOT In Broken stairs ***');
{$EndIf}
end;
procedure FreeDTMz;
begin
FreeDTM(RoK);
end;
{*******************************************************************************
function OpenPartyInterface: Boolean;
by; nosaj421
Description: Returns true if open party is successful
*******************************************************************************}
function OpenPartyInterface: Boolean;
var mx, my, RoK: integer;
begin
Result:=False;
if not LoggedIn then Exit;
RoK:= DTMFromString('mrAAAAHic42BgYLBhZmBwZobQpkBsCcROQGwBxLZAPJGJgWEKEHcDcT'+
'8QTwfiOUA8D4gXA/G3ABWgKUw4sQgDfsBIAMMAABY4CFg=');
GameTab(tab_inv);
wait(randomRange(500,1000));
if FindDTM(RoK, mx, my, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(mx, my, 2, 2, mouse_right);
if WaitOption('face',1000) then
begin
writeln('Opening party interface');
wait(1500);
Result:= FindText(mx, my, 'Party', UpCharsEx, MIX1, MIY1, MIX2, MIY2);
end
end
else
begin
GameTab(tab_equip);
wait(randomRange(500,1000));
if FindDTM(RoK, mx, my, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(mx, my, 2, 2, mouse_right);
if WaitOption('face',1000) then
begin
writeln('Opening party interface');
wait(1500);
Result:= FindText(mx, my, 'Party', UpCharsEx, MIX1, MIY1, MIX2, MIY2);
end
end
else srl_warn('OpenPartyInterface', 'RoK is not found!' , warn_AllVersions);
end;
// FreeDTM(RoK);
end;
{*******************************************************************************
function ToTab(tab: integer): Boolean;
by; nosaj421
Description: Wrapper to change tabs using FTab
*******************************************************************************}
function ToTab(tab: integer): Boolean;
var t: integer;
begin
Result:=False;
if Ftab(tab) then
begin
Result:=True;
Exit;
end;
MarkTime(t);
while getCurrentTab <> tab do
begin
wait(20);
if TimeFromMark(t) >= 160 then //tweak depending on connection
Exit;
end;
Result:=True;
end;
{*******************************************************************************
function CastGateStone: Boolean;
by; nosaj421
Description: Returns true if casts Gatestone spell is successful
*******************************************************************************}
function CastGateStone: Boolean;
var i, mx, my: integer;
tpa: TPointArray;
begin
Result:=False;
if not toTab(tab_magic) then Exit;
setColorToleranceSpeed(2);
setColorSpeed2Modifiers(0.2, 0.2);
if FindColorsTolerance(tpa, 12042009, MIX1, MIY1, MIX2, MIY2, 35) then
begin
if getCurrentTab <> tab_magic then Exit
else
begin
i := random(high(tpa));
Mouse(tpa[i].x , tpa[i].y , 4, 4, mouse_right);
// add wait depending on connection
// GetMousePos(mx, my);
// Mouse(mx, my+ 40, 5, 0, mouse_left);
if WaitOption('ick', 500) then //if this breaks, use the above
Result:=True;
end;
end;
setColorToleranceSpeed(1);
end;
{*******************************************************************************
function DropGateStone: Boolean;
by; nosaj421
Description: Returns true if gatestone is successfully dropped
The slot you drop your gatestone is set in Const
*******************************************************************************}
function DropGateStone: Boolean;
var mx, my: integer;
tb: Tbox;
begin
Result:=False;
tb := InvBox(GateStoneSlot);
GetMousePos(mx, my);
if not PointInBox(Point(mx, my), tb) then
MouseBox(tb.X1, tb.Y1, tb.X2, tb.Y2, mouse_move);
if not toTab(tab_inv) then Exit;
//Dropping routine is too slow with DTMs
if getCurrentTab = tab_inv then
begin
if not ExistsItem(GateStoneSlot) then
Exit;
end
else Exit;
ClickMouse2(mouse_right);
// add wait depending on connection
// GetMousePos(mx, my);
// Mouse(mx, my+ 40, 5, 0, mouse_left);
if ChooseOption('rop') then //if this breaks use above
Result:=True;
end;
{*******************************************************************************
procedure MakeGatestone;
by; nosaj421
Description: Casts Create Gatestone spell for CastsPerRun times.
Set CastsPerRun in Const
*******************************************************************************}
//Not using DTMs because too slow / detection
//I needed the speed :(
procedure MakeGatestone;
var a, t: integer;
action: integer;
begin
if not LoggedIn then Exit;
if not InDungeon then Exit; //buggy?
// if InLobby then Exit;
action:=1;
MarkTime(t);
repeat
case action of
1: if CastGateStone then
begin
if a=CastsPerRun then Exit;
action:= 2;
end;
2: if DropGateStone then
begin
inc(a);
action:= 1;
end;
end;
wait(50);
until (TimeFromMark(t) > CastTimeout);
end;
{*******************************************************************************
function QuitDungeon: Boolean;
by; nosaj421
Description: Returns true if we have successfully left the Dungeon.
Leaves the Dungeon by using the leave party option on the Dung tab.
*******************************************************************************}
function QuitDungeon: Boolean;
var mx, my, t: integer;
v: TVariantArray;
begin
Result:=False;
if not LoggedIn then Exit;
if not InDungeon then Exit;
//Find and click the RoK tab // equals Quest tab in dung
GameTab(tab_Quest);
if not FindText(mx, my, 'Party', UpCharsEx, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Cannot find party interface');
OpenPartyInterface;
Exit;
end;
//Click leave party
MouseBox(590, 325, 690, 345,1);
wait(1000);
//Click continue
v:=[true, true];
if not WaitFuncEx('ClickContinue', v, 500, 3000) then
Exit;
{
MarkTime(t);
repeat
wait(200+random(20));
if TimeFromMark(t) > 3000 then Exit;
until ClickContinue(True, True);
}
//Num 1, finding the highlight orange color //lazy
MMouse(265,410,randomRange(-25,25),randomRange(-5,5));
MarkTime(t);
repeat
wait(200+random(20));
if TimeFromMark(t) > 3000 then Exit;
until FindColorSpiralTolerance(mx,my,37083,MCX1,MCY1,MCX2,MCY2,45);
TypeSendEx('1', false);
// TypeByte(49); //1
//If we are in the broken stairs area, then we're out
wait(4000); //avoid InLadder going wrong //change if still too fast
Result:=WaitFunc(@InLadder, 500, 10000);
end;
{*******************************************************************************
function SlideDownLadder: Boolean;
by; nosaj421
Description: Returns true if we have successfully slided down and return to lob.
It works by blind walking near the exit and repetitively move the
mouse to search for the Uptext to slide down
*******************************************************************************}
function SlideDownLadder: Boolean;
var t: integer;
begin
Result:=False;
if not LoggedIn then Exit;
if not InLadder then Exit;
//Blind walk near the exit, good news is it almost always ends in 2 tiles
//Alternative is radial walk, but not really necessary
// RadialWalk( ,270,270+randomRange(16, 21), 50, 0, 0);
MMouse(MMCX-randomRange(45,50),MMCY-randomRange(15,20),2,2);
ClickMouse2(True);
wait(1000); //so that we move first, then we detect stationary
WaitTillStationary;
MarkTime(t);
repeat
//Look for slide
MMouse(MSCX - 25, MSCY - 25, 20, 20);
if WaitUpText('ump',1000) then
begin
ClickMouse2(True);
if DidRedClick then
break;
end;
wait(500);
until (TimeFromMark(t) > 30000);
//We cheat this for the next step //need tweaking, still not working
MouseBox(590, 325, 690, 345, mouse_move);
Result:= WaitFunc(@InLobby, 500, 10000);
end;
{*******************************************************************************
function ReenterDungeon: Boolean;
by; nosaj421
Description: Returns true if we have successfully reentered the Dungeon.
It works by creating Party using the RoK and then attempt to blind
find the Enter Dungeon region right at the spot we slided down.
Then we do select the level and complexity and get back in.
*******************************************************************************}
function ReenterDungeon: Boolean;
var mx, my, t: integer;
tpa: TPointArray;
v: TVariantArray;
begin
Result:=False;
if not LoggedIn then Exit;
if not InLobby then Exit;
//Select dung tab
GameTab(tab_Quest);
if not FindText(mx, my, 'Party', UpCharsEx, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Cannot find party interface');
OpenPartyInterface;
Exit;
end;
//Form party
if (getCurrentTab = tab_Quest) and
(not FindColorTolerance(mx, my, 120, MIX1, MIY1 + 50, MIX2, MIY2, 20)) then
MouseBox(590, 325, 690, 345, mouse_left);
wait(1000+random(200));
//Failsafe against stuck
if isScreen('Select Floor') or isScreen('Select Complexity') then
begin
MouseBox(492, 08, 504, 20, mouse_left);
wait(1000);
end;
//Climb down
MarkTime(t);
repeat
//This is blind finding
MMouse(MSCX + 45, MSCY + 25, randomRange(-10,10), randomRange(-10,10));
ClickMouse2(False);
until (WaitOption('imb', 1500) or (TimeFromMark(t) > 5000));
if (TimeFromMark(t) > 5000) then Exit;
//New, untested
wait(1000);
v:=[true, true];
if WaitFuncEx('ClickContinue', v, 200, 1500) then
begin
MarkTime(t);
repeat
wait(200);
if TimeFromMark(t) > 3000 then
break;
until FindColorsTolerance(tpa, 7913190, MCX1, MCY1, MCX2, MCY2, 10);
if not (TimeFromMark(t) > 3000) then
begin
TypeSendEx('1', false);
Exit;
end;
end;
if DungOptions then
begin
MarkTime(t);
repeat
wait(200+random(20));
if (TimeFromMark(t) > 2000) or isScreen('Select Floor') then break;
until FindColorSpiralTolerance(mx,my,1394370,MCX1,MCY1,MCX2,MCY2,45);
if (TimeFromMark(t) <= 2000) and not isScreen('Select Floor') then
begin
TypeByte(49); //1
//Direct skip to dungeon section
//Enter dungeon
MarkTime(t);
repeat
wait(500);
until (InDungeon and not InLobby) or (TimeFromMark(t) > 4000); //i think this is buggy
if not (TimeFromMark(t) > 4000) then
begin
Result:= True;
Exit;
end;
Exit;
end;
end;
//Change level
MarkTime(t);
repeat
wait(20+random(20));
until (isScreen('Select Floor') or (TimeFromMark(t) > 5000));
if (TimeFromMark(t) > 5000) then Exit;
MouseBox(186, 276, 236, 290, 1);
//Change complexity
MarkTime(t);
repeat
wait(20+random(20));
until (isScreen('Select Complexity') or (TimeFromMark(t) > 5000));
if (TimeFromMark(t) > 5000) then Exit;
MouseBox(186, 276, 236, 290, 1);
if DungOptions then
begin
MarkTime(t);
repeat
wait(200+random(20));
if TimeFromMark(t) > 3000 then Exit;
until FindColorSpiralTolerance(mx,my,1394370,MCX1,MCY1,MCX2,MCY2,45);
if TimeFromMark(t) <= 3000 then
TypeByte(49); //1
end;
//Enter dungeon
MarkTime(t);
repeat
wait(500);
until (InDungeon and not InLobby) or (TimeFromMark(t) > 4000); //i think this is buggy
if not (TimeFromMark(t) > 4000) then
Result:= True;
end;
function nextAction: string;
begin
if not LoggedIn then Exit;
if InDungeon then
begin
result:='quit';
Exit;
end;
if InLadder then
begin
result:='slid';
Exit;
end;
if InLobby then
begin
result:='enter';
Exit;
end;
end;
procedure DoWork;
var t: integer;
action: string;
begin
// action:='enter';
action:= nextAction;
writeln('current action is: ' + action);
while LoggedIn do begin
case action of
'enter':begin
if ReenterDungeon then action:='make';
end;
'make': begin
ProgressReport(startXP);
MarkTime(t);
MakeGateStone;
action:='quit';
writeln('Casting gatestone took ' +IntToStr(TimeFromMark(t))+'ms');
end;
'quit': begin
if QuitDungeon then action:= 'slid';
end;
'slid': begin
if SlideDownLadder then action:= 'enter';
end;
end;
wait(50);
writeln('current action is: ' + action);
end;
end;
begin
{$IFDEF SIMBAMAJOR980}
Smart_Server := SmartWorld;
Smart_Members := Members;
Smart_Signed := SignedClient;
Smart_SuperDetail := HighDetail;
{$ELSE}
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}
setupSRL();
if (SRLStats_Username = '') then
SetupSRLStats(1157, 'Anonymous', 'anon1337')
else
SetupSRLStats(1157, SRLStats_Username, SRLStats_Password);
DeclarePlayers;
DoLogin;
//Improved DTM management
RoK:= DTMFromString('mrAAAAHic42BgYLBhZmBwZobQpkBsCcROQGwBxLZAPJGJgWEKEHcDcT'+
'8QTwfiOUA8D4gXA/G3ABWgKUw4sQgDfsBIAMMAABY4CFg=');
AddOnTerminate('FreeDTMz');
ClickNorth(SRL_ANGLE_HIGH); //will only do this once!
ToggleXPBar(true);
startXP:=getXPBarTotal;
ProgressReport(startXP);
wait(500);
while LoggedIn do
DoWork;
end.
Last edited by blinkblink; 08-03-2012 at 01:21 PM. Reason: updated code
umm, it wont choose floor and complexity.. ps. running with smart
it does work, use my code above re-added *y* coordinates
Make sure your Simba is entirely up to date(simba, extensions, sps, srl, odtm, msi)
I copied that piece of code and followed the instructions on that link that you gave, ill test it again and see if it works.
Scripting powerlevel = [||||||||]
There are currently 1 users browsing this thread. (0 members and 1 guests)