• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior AAC] Quest page, no sql query!

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
Nothing special, someone made a script but with SQL query, this one is without SQL q~
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></b></small>';
?>
 
briefly, envy is bad, why? because one gets an idea and others and starts out to touch what does not sound or not? because otherwise you would not have opened this thread.
you are free to do whatever you want, but there you put (Idea KARGEN) oh and you thought you long ago?
 
briefly, envy is bad, why? because one gets an idea and others and starts out to touch what does not sound or not? because otherwise you would not have opened this thread.
you are free to do whatever you want, but there you put (Idea KARGEN) oh and you thought you long ago?
I said that I just improved a script by someone.<_<
 
sql can allow easier administration(well, the script to admin it will be way easier)but needs more time to work(send query>execute query>send results>show results vs show table)
 
sql can allow easier administration(well, the script to admin it will be way easier)but needs more time to work(send query>execute query>send results>show results vs show table)

rep+ for great guy =)
 
It is.

It's only one query don't make such a big deal from that. It will not flood server or anything, well it's easier to write script with database support than with files.

Why creating new table in your database for this shit when you can do it with arrays? No SQL needed.
sql can allow easier administration(well, the script to admin it will be way easier)but needs more time to work(send query>execute query>send results>show results vs show table)

Looks hard for you, just copy 1 line, write the new quest name, isn't hard.
 
Because of this:

What future features on quest system?
- Add/Delete/Edit in Admin panel
- What monsters will be on a "quest" (showing on tables with .gif)
- Try put a small image on "Rewards" from items.

It's 10x faster and better to write in with database support, don't make such a big deal from the performance, it will be almost as fast as file process.
 
You can still do it without SQL query. $quests[] = etcetc

Yeah, create admin panel for that, including saving to file these arrays which also needs CHMOD's, so basically, the installation will take longer as well.
 
Yeah, create admin panel for that, including saving to file these arrays which also needs CHMOD's, so basically, the installation will take longer as well.

But, this script doesn't includes admin shit, I just rewrote it to "without query" which I think is better (why the hell creathing new table for somethign shit, with 3 coulmns that could be done with arrays?) I never said I'll make admin panel for this script :) Might take longer, but it's better :p
 
But, this script doesn't includes admin shit, I just rewrote it to "without query" which I think is better (why the hell creathing new table for somethign shit, with 3 coulmns that could be done with arrays?) I never said I'll make admin panel for this script :) Might take longer, but it's better :p

But he will, so what's the point of making easy script even easier but harder to manipulate.
 
Back
Top