Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-12-2012, 07:39 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 68,536
AlexC is an unknown quantity at this point
Default 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";
$article_content = "<div style='text-align:left;'>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...</div><br /><br><iframe src='http://yoursite.com/explore/0.html' frameborder='0' height='400' width='700'></iframe> ";
Yeah, I know, everyone hates iframes - but guess what, in this case, iframes will help you so your members won't be able to save at a certain spot (say, on a rare pet link) and so you don't actually have to make a billion pages. You'll only need explore.php to actually be on your site, the rest is something else altogether (though it does involve pages).

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>
<head>
 <script type="text/javascript"><!--
var links = new Array();
links[0]="1.html";
links[1]="2.html";
links[2]="3.html";   
links[3]="4.html";
links[4]="5.html";
links[5]="6.html";
links[6]="7.html";
links[7]="8.html";   
links[8]="9.html";
links[9]="10.html";

function getRandomLink() {
	var randomNum = Math.floor(Math.random()*links.length);
	window.location = links[randomNum];
}
//--></script>
</head>

<body>

Insert little welcome message about how everyone is happy and the sun is shining, and ask which way they'd like to go.


<br><br><br><br><br>

<table border="0" align="center">
<tr align="center">
  <td></td>
  <td><form name="" action="">
	<input type="button" value="Go Ahead!" onclick="getRandomLink()" />
</form></td>
  <td></td>
</tr>
<tr>
  <td><form name="" action="">
	<input type="button" value="Go Left!" onclick="getRandomLink()" />
</form></td>
  <td></td>
  <td><form name="" action="">
	<input type="button" value="Go Right!" onclick="getRandomLink()" />
</form></td>
</tr>
<tr align="center">
  <td></td>
  <td><form name="" action="">
	<input type="button" value="Go Back!" onclick="getRandomLink()" />
</form></td>
  <td></td>
</tr>
</table>

</body>
<html>
Alright, so this is going to be the starter page of your little explore system. Notice on the link list I don't have 0.html - means this page won't be repeated at all.

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.
__________________

Last edited by AlexC; 03-12-2012 at 01:11 PM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trade System Kyttias Questions and Supports 4 05-29-2016 12:29 AM
Dev Rambling: Exploration System Kyttias Programming and Game Development 4 01-27-2015 01:54 AM
Abandon system bokkun Mys v1.1.x Mods 30 11-16-2010 10:19 PM
Trade System? sensacion Questions and Supports 5 08-20-2010 11:36 AM
Trade System? SieghartZeke Questions and Supports 1 12-28-2009 07:06 AM


All times are GMT -5. The time now is 06:20 PM.

Currently Active Users: 879 (0 members and 879 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636