• Anmelden

MOG

1

Dienstag, 3. Juli 2007, 21:45

MOG

Also ich hab die ganzen MOG Menüs mit allen zugehörigen Sachen eingebaut.Allerdings wenn ich das Skript für den Mapnamen oder das Skript für den Namen beim Item finden einbaue, so klappt dieses zwar allerdings bekomm ich folgende Fehlermeldung wenn ich ins Menü geh.

Hier die Fehlermeldung:
http://img509.imageshack.us/my.php?image=neubitmapcn8.png
Suchfunktion benutzen!!!

http://www.pennergame.de/ref.php?refid=4065129

Ein wirklich gutes Browsergame.

2

Dienstag, 3. Juli 2007, 22:05

Das hat nix mit dem MOG Menü zu tun. Fals es dir noch nicht aufgefallen ist, mann konnte mit dem Mapnameskript auch schon vorher nicht ins Menü oder in den Battle.
Hab mal eine Zeile (84) berichtigt:

[button=Code]

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#==============================================================================
# ¡ Window_Map_Name
#------------------------------------------------------------------------------
class Window_Map_Name < Window_Base
  attr_accessor :text
 
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú
  #--------------------------------------------------------------------------
  def initialize
 	super(8, -8, 640, 64)
	self.contents = Bitmap.new(self.width - 32, self.height - 32)
	self.contents.font.name = "Arial"
	@align = 1
	@showing_time = -1
	@text_color   = Color.new(255, 255, 0, 255)
  end
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  def set_text(text, align = 2)
	if text != @text or align != @align
  	@text = text
  	@align = align
  	if text.empty? or text =~ /^\./
    	@showing_time = -1
    	self.contents_opacity = 0
    	self.visible = false
  	else
    	@showing_time = 100
    	self.contents_opacity = 255
    	self.visible = true
    	self.contents.clear
    	x = 4
    	y = 0
    	width = self.contents.width - 8
    	str = "- "+@text+" -"
    	self.contents.font.color = Color.new(  0,  0,  0, 192)
    	self.contents.draw_text(x+2, y+2, width, 32, str, @align)
    	self.contents.font.color = Color.new( 64, 64, 64, 192)
    	self.contents.draw_text(x-1, y-1, width, 32, str, @align)
    	self.contents.draw_text(x+1, y-1, width, 32, str, @align)
    	self.contents.draw_text(x-1, y+1, width, 32, str, @align)
    	self.contents.draw_text(x+1, y+1, width, 32, str, @align)
    	self.contents.font.color = @text_color
    	self.contents.draw_text(x,   y,   width, 32, str, @align)
  	end
	end
  end
  #--------------------------------------------------------------------------
  # œ Ä•`‰æ
  #--------------------------------------------------------------------------
  def update
	return if @showing_time < 0
	@showing_time -= 1
	if @showing_time < 16
  	self.contents_opacity = @showing_time * 16
  	if @showing_time == 0
    	self.visible = false
    	self.contents.clear
    	return
  	end
	end
  end
end
#==============================================================================
# ¡ Scene_Map
#==============================================================================
class Scene_Map
  def initialize_map_name_window(text = nil)
	if @map_name_window.nil?
  	@map_name_window = Window_Map_Name.new
  	@map_name_window.opacity = 0
  	@map_name_window.text = text if not text.nil?
	end
  end
  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ˆ—
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
	initialize_map_name_window
	xrxs20_main
	@map_name_window.dispose if @map_name_window.disposed? == false
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  alias xrxs20_update update
  def update
	@map_name_window.set_text($game_map.name)
	@map_name_window.update
	xrxs20_update
  end
end
#==============================================================================
# ¡ Scene_Title
#==============================================================================
class Scene_Title
  alias xrxs20_main main
  def main
	$map_infos = load_data("Data/MapInfos.rxdata")
	for key in $map_infos.keys
  	$map_infos[key] = $map_infos[key].name
	end
	xrxs20_main
  end
end
#==============================================================================
# ¡ Game_Map
#==============================================================================
class Game_Map
  def name
	$map_infos[@map_id]
  end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ˆ—
  #--------------------------------------------------------------------------
  alias xrxs20_main main
  def main
	xrxs20_main
	if $scene.is_a?(SCENE_BATTLE_TO_SCENE_MAP)
  	$scene.initialize_map_name_window($game_map.name)
	end
  end
