Exclusivo para XTibia
favor não postar em outro forum
Já ví varios scripts de Fishing Rod
todos são ENORMES ou INCOMPLETOS
este aqui é pequeno e funciona quase igual o Tibia Global
(não consegui por exausted - HELP)
data\actions\actions.xml
-- Fishing Rod (By COnde Sapo) function onUse(cid, item, frompos, item2, topos) if exhaust(cid,777,1) == TRUE then return 0 end if (item2.itemid >= 490 and item2.itemid <= 492) or (item2.itemid >= 618 and item2.itemid <= 629) or (item2.itemid >= 4608 and item2.itemid <= 4625) or (item2.itemid >= 4820 and item2.itemid <= 4825) then doSendMagicEffect(topos, 1) skill_level = getPlayerSkill(cid,6) random_number = math.random(1,(100+skill_level/10)) if random_number<=skill_level then if doPlayerRemoveItem(cid,3976,1) == TRUE then doPlayerAddItem(cid,2667,1) doPlayerAddSkillTry(cid,6,3) end end doPlayerAddSkillTry(cid,6,1) elseif item2.itemid == 7236 then skill_level = getPlayerSkill(cid,6) random_number = math.random(1,(100+skill_level/10)) if random_number<=skill_level then if doPlayerRemoveItem(cid,3976,1) == TRUE then random_fish = math.random(1,10) if random_fish == 1 then doPlayerAddItem(cid,2669,1) elseif random_fish == 2 then doPlayerAddItem(cid,7158,1) elseif random_fish == 3 then doPlayerAddItem(cid,7159,1) else doPlayerAddItem(cid,2667,1) end doTransformItem(item2.uid, 7237) doDecayItem(item2.uid) doPlayerAddSkillTry(cid,6,3) end end doPlayerAddSkillTry(cid,6,1) else return 0 end return 1 end
Comentários :
Funciona em qualquer água com movimento (= tibia)
Precisa minhoca (= tibia)
Se não vem peixe sobe 1 ponto no fishing (= tibia)
Se vem o peixe sobe 3 pontos no fishing (= tibia)
A fórmula é a mesma que todos usaram (= tibia)
Buraco no gelo vem o peixe novo (= tibia)
(O script pode ser usado nas versões antigas que não tem gelo)
=============== Editado para EXHAUST ========================
function exhaust(cid, storevalue, exhausttime) -- Exhaustion function by Alreth, v1.1 2006-06-24 01:31 -- Returns 1 if not exhausted and 0 if exhausted newExhaust = os.time() oldExhaust = getPlayerStorageValue(cid, storevalue) if (oldExhaust == nil or oldExhaust < 0) then oldExhaust = 0 end if (exhausttime == nil or exhausttime < 0) then exhausttime = 1 end diffTime = os.difftime(newExhaust, oldExhaust) if (diffTime >= exhausttime or diffTime < 0) then setPlayerStorageValue(cid, storevalue, newExhaust) return 1 else return 0 end end
Esse script já vem no data\actions\LIB do EVOLUTIONS
ou usem assim :
e ponha o getPlayerExhaust identico a esse que fizeram num tutorialif getPlayerExhaust(cid,777,1) == 1 then
tenham certeza de não usar um número que coincida com alguma UID de quest
Divirtam-se pescando.