local condition = createConditionObject(CONDITION_INFIGHT) setConditionParam(condition, CONDITION_PARAM_TICKS, 60000) function onUse(cid, item, fromPos, itemEx, toPos) if getTilePzInfo(getCreaturePosition(cid)) == true then return doPlayerSendCancel(cid, 'You cannot fish in protection zone') end doA
local condition = createConditionObject(CONDITION_INFIGHT) setConditionParam(condition, CONDITION_PARAM_TICKS, 60000) function onUse(cid, item, fromPos, itemEx, toPos) doAddCondition(cid, condition) d0 = { [0] = {pokemon = 'Magikarp'}, } d20 = { [0] = {pokemon = 'Magikarp'}, [1] = {pokemon = 'Horsea
info
Grupo: Campones
Registrado: 28/05/10
Posts: 51
Reputação: +6
Char no Tibia: Parei de jogar ;D
Gente eu preciso de algo que impeça que o
PLAYER "logue" quando estiver pescando...
Script feito pelo DeathAngels
SCRIPT
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 = 'Starmie'},
[11] = {pokemon = 'Kingler'},
[12] = {pokemon = 'Seadra'},
}
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}
function Effect()
doSendMagicEffect(toPos, 214)
end
function Say()
if skill >= 0 and skill < 20 then
local random = math.random(0, 0)
doSendMagicEffect(getThingPos(cid), 173)
doSendMagicEffect(toPos, 53)
doSummonCreature(d0[random].pokemon, playerpos)
setPlayerStorageValue(cid, 171833, -1)
doPlayerAddSkillTry(cid, 6, 1)
elseif skill >= 20 and skill < 40 then
local random = math.random(0, 4)
doSendMagicEffect(getThingPos(cid), 173)
doSendMagicEffect(toPos, 53)
doSummonCreature(d20[random].pokemon, playerpos)
setPlayerStorageValue(cid, 171833, -1)
doPlayerAddSkillTry(cid, 6, 1)
elseif skill >= 40 and skill < 60 then
local random = math.random(0, 5)
doSendMagicEffect(getThingPos(cid), 173)
doSendMagicEffect(toPos, 53)
doSummonCreature(d40[random].pokemon, playerpos)
setPlayerStorageValue(cid, 171833, -1)
doPlayerAddSkillTry(cid, 6, 1)
elseif skill >= 60 and skill < 80 then
local random = math.random(0, 6)
doSendMagicEffect(getThingPos(cid), 173)
doSendMagicEffect(toPos, 53)
doSummonCreature(d60[random].pokemon, playerpos)
setPlayerStorageValue(cid, 171833, -1)
doPlayerAddSkillTry(cid, 6, 1)
elseif skill >= 80 and skill < 100 then
local random = math.random(0, 9)
doSendMagicEffect(getThingPos(cid), 173)
doSendMagicEffect(toPos, 53)
doSummonCreature(d80[random].pokemon, playerpos)
setPlayerStorageValue(cid, 171833, -1)
doPlayerAddSkillTry(cid, 6, 1)
elseif skill >= 100 then
local random = math.random(0, 12)
doSendMagicEffect(getThingPos(cid), 173)
doSendMagicEffect(toPos, 53)
doSummonCreature(d100[random].pokemon, playerpos)
setPlayerStorageValue(cid, 171833, -1)
doPlayerAddSkillTry(cid, 6, 1)
end
end
if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) >= 1 then
doPlayerSendTextMessage(cid, 27, "You can't fish yet.")
return false
end
if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) <= 0 then
setPlayerStorageValue(cid, 171833, 1)
doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)
doSendMagicEffect(toPos, 214)
for i = 1,3 do
addEvent(Effect,750*i,cid)
end
addEvent(Say,3000)
return true
end
return true
end
Quem arrumar eu dou REP+
Editado Novembro 1 por Brunex