ymmotthep 0 Postado Abril 30, 2010 Share Postado Abril 30, 2010 (editado) Meu server eh do mapa Alissow, versão 8.54. Os caras morrem pros monstros normal, mas quando um mata o outro a vida chega no 0 e ninguem morre, a vida volta a enxer normalmente... To grilado cm isso, oq eu faço? --Edit-- Gente, eu acho que isso pode ser o sistema de REputação, porque tipo: quando o cara mata alguem ele perde 5 pontos, se ele não tiver nenhum ponto não tem como ele perder mais dai não morre... Acho q eh isso sei la, alguem me ajuda aew por favor.. Editado Maio 1, 2010 por Ryuuzin Link para o comentário Compartilhar em outros sites More sharing options...
guedes100 56 Postado Maio 1, 2010 Share Postado Maio 1, 2010 (editado) creio eu que o problema esteje aqui,até mesmo porque isso nunca me ocorreu. vá em data/creaturescript/script playerdeath.lua retire tudo oque estiver la e poe: ---- retired pq nao era playerdeath ---- Editado Maio 1, 2010 por Nicekid Link para o comentário Compartilhar em outros sites More sharing options...
ymmotthep 0 Postado Maio 1, 2010 Autor Share Postado Maio 1, 2010 Man, valeu mais não foi isso não, Quando o carinha morre ele fica falando -REP, -REP, -REP, -REP, -REP, -REP e so para de falar se comer alguma comida i a vida ir enxendo... Link para o comentário Compartilhar em outros sites More sharing options...
guedes100 56 Postado Maio 1, 2010 Share Postado Maio 1, 2010 a agora sim... deve ser do sistema de reputaçao mesmo coloque o script para que possamos identificar o possivel erro. Link para o comentário Compartilhar em outros sites More sharing options...
ymmotthep 0 Postado Maio 1, 2010 Autor Share Postado Maio 1, 2010 rep_system.xml <?xml version="1.0" encoding="UTF-8"?><!-- NECESSARY SQL QUERY FOR THE REP SYSTEM MySQL: ALTER TABLE `players` ADD `rep` INT( 11 ) NOT NULL DEFAULT '0'; SQlite: ALTER TABLE "players" ADD "rep" INT( 11 ) NOT NULL DEFAULT "0"; --> <mod name="TheBestReputationSystem for TFS CryingDamsons CREDITS: -Darkkhaos (sql queries) -Colandus (timestring function) -Sync (repsystem talkaction) -Shawak (highscore) -Absolute Mango (php) And me! I must say that these people didn't help me directly, I just fixed their scripts to fit them on my sys, some of them had unnecessary codes. the rep functions, the remaining scripts, the idea and the sys is 100% by me." version="4.0 patch #4" author="Cybermaster" contact="otland.net" enabled="yes"> <config name="repFunctions"><![CDATA[ function getRepPoints(cid) local Info = db.getResult("SELECT `rep` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") local p = Info:getDataInt("rep") Info:free() return p end function getRepRank(points) local ranks = { {-5000, "Power Abuser (***==========)"}, {-2000, "Evil (=**==========)"}, {-1500, "Gangster (==*==========)"}, {-1000, "Villain (===|=========)"}, {-500, "PK (====|========)"}, {-300, "Bad Guy (======|======)"}, {-299, "Noob (======|======)"}, {300, "Well-Known (=======|=====)"}, {500, "Popular (========|====)"}, {1000, "Hailed (=========|===)"}, {1500, "The Best (==========+==)"}, {2000, "Hero (==========++=)"}, {5000, "Legendary Hero (==========+++)"} } 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 return ranks[1][2] end function setPlayerRep(cid, points) db.executeQuery("UPDATE `players` SET `rep` = " .. points .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";") end function addPlayerRep(cid, amount, color) db.executeQuery("UPDATE `players` SET `rep` = `rep` + " .. amount .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";") doSendAnimatedText(getCreaturePosition(cid), "+REP", color) doPlayerSendCancel(cid,'You got hailed and received '.. amount ..' rep points.') end function removePlayerRep(cid, amount, color) db.executeQuery("UPDATE `players` SET `rep` = `rep` - " .. amount .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";") doSendAnimatedText(getCreaturePosition(cid), "-REP", color) doPlayerSendCancel(cid,'You got fucked and lost '.. amount ..' rep points.') end function repTime(timeDiff) --configured for 6 hours, pm me if you dont know how to change it local dateFormat = { --{"day", timeDiff / 60 / 60 / 24 % 7}, {"hour", timeDiff / 60 / 60 % 6}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end return table.concat(out) end function isPlayerFemale(cid) return getPlayerSex(cid) == 0 and true or false end]]></config> <event type="login" name="repRegister" event="script"><![CDATA[ domodlib('repFunctions') function onLogin(cid) registerCreatureEvent(cid, "repLook") registerCreatureEvent(cid, "repKill") registerCreatureEvent(cid, "repMonster") return true end]]></event> <event type="look" name="repLook" event="script"><![CDATA[ domodlib('repFunctions') function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid) == true) then if(thing.uid == cid) then doPlayerSendTextMessage(cid, 20, "You are "..getRepRank(getRepPoints(cid)).."") else doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." is "..getRepRank(getRepPoints(thing.uid)).."") end return true end return true end]]></event> <event type="kill" name="repKill" event="script"><![CDATA[ domodlib('repFunctions') function onKill(cid, target, lastHit) local SKULL = {[sKULL_WHITE] = 15, [sKULL_RED] = 30, [sKULL_BLACK] = 45, [sKULL_NONE] = -30} if (isPlayer(cid)) and (isPlayer(target)) and isInArray({0,3,4,5}, getCreatureSkullType(target)) then if getPlayerLevel(target) > 30 then doSendAnimatedText(getPlayerPosition(cid), "-REP", TEXTCOLOR_RED) setPlayerRep(cid, getRepPoints(cid)+SKULL[getPlayerSkullType(target)]) end end if (isPlayer(cid)) and (isPlayer(target)) then if getRepPoints(target) == 0 then return true elseif getRepPoints(target) > 0 then removePlayerRep(target, 5, TEXTCOLOR_RED) else addPlayerRep(target, 5, TEXTCOLOR_RED) end end return true end]]></event> <event type="kill" name="repMonster" event="script"><![CDATA[ domodlib('repFunctions') -- >>> To add a new monster, copy a line inside the 'monsters' table<<< -- function onKill(cid, target, lastHit) if not isPlayer(cid) or not isMonster(target) then return true end local monsters = { ["behemoth"] = {rep = 3}, ["hellfire fighter"] = {rep = 5}, ["orshabaal"] = {rep = 15}, } local monster = monsters[getCreatureName(target)] if monster then addPlayerRep(cid, monster.rep, TEXTCOLOR_LIGHTGREEN) end return true end]]></event> <talkaction log= "yes" words="/hail; /fuck; /set" access="3" event="buffer"><![CDATA[ domodlib('repFunctions') -- >>> t[1] is Player Name, t[2] is Rep Amount<<< -- if(param == "") then doPlayerSendCancel(cid,"You have to type a player name.") return TRUE end local t = string.explode(param, ",") local tid = getPlayerByName(t[1]) if(isPlayer(tid) == false) then doPlayerSendCancel(cid, "Player " .. param .. " not found or is offline.") return TRUE end if isPlayerFemale(tid) == true then sex = 'she' else sex = 'he' end if(not t[2]) and (isPlayer(tid) == true) then if (words == '/hail') then addPlayerRep(tid, 5, TEXTCOLOR_TEAL) doPlayerSendCancel(cid, "You added +5 rep points to " .. getPlayerName(tid) .. ", and now " .. sex .. " has " .. getRepPoints(tid) .. " rep points.") return true end if words == '/fuck' then removePlayerRep(tid, 5, TEXTCOLOR_RED) doPlayerSendCancel(cid, "You removed -5 rep points to " .. getPlayerName(tid) .. ", and now " .. sex .. " has " .. getRepPoints(tid) .. " rep points.") return true end end if (t[2]) and (words == '/set') or (words == '/hail') or (words == '/fuck') then if (not tonumber(t[2])) then doPlayerSendCancel(cid, "Rep amount invalid.") return true end end if words == '/hail' then addPlayerRep(tid, t[2], TEXTCOLOR_TEAL) doPlayerSendCancel(cid, "You added " .. t[2] .. " rep points to " .. getPlayerName(tid) .. ", and now " .. sex .. " has " .. getRepPoints(tid) .. " rep points.") return true end if words == '/fuck' then removePlayerRep(tid, t[2], TEXTCOLOR_RED) doPlayerSendCancel(cid, "You removed " .. t[2] .. " rep points to " .. getPlayerName(tid) .. ", and now " .. sex .. " has " .. getRepPoints(tid) .. " rep points.") return true end if (t[2]) and (words == '/set') then setPlayerRep(tid, t[2]) doPlayerSendCancel(cid, "You have set " .. getPlayerName(tid) .. "'s rep points to " .. getRepPoints(tid) .. ".") else doPlayerSendCancel(cid, "Absolute rep amount not specified.") return true end if(not t[2]) then doPlayerSendCancel(cid, "Absolute rep amount not specified.") return true end ]]></talkaction> <talkaction words="/highscores" event="buffer"><![CDATA[ domodlib('repFunctions') local players = 10 -- The amount of max players that is shown in each list local str, value, name, result = "","","",0,nil -- don't touch -- if param == "hero" or param == "pos" or param == "+" then str,value,name = "[#]-[Name]-[Points]-[Rank]\n--[Positive Rep Highscores]--\n","rep","name" result = db.getResult("SELECT `name`, `rep` FROM `players` WHERE players.rep > -1 ORDER BY `rep` DESC, `name` ASC;") elseif param == "evil" or param == "neg" or param == "-" then str,value,name = "[#]-[Name]-[Points]-[Rank]\n--[Negative Rep Highscores]--\n","rep","name" result = db.getResult("SELECT `name`, `rep` FROM `players` WHERE players.rep < 0 ORDER BY `rep` ASC, `name` DESC;") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Unknown Paramater: '" .. param .. "'") return TRUE end if (result:getID() ~= -1) then local i = 1 while TRUE do str = str .. "\n " .. i .. ". - " .. result:getDataString("name") .. " - [" .. result:getDataInt(value) .. "] - " .. getRepRank(result:getDataInt(value)) .. "" i = i+1 if not(result:next()) or i > players then break end end result:free() end if str ~= "" then doPlayerPopupFYI(cid, str) end return TRUE ]]></talkaction> <talkaction words="!highscores" event="buffer"><![CDATA[ domodlib('repFunctions') local players = 10 -- The amount of max players that is shown in each list local str, value, name, result = "","","",0,nil -- don't touch -- if param == "hero" or param == "pos" or param == "+" then str,value,name = "[#]-[Name]-[Points]-[Rank]\n--[Positive Rep Highscores]--\n","rep","name" result = db.getResult("SELECT `name`, `rep` FROM `players` WHERE players.rep > -1 ORDER BY `rep` DESC, `name` ASC;") elseif param == "evil" or param == "neg" or param == "-" then str,value,name = "[#]-[Name]-[Points]-[Rank]\n--[Negative Rep Highscores]--\n","rep","name" result = db.getResult("SELECT `name`, `rep` FROM `players` WHERE players.rep < 0 ORDER BY `rep` ASC, `name` DESC;") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Unknown Paramater: '" .. param .. "'") return TRUE end if (result:getID() ~= -1) then local i = 1 while TRUE do str = str .. "\n " .. i .. ". - " .. result:getDataString("name") .. " - [" .. result:getDataInt(value) .. "] - " .. getRepRank(result:getDataInt(value)) .. "" i = i+1 if not(result:next()) or i > players then break end end result:free() end if str ~= "" then doPlayerPopupFYI(cid, str) end return TRUE ]]></talkaction> <talkaction words="!rep" event="buffer"><![CDATA[ domodlib('repFunctions') local o, points, action = getCreatureOutfit(cid), getRepPoints(cid), false --do not modify doPlayerSendTextMessage(cid, 19, "You have " .. points .. " rep points. You are " .. getRepRank(points) .. ".") if points > 4999 and getPlayerSex(cid) == 0 then --female rep+++ queen outfit disguise, text, action = {lookType = 331}, "Queen!!", true elseif points > 4999 and getPlayerSex(cid) > 0 then --male rep+++ king outfit disguise, text, action = {lookType = 332}, "King!!", true elseif points > 1999 then --rep++ cm outfit disguise, text, action = {lookType = 266}, "Legend!!", true elseif points > 1499 then --rep+ hero outfit disguise, text, action = {lookType = 73}, "Hero!!", true elseif points < -4999 then --rep*** devil outfit disguise, text, action = {lookType = 40}, "Devil!!", true elseif points < -1999 then --rep** pig outfit -- disguise, text, action = {lookType = 60}, "Pig!!", true elseif points < -1499 then --rep* orc outfit -- disguise, text, action = {lookType = 5}, "Orc!!", true end if action == true then doCreatureChangeOutfit(cid, disguise) doSendAnimatedText(getCreaturePosition(cid), text, math.random(01,255)) return true end ]]></talkaction> <talkaction words="!hail" event="buffer"><![CDATA[ domodlib('repFunctions') local config = { newTime = 6 * 60 * 60, -- This is [6] hours, in seconds. Time between rep. oldTime = getPlayerStorageValue(cid, 23232), level = 20, target = getPlayerByName(param) } if config.oldTime == -1 then setPlayerStorageValue(cid, 23232, os.time()) end local nextTime = config.oldTime - os.time() local nextDate = os.date("%d %B %Y %X", config.oldTime + config.newTime) if getPlayerLevel(cid) < config.level then doPlayerSendCancel(cid,"You may hail from level "..config.level.." and above.") return TRUE end if (os.time() - config.oldTime) < config.newTime then doPlayerSendCancel(cid, "You may hail in " .. repTime(nextTime) .. ", (".. nextDate..").") return TRUE end if(param == "") then doPlayerSendCancel(cid,"You have to type a player name.") return TRUE end if isPlayer(config.target) == false then doPlayerSendCancel(cid,"That player doesn't exist or is offline.") return TRUE end if getPlayerIp(cid) == getPlayerIp(config.target) then doPlayerSendCancel(cid,"You may not hail yourself or your same IP.") return TRUE end addPlayerRep(config.target, 5, TEXTCOLOR_LIGHTBLUE) setPlayerStorageValue(cid, 23232, os.time()) doPlayerSendCancel(cid,'You just hailed '.. getPlayerName(config.target) ..'.') ]]></talkaction> <talkaction words="!fuck" event="buffer"><![CDATA[ domodlib('repFunctions') local config = { newTime = 6 * 60 * 60, -- This is [6] hours, in seconds. Time between rep. oldTime = getPlayerStorageValue(cid, 23232), level = 20, target = getPlayerByName(param) } if config.oldTime == -1 then setPlayerStorageValue(cid, 23232, os.time()) end local nextTime = config.oldTime - os.time() local nextDate = os.date("%d %B %Y %X", config.oldTime + config.newTime) if getPlayerLevel(cid) < config.level then doPlayerSendCancel(cid,"You may fuck from level "..config.level.." and above.") return TRUE end if (os.time() - config.oldTime) < config.newTime then doPlayerSendCancel(cid, "You may fuck in " .. repTime(nextTime) .. ", (".. nextDate..").") return TRUE end if(param == "") then doPlayerSendCancel(cid,"You have to type a player name.") return TRUE end if isPlayer(config.target) == false then doPlayerSendCancel(cid,"That player doesn't exist or is offline.") return TRUE end if getPlayerIp(cid) == getPlayerIp(config.target) then doPlayerSendCancel(cid,"You may not fuck yourself or your same IP.") return TRUE end removePlayerRep(config.target, 5, TEXTCOLOR_RED) setPlayerStorageValue(cid, 23232, os.time()) doPlayerSendCancel(cid,'You just fucked '.. getPlayerName(config.target) ..'.') ]]></talkaction> </mod> repKill.lua function onKill(cid, target, lastHit) local SKULL = {[sKULL_WHITE] = 15, [sKULL_RED] = 30, [sKULL_BLACK] = 45, [sKULL_NONE] = -30} if (isPlayer(cid)) and (isPlayer(target)) and isInArray({0,3,4,5}, getCreatureSkullType(target)) then if getPlayerLevel(target) > 30 then doSendAnimatedText(getPlayerPosition(cid), "-REP", TEXTCOLOR_RED) setPlayerRep(cid, getRepPoints(cid)+SKULL[getPlayerSkullType(target)]) end end if (isPlayer(cid)) and (isPlayer(target)) then if getRepPoints(target) == 0 then return true elseif getRepPoints(target) > 0 then removePlayerRep(target, 5, TEXTCOLOR_RED) else addPlayerRep(target, 5, TEXTCOLOR_RED) end end return true end repMonster.lua -- >>> THE BestRepSystem by Cybermaster <<< -- -- >>> Scripted IN and ONLY for TFS 0.3<<< -- -- >>> To add a new monster, copy a line inside the 'monsters' table<<< -- function onKill(cid, target, lastHit) if not isPlayer(cid) or not isMonster(target) then return true end local monsters = { ["warlock"] = {rep = 1}, ["behemoth"] = {rep = 3}, ["hellfire fighter"] = {rep = 5}, ["demon"] = {rep = 7}, ["orshabaal"] = {rep = 10}, ["ferumbras"] = {rep = 15}, ["morgaroth"] = {rep = 20}, } local name = getCreatureName(target) local monster = monsters[string.lower(name)] if monster then addPlayerRep(cid, monster.rep, TEXTCOLOR_LIGHTGREEN) end return true end repLook.lua -- >>> THE Players'REP++System CryingDamson Edition by Cybermaster <<< ---- >>> Credits to darkhaos in this script<<< -- -- >>> Scripted IN and ONLY for TFS 0.3<<< -- function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid) == true) then if(thing.uid == cid) then doPlayerSendTextMessage(cid, 20, "You are "..getRepRank(getRepPoints(cid)).."") else doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." is "..getRepRank(getRepPoints(thing.uid)).."") end return true end return true end Link para o comentário Compartilhar em outros sites More sharing options...
guedes100 56 Postado Maio 1, 2010 Share Postado Maio 1, 2010 (editado) Hum me falaram que esse sistema só serve em servidor SQL não sei muito sobre ele o seu servidor é em SQL? tem 2 topico que eu vi que tem esse sistema tbm Sistema de rep 1 Sistema de rep 2 ------- galera de alguem souber sobre o script ou o possivel erro dele da um help pro cara aqui ------ Editado Maio 1, 2010 por Nicekid Link para o comentário Compartilhar em outros sites More sharing options...
ymmotthep 0 Postado Maio 1, 2010 Autor Share Postado Maio 1, 2010 (editado) Acho que so existe servidores sql agora ¬¬ eu prefiro mtoooo mais xml... O Meu é em SQL sim.. ---EDIT--- Como eu faço pra tirar esse sistema de reputação? Editado Maio 1, 2010 por Ryuuzin Link para o comentário Compartilhar em outros sites More sharing options...
guedes100 56 Postado Maio 2, 2010 Share Postado Maio 2, 2010 remova todo o arquivo(Scripts,tags) de REP que voce coloco no servidor Link para o comentário Compartilhar em outros sites More sharing options...
ymmotthep 0 Postado Maio 2, 2010 Autor Share Postado Maio 2, 2010 Eu removi o arquivo principal .xml que tinha na pasta mod e ficou tudo de boa =D vlws pela ajuda ai! Só não sei como faço pra reportar o tópico... Link para o comentário Compartilhar em outros sites More sharing options...
guedes100 56 Postado Maio 2, 2010 Share Postado Maio 2, 2010 use o botao "Reportar" amigo ^^ e me desculpe por não te-lo ajudado vou procurar me informar mais sobre o script... abraços Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados