SC
pedido

Reputation

Por ScythePhantom, 04 de out. de 2013 em Scripts

resolvido
4
715
ScythePhantomS
04 de outubro de 2013 às 07:20

#Edit, resolvido.

Editado Dezembro 4 por ScythePhantom

VodkartV
04 de outubro de 2013 às 09:14

 

function onKill(cid, target, lastHit)
local pkDeathPoints = 5 -- pontos que vai ganhar por matar pk.
local deathPlayer = 2 -- pontos que vai ganhar por matar sem pk.
local vetMonster = {
{nome="Apocalypse", quant=3}, -- nome do monstro e quantidade de rep que ira ganhar.
{nome="Morgaroth", quant=4},
{nome="Ghazbaran", quant=4},
}
if (isPlayer(target) == true) then
local points = getCreatureSkullType(target) > 2 and pkDeathPoints or deathPlayer
setPlayerStorageValue(cid, 102086, getPlayerStorageValue(cid, 102086)+points)
doSendAnimatedText(getThingPos(cid), 'Rep+', 30)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You won "..(points).." point(s) reputation for killing "..getCreatureName(target)..".")
return true
end
for i=1, #vetMonster do
if (getCreatureName(target) == vetMonster[i].nome) then
setPlayerStorageValue(cid, 102086, getPlayerStorageValue(cid, 102086)+vetMonster[i].quant)
doSendAnimatedText(getThingPos(cid), 'Rep+', 30)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You won ".. (vetMonster[i].quant) .." point(s) reputation for killing ".. (vetMonster[i].nome) ..".")
end
end
return true
end

Editado Outubro 4 por Vodkart

ScythePhantomS
04 de outubro de 2013 às 09:37

Vou nem testar vindo de você está certo, podem fechar, obrigado e REP+, rs.

AlexclusiveA
04 de outubro de 2013 às 09:53

Tópico movido para a seção de dúvidas e pedidos resolvidos.