darklordnd
2012-01-10 08:40:26
How Long have You Played Runescape?
2 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Very basic Pascal, learnt during secondary school
Are you a member of any other communities?
I used to be a member of RsBuddy, but not anymore.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
I made a script called NDCombiner, which withdraw items from bank and use one item on another. It used to have more uses (fletching bows, crushing dragon scales, etc) but now its main use is to combine food items (like tuna potato) and stringing bows. It's click-customizable, meaning you can set it to right-click-select if combining edible items like tuna potato.
The script is simple, and I admit that one function is currently not working (count the items left in bank). I tried to get help, but did not get a solution for some weeks, so I thought of posting it just like that. Without that function the script still runs fine, though. Despite being simple, in my opinion it is not useless. I hope it can be a sufficient proof that I am not a leecher.
2 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Very basic Pascal, learnt during secondary school
Are you a member of any other communities?
I used to be a member of RsBuddy, but not anymore.
Tell us about yourself…
From: darklordnd
My name is Luong Kim Chung (tough to pronounce, I'm a Vietnamese), everyone can call me Bell or Darklordnd or whatever. I'm an ultimate noob at programming, but I'm full of ideas and insights. I always contribute positively in any community I join (I am currently an advisor for a few online social communities, not related to gaming or programming). I love playing RuneScape, though I don't have much time for it because I am a student in a busy Vietnamese university. I'm deeply interested in scripting, but with my current ability, what I can contribute is limited. I hope to become a member to contribute what I can, even in the form of ideas, and hope to learn from more experienced scripters to develop myself.
Please show us one (or multiple) of your scripts.
I made a script called NDCombiner, which withdraw items from bank and use one item on another. It used to have more uses (fletching bows, crushing dragon scales, etc) but now its main use is to combine food items (like tuna potato) and stringing bows. It's click-customizable, meaning you can set it to right-click-select if combining edible items like tuna potato.
The script is simple, and I admit that one function is currently not working (count the items left in bank). I tried to get help, but did not get a solution for some weeks, so I thought of posting it just like that. Without that function the script still runs fine, though. Despite being simple, in my opinion it is not useless. I hope it can be a sufficient proof that I am not a leecher.
// script by darklordnd
//Version 1.0
//much credit and special thanks to EtherFreak
//most of this script is from his fletching - in fact it's edited from that script.
//therefore, "I" mentioned in some parts below may be him and not me
//Thanks to Daniel for helping me with the bankamount stuffs. It's not working as of yet, though.
program itemcombination;
{.Include SRL\SRL\Misc\SMART.SCAR}
{.include SRL/SRL.scar}
const
version='1.0' ;
// ----------------SETUP-----------------------------
bnktab= 6 ; //first tab = 1
col1= 1 ; //first item column in bank, 0 being the first position
row1= 0 ; //first item row
col2= 2 ; //second item column
row2= 0 ; //second item row
bankty= 1 ;
//bank type: 0 for any npc bank, 1 for specific bank, 2 for bank chests
specific='veb' ; //some valed inputs are: 'veb', 'vwb' 'feb'
breakfreq= 5 ; //randomly take a minibreak (some seconds), if random(breakfreq)=1 then minibreak; so high number means less break
combinemode= 1 ; //1 for "make all" combination, 2 for combine each and every item (i.e. make all not possible)
clicktype= 1 ; //1 for left click select, 2 for right click select the first item (useful when combining food such as tuna potato)
var
x, y: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //set username
Pass := ''; //set password
Nick := ''; //set nick 3-4 char
Active := True;
LampSkill := 'strength'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the woddcutting skill
end;
// ---------------END SETUP----------------------------------------
// copy & paste more for more players, from the with... do part to end; above
end;
Procedure initrun;
begin
Smart_Members := True;
Smart_Server := 77;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(3000);
SetAngle(true);
mousespeed:=(10);
end;
procedure AntiRandoms;
begin
ClickToContinue;
FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
end;
procedure Antiban;
begin
case Random(60) of // Random(60) generates a random integer from 0 to 59
10: RandomRClick;
20: HoverSkill('Herblore', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
end;
end;
procedure banksw; //bank with bankchest
//thanks goes to sander70
var
X, Y: Integer;
begin
FindNormalRandoms;
if (FindObjCustom(X, Y, ['Bank','nk ch','k che','chest'], [2963780,10724266,10000542,5592409], 3)) then
Mouse(X, Y, 0, 0, True);
Wait(1000 + Random(300));
end;
procedure opnbank;
begin
if bankty=0 then
openbanknpc;
if bankty=1 then
openbankfast(specific);
if bankty=2 then
banksw;
end;
procedure bank14;
begin
mousespeed:=(15+random(2));
wait(200);
opnbank;
wait(550+random(200))
depositall;
wait(550+random(300));
WithdrawEx(col1,row1,14,[]);
wait(300+random(100));
withdraw(col2,row2,0);
wait(300+random(100));
closebank;
wait(1000+random(500));
end;
Procedure combineall;
begin
bank14;
invmouse((random(13)+1),clicktype);
wait(300+random(200));
Invmouse((15+random(14)),1)
wait(1000+random(700));
mmouse(359,408,200,200);
mmouse(259,408,30,30);
wait(100+random(200));
getmousepos(x,y);
begin
if ( WaitUpTextMulti(['Mak', 'tions'], 200) ) then
Mouse(x,y,1,1,true)else
exit;
end;
repeat
wait(1000);
Antirandoms;
until invcount=14
Antiban;
wait(random(5000));
if random(2)=1 then
begin
writeln('taking mini break');
wait(random(20000));
Antiban;
AntiRandoms;
end;
end;
Procedure combineeach;
var i:integer;
begin
bank14;
for i:=1 to 14 do begin
invmouse(i,clicktype);
wait(300+random(200));
Invmouse((14+i),1)
wait(100+random(100));
end;
Antiban;
wait(random(1000)+500);
if random(breakfreq)=1 then
begin
writeln('taking mini break');
wait(random(20000));
Antiban;
AntiRandoms;
end;
end;
function GetBankIndexItemAmount(const Index: Integer): Integer;
begin
Result := getAmountBox(BankIndexToMSBox(Index));
end;
function bankamount(const x, y: Integer): Integer;
begin
Result := GetBankIndexItemAmount(BankPointToBankIndex(Point(x,y)));
end;
Procedure Report(itemmd:integer); //thanks to Flight for this
Var
CIPH: Integer;
begin
CIPH := Round((itemmd * 3600) / (GetTimeRunning / 1000));
ClearDebug;
WriteLn('=-=-=-=-=-=-= Item Combiner '+Version+' by Darklordnd =-=-=-=-=-=');
WriteLn('Time Running: '+TimeRunning);
WriteLn('Combined items made: '+IntToStr(itemmd));
WriteLn('Items per hour: '+IntToStr(CIPH));
WriteLn('=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=');
end;
Procedure mainloop;
var
counter:integer;
itemmade:integer;
loadcount:integer;
amount:integer;
begin
initrun;
if bankamount(row1,col1)<bankamount(row2,col2) then
amount:=bankamount(row1,col1)
else
amount:=bankamount(row2,col2);
loadcount:=amount div 14;
counter:=0;
opnbank;
banktab(bnktab);
closebank;
repeat
findnormalrandoms;
case combinemode of
1: combineall;
2: combineeach;
end;
counter:=1+counter;
itemmade:=counter*14;
report(itemmade);
until (itemmade>=10000)or(itemmade>=amount);
end;
begin
mainloop;
end.