• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction (6.1) Cyber's REPSystem w/Opinion Points for 0.4 && mAAC

Is this the best reputation system?

  • Yes.

    Votes: 131 66.2%
  • No.

    Votes: 30 15.2%
  • It's good but can be improved.

    Votes: 37 18.7%

  • Total voters
    198
  • Poll closed .
Status
Not open for further replies.
Ok, thanks Cyber, I'm opening the server now, I'll try and edit this post.

Ok, it worked!!

evilstripes.png is a broken link, dtk why:

http://img230.imageshack.us/img230/5149/86118985.jpg

I've studied the scripts but couldn't find the error

Excelent script by the way, thank you!

REP++++

-- Edit --

After some tweaking I managed to almost fix the broken image:

http://img259.imageshack.us/img259/8991/82303961.jpg

The problem is this code:

# Red Stripe
$MadGD->addText($query['name'])->setPosition( 15, $row2 * $height2 ); $row2++;
$MadGD->addText($query['rep'])->setPosition( 37, $row2 * $height2 ); $row2++;
$MadGD->addText($rank[0])->setPosition( 15, $row2 * $height2 );
$MadGD->display( BASEPATH_REP.'cache/evilstripe.png' );

Any value below 37 results in a broken image, and default value is 15. (values for text positioning)

Another thing that annoys me a little bit, is that the tables are a bit unnaligned, maybe 1 pixel lol, but this should be so easy to fix that it's worth to try
 
Last edited:
cyber do you have the version 5.0 it worked on my server and the version 6.0 don't
5.1
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Cyber's REP System" revision="5.1" author="Cybermaster" web="otfusion.org" enabled="yes" 
released="August2010" credits="Sync;Shawak;Chris;nsanee"><config name="repSystem"><![CDATA[
    rep = {
        --[[ CONFIG ]]--
        interval = 180, --This is [3] hours, in minutes. Time to be online to gain [1] Opinion Point.
        minLevel = 20, --From this level onwards player can use commands
        pvpLevel = 30, --Minimum level for PVP Rep'ing
        required = 5, --Opinion points required to repute with talkaction command
        --[[ STORAGES ]]--
        update = 9234, --Global Storage used to verify database at server startup
        lastName = 5036, --Used to store the last repped's GUID
        lastKilled = 5037, --Used to store the last killed's GUID
        opinion = 5038, --Used to store the opinion points
        online = 5039, --Used to store online minutes
 
        autoOpinion = function(cid)
            if not isPlayer(cid) then return true end
            doCreatureSetStorage(cid, rep.online, getCreatureStorage(cid, rep.online)+1)
            if getCreatureStorage(cid, rep.online) >= rep.interval then
                doCreatureSetStorage(cid, rep.online, 0)
                doSendAnimatedText(getThingPos(cid), '+1', TEXTCOLOR_LIGHTBLUE)
                doCreatureSetStorage(cid, rep.opinion, getCreatureStorage(cid, rep.opinion)+1)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have just obtained an opinion point.')
            end
            repEvent = addEvent(rep.autoOpinion, 60 * 1000, cid)
        end,
 
        getArticle = function(cid, uppercase)
            return (getPlayerSex(cid) ==  0 and (uppercase and 'Sh' or 'sh') or (uppercase and 'H' or 'h')) .. 'e'
        end,
 
        getPoints = function(cid)
            local result = db.getResult('SELECT `rep` FROM `players` WHERE `id` = '.. getPlayerGUID(cid))
            local data = result:getDataInt('rep')
            result:free()
            return data
        end,
 
        getPower = function(points)
            local power = {{0,1},{300,2},{500,3},{1000,4},{1500,5},{2000,6},{5000,7}}
            table.sort(power, function(a, b) return a[1] > b[1] end)
            for _, t in ipairs(power) do     
                if math.abs(points) >= t[1] then
                    return t[2]
                end
            end
            return power[1][2]
        end,
 
        getRank = function(points)
            local ranks = {
                {-5000, 'Power Abuser (*<<==========)'},
                {-2000, 'Evil (=*<==========)'},
                {-1500, 'Slayer (==*==========)'},
                {-1000, 'Killer (===|=========)'},
                {-500,     'Villain (====|========)'},
                {-300,     'Creeping (=====|=======)'},
                {0,     'Unknown (======|======)'},
                {300,     'Avowed (=======|=====)'},
                {500,     'Popular (========|====)'},
                {1000,     'Hailed (=========|===)'},
                {1500,     'Acclaimed (==========+==)'},
                {2000,     'Hero (==========>+=)'},
                {5000,    'Legend (==========>>+)'}
            }
            if points > -1 then
                table.sort(ranks, function(a, b) return a[1] > b[1] end)
                for _, t in ipairs(ranks) do if points >= t[1] then return t[2] end end
            else
                table.sort(ranks, function(a, b) return a[1] < b[1] end)
                for _, t in ipairs(ranks) do if points <= t[1] then return t[2] end end
            end        
            return ranks[1][2]
        end,
 
        set = function(cid, points)
            db.executeQuery('UPDATE `players` SET `rep` = ' .. points .. ' WHERE `id` = ' .. getPlayerGUID(cid))
        end,
 
        add = function(cid, amount, color)
            db.executeQuery('UPDATE `players` SET `rep` = `rep` + ' .. amount .. ' WHERE `id` = ' .. getPlayerGUID(cid))
            doSendAnimatedText(getThingPos(cid), '+REP', color and color or math.random(255))
            doPlayerSendCancel(cid, 'You have just been hailed and gained '.. amount ..' reputation points.')
        end,
 
        remove = function(cid, amount, color)
            db.executeQuery('UPDATE `players` SET `rep` = `rep` - ' .. amount .. ' WHERE `id` = ' .. getPlayerGUID(cid))
            doSendAnimatedText(getThingPos(cid), '-REP',  color and color or math.random(255))
            doPlayerSendCancel(cid, 'You have just been repudiated and lost '.. amount ..' reputation points.')
        end,
 
        format = function(str)
            str = tostring(str):reverse()
            str = str:gsub("(%d)(%d)(%d)", '%1%2%3' .. (',' or ' '), math.ceil(str:len() / 3)-1)
            return str:reverse()
        end,
    }
]]></config>
 
