se7enet purgatorio

Page 1 of 3 123>
Topic Options
Rate This Topic
#18545 - 10/24/08 06:16 PM skills
EAL
Grape Nuts


Registered: 07/03/08
Posts: 31

Offline
Im thinking about adding skills to my game. for example mining, fishing, smiting, hunting. But im stuck.

Any ideas how to go about it and how to start it?

Top
#18546 - 10/24/08 07:08 PM Re: skills [Re: EAL]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
I have the following in my game.

Excavating
Refining
Smithing
Stamina
Herb Picking
Fishing

They are really easy to do.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18547 - 10/24/08 07:38 PM Re: skills [Re: Fayt]
EAL
Grape Nuts


Registered: 07/03/08
Posts: 31

Offline
do you have it so that when you increase that skill you can gain more experience for that skill, or you get the same amount each time?
Top
#18548 - 10/24/08 08:14 PM Re: skills [Re: EAL]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Yep gain more, level up, etc.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18549 - 10/24/08 08:17 PM Re: skills [Re: Fayt]
EAL
Grape Nuts


Registered: 07/03/08
Posts: 31

Offline
thats really cool.

Im Still trying to figure out the code for skills.

Top
#18550 - 10/25/08 08:50 AM Re: skills [Re: EAL]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Well take me what you want to do and I can help
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18551 - 10/25/08 11:59 AM Re: skills [Re: Fayt]
EAL
Grape Nuts


Registered: 07/03/08
Posts: 31

Offline
i wanted to add fishing,cooking, mining, smiting skills. There more you do that skill the more experience you ca get for the skill and better chance of seceding. I have made hidden little place like a lake and a abandon mine, so i wanted the payers to be able to use the skills there. When the player catches a fish or mines ore its stored. The player then can sell the fish or ore , or cook the fish to eat, or smith the ore into objects and weapons.
Top
#18554 - 10/25/08 10:37 PM Re: skills [Re: EAL]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
So you basicly want the script from the Dragons Kingdom script which I cannot give you. I built my skills from blank. This is easy to do. Tell me 1 skill first and list what you want it to include.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18563 - 10/26/08 09:11 AM Re: skills [Re: Fayt]
EAL
Grape Nuts


Registered: 07/03/08
Posts: 31

Offline
Sorry I didn't know dragon kingdom was like that I never seen dragon kingdom.

One skill I wanted was fishing. I wanted so you could fish, gain experience, at higher levels you can catch better fish, and cook it, but that could be just a button with a certain chance of not burning it.

Top
#18564 - 10/26/08 09:30 AM Re: skills [Re: EAL]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Well first you need a GET and SWITCH. Like so

---------------------------------------------

if (isset($_GET["do"])) {
$do = explode(":",$_GET["do"]);

switch($do[0])
{
case 'main':
main();
break;

}
}

-----------------------------------------------------

Then you build the function.

------------------------------------------------------

function main() {

global $userrow, $numqueries;

$townquery = doquery("SELECT name,innprice FROM {{table}} WHERE latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' LIMIT 1", "towns");
if (mysql_num_rows($townquery) != 1) { display("<p>You cannot access this Area outside of town. You may now return to <a href=\"index.php\">exploring</a>.", "Error"); }
$townrow = mysql_fetch_array($townquery);
$updatequery = doquery("UPDATE {{table}} SET location='Fishing' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$title = 'Fishing';
$page .= 'Welcome to Fishing!<br><br>';
$page .= '<a href="index.php">Return</a> to town.';

}
-------------------------------------------------------

Once you finish building the function up and ready, we go to stage 2.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18569 - 10/26/08 12:09 PM Re: skills [Re: Fayt]
EAL
Grape Nuts


Registered: 07/03/08
Posts: 31

Offline
Thanks. Im going work on it right away.
Top
#18570 - 10/26/08 02:03 PM Re: skills [Re: EAL]
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
You don't need a switch just use functions and add them to index.php. Much easier.
Top
#18573 - 10/26/08 05:15 PM Re: skills [Re: gamefreak888]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
basleijser you are a first class idiot. If you pile a shit load of functions in index.php you will cause a really large file, and a longer loading time. It will also cause you to have to search for an hour to find what you want, and it isn't needed.

EAL listen to one who knows how to code.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18575 - 10/27/08 09:25 AM Re: skills [Re: Fayt]
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
-.-'

You don't have to put all the elseif functions in index.php, you can also put them in several files, just like it's done in admin.php.

And you can use simple COMMENTS (for example:
//this is a comment)

Like:

//Basic town functions
elseif ~ etc.

//Fighting functions
elseif ~

Top
#18576 - 10/27/08 09:32 AM Re: skills [Re: gamefreak888]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
No shit, the SWITCH command is in every file. Making the files smaller.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
Page 1 of 3 123>


Hop to:

se7enet

Barack Obama Logo