Mods
<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Pormote Kill" version="1.0" author="Vodkart" contact="xtibia.com" enabled="yes">
<config name="KillM_func"><![CDATA[
mobs = {
["rat"] = {stor = 81615, time = 30, item = {119,1}},
["cyclops"] = {stor = 81616, time = 30, item = {2160,2}},
["hydra"] = {stor = 81617, time = 30, item = {2160,3}},
["demon"] = {stor = 81618, time = 30, item = {2160,4}}
}
]]></config>
<event type="login" name="Kill M" event="script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "MonsterAttack")
return true
end
]]></event>
<event type="combat" name="MonsterAttack" event="script"><![CDATA[
domodlib('KillM_func')
if isPlayer(cid) and isMonster(target) then
local n = getCreatureName(target)
local name_monster = mobs[string.lower(n)]
if name_monster then
setPlayerStorageValue(cid, name_monster.stor, os.time()+name_monster.time)
registerCreatureEvent(target, "MonsterDeath")
end
end
return true
]]></event>
<event type="death" name="MonsterDeath" event="script"><![CDATA[
domodlib('KillM_func')
function onDeath(cid, corpse, deathList)
if isMonster(cid) then
local n = getCreatureName(cid)
local name_monster = mobs[string.lower(n)]
if name_monster then
for _, pid in ipairs(deathList) do
if isPlayer(pid) and getPlayerStorageValue(pid, name_monster.stor) >= os.time() then
doPlayerAddItem(pid, name_monster.item[1], name_monster.item[2])
end
end
end
end
return true
end]]></event>
</mod>
["nome do monstro"]
stor -- n mexe
time -- em segundos
item = {119,1} -- id do item, count








info
Grupo: Artesão
Registrado: 03/12/11
Posts: 137
Reputação: +5
Char no Tibia: Surionz
Servidor: Global
Distro: TFS 0.4 32bits
Olá Xtibianos, gostaria de ajuda no seguint Script:
Seguindo o estilo de quest global da cipsoft, queria um script que desse uma recompensa a todos os players que ajudaram a matar um monstro.
O monstro aparecerá em uma sala, e todos os players que atacarem esse monstro 30 segundos antes dele morrer receberá o item (119).
Espero que tenham entendio, e que possam me ajudar.
Obrigado