Fishing Script
Fishing Script
newbie
group: newbie
posts: 18
joined: 9-december 04
member no.: 71
rpg maker level: expert
class title:
writer, scripter
ok when you go up to water and press d you will start fishing, depending
on your settings you will find different stuff!
class fishing
#---------------------------------------------------------------------------
-
# start
#---------------------------------------------------------------------------
-
def initialize
@fw = window_fish.new
$fm = "fishing..."
@fw.refresh
delay(60)
fish
end
#---------------------------------------------------------------------------
-
# fishing!
#---------------------------------------------------------------------------
-
def fish
delay(40)
@fr = rand(4)#this number inside the brackets indicate how many things
there are. and remeber it starts from 0 so if you have 5 things you have
to have 4
case @fr
when 0
$game_player.animation_id = 98
$fm = "hey! i got one! 10 pounds!"
@fw.refresh
$game_party.gain_item(33, 1)#the item number of the fish is here
delay(60)
when 1
$fm = "darn its just a rock!"
@fw.refresh
delay(60)
when 2
$fm = " yuck! an old boot!"
@fw.refresh
delay(60)
when 3
$game_player.animation_id = 98
$fm = "hey! i got one! 20 pounds!"
@fw.refresh
$game_party.gain_item(34, 1)
delay(60)
when 4
$fm = "darn! no fish!"
@fw.refresh
delay(60)
end
@fw.dispose
end
#---------------------------------------------------------------------------
-
# delay
#---------------------------------------------------------------------------
-
def delay(wait)
count = graphics.frame_count
while wait + count >= graphics.frame_count
graphics.update
end
end
end
ok now see the section fish in this section you control what you catch. it
is pretty self explanitory.
next find this in scene_map
code # b ボタンが押された場合
if input.trigger?(input::b)
# イベント実行中かメニュー禁止中でなければ
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
# メニュー呼び出しフラグと se 演奏フラグをセット
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
and under it insert this:
code # fishing
# if z pushed call fishing
if input.trigger?(input::z)
fishing
end
# fishing
now insert this anywhere inbetween def update and def transfer_player
code
#--------------------------------------------------------------------------
# ● fishing
#--------------------------------------------------------------------------
def fishing
character = $game_player
case character.direction
when 2
lx = character.x
ly = character.y + 1
when 4
lx = character.x - 1
ly = character.y
when 6
lx = character.x + 1
ly = character.y
when 8
lx = character.x
ly = character.y - 1
end
if $game_map.terrain_tag(lx,ly) == 1
fishing.new
else
audio.se_play("audio/se/057-wrong01")
end
end
and now make a new script under window_base and insert this:
code#=======================================================================
=======
# ■ window_fish
#---------------------------------------------------------------------------
---
# fishy!
#===========================================================================
===
#--------------------------------------------------------------------------
# ● start
#--------------------------------------------------------------------------
def initialize
super(0, 406, 640, 64)
self.contents = bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
self.opacity = 0
$fm = " "
refresh
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 640, 32, $fm)
end
end
tada!
tk
expert
group: expert
posts: 153
joined: 30-november 04
member no.: 44
rpg maker level: master
class title:
writer and scripter
group: expert
posts: 165
joined: 1-january 05
from: my room...
member no.: 127
rpg maker level: expert
class title:
artist
newbie
group: newbie
posts: 18
joined: 9-december 04
member no.: 71
rpg maker level: expert
class title:
writer, scripter
tk
group: newbie
posts: 3
joined: 6-march 05
from: pruszkow, poland
member no.: 311
rpg maker level: novice
newbie
group: newbie
posts: 18
joined: 9-december 04
member no.: 71
rpg maker level: expert
class title:
writer, scripter
member
group: member
posts: 43
joined: 28-march 05
member no.: 418
rpg maker level: not applicable
self explanatory
newbie
group: newbie
posts: 10
joined: 13-march 05
from: aus
member no.: 345
rpg maker level: not applicable
class title:
the guy that puts everything together...
reminds me of pokemon....lol
member
group: member
posts: 32
joined: 24-april 05
member no.: 531
rpg maker level: not applicable
class title:
game maker
self.contents.font.size = $defaultfontsize
comes up with
member
group: member
posts: 32
joined: 24-april 05
member no.: 531
rpg maker level: not applicable
class title:
game maker
self.contents.font.size = $defaultfontsize
comes up with
expert
group: expert
posts: 153
joined: 30-november 04
member no.: 44
rpg maker level: master
class title:
writer and scripter
member
group: member
posts: 32
joined: 24-april 05
member no.: 531
rpg maker level: not applicable
class title:
game maker
ok thanks
member
group: member
posts: 32
joined: 24-april 05
member no.: 531
rpg maker level: not applicable
class title:
game maker
now that that is working can you put a window skin around the word, when
you catch something the picture comes up of th item and that event
animations still move thanks
newbie
group: newbie
posts: 18
joined: 9-december 04
member no.: 71
rpg maker level: expert
class title:
writer, scripter
i made this script for my use and have no plan on doing that it is
supposed to be simple and if you want that learn rgss and implement it
into this script! if i learned rgss and you can too.
newbie
group: newbie
posts: 15
joined: 8-may 05
member no.: 606
rpg maker level: not applicable
class title:
creator o games
i got the same error thingy as azder did and i fixed it like dragonslayer
said but then i got a new one it said like bad interger =(
newbie
group: newbie
posts: 6
joined: 10-may 05
member no.: 614
rpg maker level: i'm almost getting it
how do i read the "y" or "n" keypress? or, if i could create a "show
choices", how would i go about doing this?
god
group: god
posts: 420
joined: 6-february 05
from: malbork, poland - not in the castle, however :]
member no.: 211
rpg maker level: expert
class title:
writer, maker, scripter... i forgot anything? :)
still - who normal throws boots into fast river? and how (who/hwo/how) is
possible to get it by fishing?!
"you have right, but we have machine guns" - mao tse tung
newbie
group: newbie
posts: 18
joined: 9-december 04
member no.: 71
rpg maker level: expert
class title:
writer, scripter
@ludzix
americans! who else!
@rion of fire
use the command window! if you want an example its in the menu script!
thats a good idea though i might implement it!
tk
newbie
group: newbie
posts: 6
joined: 10-may 05
member no.: 614
rpg maker level: i'm almost getting it
newbie
group: newbie
posts: 4
joined: 13-may 05
member no.: 631
rpg maker level: novice
class title:
eh...i'm learning
hey that's pretty cool...but what if there was a way to make it so you
fight an aquadic enemy, ya know?
« next oldest · scripts & tutorials submission and request · next newest »
2 pages 1 2 >