<globalevent name="rep_start" type="start" event="script"><![CDATA[
    domodlib('repSystem')
    function onStartup()
        if getGlobalStorageValue(rep.update) == EMPTY_STORAGE then
            setGlobalStorageValue(rep.update, 1)            
            local query = db.getResult("SELECT `rep` FROM `players` LIMIT 1;")
            if isInArray({-1,'',nil,false},query:getID()) then
                print('>> [REP_SYSTEM] Installing Reputation System...Ignore error from above...')
                db.executeQuery("ALTER TABLE `players` ADD COLUMN `rep` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Cyber''s REPSystem © OTLand.net';")
                print('>> [REP_SYSTEM] System successfully installed.')           
            else
                print('>> [REP_SYSTEM] Updating Reputation System...')
                db.executeQuery("ALTER TABLE `players` CHANGE COLUMN `rep` `rep` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Cyber''s REPSystem © OTLand.net';")
                print('>> [REP_SYSTEM] System successfully updated.')
            end
            query:free()
        end
        print('>> [REP_SYSTEM] Current Revision: 5.1') 
        print('>> [REP_SYSTEM] Reputation System successfully loaded.')         
        return true
    end
]]></globalevent>
 
<event type="login" name="repRegister" event="script"><![CDATA[
    domodlib('repSystem')
    function onLogin(cid)
        addEvent(rep.autoOpinion, 60 * 1000, cid)
        if getCreatureStorage(cid, rep.opinion) == EMPTY_STORAGE then
            doCreatureSetStorage(cid, rep.online, 0)
            doCreatureSetStorage(cid, rep.opinion, 0)
        end
        registerCreatureEvent(cid, "repLook")
        registerCreatureEvent(cid, "repKill")
        registerCreatureEvent(cid, "repMonster")
        return true
    end
]]></event>
 
<event type="logout" name="repCancel" event="script"><![CDATA[
    domodlib('repSystem')
    function onLogout(cid)
        stopEvent(repEvent)
        return true
    end
]]></event>
 
<event type="look" name="repLook" event="script"><![CDATA[
    domodlib('repSystem')
    function onLook(cid, thing, position, lookDistance)
        if isPlayer(thing.uid) then
            doPlayerSetSpecialDescription(thing.uid,'\n' .. (thing.uid == cid and 'You are' or rep.getArticle(thing.uid, true) .. ' is') .. ' ' .. rep.getRank(rep.getPoints(thing.uid)))
        end            
        return true
    end]]>
</event>
 
<event type="kill" name="repKill" event="script"><![CDATA[
    domodlib('repSystem')
    local t = {
        [SKULL_WHITE] = 15,
        [SKULL_RED] = 30,
        [SKULL_BLACK] = 45,
        [SKULL_NONE] = -30,
    }
 
    function onKill(cid, target, lastHit)
        if isPlayer(cid) and isPlayer(target) and getPlayerIp(cid) ~= getPlayerIp(target) and getCreatureStorage(cid, rep.lastKilled) ~= getPlayerGUID(target) then
        --THE KILLER
            if t[getCreatureSkullType(target)] and getPlayerLevel(target) >= rep.pvpLevel then
                doSendAnimatedText(getThingPos(cid), getCreatureSkullType(target) == 0 and '-REP' or '+REP', math.random(255))
                doCreatureSetStorage(cid, rep.lastKilled, getPlayerGUID(target))
                rep.set(cid, rep.getPoints(cid)+t[getCreatureSkullType(target)])
                doPlayerSendCancel(cid, 'You '.. (getCreatureSkullType(target) == 0 and 'lose' or 'gain') ..' reputation because you killed a player.')
            end
        --THE VICTIM
            if rep.getPoints(target) == 0 then
                return true
            elseif rep.getPoints(target) > 0 then
                rep.remove(target, 5, TEXTCOLOR_RED)
                doPlayerSendCancel(target, 'You lose reputation because you were killed by a player.')
            else
                rep.add(target, 5, TEXTCOLOR_LIGHTBLUE)
                doPlayerSendCancel(target, 'You lose reputation because you were killed by a player.')
            end
        end
        return true
    end]]>
</event>
 
<event type="kill" name="repMonster" event="script"><![CDATA[
    domodlib('repSystem')
    local monster = {
        ['demon'] = 3,
        ['behemoth'] = 4,
        ['hellfire fighter'] = 5,
        ['orshabaal'] = 10,
    }
    function onKill(cid, target, lastHit)
        if not isPlayer(cid) or not isMonster(target) or not monster[string.lower(getCreatureName(target))] then
            return true
        end
        rep.add(cid, monster[string.lower(getCreatureName(target))])
        return true
    end]]>
</event>
 
<talkaction log="yes" words="/hail;/fuck;/set" access="4" event="buffer">
    <![CDATA[
        domodlib('repSystem')
        if param == '' then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'[REP_SYSTEM] You must write a player\'s name.')
            return true
        end
 
        local t = string.explode(param, ',')
        local tid = getPlayerByNameWildcard(t[1])
 
        if not isPlayer(tid) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Player ' .. param .. ' not found.')
            return true
        end
 
        if not t[2] and isPlayer(tid) then  
            if words == '/hail' then
                rep.add(tid, 5, TEXTCOLOR_TEAL)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You added +5 rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.')
                return true
            end
 
            if words == '/fuck' then
                rep.remove(tid, 5, TEXTCOLOR_RED)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You removed -5 rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.')
                return true
            end
        end
 
        if t[2] and isInArray({'/set','/hail','fuck'}, words) then
            if not tonumber(t[2]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Reputation amount is invalid.')
                return true
            end                                    
        end
 
        if words == '/hail' then
            rep.add(tid, t[2], TEXTCOLOR_TEAL)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You added ' .. t[2] .. ' rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.')
            return true
        end
 
        if words == '/fuck' then
            rep.remove(tid, t[2], TEXTCOLOR_RED)
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You removed ' .. t[2] .. ' rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.')
            return true
        end
 
        if t[2] and words == '/set' then
            rep.set(tid, t[2])
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You have set ' .. getPlayerName(tid) .. '\'s points to ' .. rep.getPoints(tid))
        else
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Absolute reputation amount not specified.')
            return true
        end
 
        if not t[2] then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Absolute reputation amount not specified.')
            return true
        end    
    return true]]>
</talkaction>
 
<talkaction words="!ranks" event="buffer"><![CDATA[
    domodlib('repSystem')
    local str, value, name, result, forbidden = '','','',0,nil,'Account Manager'
    if isInArray({'hero','pos','1','+'}, param) then
        str,value,name = '[#]-[Name]-[Points]-[Rank]\n--[Positive Reputation Highscores]--\n','rep','name'
        result = db.getResult('SELECT `name`, `rep` FROM `players` WHERE `rep` > 0 AND `name` NOT LIKE "%Sample" AND `name`!= "Account Manager" AND `deleted` = 0 AND `group_id` = 1 ORDER BY `rep` DESC LIMIT 10;')
    elseif isInArray({'evil','neg','2','-'}, param) then
        str,value,name = '[#]-[Name]-[Points]-[Rank]\n--[Negative Reputation Highscores]--\n','rep','name'
        result = db.getResult('SELECT `name`, `rep` FROM `players` WHERE `rep` < 0 AND `name` NOT LIKE "%Sample" AND `name`!= "Account Manager" AND `deleted` = 0 AND `group_id` = 1 ORDER BY `rep` ASC LIMIT 10;')
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Unknown parameter, use only +, -, 1, 2.')
        return true
    end
 
    if isInArray({-1,nil,false,''},result:getID()) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'No results were found.')
        return true
    end
    local i = 1
    while true do
        str = str .. '\n ' .. i .. '. ' .. result:getDataString('name') .. ' - [' .. result:getDataInt(value) .. '] - ' .. rep.getRank(result:getDataInt(value))
        i = i + 1
        if not(result:next()) then
            break
        end
    end
    result:free()
    doPlayerPopupFYI(cid, str)
return true]]>
</talkaction>
 
