• Anmelden

1

Samstag, 10. Dezember 2005, 22:25

Hallo euch allen,
bräuchte ein skript das in den läden und beim anlegen von ausrüstung alle status-werte anzeigt
(also nicht nur atk pdef und mdef, sondern auch alle anderen werte.)
kennt jemand ein passendes skript oder mag mir jemand eins machen? ^^

2

Sonntag, 11. Dezember 2005, 07:33



Shop]http://www.phylomortis.com/resource/script/scr015.html[/url]
Ausrüstung: http://www.phylomortis.com/resource/script/scr012.html

:snowsmiley: Abt Ploutôn
:information: YAams
:rainbow: Random Signatur
Bild





Weitere Informationen | Download
Mit Support für RGSS Project 1!
Bild

3

Sonntag, 11. Dezember 2005, 12:38

Hi, danke erstmal
hab bisher das ausrüstungsscript noch nicht zum laufen gekriegt,
beim ausrüstungs script erhalte ich folgenden fehler:
wenn ich ins equipment menu gehe

sript 'menu line' line 203: ArgumentError occurred.
wrong number of argument (1 for 0)

in der betreffenden zeile steht:
$scene = Scene_Equip.new(@status_window.index)

ne idee was ich ändern muss?

(das shop script funkt einwandfrei ^^)

4

Sonntag, 11. Dezember 2005, 20:51

Also habs jetzt zur hälfte zum laufen gebracht
das script zeigt jetzt alles richtig an aber sobald ich etwas equippen will stürzt es
mit folgender fehlermeldung ab:

Script 'Scene_Equip' line 174: NoMethodError occurred.
undefinde method 'make_elem_text' for #<scene_equip:0x15ccf20>

die zeile ist elem_text = make_elem_text(item2)


kann mir jemand helfen?

5

Sonntag, 11. Dezember 2005, 20:59

aber bei mir funzt es. hier meine Script Scene_Equip:

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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
#==============================================================================
# &#9632; Scene_Equip
#------------------------------------------------------------------------------
# &#12288;&#35013;&#20633;&#30011;&#38754;&#12398;&#20966;&#29702;&#12434;&#34892;&#12358;&#12463;&#12521;&#12473;&#12391;&#12377;&#12290;
#==============================================================================
 
