SRL Archive - SRL Archives

GetCookingXP


rogeruk

2009-10-09 20:53:23

[php]{*******************************************************************************
Function GetCookingXP(Food: String): Extended;
By: Rogeruk
Description: Returns Cooking EXP.
*******************************************************************************}
Function GetCookingXP(Food: String): Extended;
Begin
Food := LowerCase(Food);
Case food Of
'meat': Result := 30.0;
'chicken': Result := 30.0;
'rabbit': Result := 30.0;
'roast bird': Result := 63.5;
'roast rabbit': Result := 72.0;
'crab meat': Result := 100.0;
'roast beast meat': Result := 82.0;
'chompy bird': Result := 140.0;
'jubbly': Result := 160.0;
'redberry pie': Result := 78.0;
'meat pie': Result := 104.0;
'mud pie': Result := 128.0;
'apple pie': Result := 130.0;
'garden pie': Result := 138.0;
'fish pie': Result := 164.0;
'admiral pie': Result := 210.0;
'wild pie': Result := 240.0;
'summer pie': Result := 260.0;
'plain pizza': Result := 143.0;
'meat pizza': Result := 169.0;
'achovy pizza': Result := 182.0;
'pineapple pizza': Result := 195.0;
'fishcake': Result := 100.0;
'cake': Result := 180.0;
'chocolate cake': Result := 210.0;
'stew': Result := 117.0;
'curry': Result := 280.0;
'thin snail': Result := 70.0;
'lean snail': Result := 80.0;
'fat snail': Result := 95.0;
'ugthanki kebab': Result := 80.0;
'oomlie wrap': Result := 30.0;
'pita break': Result := 40.0;
'bread': Result := 40.0;
'jungle spider': Result := 80.0;
'nettle tea': Result := 52.0;
'pot of cream': Result := 18.0;
'wine': Result := 200.0;
'pat of butter': Result := 40.0;
'cheese': Result := 64.0;
'anchovies': Result := 30.0;
'crayfish': Result := 30.0;
'shrimp': Result := 30.0;
'karambwanji': Result := 40.0;
'sardine': Result := 40.0;
'karambwan': Result := 80.0;
'herring': Result := 50.0;
'mackerel': Result := 60.0;
'trout': Result := 70.0;
'cod': Result := 75.0;
'pike': Result := 80.0;
'salmon': Result := 90.0;
'slimy eel': Result := 95.0;
'tuna': Result := 100.0;
'rainbow fish': Result := 110.0;
'cave eel': Result := 115.0;
'lobster': Result := 120.0;
'bass': Result := 130.0;
'swordfish': Result := 140.0;
'lava eel': Result := 140.0;
'monkfish': Result := 150.0;
'shark': Result := 210.0;
'sea turtle': Result := 212.0;
'cavefish': Result := 214.0;
'manta ray': Result := 216.0;
'rocktail': Result := 225.0;
'baked potato': Result := 15.0;
'sweetcorn': Result := 104.0;
'potato with butter': Result := 55.0;
'chili potato': Result := 136.0;
'potato with cheese': Result := 95.0;
'egg potato': Result := 191.0;
'mushroom potato': Result := 230.0;
'tuna potato': Result := 310.0;
'worm hole': Result := 170.0;
'vegetable ball': Result := 175.0;
'tangled toad legs': Result := 185.0;
'chocolate bomb': Result := 190.0;
'toad crunchies': Result := 100.0;
'spicy crunchies': Result := 100.0;
'worm crunchies': Result := 100.0;
'choc chip crunchies': Result := 100.0;
'fruit batta': Result := 150.0;
'toad batta': Result := 152.0;
'worm batta': Result := 154.0;
'vegetable batta': Result := 156.0;
'cheese and tomato batta': Result := 158.0;
'cider': Result := 185.0;
'dwarven stout': Result := 215.0;
'asgarnian ale': Result := 248.0;
'greenmans ale': Result := 281.0;
'wizards mind bomb': Result := 313.0;
'dragon bitter': Result := 347.0;
'moonlight mead': Result := 380.0;
'axemans folly': Result := 413.0;
'chefs delight': Result := 446.0;
'slayers respite': Result := 479.0;
'fruit blast': Result := 50.0;
'pineapple punch': Result := 70.0;
'wizard blizzard': Result := 110.0;
'short green guy': Result := 120.0;
'drunk dragon': Result := 170.0;
'chocolate sunday': Result := 170.0;
'blueberry special': Result := 170.0;
End;
End;[/php][php]Function CookingScreen: Boolean;
Begin
Result := GetTextAtEx(342, 350, 0, NPCChars, False, False, 0, 0, 128, 4, True, tr_SmallLetters) = 'cook';
End;[/php]

Tniffoc

2009-10-09 21:02:47

  1. Your information comment forgot the parameter.
  2. Maybe there should be a new file "calculations.scar"?
  3. Is there a way to load this kind of thing from a web page by parsing it so that the file isn't just a bunch of constants?

rogeruk

2009-10-09 21:05:16

From: Tniffoc

  1. Your information comment forgot the parameter.
  2. Maybe there should be a new file "calculations.scar"?
  3. Is there a way to load this kind of thing from a web page by parsing it so that the file isn't just a bunch of constants?


1. Ta
2. Would be a good idea
3. Not really a good idea as firewall permissions would have to be set and then its loading time for the website to load etc etc

Tniffoc

2009-10-09 22:11:07

Well, firewall permissions would not have to be set because outgoing traffic on 80 is allowed for almost any program. (SCAR can access a web page and then parse it). And as for the time you could fix that by putting the loading of the variables in SetupSRL. I don't know, I just think it would be sleeker that way.

senrath

2009-10-09 22:21:31

SRL has a rule about not adding any function that connects to a web page.

Nava2

2009-10-09 23:07:24

I believe this should be done with a for loop with a TStringArray and TExtendedArray.

Sabzi

2009-10-10 06:44:16

There's already a function in FindXP.scar for everything. I don't know if cooking xps are outdated or it's missing some but it's there.

Rich

2009-10-10 06:47:06

From: Sabzi
There's already a function in FindXP.scar for everything. I don't know if cooking xps are outdated or it's missing some but it's there.


You didn't read the function did you? This returns the amount of XP a certain food gives you for cooking it.

Sabzi

2009-10-10 06:48:34

From: R1ch
You didn't read the function did you? This returns the amount of XP a certain food gives you for cooking it.


Exactly what FindXP('cooking', 'any food') do. Or I am missing something very hard.

Rich

2009-10-10 06:50:25

My bad. I'll shut up now :p

rogeruk

2009-10-10 07:53:59

From: Sabzi
There's already a function in FindXP.scar for everything. I don't know if cooking xps are outdated or it's missing some but it's there.


Haha didnt see FindXP.

Close then? :P