<talkaction words="!rep" event="buffer"><![CDATA[
    domodlib('repSystem')
        local points, action, name = rep.getPoints(cid), false, getPlayerNameByGUID(getCreatureStorage(cid, rep.lastName), false, false)
        doPlayerSendTextMessage(cid, 19, 'You have ' .. rep.format(points)  .. ' reputation points. You are ' .. rep.getRank(points) .. '. Your Rep Power is ' .. rep.getPower(points) ..'.\nYou have ' .. getCreatureStorage(cid, rep.opinion) .. ' opinion points and you will gain one '.. (getCreatureStorage(cid, rep.opinion) > 0 and 'more ' or '') ..'in '.. rep.interval - getCreatureStorage(cid, rep.online) ..' minutes.' .. (name ~= nil and ' You last reputed ' .. name .. '.' or ''))
        if points > 4999 then --female rep+++ queen outfit
            disguise, text, action = getPlayerSex(cid) == 0 and 331 or 332, getPlayerSex(cid) == 0 and 'Queen!!' or 'King!!', true
        elseif points > 1999 then --rep++ cm outfit
            disguise, text, action = 73, 'Hero!!', true
        elseif points > 1499 then --rep+ hero outfit
            disguise, text, action = 63, 'Acclaimed!!', true
        elseif points < -4999 then --rep*** devil outfit
            disguise, text, action = 334, 'P.O.!', true
        elseif points < -1999  then --rep** pig outfit
            disguise, text, action = 306, 'Evil!!', true
        elseif points < -1499 then --rep* orc outfit
            disguise, text, action = 5, "Slayer!!", true  
        end
 
        if action and getCreatureOutfit(cid).lookType ~= disguise then
            doSetCreatureOutfit(cid, {lookType = disguise}, -1)
            doSendAnimatedText(getThingPos(cid), text, math.random(255))
        return true
        end    
    return true]]>
</talkaction>
 
<talkaction words="!hail;!fuck" event="buffer"><![CDATA[
    domodlib('repSystem')
    if param == '' then
        doPlayerSendCancel(cid, 'Command requires a player\'s name.')
        return true
    end
 
    local target = getPlayerByNameWildcard(param)
 
    if not isPlayer(target) then
        doPlayerSendCancel(cid, 'That player does not exist or is offline.')
        return true
    end
 
    if getPlayerLevel(cid) < rep.minLevel then
        doPlayerSendCancel(cid,'You may repute from level ' .. rep.minLevel ..' onwards.')
        return true
    end
 
    if getPlayerIp(cid) == getPlayerIp(target) then
        doPlayerSendCancel(cid, 'You may not repute neither yourself nor anyone in your IP.')  
        return true
    end
 
    if getPlayerGUID(target) == getCreatureStorage(cid, rep.lastName) then
        doPlayerSendCancel(cid, 'You may not repute that player two times in a row.')  
        return true
    end
 
    if getCreatureStorage(cid, rep.opinion) < rep.required then
        doPlayerSendCancel(cid, 'You do not have enough opinion points to repute.')  
        return true
    end
 
    if words == '!hail' then
        rep.add(target, rep.getPower(rep.getPoints(cid)), TEXTCOLOR_LIGHTBLUE)
        doCreatureSetStorage(cid, rep.lastName, getPlayerGUID(target))
        doCreatureSetStorage(cid, rep.opinion, getCreatureStorage(cid, rep.opinion)-rep.required)
        doPlayerSendCancel(cid, 'You have just reputed ' .. getCreatureName(target) .. '. You have ' .. getCreatureStorage(cid, rep.opinion) .. ' opinion points left.')
    elseif words == '!fuck' then
        rep.remove(target, rep.getPower(rep.getPoints(cid)), TEXTCOLOR_RED)
        doCreatureSetStorage(cid, rep.lastName, getPlayerGUID(target))
        doCreatureSetStorage(cid, rep.opinion, getCreatureStorage(cid, rep.opinion)-rep.required)
        doPlayerSendCancel(cid, 'You have just reputed ' .. getCreatureName(target) .. '. You have ' .. getCreatureStorage(cid, rep.opinion) .. ' opinion points left.')
    end
    return true
]]></talkaction>
</mod>
 
I have a problem with my Legend/King image it doesnt show up

PHP:
	<TD BGCOLOR="#215868"><strong>&nbsp;Legend</strong></TD>
   <TD BGCOLOR="#215868">&nbsp;<img src="images/rep/legend.gif"/></TD>
   <TD BGCOLOR="#215868"><center><strong>5000</strong></center></TD>
   <TD BGCOLOR="#215868"><strong>&nbsp;(==========>>+)</strong></TD>
   <TD BGCOLOR="#215868"><center>7</center></TD>
</TR>


I belive its because I dont have a folder named rep nor a legend.gif so if you could give me a link to one id be thankful. :p

Besides that it works perfectly Rep for you :thumbup:
 
cyber when I use the version 5.1 I get this error:
Lua:
[14/09/2010 17:10:04] > Loading rep_system.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/rep_system.xml
[14/09/2010 17:10:04] Line: 109, Info: Input is not proper UTF-8, indicate encoding !
[14/09/2010 17:10:04] Bytes: 0xA9 0x20 0x4F 0x54

I don't have to execute any querys on sqlite?
 
cyber when I use the version 5.1 I get this error:
Lua:
[14/09/2010 17:10:04] > Loading rep_system.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/rep_system.xml
[14/09/2010 17:10:04] Line: 109, Info: Input is not proper UTF-8, indicate encoding !
[14/09/2010 17:10:04] Bytes: 0xA9 0x20 0x4F 0x54

I don't have to execute any querys on sqlite?

>>991344
 
Cyber, I would like you to answer my question regarding the positioning of the text and tables

The tables is like 1~2 pixels unnaligned, and I can't allign the text, when I set an value below 37 in this line, it results in a broken image: (The png is generated, but does not display)

