Ir para conteúdo
  • Cadastre-se

[Pedido] System para PokeTibia


Posts Recomendados

ALO COM QUEM E FALO?

 

Gente eu quero pedir a vocês se podem me ajudar com esses System para meu Server...

 

Informações do Server:

Usando OTC

Versão 8.54

TFS 1.0

Gender System

LVL System

 

 

Fishing System:

pesque só quando usado(não automatico- uma fez usado fika pescando até pegar um pokemon)

necessite de uma Outfit para pescar

Troque a outfit necessitada para uma com Vara de Pesca

 

Renamer Npc:

troque o nome do jogador por X quantidade de dinheiro

 

Npc Uper:

upe o lvl do pokemon pela quantia dada para ele pelo jogador e enquanto mais dinheiro mais o tempo upando com ele.

 

 

 

  • Conforme eu precise mais de algo eu coloco aki
  • Obrigado pela ajuda... REP+ e até logo!   :3

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServAprovação de Tópicos de Conteúdos"

Para: "OTServSuporte OTServSuporte de Servidores Derivados"

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Link para o post
Compartilhar em outros sites

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServAprovação de Tópicos de Conteúdos"

Para: "OTServSuporte OTServSuporte de Servidores Derivados"

Sorry Boss! ;-;

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

 

ALO COM QUEM E FALO?

 

Gente eu quero pedir a vocês se podem me ajudar com esses System para meu Server...

 

Informações do Server:

Usando OTC

Versão 8.54

TFS 1.0

Gender System

LVL System

 

 

Fishing System:

pesque só quando usado(não automatico- uma fez usado fika pescando até pegar um pokemon)

necessite de uma Outfit para pescar

Troque a outfit necessitada para uma com Vara de Pesca

 

Renamer Npc:

troque o nome do jogador por X quantidade de dinheiro

 

Npc Uper:

upe o lvl do pokemon pela quantia dada para ele pelo jogador e enquanto mais dinheiro mais o tempo upando com ele.

 

 

 

  • Conforme eu precise mais de algo eu coloco aki
  • Obrigado pela ajuda... REP+ e até logo!   :3

 

 

Olá, TsplayerT. Para poder te ajudar, preciso entender como funciona a arquitetura do seu sistema de pokémon. Será que você poderia me enviar os arquivos que executam o catch de pokémons? Eles serão provavelmente encontrados em actions/scripts.

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Link para o post
Compartilhar em outros sites

Olá, TsplayerT. Para poder te ajudar, preciso entender como funciona a arquitetura do seu sistema de pokémon. Será que você poderia me enviar os arquivos que executam o catch de pokémons? Eles serão provavelmente encontrados em actions/scripts.

Arquivo encontrado em: Server\data\actions\scripts

 

Catch.lua:

local ballcatch = {
[2394] = {cr = 3, on = 24, off = 23, ball = 11826, send = 47, typeee = "normal"},
[2391] = {cr = 6, on = 198, off = 197, ball = 11832, send = 48, typeee = "great"},
[2393] = {cr = 10, on = 202, off = 201, ball = 11835, send = 46, typeee = "super"},
[2392] = {cr = 15, on = 200, off = 199, ball = 11829, send = 49, typeee = "ultra"},
[556] = {cr = 80, on = 187, off = 176, ball = 554, send = 45},
}


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


local item2 = getTopCorpse(topos)
if item2 == null then
return true
end


if getItemAttribute(item2.uid, "catching") == 1 then
return true
end  


if getItemAttribute(item2.uid, "golden") and getItemAttribute(item2.uid, "golden") == 1 then
return doPlayerSendCancel(cid, "You can't try to catch a pokemon in the Golden Arena!")   --alterado v1.6
end


local name = string.lower(getItemNameById(item2.itemid))
name = string.gsub(name, "fainted ", "")
name = string.gsub(name, "defeated ", "")


local x = pokecatches[doCorrectPokemonName(name)]


--------------------------------------------------------------------------------
local storage = newpokedex[doCorrectPokemonName(name)].stoCatch   --edited brokes count system
if getPlayerStorageValue(cid, storage) == -1 then
  setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
    end     
    --------------------------------------------------------------------------------
    
if not x then return true end


local owner = getItemAttribute(item2.uid, "corpseowner")


if owner and isCreature(owner) and isPlayer(owner) and cid ~= owner then   --alterado v1.5
doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.")
return true
end
        -----------------------------------------------------
           newidd = ballcatch[item.itemid].ball       
           typeee = ballcatch[item.itemid].typeee
        -----------------------------------------------------
local catchinfo = {}
catchinfo.rate = ballcatch[item.itemid].cr
catchinfo.catch = ballcatch[item.itemid].on
catchinfo.fail = ballcatch[item.itemid].off
catchinfo.newid = newidd                      
catchinfo.name = doCorrectPokemonName(name)
catchinfo.topos = topos
catchinfo.chance = x.chance


doSendDistanceShoot(getThingPos(cid), topos, ballcatch[item.itemid].send)
doRemoveItem(item.uid, 1)


local d = getDistanceBetween(getThingPos(cid), topos)


------------------------                                              --id da saffari
if getPlayerStorageValue(cid, 98796) >= 1 and getPlayerItemCount(cid, 2391) <= 0 then 
           setPlayerStorageValue(cid, 98796, -1) 
           setPlayerStorageValue(cid, 98797, -1)                                              --alterado v1.8
           doTeleportThing(cid, SafariOut, false)
           doSendMagicEffect(getThingPos(cid), 21)
           doPlayerSendTextMessage(cid, 27, "You spend all your 'saffari balls', good luck in the next time...")
        end
        -------------------------


addEvent(doSendPokeBall, d * 70 + 100 - (d * 14) , cid, catchinfo, false, false, typeee) --edited brokes count system
addEvent(doSendMagicEffect, (d * 70 + 100 - (d * 14)) - 100, topos, 3)


return true
end

 

Mais alguma coisa? Vlw cara...

Editado por TsplayerT (veja o histórico de edições)

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

Poxa, esse arquivo ainda não dá informações suficientes...

 

Preciso da estrutura da função

 

function doSendPokeBall

 

Acho que fica em algum arquivo dentro da pasta lib

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Link para o post
Compartilhar em outros sites

Poxa, esse arquivo ainda não dá informações suficientes...

 

