I want to make a fishing pole that will allow the user to FISH if in the appropriate place and have a random chance of catching a fish.
Great idea... and I'm clueless on where to start with the program. Any suggestions?
Fishing Pole Program
- Andreas
- Sword Grand Master
- Posts: 720
- Joined: Fri Aug 01, 2003 4:55 am
- Location: Mobile, Alabama
- Contact:
Object Program
Helm keep thee.
Item effects
This actually has been done already. This particular program gives druids and rangers a better chance at succeeding. You can edit it as you see fit. Oh, and indent it appropriately. Oh, and just to clarify, what this is doing is checking to make sure the rod is held, the pc has movement points, and that the room is the correct sector (swimmable water, I think). It also is giving druids and rangers a 20% chance at succeeding, while everyone else has a 3% chance. If one wanted once could incorporate ability or skill checks. It just depends on how complicated you want it. I have plans in the future to attempt to make it so you can change baits. Yes, there truly is no end to the madness.Andreas wrote:I want to make a fishing pole that will allow the user to FISH if in the appropriate place and have a random chance of catching a fish.
Code: Select all
>intercept_prog fish~
if wear_loc($o) != -1
if moveprcnt($n) > 20
if sector($n) == 6
mpechoat $n You cast your line into the water and hope for a fish.
mpechoaround $n $n casts $s line into the water.
if guild($n) == rangers
or guild($n) == clerics of mielikki
or guild($n) == druids of chauntea
if rand(20)
mpechoat $n You pull in a nice trout!
mpechoaround $n $n pulls in a nice trout!
mpoload 8153
drop i8153
mpmadd $n currmove -30
else
mpechoat $n You wait awhile, but nothing bites.
mpechoaround $n $n waits for a time, but catches nothing.
mpmadd $n currmove -20
endif
else
if rand(3)
mpechoat $n You pull in a nice trout!
mpechoaround $n $n pulls in a nice trout!
mpoload 8153
drop i8153
mpmadd $n currmove -60
else
mpechoat $n You wait awhile, but nothing bites.
mpechoaround $n $n waits for a time, but catches nothing.
mpmadd $n currmove -40
endif
endif
else
mpechoat $n You cannot catch fish here.
endif
else
mpechoat $n You're all fished out.
endif
else
mpechoat $n You must hold the rod.
endif
~
|
A goblin, a trickster, a warrior? A nameless terrible thing, soaked in the blood of a billion galaxies. A most feared being in all the cosmos. Nothing could stop, hold, or reason with it. One day it would just drop out of the sky and tear down your world.
- Andreas
- Sword Grand Master
- Posts: 720
- Joined: Fri Aug 01, 2003 4:55 am
- Location: Mobile, Alabama
- Contact:
RE: Fishing program
THANK YOU, TALOS!! *HUG*
(Bet y'all never thought you'd see the day, huh? *chuckle*)
Next question:
Can this program be made to work only in certain rooms (vnums)? I'm also thinking of making crab and lobster traps. Problem I see with this is people using them in freshwater (even though there's no code difference between salt and fresh water).
(Bet y'all never thought you'd see the day, huh? *chuckle*)
Next question:
Can this program be made to work only in certain rooms (vnums)? I'm also thinking of making crab and lobster traps. Problem I see with this is people using them in freshwater (even though there's no code difference between salt and fresh water).
Helm keep thee.
- Andreas
- Sword Grand Master
- Posts: 720
- Joined: Fri Aug 01, 2003 4:55 am
- Location: Mobile, Alabama
- Contact:
Salt vs. Fresh Water
I was trying to think of a way around this for the fishing pole program, but just can't seem to come up with anything.
Saltwater organisms (mostly) can't survive in freshwater and vice versa. If I code the pole to catch sea bass... and it gets used in a freshwater lake... it's going to look VERY stupid.
Is there a flag that can be added to water rooms to differentiate between salt and fresh water sectors?
Saltwater organisms (mostly) can't survive in freshwater and vice versa. If I code the pole to catch sea bass... and it gets used in a freshwater lake... it's going to look VERY stupid.
Is there a flag that can be added to water rooms to differentiate between salt and fresh water sectors?
Helm keep thee.
- Andreas
- Sword Grand Master
- Posts: 720
- Joined: Fri Aug 01, 2003 4:55 am
- Location: Mobile, Alabama
- Contact:
RE: Salt vs. Fresh Water
You DO realise that if you coded different sectors for salt and fresh water, I'd happily re-sector all the water Yes, I'm that crazy
Helm keep thee.