EX

Reconpensa Pelo Frag

Por exevogranmasvis, 06 de ago. de 2009 em Globalevents e Spells

otserv
tibia
script
9
2.6k
06 de agosto de 2009 às 03:12

Crie ,

data/creaturescripts/sctipts/reward.lua

-- Credits to Shawak 
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) 
local cidpos = getPlayerPosition(lastHitKiller) 
loot = 5943 
item = doPlayerAddItem(lastHitKiller,loot,1) 
if(isPlayer(lastHitKiller) == TRUE) then 
hitKillerName = getPlayerName(lastHitKiller) 
doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..hitKillerName..".") 
doPlayerSendTextMessage(lastHitKiller, MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".") 
doSendMagicEffect(cidpos,12) 
else 
hitKillerName = getCreatureName(lastHitKiller) 
doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by a "..hitKillerName..".") 
end 
setItemName(item, ""..getPlayerName(cid).."\'s Heart") 
return TRUE 
end

 

 

Adicione em,

data/creaturescripts/sctipts/login.lua

function onPrepareDeath(cid, killer)

 

 

 

Adicione em,

data/creaturescripts/creatuescripts.xml

 
<event type="death" name="Reward" script="reward.lua"/>

 

:smile_positivo:

Eu Consegui

Funciona em tfs 0.3.2

Editado Agosto 6 por exevogranmasvis

06 de agosto de 2009 às 10:11

isso não é uma action, e eu também percebi que você postou o mesmo script na seção correta.

satan666S
06 de agosto de 2009 às 13:33

acho que não e isso pra por no login.lua.

 

Adicione em,

data/creaturescripts/sctipts/login.lua

function onPrepareDeath(cid, killer)

DaNDaNrOxXD
06 de agosto de 2009 às 14:21

Galera, vocês acham que o tópico ficaria melhor em Creature Scripts~ Global Events?

 

Abraços

WiltryW
06 de agosto de 2009 às 15:37

Tópico movido para seção certa.

Obrigado :)

06 de agosto de 2009 às 21:00

queria adicionar no meu servidor essa script mais queria acressentar que so players level 150+ dropasse o coraçao por favor alguem poderia repassar a script pra mim?

Last SeekerL
06 de agosto de 2009 às 22:07
Marcryzius, 13:33

data/creaturescripts/sctipts/login.lua

function onPrepareDeath(cid, killer)

1 mês depois...
cagaioC
10 de setembro de 2009 às 03:00

aff agora to confuso :S é em reward ou em login e se fosse em login modificaria algo na scripit ? :S

 

 

espero resposta :S

jacknightJ
10 de setembro de 2009 às 16:17

Adiocino a Tag

function onPrepareDeath(cid, killer)

 

em ql parte do login.lua ?