_ChArMz
2006-06-07 16:46:16
I have been trying to figure this out by myself for a while, but can't so I need help..just add me on msn and ill show you the scripts :D
MSN - [email]charmlucky_@hotmail.com[/email]
Thanks
solemn wishes
2006-06-07 17:02:44
the way i did it may not not been the easiest, neatest of best example of how to script but i liked it :) it works 100% :cool:
function calculate:boolean;
var Wlvl, lvl : integer;
Clvl : integer;
begin
Clvl:= GetSkillAmount('mining');
lvl:= Clvl;
Wlvl:= Clvl;
repeat
lvl:= lvl+1;
until(lvl=30)or(lvl=99)
if (lvl=99) then
begin
iron:= '1';
coal:= '1';
result:=true;
end else
begin
iron:= '1';
coal:= '1';
repeat
Wlvl:=Wlvl+1;
if(Wlvl=15)then
begin
iron:= '2';
end;
if(Wlvl=30)then
begin
coal:='2';
end;
until(Wlvl=99)
end;
begin
if iron= '1' then iron:= 'Iron' else iron:='';
if coal= '1' then coal:= 'Coal' else coal:='';
end;
CopperC := 4747935;
tinC := 8092548;
if(iron='iron')then ironC:= 2503250 else ironC:= tinC;
if(coal='coal')then coalC:= 2571067 else coalC:= CopperC;
end;
what do you think?
_ChArMz
2006-06-07 17:07:59
Whoa, over my head..:D..look at my superheater script..
[PHP]{==============================================================================]
[ —————– ]
[ ~SuPaHeAtEr~ ]
[ ———– ]
[ By: ]
[ ChArMz ]
[ ————– ]
[ Version 1.50 ]
[ ————– ]
[ ]
[ Version History: ]
[ ~v1.0 First Release ]
[ ~v1.25 Minor Fixes ]
[ ~v1.50 Redid the script, Made it overall better ] ]
[ ]
[ Features: ]
[ ~AutoLogin ]
[ ~Randoms ]
[ ~AntiBan ]
[ ~Progress Report ]
[ ]
[ Description: ]
[ Superheats any ore into any bar. ]
[ ]
[ Directions: ]
[ (1) Start in Varrock West Bank. ]
[ (2) Set the Runescape brightness to V-bright. ]
[ (3) SCAR version 2.0.3 needed. ]
[ (4) Setup lines 36-46. ]
[ (4) Put Nature Runes in last inventory slot. ]
[ (5) Wield Fire Staff, and have a full Inv of the ores you want to make. ] ]
[ (6) Put the main ore in the first bank slot, coal in second. ]
[==============================================================================}
Program SuPaHeAtEr;
{.include SRL\SRL.Scar}
Var
CoalAmount, OreAmount, EXP, TotalAmount, StartPlayer: Integer;
UseAntiBan : Boolean;
Const
Ver = 'v1.50';
{—Setup—}
Const
OreType = 'Rune'; //Type of bar you would like to superheat.
{Choices: Iron, Silver, Gold, Steel, Mith, Addy, Rune.}
Procedure SetUpVars;
Begin
StartPlayer := 0; //First Player To Start
HowManyPlayers := 1; //Number of Players
MouseSpeed := 12; //Set Mouse Speed
UseAntiBan := True; //Will Chat, Rotate Screen, Check Exp, Ect.
End;
Procedure DeclarePlayers;
Begin
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=StartPlayer;
Players[0].Name :='LuCkY'; //Type User And Pass For AutoLogin
Players[0].Pass :='ChArMz';
Players[0].Nick :='cky'; //Nick Name of Current Player
Players[0].Active :=True;
End;
{-End of Setup-}
{—Main Script—}
Procedure WithDrawOres;
Begin
If(OreType= 'Iron') or (OreType= 'Silver') or (OreType= 'Gold') then
Begin
CoalAmount:= 0;
OreAmount:= 27;
End;
If(OreType= 'Steel')then
Begin
CoalAmount:= 18;
OreAmount:= 9;
End;
If(OreType= 'Mith')then
Begin
CoalAmount:= 20;
OreAmount:= 5;
End;
If(OreType= 'Addy')then
Begin
CoalAmount:= 18;
OreAmount:= 3;
End;
If(OreType= 'Rune')then
Begin
CoalAmount:= 24;
OreAmount:= 3;
End;
End;
Procedure OpenBank4;
Var
x, y, fs, fs2 : Integer;
Begin
If not BankScreen then
Repeat
If (FindObj3(x, y, 'Use Bank', 608866, 10)) then
Mouse(x, y, 4, 4, False)
Else
If (FindObj3(x, y, 'Use Bank', 5988448, 10)) then
Mouse(x, y, 4, 4, False)
Else
If (FindObj3(x, y, 'Bank booth', 3436942, 10)) then
Mouse(x, y, 4, 4, False);
Wait(250);
If (ClickOption('quickly', 1)) then
Begin
Flag;
Repeat
Wait(100);
fs := fs + 1;
Until (BankScreen) or (fs >= 50);
End;
fs2 := fs2 + 1;
Until (BankScreen) or (fs2 > 5);
End;
Procedure SmithingExp;
Begin
If(OreType= 'Iron')then EXP:= 12;
If(OreType= 'Silver')then EXP:= 13;
If(OreType= 'Gold')then EXP:= 22;
If(OreType= 'Steel')then EXP:= 17;
If(OreType= 'Mith')then EXP:= 30;
If(OreType= 'Addy')then EXP:= 37;
If(OreType= 'Rune')then EXP:= 50;
End;
{–SuperHeating—}
Procedure SuperHeat(slot, toslot: integer);
Var
slotnumber, col, row: Integer;
Begin
GameTab(7);
slotnumber:=slot;
While(slotnumber<toslot)do
Begin
MMouse(610, 300, 2, 2);
Mouse(610, 300, 2, 2, true);
If((slotnumber mod 4)=0)then col:=3
Else col:=(slotnumber mod 4)-1;
row:=(slotnumber-1)/4;
If (FindColor(x, y, 65536, (571+47*col), (215+36*row), (601+47*col), (245+36*row)))then
Begin
Mouse(x, y, 5, 5, true);
Wait(Random(50)+1000);
End;
slotnumber:=slotnumber+1;
End;
End;
{=====================Progress Report==========================================}
Procedure ProgressReport;
Begin
WriteLn('<============== Progress Report ===============>');
WriteLn('~SuPaHeater~ ' + Ver + ' By: ChArMz');
WriteLn('Worked for '+ TimeRunning);
WriteLn('SuperHeated '+IntToStr(TotalAmount)+' bars.');
WriteLn('Gained '+IntToStr(TotalAmount*EXP)+' smithing exp.');
WriteLn('Gained '+IntToStr(TotalAmount*53)+' magic exp.');
WriteLn('<============== Progress Report ===============>');
End;
{==============================================================================}
{—Randoms—}
Procedure Randoms;
Begin
CloseWindow;
FindFight;
SolveBox;
Findlamp('smithing');
DwarfItem;
FindPlant;
If(FindFight)then
Begin
RunAwayDirection('N');
Wait(9000+random(2000));
RunBack;
If(FindName)then
Begin
FindTalk;
End;
End;
End;
{-Antiban-}
Procedure ABan;
Begin
If (UseAntiBan= True) then
begin
RotateEvery (20+Random(10));
LeaveScreenEvery (5+Random(5));
End;
End;
Procedure Setup;
Begin
SetupSRL;
SetupVars;
SmithingEXP;
DeclarePlayers;
LoginPlayer;
DisguiseScar('Windows Media Player');
End;
Procedure SupaHeat;
Begin
Randoms;
SuperHeat(1, OreAmount+1);
End;
Procedure DepositAndWithDraw;
Begin
OpenBank4;
If(not(BankScreen))then
OpenBank4;
If (BankScreen) then
FixBank;
Wait(500+Random(300));
Deposit(1, 27, 2);
Wait(500+Random(300));
Withdraw(1, 1, OreAmount);
Wait(1000+Random(300));
If(not(coalAmount=0))then
BankMouse(2, false);
Wait(800 + Random(400));
ClickOption('All', 1);
TotalAmount:=OreAmount;
Repeat
CloseWindow;
Until(not(BankScreen));
End;
{—Main Loop—}
Begin
WithDrawOres;
Setup;
Repeat
SupaHeat;
DepositAndWithDraw;
ProgressReport;
Until(False);
End.[/PHP]
I just want it to multiply the number of superheats by the exp and so on..with smithing and mage exp
inferno
2006-06-08 03:32:52
You will want to include this kind of stuff in you script some-where.
Var
BarsDone, MagExGained : Integer;
SmithExGained : Extended;
Bar : String;
Function GetSmithExp : Extended;
Begin
Case LowerCase(Bar) Of
'silver' : Result := 20;
'iron' : Result := 20; // These are not correct, you need to find out the real values.
'steel' : Result := 30.5;
End;
End;
Procedure Report;
Begin
SmithExGained := GetSmithExp*BarsDone;
MagExGained := 50*BarsDone; //Again you need the real exp for the superheat spell.
WriteLn('Gained '+FloatToStr(SmithExGained)+' smithing experience');
WriteLn('Gained '+IntToStr(MagExGained)+' magic experience');
End;