class Scene_Equip
  #--------------------------------------------------------------------------
  # &#9679; &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#21021;&#26399;&#21270;
  #     actor_index : &#12450;&#12463;&#12479;&#12540;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;
  #     equip_index : &#35013;&#20633;&#12452;&#12531;&#12487;&#12483;&#12463;&#12473;
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12513;&#12452;&#12531;&#20966;&#29702;
  #--------------------------------------------------------------------------
  def main
    # &#12450;&#12463;&#12479;&#12540;&#12434;&#21462;&#24471;
    @actor = $game_party.actors[@actor_index]
    # &#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#20316;&#25104;
    @help_window = Window_Help.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    # &#12504;&#12523;&#12503;&#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#38306;&#36899;&#20184;&#12369;
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # &#12459;&#12540;&#12477;&#12523;&#20301;&#32622;&#12434;&#35373;&#23450;
    @right_window.index = @equip_index
    refresh
    # &#12488;&#12521;&#12531;&#12472;&#12471;&#12519;&#12531;&#23455;&#34892;
    Graphics.transition
    # &#12513;&#12452;&#12531;&#12523;&#12540;&#12503;
    loop do
      # &#12466;&#12540;&#12512;&#30011;&#38754;&#12434;&#26356;&#26032;
      Graphics.update
      # &#20837;&#21147;&#24773;&#22577;&#12434;&#26356;&#26032;
      Input.update
      # &#12501;&#12524;&#12540;&#12512;&#26356;&#26032;
      update
      # &#30011;&#38754;&#12364;&#20999;&#12426;&#26367;&#12431;&#12387;&#12383;&#12425;&#12523;&#12540;&#12503;&#12434;&#20013;&#26029;
      if $scene != self
        break
      end
    end
    # &#12488;&#12521;&#12531;&#12472;&#12471;&#12519;&#12531;&#28310;&#20633;
    Graphics.freeze
    # &#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#35299;&#25918;
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12522;&#12501;&#12524;&#12483;&#12471;&#12517;
  #--------------------------------------------------------------------------
  def refresh
    # &#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#21487;&#35222;&#29366;&#24907;&#35373;&#23450;
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # &#29694;&#22312;&#35013;&#20633;&#20013;&#12398;&#12450;&#12452;&#12486;&#12512;&#12434;&#21462;&#24471;
    item1 = @right_window.item
    # &#29694;&#22312;&#12398;&#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12434; @item_window &#12395;&#35373;&#23450;
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    # &#12521;&#12452;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12364;&#12450;&#12463;&#12486;&#12451;&#12502;&#12398;&#22580;&#21512;
    if @right_window.active
      # &#35013;&#20633;&#22793;&#26356;&#24460;&#12398;&#12497;&#12521;&#12513;&#12540;&#12479;&#12434;&#28040;&#21435;
      @left_window.set_new_parameters(nil, nil, nil)
    end
    # &#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12364;&#12450;&#12463;&#12486;&#12451;&#12502;&#12398;&#22580;&#21512;
    if @item_window.active
      # &#29694;&#22312;&#36984;&#25246;&#20013;&#12398;&#12450;&#12452;&#12486;&#12512;&#12434;&#21462;&#24471;
      item2 = @item_window.item
      # &#35013;&#20633;&#12434;&#22793;&#26356;
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # &#35013;&#20633;&#22793;&#26356;&#24460;&#12398;&#12497;&#12521;&#12513;&#12540;&#12479;&#12434;&#21462;&#24471;
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      # &#35013;&#20633;&#12434;&#25147;&#12377;
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # &#12524;&#12501;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12395;&#25551;&#30011;
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12524;&#12540;&#12512;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update
    # &#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#26356;&#26032;
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    # &#12521;&#12452;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12364;&#12450;&#12463;&#12486;&#12451;&#12502;&#12398;&#22580;&#21512;: update_right &#12434;&#21628;&#12406;
    if @right_window.active
      update_right
      return
    end
    # &#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12364;&#12450;&#12463;&#12486;&#12451;&#12502;&#12398;&#22580;&#21512;: update_item &#12434;&#21628;&#12406;
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12524;&#12540;&#12512;&#26356;&#26032; (&#12521;&#12452;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12364;&#12450;&#12463;&#12486;&#12451;&#12502;&#12398;&#22580;&#21512;)
  #--------------------------------------------------------------------------
  def update_right
    # B &#12508;&#12479;&#12531;&#12364;&#25276;&#12373;&#12428;&#12383;&#22580;&#21512;
    if Input.trigger?(Input::B)
      # &#12461;&#12515;&#12531;&#12475;&#12523; SE &#12434;&#28436;&#22863;
      $game_system.se_play($data_system.cancel_se)
      # &#12513;&#12491;&#12517;&#12540;&#30011;&#38754;&#12395;&#20999;&#12426;&#26367;&#12360;
      $scene = Scene_Menu.new(2)
      return
    end
    # C &#12508;&#12479;&#12531;&#12364;&#25276;&#12373;&#12428;&#12383;&#22580;&#21512;
    if Input.trigger?(Input::C)
      # &#35013;&#20633;&#22266;&#23450;&#12398;&#22580;&#21512;
      if @actor.equip_fix?(@right_window.index)
        # &#12502;&#12470;&#12540; SE &#12434;&#28436;&#22863;
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # &#27770;&#23450; SE &#12434;&#28436;&#22863;
      $game_system.se_play($data_system.decision_se)
      # &#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#12450;&#12463;&#12486;&#12451;&#12502;&#21270;
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # R &#12508;&#12479;&#12531;&#12364;&#25276;&#12373;&#12428;&#12383;&#22580;&#21512;
    if Input.trigger?(Input::R)
      # &#12459;&#12540;&#12477;&#12523; SE &#12434;&#28436;&#22863;
      $game_system.se_play($data_system.cursor_se)
      # &#27425;&#12398;&#12450;&#12463;&#12479;&#12540;&#12408;
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # &#21029;&#12398;&#35013;&#20633;&#30011;&#38754;&#12395;&#20999;&#12426;&#26367;&#12360;
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # L &#12508;&#12479;&#12531;&#12364;&#25276;&#12373;&#12428;&#12383;&#22580;&#21512;
    if Input.trigger?(Input::L)
      # &#12459;&#12540;&#12477;&#12523; SE &#12434;&#28436;&#22863;
      $game_system.se_play($data_system.cursor_se)
      # &#21069;&#12398;&#12450;&#12463;&#12479;&#12540;&#12408;
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # &#21029;&#12398;&#35013;&#20633;&#30011;&#38754;&#12395;&#20999;&#12426;&#26367;&#12360;
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12524;&#12540;&#12512;&#26356;&#26032; (&#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12364;&#12450;&#12463;&#12486;&#12451;&#12502;&#12398;&#22580;&#21512;)
  #--------------------------------------------------------------------------
  def update_item
    # B &#12508;&#12479;&#12531;&#12364;&#25276;&#12373;&#12428;&#12383;&#22580;&#21512;
    if Input.trigger?(Input::B)
      # &#12461;&#12515;&#12531;&#12475;&#12523; SE &#12434;&#28436;&#22863;
      $game_system.se_play($data_system.cancel_se)
      # &#12521;&#12452;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#12450;&#12463;&#12486;&#12451;&#12502;&#21270;
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # C &#12508;&#12479;&#12531;&#12364;&#25276;&#12373;&#12428;&#12383;&#22580;&#21512;
    if Input.trigger?(Input::C)
      # &#35013;&#20633; SE &#12434;&#28436;&#22863;
      $game_system.se_play($data_system.equip_se)
      # &#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12391;&#29694;&#22312;&#36984;&#25246;&#12373;&#12428;&#12390;&#12356;&#12427;&#12487;&#12540;&#12479;&#12434;&#21462;&#24471;
      item = @item_window.item
      # &#35013;&#20633;&#12434;&#22793;&#26356;
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      # &#12521;&#12452;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#12450;&#12463;&#12486;&#12451;&#12502;&#21270;
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # &#12521;&#12452;&#12488;&#12454;&#12451;&#12531;&#12489;&#12454;&#12289;&#12450;&#12452;&#12486;&#12512;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#20869;&#23481;&#12434;&#20877;&#20316;&#25104;
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end
 