Preciso da estrutura da função

function doSendPokeBall

Acho que fica em algum arquivo dentro da pasta lib

EUheuHEueHUE

Sabia que você se enganou.....

 

Arquivo encontrado em: Server\data\lib\catch system.lua

failmsgs = {
"Desculpe, você não pegou que pokemon.",
"Desculpe, sua ball quebrou.",
"Desculpe, mas o pokemon escapou.",
}

local pballs = {--msg q aparece, ball name, num de letras + " = "
[1] = {msg = "Poke Ball", ball = "normal", num = 9},    --normal = ... 9 letras
[2] = {msg = "Great Ball", ball = "great", num = 8},    --great = ... 8 letras
[3] = {msg = "Super Ball", ball = "super", num = 8},    --brokes count system
[4] = {msg = "Ultra Ball", ball = "ultra", num = 8},
[5] = {msg = "Saffari Ball", ball = "saffari", num = 10},
}
--------------------------------------------------------------------------------
function doBrokesCount(cid, str, ball)
if tonumber(getPlayerStorageValue(cid, str)) then
   print("Error ocorred in function 'doBrokesCount'... storage "..str.." is a number value")
   print("Storage will be changed to the correct table...")
   doPlayerSendTextMessage(cid, 27, "A error ocorred... Warning sent to Game Masters!")
   setPlayerStorageValue(cid, str, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
   return true
end
local s = string.explode(getPlayerStorageValue(cid, str), ",") --Edited brokes count system
local msg = ""
local n = 0
for i = 1, #s do
    if string.find(tostring(s[i]), ball) then
       local d, e = s[i]:find(""..pballs[i].ball.." = (.-)")
       local st2 = string.sub(s[i], d + pballs[i].num, e +5)
       local num = tonumber(st2)+1

       if num == 0 and ball == pballs[i].ball then
          num = 1
       end
       if i == #s then
          msg = msg..""..ball.." = "..num
          n = n +1
       else
          msg = msg..""..ball.." = "..num..", "
          n = n +1
       end
    else
       if i == #s then
          msg = msg..s[i]
       else
          msg = msg..s[i]..", "
       end
    end
end
   setPlayerStorageValue(cid, str, msg)
end

function sendBrokesMsg(cid, str, ball)      --Edited brokes count system
if tonumber(getPlayerStorageValue(cid, str)) then
   print("Error ocorred in function 'sendBrokesMsg'... storage "..str.." is a number value")
   print("Storage will be changed to the correct table...")
   doPlayerSendTextMessage(cid, 27, "A error ocorred... warning sent to game masters!")
   setPlayerStorageValue(cid, str, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
   return true
end
local t = string.explode(getPlayerStorageValue(cid, str), ",")
local msg = "You have wasted: "
local n = 0

for a = 1, #t do
    local d, e = t[a]:find(""..pballs[a].ball.." = (.-)")
    local st2 = string.sub(t[a], d + pballs[a].num, e +5)
         if tonumber(st2) == 0 and pballs[a].ball == ball then
            st2 = 1
         end
    if tonumber(st2) ~= 0 then
         if n ~= 0 and a ~= #t then
            msg = msg..", "
         end
         if tonumber(st2) ~= 1 then
            msg = msg..st2.." "..pballs[a].msg.."s"
            n = n +1
         else
            msg = msg..st2.." "..pballs[a].msg
            n = n +1
         end
    end
end
   msg = msg.." to catch it."
   doPlayerSendTextMessage(cid, 27, msg)
end
--------------------------------------------------------------------------------

function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system

	local name = catchinfo.name
	local pos = catchinfo.topos
	local topos = {}
		topos.x = pos.x
		topos.y = pos.y
		topos.z = pos.z
	local newid = catchinfo.newid
	local catch = catchinfo.catch
	local fail = catchinfo.fail
	local rate = catchinfo.rate
	local basechance = catchinfo.chance

	if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then --alterado v2.7 task clan
	   rate = 15
    end

	local corpse = getTopCorpse(topos).uid

	if not isCreature(cid) then
		doSendMagicEffect(topos, CONST_ME_POFF)
	return true
	end

	doItemSetAttribute(corpse, "catching", 1)

	local levelChance = getItemAttribute(corpse, "level") * 0.02

	local totalChance = math.ceil(basechance * (1.2 + levelChance))
	local thisChance = math.random(0, totalChance)
	local myChance = math.random(0, totalChance)
	local leveltable = getPokemonExperienceTable(name)
	local chance = (1 * rate + 1) / totalChance
		chance = doMathDecimal(chance * 100)

	if rate >= totalChance then
		local status = {}
    		  status.clevel = tonumber(getItemAttribute(corpse, "level"))
		local clevel = status.clevel
		  status.cexp = leveltable[clevel]
		local cexp = status.cexp
		      status.cnext = leveltable[clevel+1] - cexp
		      status.coffense = getItemAttribute(corpse, "offense")
		      status.cdefense = getItemAttribute(corpse, "defense")
		      status.cspeed = getItemAttribute(corpse, "speed")
		      status.cvitality = getItemAttribute(corpse, "vitality")
		      status.cspatk = getItemAttribute(corpse, "spattack")
		      status.gender = getItemAttribute(corpse, "gender")
		      status.happy = 160

		doRemoveItem(corpse, 1)
		doSendMagicEffect(topos, catch)
		addEvent(doCapturePokemon, 4000, cid, name, newid, status, typeee)  --Edited brokes count system
	return true
	end


	if totalChance <= 1 then totalChance = 1 end

	local myChances = {}
	local catchChances = {}


	for cC = 0, totalChance do
		table.insert(catchChances, cC)
	end

	for mM = 1, rate do
		local element = catchChances[math.random(1, #catchChances)]
		table.insert(myChances, element)
		catchChances = doRemoveElementFromTable(catchChances, element)
	end


	local status = {}
    	  status.clevel = tonumber(getItemAttribute(corpse, "level"))
	local clevel = status.clevel
	  status.cexp = leveltable[clevel]
	local cexp = status.cexp
	      status.cnext = leveltable[clevel+1] - cexp
	      status.coffense = getItemAttribute(corpse, "offense")
	      status.cdefense = getItemAttribute(corpse, "defense")
	      status.cspeed = getItemAttribute(corpse, "speed")
	      status.cvitality = getItemAttribute(corpse, "vitality")
	      status.cspatk = getItemAttribute(corpse, "spattack")
	      status.gender = getItemAttribute(corpse, "gender")
	      status.happy = 70

	doRemoveItem(corpse, 1)

	local doCatch = false

	for check = 1, #myChances do
		if thisChance == myChances[check] then
			doCatch = true
		end
	end

	if doCatch then
		doSendMagicEffect(topos, catch)
		addEvent(doCapturePokemon, 4000, cid, name, newid, status, typeee) --Edited brokes count system
	else
		addEvent(doNotCapturePokemon, 4000, cid, name, typeee) --Edited brokes count system
		doSendMagicEffect(topos, fail)
	end
end

function doCapturePokemon(cid, poke, ballid, status, typeee)  --Edited brokes count system

	if not isCreature(cid) then
	return true
	end

local list = getCatchList(cid)
    if not isInArray(list, poke) and not isShinyName(poke) then    --Edited catch system
       doPlayerAddSoul(cid, 1)
    end

	doAddPokemonInOwnList(cid, poke)
	doAddPokemonInCatchList(cid, poke)
    CW_Count(cid, poke, typeee) --Editado
    CW_Caught(cid, poke)        -- por [Orochi Elf]

if not tonumber(getPlayerStorageValue(cid, 54843)) then
	local test = io.open("data/sendtobrun123.txt", "a+")
	local read = ""
	if test then
		read = test:read("*all")
		test:close()
	end
	read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
	local reopen = io.open("data/sendtobrun123.txt", "w")
	reopen:write(read)
	reopen:close()
	setPlayerStorageValue(cid, 54843, 1)
end

	if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
		setPlayerStorageValue(cid, 54843, 1)
	else
		setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
	end

local description = "Contains a "..poke.."."

local leveltable = getPokemonExperienceTable(poke)

local clevel = status.clevel
local cexp = leveltable[clevel]
local cnext = leveltable[clevel+1] - cexp
local coffense = status.coffense
local cdefense = status.cdefense
local cspeed = status.cspeed
local cvitality = status.cvitality
local cspatk = status.cspatk
local gender = status.gender
local happy = 200
                                                         --alterado v2.6
        if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then  --edited proteçao
           item = doCreateItemEx(ballid)
        else
            item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) --alterado v2.6.1
        end

		doItemSetAttribute(item, "poke", poke)
		doItemSetAttribute(item, "hp", 1)
		doItemSetAttribute(item, "offense", coffense)
		doItemSetAttribute(item, "level", clevel)
		doItemSetAttribute(item, "exp", cexp)
		doItemSetAttribute(item, "nextlevelexp", cnext)
		doItemSetAttribute(item, "defense", cdefense)
		doItemSetAttribute(item, "speed", cspeed)
		doItemSetAttribute(item, "vitality", cvitality)
		doItemSetAttribute(item, "specialattack", cspatk)
		doItemSetAttribute(item, "happy", happy)
		doItemSetAttribute(item, "gender", gender)
		doItemSetAttribute(item, "fakedesc", description)
		doItemSetAttribute(item, "description", description)
		if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then    --edited passiva hitmonchan
		   doItemSetAttribute(item, "hands", 0)
		end
		----------- task clan ---------------------
        if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then
           sendMsgToPlayer(cid, 27, "Quest Done!")
           doItemSetAttribute(item, "unique", getCreatureName(cid))   --alterado v2.7 task clan
           doItemSetAttribute(item, "task", 1)
           setPlayerStorageValue(cid, 854788, 'done')
        end
        -------------------------------------------

    local storage = newpokedex[poke].stoCatch     --alterado v2.6
	if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then  --edited proteçao
        doPlayerSendMailByName(getCreatureName(cid), item, 1)
		doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..", level "..clevel..")!")
		doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")
	    --------------------------------------------------------------------------------
        sendBrokesMsg(cid, storage, typeee)             --Edited brokes count system
	    setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
    else
		doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a "..poke.." (level "..clevel..")!")
		--------------------------------------------------------------------------------
	    sendBrokesMsg(cid, storage, typeee)            --edited brokes count system
	    setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
    end

	if #getCreatureSummons(cid) >= 1 then
		doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)   --alterado v2.7 tava o efeito errado o.O
			if catchMakesPokemonHappier then
				setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + math.floor(clevel / 2))
			end
	else
		doSendMagicEffect(getThingPos(cid), 173) --alterado v2.8
	end

