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.

Ensuring A Player Is Actually There

Featured Replies

[b]Content
[/b][html]
You're in the right location, here's a cookie!<br/>

<!-- content separator -->

You are not allowed to view this from here!!<br />
[/html]


[b]<< MD-PHP Script >>[/b]
[code]
(locations 1_0x0_1)
if
(uv('location') == '1_0x0_1') { //checks the location the player is at and matches it against where they should be
echo @content['0']; //if they're in the correct place, it displays the first content te xt
}
else {
echo @content['1']; //if they're in a different place, it displays the second content te xt
}
[/code]



You can modify this with keys and such to ban people from the quest if they try and use alternate means

Edited by Grido(polis)
adding html tag bbcode into it because i have OCD

A note: due to the locations restriction "[b](locations 1_0x0_1)[/b]", the player has to be at that scene in order to access the script.
Checking that the player is actually there, is already provided by MDS ;)
However, it does make sense to use it if you have multiple locations allowed (but whether or not it is good to use that feature is a different matter entirely)

[quote name='Grido(polis)' timestamp='1284497697' post='68420']
no it doesnt ;)

talk to me on yim
[/quote]

Actually the reason I requested this function (a long time ago) was so that you could make a single script which functions differently at different locations based on the players current location. This is much cleaner than having to make multiple scripts at each site and bug check each and every one.

It also allows quests where multiple people are working in unison to satisfy a condition for example "have someone at every fountain in MD at the same time". Without a location function that isn't possible.

Cheers,

Cutler

  • 3 years later...

So does this works as Grido says it works or as Rendril says it works? Is (locations 1_0x0_1) enough to restrict it only to GoE or do I have to use the whole thing even though script will be runable only in one location?

  • Author

The location restriction that Rendril states, restricts the compiling of code to be anywhere other than the listed locations. People could potentially still access it from other locations though.

 

The function listed in the initial post restricts players from trying to access the clickable from anywhere else, meaning the player has to be in the location you want them to be in.

  • Root Admin

I don't understand the difference.... but yes I don't want unauthorized remote access, thank you.


Yeah, The location setting is broken, and doesnt work as intended, Has been so for a while and I havent had time to fix it since rendril stopped coding.

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.