Editing Krafties Scripting API
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | [[Category:Krafties API]] | + | [[Category:Krafties API]] |
− | |||
− | |||
= Creature/Pet API = | = Creature/Pet API = | ||
− | + | The Krafties Scripting API is a feature which allows you to get data from your Kraftie Creature for your own scripted third party addons. | |
− | + | ||
− | + | Currently this is read only although gives access to a wide range of possibilities. | |
− | + | ||
+ | This API relies on listening to 1 minute pings on channel '''<code>-748382747</code>''' from inworld Krafties Creatures. | ||
+ | |||
+ | Creatures will communicate on this channel once <code>on_rez</code> and then every 60 seconds. | ||
+ | |||
Message format is a string delimited by <code>|</code> containing every prim UUID. (16 Prims) | Message format is a string delimited by <code>|</code> containing every prim UUID. (16 Prims) | ||
− | + | ||
+ | <code><nowiki>prim1UUID|prim2UUID|prim3UUID|prim4UUID|prim5UUID|prim6UUID|prim7UUID|prim8UUID|prim9UUID|prim10UUID|prim11UUID|prim12UUID|prim13UUID|prim14UUID|prim15UUID|prim16UUID</nowiki></code> | ||
Line 16: | Line 19: | ||
− | + | ||
+ | '''PRIM DESCRIPTION FORMATS''' | ||
*'''Prim 1 Description:''' <code><nowiki>"Bonded "+(string)species+ " - "+(string)elementType</nowiki></code> | *'''Prim 1 Description:''' <code><nowiki>"Bonded "+(string)species+ " - "+(string)elementType</nowiki></code> | ||
Line 38: | Line 42: | ||
*'''Prim 10 Description:''' <code><nowiki>(integer)playerExpEarnedLast24Hours + "," + (integer)playerExpEarnedLastWeek + "," + (integer)playerExpEarnedLastMonth + "," + (integer)playerExpEarnedAllTime + "," + (integer)battlesWonLast24Hours+ "," + (integer)battlesWonLast24Week + "," + (integer)battlesWonLast24Month + "," + (integer)battlesWonAllTime</nowiki></code> | *'''Prim 10 Description:''' <code><nowiki>(integer)playerExpEarnedLast24Hours + "," + (integer)playerExpEarnedLastWeek + "," + (integer)playerExpEarnedLastMonth + "," + (integer)playerExpEarnedAllTime + "," + (integer)battlesWonLast24Hours+ "," + (integer)battlesWonLast24Week + "," + (integer)battlesWonLast24Month + "," + (integer)battlesWonAllTime</nowiki></code> | ||
− | *'''Prim 11 Description:''' <code><nowiki>(integer) | + | *'''Prim 11 Description:''' <code><nowiki>(integer)getAffinity</nowiki></code> |
*'''Prim 12 Description:''' <code><nowiki>(string)llList2CSV(weaknesses)</nowiki></code> | *'''Prim 12 Description:''' <code><nowiki>(string)llList2CSV(weaknesses)</nowiki></code> | ||
− | *'''Prim 13 Description:''' <code><nowiki>(integer) | + | *'''Prim 13 Description:''' <code><nowiki>(integer)silverMembershipExpiryUnixTime+";"+(integer)goldMembershipExpiryUnixTime</nowiki></code> |
*'''Prim 14 Description :''' <code><nowiki>(string)currentSpell</nowiki></code> | *'''Prim 14 Description :''' <code><nowiki>(string)currentSpell</nowiki></code> | ||
Line 92: | Line 96: | ||
*Player Eliminated | *Player Eliminated | ||
− | These messages will be send on the corresponding event. There are 2 lists delimited by <code> | + | |
+ | These messages will be send on the corresponding event. There are 2 lists delimited by <code>,</code> & <code>|</code> into a string. | ||
By matching <code>matchID</code> you will be able to link temples for successful battles. | By matching <code>matchID</code> you will be able to link temples for successful battles. | ||
− | *<code><nowiki>list playersData = [playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime, playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime];</nowiki></code> | + | *<code><nowiki>list playersData = [playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime, playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime]; // 2 players strided by 7</nowiki></code> |
− | *<code><nowiki>list eliminatedPlayersData = [playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime, playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime, playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime];</nowiki></code> | + | |
+ | *<code><nowiki>list eliminatedPlayersData = [playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime, playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime, playerKey, petKey, petID, petLevel, manaLeft, energyLeft, lastPingTime]; // 3 players strided by 7</nowiki></code> | ||
*<code><nowiki>"PLAYER_ELIMINATED|"+(string)matchID+"|"+(string)playerKey+"|"+llDumpList2String(playersData, ",")+"|"+llDumpList2String(eliminatedPlayersData, ","));</nowiki></code> | *<code><nowiki>"PLAYER_ELIMINATED|"+(string)matchID+"|"+(string)playerKey+"|"+llDumpList2String(playersData, ",")+"|"+llDumpList2String(eliminatedPlayersData, ","));</nowiki></code> |