$MadGD->addText($query['rep'])->setPosition( 37, $row2 * $height2 ); $row2++;

Any value above 37 and below 230~ is ok, but values out of this results in broken image

What could it be?

Thanks!
 
Yo I need a link to the king gif for the legend outfit no one has it?

My htdocs\injections\rep\highscores\function.php is like this, and it's working perfectly:

Code:
<?PHP
	function getReputation($rep) {
	$ranks = array(
            'Power Abuser' => array(null, -5000, '<img height="15" src="http://i29.tinypic.com/66dg0i.jpg" />'),
            'Evil' => array(-4999, -2000, '<img height="15" src="http://i32.tinypic.com/rw0u2f.jpg" />'),
            'Slayer' => array(-1999, -1500, '<img height="15" src="http://i25.tinypic.com/k2zu6h.jpg" />'),
            'Killer' => array(-1499, -1000, '<img height="15" src="http://i28.tinypic.com/xe0tx3.jpg" />'),
            'Villain' => array(-999, -500, '<img height="15" src="http://i31.tinypic.com/50qkxu.jpg" />'),
            'Creeping' => array(-499, -300, '<img height="15" src="http://i31.tinypic.com/wlrjfo.jpg" />'),
            'Unknown' => array(-299, 299, '<img src="http://i31.tinypic.com/e067iv.jpg" />'),
            'Avowed' => array(300, 499, '<img src="http://i28.tinypic.com/2uff2bp.jpg.png" />'),
            'Popular' => array(500, 999, '<img src="http://i27.tinypic.com/2q82exw.jpg" />'),
            'Hailed' => array(1000, 1499, '<img src="http://i30.tinypic.com/2w32pte.jpg" />'),
            'Acclaimed' => array(1500, 1999, '<img src="http://i26.tinypic.com/282fhc2.jpg" />'),
            'Hero' => array(2000, 4999, '<img src="http://i27.tinypic.com/jrthsk.jpg" />'),
            [B][COLOR="red"]'Legend' => array(5000, null, '<img src="http://i27.tinypic.com/2vwvjoy.jpg" />'),[/COLOR][/B]

        );
        foreach($ranks as $rank => $values)
        {
            if($values[0] == null)
            {
                if($rep <= $values[1])
                {
                    return array($rank, $values[2]);
                }
            }
            elseif($values[1] == null)
            {
                if($rep >= $values[0])
                {
                    return array($rank, $values[2]);
                }
            }
            else
            {
                if($rep >= $values[0] and $rep <= $values[1])
                {
                    return array($rank, $values[2]);
                }
            }
        }
    }
 
Yo I need a link to the king gif for the legend outfit no one has it?
2en3oxs.jpg

http://i25.tinypic.com/2en3oxs.jpg
 
First off lukinhasb your an idiot, that has nothing to do with the outfit images.

Thanks alot cyber!

I'll post it just incase someone else has the same problem as me with the king image.

htdocs/rep.php
PHP:
<?PHP
//Cyber's REPutation System 6.0 for Gesior AAC
$main_content .= '
<style type="text/css">tr.over:hover {background-color: '.$config['site']['darkborder'].';;}</style>
<style type="text/css"><White{color:white}}></style>';

$rep_pos = $SQL->query('SELECT name, rep FROM players WHERE rep > 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep DESC LIMIT 10;');
$rep_neg = $SQL->query('SELECT name, rep FROM players WHERE rep < 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep ASC LIMIT 10;');
$rep_pos2 = $SQL->query('SELECT name, rep FROM players WHERE rep > 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep DESC LIMIT 10;');
$rep_neg2 = $SQL->query('SELECT name, rep FROM players WHERE rep < 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep ASC LIMIT 10;');
$players_pos = 0;
$players_neg = 0;
foreach($rep_pos2 as $posplayer)
	{
		$players_pos++;
	}
	
	foreach($rep_neg2 as $negplayer)
	{
		$players_neg++;
	}
	
	$i = 0;
	if ($players_pos) 
		foreach($rep_pos as $player) {
			$i++;
			$bgcolor = $config['site']['darkborder'];
			$bgcolor = $config['site']['lightborder'];
			$rank = getReputation($player['rep']);
			$players_rows .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% STYLE="border: 1px solid #000;'.($i != $players_pos ? 'border-bottom: none;' : null).'"><TR BGCOLOR='.$bgcolor.' CLASS="over">
			<TD WIDTH="44%"><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">&nbsp;'.$player['name'].$rs.$bs.'</A></TD>
			<TD WIDTH="20%" STYLE="border-left: 1px solid #000; border-right: 1px solid #000;">&nbsp;'.$player['rep'].'</TD>
			<TD WIDTH="36%">&nbsp;'.$rank[0].'<br />'.$rank[1].'</TD></TR></TABLE>'; 
		}
	else	// DO NOT MODIFY
		$players_rows .= '&nbsp;There are no players with positive reputation.';
	
	$o = 0;
	if ($players_neg) 
		foreach($rep_neg as $player) {
			$o++;
			$bgcolor = $config['site']['darkborder'];
			$bgcolor = $config['site']['lightborder'];
			$rank = getReputation($player['rep']);
			$players_rows2 .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% STYLE="border: 1px solid #000;'.($o != $players_neg ? 'border-bottom: none;' : null).'"><TR BGCOLOR='.$bgcolor.' CLASS="over">
			<TD WIDTH="44%"><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">&nbsp;'.$player['name'].$rs.$bs.'</A></TD>
			<TD WIDTH="20%" STYLE="border-left: 1px solid #000; border-right: 1px solid #000;">&nbsp;'.$player['rep'].'</TD>
			<TD WIDTH="36%">&nbsp;'.$rank[0].'<br />'.$rank[1].'</TD></TR></TABLE>';
		}	
	else	// DO NOT MODIFY
		$players_rows2 .= '&nbsp;There are no players with negative reputation.';
	
	// DO NOT MODIFY \/		
	if ($players_rows == '&nbsp;There are no players with positive reputation.')	
		{$bar1='http://i29.tinypic.com/2cmm4o2.jpg';}
	else	
		{$bar1='repPics.php?type=1';}
	if ($players_rows2 == '&nbsp;There are no players with negative reputation.')	
		{$bar2='http://i30.tinypic.com/o51imx.jpg';}
	else
		{$bar2 = 'repPics.php?type=2';}
	// DO NOT MODIFY /\
	
	$main_content .= '
	<br/><center><img src="'.$bar1.'" width="50%"/><img src="'.$bar2.'" width="50%"/></center><br/>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'">
	<TD WIDTH="22%"><strong>&nbsp;<span class="white">NAME</span></strong></TD>
	<TD WIDTH="10%"><strong>&nbsp;<span class="white">POINTS</span></strong></TD>
	<TD WIDTH="18%"><strong>&nbsp;<span class="white">RANK</span></strong></TD>
	<TD WIDTH="22%"><strong>&nbsp;<span class="white">NAME</span></strong></TD>
	<TD WIDTH="10%"><strong>&nbsp;<span class="white">POINTS</span></strong></TD>
	<TD WIDTH="18%"><strong>&nbsp;<span class="white">RANK</span></strong></TD></TR><TR>
	<TD WIDTH="50%" COLSPAN="3" VALIGN="TOP">'.$players_rows.'</TD>
	<TD COLSPAN="3" VALIGN="TOP">'.$players_rows2.'</TD>
	</TR></TABLE><br/>';
	
	$main_content .= '
