Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fishing Pole
Author Message
Solpadeine
Apprentice
*

Posts: 1
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jul 2021
Reputation: 0



Post: #1
Fishing Pole
Hello guys! Why does this code not work and NPCs are not pull out in the game?

Code:
[0dbf]
//Fishing Pole
BUYVALUE=720-900
SELLVALUE=3-5
MORE={019 028}
//MATERIALS=
WEIGHT=2

ONTRIGGER=STEP
remove

ONTRIGGER=DCLICK
IF (<SRC.WEIGHT>) > (<SRC.STR>*40)
    SRC.SYSMESSAGE You have too many items in your backpack!
    RETURN 1
ENDIF
if (<src.flags>&0800000) || (<src.flags>&08)
    src.message You can't use this in hide!
    return 1
endif

ONTRIGGER=PICKUP_GROUND
if (<src.skilltotal>>20000) && (<attr>&04)
    attr=0
endif

ONTRIGGER=TARGON_ITEM
return 1

ONTRIGGER=TARGON_GROUND
IF (<SRC.ACTION>!=-1)
  SRC.SYSMESSAGE You must wait to perform another action
  RETURN 1
ENDIF
IF <MORE> < 2
    SRC.SYSMESSAGE=Your <Name> may have been destroer!
    REMOVE
    RETURN 1
ENDIF
IF (<SRC.FISHING> > 999)
    IF (RAND(30)=1) //20
        MORE=<MORE>+(-1)
        SRC.SYSMESSAGE=Your <Name> may have been damaged!
    ENDIF
ELSE
    IF (RAND(20)=1)
        MORE=<MORE>+(-1)
        SRC.SYSMESSAGE=Your <Name> may have been damaged!
    ENDIF
ENDIF
timer=2

ONTRIGGER=timer
IF (<CONT.ACTION>=18)
    IF !((<CONT.REGION.FLAGS>&02000)||(<CONT.REGION.FLAGS>&04000))
        IF (<CONT.REGION.FLAGS>&040)
                IF (<CONT.FISHING> > 115.0)
                (RAND(40)=4)
                    CONT.NEWNPC={0096 1 005f 1 04123 1 041b3 1 04227 1}
                ELSEIF (<CONT.FISHING> > 115.0)
                (RAND(30)=6)
                    CONT.NEWNPC={04422 1 04423 1}
                ELSEIF (<CONT.FISHING> > 115.0)
                IF (RAND(20)=4)
                    CONT.NEWNPC=04418
                ENDIF
            ENDIF
        ENDIF
    ENDIF
ENDIF
timer=-1
RETURN 1

ONTRIGGER=SPELL
RETURN 1

ONTRIGGER=PICKUP_PACK
if (<src.skilltotal>>20000) && (<attr>&04)
    attr=0
endif
if <attr>&01000
    attr=<attr>&~01000
    timer=-1
endif
src.sysmessage Остаток прочности: <valstr<MORE>> единиц.

ONTRIGGER=EQUIP
if (<src.skilltotal>>20000) && (<attr>&04)
    attr=0
endif
if (<src.flags>&0800000) || (<src.flags>&08)
    src.message You can't use this in hide!
    return 1
endif
IF (<MORE>=0)
    MORE={30 40}
ENDIF
if rand(8)=1
    MORE=<MORE>+(-1)
    SRC.SYSMESSAGE=Your <Name> may have been damaged!
endif
if (<src.findlayer(1).serial>)
    src.findlayer(1).unequip
endif

CATEGORY=Items by Professions
SUBSECTION=Fisherman
DESCRIPTION=Fishing Pole

Thank you for your help!
(This post was last modified: 07-06-2021 11:55 PM by Solpadeine.)
07-06-2021 11:54 PM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #2
RE: Fishing Pole
theres no
ONTRIGGER=PICKUP_GROUND
ONTRIGGER=PICKUP_PACK
ONTRIGGER=SPELL
in 0.51a
and
ONTRIGGER=TARGON_ITEM only works if the item is a weapon type

Dragons of Time 2000-2020
http://dragonsoftime.com
07-29-2021 09:25 PM
Find all posts by this user Like Post Quote this message in a reply
jdchixin
Journeyman
*

Posts: 51
Likes Given: 9
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #3
RE: Fishing Pole
(07-29-2021 09:25 PM)x77x Wrote:  theres no
ONTRIGGER=PICKUP_GROUND
ONTRIGGER=PICKUP_PACK
ONTRIGGER=SPELL
in 0.51a
and
ONTRIGGER=TARGON_ITEM only works if the item is a weapon type

this is work
08-28-2021 10:51 AM
Find all posts by this user Like Post Quote this message in a reply
Banana Split
Apprentice
*

Posts: 2
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jul 2022
Reputation: 0



Post: #4
RE: Fishing Pole
Hello, guys! I need your help, please tell me: why this script doesn't work?

Code:
id=0dbf
NAME=Magic Fishing pole
BUYVALUE=100000
SELLVALUE=6
MORE={50 60}
color=06fd
WEIGHT=2
morey=0
morez=0
//morey - Увиличение шанса на дроп
//morez - + к фишингу

