Ir para conteúdo
  • 0

Receber Dinheiro Ao Matar Player


hadamais

Pergunta

bom, estou com outro problema.

Quando os players matam não recebe dinheiro de recompensa.

Recebe outras coisas, menos dinheiro.

eu quero que receba dinheiro, me ajuda?

 

Complementando, aqui está meu Onkill.lua

function onKill(cid, target)
--config----------------------------
local lvl = getPlayerLevel(cid) --players level
local nlvl = getPlayerLevel(cid) + 5 -- add 5 levels
--end-------------------------------
   if isPlayer(target) == TRUE then
    if getPlayerIp(cid) ~= getPlayerIp(target) then
				    local exp = (50 * (lvl) * (lvl) * (lvl) - 150 * (lvl) * (lvl) + 400 * (lvl)) / 5
				    local nexp = (50 * (nlvl) * (nlvl) * (nlvl) - 150 * (nlvl) * (nlvl) + 400 * (nlvl)) / 5
				    local newexp = nexp - exp
				    doPlayerAddExp(cid,newexp)
				    doPlayerAddMoney(cid, 20)
  doCreatureSetDropLoot(target, false)
				    doSendAnimatedText(getPlayerPosition(cid), "Orgasmic~", 198)
		    else
	    doPlayerAddExperience(cid, -50000)
	    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
    end
    end
   return TRUE
end

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

Eu usei este mesmo script, porém no meu não funcionou !

Ajudem-me por favor.

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>

   <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
   <event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>
    <event type="death" name="DeathBroadcast" event="script" value="deathBroadcast.lua"/>
   <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
   <event type="think" name="Idle" event="script" value="idle.lua"/>
   <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="login" name="playercheck" script="playercheck.lua"/>
   <event type="kill" name="killbonus" event="script" value="killbonus.lua"/>
</creaturescripts>

 

killbonus.lua

function onDeath(cid, corpse, deathList)
if isPlayer(cid) and isPlayer(deathList[1]) then
local v = {
rewardid = 2152, qnt = 5,  --  primeiro item  qnt = quantos itens
rewardid2 = 5943, qnt2 = 1,  -- segundo item
killer_name = getCreatureName(deathList[1]),
killer_level = getPlayerLevel(deathList[1]),
target_name = getCreatureName(cid),
target_level = getPlayerLevel(cid),
pos = getCreaturePosition(cid),
text = 'TO HELL!'
}
local reward = doPlayerAddItem(deathList[1], v.rewardid, v.qnt) and doPlayerAddItem(deathList[1], v.rewardid2, v.qnt2)
doItemSetAttribute(reward, "description", "Killed at level " .. v.target_level .. " by " .. v.killer_name .. " I was at level " .. v.killer_level .. " when. " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "[Not-Justified]" or "[Justified]"))
doItemSetAttribute(reward, "name", v.target_name .."'s Heart")
doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, "You killed ".. v.target_name .." " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "wrong." or "just."))
doSendAnimatedText(v.pos, v.text, TEXTCOLOR_RED)
end
return true
end

Link para o comentário
Compartilhar em outros sites

  • 0
function onKill(cid, target, lastHit)
local money = 500
if isPlayer(cid) and isPlayer(target) and getPlayerIp(cid) ~= getPlayerIp(target) then
doPlayerAddMoney(cid, money)
end
return true
end

Editado por Vodkart
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...