<center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% style="background-color: #9C084A">
<TR align="left" bgcolor="'.$config['site']['darkborder'].'">
   <TD WIDTH=25%><strong>RANK</strong></TD>
   <TD WIDTH=20%><strong>OUTFIT</strong></TD>
   <TD WIDTH=15% align="center"><strong>POINTS</strong></TD>
   <TD WIDTH=25% align="center"><strong>BAR</strong></TD>
   <TD WIDTH=15% align="center"><strong>POWER</strong></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#215868"><strong>&nbsp;Legend</strong></TD>
   <TD BGCOLOR="#215868">&nbsp;<img src="http://i25.tinypic.com/2en3oxs.jpg"/></TD>
   <TD BGCOLOR="#215868"><center><strong>5000</strong></center></TD>
   <TD BGCOLOR="#215868"><strong>&nbsp;(==========>>+)</strong></TD>
   <TD BGCOLOR="#215868"><center>7</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#31849b"><strong>&nbsp;Hero</strong></TD>
   <TD BGCOLOR="#31849b">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20050501020324/tibia/en/images/6/6f/Hero.gif"/></TD>
   <TD BGCOLOR="#31849b"><center><strong>2000</strong></center></TD>
   <TD BGCOLOR="#31849b"><strong>&nbsp;(==========>+=)</strong></TD>
   <TD BGCOLOR="#31849b"><center>6</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#4bacc6"><strong>&nbsp;Acclaimed</strong></TD>
   <TD BGCOLOR="#4bacc6">&nbsp;<img src="http://images3.wikia.nocookie.net/__cb20050531205626/tibia/en/images/e/e8/Elf_Arcanist.gif"/></TD>
   <TD BGCOLOR="#4bacc6"><center><strong>1500</strong></center></TD>
   <TD BGCOLOR="#4bacc6"><strong>&nbsp;(==========+==)</strong></TD>
   <TD BGCOLOR="#4bacc6"><center>5</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#92cddc"><strong>&nbsp;Hailed</strong></TD>
   <TD BGCOLOR="#92cddc"></TD
   <TD BGCOLOR="#92cddc"><center><strong>1000</center></TD>
   <TD BGCOLOR="#92cddc"><strong>&nbsp;(=========|===)</strong></TD>
   <TD BGCOLOR="#92cddc"><center>4</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#b6dde8"><span style="color:black;font-weight:bold">&nbsp;Popular</span></TD>
   <TD BGCOLOR="#b6dde8"></TD
   <TD BGCOLOR="#b6dde8"><center><span style="color:black;font-weight:bold">500</center></span></TD>
   <TD BGCOLOR="#b6dde8"><span style="color:black;font-weight:bold">&nbsp;(========|====)</strong></span></TD>
   <TD BGCOLOR="#b6dde8"><center><span style="color:black;font-weight:bold">3</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#daeef3"><strong>&nbsp;<span style="color:black;font-weight:bold">Avowed</span></TD>
   <TD BGCOLOR="#daeef3"></TD>
   <TD BGCOLOR="#daeef3"><center><span style="color:black;font-weight:bold">300</span></center></TD>
   <TD BGCOLOR="#daeef3">&nbsp;<span style="color:black;font-weight:bold">(=======|=====)</span></TD>
   <TD BGCOLOR="#daeef3"><center><span style="color:black;font-weight:bold">2</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#f2eff5"><span style="color:black;font-weight:bold">&nbsp;Unknown</span></TD>
   <TD BGCOLOR="#f2eff5"></TD>
   <TD BGCOLOR="#f2eff5"><center><span style="color:black;font-weight:bold">0</span></center></TD>
   <TD BGCOLOR="#f2eff5"><span style="color:black;font-weight:bold">&nbsp;(======|======)</span></TD>
   <TD BGCOLOR="#f2eff5"><center><span style="color:black;font-weight:bold">1</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#f2dbdb"><span style="color:black;font-weight:bold">&nbsp;Creeping</span></TD>
   <TD BGCOLOR="#f2dbdb"></TD>
   <TD BGCOLOR="#f2dbdb"><center><span style="color:black;font-weight:bold">-300</span></center></TD>
   <TD BGCOLOR="#f2dbdb"><span style="color:black;font-weight:bold">&nbsp;(=====|=======)</span></TD>
   <TD BGCOLOR="#f2dbdb"><center><span style="color:black;font-weight:bold">2</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#e5b8b7"><span style="color:black;font-weight:bold">&nbsp;Villain</span></TD>
   <TD BGCOLOR="#e5b8b7"></TD>
   <TD BGCOLOR="#e5b8b7"><center><span style="color:black;font-weight:bold">-500</span></center></TD>
   <TD BGCOLOR="#e5b8b7"><span style="color:black;font-weight:bold">&nbsp;(====|========)</span></TD>
   <TD BGCOLOR="#e5b8b7"><center><span style="color:black;font-weight:bold">3</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#d99594"><strong>&nbsp;Killer</strong></TD>
   <TD BGCOLOR="#d99594"></TD>
   <TD BGCOLOR="#d99594"><center><strong>-1000</strong></center></TD>
   <TD BGCOLOR="#d99594"><strong>&nbsp;(===|=========)</strong></TD>
   <TD BGCOLOR="#d99594"><center>4</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#c0504d"><strong>&nbsp;Slayer</strong></TD>
   <TD BGCOLOR="#c0504d">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20060327220853/tibia/en/images/8/8d/Pig.gif"/></TD>
   <TD BGCOLOR="#c0504d"><center><strong>-1500</strong></center></TD>
   <TD BGCOLOR="#c0504d"><strong>&nbsp;(==*==========)</strong></TD>
   <TD BGCOLOR="#c0504d"><center>5</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#943634"><strong>&nbsp;Evil</strong></TD>
   <TD BGCOLOR="#943634">&nbsp;<img src="http://images1.wikia.nocookie.net/__cb20081212000350/tibia/en/images/4/46/Undead_Gladiator.gif"/></TD>
   <TD BGCOLOR="#943634"><center><strong>-2000</strong></center></TD>
   <TD BGCOLOR="#943634"><strong>&nbsp;(=*<==========)</strong></TD>
   <TD BGCOLOR="#943634"><center>6</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#632423"><strong>&nbsp;Power Abuser</strong></TD>
	<TD BGCOLOR="#632423">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20091128072335/tibia/en/images/2/29/Draken_Warmaster.gif"/></TD>
   <TD BGCOLOR="#632423"><center><strong>-5000</strong></center></TD>
   <TD BGCOLOR="#632423"><strong>&nbsp;(*<<==========)</strong></TD>
   <TD BGCOLOR="#632423"><center>7</center></TD>