ONTRIGGER=DCLICK
IF (<SRC.WEIGHT>) > (<SRC.STR>*40)
SRC.SYSMESSAGE You have too many items in your backpack!
RETURN 1
ENDIF
if (<src.flags>&0800000) || (<src.flags>&08)
src.message You can't use this in hide!
return 1
endif
if (<timer>==0)||(<timer>==1)||(<timer>==2)
src.message You are too quick
return 1
endif

ONTRIGGER=PICKUP_GROUND
if (<src.skilltotal»20000) && (<attr>&04)
attr=0
endif

ONTRIGGER=TARGON_ITEM
return 1

ONTRIGGER=TARGON_GROUND
IF (<SRC.ACTION>!=-1)
SRC.SYSMESSAGE You must wait to perform another action
RETURN 1
ENDIF

timer=1

ONTRIGGER=timer
CONT.SAY ACTION <CONT.ACTION>
IF ((<CONT.ACTION>=18) || (<CONT.ACTION>=-1))
CONT.SAY Action <CONT.ACTION>
IF !((<CONT.REGION.FLAGS>&02000)||(<CONT.REGION.FLAGS>&04000))
CONT.SYSMESSAGE Regions good
IF (<CONT.REGION.FLAGS>&040)

CONT.SAY Начали: fishing <CONT.FISHING> и morey <morey>

IF (rand(15)==1)
cont.damage={5 15}
DORAND 3
cont.say Вы поранились о крючек, надо насаживать наживку, а не палец.
cont.say Из-за сильной качки на море, вы больно ударились головой.
cont.say Когда вытаскивали рыбу, то она укусила вас.
ENDDO
endif

morey=0
if (<cont.findlayer(20).baseid>==06065) //Elven Cloak
morey=<morey>+5
endif
if (<cont.findlayer(7).baseid>==0622b) //Gauntlets of Weapon Skill
morey=<morey>+10
endif
if (<cont.findlayer(6).baseid>==07d1e) //Optical Mask
morey=<morey>+10
endif
if (<cont.findlayer(8).baseid>==06281) //Ring of Archery
morey=<morey>+5
endif

if (<morey>==0)&&(<CONT.FISHING>==1150)
cont.say Мой навык <CONT.FISHING> и <morey>
IF (rand(32)==1)
CONT.NEWNPC={ 04228 1 04229 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
IF (rand(64)==1)
CONT.NEWITEM={ FISHING_FISH 1 LOOT_FISH 1 DECOR_FISH 1 TRASH_FISH 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
timer=-1
return 1
endif

elseif (<morey>==5)&&(<CONT.FISHING>==1150)
cont.say Мой навык <CONT.FISHING> и <morey>
IF (rand(32)==1)
CONT.NEWNPC={ 04228 1 04229 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
IF (rand(64)==1)
CONT.NEWITEM={ FISHING_FISH 1 LOOT_FISH 1 DECOR_FISH 1 TRASH_FISH 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
timer=-1
return 1
endif

elseif (<morey>==10)&&(<CONT.FISHING>==1150)
cont.say Мой навык <CONT.FISHING> и <morey>
IF (rand(32)==1)
CONT.NEWNPC={ 04228 1 04229 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
IF (rand(64)==1)
CONT.NEWITEM={ FISHING_FISH 1 LOOT_FISH 1 DECOR_FISH 1 TRASH_FISH 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
timer=-1
return 1
endif

elseif (<morey>==15)&&(<CONT.FISHING>==1150)
cont.say Мой навык <CONT.FISHING> и <morey>
IF (rand(32)==1)
CONT.NEWNPC={ 04228 1 04229 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
IF (rand(64)==1)
CONT.NEWITEM={ FISHING_FISH 1 LOOT_FISH 1 DECOR_FISH 1 TRASH_FISH 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
endif

elseif (<morey»=20)&&(<CONT.FISHING>==1150)
cont.say Мой навык <CONT.FISHING> и <morey>
IF (rand(32)==1)
CONT.NEWNPC={ 04228 1 04229 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
IF (rand(64)==1)
CONT.NEWITEM={ FISHING_FISH 1 LOOT_FISH 1 DECOR_FISH 1 TRASH_FISH 1 }
cont.act.update
cont.act.bounce
cont.say Вы выловили <cont.act.name>
endif
endif
ENDIF
ENDIF
ENDIF

timer=-1
RETURN 0

ONTRIGGER=SPELL
RETURN 1

ontrigger=equip
if (<attr>&020)
attr=0
endif

if (<morez»10)
morez=10
endif

if (<morez»0)
SRC.fishing=<SRC.fishing>+(<morez>0)
endif

SRC.FISHING=<SRC.FISHING>+150

return 0

ONTRIGGER=UNEQUIP
if (<morez»0)
SRC.fishing=<SRC.fishing>+(-<morez>0)
endif

SRC.FISHING=<SRC.FISHING>+-150

RETURN 0

CATEGORY=Items by Professions
SUBSECTION=Fisherman
DESCRIPTION=Fishing Pole
(This post was last modified: 07-03-2022 10:18 PM by Banana Split.)
07-03-2022 10:13 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)