Page 1 of 1

mission help

Posted: Tue Dec 06, 2011 2:36 am
by Cdaman
I am trying to make mission chains. How do i design a mission that requires a drop, and then make so you can get that drop.
I am a complete beginner when it comes to html, php, and javascript (I started just over a week ago).

Code: Select all

<HTML>
<HEAD>
	<TITLE>Missions</TITLE>

	<script type="text\javascript">
	function createPopup() {
		window.open('mission_1.html','mission1',"toolbar='no', scrollbars='no', width=200,height=200',statusbar='no',
		menubar='no',resizable='no',left='100',top='150'");
		return false;
	}
	</script>

</HEAD>

<BODY BACKGROUND="Stars.bmp">
<!-- changes the font, then prints Xanitia on the screen -->
<FONT COLOR=#ffffff>
<H1>
<P ALIGN="CENTER">Xanitia</P>
</H1>

<HR>

<DIV ID="Content" STYLE="POSSITION:absolute; border-color: 0; border-style: solid; border-top-width: border-top-width: 5px;
border-right-width: 5px; bored-bottom-width: 5px; border-left-width: 5px;  WIDTH 50; HEIGHT 300; Z-INDEX:2; LEFT:0; TOP:127">
	<H3>
	<P ALIGN="CENTER"> IMPORTANT MISSIONS: </P>
	</H3>
	
	<a href="mission_1.html" target="mission_1.html" onclick="createPopup();">Mission 1</a>
</DIV>
</BODY>
</HTML>
This is the main missions page (only have one mission. how do i get the javascript popup to work?

Code: Select all

<HTML>
<HEAD>
<TITLE>MISSION 1</TITLE>
</HEAD>

<BODY BACKGROUND="Stars.bmp">
<!-- changes the font, then prints Xanitia on the screen -->
<FONT COLOR=#ffffff>
<H1>
<P ALIGN="CENTER">Xanitia: <BR> Mission: <BR> 1</P>
</H1>

<HR>

<DIV ID="Content" STYLE="POSITION:absolute; border-color: 0; border-style: solid; border-top-width: border-top-width: 5px; 
border-right-width: 5px; border-bottom-width: 5px; border-left-width: 5px; WIDTH 50; HEIGHT 300; Z-INDEX:2; LEFT:0; TOP:127">
	<H3 ALIGN="CENTER"><EM><STRONG>Mission 1: <BR> Pesky Pirates</STRONG></EM><BR><BR></H3>
	<P ALIGN="CENTER"> You Recieve a hail from a Lieutenant Striker, he requests that you dock aboard the Terran flagship "Ancient Blade". <BR>
	As you walk along the corrider that leads from the docking bay, you run into a worried looking man; his uniform that of a lieutenent
	"Great to meet you!" His piercing blue eyes stare into yours as he shakes your hand. "You have to meet the admiral, but first; as with
	all new officers, you must get three recemendations. I will start you off. But I need you to do me a favour in return. Kill five
	pirate shuttles and bring me their cores, I will give you a recommendation." </P>

	<HR>
	Requirements: x5 pirate shuttle cores.<BR>
	Rewards: 1,000 credits, 200 experiance, and 1 letter of recommendation
	<HR>
	<a href="#" onclick="self.close();return false;">Close Window</a>
	<a href="battle.php" target="missions">
	Accept mission</a>
</DIV> 
</BODY>
</HTML>
This is the first mission. How do i make so that it allows you to finish it, and require items? :?

Re: mission help

Posted: Tue Dec 06, 2011 7:50 am
by Torniquet
My suggested way is to use a flag of some kind within your database.

then check at the end of a fight to see if this 'flag' is set to true. If so, then give the player the item in question and set another flag to indicate the mission is complete.

Then when you return to the mission page check to see if the completed mission flag is set. If it is, display a complete mission button rather than an accept mission button.

I wouldnt use cookies or sessions as they can easily be altered.

Another tip, dont use bmp images, use pngs, jpgs or gifs :)

Re: mission help

Posted: Tue Dec 06, 2011 3:00 pm
by Ark
Torniquet wrote: I wouldnt use cookies or sessions as they can easily be altered.
How can sessions be easily altered? I thought they were secure.

Re: mission help

Posted: Tue Dec 06, 2011 5:45 pm
by hallsofvallhalla
Dont I have quests in the tutorial series? I know I went over them in one of my tutorials and it will explain this. If not I will add it next.

Re: mission help

Posted: Wed Dec 07, 2011 12:01 am
by Torniquet
Ark wrote:
Torniquet wrote: I wouldnt use cookies or sessions as they can easily be altered.
How can sessions be easily altered? I thought they were secure.
because closing your browser, logging off, changing computers etc etc deletes sessions.

which poses the following problems,

completion of missions are not saved when a user does one of the above, allowing users to do easy missions time and time again.
doing multipart mission, again will not be saved resulting in the above if the parts give different rewards.
users will have to start from the very beginning of a mission if their browser crashes or closes (frustration!)

There will be somepoint where you will need to store information in a database, so why plum about with uneeded things which could potentially cause problems?

Re: mission help

Posted: Wed Dec 07, 2011 6:17 am
by PKDemon
hallsofvallhalla wrote:Dont I have quests in the tutorial series? I know I went over them in one of my tutorials and it will explain this. If not I will add it next.
i thought it was on the class selection where you used a drop down menu and you showed how to pull the data from the database and fill it into the drop down menu :P

Re: mission help

Posted: Fri Dec 09, 2011 6:19 pm
by hallsofvallhalla
actually no, I do have tutorials on quests. Check the latest tutorials

Re: mission help

Posted: Thu Dec 15, 2011 11:43 pm
by Cdaman
When i posted this, i hadn't seen the tutorial videos (becuase of my internet limit, and speed *10-13kbps*, i can't download anything). so i went over a friend's place and downloaded them. I am going through the tutorials now.