</TR></TABLE></center><br/><div align="right"><span style="font-size:smaller;text-align:left">Scripted by <a href="http://otland.net/members/cybershot/">Cybermaster</a></span></div>';


Maybe you can add this in your next update so others wont have to look around for the fix. :peace:
 
Last edited:
First off lukinhasb your an idiot, that has nothing to do with the outfit images.

Thanks alot cyber!

I'll post it just incase someone else has the same problem as me with the king image.

htdocs/rep.php
PHP:
<?PHP
//Cyber's REPutation System 6.0 for Gesior AAC
$main_content .= '
<style type="text/css">tr.over:hover {background-color: '.$config['site']['darkborder'].';;}</style>
<style type="text/css"><White{color:white}}></style>';

$rep_pos = $SQL->query('SELECT name, rep FROM players WHERE rep > 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep DESC LIMIT 10;');
$rep_neg = $SQL->query('SELECT name, rep FROM players WHERE rep < 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep ASC LIMIT 10;');
$rep_pos2 = $SQL->query('SELECT name, rep FROM players WHERE rep > 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep DESC LIMIT 10;');
$rep_neg2 = $SQL->query('SELECT name, rep FROM players WHERE rep < 0 AND name NOT LIKE "%Sample" AND name != "Account Manager" AND deleted = 0 AND group_id = 1 ORDER BY rep ASC LIMIT 10;');
$players_pos = 0;
$players_neg = 0;
foreach($rep_pos2 as $posplayer)
	{
		$players_pos++;
	}
	
	foreach($rep_neg2 as $negplayer)
	{
		$players_neg++;
	}
	
	$i = 0;
	if ($players_pos) 
		foreach($rep_pos as $player) {
			$i++;
			$bgcolor = $config['site']['darkborder'];
			$bgcolor = $config['site']['lightborder'];
			$rank = getReputation($player['rep']);
			$players_rows .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% STYLE="border: 1px solid #000;'.($i != $players_pos ? 'border-bottom: none;' : null).'"><TR BGCOLOR='.$bgcolor.' CLASS="over">
			<TD WIDTH="44%"><A rel="nofollow" HREF="?subtopic=characters&amp;name='.urlencode($player['name']).'">&nbsp;'.$player['name'].$rs.$bs.'</A></TD>
			<TD WIDTH="20%" STYLE="border-left: 1px solid #000; border-right: 1px solid #000;">&nbsp;'.$player['rep'].'</TD>
			<TD WIDTH="36%">&nbsp;'.$rank[0].'<br />'.$rank[1].'</TD></TR></TABLE>'; 
		}
	else	// DO NOT MODIFY
		$players_rows .= '&nbsp;There are no players with positive reputation.';
	
	$o = 0;
	if ($players_neg) 
		foreach($rep_neg as $player) {
			$o++;
			$bgcolor = $config['site']['darkborder'];
			$bgcolor = $config['site']['lightborder'];
			$rank = getReputation($player['rep']);
			$players_rows2 .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% STYLE="border: 1px solid #000;'.($o != $players_neg ? 'border-bottom: none;' : null).'"><TR BGCOLOR='.$bgcolor.' CLASS="over">
			<TD WIDTH="44%"><A rel="nofollow" HREF="?subtopic=characters&amp;name='.urlencode($player['name']).'">&nbsp;'.$player['name'].$rs.$bs.'</A></TD>
			<TD WIDTH="20%" STYLE="border-left: 1px solid #000; border-right: 1px solid #000;">&nbsp;'.$player['rep'].'</TD>
			<TD WIDTH="36%">&nbsp;'.$rank[0].'<br />'.$rank[1].'</TD></TR></TABLE>';
		}	
	else	// DO NOT MODIFY
		$players_rows2 .= '&nbsp;There are no players with negative reputation.';
	
	// DO NOT MODIFY \/		
	if ($players_rows == '&nbsp;There are no players with positive reputation.')	
		{$bar1='http://i29.tinypic.com/2cmm4o2.jpg';}
	else	
		{$bar1='repPics.php?type=1';}
	if ($players_rows2 == '&nbsp;There are no players with negative reputation.')	
		{$bar2='http://i30.tinypic.com/o51imx.jpg';}
	else
		{$bar2 = 'repPics.php?type=2';}
	// DO NOT MODIFY /\
	
	$main_content .= '
	<br/><center><img src="'.$bar1.'" width="50%"/><img src="'.$bar2.'" width="50%"/></center><br/>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'">
	<TD WIDTH="22%"><strong>&nbsp;<span class="white">NAME</span></strong></TD>
	<TD WIDTH="10%"><strong>&nbsp;<span class="white">POINTS</span></strong></TD>
	<TD WIDTH="18%"><strong>&nbsp;<span class="white">RANK</span></strong></TD>
	<TD WIDTH="22%"><strong>&nbsp;<span class="white">NAME</span></strong></TD>
	<TD WIDTH="10%"><strong>&nbsp;<span class="white">POINTS</span></strong></TD>
	<TD WIDTH="18%"><strong>&nbsp;<span class="white">RANK</span></strong></TD></TR><TR>
	<TD WIDTH="50%" COLSPAN="3" VALIGN="TOP">'.$players_rows.'</TD>
	<TD COLSPAN="3" VALIGN="TOP">'.$players_rows2.'</TD>
	</TR></TABLE><br/>';
	
	$main_content .= '