class Scene_Equip
# --------------------------------
def refresh
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    item1 = @right_window.item
    case @right_window.index
    when 0
      @item_window = @item_window1
      newmode = 0
    when 1
      @item_window = @item_window2
      newmode = 1
    when 2
      @item_window = @item_window3
      newmode = 1
    when 3
      @item_window = @item_window4
      newmode = 1
    when 4
      @item_window = @item_window5
      newmode = 1
    end
    if newmode != @left_window.mode
      @left_window.mode = newmode
      @left_window.refresh
    end
    if @right_window.active
      @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil,
      "", "")
    end
    if @item_window.active
      item2 = @item_window.item
      last_hp = @actor.hp
      last_sp = @actor.sp
      old_atk = @actor.atk
      old_pdef = @actor.pdef
      old_mdef = @actor.mdef
      old_str = @actor.str
      old_dex = @actor.dex
      old_agi = @actor.agi
      old_int = @actor.int
      old_eva = @actor.eva
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      new_eva = @actor.eva
      @left_window.changes = [0, 0, 0, 0, 0, 0, 0, 0]
      if new_atk > old_atk
        @left_window.changes[0] = 1
      end
      if new_atk < old_atk
        @left_window.changes[0] = -1
      end
      if new_pdef > old_pdef
        @left_window.changes[1] = 1
      end
      if new_pdef < old_pdef
        @left_window.changes[1] = -1
      end
      if new_mdef > old_mdef
        @left_window.changes[2] = 1
      end
      if new_mdef < old_mdef
        @left_window.changes[2] = -1
      end
       if new_str > old_str
        @left_window.changes[3] = 1
      end
      if new_str < old_str
        @left_window.changes[3] = -1
      end
        if new_dex > old_dex
        @left_window.changes[4] = 1
      end
      if new_dex < old_dex
        @left_window.changes[4] = -1
      end
      if new_agi > old_agi
        @left_window.changes[5] = 1
      end
      if new_agi < old_agi
        @left_window.changes[5] = -1
      end
      if new_int > old_int
        @left_window.changes[6] = 1
      end
      if new_int < old_int
        @left_window.changes[6] = -1
      end
      if new_eva > old_eva
        @left_window.changes[7] = 1
      end
      if new_eva < old_eva
        @left_window.changes[7] = -1
      end
      elem_text = make_elem_text(item2)
      stat_text = make_stat_text(item2)
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str,
      new_dex, new_agi, new_int, new_eva, elem_text, stat_text)
    end
  end
