Ola Galera do Xtibia aki venho pra Mostra um sitema de pet
Obs: o Sistema não e meu mais eu vou ensina a botalo e editalo
Creditos:
Snokiuthu: Por fazelo
Pokemonfox123: por repostalo e editalo
Ta Vamos la:
Esse Sistema de pet ede Action
Primeiro Vai na pasta data\actions\script e cria um arquivo com nome pet, e coloke isso dentro
function onUse(cid, item, frompos, item2, topos)
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
local summons = getCreatureSummons(cid)
local pet = {
["Rotworm"] = {1,10},
["Minotaur"] = {11,15},
["Dwarf Soldier"] = {16,19},
["Minotaur Guard"] = {20,25},
["Dragon Hatchling"] = {26,32},
["Dragon"] = {33,45},
["Giant Spider"] = {46,55},
["Dragon Lord"] = {56,120},
["Grim Reaper"] = {121,160},
["Ghastly Dragon"] = {161,200},
["Undead Dragon"] = {201,300},
["Mutated Human"] = {301,456}
}
for k,v in pairs(pet) do -- 1
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
ta depois vamos no arquivo Action Xml e adicione essa tag
<action itemid="11205" script="pet.lua"/>
Vc pode mudar o Id do item qui vai sair o pet O meu e 11205 mais vc pode mudar a gosto
ta vou ensinar a editalo
Você esta vendo isso a baixo
local pet = {
["Rotworm"] = {1,10},
["Minotaur"] = {11,15},
["Dwarf Soldier"] = {16,19},
["Minotaur Guard"] = {20,25},
["Dragon Hatchling"] = {26,32},
["Dragon"] = {33,45},
["Giant Spider"] = {46,55},
["Dragon Lord"] = {56,120},
["Grim Reaper"] = {121,160},
["Ghastly Dragon"] = {161,200},
["Undead Dragon"] = {201,300},
["Mutated Human"] = {301,456}
}
e simples trocar o Montros e adicionar novos você pode fazer assim
local pet = {
["Rotworm"] = {1,10},
["Minotaur"] = {11,15},
["Dwarf Soldier"] = {16,19},
["Minotaur Guard"] = {20,25},
["Dragon Hatchling"] = {26,32},
["Dragon"] = {33,45},
["Giant Spider"] = {46,55},
["Dragon Lord"] = {56,120},
["Grim Reaper"] = {121,160},
["Ghastly Dragon"] = {161,200},
["Undead Dragon"] = {201,300},
["Mutated Human"] = {301,456},
["Novo Monstro"] = {457,501}
Obs:Para o pet não atacar vc vc vai ter qui ir la em Data/Montros ir no Monstro qui vc adicionou e mudar isso
<flag convinceable="0"/>
Onde Tem Zero vc vai Mudar pra 1 vai ficar assim
<flag convinceable="1"/>
E Pronto
Imagens
http://imageshack.us...9/19714900.png/
Creditos
Snokiuthu: Por fazelo
Pokemonfox123: por repostalo e editalo