Skip to content
View in the app

A better way to browse. Learn more.

MagicDuel Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Function: Mdsi_Item_Heat

Featured Replies

[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

  • 1 year later...

I think the final line in the second example should say:
[CODE]echo 'In total ' . count(@vp['players']) . ' have stored heat in talisman';[/CODE]

  • Root Admin

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

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

Forum Statistics

  • Total Topics 17.5k
  • Total Posts 182.2k

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.