<center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100% style="background-color: #9C084A">
<TR align="left" bgcolor="'.$config['site']['darkborder'].'">
   <TD WIDTH=25%><strong>RANK</strong></TD>
   <TD WIDTH=20%><strong>OUTFIT</strong></TD>
   <TD WIDTH=15% align="center"><strong>POINTS</strong></TD>
   <TD WIDTH=25% align="center"><strong>BAR</strong></TD>
   <TD WIDTH=15% align="center"><strong>POWER</strong></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#215868"><strong>&nbsp;Legend</strong></TD>
   <TD BGCOLOR="#215868">&nbsp;<img src="http://i25.tinypic.com/2en3oxs.jpg"/></TD>
   <TD BGCOLOR="#215868"><center><strong>5000</strong></center></TD>
   <TD BGCOLOR="#215868"><strong>&nbsp;(==========>>+)</strong></TD>
   <TD BGCOLOR="#215868"><center>7</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#31849b"><strong>&nbsp;Hero</strong></TD>
   <TD BGCOLOR="#31849b">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20050501020324/tibia/en/images/6/6f/Hero.gif"/></TD>
   <TD BGCOLOR="#31849b"><center><strong>2000</strong></center></TD>
   <TD BGCOLOR="#31849b"><strong>&nbsp;(==========>+=)</strong></TD>
   <TD BGCOLOR="#31849b"><center>6</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#4bacc6"><strong>&nbsp;Acclaimed</strong></TD>
   <TD BGCOLOR="#4bacc6">&nbsp;<img src="http://images3.wikia.nocookie.net/__cb20050531205626/tibia/en/images/e/e8/Elf_Arcanist.gif"/></TD>
   <TD BGCOLOR="#4bacc6"><center><strong>1500</strong></center></TD>
   <TD BGCOLOR="#4bacc6"><strong>&nbsp;(==========+==)</strong></TD>
   <TD BGCOLOR="#4bacc6"><center>5</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#92cddc"><strong>&nbsp;Hailed</strong></TD>
   <TD BGCOLOR="#92cddc"></TD
   <TD BGCOLOR="#92cddc"><center><strong>1000</center></TD>
   <TD BGCOLOR="#92cddc"><strong>&nbsp;(=========|===)</strong></TD>
   <TD BGCOLOR="#92cddc"><center>4</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#b6dde8"><span style="color:black;font-weight:bold">&nbsp;Popular</span></TD>
   <TD BGCOLOR="#b6dde8"></TD
   <TD BGCOLOR="#b6dde8"><center><span style="color:black;font-weight:bold">500</center></span></TD>
   <TD BGCOLOR="#b6dde8"><span style="color:black;font-weight:bold">&nbsp;(========|====)</strong></span></TD>
   <TD BGCOLOR="#b6dde8"><center><span style="color:black;font-weight:bold">3</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#daeef3"><strong>&nbsp;<span style="color:black;font-weight:bold">Avowed</span></TD>
   <TD BGCOLOR="#daeef3"></TD>
   <TD BGCOLOR="#daeef3"><center><span style="color:black;font-weight:bold">300</span></center></TD>
   <TD BGCOLOR="#daeef3">&nbsp;<span style="color:black;font-weight:bold">(=======|=====)</span></TD>
   <TD BGCOLOR="#daeef3"><center><span style="color:black;font-weight:bold">2</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#f2eff5"><span style="color:black;font-weight:bold">&nbsp;Unknown</span></TD>
   <TD BGCOLOR="#f2eff5"></TD>
   <TD BGCOLOR="#f2eff5"><center><span style="color:black;font-weight:bold">0</span></center></TD>
   <TD BGCOLOR="#f2eff5"><span style="color:black;font-weight:bold">&nbsp;(======|======)</span></TD>
   <TD BGCOLOR="#f2eff5"><center><span style="color:black;font-weight:bold">1</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#f2dbdb"><span style="color:black;font-weight:bold">&nbsp;Creeping</span></TD>
   <TD BGCOLOR="#f2dbdb"></TD>
   <TD BGCOLOR="#f2dbdb"><center><span style="color:black;font-weight:bold">-300</span></center></TD>
   <TD BGCOLOR="#f2dbdb"><span style="color:black;font-weight:bold">&nbsp;(=====|=======)</span></TD>
   <TD BGCOLOR="#f2dbdb"><center><span style="color:black;font-weight:bold">2</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#e5b8b7"><span style="color:black;font-weight:bold">&nbsp;Villain</span></TD>
   <TD BGCOLOR="#e5b8b7"></TD>
   <TD BGCOLOR="#e5b8b7"><center><span style="color:black;font-weight:bold">-500</span></center></TD>
   <TD BGCOLOR="#e5b8b7"><span style="color:black;font-weight:bold">&nbsp;(====|========)</span></TD>
   <TD BGCOLOR="#e5b8b7"><center><span style="color:black;font-weight:bold">3</span></center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#d99594"><strong>&nbsp;Killer</strong></TD>
   <TD BGCOLOR="#d99594"></TD>
   <TD BGCOLOR="#d99594"><center><strong>-1000</strong></center></TD>
   <TD BGCOLOR="#d99594"><strong>&nbsp;(===|=========)</strong></TD>
   <TD BGCOLOR="#d99594"><center>4</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#c0504d"><strong>&nbsp;Slayer</strong></TD>
   <TD BGCOLOR="#c0504d">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20060327220853/tibia/en/images/8/8d/Pig.gif"/></TD>
   <TD BGCOLOR="#c0504d"><center><strong>-1500</strong></center></TD>
   <TD BGCOLOR="#c0504d"><strong>&nbsp;(==*==========)</strong></TD>
   <TD BGCOLOR="#c0504d"><center>5</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#943634"><strong>&nbsp;Evil</strong></TD>
   <TD BGCOLOR="#943634">&nbsp;<img src="http://images1.wikia.nocookie.net/__cb20081212000350/tibia/en/images/4/46/Undead_Gladiator.gif"/></TD>
   <TD BGCOLOR="#943634"><center><strong>-2000</strong></center></TD>
   <TD BGCOLOR="#943634"><strong>&nbsp;(=*<==========)</strong></TD>
   <TD BGCOLOR="#943634"><center>6</center></TD>
</TR>
<TR align="left">
   <TD BGCOLOR="#632423"><strong>&nbsp;Power Abuser</strong></TD>
	<TD BGCOLOR="#632423">&nbsp;<img src="http://images2.wikia.nocookie.net/__cb20091128072335/tibia/en/images/2/29/Draken_Warmaster.gif"/></TD>
   <TD BGCOLOR="#632423"><center><strong>-5000</strong></center></TD>
   <TD BGCOLOR="#632423"><strong>&nbsp;(*<<==========)</strong></TD>
   <TD BGCOLOR="#632423"><center>7</center></TD>
</TR></TABLE></center><br/><div align="right"><span style="font-size:smaller;text-align:left">Scripted by <a href="http://otland.net/members/cybershot/">Cybermaster</a></span></div>';


Maybe you can add this in your next update so others wont have to look around for the fix. :peace:

I'm just trying to help, idiot...
 
Code:
->Conditions to gain REP+
> Killing a RedSkull player (+30)
> Killing a BlackSkull player (+40)
Don't you think it might be a bit strange if like, for example, you just came back from a war with red/black skull, logoff, then the next day you login and ppl begin to kill you only to gain rep+, even though you only kill players in wars?
Solution...kinda:
Make it possible to earn rep+ by killing the red/black skulled player only if he/she/it has attacked or killed someone else a few moments ago.
 
