MagicDuel

MD Script - number of visits in a location

Announcement 1504 · · Stage 10
A new function was added to show the number of visits in any location of the player opening the item. For use on items (that can be taken anywhere), the functions can also show the number of visits in the current location.

Syntax and examples:
@va = mds_location_visits('current');
echo "Total visits here: @va | ";
@va = mds_location_visits('1_0x0_1');
echo "Total visits in 1_0x0_1: @va ";

A possible use could be in connection with the temporary variables. You could store the current number of visits in a target location , then ask the player to go to that location and return. On return you can compare the previous with the new number of visits in that location to check if he was really there or not. An other use is to check if someone ever accessed a location or not, to avoid spoiling of certain things to players that were never in that place before.
When checking the number of visits be aware that the actual number is irrelevant since it can be increased easy by just entering and exiting that location repeatedly. You could however check that silently to determine for example if someone enters more a place or an other in general. When sitting in the same location the number of visits does not increase.