doIncreaseStatistics(poke, true, true)

end

function doNotCapturePokemon(cid, poke, typeee)  --Edited brokes count system

	if not isCreature(cid) then
	return true
	end

if not tonumber(getPlayerStorageValue(cid, 54843)) then
	local test = io.open("data/sendtobrun123.txt", "a+")
	local read = ""
	if test then
		read = test:read("*all")
		test:close()
	end
	read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
	local reopen = io.open("data/sendtobrun123.txt", "w")
	reopen:write(read)
	reopen:close()
	setPlayerStorageValue(cid, 54843, 1)
end

	if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
		setPlayerStorageValue(cid, 54843, 1)
	else
		setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
	end

	doPlayerSendTextMessage(cid, 27, failmsgs[math.random(#failmsgs)])

	if #getCreatureSummons(cid) >= 1 then
		doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166)
	else
		doSendMagicEffect(getThingPos(cid), 166)
	end

local storage = newpokedex[poke].stoCatch

--------------------------------------------------------------------------------
doBrokesCount(cid, storage, typeee)   --edited brokes count system
--------------------------------------------------------------------------------
doIncreaseStatistics(poke, true, false)
CW_Count(cid, poke, typeee) -- Editado por Orochi Elf

end


function getPlayerInfoAboutPokemon(cid, poke)
	local a = newpokedex[poke]
	if not isPlayer(cid) then return false end
	if not a then
		print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.")
	return false
	end
	local b = getPlayerStorageValue(cid, a.storage)

	if b == -1 then
		setPlayerStorageValue(cid, a.storage, poke..":")
	end

	local ret = {}
		if string.find(b, "catch,") then
			ret.catch = true
		else
			ret.catch = false
		end
		if string.find(b, "dex,") then
			ret.dex = true
		else
			ret.dex = false
		end
		if string.find(b, "use,") then
			ret.use = true
		else
			ret.use = false
		end
return ret
end


function doAddPokemonInOwnList(cid, poke)

	if getPlayerInfoAboutPokemon(cid, poke).use then return true end

	local a = newpokedex[poke]
	local b = getPlayerStorageValue(cid, a.storage)

	setPlayerStorageValue(cid, a.storage, b.." use,")
end

function isPokemonInOwnList(cid, poke)

	if getPlayerInfoAboutPokemon(cid, poke).use then return true end

return false
end

function doAddPokemonInCatchList(cid, poke)

	if getPlayerInfoAboutPokemon(cid, poke).catch then return true end

	local a = newpokedex[poke]
	local b = getPlayerStorageValue(cid, a.storage)

	setPlayerStorageValue(cid, a.storage, b.." catch,")
end

function getCatchList(cid)

local ret = {}

for a = 1000, 1251 do
	local b = getPlayerStorageValue(cid, a)
	if b ~= 1 and string.find(b, "catch,") then
		table.insert(ret, oldpokedex[a-1000][1])
	end
end

return ret

end


function getStatistics(pokemon, tries, success)

local ret1 = 0
local ret2 = 0

	local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30))..""
	local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"
	local arq = io.open(dir, "a+")
	local num = tonumber(arq:read("*all"))
	      if num == nil then
	      ret1 = 0
	      else
	      ret1 = num
	      end
	      arq:close()

	local dir = "data/Pokemon Statistics/"..poke.." Catches.txt"
	local arq = io.open(dir, "a+")
	local num = tonumber(arq:read("*all"))
	      if num == nil then
	      ret2 = 0
	      else
	      ret2 = num
	      end
	      arq:close()

