Passa o script do 100 gp ae
Desafio para os scripter experientes
Por babylike, 02 de fev. de 2013 em Scripts
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Cara, você tá querendo ser banido por Ripping? Esse script não é seu e você trocou os créditos dele. REP-.
A propósito, esse pedido seu é fácil de resolver, não é preciso nenhum scripter bom pra isso.
Só troca a linha de adicionar gold no onKill ou onDeath (depende do script de recompensa do seu server) por isso:
local chance = 10 -- Chance em porcentagem de adicionar mais gold local gold = math.random(300, 400) -- Min e Max de gold que adicionará if math.random(1, 100) <= chance then doPlayerAddItem(cid, 2148, gold) end
Sobre o outro script de deaths no look, pesquisa na internet que você acha, já existe esse script.
Editado Fevereiro 2 por LuckOake
Desculpiinha por nao botar os devidos creditos!, eu nem vi que estava meu nome ali -.-'
Mais aqui esta os devidos creditos * ja retirei meu nick de lá também *
90% Ao " Theax " por ter feito o script 10% A mim por ter divulgado seu trabalho aqui neste post!
E a proposito, quando voçê disse "A propósito, esse pedido seu é fácil de resolver, não é preciso nenhum scripter bom pra isso."
Me senti ofendido, Pra mim é dificel de fazer, Desculpa, mais me senti ofendido mesmo...
Sei que fis algo errado postando meu nick no lugar do Theax, Mais ja retirei e postei os devidos creditos! ----------- Me senti ofendido mesmo -------------
Roksas Aqui esta! o script dos 100 gps! * nele esta imbutido o ANTI MC *
function onKill(cid, target, lastHit) if cid ~= target and isPlayer(target) then if getPlayerIp(cid) == getPlayerIp(target) then doPlayerAddExperience(cid, -20000) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You dont receive items and experience by killing the same ip.') else if(lastHit == true) then doPlayerAddPoints(cid, 1) doPlayerAddItem(cid, 2152, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have killed " .. getCreatureName(target) .. ".") end end end return true end
Espero que consiga meu brother :DD
Editado Fevereiro 2 por babylike
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Aqui está o do money quando matar, peguei o seu, editei com umas functions do LuckOake, e está ai
)
Tentarei procurar o de deaths no look
local chance = 10 -- Chance em porcentagem de adicionar mais gold
local gold = math.random(300, 400) -- Min e Max de gold que adicionará
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doPlayerAddExperience(cid, -20000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You dont receive items and experience by killing the same ip.')
else
if(lastHit == true) then
doPlayerAddPoints(cid, 1)
if math.random(1, 100) <= chance then
doPlayerAddItem(cid, 2148,gold)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have killed " .. getCreatureName(target) .. ".")
end
end
end
return true
end
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Tá aqui o script de deaths no look:
No script de matar e ganhar dinheiro, abaixo disso:
doPlayerAddItem(cid, 2152, 1)
Adicione isso:
local chance = 10 -- Chance em porcentagem de adicionar mais gold local gold = math.random(3, 4) -- Min e Max de platinum coins que adicionará if math.random(1, 100) <= chance then doPlayerAddItem(cid, 2152, gold) end
Editado Fevereiro 2 por LuckOake
Roksas Voçê é FO## Seu script funciona * PERFEITAMENTE * --- REP+
LuckOake Obrigado por postar o link do DEATH no look!, --- REP+ Quando disponivel!
E a proposito * Que site ORRIVEL PARA SE CADASTRAR *, Ainda nao consegui depois de 7 tentativas!
HahahA!
Se alguem conseguir se cadastrar e postar o script aqui ficarei GRATO!.
Caso contrario considere minha DUVIDA SANADA!
@TOPIC
CONSEGUI ME CADASTRA!
AQUI ESTA O SCRIPT PARA QUEM FICOU CURIOSO!
<?xml version="1.0" encoding="UTF-8"?>
<mod name="KDR SYSTEM" version="1.0" author="Narko" contact="crmb92@hotmail.com" enabled="yes">
<event type="kill" name="killpoint" event="script"><![CDATA[
function onKill(cid, target, damage, flags)
if isPlayer(target) == true then
db.query("UPDATE `players` SET `frags` = `frags` + 1 WHERE id = " .. getPlayerGUID(cid) .. ";")
doCreatureSay(cid, '+1 Frag Point!', TALKTYPE_ORANGE_1)
end
[url="http://otland.net/#"]return[/url] true
end
]]></event>
<event type="preparedeath" name="deathpoint" event="script"><![CDATA[
function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == true then
db.query("UPDATE `players` SET `deaths` = `deaths` + 1 WHERE id = " .. getPlayerGUID(cid) .. ";")
doCreatureSay(cid, '+1 Death Point!', TALKTYPE_ORANGE_1)
end
return true
end
]]></event>
<event type="look" name="KdrLook" event="script"><![CDATA[
function onLook(cid, thing, position, lookDistance)
function getKillsPlayer(cid)
local Info = db.getResult("SELECT `frags` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
local frags= Info:getDataInt("frags")
return frags
end
function getDeathsPlayer(cid)
local Info = db.getResult("SELECT `deaths` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
local deaths= Info:getDataInt("deaths")
return deaths
end
if isPlayer(thing.uid) then
local kdr = getKillsPlayer(thing.uid)/getDeathsPlayer(thing.uid)
doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and "\nShe" or "\nHe") .. " has Killed: ["..getKillsPlayer(thing.uid).."] Players."..(getPlayerSex(thing.uid) == 0 and "\nShe" or "\nHe") .. " has Died: ["..getDeathsPlayer(thing.uid).."] Times.\nThe Kdr(Kill Death Ratio) is: ["..kdr.."].")
end
if(thing.uid == cid) then
local kdr = getKillsPlayer(thing.uid)/getDeathsPlayer(thing.uid)
doPlayerSetSpecialDescription(thing.uid, "\nYou have Killed: ["..getKillsPlayer(thing.uid).."] Players.\nYou have Died: ["..getDeathsPlayer(thing.uid).."] Times.\nYou Kdr(Kill Death Ratio) is: ["..kdr.."].")
end
return true
end
]]></event>
<event type="login" name="KdrLook" event="buffer"><![CDATA[
registerCreatureEvent(cid, "KdrLook")
registerCreatureEvent(cid, "killpoint")
registerCreatureEvent(cid, "deathpoint")
_result = true
]]></event>
</mod>
MAIS ONDE EU BOTO ESSE SCRIPT? CREATURESCRIPT?
Editado Fevereiro 3 por babylike
info
Grupo: Artesão
Registrado: 15/11/12
Posts: 120
Reputação: +17
Char no Tibia: Ba Rao

Pelo visto isso aí é um MOD, logo deve ser adicionado na pasta MOD.
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Faça assim, cole isso num bloco de notas, e salve na pasta MOD do server. Coloque o nome de Death System por exemplo. Espero que funcione, Dúvida Sanada, reportado.
Grato a LuckOake e a todos que colaboraram.
Reported






info
Grupo: Campones
Registrado: 02/02/13
Posts: 28
Reputação: 0
Char no Tibia: secret
Fala ai galerinha do XTIBIA!
To aqui pra fazer um pedido, para o scripters fodoes do xtibia!
Diferentes tipo de reconpensa ao matar um player!
EXPLICAÇAO:
No meu server os players ganham 100 gps para cada kill...
Quero que as vezes os players ganham 300.. 400.. gps
Nao toda ves que matar um player * SÓ AS VEZES *
E também queria, que aparecesse o tanto de mortes no look do player!
Eu vo postar o script do FRAG no look, pra ficar mais facil!
--Script By Theax "" function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,' [Frags: '..getPlayerFrags(thing.uid)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,' [Frags: '..getPlayerFrags(cid)..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true endAGORA QUERO VER DO QUE OS SCRIPTER DO XTIBIA É CAPAZ!
VALENDO +REP
Editado Fevereiro 2 por babylike