SRL Archive - SRL Archives

A new function for Herblore.scar!


Abyssal

2007-04-24 23:19:44

Retrieves herblore identifying XP.

function HerbXP(HerbType: string): Extended;
begin
case Trim(LowerCase(HerbType)) of
'guam leaf': Result:= 2.5;
'marrentill': Result:= 3.8;
'tarromin': Result:= 5;
'harralander': Result:= 6.3;
'ranarr weed': Result:= 7.5;
'toadflax': Result:= 8;
'irit leaf': Result:= 8.8;
'avantoe': Result:= 10;
'kwuarm': Result:= 11.3;
'snapdragon': Result:= 11.8;
'cadantine': Result:= 12.5;
'lantadyme': Result:= 13.1;
'dwarf weed': Result:= 13.8;
'torstol': Result:= 15;
end;
end;

Test it:

program HerbXP_Test;

{.include SRL\SRL.scar}

var
XP: Extended;

function HerbXP(HerbType: string): Extended;
begin
case Trim(LowerCase(HerbType)) of
'guam leaf': Result:= 2.5;
'marrentill': Result:= 3.8;
'tarromin': Result:= 5;
'harralander': Result:= 6.3;
'ranarr weed': Result:= 7.5;
'toadflax': Result:= 8;
'irit leaf': Result:= 8.8;
'avantoe': Result:= 10;
'kwuarm': Result:= 11.3;
'snapdragon': Result:= 11.8;
'cadantine': Result:= 12.5;
'lantadyme': Result:= 13.1;
'dwarf weed': Result:= 13.8;
'torstol': Result:= 15;
end;
end;

begin
XP:= HerbXP('guam leaf');
Writeln(FloatToStr(XP));
end.


Enjoy.

TheGodfather

2007-04-25 00:46:00

Thanks, now we dont needa look up the exp our selves :P

Thanks for bring lazy back ;)

edit: thats really good though, we need some herblore

JuKKa

2007-04-25 15:34:55

this is good!

Smartzkid

2007-04-25 15:45:49

Very nice.

Abyssal

2007-04-25 18:14:48

Thanks for the positive feedback guys :)

Bobarkinator

2007-04-25 18:51:02

We should make one that expands into all skills

Abyssal

2007-04-25 21:33:52

Something like…

function GetXP(Skill, Type: string): Extended;

And it uses a lot of case…of to retrieve the XP?

Bobarkinator

2007-04-25 23:05:49

Ya, I can help you with it if you want. I can start tomorrow.

Smartzkid

2007-04-26 00:16:03

Program Test;

function GetXP(skill, stype: string): Extended;
begin
skill := Trim(LowerCase(skill));
stype := Trim(LowerCase(stype));
case skill of

'farming' : case stype of //FARMING
'potato' : Result := 8;
'onion' : Result := 9.5;
'cabbage' : Result := 10;
'tomato' : Result := 12.5;
'sweetcorn' : Result := 17;
'strawberry': Result := 26;
'watermelon': Result := 48.5;
end;

'firemaking' : case stype of //FIREMAKING
'normal logs' : Result := 40;
'oak logs' : Result := 60;
'willow logs' : Result := 90;
'teak logs' : Result := 105;
'arctic pine logs': Result := 125;
'maple logs' : Result := 135;
'mahogany logs' : Result := 157.5;
'yew logs' : Result := 202.5;
'magic logs' : Result := 303.8;
end;

'crafting' : case stype of //CRAFTING
'gloves' : Result := 13.8; // Armour \\
'leather gloves' : Result := 13.8; // \\
'boots' : Result := 16.3;
'leather boots' : Result := 16.3;
'cowl' : Result := 18.5;
'leather cowl' : Result := 18.5;
'body' : Result := 25;
'soft body' : Result := 25;
'soft leather body' : Result := 25;
'snail helmet' : Result := 32.5;
'crab helmet' : Result := 33;
'normal chaps' : Result := 27;
'leather chaps' : Result := 27;
'hard body' : Result := 35;
'hard leather body' : Result := 35;
'spiked vembraces' : Result := 5.8;
'fremennik shield' : Result := 34;
'broodoo sheild' : Result := 100;
'coif' : Result := 37;
'studded body' : Result := 40;
'yak-hide leg armour' : Result := 32;
'yak hide leg armour' : Result := 32;
'studded chaps' : Result := 42;
'snakeskin boots' : Result := 30;
'yak-hide body armour' : Result := 32;
'yak hide body armour' : Result := 32;
'snakeskin vambraces' : Result := 35;
'snakeskin bandana' : Result := 45;
'snakeskin chaps' : Result := 50;
'snakeskin body' : Result := 55;
'green dragonhide vambraces' : Result := 62;
'green dragonhide chaps' : Result := 124;
'green dragonhide body' : Result := 186;
'blue dragonhide vambraces' : Result := 70;
'blue dragonhide chaps' : Result := 140;
'blue dragonhide body' : Result := 210;
'red dragonhide vambraces' : Result := 78;
'red dragonhide chaps' : Result := 156;
'red dragonhide body' : Result := 234;
'black dragonhide vambraces' : Result := 86;
'black dragonhide chaps' : Result := 172; //\\ //\\
'black dragonhide body' : Result := 258; // \\armour// \\

