Bom amigo, tutorial meio sem formataçao, explique um pouco melhor. Mais tudo bem! Obrigado por trazer os scripts ao XTibia (ja tinha eles), mas os superiores tomam conta disso. Boa sorte!
Atensiosamente,
Roksas.
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Bom amigo, tutorial meio sem formataçao, explique um pouco melhor. Mais tudo bem! Obrigado por trazer os scripts ao XTibia (ja tinha eles), mas os superiores tomam conta disso. Boa sorte!
Atensiosamente,
Roksas.
info
Grupo: Campones
Registrado: 29/05/06
Posts: 4
Reputação: +2
Bom estou fazendo um Otserv de Pokemon versão (The Forgotten Server 8.4 By AlissonLinneker - Version 0.2 (Mystic Spirit).)
1-Eu editei a imagem de quando capturo um pokemon, ela fiko igual a do PokemonOnline só que antes mesmo de acabar a animação(quando consigo capturar ou não) a pokebola ja aparece na Mochila. Teria como colocar tipow um Exhausted até a imagem aparecer todinha ai sim se capturar ou se errar ai a pokebola aparece na Mochila ou some?
2- Eu tenho 2 Squirtle eu tiro 1 da pokebola, depois eu aperto use na outra squirtle, a que tava fora volta pra poke, deveria aparecer tipo uma mensagem ja existe um pokemon fora da pokebola. Como arrumar isso?
--Scripts--
1-Catch.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 2967 then
if math.random(1,100) >= 50 then
doRemoveItem(itemEx.uid)
doSendMagicEffect(toPosition, 24)
doPlayerSendTextMessage(cid,27,"You catch a Pokemon (Squirtle).")
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, 2181,1)
else
doRemoveItem(itemEx.uid)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22,"Your pokeball broke!")
doSendMagicEffect(toPosition, 23)
end
end
return TRUE
end
2-Go/Back.lua
function onUse(cid, item, frompos, item2, topos)
dofile("./petconfig.lua")
function doPlayerAddSummon(cid, name, pos)
local MyCreature = doSummonCreature("squirtle", pos)
doConvinceCreature(cid, MyCreature)
return MyCreature
end
local myPet = ""
local myPetUid = 0
if isExhausted(cid) == 1 then
return 0
end
if getPlayerStorageValue(cid, storages.petMag) == -1 then
setPlayerStorageValue(cid, storages.petMag, 0)
end
if isCreature(getPlayerStorageValue(cid, storages.petUid)) == 0 then
if getTilePzInfo(getCreaturePosition(cid)) == 0 then
if getPlayerStorageValue(cid, storages.petIsOnline) == 1 or getPlayerStorageValue(cid, storages.petIsOnline) == -1 then
for i = 1, #pets do
if isInArray(pets.vocations, getPlayerVocation(cid)) == 1 then
for k = 1, #pets.pets do
if pets.pets[k].level <= getPlayerLevel(cid) then
myPet = pets.pets[k].name
break
end
end
break
end
end
myPetUid = doPlayerAddSummon(cid, myPet, getCreaturePosition(cid))
if myPetUid ~= -1 then
setPlayerStorageValue(cid, storages.petUid, myPetUid)
if getPlayerStorageValue(cid, storages.petDamage) ~= 0 and getPlayerStorageValue(cid, storages.petDamage) ~= -1 then
if getPlayerStorageValue(cid, storages.petDamage) < getCreatureMaxHealth(getPlayerStorageValue(cid, storages.petUid)) then
doCreatureAddHealth(getPlayerStorageValue(cid, storages.petUid), getPlayerStorageValue(cid, storages.petDamage)*-1)
end
end
doChangeSpeed(myPetUid, getCreatureBaseSpeed(cid) - getCreatureBaseSpeed(myPetUid))
doCreatureSay(cid, "Go, Squirtle", TALKTYPE_SAY)
addMana({cid = cid})
setPlayerStorageValue(cid, storages.petIsOnline, 2)
doSendMagicEffect(getCreaturePosition(myPetUid), 17)
else
doPlayerSendCancel(cid, 'Not enought room.')
end
else
doPlayerSendCancel(cid, 'Your Pokemon died! You have to revive it.')
end
else
doPlayerSendCancel(cid, 'You cannot summon your Pokemon in PZ.')
end
else
local daPet = getPlayerStorageValue(cid, storages.petUid)
setPlayerStorageValue(cid, storages.petDamage, getCreatureMaxHealth(daPet) - getCreatureHealth(daPet))
doCreatureSay(cid, "Back, Squirtle", TALKTYPE_SAY)
setPlayerStorageValue(cid, storages.petIsOnline, 1)
doSendMagicEffect(getCreaturePosition(daPet), 17)
doRemoveCreature(daPet)
end
return setExhausted(cid)
end