local pets = {
['Wolf'] = {hp = 150, id = 11389, shp = 25, czas = 3, chance = 80},
['Spider'] = {hp = 200, id = 11390, shp = 20, czas = 30, chance = 80},
['Green Frog'] = {hp = 250, id = 11390, shp = 60, czas = 30, chance = 80},
['Skeleton'] = {hp = 300, id = 11390, shp = 50, czas = 30, chance = 80},
['Rotworm'] = {hp = 400, id = 11389, shp = 65, czas = 30, chance = 80},
['Orc'] = {hp = 500, id = 11390, shp = 70, czas = 40, chance = 65},
['Dwarf'] = {hp = 600, id = 11390, shp = 90, czas = 40, chance = 65},
['Dworc Venomsniper'] = {hp = 700, id = 11390, shp = 80, czas = 40, chance = 65},
['Acid Blob'] = {hp = 800, id = 11390, shp = 250, czas = 40, chance = 65},
['Beholder'] = {hp = 1000, id = 11390, shp = 260, czas = 40, chance = 65},
['Novice Of The Cult'] = {hp = 1500, id = 11390, shp = 285, czas = 60, chance = 50},
['Ghoul'] = {hp = 1600, id = 11390, shp = 100, czas = 60, chance = 50},
['dragon lord hatchling'] = {hp = 1800, id = 11390, shp = 750, czas = 60, chance = 50},
['Witch'] = {hp = 2000, id = 11390, shp = 300, czas = 60, chance = 50},
['Banshee'] = {hp = 2500, id = 11390, shp = 1000, czas = 60, chance = 50},
['fire elemental'] = {hp = 3500, id = 11390, shp = 280, czas = 120, chance = 35},
['Slick Water Elemental'] = {hp = 3500, id = 11390, shp = 550, czas = 120, chance = 35},
['Green Djinn'] = {hp = 5000, id = 11390, shp = 330, czas = 120, chance = 35},
['Mummy'] = {hp = 6000, id = 11390, shp = 240, czas = 120, chance = 35},
['lostsoul'] = {hp = 10000, id = 11390, shp = 5800, czas = 120, chance = 35},
['Nightmare Scion'] = {hp = 12000, id = 11390, shp = 1400, czas = 120, chance = 35},
['Grim Reaper'] = {hp = 25000, id = 11389, shp = 4100, czas = 180, chance = 20}
}
function onUse(cid, item, fromPosition, itemEx, toPosition, target)
for monstername, a in pairs(pets) do
if isMonster(itemEx.uid) and getCreatureName(itemEx.uid) == monstername and item.itemid == a.id and getCreatureMaxHealth(itemEx.uid) == a.shp then
doPlayerSetStorageValue(itemEx.uid, 1000, 1)
doPlayerRemoveItem(cid, 11389, 1)
setCreatureMaxHealth(itemEx.uid, a.hp)
maxhp = getCreatureMaxHealth(itemEx.uid)
doCreatureAddHealth(itemEx.uid, maxhp)
doCreatureSay(itemEx.uid, 'Zaczoles oswajac '..getCreatureName(itemEx.uid)..'. Masz na to '..a.czas..' sekund', TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(itemEx.uid), 3)
function monsterek(cid)
if itemEx == true then
doRemoveCreature(itemEx.uid)
end
end
addEvent(monsterek, a.czas*1000, cid)
elseif isMonster(itemEx.uid) and getCreatureName(itemEx.uid) == monstername and getCreatureMaxHealth(itemEx.uid) > a.shp then
doCreatureSay(cid, 'Juz zaczoles lapac tego potwora', TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(itemEx.uid), 1)
doCreatureSay(cid, 'Juz zaczoles lapac tego potwora', TALKTYPE_ORANGE_1)
end
end
return true
end