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: Mds_Has_Item

Featured Replies

Copied from Mur's announcement

You can now check if user has a specific item or not. The function mds_has_item("item name") returns the number of items the player has (zero if none). Because coins are technically also items, you can also check how much silver or gold someone has. This function will work the same way for upcoming raw material type of items (not planks and such, something else)
Here is sample code:

(locations 1_3x0_1)
@va = mds_has_item("Silver coin");
echo "You have ".@va." Silver coins";

@va = mds_has_item("Mammon's Book");
if(@va>0){
echo "You have the book";
}else{
echo "Go search for Mammon's Book";
}

  • 1 year later...

[s]By the way, if you search for a "resource" that is unsplittable, such as [i]Water/Fat/Memory Stone/Wiiya[/i] etc, it will return a value of
[color=#000000][color=#0000BB]string[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700]) [/color][color=#DD0000]"1"[/color][/color] instead of an integer with the number of items on-hand. Is this a bug?

(I'm guessing not a bug as Resources are not a quantity but a real-ness when in large amounts)[/s]


Resources are counted as normal items now, as described in the original post.

Edited by Maebius

yeah same guess as yoars, water etc is more like to have "charges" when ya trade ya are just addin/removin those charges, rather than each bein its own item, anyway this can be easily checked, by water ids when ya get more water and such, i bet those never change, idk myself cuz i never had those items called resources, its just wild guesses that sound logical to me :D

  • 2 weeks later...

The ID can change if you pick up fresh resources (such as dowsing water, harvesting Herbs, and such)

Resources are counted as normal items now, as described in the original post.

Edited by Maebius

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.