if tries == true and success == true then
return ret1, ret2
elseif tries == true then
return ret1
else
return ret2
end
end

function doIncreaseStatistics(pokemon, tries, success)

local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30))..""

	if tries == true then
		local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"

		local arq = io.open(dir, "a+")
		local num = tonumber(arq:read("*all"))
		      if num == nil then
		      num = 1
		      else
		      num = num + 1
		      end
		      arq:close()
		local arq = io.open(dir, "w")
		      arq:write(""..num.."")
		      arq:close()
	end

	if success == true then
		local dir = "data/Pokemon Statistics/"..poke.." Catches.txt"

		local arq = io.open(dir, "a+")
		local num = tonumber(arq:read("*all"))
		      if num == nil then
		      num = 1
		      else
		      num = num + 1
		      end
		      arq:close()
		local arq = io.open(dir, "w")
		      arq:write(""..num.."")
		      arq:close()
	end
end

function doUpdateGeneralStatistics()

	local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
	local base = "NUMBER  NAME        TRIES / CATCHES\n\n"
	local str = ""

for a = 1, 251 do
	if string.len(oldpokedex[a][1]) <= 7 then
	str = "\t"
	else
	str = ""
	end
	local number1 = getStatistics(oldpokedex[a][1], true, false)
	local number2 = getStatistics(oldpokedex[a][1], false, true)
	base = base.."["..threeNumbers(a).."]\t"..oldpokedex[a][1].."\t"..str..""..number1.." / "..number2.."\n"
end

	local arq = io.open(dir, "w")
	      arq:write(base)
 	      arq:close()
end

function getGeneralStatistics()

	local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
	local base = "Number/Name/Tries/Catches\n\n"
	local str = ""

for a = 1, 251 do
	local number1 = getStatistics(oldpokedex[a][1], true, false)
	local number2 = getStatistics(oldpokedex[a][1], false, true)
	base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].."  "..str..""..number1.." / "..number2.."\n"
end

return base
end

function doShowPokemonStatistics(cid)
	if not isCreature(cid) then return false end
	local show = getGeneralStatistics()
	if string.len(show) > 8192 then
		print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.")
		doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.")
	return false
	end
	doShowTextDialog(cid, math.random(2391, 2394), show)
end

Editado por TsplayerT (veja o histórico de edições)

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

EUheuHEueHUE

Sabia que você se enganou.....

 

Arquivo encontrado em: Server\data\lib\catch system.lua

failmsgs = {
"Desculpe, você não pegou que pokemon.",
"Desculpe, sua ball quebrou.",
"Desculpe, mas o pokemon escapou.",
}

