SCAR Code:
program Project_K;
{.include srl/srl.scar}
{.include SRL\SRL\skill\magic.scar}

{Run the script. Hit right control and either up or down to run
in a direction (up=north down=south). This is my first script so
please help me test it and work out the kinks in it. Thankyou.

Ownt?}

const
 Speed = 20;//Digit from 1-50. (1-Slow, 50-Fast)
 Spell_1 = 'Earth Bolt';
 Spell_2 = 'Bind';
 Spell_3 = 'Varrock Teleport';


procedure HotkeyCaster1;
begin
MouseSpeed:= Speed;
  repeat
    Wait(20);
  until IsKeyDown('/') and IsFunctionKeyDown(7)
 Cast(Spell_1);
end;
procedure HotkeyCaster2;
begin
MouseSpeed:= Speed;
  repeat
    Wait(20);
  until IsKeyDown('.') and IsFunctionKeyDown(7)
 Cast(Spell_2);
end;
procedure HotkeyCaster3;
begin
MouseSpeed:= Speed;
  repeat
    Wait(20);
  until IsKeyDown(',') and IsFunctionKeyDown(7)
 Cast(Spell_3);
end;



{*******************************************************************************
procedure RunAwayDirection(direction: String);
By: Stupid3ooo and modified by Ron
Description: Runs away in specified direction. //Edited by Ownt?(reason Flag)
*******************************************************************************}


procedure RunAwayFFlag(direction: string);
var
  RunBackx, RunBacky, x, y: Integer;
begin
  x := 0;
  y := 0;
       if (UpperCase(direction) = 'N') then
    y := -50
  else if (UpperCase(direction) = 'E') then
    x := 50
  else if (UpperCase(direction) = 'S') then
    y := 50
  else if (UpperCase(direction) = 'W') then
    x := -50
  RunBackx := x + 648;
  RunBacky := y + 83;
  MouseFindFlag(x + 648, y + 83, 1, 1);
  FFlag(50);
  SetRun(True);
  x := RunBackx;
  y := RunBacky;
end;
procedure RunAway_N;
begin
MouseSpeed:= Speed;
  repeat
    Wait(20);
  until IsArrowDown(0) and IsFunctionKeyDown(7)
  repeat
  MakeCompass('S');
  RunAwayFFlag('S');
  until IsArrowDown(0) = false or IsArrowDown(2) and IsFunctionKeyDown(7)
  or IsKeyDown(',') and IsFunctionKeyDown(7) or  IsKeyDown('.') and
  IsFunctionKeyDown(7) or IsKeyDown('/') and IsFunctionKeyDown(7)
end;
procedure RunAway_S;
begin
MouseSpeed:= Speed;
  repeat
    Wait(20);
  until IsArrowDown(2) and IsFunctionKeyDown(7)
  repeat
  MakeCompass('N');
  RunAwayFFlag('S');
  until IsArrowDown(2) = false or IsArrowDown(0) and IsFunctionKeyDown(7)
  or IsKeyDown(',') and IsFunctionKeyDown(7) or  IsKeyDown('.') and
  IsFunctionKeyDown(7) or IsKeyDown('/') and IsFunctionKeyDown(7)
end;
begin
 repeat
 HotKeyCaster1;
 HotKeyCaster2;
 HotKeyCaster3;
 RunAway_N;
 RunAway_S;
until false;
end.


Ok this is getting a bit out of hand. The commands only work in certain orders. Could someone please test and tell me how to fix. Would be very much apprieciated.