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.

Index of basic MDScript functions & links

Featured Replies

All MDscripts need a Location setting to define where they can run properly.  
Otherwise, they will toss an error.   See here:
http://magicduel.invisionzone.com/topic/6799-location-setting/
 
[log='General Info']
 

Storage Data
Can use functions, or call as a Variable directly once defined as in:

 

@vs = mds_storage("foo","aoau");

echo  @storage[@vs]

mds_storage_load();   
mds_storage_add();
mds_storage_read();
mds_storage($name,  $type);

 

type = keyword that determines the scope and sharing level of the storage

totu: shared only for this object and this user

toau: shared only for this object but for all users accessing it

aoau: shared across all object and all users, separated by editor

aotu: shared across all object but only for this user

[url="http://magicduel.invisionzone.com/topic/5453-clickable-objects-features/?p=45805"]http://magicduel.invisionzone.com/topic/5453-clickable-objects-features/?p=45805[/url]

 
Variables defined in MDscript.  
A listing of the valid Variable-names to use in scripts. (@va, @vz, @temp, @content, etc)
http://magicduel.invisionzone.com/topic/5494-variables/
 
How to Store Values in Variables.
http://magicduel.invisionzone.com/topic/5492-how-to-store-valuesvariables-using-mdscript/
 
 
retrievetmp();      -or-        mds_retrieve_sessdata();
Retrieve the value of a stored Session variable. (semi-redundant)
http://magicduel.invisionzone.com/topic/7584-function-mds-retrieve-sessdata/

http://magicduel.wikia.com/wiki/Mds_retrive_sessdata

 
 
storetmp();       -or-        mds_store_sessdata();
Store a value in a Session variable. (semi-redundant)
http://magicduel.invisionzone.com/topic/7583-function-mds-store-sessdata/

http://magicduel.wikia.com/wiki/Mds_store_sessdata

 

 
 
uv();    -or-    mds_read_uvars();
Listing of User Variables, available in MDscript.  (id, playername, maxve, etc)
http://magicduel.invisionzone.com/topic/5499-user-variables/
 
[/log]

 
 
[log='Key Control']
mds_give_rpcq_keys();
Gives a key to the player.
 
mds_take_rpcq_keys();
Removes a key from a player.
 
mds_has_rpcq_keys();
checks if player has a specified Key.
http://magicduel.invisionzone.com/topic/5498-key-control/
 
[/log]
 
 
[log='Player Functions & Variables']
 
uv();    -or-    mds_read_uvars();
Listing of User Variables, available in MDscript.  (id, playername, maxve, etc)
http://magicduel.invisionzone.com/topic/5499-user-variables/

 
mds_player_avatar();
Will echo the player's avatar image if the name is valid, otherwise it will give a no avatar message.
http://magicduel.invisionzone.com/topic/6293-function-mds-player-avatar/

http://magicduel.wikia.com/wiki/Mds_player_avatar


 
mds_player_heat();
The player's active heat count.
http://magicduel.invisionzone.com/topic/7564-function-mds-player-heat/

http://magicduel.wikia.com/wiki/Mds_player_heat

 


 
mdsi_takeheat();
Takes heat from the player's active heat and stores it in the item.
http://magicduel.invisionzone.com/topic/7562-function-mdsi-takeheat/
[/log]
 
 
[log='Location Functions']
mds_check_group_location();
check if a given group of people are in that moment online in a given location on the map.
http://magicduel.invisionzone.com/topic/13103-mds-check-group-location/
 
 
mds_location_visits();
returns number of of times player has been in the location.
http://magicduel.invisionzone.com/topic/7579-function-mds-location-visits/

http://magicduel.wikia.com/wiki/Mds_location_visits

 

 
[/log]
 
 
[log='Item Functions']
 
mds_is_itc();
returns an array with item information
http://magicduel.invisionzone.com/topic/12354-function-mds-is-itc;/

http://magicduel.wikia.com/wiki/Mds_is_itc

 

 
mds_has_item();
check if user has a specific item or not.
http://magicduel.invisionzone.com/topic/7342-function-mds-has-item/

 
mdsi_item_heat();
Returns an array of info on the item’s Heat, and players who added it.
http://magicduel.invisionzone.com/topic/7563-function-mdsi-item-heat/

http://magicduel.wikia.com/wiki/Mdsi_item_heat

 

 
[/log]

 
[log='Creature Functions']
mds_is_ctc();
returns an array with creature information
http://magicduel.invisionzone.com/topic/6072-function-mds-is-ctc/

http://magicduel.wikia.com/wiki/Mds_is_ctc

 

 
mds_creature_icon();
Will echo an image icon of the creature matching the ID if it is valid otherwise it will give a missing creature message.
http://magicduel.invisionzone.com/topic/6196-function-mds-creature-icon/
 
[/log]
 
[log='Heat Related Functions']
 
mdsi_item_heat();
Returns an array of info on the item’s Heat, and players who added it.
http://magicduel.invisionzone.com/topic/7563-function-mdsi-item-heat/

http://magicduel.wikia.com/wiki/Mdsi_item_heat

 

 
mds_player_heat();
The player's active heat count.
http://magicduel.invisionzone.com/topic/7564-function-mds-player-heat/

http://magicduel.wikia.com/wiki/Mds_player_heat

 

 
mdsi_takeheat();
Takes heat from the player's active heat and stores it in the item.
http://magicduel.invisionzone.com/topic/7562-function-mdsi-takeheat/

http://magicduel.wikia.com/wiki/Mdsi_takeheat

 

 
[/log]
 
 
[log='Miscellaneous Functions']
 
mds_current_weather();
Returns a string with the current Weather (or false if none).
http://magicduel.invisionzone.com/topic/14251-function-mds-current-weather/

 
mds_debug();     -or-       debug();
http://magicduel.invisionzone.com/topic/5497-debugging-your-code/
 
 
mds_no_warnings();
This will stop MDScript Warnings, but not other errors
http://magicduel.invisionzone.com/topic/5453-clickable-objects-features/?p=45897
 
 
 
Templates!  (useful for populating @contents)
http://magicduel.invisionzone.com/topic/5496-templates/

 
[/log] 
 
 
 
Updated: as of latest Edit timestamp

Edited by Maebius

  • 1 month later...
  • Author

Petition to Pin this index, pls? 

(or move to Script Manual catagory and pin, wherever it seems best)    :) 

  • 1 month later...
  • Author

updated with some Wikia links for the functions, as available.  :)

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.