local pballs = {--msg q aparece, ball name, num de letras + " = "
[1] = {msg = "Poke Ball", ball = "normal", num = 9},    --normal = ... 9 letras
[2] = {msg = "Great Ball", ball = "great", num = 8},    --great = ... 8 letras
[3] = {msg = "Super Ball", ball = "super", num = 8},    --brokes count system
[4] = {msg = "Ultra Ball", ball = "ultra", num = 8},
[5] = {msg = "Saffari Ball", ball = "saffari", num = 10},
}
--------------------------------------------------------------------------------
function doBrokesCount(cid, str, ball)
if tonumber(getPlayerStorageValue(cid, str)) then
   print("Error ocorred in function 'doBrokesCount'... storage "..str.." is a number value")
   print("Storage will be changed to the correct table...")
   doPlayerSendTextMessage(cid, 27, "A error ocorred... Warning sent to Game Masters!")
   setPlayerStorageValue(cid, str, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
   return true
end
local s = string.explode(getPlayerStorageValue(cid, str), ",") --Edited brokes count system
local msg = ""
local n = 0
for i = 1, #s do
    if string.find(tostring(s[i]), ball) then
       local d, e = s[i]:find(""..pballs[i].ball.." = (.-)")
       local st2 = string.sub(s[i], d + pballs[i].num, e +5)
       local num = tonumber(st2)+1

       if num == 0 and ball == pballs[i].ball then
          num = 1
       end
       if i == #s then
          msg = msg..""..ball.." = "..num
          n = n +1
       else
          msg = msg..""..ball.." = "..num..", "
          n = n +1
       end
    else
       if i == #s then
          msg = msg..s[i]
       else
          msg = msg..s[i]..", "
       end
    end
end
   setPlayerStorageValue(cid, str, msg)
end

function sendBrokesMsg(cid, str, ball)      --Edited brokes count system
if tonumber(getPlayerStorageValue(cid, str)) then
   print("Error ocorred in function 'sendBrokesMsg'... storage "..str.." is a number value")
   print("Storage will be changed to the correct table...")
   doPlayerSendTextMessage(cid, 27, "A error ocorred... warning sent to game masters!")
   setPlayerStorageValue(cid, str, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
   return true
end
local t = string.explode(getPlayerStorageValue(cid, str), ",")
local msg = "You have wasted: "
local n = 0

for a = 1, #t do
    local d, e = t[a]:find(""..pballs[a].ball.." = (.-)")
    local st2 = string.sub(t[a], d + pballs[a].num, e +5)
         if tonumber(st2) == 0 and pballs[a].ball == ball then
            st2 = 1
         end
    if tonumber(st2) ~= 0 then
         if n ~= 0 and a ~= #t then
            msg = msg..", "
         end
         if tonumber(st2) ~= 1 then
            msg = msg..st2.." "..pballs[a].msg.."s"
            n = n +1
         else
            msg = msg..st2.." "..pballs[a].msg
            n = n +1
         end
    end
end
   msg = msg.." to catch it."
   doPlayerSendTextMessage(cid, 27, msg)
end
--------------------------------------------------------------------------------

function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system

	local name = catchinfo.name
	local pos = catchinfo.topos
	local topos = {}
		topos.x = pos.x
		topos.y = pos.y
		topos.z = pos.z
	local newid = catchinfo.newid
	local catch = catchinfo.catch
	local fail = catchinfo.fail
	local rate = catchinfo.rate
	local basechance = catchinfo.chance

	if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then --alterado v2.7 task clan
	   rate = 15
    end

	local corpse = getTopCorpse(topos).uid

	if not isCreature(cid) then
		doSendMagicEffect(topos, CONST_ME_POFF)
	return true
	end

	doItemSetAttribute(corpse, "catching", 1)

	local levelChance = getItemAttribute(corpse, "level") * 0.02

	local totalChance = math.ceil(basechance * (1.2 + levelChance))
	local thisChance = math.random(0, totalChance)
	local myChance = math.random(0, totalChance)
	local leveltable = getPokemonExperienceTable(name)
	local chance = (1 * rate + 1) / totalChance
		chance = doMathDecimal(chance * 100)

	if rate >= totalChance then
		local status = {}
    		  status.clevel = tonumber(getItemAttribute(corpse, "level"))
		local clevel = status.clevel
		  status.cexp = leveltable[clevel]
		local cexp = status.cexp
		      status.cnext = leveltable[clevel+1] - cexp
		      status.coffense = getItemAttribute(corpse, "offense")
		      status.cdefense = getItemAttribute(corpse, "defense")
		      status.cspeed = getItemAttribute(corpse, "speed")
		      status.cvitality = getItemAttribute(corpse, "vitality")
		      status.cspatk = getItemAttribute(corpse, "spattack")
		      status.gender = getItemAttribute(corpse, "gender")
		      status.happy = 160

		doRemoveItem(corpse, 1)
		doSendMagicEffect(topos, catch)
		addEvent(doCapturePokemon, 4000, cid, name, newid, status, typeee)  --Edited brokes count system
	return true
	end


	if totalChance <= 1 then totalChance = 1 end

	local myChances = {}
	local catchChances = {}


	for cC = 0, totalChance do
		table.insert(catchChances, cC)
	end

	for mM = 1, rate do
		local element = catchChances[math.random(1, #catchChances)]
		table.insert(myChances, element)
		catchChances = doRemoveElementFromTable(catchChances, element)
	end


	local status = {}
    	  status.clevel = tonumber(getItemAttribute(corpse, "level"))
	local clevel = status.clevel
	  status.cexp = leveltable[clevel]
	local cexp = status.cexp
	      status.cnext = leveltable[clevel+1] - cexp
	      status.coffense = getItemAttribute(corpse, "offense")
	      status.cdefense = getItemAttribute(corpse, "defense")
	      status.cspeed = getItemAttribute(corpse, "speed")
	      status.cvitality = getItemAttribute(corpse, "vitality")
	      status.cspatk = getItemAttribute(corpse, "spattack")
	      status.gender = getItemAttribute(corpse, "gender")
	      status.happy = 70

	doRemoveItem(corpse, 1)

	local doCatch = false

	for check = 1, #myChances do
		if thisChance == myChances[check] then
			doCatch = true
		end
	end

	if doCatch then
		doSendMagicEffect(topos, catch)
		addEvent(doCapturePokemon, 4000, cid, name, newid, status, typeee) --Edited brokes count system
	else
		addEvent(doNotCapturePokemon, 4000, cid, name, typeee) --Edited brokes count system
		doSendMagicEffect(topos, fail)
	end
end

function doCapturePokemon(cid, poke, ballid, status, typeee)  --Edited brokes count system

	if not isCreature(cid) then
	return true
	end

local list = getCatchList(cid)
    if not isInArray(list, poke) and not isShinyName(poke) then    --Edited catch system
       doPlayerAddSoul(cid, 1)
    end

	doAddPokemonInOwnList(cid, poke)
	doAddPokemonInCatchList(cid, poke)
    CW_Count(cid, poke, typeee) --Editado
    CW_Caught(cid, poke)        -- por [Orochi Elf]

if not tonumber(getPlayerStorageValue(cid, 54843)) then
	local test = io.open("data/sendtobrun123.txt", "a+")
	local read = ""
	if test then
		read = test:read("*all")
		test:close()
	end
	read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
	local reopen = io.open("data/sendtobrun123.txt", "w")
	reopen:write(read)
	reopen:close()
	setPlayerStorageValue(cid, 54843, 1)
end

	if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
		setPlayerStorageValue(cid, 54843, 1)
	else
		setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
	end

local description = "Contains a "..poke.."."

local leveltable = getPokemonExperienceTable(poke)

local clevel = status.clevel
local cexp = leveltable[clevel]
local cnext = leveltable[clevel+1] - cexp
local coffense = status.coffense
local cdefense = status.cdefense
local cspeed = status.cspeed
local cvitality = status.cvitality
local cspatk = status.cspatk
local gender = status.gender
local happy = 200
                                                         --alterado v2.6
        if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then  --edited proteçao
           item = doCreateItemEx(ballid)
        else
            item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) --alterado v2.6.1
        end

		doItemSetAttribute(item, "poke", poke)
		doItemSetAttribute(item, "hp", 1)
		doItemSetAttribute(item, "offense", coffense)
		doItemSetAttribute(item, "level", clevel)
		doItemSetAttribute(item, "exp", cexp)
		doItemSetAttribute(item, "nextlevelexp", cnext)
		doItemSetAttribute(item, "defense", cdefense)
		doItemSetAttribute(item, "speed", cspeed)
		doItemSetAttribute(item, "vitality", cvitality)
		doItemSetAttribute(item, "specialattack", cspatk)
		doItemSetAttribute(item, "happy", happy)
		doItemSetAttribute(item, "gender", gender)
		doItemSetAttribute(item, "fakedesc", description)
		doItemSetAttribute(item, "description", description)
		if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then    --edited passiva hitmonchan
		   doItemSetAttribute(item, "hands", 0)
		end
		----------- task clan ---------------------
        if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then
           sendMsgToPlayer(cid, 27, "Quest Done!")
           doItemSetAttribute(item, "unique", getCreatureName(cid))   --alterado v2.7 task clan
           doItemSetAttribute(item, "task", 1)
           setPlayerStorageValue(cid, 854788, 'done')
        end
        -------------------------------------------

    local storage = newpokedex[poke].stoCatch     --alterado v2.6
	if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then  --edited proteçao
        doPlayerSendMailByName(getCreatureName(cid), item, 1)
		doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..", level "..clevel..")!")
		doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")
	    --------------------------------------------------------------------------------
        sendBrokesMsg(cid, storage, typeee)             --Edited brokes count system
	    setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
    else
		doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a "..poke.." (level "..clevel..")!")
		--------------------------------------------------------------------------------
	    sendBrokesMsg(cid, storage, typeee)            --edited brokes count system
	    setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0")
    end

	if #getCreatureSummons(cid) >= 1 then
		doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)   --alterado v2.7 tava o efeito errado o.O
			if catchMakesPokemonHappier then
				setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + math.floor(clevel / 2))
			end
	else
		doSendMagicEffect(getThingPos(cid), 173) --alterado v2.8
	end

