Action Fishing up Monsters

soul4soul

Active Member
Joined
Aug 13, 2007
Messages
1,787
Best answers
0
Reaction score
43
Location
USA
title pretty much says it all. im not sure if this works but someone might like it or be able to use it. pretty easy to edit to your needs.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition) 
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
}
 
local monsters = {"Quara Hydromancer", "Quara Constrictor", "Quara Mantassin", "Quara Pincher", "Quara Predator", "Serpent Spawn", "Wyrm", "Sea Serpent", "Titan Goddess of Water"}
 
    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
        if getPlayerLevel(cid) >= 5000 and getPlayerSkillLevel(cid, SKILL_FISHING) >= 100 then
            randsummon = math.random(0,9)
        elseif getPlayerLevel(cid) >= 5000 then
            randsummon = math.random(0,8)
        elseif getPlayerLevel(cid) >= 3000 then
            randsummon = math.random(0,6)
        elseif getPlayerLevel(cid) >= 1500 then
            randsummon = math.random(0,4)
        elseif getPlayerLevel(cid) >= 500 then
            randsummon = math.random(0,2)
        else
            doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
        end
 
        if randsummon == 0 then
            doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
        else
            doSummonMonster(monsters[randsummon], getCreaturePosition(cid))
            doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
        end
    end
 
    doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
    return true
end
 
Last edited:

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,717
Best answers
8
Reaction score
285
and easy to edit but it did not understand what you want to say with this script?
is what the script? Action, Movemts?
which XML
 

HeberPcL

[PowerOT.com.br]
Joined
Aug 21, 2007
Messages
1,280
Best answers
0
Reaction score
38
Location
Brazil
@Beon,
Action!

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
OP
soul4soul

soul4soul

Active Member
Joined
Aug 13, 2007
Messages
1,787
Best answers
0
Reaction score
43
Location
USA
and easy to edit but it did not understand what you want to say with this script?
is what the script? Action, Movemts?
which XML
like herberpcl said its an action script. when u use ur fishing rod on water(aka. fishing) u fish up monsters that attack you instead of fish.

@Beon,
Action!

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
thanks i missed it when i copied the script from my file

nice man rep++
thanks for the rep
 

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,717
Best answers
8
Reaction score
285
@Beon,
Action!

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
@HeberPcL
Dude I know, but he does not speak on the topic.:confused:

@Topic
My opinion is do not edit the topic I see Disapprove the scripter - do not see use in my otserv: P '.
Edit the topic and send me a mp:thumbup:
 

cbrm

Top Class brunet scripter
Staff member
Global Moderator
Joined
Jan 6, 2009
Messages
6,585
Best answers
3
Reaction score
852
Location
Caribbean Sea
lol funny one
can I fish a hydra? :D
 

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
I already seen this on goobers ot 1 year ago, but it's nice.
 
OP
soul4soul

soul4soul

Active Member
Joined
Aug 13, 2007
Messages
1,787
Best answers
0
Reaction score
43
Location
USA
lol funny one
can I fish a hydra? :D
ya just add it to the monster list, and remember if you add more monsters you will also need to increase the random number generator by one for each new monster you add to the list.


@JDB and Shawk
thanks =]
 

Phoenix1337

New Member
Joined
Jul 22, 2009
Messages
122
Best answers
0
Reaction score
0
Yea this doesn't even work. No errors in console. Just doesn't work. :(
 
OP
soul4soul

soul4soul

Active Member
Joined
Aug 13, 2007
Messages
1,787
Best answers
0
Reaction score
43
Location
USA
.....
 
Last edited:

Phoenix1337

New Member
Joined
Jul 22, 2009
Messages
122
Best answers
0
Reaction score
0
Hmm theres 2 functions in that 1 script? ;o
 
Last edited:

Narzonia

New Member
Joined
Dec 29, 2008
Messages
35
Best answers
0
Reaction score
2
Location
My House
when i open the server this send me: [Warning - Event::loadScript] Cannot load script (data/actions/scripts/tools/fishing.lua)
[30/12/2009 20:24:35] data/actions/scripts/tools/fishing.lua:41: 'end' expected (to close 'function' at line 1) near '<eof>'
 

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
880
Best answers
0
Reaction score
26
Location
Sweden
Doesn't work for 3.0.5 tfs or 8.54 version at all ;(
 

alican113

New Member
Joined
Jun 24, 2009
Messages
6
Best answers
0
Reaction score
0
what i must do on actions.xml ? xD im bad at scripts.
 
Top