Ir para conteúdo

Featured Replies

Postado
  • Autor

pessoal fala que vai fazer do 0 , quando pego o servidor e abro o goback.lua ta la o velho e antigo codigo do kydrai e norgad ^^

 

Que pena não? acho que ficou descepcionado  quando viu que o meu goBack é o do PDA mesmo .... 

 

local EFFECTS = {

--[OutfitID] = {Effect}

["Magmar"] = 35,

["Jynx"] = 17,

["Shiny Jynx"] = 17,

["Piloswine"] = 205,

["Swinub"] = 205,

}

function onUse(cid, item, frompos, item2, topos)

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1

or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then

return true

end

local ballName = getItemAttribute(item.uid, "poke")

local btype = getPokeballType(item.itemid)

local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect

if not effect then

effect = 21

end

unLock(item.uid)

if item.itemid == usando then

if getPlayerStorageValue(cid, 990) == 1 then -- GYM

doPlayerSendCancel(cid, "Voce não pode retornar o seu pokemon durante as batalhas de ginasio.")

return true

end

if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then

if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then

BackTeam(cid)

end

end

if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then

doPlayerSendCancel(cid, "Voce nao pode fazer isso enquanto esta controlando a mente")

return true

end

if #getCreatureSummons(cid) <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

doPlayerSendCancel(cid, "Este Pokemon esta derrotado!.")

return true

end

end

local cd = getCD(item.uid, "blink", 30)

if cd > 0 then

setCD(item.uid, "blink", 0)

end

local z = getCreatureSummons(cid)[1]

if getCreatureCondition(z, CONDITION_INVISIBLE) then

return true

end

doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then

doPlayerSendCancel(cid, "Voce deve colocar a sua pokeball no Slot correto!")

return true

end

local thishp = getItemAttribute(item.uid, "hp")

if thishp <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

doPlayerSendCancel(cid, "Este Pokemon esta derrotado!.")

return true

end

end

local pokemon = getItemAttribute(item.uid, "poke")

if not pokes[pokemon] then

return true

end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------

if not isInArray({5, 6}, getPlayerGroupId(cid)) then

local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)

local low = {}

local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}

if #balls >= 1 then

for _, uid in ipairs(balls) do

local nome = getItemAttribute(uid, "poke")

if not isInArray(lowPokes, pokemon) and nome == pokemon then

return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")

else

if nome == pokemon then

table.insert(low, nome)

end

end

end

end

if #low >= 3 then

return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")

end

end

---------------------------------------------------------------------------------------------------------------------------------------------------

local x = pokes[pokemon]

local boost = getItemAttribute(item.uid, "boost") or 0

if getPlayerLevel(cid) < (x.level+boost) then

doPlayerSendCancel(cid, "Voce precisa de ter level "..(x.level+boost).." para usar este pokemon.")

return true

end

--------------------------------------------------------------------------------------

if #getCreatureSummons(cid) == 0 then

doSummonMonster(cid, pokemon)

doTransformItem(item.uid, item.itemid+1)

end

--------------------------------------------------------------------------------------

local pk = getCreatureSummons(cid)[1]

if not isCreature(pk) then

return true

end

-- Efeito ao Andar dos Pokemons --

if EFFECTS[getCreatureName(pk)] then

markPosEff(pk, getThingPos(pk))

sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))

end

--------------------------------------------------------------------------

if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

local left = getItemAttribute(item.uid, "transLeft")

local name = getItemAttribute(item.uid, "transName")

if left and left > 0 then

setPlayerStorageValue(pk, 1010, name)

doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)

addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))

doItemSetAttribute(item.uid, "transBegin", os.clock())

else

setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited

end

end

local pokename = getPokeName(pk)

local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)

doCreatureSay(cid, mgo, TALKTYPE_SAY)

doSendMagicEffect(getCreaturePosition(pk), effect)

if useOTClient then

doPlayerSendCancel(cid, '12//,show')

end

else

doPlayerSendCancel(cid, "Este pokemon esta derrotado!.")

end

if useKpdoDlls then

doUpdateMoves(cid)

end

return true

end

 

quer print dele funcionando? video? .... 

Adicionado ao tópico modificações do dia 17/12/2014! + Prints sobre os sistemas ... 

Meu Ultimo projeto em desenvolvimento!

 

http://www.tibiaking.com/forum/topic/47753-show-off-ultimo-projeto-para-download/

 

 

Grupo do facebook para OtServidores! (Divulgação + Criação de Equipe)

 

https://www.facebook.com/groups/otservidores/

 

  • Respostas 120
  • Visualizações 24.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • hehe vlw ai galera    Adicionado ao tópico nova print + novo sistema adicionado 

  • vlw galerinha , irei fazendo com calma , tem muita coisa ainda pela frente , mas valeu pelo o apoio 

  • Vi gente ali perguntando, "vai ter icon, helds". Nossa cara, serio isso? .. O cara mal teminou o Projeto Open Source e já tão fazendo o lek de escravo pra postar um SERVIDOR PRONTO.. HEUHEU Biel, tamj

Posted Images

Postado
  • Autor

Beleza , então unica coisa mesmo que vou precisar vai ser ajuda nas sources , adicionar algumas funções e tals , e mais para frente fazer o sistema de Tv 

precisa adicionar o OnSpawn , setCreatureName , arrumar na source algo que tire esse erro [Warning - Items::loadFromXml] Unknown key value ispokeball <-- não tenho ideia de como arrumar isso  mas é na source , fazer uma função dessa  getDirectionToWalk, e é isso , o resto da para fazer de boa :v

Meu Ultimo projeto em desenvolvimento!

 

http://www.tibiaking.com/forum/topic/47753-show-off-ultimo-projeto-para-download/

 

 

Grupo do facebook para OtServidores! (Divulgação + Criação de Equipe)

 

https://www.facebook.com/groups/otservidores/

 

Postado

Amigo, no caso minha ajuda seria na parte das sourcers mesmo.

 

setCreatureName -> Eu fiquei horas e horas tentando fazer essa função, e sem sucesso. Brun foi meganinjask pra fazer essa função.

onSpawn é facil de fazer.

 

O Erro do Items.xml, é que no caso no PDA foi criado um atributo chamado "isPokeball", que nesse distro que você está usando, não existe. este é o erro.

fácil criar este atributo, mas pra que serviria?

 

E a função, getDirectionToWalk, o que ela faria exatamente?

Tony Araújo  ;D 

 

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.8k

Informação Importante

Confirmação de Termo