end
[/button]

Mfg Monsta

3

Dienstag, 3. Juli 2007, 22:29

ehrlich? Naja ich hab heute beide Skripte eingebaut.Aber danke das uds umgeändert hast.Sieht jetzt zwar net mehr ganz so stylisch aus, aber es klappt.

thx Monsta
Suchfunktion benutzen!!!

http://www.pennergame.de/ref.php?refid=4065129

Ein wirklich gutes Browsergame.

4

Dienstag, 3. Juli 2007, 22:57

Sieht jetzt zwar net mehr ganz so stylisch aus, aber es klappt.


Wie soll ich das verstehen?!? Am aussehen hab ich gar nix verändert ô.Ô

5

Mittwoch, 4. Juli 2007, 15:46

komisch,wo ich das Skript eingefügt hab, da fehlt jetztz oben diese Verzierung der Zeigt nur noch den Ort in gelb geschrieben an

Spoiler
#_________________________________________________
# MOG_Window Treasure Name V1.2
#_________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_________________________________________________
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF (True - False).
MPITFD = true
#Fade Time(in seconds).
MPITTM = 7
#Window Position.
# 0 = Upper.
# 1 = Left.
# 2 = Right.
# 3 = Lower.
MPITPS = 0
# Disable Window Switch.
MPITVIS = 5
# SE.
MPITSE = "056-Right02"
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mptreasure"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdittm
attr_accessor :mpit_x
attr_accessor :mpit_y
attr_accessor :it_id
attr_accessor :item_typ
attr_accessor :item_qua
alias mog25_initialize initialize
def initialize
mog25_initialize
@fdittm = 0
@it_id = 1
@wp_id = 1
@ar_id = 1
@item_typ = 0
@mpit_x = 0
@mpit_y = 0
@item_qua = 1
end
def item_typ
return @item_typ
end
def item_qua
return @item_qua
end
def mpit_x
return @mpit_x
end
def mpit_y
return @mpit_y
end
def fdittm
if @fdittm <= 0
@fdittm = 0
end
return @fdittm
end
def it_id
return @it_id
end
end
###############
# Interpreter #
###############
class Interpreter
alias mog25_command126 command_126
def command_126
mog25_command126
$game_system.item_typ = 1
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
alias mog25_command127 command_127
def command_127
mog25_command127
$game_system.item_typ = 2
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
alias mog25_command128 command_128
def command_128
mog25_command128
$game_system.item_typ = 3
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
end
############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpitnm
$mpitnm = load_data("Data/Items.rxdata")
$mpitnm[$game_system.it_id].name
end
def mpwpnm
$mpwpnm = load_data("Data/Weapons.rxdata")
$mpwpnm[$game_system.it_id].name
end
def mparnm
$mparnm = load_data("Data/Armors.rxdata")
$mparnm[$game_system.it_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_itpic
mapic = RPG::Cache.picture("")
end
def draw_mpitem(x,y)
mapic = RPG::Cache.picture("Itname") rescue nd_itpic
cw = mapic.width
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 22
if $game_system.item_typ == 1
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
elsif $game_system.item_typ == 2
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
elsif $game_system.item_typ == 3
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
else
end
end
end
##########
# Mpitem #
##########
class Mpitem < Window_Base
def initialize
super($game_system.mpit_x, $game_system.mpit_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpitem(10,0)
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog25_main main
def main
@mpit = Mpitem.new
if $game_switches[MOG::MPITVIS] == true
@mpit.visible = false
else
@mpit.visible = true
end
@mpit.contents_opacity = $game_system.fdittm
mog25_main
@mpit.dispose
end
alias mog25_update update
def update
mog25_update
if $ref == true
@mpit.refresh
if MOG::MPITPS == 0
@mpit.x = 200
@mpit.y = -150
elsif MOG::MPITPS == 1
@mpit.x = -240
@mpit.y = 200
elsif MOG::MPITPS == 2
@mpit.x = 640
@mpit.y = 200
else
@mpit.x = 200
@mpit.y = 480
end
$ref = false
end
if $game_switches[MOG::MPITVIS] == true
if $game_system.fdittm <= 0
@mpit.visible = false
else
@mpit.visible = true
end
else
@mpit.visible = true
end
$game_system.mpit_x = @mpit.x
$game_system.mpit_y = @mpit.y
if MOG::MPITPS == 0
if @mpit.y < 0
@mpit.y += 8
elsif @mpit.x >= 0
@mpit.y = 0
end
elsif MOG::MPITPS == 1
if @mpit.x < 0
@mpit.x += 10
elsif @mpit.x >= 0
@mpit.x = 0
end
elsif MOG::MPITPS == 2
if @mpit.x > 400
@mpit.x -= 10
elsif @mpit.x >= 400
@mpit.x = 400
end
else
if @mpit.y > 380
@mpit.y -= 8
elsif @mpit.y >= 380
@mpit.y = 380
end
end
@mpit.contents_opacity = $game_system.fdittm
if MOG::MPITFD == true
$game_system.fdittm -= 3
end
end
end
zum Lesen den Text mit der Maus markieren

[php]#_______________________________________________________________________________
# MOG_MPW Map_Name V1.2
#_______________________________________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_______________________________________________________________________________
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF(True - False).
MPNMFD = true
#Fade Time(in seconds).
MPNMTM = 10
#Window Position.
# 0 = Upper Left.
# 1 = Lower Left.
# 2 = Upper Right.
# 3 = Lower Right.
MPNMPS = 2
# Disable Window Switch(ID).
WM_SWITCH_VIS_DISABLE = 15
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mpmapname"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdtm
attr_accessor :mpnm_x
attr_accessor :mpnm_y
alias mog24_initialize initialize
def initialize
mog24_initialize
@fdtm = 255 + 40 * MOG::MPNMTM
if MOG::MPNMPS == 0
@mpnm_x = -300
@mpnm_y = 0
elsif MOG::MPNMPS == 1
@mpnm_x = -300
@mpnm_y = 380
elsif MOG::MPNMPS == 2
@mpnm_x = 640
@mpnm_y = 0
else
@mpnm_x = 640
@mpnm_y = 380
end
end
def mpnm_x
return @mpnm_x
end
def mpnm_y
return @mpnm_y
end
def fdtm
if @fdtm <= 0
@fdtm = 0
end
return @fdtm
end
end
############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpname
$mpname = load_data("Data/MapInfos.rxdata")
$mpname[@map_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_mapic
mapic = RPG::Cache.picture("")
end
def draw_mpname(x,y)
mapic = RPG::Cache.picture("Mpname") rescue nd_mapic
cw = mapic.width
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 22
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 27, 110, 32, $game_map.mpname.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 26, 110, 32, $game_map.mpname.to_s,1)
end
end
##########
# Mpname #
##########
class Mpname < Window_Base
def initialize
super($game_system.mpnm_x, $game_system.mpnm_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpname(10,0)
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog24_main main
def main
@mpnm = Mpname.new
@mpnm.contents_opacity = $game_system.fdtm
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false
end
mog24_main
@mpnm.dispose
end
alias mog24_update update
def update
mog24_update
$game_system.mpnm_x = @mpnm.x
$game_system.mpnm_y = @mpnm.y
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
if $game_system.fdtm <= 0
@mpnm.visible = false
else
@mpnm.visible = true
end
else
@mpnm.visible = false
end
if MOG::MPNMPS == 0 or MOG::MPNMPS == 1
if @mpnm.x < 0
@mpnm.x += 8
elsif @mpnm.x >= 0
@mpnm.x = 0
end
else
if @mpnm.x > 400
@mpnm.x -= 8
elsif @mpnm.x <= 400
@mpnm.x = 400
end
end
@mpnm.contents_opacity = $game_system.fdtm
if MOG::MPNMFD == true
$game_system.fdtm -= 3
end
end
alias mog24_transfer_player transfer_player
def transfer_player
mog24_transfer_player
if MOG::MPNMPS == 0
$game_system.mpnm_x = -300
$game_system.mpnm_y = 0
elsif MOG::MPNMPS == 1
$game_system.mpnm_x = -300
$game_system.mpnm_y = 380
elsif MOG::MPNMPS == 2
$game_system.mpnm_x = 640
$game_system.mpnm_y = 0
else
$game_system.mpnm_x = 640
$game_system.mpnm_y = 380
end
@mpnm.y = $game_system.mpnm_y
@mpnm.x = $game_system.mpnm_x
$game_system.fdtm = 255 + 40 * MOG::MPNMTM
@mpnm.refresh
end
end[/php]

Das erster ist das Schatztruhen Namen skript und das 2 das Map name Skript.
Suchfunktion benutzen!!!

http://www.pennergame.de/ref.php?refid=4065129

Ein wirklich gutes Browsergame.

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Vegeta11880« (4. Juli 2007, 15:56)


6

Mittwoch, 4. Juli 2007, 19:19

Tja, hättest du gleich deine Version gepostet hätte ich auch gleich deine ausbessern können x_X

Wieder das selbe, Zeile 124 so abändern:

Quellcode

1
@mpnm.dispose unless @mpnm.disposed?


[button=Code]

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#_______________________________________________________________________________
# MOG_MPW Map_Name V1.2            
#_______________________________________________________________________________
# By Moghunter       
# [url]http://www.atelier-rgss.com[/url]
#_______________________________________________________________________________
module MOG
 #Font Name.
 MPFONT = "Georgia"
 #Fade ON/OFF(True - False).
 MPNMFD = true
 #Fade Time(in seconds).
 MPNMTM = 10
 #Window Position.
 # 0 = Upper Left.
 # 1 = Lower Left.
 # 2 = Upper Right.
 # 3 = Lower Right.
 MPNMPS = 2
 # Disable Window Switch(ID).
 WM_SWITCH_VIS_DISABLE = 15
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mpmapname"] = true
###############
# Game_System #
###############
class Game_System
 attr_accessor :fdtm
 attr_accessor :mpnm_x
 attr_accessor :mpnm_y
 alias mog24_initialize initialize
 def initialize
  mog24_initialize
  @fdtm = 255 + 40 * MOG::MPNMTM
  if MOG::MPNMPS == 0 
   @mpnm_x = -300
   @mpnm_y = 0
   elsif MOG::MPNMPS == 1
   @mpnm_x = -300
   @mpnm_y = 380
   elsif MOG::MPNMPS == 2
   @mpnm_x = 640
   @mpnm_y = 0
  else 
   @mpnm_x = 640
   @mpnm_y = 380
  end  
 end
 def mpnm_x
  return @mpnm_x
 end
 def mpnm_y
  return @mpnm_y
 end
 def fdtm
  if @fdtm <= 0
   @fdtm = 0 
  end
  return @fdtm
 end
end 
############
# Game_Map #
############
class Game_Map
 attr_reader   :map_id  
 def mpname
  $mpname = load_data("Data/MapInfos.rxdata") 
  $mpname[@map_id].name
 end
end
###############
# Window Base #
###############
class Window_Base < Window
 def nd_mapic 
  mapic = RPG::Cache.picture("")     
 end  
 def draw_mpname(x,y)
  mapic = RPG::Cache.picture("Mpname") rescue nd_mapic   
  cw = mapic.width  
  ch = mapic.height 
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x , y - ch + 65, mapic, src_rect)
  self.contents.font.name = MOG::MPFONT
  self.contents.font.size = 22
  self.contents.font.color = Color.new(0,0,0,255)
  self.contents.draw_text(x + 76, y + 27, 110, 32, $game_map.mpname.to_s,1)
  self.contents.font.color = Color.new(255,255,255,255)
  self.contents.draw_text(x + 75, y + 26, 110, 32, $game_map.mpname.to_s,1)
 end
end
##########
# Mpname #
##########
class Mpname < Window_Base
 def initialize
  super($game_system.mpnm_x, $game_system.mpnm_y, 250, 100)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.opacity = 0
  refresh
 end
 def refresh
  self.contents.clear
  draw_mpname(10,0)    
 end
end
#############
# Scene_Map #
#############
class Scene_Map
 alias mog24_main main
 def main
  @mpnm = Mpname.new
  @mpnm.contents_opacity = $game_system.fdtm
  if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
   @mpnm.visible = true
  else
   @mpnm.visible = false  
  end  
  mog24_main
  @mpnm.dispose unless @mpnm.disposed?
 end
 alias mog24_update update
 def update
  mog24_update  
  $game_system.mpnm_x = @mpnm.x
  $game_system.mpnm_y = @mpnm.y
  if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
   if $game_system.fdtm <= 0
    @mpnm.visible = false  
   else
    @mpnm.visible = true  
   end 
  else
   @mpnm.visible = false  
  end 
  if MOG::MPNMPS == 0 or MOG::MPNMPS == 1 
   if @mpnm.x < 0
    @mpnm.x += 8
    elsif @mpnm.x >= 0
    @mpnm.x = 0
   end   
  else
   if @mpnm.x > 400
    @mpnm.x -= 8
    elsif @mpnm.x <= 400
    @mpnm.x = 400
   end     
  end 
  @mpnm.contents_opacity = $game_system.fdtm
  if MOG::MPNMFD == true
   $game_system.fdtm -= 3
  end
 end
 alias mog24_transfer_player transfer_player
 def transfer_player
  mog24_transfer_player
  if MOG::MPNMPS == 0 
   $game_system.mpnm_x = -300
   $game_system.mpnm_y = 0
   elsif MOG::MPNMPS == 1
   $game_system.mpnm_x = -300
   $game_system.mpnm_y = 380
   elsif MOG::MPNMPS == 2
   $game_system.mpnm_x = 640
   $game_system.mpnm_y = 0
  else 
   $game_system.mpnm_x = 640
   $game_system.mpnm_y = 380
  end  
  @mpnm.y = $game_system.mpnm_y
  @mpnm.x = $game_system.mpnm_x
  $game_system.fdtm = 255 + 40 * MOG::MPNMTM
  @mpnm.refresh
 end
end
[/button]

Mfg Monsta

7

Mittwoch, 4. Juli 2007, 21:05

jo,sry, hätt gedacht gebe nur 1.Aber hast recht wäre so leichter gewesen.

THX Monsta bist der größte.

Thx Thx Thx THX!!!!

Eine Frage ich hab noch das Treasure Name Skript im Spoiler mit dem das Menü auch nicht klappt.Kann man das auch so leicht ändern.Wenn es keinee Mühe macht kannst du es dann auch noch ändern.plz.
Suchfunktion benutzen!!!

http://www.pennergame.de/ref.php?refid=4065129

Ein wirklich gutes Browsergame.

8

Mittwoch, 4. Juli 2007, 21:47

Jop, is genau das selbe Problem. Zeile 203:

Quellcode

1
@mpit.dispose

mit diesem hier ersetzen:

Quellcode

1
@mpit.dispose unless @mpit.disposed?


Mfg Monsta

9

Mittwoch, 4. Juli 2007, 22:22

vielen dank, und mal wieder hast du recht.Ich sollte mich jetzt mal mit RGSS richitg beschäftigen.Nach PHP dürfte das kein Problem sein.

Variablen,Array,Bedingungen,Schleifen kann ich jetzt.Dann lerne ich jetzt noch das definieren einer Klasse und dann klappt das mit den RGSS Grundkenntnissen.(Hoff ich mal XD)
Suchfunktion benutzen!!!

http://www.pennergame.de/ref.php?refid=4065129

Ein wirklich gutes Browsergame.

10

Freitag, 6. Juli 2007, 10:41

ich will für meine frage nicht extra nen neuen thread aufmachen, also schreib ichs hier schnell mit rein.

es geht bei mir um das treasure anzeigen script. und zwar hätte ichs gerne so, dass die namen, die es anzeigt, länger sind.
wenn ich jetzt zum beispiel "baumwollhandschuhe" finde, dann ist dieses wort zu lang, um in dem fenster angezeigt werden zu können. kann man das ändern? wenn ja, auch bitte so umschreiben, dass ich dann die grafik dementsprechend anpassen könnte.

Bild
AUF EIS

11

Sonntag, 8. Juli 2007, 01:56

Also ich hab das Fenster mal breiter gemacht und die Schriftbreite mal durch eine Variable ersetzt, damit man das schneller ändern kann.

Hier der veränderte Code:

[button=Code]

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#_________________________________________________
# MOG_Window Treasure Name V1.2
#_________________________________________________
# By Moghunter
# [url]http://www.atelier-rgss.com[/url]
#_________________________________________________
module MOG
 #Font Name.
 MPFONT = "Georgia"
 #Fade ON/OFF (True - False).
 MPITFD = true
 #Fade Time(in seconds).
 MPITTM = 7
 #Window Position.
 # 0 = Upper.
 # 1 = Left.
 # 2 = Right.
 # 3 = Lower.
 MPITPS = 0
 # Disable Window Switch.
 MPITVIS = 5
 # SE.
 MPITSE = "056-Right02"
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mptreasure"] = true
###############
# Game_System #
###############
class Game_System
 attr_accessor :fdittm
 attr_accessor :mpit_x
 attr_accessor :mpit_y
 attr_accessor :it_id
 attr_accessor :item_typ
 attr_accessor :item_qua
 alias mog25_initialize initialize
 def initialize
  mog25_initialize
  @fdittm = 0
  @it_id = 1
  @wp_id = 1
  @ar_id = 1
  @item_typ = 0
  @mpit_x = 0
  @mpit_y = 0
  @item_qua = 1
 end
 def item_typ
  return @item_typ
 end
 def item_qua
  return @item_qua
 end
 def mpit_x
  return @mpit_x
 end
 def mpit_y
  return @mpit_y
 end
 def fdittm
  if @fdittm <= 0
   @fdittm = 0
  end
  return @fdittm
 end
 def it_id
  return @it_id
 end
end
###############
# Interpreter #
###############
class Interpreter
 alias mog25_command126 command_126
 def command_126
  mog25_command126
  $game_system.item_typ = 1
  $game_system.fdittm = 255 + 40 * MOG::MPITTM
  $game_system.it_id = @parameters[0]
  value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  $game_system.item_qua = value
  unless $game_switches[MOG::MPITVIS] == true
   Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
  end
  $ref = true
 end
 alias mog25_command127 command_127
 def command_127
  mog25_command127
  $game_system.item_typ = 2
  $game_system.fdittm = 255 + 40 * MOG::MPITTM
  $game_system.it_id = @parameters[0]
  value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  $game_system.item_qua = value
  unless $game_switches[MOG::MPITVIS] == true
   Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
  end
  $ref = true
 end
 alias mog25_command128 command_128
 def command_128
  mog25_command128
  $game_system.item_typ = 3
  $game_system.fdittm = 255 + 40 * MOG::MPITTM
  $game_system.it_id = @parameters[0]
  value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  $game_system.item_qua = value
  unless $game_switches[MOG::MPITVIS] == true
   Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
  end
  $ref = true
 end
end
############
# Game_Map #
############
class Game_Map
 attr_reader :map_id
 def mpitnm
  $mpitnm = load_data("Data/Items.rxdata")
  $mpitnm[$game_system.it_id].name
 end
 def mpwpnm
  $mpwpnm = load_data("Data/Weapons.rxdata")
  $mpwpnm[$game_system.it_id].name
 end
 def mparnm
  $mparnm = load_data("Data/Armors.rxdata")
  $mparnm[$game_system.it_id].name
 end
end
###############
# Window Base #
###############
class Window_Base < Window
 def nd_itpic
  mapic = RPG::Cache.picture("")
 end
 def draw_mpitem(x,y)
  mapic = RPG::Cache.picture("Itname") rescue nd_itpic
  cw = mapic.width
  ch = mapic.height
  src_rect = Rect.new(0, 0, cw, ch)
  fontwidth = 190
  self.contents.blt(x , y - ch + 65, mapic, src_rect)
  self.contents.font.name = MOG::MPFONT
  self.contents.font.size = 22
  if $game_system.item_typ == 1
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 76, y + 30, fontwidth, 32, $game_map.mpitnm.to_s,1)
   self.contents.draw_text(x - 19, y + 19, fontwidth, 32, $game_system.item_qua.to_s + "X",1)
   self.contents.font.color = Color.new(255,255,255,255)
   self.contents.draw_text(x + 75, y + 29, fontwidth, 32, $game_map.mpitnm.to_s,1)
   self.contents.draw_text(x - 20, y + 18, fontwidth, 32, $game_system.item_qua.to_s + "X",1)
   elsif $game_system.item_typ == 2
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x - 19, y + 19, fontwidth, 32, $game_system.item_qua.to_s + "X",1)
   self.contents.draw_text(x + 76, y + 30, fontwidth, 32, $game_map.mpwpnm.to_s,1)
   self.contents.font.color = Color.new(255,255,255,255)
   self.contents.draw_text(x + 75, y + 29, fontwidth, 32, $game_map.mpwpnm.to_s,1)
   self.contents.draw_text(x - 20, y + 18, fontwidth, 32, $game_system.item_qua.to_s + "X",1)
   elsif $game_system.item_typ == 3
   self.contents.font.color = Color.new(0,0,0,255)
   self.contents.draw_text(x + 76, y + 30, fontwidth, 32, $game_map.mparnm.to_s,1)
   self.contents.draw_text(x - 19, y + 19, fontwidth, 32, $game_system.item_qua.to_s + "X",1)
   self.contents.font.color = Color.new(255,255,255,255)
   self.contents.draw_text(x + 75, y + 29, fontwidth, 32, $game_map.mparnm.to_s,1)
   self.contents.draw_text(x - 20, y + 18, fontwidth, 32, $game_system.item_qua.to_s + "X",1)
  else
  end
 end
