SRL Archive - SRL Archives

Agility.scar


Hobbit

2008-08-18 22:36:55

Updated for the new agility courses. And I also added in abbreviations for ease of use but kept old ones for compatibility for any other scripts that may use it.

//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-----------------------------------------------------------------//

// * function GetCourseXP(Course : String) : Extended; //by Mad Cow

{*******************************************************************************
function GetCourseXP(Course: String): Extended;
By: Mad Cow and Hobbit
Description: Returns the experience for a certain agility course.
Course list:
adl = agility dungeon ledge
gc = gnome course
bc = barbarian course
pc = penguin course
wec = werewolves course
wic = wilderness course
aac = ape atoll course
ap = agility pyramid
dklg = dorgesh-kaan long grapple
dkdl = dorgesh-kaan double long
*******************************************************************************}

function GetCourseXP(Course: string): Extended;
var
CourseXP: Extended;
begin
case LowerCase(Course) of
'adl', 'agility dungeon ledge': CourseXP := 22.5;
'gc', 'gnome course': CourseXP := 86;
'bc', 'barbarian course': CourseXP := 153.2;
'pc', 'penguin course' : CourseXP := 540;
'wec', 'werewolves course': CourseXP := 540;
'wic', 'wilderness course': CourseXP := 571.5;
'aac', 'ape atoll course': CourseXP := 580;
'ap', 'agility pryamid': CourseXP := 1014;
'dklg', 'dorgesh-kaan long grapple' : CourseXP := 1429;
'dkdl', 'dorgesh-kaan double long' : CourseXP := 2750;
end;
Result := CourseXP;
end;

Nava2

2008-08-18 23:45:36

Why bother? Haha, SRL isn't much good for agility. Unless we plan on just doing it for scriptors.

EvilChicken!

2008-08-19 01:18:03

From: Hobbit
Updated for the new agility courses. And I also added in abbreviations for ease of use but kept old ones for compatibility for any other scripts that may use it.

//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-----------------------------------------------------------------//

// * function GetCourseXP(Course : String) : Extended; //by Mad Cow

{*******************************************************************************
function GetCourseXP(Course: String): Extended;
By: Mad Cow and Hobbit
Description: Returns the experience for a certain agility course.
Course list:
adl = agiliy dungeon ledge
gc = gnome course
bc = barbarian course
pc = penguin course
wec = werewolves course
wic = wilderness course
aac = ape atoll course
ap = agility pyramid
dklg = dorgesh-kaan long grapple
dkdl = dorgesh-kaan double long
*******************************************************************************}
function GetCourseXP(Course: string): Extended;
var
CourseXP: Extended;
begin
case LowerCase(Course) of
'adl', 'agiliy dungeon ledge': CourseXP := 22.5;
'gc', 'gnome course': CourseXP := 86;
'bc', 'barbarian course': CourseXP := 153.2;
'pc', 'penguin course' : CourseXP := 540;
'wec', 'werewolves course': CourseXP := 540;
'wic', 'wilderness course': CourseXP := 571.5;
'aac', 'ape atoll course': CourseXP := 580;
'ap', 'agility pryamid': CourseXP := 1014;
'dklg', 'dorgesh-kaan long grapple' : CourseXP := 1429;
'dkdl', 'dorgesh-kaan double long' : CourseXP := 2750;
end;
Result := CourseXP;
end;


Very good job Hobbit, but since these are constant, why not just put them in the include as comments?

From: Nava2
Why bother? Haha, SRL isn't much good for agility. Unless we plan on just doing it for scriptors.


What'cha talkin' 'bout son? I'm in the process of creating my second agility script.

Hobbit

2008-08-19 02:03:08

From: EvilChicken!
Very good job Hobbit, but since these are constant, why not just put them in the include as comments?


What do you mean?

@Nava, cause i was looking through SRL and noticed it wasn't fully updated.

P1nky

2008-08-19 02:31:24

agility scripts can be better than ever… with reflection so can be in a good use.

EvilChicken!

2008-08-19 06:01:29

I mean that you should just write the XP for each lap as a comment instead of that function which no-one will use anyway, because they just need to know it once.


Understand?

Wizzup?

2008-08-19 06:23:39

    'adl', 'agiliy dungeon ledge': CourseXP := 22.5;

Typo. :)

Waddo

2008-08-19 06:58:42

EC! its so you can remember the function and do var:=getcoursexp('adl');
instead of having to open the include.

EvilChicken!

2008-08-19 07:05:31

From: Waddo
EC! its so you can remember the function and do var:=getcoursexp('adl');
instead of having to open the include.


And tell me why should'nt we just open up the include ONCE, add the XP you want to your script as a comment, and be happy that you just saved
  • a slight bit of memory
  • the annoyance of having to include a useless skill to your script
  • a slightly faster compiling time

Understand what I mean now?

Nava2

2008-08-19 11:18:13

I agree with EC, comments would be useful. Its like some of the other parts of SRL, there are useless things that won't be used except once to find a number. ALTHOUGH I wish I had the FindXP function for my fletcher before I made a better one… :(

n3ss3s

2008-08-19 12:04:48

From: EvilChicken!
And tell me why should'nt we just open up the include ONCE, add the XP you want to your script as a comment, and be happy that you just saved
  • a slight bit of memory
  • the annoyance of having to include a useless skill to your script
  • a slightly faster compiling time

Understand what I mean now?


Want to save memory?

TheXP := 0;

There.

Hobbit

2008-08-19 12:49:32

From: Wizzup?
    'adl', 'agiliy dungeon ledge': CourseXP := 22.5;

Typo. :)


That was Mad Cow :p

@ EC and Nava

I'm merely updating an old function already in SRL. Wether of not it you deem it useful or useless is seemingly unimportant to the devs considering it is already included.

Nava2

2008-08-20 08:30:24

From: Hobbit
That was Mad Cow :p

@ EC and Nava

I'm merely updating an old function already in SRL. Wether of not it you deem it useful or useless is seemingly unimportant to the devs considering it is already included.


Smart ass.:(

I still think it should be constants. :D