Jump to content
Sign in to follow this  
Rendril

Function: Mdsi_Item_Heat

Recommended Posts

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

[b]Returns[/b]
-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,
etc
)
}
}

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:
[code]
@va = mdsi_item_heat();
echo 'The box has ' . @va['current'] . ' heat in it';
[/code]
Shows how much heat is in the item.

Example 2:
[code]
@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';
[/code]
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

Share this post


Link to post
Share on other sites
[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]
[/quote]

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

Share this post


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.

Guest
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.

Loading...
Sign in to follow this  

  • Forum Statistics

    15,832
    Total Topics
    173,490
    Total Posts
  • Recently Browsing

    No registered users viewing this page.

  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...