• 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 Quests

Rivao

New Member
Joined
Mar 2, 2010
Messages
58
Reaction score
0
I want to add more quest to show on the web, how to i can do that?
 
This is what i found:
PHP:
 //quest status by ballack13
                        if ($player->getCustomField( 'show_quests' ) == 1) {
                        $id = $player->getCustomField("id");
                        $number_of_quests = 0;
                        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';               
                        $quests = $config['site']['quests'];
                        foreach ($quests as $storage => $name) {
                                if(is_int($number_of_quests / 2))
                                        $bgcolor = $config['site']['darkborder'];
                                else
                                        $bgcolor = $config['site']['lightborder'];
                                $number_of_quests++;
                        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';
                        $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
                           if($quest == false) {
                        $main_content .= '<TD><img src="images/false.png"/></TD></TR>';
                        }
                        else
                        {
                        $main_content .= '<TD><img src="images/true.png"/></TD></TR>';
                        }
                        }

                        $main_content .= '</TABLE></td></tr></table><br />';}
                        $deads = 0;

Can you mark me what part i need to copy and what should i edit?
 
Go to htdocs/config/config.php

Line 11~ should look something like this.
PHP:
$config['site']['quests'] = array('Annihilator Quest' => 2000,'Demon Helmet Quest' => 2645,'Yalahari Quest' => 2645,'Demon Oak Quest' => 2645,'Inquistion Quest' => 2645,'Pits of Inferno' => 5550); // list of quests, 'questname' => storage-id,
 
By double clicking the chests with your mapeditor ,there you will see the action ids to add in config.php
 
Well, all of thoose 4 chest should have the same (to not be able to take more then 1 item) so its the same.. And you do it in config.php and not characters.php
 
Just open the .lua file (actions/quests/xxx.lua) of the quest (for example annihilator.lua) and find the part where it sets storageid:
Lua:
getCreatureStorage(pid, 30015) --An example
It can also be like this:
Lua:
getCreatureStorage(pid, config.storage) --An example
Than there probably is a something at top like:
Lua:
local config 
{
	storage = 30015, --An example
}

The numbers in here are the ones that should be in the config file.
So for annihi it should be like this:
PHP:
$config['site']['quests'] = array('Annihilator Quest' => 30015); // list of quests, 'questname' => storage-id,
 
Back
Top