# --------------------------------
# --------------------------------
def make_elem_text(item)
    text = ""
    flag = false
    if item.is_a?(RPG::Weapon)
      for i in item.element_set
        if flag
          text += ", "
        end
        text += $data_system.elements[i]
        flag = true
      end
    end
    if item.is_a?(RPG::Armor)
      for i in item.guard_element_set
        if flag
          text += ", "
        end
        text += $data_system.elements[i]
        flag = true
      end
    end
    return text
  end
# --------------------------------
def make_stat_text(item)
    text = ""
    flag = false
    if item.is_a?(RPG::Weapon)
      for i in item.plus_state_set
        if flag
          text += ", "
        end
        text += $data_states[i].name
        flag = true
      end
    end
    if item.is_a?(RPG::Armor)
      for i in item.guard_state_set
        if flag
          text += ", "
        end
        text += $data_states[i].name
        flag = true
      end
    end
    return text
  end
  end


Hier mein Script Window_EquipLeft:

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
class Window_EquipLeft < Window_Base
  # --------------------------------
  attr_accessor :mode
  attr_accessor :changes
  # --------------------------------
  def initialize(actor)
    super(0, 64, 272, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 24
    self.z += 100
    @actor = actor
    @mode = 0
    @changes = [0, 0, 0, 0, 0, 0, 0, 0]
    @elem_text = ""
    @stat_text = ""
    refresh
  end
  # --------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 180, 0)
    draw_actor_parameter(@actor, 4, 32, 0)
    draw_actor_parameter(@actor, 4, 64, 1)
    draw_actor_parameter(@actor, 4, 96, 2)
    draw_actor_parameter(@actor, 4, 128, 3)
 
    draw_actor_parameter(@actor, 4, 160, 4)
    draw_actor_parameter(@actor, 4, 192, 5)
    draw_actor_parameter(@actor, 4, 224, 6)
    if @mode == 0
      self.contents.draw_text(4, 256, 200, 32, "Elemental Attack:")
      self.contents.draw_text(4, 320, 200, 32, "Status Attack:")
    end
    if @mode == 1
      self.contents.draw_text(4, 256, 200, 32, "Elemental Defense:")
      self.contents.draw_text(4, 320, 200, 32, "Status Defense:")
    end
    self.contents.draw_text(12, 288, 220, 32, @elem_text)
    self.contents.draw_text(12, 352, 220, 32, @stat_text)
    if @new_atk != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 32, 40, 32, "¨", 1)
      if @changes[0] == 0
        self.contents.font.color = normal_color
      elsif @changes[0] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 32, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 64, 40, 32, "¨", 1)
      if @changes[1] == 0
        self.contents.font.color = normal_color
      elsif @changes[1] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 64, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 96, 40, 32, "¨", 1)
      if @changes[2] == 0
        self.contents.font.color = normal_color
      elsif @changes[2] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 96, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 128, 40, 32, "¨", 1)
      if @changes[3] == 0
        self.contents.font.color = normal_color
      elsif @changes[3] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 128, 36, 32, @new_str.to_s, 2)
    end
     if @new_dex != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 160, 40, 32, "¨", 1)
      if @changes[4] == 0
        self.contents.font.color = normal_color
      elsif @changes[4] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 160, 36, 32, @new_dex.to_s, 2)
    end
      if @new_agi != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 192, 40, 32, "¨", 1)
      if @changes[5] == 0
        self.contents.font.color = normal_color
      elsif @changes[5] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 192, 36, 32, @new_agi.to_s, 2)
    end
      if @new_int != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 224, 40, 32, "¨", 1)
      if @changes[6] == 0
        self.contents.font.color = normal_color
      elsif @changes[6] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 224, 36, 32, @new_int.to_s, 2)
    end
  end
 # --------------------------------
 def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex,
    new_agi, new_int, new_eva, elem_text, stat_text)
    flag = false
    if new_atk != @new_atk || new_pdef != @new_pdef || new_mdef != @new_mdef
      flag = true
    end
    if new_str != @new_str || new_dex != @new_dex || new_agi != @new_agi
      flag = true
    end
     if new_eva != @new_eva || elem_text != @elem_text || stat_text != @stat_text
      flag = true
    end
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      @new_eva = new_eva
      @elem_text = elem_text
      @stat_text = stat_text
      if flag
        refresh
      end
  end