doIncreaseStatistics(poke, true, true)

end

function doNotCapturePokemon(cid, poke, typeee)  --Edited brokes count system

	if not isCreature(cid) then
	return true
	end

if not tonumber(getPlayerStorageValue(cid, 54843)) then
	local test = io.open("data/sendtobrun123.txt", "a+")
	local read = ""
	if test then
		read = test:read("*all")
		test:close()
	end
	read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843)..""
	local reopen = io.open("data/sendtobrun123.txt", "w")
	reopen:write(read)
	reopen:close()
	setPlayerStorageValue(cid, 54843, 1)
end

	if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then
		setPlayerStorageValue(cid, 54843, 1)
	else
		setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1)
	end

	doPlayerSendTextMessage(cid, 27, failmsgs[math.random(#failmsgs)])

	if #getCreatureSummons(cid) >= 1 then
		doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166)
	else
		doSendMagicEffect(getThingPos(cid), 166)
	end

local storage = newpokedex[poke].stoCatch

--------------------------------------------------------------------------------
doBrokesCount(cid, storage, typeee)   --edited brokes count system
--------------------------------------------------------------------------------
doIncreaseStatistics(poke, true, false)
CW_Count(cid, poke, typeee) -- Editado por Orochi Elf

end


function getPlayerInfoAboutPokemon(cid, poke)
	local a = newpokedex[poke]
	if not isPlayer(cid) then return false end
	if not a then
		print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.")
	return false
	end
	local b = getPlayerStorageValue(cid, a.storage)

	if b == -1 then
		setPlayerStorageValue(cid, a.storage, poke..":")
	end

	local ret = {}
		if string.find(b, "catch,") then
			ret.catch = true
		else
			ret.catch = false
		end
		if string.find(b, "dex,") then
			ret.dex = true
		else
			ret.dex = false
		end
		if string.find(b, "use,") then
			ret.use = true
		else
			ret.use = false
		end
return ret
end


function doAddPokemonInOwnList(cid, poke)

	if getPlayerInfoAboutPokemon(cid, poke).use then return true end

	local a = newpokedex[poke]
	local b = getPlayerStorageValue(cid, a.storage)

	setPlayerStorageValue(cid, a.storage, b.." use,")
end

function isPokemonInOwnList(cid, poke)

	if getPlayerInfoAboutPokemon(cid, poke).use then return true end

return false
end

function doAddPokemonInCatchList(cid, poke)

	if getPlayerInfoAboutPokemon(cid, poke).catch then return true end

	local a = newpokedex[poke]
	local b = getPlayerStorageValue(cid, a.storage)

	setPlayerStorageValue(cid, a.storage, b.." catch,")
end

function getCatchList(cid)

local ret = {}

for a = 1000, 1251 do
	local b = getPlayerStorageValue(cid, a)
	if b ~= 1 and string.find(b, "catch,") then
		table.insert(ret, oldpokedex[a-1000][1])
	end
end

return ret

end


function getStatistics(pokemon, tries, success)

local ret1 = 0
local ret2 = 0

	local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30))..""
	local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"
	local arq = io.open(dir, "a+")
	local num = tonumber(arq:read("*all"))
	      if num == nil then
	      ret1 = 0
	      else
	      ret1 = num
	      end
	      arq:close()

	local dir = "data/Pokemon Statistics/"..poke.." Catches.txt"
	local arq = io.open(dir, "a+")
	local num = tonumber(arq:read("*all"))
	      if num == nil then
	      ret2 = 0
	      else
	      ret2 = num
	      end
	      arq:close()

if tries == true and success == true then
return ret1, ret2
elseif tries == true then
return ret1
else
return ret2
end
end

function doIncreaseStatistics(pokemon, tries, success)

local poke = ""..string.upper(string.sub(pokemon, 1, 1))..""..string.lower(string.sub(pokemon, 2, 30))..""

	if tries == true then
		local dir = "data/Pokemon Statistics/"..poke.." Attempts.txt"

		local arq = io.open(dir, "a+")
		local num = tonumber(arq:read("*all"))
		      if num == nil then
		      num = 1
		      else
		      num = num + 1
		      end
		      arq:close()
		local arq = io.open(dir, "w")
		      arq:write(""..num.."")
		      arq:close()
	end

	if success == true then
		local dir = "data/Pokemon Statistics/"..poke.." Catches.txt"

		local arq = io.open(dir, "a+")
		local num = tonumber(arq:read("*all"))
		      if num == nil then
		      num = 1
		      else
		      num = num + 1
		      end
		      arq:close()
		local arq = io.open(dir, "w")
		      arq:write(""..num.."")
		      arq:close()
	end
