![]() |
Exploration System
Alright, so a while ago I took it upon myself to try and figure out a simple exploration script. Just something easy, where my members could look for items or pets, and I thought I'd share the script with you all.
The system is; + Non cheatable. Most people won't be able to figure out how to save at a certain point + Simple - very little coding is used. No huge thing to walk through. + Can be embedded in any layout + RANDOM - this is a non-narrated adventure. So yeah, this actually wasn't very hard to make, the hardest part was finding a random link selector. I consider it rather easy to edit, but HOWEVER: there is a downfall to the easy to edit part - the "randomly selected" thing is included in the header of every individual page - I advise you mass edit, which I'll go over later. LET'S GET TO IT SHALL WE? So, to start, you'll need the page itself. Go and find your blank.php and copy it. Rename it whatever you want - for this, we'll go with "explore.php". Between the "START SCRIPT" and "OUTPUT PAGE" things, place this: Code:
$article_title = "Explore The Forest"; Step two, is to change what it says up there. That's a copy of what's on my site and I'll be very upset if you don't change it. You'll want to change... - Title ($article_title = "Explore The Forest") - Content (You have decided to take some of your pets exploring down in the park. It's a beautiful day and you'd just love an adventure right about now...) - Width (width='700') - URL (http://yoursite.com/) Step Three. Create a directory, folder or whatever your host is calling them. Call it something like "Explore" or "Explore Pages" - we'll just go with "Explore". Step Four. Take this file below here and make a page titled "0.html" in your "Explore" folder. Code:
<html> So, for the rest, you'll want to make ten copies of this 0.html page, and name them 1.html, 2.html, etc, etc. Then give each of them a different message. Most of them won't be much of anything - to increase the odds of getting certain messages, repeat them. So you can have nine messages about a weird looking flower and one about finding a rare pet under said flower. And that's it! Almost. Just a quick note that I said I would say; Mass editing. As you can see, the link selector is placed in the header of every single page. I wasn't sure how to put it in its own file (that'll be an update somewhere in the future). So if you plan to have fifty pages, I would recommend writing out fifty, pasting it into your ten and then just slowly making the pages afterwards, with the fifty links already in. Also, if you want to say, add ten or twenty pages in the future, don't do them one by one, do them all at once and add the links all at once. Tedious, I know, but hey - if you don't like it, don't use it. So yeah, now I'm done. Hopefully it wasn't too confusing. Hopefully I can edit this over time and make it a little better. Credit would be nice - I didn't put it in the script anywhere, but maybe if you want to mention somewhere that Gloometh made the script, that'd be nice. If you've got an questions, suggestions, complaints, feel free to post them. |
If i find the time will try this.. good job though!
|
Thanks - it's a little time consuming to write out, but otherwise pretty easy.
|
why not try PHP instead?
PHP Code:
|
I don't know that much about php, so I can't really code form scratch...
|
ah.. well my script shoud work if you want to use it :)
|
I'll stick with my version, because taking yours would mean I really didn't make it. Feel free to post yours though.
|
From what I can tell, it would generate pages saying something like "you found a pet/item/coin" and a link to continue exploring but I don't see how it would actually give people anything.
Also, in the blank.php I don't see anything to do with "START SCRIPT" and "OUTPUT PAGE" Only: Code:
<?php |
This thread was made for an earlier version of Mysidia and pages are not rendered in the same way anymore.
I know that in 1.3.4 that for each page there are two: one to hold complex code, and one to render the page. It's helpful to bounce to a second file for complex code, especially when forms are involved. I don't actually know how to get around having two files, even though one is fundamentally going to be blank if it's useless to you. Perhaps you can glean from my example: I have map.php, and it contains merely this blank class (and the contents from blank.php work just as well, to base an example off of): PHP Code:
PHP Code:
While this is not an exploration system in the sense that the original post has, I hope it explains how pages are rendered a little better? I'm trying to write up some vague documentation based on things I've learned about Mysidia, you can find that here. *** edit: And to imitate exactly what the original post has, try this-- explore.php: PHP Code:
PHP Code:
|
This is really helpful! I was looking for something similar (I've been trying to do an image map for shops and such). This is awesome! Thank you!
|
All times are GMT -5. The time now is 07:39 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.