end


Hier mein Script Window_EquipItem:

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
class Window_EquipItem < Window_Selectable
  # --------------------------------
  def initialize(actor, equip_type)
    super(272, 256, 368, 224)
    @actor = actor
    @equip_type = equip_type
    @column_max = 1
    refresh
    self.active = false
    self.index = -1
  end
  # --------------------------------
  def item
    return @data[self.index]
  end
  # --------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    if @equip_type != 0
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        end
      end
    end
    @data.push(nil)
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 24
    for i in 0...@item_max-1
      draw_item(i)
    end
    s = @data.size-1
    self.contents.draw_text(4, s*32, 100, 32, "[Remove]")
  end
  # --------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4
    y = index * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 288, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 304, y, 24, 32, number.to_s, 2)
  end
  # --------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end


Hier mein Window_Base:

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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
#==============================================================================
# &#9632; Window_Base
#------------------------------------------------------------------------------
# &#12288;&#12466;&#12540;&#12512;&#20013;&#12398;&#12377;&#12409;&#12390;&#12398;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#12473;&#12540;&#12497;&#12540;&#12463;&#12521;&#12473;&#12391;&#12377;&#12290;
#==============================================================================
 
class Window_Base < Window
  #--------------------------------------------------------------------------
  # &#9679; &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#21021;&#26399;&#21270;
  #     x      : &#12454;&#12451;&#12531;&#12489;&#12454;&#12398; X &#24231;&#27161;
  #     y      : &#12454;&#12451;&#12531;&#12489;&#12454;&#12398; Y &#24231;&#27161;
  #     width  : &#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#24133;
  #     height : &#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#39640;&#12373;
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super()
    @windowskin_name = $game_system.windowskin_name
    self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
  end
  #--------------------------------------------------------------------------
  # &#9679; &#35299;&#25918;
  #--------------------------------------------------------------------------
  def dispose
    # &#12454;&#12451;&#12531;&#12489;&#12454;&#20869;&#23481;&#12398;&#12499;&#12483;&#12488;&#12510;&#12483;&#12503;&#12364;&#35373;&#23450;&#12373;&#12428;&#12390;&#12356;&#12428;&#12400;&#35299;&#25918;
    if self.contents != nil
      self.contents.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25991;&#23383;&#33394;&#21462;&#24471;
  #     n : &#25991;&#23383;&#33394;&#30058;&#21495; (0&#65374;7)
  #--------------------------------------------------------------------------
  def text_color(n)
    case n
    when 0
      return Color.new(255, 255, 255, 255)
    when 1
      return Color.new(128, 128, 255, 255)
    when 2
      return Color.new(255, 128, 128, 255)
    when 3
      return Color.new(128, 255, 128, 255)
    when 4
      return Color.new(128, 255, 255, 255)
    when 5
      return Color.new(255, 128, 255, 255)
    when 6
      return Color.new(255, 255, 128, 255)
    when 7
      return Color.new(192, 192, 192, 255)
    else
      normal_color
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#36890;&#24120;&#25991;&#23383;&#33394;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def normal_color
    return Color.new(255, 255, 255, 255)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#28961;&#21177;&#25991;&#23383;&#33394;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def disabled_color
    return Color.new(255, 255, 255, 128)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12471;&#12473;&#12486;&#12512;&#25991;&#23383;&#33394;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def system_color
    return Color.new(192, 224, 255, 255)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12500;&#12531;&#12481;&#25991;&#23383;&#33394;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def crisis_color
    return Color.new(255, 255, 64, 255)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25126;&#38360;&#19981;&#33021;&#25991;&#23383;&#33394;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def knockout_color
    return Color.new(255, 64, 0)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12524;&#12540;&#12512;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update
    super
    # &#12454;&#12451;&#12531;&#12489;&#12454;&#12473;&#12461;&#12531;&#12364;&#22793;&#26356;&#12373;&#12428;&#12383;&#22580;&#21512;&#12289;&#20877;&#35373;&#23450;
    if $game_system.windowskin_name != @windowskin_name
      @windowskin_name = $game_system.windowskin_name
      self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12464;&#12521;&#12501;&#12451;&#12483;&#12463;&#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#21517;&#21069;&#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 120, 32, actor.name)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12463;&#12521;&#12473;&#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 236, 32, actor.class_name)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12524;&#12505;&#12523;&#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, "Lv")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25551;&#30011;&#29992;&#12398;&#12473;&#12486;&#12540;&#12488;&#25991;&#23383;&#21015;&#20316;&#25104;
  #     actor       : &#12450;&#12463;&#12479;&#12540;
  #     width       : &#25551;&#30011;&#20808;&#12398;&#24133;
  #     need_normal : [&#27491;&#24120;] &#12364;&#24517;&#35201;&#12363;&#12393;&#12358;&#12363; (true / false)
  #--------------------------------------------------------------------------
  def make_battler_state_text(battler, width, need_normal)
    # &#25324;&#24359;&#12398;&#24133;&#12434;&#21462;&#24471;
    brackets_width = self.contents.text_size("[]").width
    # &#12473;&#12486;&#12540;&#12488;&#21517;&#12398;&#25991;&#23383;&#21015;&#12434;&#20316;&#25104;
    text = ""
    for i in battler.states
      if $data_states[i].rating >= 1
        if text == ""
          text = $data_states[i].name
        else
          new_text = text + "/" + $data_states[i].name
          text_width = self.contents.text_size(new_text).width
          if text_width > width - brackets_width
            break
          end
          text = new_text
        end
      end
    end
    # &#12473;&#12486;&#12540;&#12488;&#21517;&#12398;&#25991;&#23383;&#21015;&#12364;&#31354;&#12398;&#22580;&#21512;&#12399; "[&#27491;&#24120;]" &#12395;&#12377;&#12427;
    if text == ""
      if need_normal
        text = "[Normal]"
      end
    else
      # &#25324;&#24359;&#12434;&#12388;&#12369;&#12427;
      text = "[" + text + "]"
    end
    # &#23436;&#25104;&#12375;&#12383;&#25991;&#23383;&#21015;&#12434;&#36820;&#12377;
    return text
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12473;&#12486;&#12540;&#12488;&#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #     width : &#25551;&#30011;&#20808;&#12398;&#24133;
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 120)
    text = make_battler_state_text(actor, width, true)
    self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
    self.contents.draw_text(x, y, width, 32, text)
  end
  #--------------------------------------------------------------------------
  # &#9679; EXP &#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def draw_actor_exp(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 24, 32, "E")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  end
  #--------------------------------------------------------------------------
  # &#9679; HP &#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #     width : &#25551;&#30011;&#20808;&#12398;&#24133;
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 144)
    # &#25991;&#23383;&#21015; "HP" &#12434;&#25551;&#30011;
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    # MaxHP &#12434;&#25551;&#30011;&#12377;&#12427;&#12473;&#12506;&#12540;&#12473;&#12364;&#12354;&#12427;&#12363;&#35336;&#31639;
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    # HP &#12434;&#25551;&#30011;
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    # MaxHP &#12434;&#25551;&#30011;
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; SP &#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #     width : &#25551;&#30011;&#20808;&#12398;&#24133;
  #--------------------------------------------------------------------------
  def draw_actor_sp(actor, x, y, width = 144)
    # &#25991;&#23383;&#21015; "SP" &#12434;&#25551;&#30011;
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    # MaxSP &#12434;&#25551;&#30011;&#12377;&#12427;&#12473;&#12506;&#12540;&#12473;&#12364;&#12354;&#12427;&#12363;&#35336;&#31639;
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    # SP &#12434;&#25551;&#30011;
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    # MaxSP &#12434;&#25551;&#30011;
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12497;&#12521;&#12513;&#12540;&#12479;&#12398;&#25551;&#30011;
  #     actor : &#12450;&#12463;&#12479;&#12540;
  #     x     : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y     : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #     type  : &#12497;&#12521;&#12513;&#12540;&#12479;&#12398;&#31278;&#39006; (0&#65374;6)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = $data_system.words.atk
      parameter_value = actor.atk
    when 1
      parameter_name = $data_system.words.pdef
      parameter_value = actor.pdef
    when 2
      parameter_name = $data_system.words.mdef
      parameter_value = actor.mdef
    when 3
      parameter_name = $data_system.words.str
      parameter_value = actor.str
    when 4
      parameter_name = $data_system.words.dex
      parameter_value = actor.dex
    when 5
      parameter_name = $data_system.words.agi
      parameter_value = actor.agi
    when 6
      parameter_name = $data_system.words.int
      parameter_value = actor.int
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12450;&#12452;&#12486;&#12512;&#21517;&#12398;&#25551;&#30011;
  #     item : &#12450;&#12452;&#12486;&#12512;
  #     x    : &#25551;&#30011;&#20808; X &#24231;&#27161;
  #     y    : &#25551;&#30011;&#20808; Y &#24231;&#27161;
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end
  # --------------------------------
  def up_color
    return Color.new(74, 210, 74)
  end
  # --------------------------------
  def down_color
    return Color.new(170, 170, 170)
  end
Als ich dieses Dokument verfasst habe, war ich bei vollem Bewusstsein und bin mir im klaren, welche Folgen dieses Dokument nach sich ziehen wird. PS.: WoW- Ersatz (kostenlos):SilkroadOnline! Geht gleich auf http://www.silkroadonline.net und ledet es euch dort runter!!!

6

Sonntag, 11. Dezember 2005, 21:31

Vielen Dank ^^
hatt zuerst befürchtet es liege an den anderen scripts,
muß wohl einfach beim cut&paste ein fehler gemacht haben ^^

danke jetzt funktioniert mal wieder alles :)

Social Bookmarks