Ir para conteúdo
  • 0

Bug Script Fishing Pokemon


deglorio

Pergunta

Estou usando a versão 8.54 de um server de Pokemon.

E o fishing ta qse 100%, o problema é que consigo pescar usando fly e usando surf, e ai os monstros pescados ficam todos sobre a agua.

Um amigo me falou que adicionando esa função abaixo resolveria, mais como ficaria o script com a função adicionada?

 

Vai em actions/scripts/tools/fishing.lua

 

Adicione Isso.

 

if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 9393) >= 1 then
doPlayerSendCancel(cid, "Você não pode pescar no surf ou fly.")
return true

end

 

Meu script é esse:

function onUse(cid, item, fromPos, itemEx, toPos)

d0 =
{
[0] = {pokemon = 'Magikarp'},
}

d20 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
}

d40 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
}

d60 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
}

d80 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
[7] = {pokemon = 'Starmie'},
[8] = {pokemon = 'Kingler'},
[9] = {pokemon = 'Seadra'},
}

d100 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
[7] = {pokemon = 'Starmie'},
[8] = {pokemon = 'Kingler'},
[9] = {pokemon = 'Seadra'},
[10] = {pokemon = 'Staryu'},
[11] = {pokemon = 'Gyarados'},

}
local config = {
waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825},
}

local skill = getPlayerSkillLevel(cid, 6)
local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

if(isInArray(config.waters, itemEx.itemid)) then
doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)
doPlayerAddSkillTry(cid, 6, 1)

if skill >= 100 then
local random = math.random(0, 38)
if random <= 11 then
doSummonCreature(d100[random].pokemon, playerpos)
return true
end
else
if skill >= 80 then
local random = math.random(0, 35)
if random <= 9 then
doSummonCreature(d80[random].pokemon, playerpos)
return true
end
else
if skill >= 60 then
local random = math.random(0, 28)
if random <= 6 then
doSummonCreature(d60[random].pokemon, playerpos)
return true
end
else
if skill >= 40 then
local random = math.random(0, 26)
if random <= 5 then
doSummonCreature(d40[random].pokemon, playerpos)
return true
end
else
if skill >= 20 then
local random = math.random(0, 24)
if random <= 4 then
doSummonCreature(d20[random].pokemon, playerpos)
return true
end
else
if skill >= 0 and skill < 20 then
local random = math.random(0, 10)
if random <= 0 then
doSummonCreature(d0[random].pokemon, playerpos)
return true
end
return true
end
return true
end


return true
end
end
end
end
end
end

 

 

Alguem Poderia me passar o script ja adicionado?, pq ja tentei de varias as formas.

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

Tente assim:

 

function onUse(cid, item, fromPos, itemEx, toPos)

d0 =
{
[0] = {pokemon = 'Magikarp'},
}

d20 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
}

d40 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
}

d60 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
}

d80 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
[7] = {pokemon = 'Starmie'},
[8] = {pokemon = 'Kingler'},
[9] = {pokemon = 'Seadra'},
}

d100 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
[7] = {pokemon = 'Starmie'},
[8] = {pokemon = 'Kingler'},
[9] = {pokemon = 'Seadra'},
[10] = {pokemon = 'Staryu'},
[11] = {pokemon = 'Gyarados'},

}
local config = {
waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825},
}

local skill = getPlayerSkillLevel(cid, 6)
local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

if(isInArray(config.waters, itemEx.itemid)) then
	if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 9393) >= 1 then
		doPlayerSendCancel(cid, "Você não pode pescar no surf ou fly.")
		return true
	end	
	doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)
	doPlayerAddSkillTry(cid, 6, 1)

	if skill >= 100 then
		local random = math.random(0, 38)
		if random <= 11 then
			doSummonCreature(d100[random].pokemon, playerpos)
		return true
		end
	else
		if skill >= 80 then
		local random = math.random(0, 35)
			if random <= 9 then
				doSummonCreature(d80[random].pokemon, playerpos)
			return true
			end
		else
			if skill >= 60 then
			local random = math.random(0, 28)
				if random <= 6 then
					doSummonCreature(d60[random].pokemon, playerpos)
				return true
				end
			else
				if skill >= 40 then
				local random = math.random(0, 26)
					if random <= 5 then
						doSummonCreature(d40[random].pokemon, playerpos)
					return true
					end
				else
					if skill >= 20 then
					local random = math.random(0, 24)
						if random <= 4 then
							doSummonCreature(d20[random].pokemon, playerpos)
						return true
						end
					else
						if skill >= 0 and skill < 20 then
						local random = math.random(0, 10)
							if random <= 0 then
								doSummonCreature(d0[random].pokemon, playerpos)
							return true
							end
					return true
					end
				return true
				end
			return true
			end
		return true
		end
	end	
else
	doPlayerSendCancel(cid, "You cannot fish here.")
end		
return true
end

 

flw

Link para o comentário
Compartilhar em outros sites

  • 0

Tente:

 

function onUse(cid, item, fromPos, itemEx, toPos)

d0 =
{
[0] = {pokemon = 'Magikarp'},
}

d20 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
}

d40 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
}

d60 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
}

d80 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
[7] = {pokemon = 'Starmie'},
[8] = {pokemon = 'Kingler'},
[9] = {pokemon = 'Seadra'},
}

d100 =
{
[0] = {pokemon = 'Magikarp'},
[1] = {pokemon = 'Horsea'},
[2] = {pokemon = 'Poliwag'},
[3] = {pokemon = 'Goldeen'},
[4] = {pokemon = 'Krabby'},
[5] = {pokemon = 'Tentacool'},
[6] = {pokemon = 'Seaking'},
[7] = {pokemon = 'Starmie'},
[8] = {pokemon = 'Kingler'},
[9] = {pokemon = 'Seadra'},
[10] = {pokemon = 'Staryu'},
[11] = {pokemon = 'Gyarados'},

}
local config = {
waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825},
}

local skill = getPlayerSkillLevel(cid, 6)
local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

       if not (isInArray(config.waters, itemEx.itemid)) then
		return doPlayerSendCancel(cid, "You cannot fish here.")
	end

       if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 9393) >= 1 then
          return doPlayerSendCancel(cid, "Você não pode pescar no surf ou fly.")
       end 

               doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)
               doPlayerAddSkillTry(cid, 6, 1)

               if skill >= 100 then
                       local random = math.random(0, 38)
                       if random <= 11 then
                               doSummonCreature(d100[random].pokemon, playerpos)
                       return true
                       end
               elseif skill >= 80 then
                       local random = math.random(0, 35)
                       if random <= 9 then
                           doSummonCreature(d80[random].pokemon, playerpos)
                       return true
                       end
			elseif skill >= 60 then
                       local random = math.random(0, 28)
                       if random <= 6 then
                           doSummonCreature(d60[random].pokemon, playerpos)
                       return true
                        end
               elseif skill >= 40 then
                        local random = math.random(0, 26)
                        if random <= 5 then
                            doSummonCreature(d40[random].pokemon, playerpos)
                        return true
                        end
			elseif skill >= 20 then
                        local random = math.random(0, 24)
                         if random <= 4 then
                             doSummonCreature(d20[random].pokemon, playerpos)
                         return true
                         end
			elseif skill >= 0 and skill < 20 then
                         local random = math.random(0, 10)
                          if random <= 0 then
                              doSummonCreature(d0[random].pokemon, playerpos)
                          return true
                          end
			end
return true
end

 

flw

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...