mission help

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
Cdaman
Posts: 15
Joined: Tue Dec 06, 2011 2:08 am

mission help

Post 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? :?
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: mission help

Post 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 :)
New Site Coming Soon! Stay tuned :D
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Re: mission help

Post 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.
Orgullo Catracho
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: mission help

Post 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.
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: mission help

Post 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?
New Site Coming Soon! Stay tuned :D
PKDemon
Posts: 91
Joined: Tue Nov 15, 2011 5:51 pm

Re: mission help

Post 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
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: mission help

Post by hallsofvallhalla »

actually no, I do have tutorials on quests. Check the latest tutorials
Cdaman
Posts: 15
Joined: Tue Dec 06, 2011 2:08 am

Re: mission help

Post 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.
Post Reply

Return to “Beginner Help and Support”