Nie tylko o Tibii i OTS...
Plik fishing.lua w actions\scripts
-- By Miklosz function onUse(cid, item, frompos, item2, topos) -- 4608, 4609, 4610, 4611, 4612, 4613 fish -- 4614, 4615, 4616, 4617, 4618, 4619 no fish -- 4620, 4621, 4622, 4623, 4624, 4625 fish regeneration if getPlayerItemCount(cid, 3976) > 0 then if item2.itemid == 4608 then fishingskill = getPlayerSkill(cid,6) formula = fishingskill /200+0.85* math.random() if formula > 0.70 then doTransformItem(item2.uid,4620) doDecayItem(item2.uid) doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,2) doPlayerAddItem(cid,2667,1) doPlayerRemoveItem(cid, 3976, 1) else doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,1) end elseif item2.itemid == 4609 then fishingskill = getPlayerSkill(cid,6) formula = fishingskill /200+0.85* math.random() if formula > 0.70 then doTransformItem(item2.uid,4621) doDecayItem(item2.uid) doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,2) doPlayerAddItem(cid,2667,1) doPlayerRemoveItem(cid, 3976, 1) else doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,1) end elseif item2.itemid == 4610 then fishingskill = getPlayerSkill(cid,6) formula = fishingskill /200+0.85* math.random() if formula > 0.70 then doTransformItem(item2.uid,4622) doDecayItem(item2.uid) doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,2) doPlayerAddItem(cid,2667,1) doPlayerRemoveItem(cid, 3976, 1) else doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,1) end elseif item2.itemid == 4611 then fishingskill = getPlayerSkill(cid,6) formula = fishingskill /200+0.85* math.random() if formula > 0.70 then doTransformItem(item2.uid,2623) doDecayItem(item2.uid) doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,2) doPlayerAddItem(cid,2667,1) doPlayerRemoveItem(cid, 3976, 1) else doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,1) end elseif item2.itemid == 4612 then fishingskill = getPlayerSkill(cid,6) formula = fishingskill /200+0.85* math.random() if formula > 0.70 then doTransformItem(item2.uid,4624) doDecayItem(item2.uid) doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,2) doPlayerAddItem(cid,2667,1) doPlayerRemoveItem(cid, 3976, 1) else doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,1) end elseif item2.itemid == 4613 then fishingskill = getPlayerSkill(cid,6) formula = fishingskill /200+0.85* math.random() if formula > 0.70 then doTransformItem(item2.uid,4625) doDecayItem(item2.uid) doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,2) doPlayerAddItem(cid,2667,1) doPlayerRemoveItem(cid, 3976, 1) else doSendMagicEffect(topos,1) doPlayerAddSkillTry(cid,6,1) end end if item2.itemid == 4614 or item2.itemid == 4620 then doSendMagicEffect(topos,1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'There are not any fishes.') end if item2.itemid == 4615 or item2.itemid == 4621 then doSendMagicEffect(topos,1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'There are not any fishes.') end if item2.itemid == 4616 or item2.itemid == 4622 then doSendMagicEffect(topos,1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'There are not any fishes.') end if item2.itemid == 4617 or item2.itemid == 4623 then doSendMagicEffect(topos,1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'There are not any fishes.') end if item2.itemid == 4618 or item2.itemid == 4624 then doSendMagicEffect(topos,1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'There are not any fishes.') end if item2.itemid == 4619 or item2.itemid == 4625 then doSendMagicEffect(topos,1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'There are not any fishes.') end else doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You need some worms to do this.') end return 1 end
W pliku actions linijkę odnośnie wędki ew. zmieniamy na:
<action itemid="2580" script="fishing.lua" allowfaruse="1" />
Oraz w items.xml zmieniamy linijki odnośnie itemid 4608-4625 na:
<item id="4608" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="description" value="You see the silvery movement of fish."/> </item> <item id="4609" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="description" value="You see the silvery movement of fish."/> </item> <item id="4610" name="shallow water"> <attribute key="decayTo" value="4608"/> <attribute key="duration" value="1200"/> <attribute key="description" value="You see the silvery movement of fish."/> </item> <item id="4611" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="description" value="You see the silvery movement of fish."/> </item> <item id="4612" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="description" value="You see the silvery movement of fish."/> </item> <item id="4613" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="description" value="You see the silvery movement of fish."/> </item> <item id="4614" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> </item> <item id="4615" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> </item> <item id="4616" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> </item> <item id="4617" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> </item> <item id="4618" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> </item> <item id="4619" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> </item> <item id="4620" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="decayTo" value="4608"/> <attribute key="duration" value="120"/> </item> <item id="4621" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="decayTo" value="4609"/> <attribute key="duration" value="120"/> </item> <item id="4622" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="decayTo" value="4610"/> <attribute key="duration" value="120"/> </item> <item id="4623" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="decayTo" value="4611"/> <attribute key="duration" value="120"/> </item> <item id="4624" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="decayTo" value="4612"/> <attribute key="duration" value="120"/> </item> <item id="4625" name="shallow water"> <attribute key="type" value="trashholder"/> <attribute key="effect" value="bluebubble"/> <attribute key="decayTo" value="4613"/> <attribute key="duration" value="120"/> </item>
Działanie skryptu:
Łowienie ryb działa tak samo jak w rl Tibii, jednak, gdy nie mamy robaków wyświetli się komunikat o tym, i jak na jakimś polu skończą się rybki to również wyświetli się komunikat. Skrypt oddziałowywuje na wodę o id 4608-4625. Z czego ID=4608-4613 - są ryby, ID=4614-4619 - ryb nie ma i nigdy nie będzie, ID=4620-4625 ryby się respią (czas respu 2min).
Skrypt został w całości zrobiony przeze mnie, a opierałem się na starym skrypcie fishing.lua, zrobionym przez GriZzm0.
Offline
wow ale zes przyszalal przeciez jak sciagasz otsa byle jakiego to to zawsze jest !!!
Offline
Emm no nie wiem... na devlandzie nie znikają nam robaki gdy łowimy, a ten skrypt odnosi się do 15id wody (z czego 5 to z rybami, 5 bez, a 5 podczas regeneracji), no i jak napisałem wcześniej wyświatla komunikaty, gdy nie mamy robaków/skończą się ryby w danym segmencie wody. Tak swoją drogą to lepiej chyba od czegoś zacząć i samemu wszystko zrobić, a nie pościągać wszystkie skrypty, a potem się podniecać jakiego to się ma zarąbistego otsa...
Offline
Bardzo to sie nie wysililes tsy ale plus za checi
Offline