Jump to content

Function: Mdsi_Item_Heat

Recommended Posts

[b]array[/b] mdsi_item_heat();

-Amount of heat that has been stored in the item.
-Players that have had heat stored in the item
-How much heat each player has stored

The return array is in this form:
array(2) {
["current"] => total heat
["players"]=> array(
["player name"]=> heat stored by player,
["player name2"]=> heat stored by player,
["player name3"]=> heat stored by player,

All the heat that has ever been stored will be returned. Later on heat might gradually decrease over time or be able to get retrieved through other functions.

Example 1:
@va = mdsi_item_heat();
echo 'The box has ' . @va['current'] . ' heat in it';
Shows how much heat is in the item.

Example 2:
@vp = mdsi_item_heat();
foreach(@vp['players'] as @vk => @vh){
echo @vk . ' has stored ' . @vh . ' heat<br />';
echo 'In total ' . count(@vp['players']) . ' have stored heat in talisman';
Makes a list of players that stored heat in the item and how much.

[i]The function is intended for item use only (hence the mdsi) but can be used in any clickable at present.[/i]

Edited by Chewett
Link to post
Share on other sites
  • 1 year later...

[quote name='samon' timestamp='1340581700' post='115971']
I think the final line in the second example should say:
[CODE]echo 'In total ' . count(@vp['players']) . ' have stored heat in talisman';[/CODE]

that would make sense, i have edited the above example. Thank you.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Forum Statistics

    Total Topics
    Total Posts
  • Recently Browsing

    No registered users viewing this page.

  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

  • Create New...