Ir para conteúdo

Pegando Loot De Water Elemental ( Fishing Rod )


Lucaswc15

Posts Recomendados

Ae galerinha, vou postar aqui um script da fishing rod que se voce usar no corpo do Water Elemental você recebe o loot, igual no tibia global.

 

Va em data/actions/actions.xml coloque isso:

 


<action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>


Agora vá em data/actions/scripts/tools/ e crie um arquivo .lua chamado fishing e coloque isso dentro:

 

 

local config = {
  waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
  rateSkill = getConfigValue("rateSkill"),
  allowFromPz = false,
  useWorms = true
}

--config water elemental
local find_anything = 30 -- chance para achar algo
local difficulty = 15 -- 1-100 para dificuldade menor mais facil

local items = {
[10499] = {2226, 2152, 2376, 2509, 2168, 7588, 7589, 2152, 2146, 2167, 2169, 9811, 9808, 5929, 10220},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)

   if items[itemEx.itemid] ~= nil then
	 if math.random(100) <= find_anything then
	   doTransformItem(itemEx.uid, 10500)
	 doDecayItem(itemEx.uid)
	 doSendMagicEffect(toPosition, 53)
  else
	 local geti = items[itemEx.itemid]
	 local newId
	 for i = 1, #items[itemEx.itemid] do
		local x = math.random(100)
						   if (x < difficulty) then
							   newId = geti[i]
							 break
				 elseif (i >= #items[itemEx.itemid]) then
							   newId = geti[#items[itemEx.itemid]]
						   end  
			end

	   doTransformItem(itemEx.uid, 10500)
	 doPlayerAddItem(cid, newId, 1)
	 doPlayerAddItem(cid, 2148, 28)
	 doSendMagicEffect(toPosition, 53)

  end
  end

  if(not isInArray(config.waterIds, itemEx.itemid)) then
  return false
  end

  if((config.allowFromPz or not getTileInfo(getCreaturePosition(cid)).protection) and itemEx.itemid ~= 493 and
  math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) < getPlayerSkill(cid, SKILL_FISHING) and
  (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1)))) then
  doPlayerAddItem(cid, ITEM_FISH, 1)
  doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
  end

  doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
  return true
end

 

 

Se voce nao tem o monsters Water Elemental configurado certo aqui vai ele:

 

<?xml version="1.0" encoding="UTF-8"?>
 <monster name="Water Elemental" nameDescription="a Water Elemental" race="undead" experience="650" species="ice" speed="280" manacost="0">
<health now="650" max="650"/>
<look type="286" corpse="10499"/>
<targetchange interval="20000" chance="15"/>
<strategy attack="100" defense="0"/>
<flags>
  <flag summonable="0"/>
  <flag attackable="1"/>
  <flag hostile="1"/>
  <flag illusionable="0"/>
  <flag convinceable="0"/>
  <flag pushable="0"/>
  <flag canpushitems="1"/>
  <flag staticattack="85"/>
  <flag lightlevel="0"/>
  <flag lightcolor="0"/>
  <flag targetdistance="1"/>
  <flag runonhealth="1"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="75" attack="65"/>
<attack name="drown" interval="2000" chance="20" range="7" radius="2" target="1" min="-50" max="-250">
 <attribute key="areaEffect" value="bluebubble"/>
</attack>
<attack name="physical" interval="1000" chance="10" range="6" target="1" min="0" max="-209">
<attribute key="shootEffect" value="snowball"/>
</attack>
<attack name="ice" interval="2000" chance="18" range="4" target="1" min="0" max="-103">
<attribute key="shootEffect" value="smallice"/>
</attack>
<attack name="physical" interval="1000" chance="9" range="7" radius="2" target="1" min="0" max="-100">
<attribute key="shootEffect" value="smallice"/>
<attribute key="areaEffect" value="giantice"/>
</attack>
</attacks>
<defenses armor="30" defense="30">
<defense name="healing" interval="2000" chance="15" min="90" max="150">
  <attribute key="areaEffect" value="blueshimmer"/>
</defense>
 </defenses>
<elements>
<element physicalPercent="70"/>
<element energyPercent="-25"/>
<element holyPercent="20"/>
<element deathPercent="30"/>
</elements>
 <immunities>
<immunity ice="1"/>
<immunity fire="1"/>
<immunity poison="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
 </immunities>
 </monster>

Editado por Lucaswc15
Link para o comentário
Compartilhar em outros sites

O script funciona da seguinte maneira:

O player mata o Water Elemental e usa uma fishing rod no corpo do Water Elemental, assim ele consegue o loot do water elemental.

Como se estivesse pescando, só que em vez de usar na agua a fishing rod, voce usa no corpo do Water Elemental.

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...