Do you have SRL? If not download it from http://villu-reborn.com/showthread.php?t=3410 and follow the instructions. SRL is basically a library of useful functions and procedures which make Scar scripting in runescape alot easier.
When you have SRL at the start of any script you want to use an SRL function or procedure in you need to add in {.include SRL\SRL.scar}. and in the begin add in SetupSRL;
For example:
SCAR Code:
program New;
{.include SRL\SRL.scar}
begin
SetupSRL;
{Your Script Here}
end.
All functions in the folder core are included automatically when you SetupSRL but functions in other folders such as the skill folder are not I think
.
So to use the procedure Sell which is in SRL/skill/BuySell.scar you will need to include it. To do this add to the top of your script {.include SRL\SRL\skill\BuySell.scar}.
Your script should now look like:
SCAR Code:
program New;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\BuySell.scar}
begin
SetupSRL;
{Your Script Here}
end.
You can now use the Sell procedure:
SCAR Code:
program New;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\BuySell.scar}
begin
SetupSRL;
Sell(1,30);
end.
I havent tested but this script should sell 30 Items from the first inventory slot.
Another thing, I just looked at your script and procedure FirstMessage, SecondMessage and ThirdMessage can all be combined into a function:
SCAR Code:
function WriteWait(text:string)
begin
wait(500)
WriteLn(text);
end;
Then in your main begin add in:
SCAR Code:
WriteWait('This will sell everything in your first inventory space');
WriteWait('to a shop until you stop it.');
WriteWait('Made by S.K.T.G');
Also try not to use until(false) in your script as according to the rules for autoing by WT-Fawaki there should always be a method to stop it. You may want to change that to:
SCAR Code:
until((IsFKeyPressed(12)) or (not ExistsItem(1)))
This should stop the script when F12 is pressed or there are no more items in Inventory slot 1.
Here is an edited version of the script (I havent tested it)
SCAR Code:
program Seller;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\BuySell.scar}
function WriteWait(text:string)
begin
wait(500)
WriteLn(text);
end;
begin
SetupSRL;
WriteWait('This will sell everything in your first inventory space');
WriteWait('to a shop until you stop it.');
WriteWait('Made by S.K.T.G');
repeat
Sell(1,10)
until((IsFKeyPressed(12)) or (not ExistsItem(1)))
end.