Difference between revisions of "Krafties Fishing API"
Jump to navigation
Jump to search
| Line 47: | Line 47: | ||
---------------------- | ---------------------- | ||
~ playerKey [key] : The key of the player reeling their pole | ~ playerKey [key] : The key of the player reeling their pole | ||
| − | |||
~ poleType [string] : The type of fishing pole this player has active | ~ poleType [string] : The type of fishing pole this player has active | ||
| − | |||
~ catchType [string] : The result of the reel process. Will usually be a type of fish or a kraftie, but other types may be added in the future | ~ catchType [string] : The result of the reel process. Will usually be a type of fish or a kraftie, but other types may be added in the future | ||
~ catchSize [float(cm)] : The size of whatever was caught, measured in centimeters. If not applicable, this will be set to -1. | ~ catchSize [float(cm)] : The size of whatever was caught, measured in centimeters. If not applicable, this will be set to -1. | ||
| − | |||
~ relativeSizeString [string] : Describes the relative size of this catch result compared to others of the same species. Possible values are: | ~ relativeSizeString [string] : Describes the relative size of this catch result compared to others of the same species. Possible values are: | ||
- EXTRA SMALL | - EXTRA SMALL | ||
| Line 59: | Line 56: | ||
- LARGE | - LARGE | ||
- EXTRA LARGE | - EXTRA LARGE | ||
| − | |||
~ catchRarity [string] : The rarity of the catch result. More may be added in the future, but current possible values are: | ~ catchRarity [string] : The rarity of the catch result. More may be added in the future, but current possible values are: | ||
- VERY COMMON | - VERY COMMON | ||
| Line 66: | Line 62: | ||
- RARE | - RARE | ||
- VERY RARE | - VERY RARE | ||
| − | |||
~ xpAwarded [integer] : The amount of experience points awarded to the player for this catch | ~ xpAwarded [integer] : The amount of experience points awarded to the player for this catch | ||
| − | |||
~ fishingLevel [integer] : The current fishing level of this player | ~ fishingLevel [integer] : The current fishing level of this player | ||
Revision as of 10:28, 20 May 2019
The Krafties Fishing API is made up of messages broadcast on channel -325234765
Messages are broadcast both when a player casts their pole, and when a pole is reeled in. The delimiter "|" is used in both broadcasts. The easiest way to grab the applicable data is using the llParseString2List() function in a listen event
- ie:
listen(integer channel, string name, key id, string message)
{
list fishingAPIData = llParseString2List(message, ["|"], []);
.....
}
__________________________________________________________________________________________
- When player casts:
Broadcast Format:
----------------------
- FISHING_CAST|playerKey
Data Descriptions:
----------------------
~ playerKey [key] : The key of the player casting their pole
LSL Code:
------------
- llRegionSay(-325234765, "FISHING_CAST|"+(string)playerKey);
__________________________________________________________________________________________
- When player reels:
Broadcast Format:
---------------------
- FISHING_REEL|playerKey|poleType|catchType|catchSize|relativeSizeString|catchRarity|xpAwarded|fishingLevel
Data Descriptions:
----------------------
~ playerKey [key] : The key of the player reeling their pole
~ poleType [string] : The type of fishing pole this player has active
~ catchType [string] : The result of the reel process. Will usually be a type of fish or a kraftie, but other types may be added in the future
~ catchSize [float(cm)] : The size of whatever was caught, measured in centimeters. If not applicable, this will be set to -1.
~ relativeSizeString [string] : Describes the relative size of this catch result compared to others of the same species. Possible values are:
- EXTRA SMALL
- SMALL
- MEDIUM
- LARGE
- EXTRA LARGE
~ catchRarity [string] : The rarity of the catch result. More may be added in the future, but current possible values are:
- VERY COMMON
- COMMON
- UNCOMMON
- RARE
- VERY RARE
~ xpAwarded [integer] : The amount of experience points awarded to the player for this catch
~ fishingLevel [integer] : The current fishing level of this player
LSL Code:
------------
- llRegionSay(-325234765, "FISHING_REEL|"+(string)playerKey+"|"+poleType+"|"+catchType+"|"+(string)catchSize+"|"+relativeSizeString+"|"+catchRarity+"|"+(string)xpAwarded+"|"+(string)fishingLevel);