1
Stealth Client / Re: Questions from a noob
« on: December 25, 2017, 03:53:37 PM »
I'm not against C+ but got to say, you will have a lot more examples if you go with Pascal.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
set %currenttime #scnt
set %time %currenttime - %starttime
set %hh %time / 3600
set %rest1 %time % 3600
set %minutes %rest1 / 60
if %minutes < 10
set %mm 0 , %minutes
else
set %mm %minutes
set %seconds %rest1 % 60
if %seconds < 10
set %ss 0 , %seconds
else
set %ss %seconds
set %runtime %hh , h , : , %mm , m , : , %ss , s
menu set runtime %runtime
set %oph ( %counter_ore * 3600 ) / %time
Procedure Statistics_Global_innit;
begin
Ore_Iron := 0;
Ore_OldCopper := 0;
Ore_Copper := 0;
Ore_Bronze := 0;
Ore_Rose := 0;
Ore_Shadow := 0;
Ore_Silver := 0;
Ore_Golden := 0;
Ore_Verite := 0;
Ore_Valorite := 0;
Ore_Marble := 0;
Ore_Ice := 0;
Ore_BloodRock := 0;
Ore_Mytheril := 0;
Ore_Amethyst := 0;
Ore_Dwarven := 0;
Ore_Steel := 0;
Ore_SunStone := 0;
Ore_BlackRock := 0;
Ore_Fire := 0;
Ore_Wizzard := 0;
Ore_DaemonSteel := 0;
Ore_Crusader := 0;
Ore_Reactive := 0;
Ore_Sapphire := 0;
Ore_MoonRock := 0;
end;
Procedure Statistics_Global_Update;
begin
if GetColor(finditem) = $0000 then Ore_Iron := (Ore_Iron + GetQuantity(finditem));
if GetColor(finditem) = $0487 then Ore_OldCopper := (Ore_OldCopper + GetQuantity(finditem));
if GetColor(finditem) = $096D then Ore_Copper := (Ore_Copper + GetQuantity(finditem));
if GetColor(finditem) = $0972 then Ore_Bronze := (Ore_Bronze + GetQuantity(finditem));
if GetColor(finditem) = $0B84 then Ore_Rose := (Ore_Rose + GetQuantity(finditem));
if GetColor(finditem) = $0496 then Ore_Shadow := (Ore_Shadow + GetQuantity(finditem));
if GetColor(finditem) = $0497 then Ore_Silver := (Ore_Silver + GetQuantity(finditem));
if GetColor(finditem) = $0494 then Ore_Golden := (Ore_Golden + GetQuantity(finditem));
if GetColor(finditem) = $089F then Ore_Verite := (Ore_Verite + GetQuantity(finditem));
if GetColor(finditem) = $08AB then Ore_Valorite := (Ore_Valorite + GetQuantity(finditem));
if GetColor(finditem) = $0B91 then Ore_Marble := (Ore_Marble + GetQuantity(finditem));
if GetColor(finditem) = $047F then Ore_Ice := (Ore_Ice + GetQuantity(finditem));
if GetColor(finditem) = $04C2 then Ore_BloodRock := (Ore_BloodRock + GetQuantity(finditem));
if GetColor(finditem) = $052D then Ore_Mytheril := (Ore_Mytheril + GetQuantity(finditem));
if GetColor(finditem) = $0705 then Ore_Amethyst := (Ore_Amethyst + GetQuantity(finditem));
if GetColor(finditem) = $0794 then Ore_Dwarven := (Ore_Dwarven + GetQuantity(finditem));
if GetColor(finditem) = $07A1 then Ore_Steel := (Ore_Steel + GetQuantity(finditem));
if GetColor(finditem) = $0A0A then Ore_SunStone := (Ore_SunStone + GetQuantity(finditem));
if GetColor(finditem) = $047E then Ore_BlackRock := (Ore_BlackRock + GetQuantity(finditem));
if GetColor(finditem) = $09EF then Ore_Fire := (Ore_Fire + GetQuantity(finditem));
if GetColor(finditem) = $09AD then Ore_Wizzard := (Ore_Wizzard + GetQuantity(finditem));
if GetColor(finditem) = $0493 then Ore_DaemonSteel := (Ore_DaemonSteel + GetQuantity(finditem));
if GetColor(finditem) = $0A2E then Ore_Crusader := (Ore_Crusader + GetQuantity(finditem));
if GetColor(finditem) = $07A5 then Ore_Reactive := (Ore_Reactive + GetQuantity(finditem));
if GetColor(finditem) = $07AB then Ore_Sapphire := (Ore_Sapphire + GetQuantity(finditem));
if GetColor(finditem) = $0B80 then Ore_MoonRock := (Ore_MoonRock + GetQuantity(finditem));
end;
Procedure Statistics_Global_Write;
begin
If Ore_Iron <> 0 then AddToSystemJournal('Iron ' + IntToStr(Ore_Iron) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Iron * 360)));
If Ore_OldCopper <> 0 then AddToSystemJournal('Old Copper ' + IntToStr(Ore_OldCopper) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_OldCopper * 3600)));
If Ore_Copper <> 0 then AddToSystemJournal('Copper ' + IntToStr(Ore_Copper) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Copper * 360)));
If Ore_Bronze <> 0 then AddToSystemJournal('Bronze ' + IntToStr(Ore_Bronze) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Bronze * 360)));
If Ore_Rose <> 0 then AddToSystemJournal('Rose ' + IntToStr(Ore_Rose) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Rose * 360)));
If Ore_Shadow <> 0 then AddToSystemJournal('Shadow ' + IntToStr(Ore_Shadow) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Shadow * 360)));
If Ore_Silver <> 0 then AddToSystemJournal('Silver ' + IntToStr(Ore_Silver) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Silver * 360)));
If Ore_Golden <> 0 then AddToSystemJournal('Golden ' + IntToStr(Ore_Golden) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Golden * 360)));
If Ore_Verite <> 0 then AddToSystemJournal('Verite ' + IntToStr(Ore_Verite) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Verite * 360)));
If Ore_Valorite <> 0 then AddToSystemJournal('Valorite ' + IntToStr(Ore_Valorite) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Valorite * 360)));
If Ore_Marble <> 0 then AddToSystemJournal('Marble ' + IntToStr(Ore_Marble) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Marble * 360)));
If Ore_Ice <> 0 then AddToSystemJournal('Ice ' + IntToStr(Ore_Ice) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Ice * 360)));
If Ore_BloodRock <> 0 then AddToSystemJournal('Blood Rock ' + IntToStr(Ore_BloodRock) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_BloodRock * 360)));
If Ore_Mytheril <> 0 then AddToSystemJournal('Mytheril ' + IntToStr(Ore_Mytheril) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Mytheril * 360)));
If Ore_Amethyst <> 0 then AddToSystemJournal('Amethyst ' + IntToStr(Ore_Amethyst) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Amethyst * 360)));
If Ore_Dwarven <> 0 then AddToSystemJournal('Dwarven ' + IntToStr(Ore_Dwarven) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Dwarven * 360)));
If Ore_Steel <> 0 then AddToSystemJournal('Steel ' + IntToStr(Ore_Steel) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Steel * 360)));
If Ore_SunStone <> 0 then AddToSystemJournal('Sun Stone ' + IntToStr(Ore_SunStone) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_SunStone * 360)));
If Ore_BlackRock <> 0 then AddToSystemJournal('Black Rock ' + IntToStr(Ore_BlackRock) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_BlackRock * 360)));
If Ore_Fire <> 0 then AddToSystemJournal('Fire ' + IntToStr(Ore_Fire) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Fire * 360)));
If Ore_Wizzard <> 0 then AddToSystemJournal('Wizzard ' + IntToStr(Ore_Wizzard) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Wizzard * 360)));
If Ore_DaemonSteel <> 0 then AddToSystemJournal('Daemon Steel ' + IntToStr(Ore_DaemonSteel) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_DaemonSteel * 360)));
If Ore_Crusader <> 0 then AddToSystemJournal('Crusader ' + IntToStr(Ore_Crusader) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Crusader * 360)));
If Ore_Reactive <> 0 then AddToSystemJournal('Reactive ' + IntToStr(Ore_Reactive) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Reactive * 360)));
If Ore_Sapphire <> 0 then AddToSystemJournal('Sapphire ' + IntToStr(Ore_Sapphire) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_Sapphire * 360)));
If Ore_MoonRock <> 0 then AddToSystemJournal('MoonRock ' + IntToStr(Ore_MoonRock) + ' // Per Hour ' + IntToStr((((timer - t))) / (Ore_MoonRock * 360)));
AddToSystemJournal('-----------------------------------------');
end;
12:39:25:074 [-]: Iron 118 // Per Hour 9502
12:39:25:078 [-]: Old Copper 8 // Per Hour 14015
12:39:25:083 [-]: Copper 7 // Per Hour 160179
12:39:25:087 [-]: Bronze 7 // Per Hour 160179
12:39:25:091 [-]: Rose 12 // Per Hour 93438
12:39:25:095 [-]: Shadow 14 // Per Hour 80089
12:39:25:099 [-]: Silver 56 // Per Hour 20022
12:39:25:102 [-]: Valorite 17 // Per Hour 65956
12:39:25:107 [-]: Marble 3 // Per Hour 373752
12:39:25:110 [-]: Ice 7 // Per Hour 160179
12:39:25:113 [-]: Blood Rock 10 // Per Hour 112125
12:39:25:117 [-]: Amethyst 6 // Per Hour 186876
12:39:25:120 [-]: Steel 4 // Per Hour 280314
12:39:25:123 [-]: Sun Stone 6 // Per Hour 186876
12:39:25:127 [-]: Black Rock 4 // Per Hour 280314
12:39:25:129 [-]: Daemon Steel 2 // Per Hour 560628
12:39:25:132 [-]: Crusader 4 // Per Hour 280314
12:39:25:136 [-]: Reactive 1 // Per Hour 1121257
12:39:25:141 [-]: MoonRock 2 // Per Hour 560628
12:39:25:144 [-]: -----------------------------------------
program Mining;
const
pickaxe1 = $0E85;
pickaxe2 = $0E86;
runebook =$22C5;
runebook_color =$0461;
runa_casa = 9;
limiteinativo = 1000;
var
cntalvo, cntinativo, contadorrunas : integer;
procedure save();
begin
end;
procedure guardar();
begin
end;
procedure recall(runa : integer) ;
begin
findtypeex(runebook, runebook_color,backpack,false);
useobject(finditem);
waitgump(inttostr(runa));
wait(300)
numgumpbutton(getgumpscount()-1,runa+100);
wait(9000);
end;
procedure verifica_marreta();
begin
FindType (pickaxe2 , Backpack);
UseObject(FindItem);
UseObject(FindItem);
end;
procedure verifica_peso();
begin
if weight > maxweight - 2 then
begin
recall(runa_casa);
guardar();
end;
end;
procedure detecta();
begin
end;
procedure hiding();
begin
end;
procedure inicio();
begin
verifica_peso();
recall(contadorrunas);
end;
procedure alvo();
begin
if targetpresent then
begin
if cntalvo = 1 then targettotile(0,getx(self)-1,gety(self),getz(self));
end;
end;
procedure inativo();
begin
cntinativo := cntinativo + 1;
if cntinativo > limiteinativo then
begin
cntinativo := 1;
inicio();
end;
end;
procedure andar();
var
i, x, randomx, randomx2, y, randomy, randomy2 : integer;
tileinfo : tstaticcell;
begin
randomx := random(10);
randomx2 := random(10);
randomy := random(10);
randomy2 := random(10);
x := getx(self) + randomx - randomx2;
y := gety(self) + randomy - randomy2;
tileinfo := ReadStaticsXY(x, y, WorldNum);
if tileinfo.staticcount > 0 then
begin
//addtosystemjournal('length'+inttostr(length(tileinfo.statics)));
for i := Low(TileInfo.Statics)to high(TileInfo.Statics) do
begin
if (TileInfo.Statics[i].Tile >= 1339) and (TileInfo.Statics[i].Tile <= 1359) and (TileInfo.Statics[i].z = GetZ(self)) then
begin
newmovexy(x,y,true,0,false);
end
else
begin
inativo();
andar();
end;
end;
end
else
begin
inativo();
andar();
end;
end;
procedure jornal();
begin
end;
procedure mining();
begin
verifica_peso();
save();
hiding();
verifica_marreta();
useobject(finditem);
alvo(); // getting error: Unknown Identifier
jornal();
end;
begin
contadorrunas := 1;
cntalvo := 1;
recall(contadorrunas);
andar();
mining();
end.
EN, I haven't scripted for a while, but now I'm back in the business. Scripting on stealth though, as it's more fun.
Welcome back! What kind of script are currently working on? I am learning how to script, I tried using stealth and then went back to easyuo.
if #FINDKIND = -1 4
finditem %target
set %attack #findid
set #LTARGETID %attack
event macro 27 0