end

function doUpdateGeneralStatistics()

	local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
	local base = "NUMBER  NAME        TRIES / CATCHES\n\n"
	local str = ""

for a = 1, 251 do
	if string.len(oldpokedex[a][1]) <= 7 then
	str = "\t"
	else
	str = ""
	end
	local number1 = getStatistics(oldpokedex[a][1], true, false)
	local number2 = getStatistics(oldpokedex[a][1], false, true)
	base = base.."["..threeNumbers(a).."]\t"..oldpokedex[a][1].."\t"..str..""..number1.." / "..number2.."\n"
end

	local arq = io.open(dir, "w")
	      arq:write(base)
 	      arq:close()
end

function getGeneralStatistics()

	local dir = "data/Pokemon Statistics/Pokemon Statistics.txt"
	local base = "Number/Name/Tries/Catches\n\n"
	local str = ""

for a = 1, 251 do
	local number1 = getStatistics(oldpokedex[a][1], true, false)
	local number2 = getStatistics(oldpokedex[a][1], false, true)
	base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].."  "..str..""..number1.." / "..number2.."\n"
end

return base
end

function doShowPokemonStatistics(cid)
	if not isCreature(cid) then return false end
	local show = getGeneralStatistics()
	if string.len(show) > 8192 then
		print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.")
		doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.")
	return false
	end
	doShowTextDialog(cid, math.random(2391, 2394), show)
end

 

Puts, é muito atributo!

Seria chato pra copiar todos esses atributos. Aqui uma solução alternativa: Quando você "coloca" um pokémon no daycare, a pokebola ficaria com o player, mas inutilizável, até eu pegar o pokémon de volta com o NPC. Qualquer um poderia pegar o pokémon com o NPC, desde que levasse a pokebola.

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Link para o post
Compartilhar em outros sites

Puts, é muito atributo!

Seria chato pra copiar todos esses atributos. Aqui uma solução alternativa: Quando você "coloca" um pokémon no daycare, a pokebola ficaria com o player, mas inutilizável, até eu pegar o pokémon de volta com o NPC. Qualquer um poderia pegar o pokémon com o NPC, desde que levasse a pokebola.

Pode ser, mas eu não sei fazer nada desse tipo, vc pode me ajudar?

@up

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

Pode ser, mas eu não sei fazer nada desse tipo, vc pode me ajudar?

@up

 

Claro! Vou precisar do seu script de go/back e do script da nurse joy.

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Link para o post
Compartilhar em outros sites

Claro! Vou precisar do seu script de go/back e do script da nurse joy.

Arquivo encontrado em: Server\data\actions\scripts

Goback.lua

local EFFECTS = {
	--[OutfitID] = {Effect}
	["Magmar"] = 35,   
	["Jynx"] = 17,          --alterado v2.5
	["Shiny Jynx"] = 17,  
    ["Piloswine"] = 205,  --alterado v2.8
    ["Swinub"] = 205,  
}

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

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

--alterado v2.6 sistema de firstpoke retirado
if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
return true
end
-------------------------------------------------------
ballName = getItemAttribute(item.uid, "poke")
                                               
   btype = getPokeballType(item.itemid)
   usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
	if not effect then
		effect = 21
	end
	
unLock(item.uid) --alterado v2.8
----------------------------------------------------------
if item.itemid == usando then                           

	if getPlayerStorageValue(cid, 990) == 1 then -- GYM
		doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")
	return true
	end
	
	---------------------------------------------------------------------------------------
	if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v2.6
       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, "You can't do that while is controling a mind")
       return true     --alterado v2.5
    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, "This pokemon is fainted.")
		    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) and not isGhostPokemon(z) 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, "You must put your pokeball in the correct place!")
	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, "This pokemon is fainted.")
		    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 bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
local low = {}
local lw = 1
for e, f in pairs(pokeballs) do
    for times = 1, 3 do
        local items = getItemsInContainerById(bp.uid, pokeballs[e].all[times]) 
        if #items >= 1 then                                                                 --alterado v2.6
           for _, uid in pairs(items) do
               local nome1 = getItemAttribute(uid, "poke")
               if not isInArray(lowPokes, pokemon) and nome1 == pokemon then
                  return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
               elseif isInArray(lowPokes, pokemon) then
                  if nome1 == pokemon then
                     table.insert(low, lw, nome1)
                     lw = lw +1
                  end
               end
           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 boosts = getItemAttribute(item.uid, "boost") or 0

	if getPlayerLevel(cid) + pokemonMaxLevelAbovePlayer < getItemAttribute(item.uid, "level") + boosts then
	doPlayerSendCancel(cid, "Your pokemon's level is much higher than yours, you can't use him.")
	return true
	end

    --------------------------------------------------------------------------------------
	shinysClan = {
	["Shiny Fearow"] = {4, "Wingeon"},
	["Shiny Flareon"] = {1, "Volcanic"},
	["Shiny Vaporeon"] = {2, "Seavel"}, 
	["Shiny Jolteon"] = {9, "Raibolt"},
	["Shiny Hypno"] = {7, "Psycraft"},          
	["Shiny Golem"] = {3, "Orebound"},
	["Shiny Vileplume"] = {8, "Naturia"},
	["Shiny Nidoking"] = {5, "Malefic"},
	["Shiny Hitmontop"] = {6, "Gardestrike"},   --alterado v2.4
	}
	
	if shinysClan[pokemon] and (getPlayerGroupId(cid) < 3 or getPlayerGroupId(cid) > 6) then  --alterado v2.8 \/
	   if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
	      doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
	      return true   
       elseif getPlayerClanRank(cid) ~= 5 then
          doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
	      return true
       end
    end
    --------------------------------------------------------------------------------------
    
	doSummonMonster(cid, pokemon)

	local pk = getCreatureSummons(cid)[1]
	if not isCreature(pk) then return true end
	------------------------passiva hitmonchan------------------------------
	if isSummon(pk) then                                                  --alterado v2.8 \/
       if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
          if not getItemAttribute(item.uid, "hands") then
             doSetItemAttribute(item.uid, "hands", 0)
          end
          local hands = getItemAttribute(item.uid, "hands")
          doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
       end
    end
	-------------------------------------------------------------------------
    ---------movement magmar, jynx-------------
    if EFFECTS[getCreatureName(pk)] then             
       markPosEff(pk, getThingPos(pk))
       sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) --alterado v2.5
    end
    --------------------------------------------------------------------------      

	if getCreatureName(pk) == "Ditto" then

		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, "Ditto")
		end
	end

	if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

	doCreatureSetLookDir(pk, 2)

	adjustStatus(pk, item.uid, true, false, true)
	doAddPokemonInOwnList(cid, pokemon)

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

	local pokename = getPokeName(pk) --alterado v2.7 

	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') --alterado v2.7
    end