'cut opal' : Result := 15; // Jewelery \\
'cut opal gems' : Result := 15; // \\
'cut opal gem' : Result := 15;
'gold ring' : Result := 15;
'gold necklace' : Result := 20;
'gold amulet' : Result := 30;
'gold ammy' : Result := 30;
'cut jade' : Result := 20;
'cut jade gems' : Result := 20;
'cut jade gem' : Result := 20;
'holy symbol' : Result := 50;
'cut red topaz gems': Result := 25;
'cut red topaz' : Result := 25;
'cut red topaz gem' : Result := 25;
'unholy symbol' : Result := 50;
'cut sapphire gems' : Result := 50;
'cut sappy' : Result := 50;
'cut sapphire' : Result := 50;
'cut saphire gem' : Result := 50;
'sapphire ring' : Result := 40;
'sappy ring' : Result := 40;
'sappy necklace' : Result := 55;
'sapphire necklace' : Result := 55;
'tiara' : Result := 52.5;
'sapphire amulet' : Result := 65;
'sappy amulet' : Result := 65;
'sapphire ammy' : Result := 65;
'sappy amulet' : Result := 65;
'cut emerald gems' : Result := 67;
'cut emerald' : Result := 67;
'cut emeralds' : Result := 67;
'cut emerald gem' : Result := 67;
'emerald ring' : Result := 55;
'emerald necklace' : Result := 60;
'emerald amulet' : Result := 70;
'emerald ammy' : Result := 70;
'cut ruby gems' : Result := 85;
'cut ruby' : Result := 85;
'cut rubies' : Result := 85;
'cut ruby gem' : Result := 85;
'ruby ring' : Result := 70;
'ruby necklace' : Result := 75;
'cut diamond gems' : Result := 107.5;
'cut diamond' : Result := 107.5;
'cut diamonds' : Result := 107.5;
'cut diamond gem' : Result := 107.5;
'diamond ring' : Result := 85;
'ruby amulet' : Result := 85;
'ruby ammy' : Result := 85;
'cut dragonstone gems' : Result := 137.5;
'cut dragonstone gem' : Result := 137.5;
'cut dragonstones' : Result := 137.5;
'cut dragonstone' : Result := 137.5;
'dragonstone ring' : Result := 100;
'diamond necklace' : Result := 90;
'cut onyx gems' : Result := 167.5;
'cut onyx gem' : Result := 167.5;
'cut onyx' : Result := 167.5;
'cut onyxii' : Result := 167.5; // =D
'onyx ring' : Result := 115;
'diamond amulet' : Result := 100;
'diamond ammy' : Result := 100;
'dragonstone necklace' : Result := 105;
'dragonstone amulet': Result := 150;
'dragonstone ammy' : Result := 150;
'onyx necklace' : Result := 120;
'onyx amulet' : Result := 165; //\\ //\\
'onyx ammy' : Result := 165; // \\Jewelery// \\

'molten glass' : Result := 20; // Glass \\
'beer glass' : Result := 17.5; // \\
'candle lantern' : Result := 19;
'oil lamp' : Result := 25;
'vial' : Result := 35;
'glass and vial' : Result := 55; // ????
'fishbowl' : Result := 42.5;
'glass orb' : Result := 42.5;
'glass and orb' : Result := 72.5;
'bullseye lantern lens' : Result := 55;
'glass and lens' : Result := 75;
'light orb' : Result := 70;
'glass and light orb' : Result := 90; //\\ //\\
'filament in light orb' : Result := 104; // \\Glass// \\

'silver bolts' : Result := 50; //for 10;

'water battlestaff' : Result := 100; //staffs
'earth battlestaff' : Result := 112.5;
'fire battlestaff' : Result := 125;
'air battlestaff' : Result := 137.5;

'ball of wool' : Result := 2.75; //misc.
'wool' : Result := 2.75;
'pie dish' : Result := 25;
'pot' : Result := 12.6;
'bowl' : Result := 33;
'flax bowstring' : Result := 15;
'flax' : Result := 15;
'sinew crossbow string' : Result := 15;
'sinew' : Result := 15;
'magic string' : Result := 30;
'plantpot' : Result := 37.5;
'vegetable sack' : Result := 38;
'pot lid' : Result := 40;
'rope' : Result := 25;
'fruit basket' : Result := 56;
end;

