[Creaturescripts][PHP]Top Frags And second script only php

widnet

Banned User
Joined
Apr 11, 2009
Messages
920
Best answers
0
Reaction score
3
Location
Poland/Cracow
Hello Otlanders
I write for u Top Frags Script

Live demo:
FunOT - Top Frags

Okay
Lets go...

1.Go to data/creaturescripts/ ,open creaturescripts.xml and add
Code:
<event type="kill" name="TopFrags" event="script" value="topfrags.lua"/>
2.Create new file in data/creaturescripts/scripts/ dir ,Set file name topfrags.lua and paste to file this code

Lua:
function onKill(cid, target, lastHit)
if isPlayer(target) then
 db.executeQuery("UPDATE `players` SET `frags` = `frags` + 1 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
end
return true
end
3.Open login.lua and paste after
Lua:
registerCreatureEvent(cid, "Mail")
this
Lua:
registerCreatureEvent(cid, "TopFrags")
Save file
4.Go to /var/www or C:\xampp\httdocs\ open index.php and paste after
PHP:
    case "bugtracker";
        $topic = "Bug Tracker";
        $subtopic = "bugtracker";
        include("bug.php");
    break;
this

PHP:
        case "frags";
        $topic = "Top Frags";
        $subtopic = "frags";
        include("frags.php");
    break;
5.Go to phpmyadmin Select your OT DB,Select SQL
and paste this code
Code:
ALTER TABLE `players` ADD `frags` INT( 11 ) NOT NULL DEFAULT '0';
6.Create new file frags.php and paste this code
PHP:
<?PHP
$frags = $SQL->query('SELECT * FROM `players` ORDER BY `frags` DESC LIMIT 25;');
    foreach($frags as $show) {
     $noobs++;
            if(is_int($noobs / 2))
                $bgcolor = $config['site']['lightborder'];
            else
                $bgcolor = $config['site']['darkborder'];
        $load .= '<TR BGCOLOR='.$bgcolor.'><TD><center><a href="?subtopic=characters&name='.urlencode($show['name']).'">'.$show['name'].'</a></center></TD><TD><center>'.$show['frags'].'</center></TD></TR>';
    }
    $main_content .= '<b><center>Top 25 Frags on '.$config['server']['serverName'].'</center></b><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Name</center></b></TD><TD class="white"><b><center>Frags</center></b></TD></TR>'.$load.'</TABLE>';
    //Dont delate. Please respect my job :)
 $main_content .= 'Script by <b><a href="http://otland.net/members/widnet/">widnet</a></b>';
?>
Elf-Version
http://otland.net/f118/creaturescripts-php-top-frags-67566/index4.html#post699729
Rep ++ Please​
 
Last edited:

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
6,667
Best answers
202
Reaction score
1,375
Location
Norway, Oslo

AchTung

Member
Joined
Nov 12, 2009
Messages
1,352
Best answers
0
Reaction score
7
Location
Germany
Evul....Now I need a new Unique Script for my coming Server, mine is more advanced but anyway it looks great. Keep your great job.
 

HeberPcL

[PowerOT.com.br]
Joined
Aug 21, 2007
Messages
1,280
Best answers
0
Reaction score
38
Location
Brazil
Good Job.

What name of this layout?
 

bilmattan

evo-Online - Owner
Joined
Aug 5, 2008
Messages
1,316
Best answers
0
Reaction score
11
Location
Sweden
Good Job.

What name of this layout?
I think it's something like YOOtheme

Edit :
Great script, just hate that you released it since I had to pay for mine xD
 
Last edited:

Aleh

Active Member
Joined
Jan 9, 2009
Messages
1,228
Best answers
0
Reaction score
39
Location
Rzeszów
You know the server that is the template?
 
OP
widnet

widnet

Banned User
Joined
Apr 11, 2009
Messages
920
Best answers
0
Reaction score
3
Location
Poland/Cracow
when i write this script idk abou this
Top 25 Fragers on website 70% complete //tfs 0.3.6pl1
 

AchTung

Member
Joined
Nov 12, 2009
Messages
1,352
Best answers
0
Reaction score
7
Location
Germany
Script by Martynka hihihih
People ain't respect scripts of other peoples, thats why people shouldn't release such improved codes.... People will just change their name and visitors will think "PRO SCRIPTER OMG" -.-
 

Piotrek1447

Member
Joined
Jun 1, 2007
Messages
658
Best answers
0
Reaction score
16
Location
Rzeszów, Poland
People ain't respect scripts of other peoples, thats why people shouldn't release such improved codes.... People will just change their name and visitors will think "PRO SCRIPTER OMG" -.-
Yea, sometimes i see this in my warsystem. ;)
 
OP
widnet

widnet

Banned User
Joined
Apr 11, 2009
Messages
920
Best answers
0
Reaction score
3
Location
Poland/Cracow
Lepiej to zmień chyba że chcesz mnie zapamiętać
 

Tanken

New Member
Joined
Jun 15, 2007
Messages
20
Best answers
0
Reaction score
0
case "bugtracker";
$topic = "Bug Tracker";
$subtopic = "bugtracker";
include("bug.php");
break;
this isn't in index.php in nicaw svn19b

where does this go in my aac?
case "frags";
$topic = "Top Frags";
$subtopic = "frags";
include("frags.php");
break;
 

AchTung

Member
Joined
Nov 12, 2009
Messages
1,352
Best answers
0
Reaction score
7
Location
Germany
Yea, sometimes i see this in my warsystem. ;)
People should google Respekt :S
I got deleted from an german open tibia forum for telling the admin that its respectless to change the credits of the releasers of otland...
 
OP
widnet

widnet

Banned User
Joined
Apr 11, 2009
Messages
920
Best answers
0
Reaction score
3
Location
Poland/Cracow
I contact with martynka (he not reply me)
Maybe i give martynka WARRING?
hihihi
 

Tanken

New Member
Joined
Jun 15, 2007
Messages
20
Best answers
0
Reaction score
0
anyone have an answer to my question.....?
 
Top