Hello everybody, iam newbie on .php and .sql fuctions and i will release a new code for OWN QUESTS, now it is beta, i will put a new features in a future.
What news in quest system?
- archive questsql.sql ^.-
- Only showing tables from DB (Level - Description - Rewards)
- Quest WITHOUT query SQL (Script by Zonet - Idea Chojrak)
What future features on quest system?
- Add/Delete/Edit in same archive
- What monsters will be on a "quest" (showing on tables with .gif)
- Try put a small image on "Rewards" from items.
Preview Photo:
Copy codes:
go to xampp/htdocs/ and create a archive with this name quest.php and put this:
and after you add in you htdocs the document, go to you http://xx.xx.xx.xx/phpmyadmin and add this SQL tables.
for add a new table for a quest insert only this SQL table
on index.php add:
Script without sql querys:
Credits for this script:
Kargen (Idea and Creator of script/SQL)
Xampy (Little fixed on query )
Chojrak (Idea from Quest System without querys)
Zonet (Scripter from quest system without querys)
if you like my work, please dont dude and give me rep+, thanks.
What news in quest system?
- archive questsql.sql ^.-
- Only showing tables from DB (Level - Description - Rewards)
- Quest WITHOUT query SQL (Script by Zonet - Idea Chojrak)
What future features on quest system?
- Add/Delete/Edit in same archive
- What monsters will be on a "quest" (showing on tables with .gif)
- Try put a small image on "Rewards" from items.
Preview Photo:
Copy codes:
go to xampp/htdocs/ and create a archive with this name quest.php and put this:
PHP:
<?php
/* Idea/Script make by Kargen, Little fixed on query for SHOW IT by Xampy (Thanks :*)*/
$main_content .= '<br><table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor='.$config['site']['vdarkborder'].'>
<td colspan="2"><b><center>Quests</center></b></td>
</tr></table>';
$main_content .= '<table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor="'.$config['site']['lightborder'].'"><td width="15%"><center><b>Level</b></center></td><td width="65%"><b><center>Description</center></b></td><td width="20%"><center><b>Rewards</b></center></td></tr>';
$show = $SQL->query("SELECT * FROM `z_quest_system` ORDER BY `lvl` ASC");
$qcolour = 0;
foreach($show as $qresult) {
if(is_int($qcolour / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$qcolour++;
$main_content .= '<tr bgcolor="'.$bgcolor.'"><td><center><b><i>'.$qresult['lvl'].'</i></b></center></td><td>'.$qresult['descrip'].'</td><td>'.$qresult['rewards'].'</td></tr>';
}
$main_content.= '</table>';
$main_content.= '<div align="right"><small><b>Creator Code: <a href="http://otland.net/members/kargen/">Kargen</a></b></small></div><br />';
?>
Code:
CREATE TABLE IF NOT EXISTS `z_quest_system` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lvl` varchar(32) DEFAULT NULL,
`descrip` varchar(255) DEFAULT NULL,
`rewards` varchar(255) DEFAULT NULL,
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=41 ;
INSERT INTO z_quest_system VALUES (NULL, '50', 'Example Description',
'Royal Helmet');
Code:
INSERT INTO z_quest_system VALUES (NULL, '50', 'Example Description',
'Royal Helmet');
on index.php add:
PHP:
case "questsystem";
$topic = "Quest System";
$subtopic = "questsystem";
include("quest.php");
break;
PHP:
<?php
/* Scrip by zonet */
$quests = array (
1 => array ( "name" => "Demon Helmet", "level" => 100, "description" => "Write your description here", "reward" => "Demon Helmet, Demon Shield, Boots of haste"),
2 => array ( "name" => "Annihilator", "level" => 100, "description" => "4 Peoples needed!", "reward" => "Magic Sword, Stonecutter Axe, Demon Armor, Present(choose 1)"),
3 => array ( "name" => "Pits of Inferno", "level" => 100, "description" => "Very hard quest. You need a big team to do this quest, the quest is long too!", "reward" => "dont know xD")
);
$main_content .= '<table border="0px" cellspacing="1px" cellpadding="4px" width="100%">
<tr bgcolor="'. $config['site']['vdarkborder'] .'" style="color: white;"><th width="5%">Level</th><th width="15%">Quest Name</th><th width="40%">Description</th><th width="20%">Reward</th></tr>';
$row = 1;
foreach($quests as $quest) {
$bgcolor = ($row % 2 ? $config['site']['lightborder'] : $config['site']['darkborder']);
$row++;
$main_content .= '<tr bgcolor="'. $bgcolor .'"><td>'. $quest['level'] .'</td><td> '. $quest['name'] .'</td><td>'. $quest['description'] .'</td><td> '. $quest['reward'] .' </td></tr>';
}
$main_content .= '</table><small><b>Script by <a href="http://otland.net/members/zonet" target="_blank">Zonet</a> Idea by <a href="http://otland.net/members/kargen">Kargen</a> and <a href="http://otland.net/members/chojrak">Chojrak</a></b></small>';
?>
Kargen (Idea and Creator of script/SQL)
Xampy (Little fixed on query )
Chojrak (Idea from Quest System without querys)
Zonet (Scripter from quest system without querys)
if you like my work, please dont dude and give me rep+, thanks.
Last edited: