SRL Archive - Outdated Tutorials

[#39] Skill_ Constants


Sir R. M8gic1an

2009-09-12 22:30:25

[php]
{ const Skills consts
Description: To be used with Players.Level[] array
Players woodcutting level: Players.Level[Skill_WoodCutting]
}
const
Skill_Attack = 1;
Skill_Strength = 2;
Skill_Defense = 3;
Skill_Range = 4;
Skill_Prayer = 5;
Skill_Mage = 6;
Skill_RuneCrafting = 7;
Skill_HP = 8;
Skill_Agility = 9;
Skill_Herblore = 10;
Skill_Thieving = 11;
Skill_Crafting = 12;
Skill_Fletching = 13;
Skill_Slayer = 14;
Skill_Mining = 15;
Skill_Smithing = 16;
Skill_Fishing = 17;
Skill_Cooking = 18;
Skill_FireMaking = 19;
Skill_WoodCutting = 20;
Skill_Farming = 21;
Skill_Construction = 22;
Skill_Hunter = 23;
Skill_Summoning = 24;
[/php]


These have been added to Players.scar, and as usual are already available to those using the OpenDev repositorie. They were place thered to make easier reading and use of Players.Level. Hopefully you can make use of them and will find some inventive way to do so :)

Lots o' Love
The SRL Dev Team

Method

2009-09-12 22:31:12

I thought we already had these in there (but maybe that was just the tab constants). Good work! :)

Awkwardsaw

2009-09-12 22:40:47

thanks :) remembering the numbers was sort of confusing and hard, this makes it simple :p

Baked0420

2009-09-12 23:08:16

cool, I don't think this was needed as bad as GameTabs, but still nice.

if(Skill_Attack + Skill_Strength = Skill_Defence)then
writeln('LOL')
else
writeln('I FAIL');


EDIT: That kinda creativity Rasta? :p just kidding, know that's not what it's meant for haha

marpis

2009-09-16 18:38:30

I used this in rev 35 or 36 already, they're not anything new?
They used to be in GameTab.scar, right?

Sir R. M8gic1an

2009-09-16 18:43:27

From: marpis
I used this in rev 35 or 36 already, they're not anything new?
They used to be in GameTab.scar, right?


yeah, they just got moved as they weren't visible and therefore a made a post for it, for people to take more notice.

~RM