Tente assim:
local config = {
level = 700, -- level que ganha o dinheiro
coin = 10000 -- coin é em gold coin, ou seja, 1 é 1 gold coin, 100 é 1 platinum coin, 10000 é 1 crystal coin
}
function onKill(cid, target)
if isPlayer(cid) and isPlayer(target) then
if getPlayerLevel(target) >= config.level then
broadcastMessage(getCreatureName(target).."["..getPlayerLevel(target).."] acabou de ser morto pelo jogador "..getCreatureName(cid).."["..getPlayerLevel(cid).."].", MESSAGE_EVENT_ADVANCE)
Player(cid):addMoney(config.coin)
Player(cid):sendTextMessage(MESSAGE_STATUS_DEFAULT, string.format('Você ganhou %d golds por matar o jogador %s.',config.coin, getCreatureName(target)))
end
end
return true
end






info
Grupo: Artesão
Registrado: 16/09/11
Posts: 100
Reputação: +1
Ola galera
Alguem poderia me ajudar com esse script?
Eu quero que players ganhem gold ao matar jogadores high level (700+)
Utilizo TFS 1.0....
Esta pode ser uma boa base
function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then broadcastMessage(getCreatureName(target).."["..getPlayerLevel(target).."] acabou de ser morto pelo jogador "..getCreatureName(cid).."["..getPlayerLevel(cid).."].", MESSAGE_EVENT_ADVANCE) end return true endEditado Fevereiro 29 por Prototype