else

    doPlayerSendCancel(cid, "This pokemon is fainted.")

end

	if useKpdoDlls then
		doUpdateMoves(cid)
	end
return true
end 

 

Arquivo encontrado em: Server\data\npc\scripts

Heal.lua

local pokeballs = {
[1] = {effect = 188, on = 11826, use = 11827, off = 11828, all = {11826, 11827, 11828}},
[2] = {effect = 191, on = 11829, use = 11830, off = 11831, all = {11829, 11830, 11831}},
[3] = {effect = 190, on = 11835, use = 11836, off = 11837, all = {11835, 11836, 11837}},
[4] = {effect = 189, on = 11832, use = 11833, off = 11834, all = {11832, 11833, 11834}},
[5] = {effect = 188, on = 11737, use = 11738, off = 11739, all = {11737, 11738, 11739}},
[6] = {effect = 189, on = 11740, use = 11741, off = 11742, all = {11740, 11741, 11742}},
[7] = {effect = 190, on = 11743, use = 11744, off = 11745, all = {11743, 11744, 11745}},
[8] = {effect = 191, on = 11746, use = 11747, off = 11748, all = {11746, 11747, 11748}},
}

--alterado v1.7 \/\/
local posis = {   --[storage da city] = {pos da nurse na city},
[897530] = {x = 1053, y = 1046, z = 7},   --saffron
[897531] = {x = 1060, y = 900, z = 7},    --cerulean
[897532] = {x = 1204, y = 1042, z = 7},    --lavender
[897533] = {x = 1213, y = 1321, z = 7},    --fuchsia
[897534] = {x = 862, y = 1094, z = 6},    --celadon
[897535] = {x = 705, y = 1086, z = 7},    --viridian
[897536] = {x = 1075, y = 1233, z = 7},    --vermilion
[897537] = {x = 723, y = 847, z = 7},    --pewter
[897538] = {x = 850, y = 1396, z = 7},    --cinnabar
[897539] = {x = 1429, y = 1597, z = 6},    --snow
[897540] = {x = 542, y = 675, z = 7},    --golden
}

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end

function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
focus = 0
talk_start = 0
end
end

function onCreatureTurn(creature)
end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

for a, b in pairs(gobackmsgs) do
	local gm = string.gsub(b.go, "doka!", "")
	local bm = string.gsub(b.back, "doka!", "")
if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then
return true
end
end

if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then

 	if exhaustion.get(cid, 9211) then
	selfSay('Please wait a few moment before asking me to heal your pokemons again!')
	return true
   	end

	if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then
		selfSay("Please, get inside the pokémon center to heal your pokemons!")
	return true
	end
	
	if getPlayerStorageValue(cid, 52480) >= 1 then
	   selfSay("You can't do that while in a Duel!")   --alterado v1.6.1
    return true 
    end
    
    for e, f in pairs(posis) do
        local pos = getThingPos(getNpcCid())
        if pos.x == f.x and pos.y == f.y and pos.z == f.z then
           if getPlayerStorageValue(cid, e) <= -1 then           --alterado v1.7
              setPlayerStorageValue(cid, e, 1)
           end
        end
    end 

	exhaustion.set(cid, 9211, 5)

	doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
	doCureStatus(cid, "all", true)
	doSendMagicEffect(getThingPos(cid), 132)

	local mypb = getPlayerSlotItem(cid, 8)

	if #getCreatureSummons(cid) >= 1 then

		if not nurseHealsPokemonOut then
			selfSay("Please, return your pokemon to his ball!")
		return true
		end

		local s = getCreatureSummons(cid)[1]
		doCreatureAddHealth(s, getCreatureMaxHealth(s))
		doSendMagicEffect(getThingPos(s), 13)
		doCureStatus(s, "all", false)
		if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then
			setPlayerStorageValue(s, 1008, baseNurseryHappiness)
		end
		if getPlayerStorageValue(s, 1009) > baseNurseryHunger then
			setPlayerStorageValue(s, 1009, baseNurseryHunger)
		end
	else
		if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then  --alterado v1.3
		doItemSetAttribute(mypb.uid, "hp", 1)
			if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then
				doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger)
			end
			for c = 1, 15 do
				local str = "move"..c
				setCD(mypb.uid, str, 0)
			end
			if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then
				doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness)
			end
			if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
				for a, b in pairs (pokeballs) do
					if isInArray(b.all, mypb.itemid) then
					doTransformItem(mypb.uid, b.on)
					end
				end
			end
		end
	end

	local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)

for balls = 1, 8 do        --editar a qntdade de balls da tabela ali decima...
	for times = 1, 3 do
		local items = getItemsInContainerById(bp.uid, pokeballs[balls].all[times]) 
			if #items >= 1 then
				for _, uid in pairs(items) do
				doItemSetAttribute(uid, "hp", 1)
				doTransformItem(uid, pokeballs[balls].on)
				for c = 1, 15 do
				    local str = "move"..c
				    setCD(uid, str, 0)   --alterado v1.3
			    end
					if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then
						doItemSetAttribute(uid, "hunger", baseNurseryHunger)
					end
					if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then
						doItemSetAttribute(uid, "happy", baseNurseryHappiness)
					end
				end
			end
	end
end


selfSay('There you go! You and your pokemons are healthy again.')

if useKpdoDlls then  --alterado v1.7
   doUpdateMoves(cid)
end
        
end
end 

 

 

MuUuUuUuuUiIiIiIIiItTTtTtTTtTOoOOoOo Obrigado... :3

@up

@up

@up

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo