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

VIP status on website.

Belthazor

New Member
Joined
Sep 20, 2008
Messages
528
Reaction score
4
Hey,

This script was made by ballack13, his script was check storage if quest is done or not. and some one wanted VIP status for his Website and i edited ballack13 script and made this so here ya go.

First go to Character.php and find this line.
PHP:
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>'.$account_status.'</TD></TR></TABLE>';

then remove this
PHP:
 </TABLE>';

so make it like this.
PHP:
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>'.$account_status.'</TD></TR>';

and now pasta this under that.
PHP:
$id = $player->getCustomField("id");
             $number_of_quests = 0;
            $number_of_quests = 0;
            $quests = array('VIP Account Status:' => 5009,); 
                        foreach ($quests as $storage => $name) {
                if(is_int($number_of_quests / 2))
                    $bgcolor = $config['site']['lightborder'];
                else
                    $bgcolor = $config['site']['darkborder'];
                $number_of_quests++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>'.$storage.'</TD>';
                        $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
                           if($quest == false) {
            $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>';
                        }
            else
            {
            $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>';
            }
            }
            $main_content .= '</TABLE></td></tr></table>';

change here the Storage nummber to what you want.
PHP:
 $quests = array('VIP Account Status:' => 5009,);


and it will look like this.
vip.jpg
 
How to modifique this for get "promotion level 2" to get VIP status. (Using TFS 0.3.4 PL2).

Thanks, and this script are very good!
 
I compressed the script abit, should work too :D
PHP:
            $id = $player->getCustomField("id");
            $vipid = 5009; 
            $main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD WIDTH=10%>Vip Status:</TD>';
                        $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$vipid.';')->fetch();
            if($vip == false) {
            $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>';
            }
            else
            {
            $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>';
            }
            $main_content .= '</TABLE></td></tr></table>';
 
Dmn, cant edit my post. It would be nice if someone made a array that would shove the name of house that players owns, the same as in irl tibia. Should't be hard.
 
I'll pay someone (probably $30) if they can get it to work with uniqueids :wink:

Red
 
Guys some1 can help me ???

Look :
Code:
http://img269.imageshack.us/my.php?image=errore.jpg

I have this in my characters.php :
Code:
				$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>';

It's different a little than this in first post.
 
Guys some1 can help me ???

Look :
Code:
http://img269.imageshack.us/my.php?image=errore.jpg

I have this in my characters.php :
Code:
				$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>';

It's different a little than this in first post.

Code:
		$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>';
				$main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free Account</font></b>';
				


            $id = $player->getCustomField("id"); 
            $vipid = 15000;  
            $main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD WIDTH=10%>Vip Status:</TD>'; 
                        $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$vipid.';')->fetch(); 
            if($vip == false) { 
            $main_content .= '<TD><span class="red"><B>Inactive</B></TD></TR>'; 
            } 
            else 
            { 
            $main_content .= '<TD><span class="green"><B>Active</B></TD></TR>'; 
            } 
            $main_content .= '</TABLE></td></tr></table>'; 







if($account->isBanned())
 
Now When We Speaking About VIP, Does Someone Know How To Make A Script So You Can Know How Many Who Got Vip On My Server??
 
Try this, not tested but should work:

PHP:
            $id = $player->getCustomField("id");
            $main_content .= '<TR BGCOLOR="'.$config['site']['darkborder'].'"><TD WIDTH=10%>Vip Status:</TD>';
                        $vip = $SQL->query('SELECT * FROM players WHERE player_id = '.$id.' AND `viptime` > 0;')->fetch();
            if($vip == false) {
            $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>';
            }
            else
            {
            $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>';
            }
            $main_content .= '</TABLE></td></tr></table>';
 
Back
Top