end
##########
# Mpitem #
##########
class Mpitem < Window_Base
 def initialize
  super($game_system.mpit_x, $game_system.mpit_y, 330, 100)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.opacity = 0
  refresh
 end
 def refresh
  self.contents.clear
  draw_mpitem(10,0)
 end
end
#############
# Scene_Map #
#############
class Scene_Map
 alias mog25_main main
 def main
  @mpit = Mpitem.new
  if $game_switches[MOG::MPITVIS] == true
   @mpit.visible = false
  else
   @mpit.visible = true
  end
  @mpit.contents_opacity = $game_system.fdittm
  mog25_main
  @mpit.dispose unless @mpit.disposed?
 end
 alias mog25_update update
 def update
  mog25_update
  if $ref == true
   @mpit.refresh
   if MOG::MPITPS == 0
    @mpit.x = 200
    @mpit.y = -150
    elsif MOG::MPITPS == 1
    @mpit.x = -240
    @mpit.y = 200
    elsif MOG::MPITPS == 2
    @mpit.x = 640
    @mpit.y = 200
   else
    @mpit.x = 200
    @mpit.y = 480
   end
   $ref = false
  end
  if $game_switches[MOG::MPITVIS] == true
   if $game_system.fdittm <= 0
    @mpit.visible = false
   else
    @mpit.visible = true
   end
  else
   @mpit.visible = true
  end
  $game_system.mpit_x = @mpit.x
  $game_system.mpit_y = @mpit.y
  if MOG::MPITPS == 0
   if @mpit.y < 0
    @mpit.y += 8
    elsif @mpit.x >= 0
    @mpit.y = 0
   end
   elsif MOG::MPITPS == 1
   if @mpit.x < 0
    @mpit.x += 10
    elsif @mpit.x >= 0
    @mpit.x = 0
   end
   elsif MOG::MPITPS == 2
   if @mpit.x > 400
    @mpit.x -= 10
    elsif @mpit.x >= 400
    @mpit.x = 400
   end
  else
   if @mpit.y > 380
    @mpit.y -= 8
    elsif @mpit.y >= 380
    @mpit.y = 380
   end
  end
  @mpit.contents_opacity = $game_system.fdittm
  if MOG::MPITFD == true
   $game_system.fdittm -= 3
  end
 end
end
[/button]

Leider bringt es auch Nachteile mit sich!

1. Bei längeren Namen wie z.B. "baumwollhandschuhe" überlappt der Name mit der Anzahl
2. Kleinere Namen stehen weiter weg von der Anzahl

Vllt bringt es dir ja trotzdem was ^^

Mfg Monsta

12

Sonntag, 8. Juli 2007, 17:45

Hey, da wir grade beim Thema umskripten sind, könnte mir jemand das Mog scene item in 5 Klassen umschreiben? ( wegen meinem ihr habst erfasst, KGC item Grouping
Ich bin eine äußerst nervende Persönlichkeit, also nichts ernstnehmen was ich sage!

Social Bookmarks