Hey man, when player get rep for killing monster does`t work :/
and dont run any error.
Lua:
<event type="kill" name="repMonster" event="script"><![CDATA[
 	domodlib('repSystem')   
    local monster = {
		['Rotworm Queen'] = 1,
		['Valkyrie'] = 1,
		['Cyclops Smith'] = 3,
		['Cyclops Drone'] = 3,
		['Pirate Ghost'] = 3,
		['Pirate Corsair'] = 3,
		['Necromancer'] = 4,
		['Hero'] = 5,
		['Nightmare'] = 7,
		['Giant Spider'] = 4,
		['The Old Widow'] = 10,
		['Dragon'] = 5,
		['Wyrm'] = 4,
		['Dragon Lord'] = 7,
		['Hydra'] = 6,
		['Grim Reaper'] = 10,
		['Quara Predator'] = 4,
		['Quara Mantassin'] = 4,
		['Draken Warmaster'] = 3,
		['Serpent Spawn'] = 5,
		['Lizard Zaogun'] = 6,
		['Azerus'] = 10,
		['Behemoth'] = 10,
		['Frost Dragon'] = 7,
		['Bog Raider'] = 6,
        ['Haunted Treeling'] = 3,
        ['Warlock'] = 7,
        ['Demon'] = 8,
        ['Apocalypse'] = 15,
        ['Demodras'] = 10,
        ['Juggernaut'] = 10,
        ['Orshabaal'] = 12,
        ['Ghazbaran'] = 15,
        ['Dracola'] = 16,
        ['Morgaroth'] = 15,
		['Ferumbras'] = 14,
    }
    function onKill(cid, target, lastHit)

        if isPlayer(cid) and isMonster(target) and monster[getCreatureName(target):lower()] then
            rep.add(cid, monster[getCreatureName(target):lower()])
        end
        return true
    end]]>
</event>

Thanks.
 
lower case
XML:
<event type="kill" name="repMonster" event="script"><![CDATA[
     domodlib('repSystem')   
    local monster = {
        ['rotworm queen'] = 1,
        ['valkyrie'] = 1,
        ['cyclops smith'] = 3,
        ['cyclops drone'] = 3,
        ['pirate ghost'] = 3,
        ['pirate corsair'] = 3,
        ['necromancer'] = 4,
        ['hero'] = 5,
        ['nightmare'] = 7,
        ['giant spider'] = 4,
        ['the old widow'] = 10,
        ['dragon'] = 5,
        ['wyrm'] = 4,
        ['dragon lord'] = 7,
        ['hydra'] = 6,
        ['grim reaper'] = 10,
        ['quara predator'] = 4,
        ['quara mantassin'] = 4,
        ['draken warmaster'] = 3,
        ['serpent spawn'] = 5,
        ['lizard zaogun'] = 6,
        ['azerus'] = 10,
        ['behemoth'] = 10,
        ['frost dragon'] = 7,
        ['bog raider'] = 6,
        ['haunted treeling'] = 3,
        ['warlock'] = 7,
        ['demon'] = 8,
        ['apocalypse'] = 15,
        ['demodras'] = 10,
        ['juggernaut'] = 10,
        ['orshabaal'] = 12,
        ['ghazbaran'] = 15,
        ['dracola'] = 16,
        ['morgaroth'] = 15,
        ['ferumbras'] = 14,
    }
    function onKill(cid, target, lastHit)
 
        if isPlayer(cid) and isMonster(target) and monster[getCreatureName(target):lower()] then
            rep.add(cid, monster[getCreatureName(target):lower()])
        end
        return true
    end]]>
</event>
 
I'm using styller yourots 0.7.5 for 8.6 client and Gesior. so i followed all steps and i'm getting this error

[18/09/2010 21:35:37] mysql_real_query(): SELECT `rep` FROM `players` LIMIT 1; - MYSQL ERROR: Unknown column 'rep' in 'field list' (1054)
[18/09/2010 21:35:37] >> [REP_SYSTEM] Installing Reputation System...
[18/09/2010 21:35:38] >> [REP_SYSTEM] System successfully installed.

[18/09/2010 21:35:38] [Error - GlobalEvent Interface]
[18/09/2010 21:35:38] buffer:eek:nStartup
[18/09/2010 21:35:38] Description:
[18/09/2010 21:35:38] data/lib/004-database.lua:100: [Result:free] Result not set!
[18/09/2010 21:35:38] stack traceback:
[18/09/2010 21:35:38] [C]: in function 'error'
[18/09/2010 21:35:38] data/lib/004-database.lua:100: in function 'free'
[18/09/2010 21:35:38] [string "loadBuffer"]:15: in function <[string "loadBuffer"]:2>

and i try to take a look on browser

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rep' in 'field list'' in C:\xampp\htdocs\rep.php:7 Stack trace: #0 C:\xampp\htdocs\rep.php(7): PDO->query('SELECT name, re...') #1 C:\xampp\htdocs\index.php(267): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\rep.php on line 7

?
 
I'm using styller yourots 0.7.5 for 8.6 client and Gesior. so i followed all steps and i'm getting this error

[18/09/2010 21:35:37] mysql_real_query(): SELECT `rep` FROM `players` LIMIT 1; - MYSQL ERROR: Unknown column 'rep' in 'field list' (1054)
[18/09/2010 21:35:37] >> [REP_SYSTEM] Installing Reputation System...
[18/09/2010 21:35:38] >> [REP_SYSTEM] System successfully installed.

[18/09/2010 21:35:38] [Error - GlobalEvent Interface]
[18/09/2010 21:35:38] buffer:eek:nStartup
[18/09/2010 21:35:38] Description:
[18/09/2010 21:35:38] data/lib/004-database.lua:100: [Result:free] Result not set!
[18/09/2010 21:35:38] stack traceback:
[18/09/2010 21:35:38] [C]: in function 'error'
[18/09/2010 21:35:38] data/lib/004-database.lua:100: in function 'free'
[18/09/2010 21:35:38] [string "loadBuffer"]:15: in function <[string "loadBuffer"]:2>

and i try to take a look on browser

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rep' in 'field list'' in C:\xampp\htdocs\rep.php:7 Stack trace: #0 C:\xampp\htdocs\rep.php(7): PDO->query('SELECT name, re...') #1 C:\xampp\htdocs\index.php(267): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\rep.php on line 7

?
phpmyadmin, execute
SQL:
ALTER TABLE `players` ADD COLUMN `rep` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Cyber''s REPSystem © OTLand.net';
 
Status
Not open for further replies.
Back
Top