Tenta, fiz rapidinho:
PS1: Coloquei como comando "!listadesummons". Só alterar.
PS2: Está programado para aparecer, em cada linha, um modelo assim: [monstro|quantidade de vitórias|prêmio].
<?xml version="1.0" encoding="UTF-8"?>
<mod name="SummonDuel" enabled="yes" author="Demonbholder" forum="XTibia.com">
<config name="SumLib"><![CDATA[
pla1 = getThingFromPos({x=197, y=110, z=0, stackpos=253}).uid
pla2 = getThingFromPos({x=204, y=110, z=0, stackpos=253}).uid
pos = {x=200, y=110, z=0}
monsters = {
["rat"] = {sto = -1, awa = 10},
["cave rat"] = {sto = 1, awa = 1000},
["troll"] = {sto = 2, awa = 2000},
["poison spider"] = {sto = 3, awa = 3000},
["skeleton"] = {sto = 4, awa = 4000},
["orc"] = {sto = 5, awa = 5000},
["orc warrior"] = {sto = 6, awa = 6000},
["orc spearman"] = {sto = 6, awa = 6000},
["rotworm"] = {sto = 7, awa = 7000},
["dwarf"] = {sto = 7, awa = 7000},
["minotaur"] = {sto = 8, awa = 8000},
["scorpion"] = {sto = 8, awa = 8000},
["minotaur archer"] = {sto = 9, awa = 9000},
["dwarf soldier"] = {sto = 9, awa = 9000},
["minotaur guard"] = {sto = 10, awa = 10000},
["minotaur mage"] = {sto = 11, awa = 11000},
["slime"] = {sto = 12, awa = 12000},
["carrion worm"] = {sto = 13, awa = 13000},
["rotworm queen"] = {sto = 14, awa = 14000},
["demon skeleton"] = {sto = 15, awa = 15000},
["witch"] = {sto = 15, awa = 15000},
["hunter"] = {sto = 16, awa = 16000},
["cyclops"] = {sto = 17, awa = 17000},
["cyclops drone"] = {sto = 18, awa = 18000},
["orc beserk"] = {sto = 19, awa = 19000},
["dwarf guard"] = {sto = 19, awa = 19000},
["tarantula"] = {sto = 19, awa = 19000},
["cyclops smith"] = {sto = 20, awa = 20000},
["dragon hatchling"] = {sto = 22, awa = 22000},
["orc leader"] = {sto = 25, awa = 25000},
["dragon lord hatchling"] = {sto = 27, awa = 27000},
["frost dragon hatchling"] = {sto = 30, awa = 30000},
["orc warlord"] = {sto = 32, awa = 32000},
["dragon"] = {sto = 35, awa = 35000},
["lizard legionnaire"] = {sto = 37, awa = 37000},
["dragon lord"] = {sto = 40, awa = 40000},
["lizard high guard"] = {sto = 40, awa = 40000},
["lizard dragon priest"] = {sto = 42, awa = 42000},
["giant spider"] = {sto = 42, awa = 42000},
["behemoth"] = {sto = 45, awa = 45000},
["frost dragon"] = {sto = 50, awa = 50000},
["hero"] = {sto = 50, awa = 50000},
["hydra"] = {sto = 60, awa = 60000},
["behemoth"] = {sto = 65, awa = 65000},
["black knight"] = {sto = 65, awa = 65000},
["destroyer"] = {sto = 65, awa = 65000},
["nightmare"] = {sto = 67, awa = 67000},
["dark torturer"] = {sto = 70, awa = 70000},
["lost soul"] = {sto = 70, awa = 70000},
["phantasm"] = {sto = 80, awa = 80000},
["demon"] = {sto = 100, awa = 100000},
["medusa"] = {sto = 120, awa = 120000},
["grim reaper"] = {sto = 150, awa = 150000},
["hellhound"] = {sto = 150, awa = 150000},
["juggernault"] = {sto = 200, awa = 200000},
["hellfire fighter"] = {sto = 250, awa = 250000},
["madareth"] = {sto = 300, awa = 300000},
["latrivan"] = {sto = 350, awa = 350000},
["massacre"] = {sto = 400, awa = 400000},
["ushuriel"] = {sto = 450, awa = 450000},
["ferumbras"] = {sto = 500, awa = 500000},
["annihilon"] = {sto = 550, awa = 550000},
["hellgorak"] = {sto = 600, awa = 600000},
["morgaroth"] = {sto = 650, awa = 650000},
["ghazbaran"] = {sto = 700, awa = 700000},
["apocalypse"] = {sto = 750, awa = 750000},
["bazir"] = {sto = 800, awa = 800000},
["infernatil"] = {sto = 900, awa = 900000},
["dark destroyer"] = {sto = 1000, awa = 1000000},
}
temple = {x=155, y=52, z=7}
]]></config>
<creaturescript type="login" name="SummonL" event="script"><![CDATA[
registerCreatureEvent(cid, "SummonC")
return TRUE
]]></creaturescript>
<creaturescript type="combat" name="SummonC" event="script"><![CDATA[
if getPlayerStorageValue(cid, 34570) ~= -1 and isPlayer(target) then
return FALSE, doPlayerSendCancel(cid, "Voce nao pode atacar enquanto esta no jogo.")
elseif getPlayerStorageValue(target, 34570) ~= -1 then
return FALSE
end
return TRUE
]]></creaturescript>
<creaturescript type="statschange" name="SummonS" event="script"><![CDATA[
if type == STATSCHANGE_HEALTHLOSS then
if isPlayer(attacker) and isPlayer(getCreatureMaster(cid)) then
if getPlayerStorageValue(getCreatureMaster(cid), 34570) ~= -1 then
return FALSE
end
end
end
return TRUE
]]></creaturescript>
<creaturescript type="kill" name="SummonK" event="script"><![CDATA[
domodlib('SumLib')
setPlayerStorageValue(pla1, 34570, -1)
setPlayerStorageValue(pla2, 34570, -1)
setPlayerStorageValue(getCreatureMaster(cid), 34571, getPlayerStorageValue(getCreatureMaster(cid), 34571) +1)
doCreatureSetNoMove(pla1, FALSE)
doCreatureSetNoMove(pla2, FALSE)
doPlayerAddMoney(getCreatureMaster(cid), monsters[string.lower(getCreatureName(target))].awa)
doSendMagicEffect(getCreaturePosition(getCreatureMaster(cid)), 49)
doTeleportThing(getCreatureMaster(target), temple)
doRemoveCreature(cid)
return TRUE
]]></creaturescript>
<talkaction words="!listadesummons" event="script"><![CDATA[
domodlib('SumLib')
local tab = {}
local str = ""
for a, b in pairs(monsters) do
if str == "" then
str = "["..a.."|"..(b.sto < 0 and 0 or b.sto).."|"..b.awa.."]"
else
str = str.."::["..a.."|"..(b.sto < 0 and 0 or b.sto).."|"..b.awa.."]"
end
end
local a = str:explode("::")
for i = 1, #a do
table.insert(tab, a[i])
end
doShowTextDialog(cid, 2175, table.concat(tab, "\n"))
return true
]]></talkaction>
<talkaction words="!start;!summon" event="script"><![CDATA[
domodlib('SumLib')
if cid ~= pla1 and cid ~= pla2 then
return doPlayerSendCancel(cid, "Voce precisa ser um dos jogadores."), doSendMagicEffect(getCreaturePosition(cid), 2)
elseif isPlayer(pla1) == FALSE or isPlayer(pla2) == FALSE then
return doPlayerSendCancel(cid, "Voce precisa de dois jogadores."), doSendMagicEffect(getCreaturePosition(cid), 2)
end
if words == "!start" then
if getPlayerStorageValue(pla1, 34570) == -1 and getPlayerStorageValue(pla2, 34570) == -1 then
setPlayerStorageValue(pla1, 34570, 1)
setPlayerStorageValue(pla2, 34570, 1)
doPlayerSendTextMessage(pla1, 4, "Partida comecada.")
doPlayerSendTextMessage(pla2, 4, "Partida comecada.")
doSendMagicEffect(getCreaturePosition(pla1), 10)
doSendMagicEffect(getCreaturePosition(pla2), 10)
doCreatureSetNoMove(pla1, TRUE)
doCreatureSetNoMove(pla2, TRUE)
else
doPlayerSendCancel(cid, "A partida ja iniciou.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
elseif words == "!summon" then
if param ~= "" then
if getPlayerStorageValue(cid, 34570) == 1 then
if monsters[string.lower(param)] then
if getPlayerStorageValue(cid, 34571) >= monsters[string.lower(param)].sto then
local mom = doCreateMonster(string.lower(param), pos)
doConvinceCreature(cid, mom)
setPlayerStorageValue(cid, 34570, 2)
registerCreatureEvent(mom, "SummonC")
registerCreatureEvent(mom, "SummonS")
registerCreatureEvent(mom, "SummonK")
else
doPlayerSendCancel(cid, "Voce nao pode sumonar este monstro.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
else
doPlayerSendCancel(cid, "Este monstro nao pode ser sumonado.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
else
doPlayerSendCancel(cid, "A partida nao esta nesta parte.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
else
doPlayerSendCancel(cid, "Diga o nome do monstro a ser sumonado.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
end
return TRUE
]]></talkaction>
</mod>




info
Grupo: Conde
Registrado: 08/10/13
Posts: 604
Reputação: +119
Bom, queria uma talkactions que mostra-se [Nome do bixo|Vitoriais para summonalo|Recompensa ao matalo] ao falar !NomeDaTalkactions
Essa Talkactions e para esse Mods:
Editado Fevereiro 7 por Shoguns