'cooking' : case stype of //COOKING
'sinew' : Result := 3; // Meats \\
'raw meat' : Result := 30;
'meat' : Result := 30;
'shrimp' : Result := 30;
'raw shrimp' : Result := 30;
'chicken' : Result := 30;
'raw chicken' : Result := 30;
'anchovies' : Result := 30;
'raw anchovies' : Result := 30;
'sardine' : Result := 40;
'raw sardine' : Result := 40;
'karambwanji' : Result := 10;
'karambwan' : Result := 80;
'ugthanki kebab' : Result := 80;
'kebab' : Result := 80;
'ugthanki' : Result := 80;
'herring' : Result := 50;
'mackerel' : Result := 60;
'thin snail' : Result := 70;
'trout' : Result := 70;
'spider' : Result := 80;
'lean snail' : Result := 80;
'cod' : Result := 75;
'pike' : Result := 80;
'crab meat' : Result := 100;
'crab' : Result := 100;
'fat snail' : Result := 95;
'salmon' : Result := 90;
'slimy eel' : Result := 95;
'tuna' : Result := 100;
'chompy' : Result := 140;
'fishcake' : Result := 100;
'rainbow fish' : Result := 110;
'cave eel' : Result := 115;
'lobster' : Result := 120;
'jubbly' : Result := 160;
'bass' : Result := 130;
'swordfish' : Result := 140;
'ooblie wrap' : Result := 30;
'lava eel' : Result := 30;
'karambwan' : Result := 190;
'monkfish' : Result := 150;
'shark' : Result := 210;
'sea turtle' : Result := 211.3; //\\ //\\
'manta ray' : Result := 216.3; // \\Meats// \\

'cider' : Result := 182; //brewing
'dwarven stout' : Result := 215;
'asgarnian ale' : Result := 248;
'greenman''s ale': Result := 281;
'wizard''s mind bomb' : Result := 314;
'mind bomb' : Result := 314;
'dragon bitter' : Result := 347;
'moonlight mead' : Result := 380;
'axeman''s folly': Result := 413;
'chef''s delight': Result := 446;
'slayer''s respite' : Result := 479;

'baked potato' : Result := 15; // Veggies
'spicy sauce' : Result := 25;
'scrambled egg' : Result := 50;
'sweetcorn' : Result := 104;
'buttered potato' : Result := 40;
'chilli-con-carne potato' : Result := 15; //wish they'd make these names shorter =)
'fried onion' : Result := 60;
'fried mushroom' : Result := 60;
'cheesed potato' : Result := 40;
'tomato potato' : Result := 45;
'onion potato' : Result := 55;
'tuna potato' : Result := 10;

'toad crunchies' : Result := 100; //Gnomish foods
'spice crunchies' : Result := 100;
'worm crunchies' : Result := 100;
'choc chip crunchies' : Result := 100;
'fruit batta' : Result := 150;
'toad batta' : Result := 152;
'worm batta' : Result := 154;
'vegetable batta' : Result := 156;
'cheese and tomato batta' : Result := 158;
'worm hole' : Result := 170;
'vegetable ball' : Result := 175;
'tangled toad legs' : Result := 185;
'chocolate bomb' : Result := 190;

'fruit blast' : Result := 50; //Gnomish drinks
'pineapple punch' : Result := 70;
'wizard blizzard' : Result := 110;
'short green guy' : Result := 120;
'drunk dragon' : Result := 160;
'chocolate saturday' : Result := 170;
'blurberry special' : Result := 180;

'bread' : Result := 40; //Other stuff
'redberry pie' : Result := 78;
'meat pie' : Result := 110;
'nettle tea' : Result := 52;
'cream' : Result := 18;
'stew' : Result := 117;
'mud pie' : Result := 128;
'apple pie' : Result := 130;
'garden pie' : Result := 138;
'plain pizza' : Result := 143;
'wine' : Result := 200;
'butter' : Result := 22.5;
'cake' : Result := 180;
'meat pizza' : Result := 169;
'fish pie' : Result := 164;
'butter to cheese' : Result := 23.5;
'milk to cheese' : Result := 64;
'chocolate cake' : Result := 210;
'anchovy pizza' : Result := 182;
'pitta bread' : Result := 40;
'curry' : Result := 280;
'pineapple pizza' : Result := 188;
'admiral pie' : Result := 210;
'wild pie' : Result := 240;
'summer pie' : Result := 260;
end;
end;
end;

begin
writeln(floattostr(getxp('cooking','wild pie')));
end.

:p Its quite interesting to see what boredom will do to a person

All of the crafting, firemaking, cooking, and farming is done.

EDIT:
Finished cooking.

If anyone wants to help:
RHQCalculators

Bobarkinator

2007-04-26 07:59:36

That's sweet smartkidz. Just like 20 more skills to go.

Abyssal

2007-04-26 16:29:54

I have started the massive project. :)

Bobarkinator

2007-04-26 18:49:05

Keep us updated on what you have so far so that we can help out and not do something twice

Abyssal

2007-04-27 16:28:16

I'll PM you Bob with all the info you need.