• Anmelden

Joschie

Ankömmling

  • »Joschie« ist der Autor dieses Themas

Motto: Cola schmeckt besser als aus'm Glas.

  • Nachricht senden

1

Freitag, 23. September 2011, 19:07

Gold, Silber, Bronze

Ich suche ein Script in dem die Goldmenge umgerechnet wird.
Das man nicht mehr nur Gold hat, sondern Gold Silber und Bronze.

z.B. Increase Gold +1 wäre 1 Bronze
Increase Gold + 100 wäre 1 Silber
Increase Gold + 10000 wäre dann 1 Gold
und 10521 wäre dann dementsprechend 1 Gold 5 Silber 21 Bronze

Das soll dann mit Bitmaps gezeigt werden...die hab ich auch schon
deren Namen "gold" "silber" "bronze", wie auch sonst.
Ich krieg das irgwie nich hin :-|

Danke im voraus
Joschie

Aktuelles Projekt


Spoiler

Name: Memories
Maker: :rmxp:
Story: Grundgerüst fertig, jetz geht's ans eingemachte :D
Scripts: ca. 70-80%
RTP: Noch Standard
Maps: Eins nach dem anderen
Gesamtfortschritt: ca. 5%
zum Lesen den Text mit der Maus markieren

Einschätzung meiner Fähigkeiten


Spoiler

Scripten: :star: :star: :star-half: :star-empty: :star-empty:
Story: :star: :star: :star-empty: :star-empty: :star-empty:
Mappen: :star: :star: :star-half: :star-empty: :star-empty:
Events: :star: :star: :star-half: :star-empty: :star-empty:
Pixeln: :star-half: :star-empty: :star-empty: :star-empty: :star-empty:
Musik: :star-empty: :star-empty: :star-empty: :star-empty: :star-empty:
zum Lesen den Text mit der Maus markieren

Irrlicht

Leuchtendes Irgendwas

Motto: Keep shining!

  • Nachricht senden

2

Montag, 26. September 2011, 23:17

Huhu,

Hab mal etwas zusammengebastelt:
Spoiler: Part 1

Ruby 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
class Bitmap
 
  def draw_money(x, y, width, value)
    # ----------------------------------------------------- #
    # Umrechnung:  Gold     ,        Silber      ,   Bronze
    values = [ value / 10000, value % 10000 / 100, value % 100 ]
    # verwendete Icons:
    icon_names = ["Gold", "Silber", "Bronze"]
    # Anzeigeoptionen:
    display_type = 1  # -> 0 : Jede Geldeinheit wird nur dann angezeigt wenn
                      #        sie wenigstens einmal vorhanden ist. Ausnahme:
                      #        Bronze wird trotzdem angezeigt wenn der Gesammt-
                      #        wert 0 beträgt.
                      #    1 : Jede Geldeinheit wird nur dann angezeigt, wenn
                      #        sie oder eine höhere Geldeinheit wenigstens ein-
                      #        mal vorhanden ist. Selbe Ausnahme wie bei Typ 0.
                      #    2 : Jede Geldeinheit wird angezeigt, unabhängig von
                      #        der angezeigten Geldmenge.
    leftspace  = 0    # -> Freier Platz zwischen dem linken Rand eines Icons und
                      #    der dazugehörigen Geldmenge.
    rightspace = 2    # -> Freier Platz zwischen dem rechten Rand eines Icons und
                      #    dem dahinterstehenden Text. Bezieht sich nicht auf
                      #    den Abstand zwischen Icon und Bildrand.
                      #    Der Platz wird verringert
                      #    wenn der Platz anderenfalls nicht ausreicht um die
                      #    vollständige Geldmenge zu zeichnen.
    icon_add_y = -1   # -> Zusätzliche Verschiebung des Icons nach unten.
                      #    Anpassen um die Position des Icons zu korrigieren.
    textsize  = 20    # -> Textgröße (Standardtextgröße = 22)
    textbold  = true  # -> Fettdruck (<true> oder <false> einsetzen)
    textwidth = 0     # -> Mindestbreite für jeden Geldmengentext.
    # ----------------------------------------------------- #
    # Font verändern:
    lastfont = self.font.dup
    self.font.size = textsize
    self.font.bold = textbold
    # Listen setzen:
    texts = Array.new
    icons = Array.new
    icon_names.each_with_index do |name, index|
      # nächster wenn diese Geldeinheit ignoriert werden soll:
      next unless index == icon_names.size - 1 or values[index] > 0 or
                  display_type == 2 or (display_type == 1 and not texts.empty?)
      # Listen füllen:
      texts.push(values[index].to_s)
      icons.push(RPG::Cache.icon(name))
    end
    # benötigten Platz ermitteln:
    req_width = texts.size * (leftspace + rightspace) - rightspace
    texts.each_with_index do |text, index|
      tw = self.text_size(text).width
      tw = [tw, textwidth].max if index > 0
      req_width += tw + icons[index].width
    end
    # leftspace/rightspace ggf. verringern:
    if req_width > width
      sub = (req_width - width - 1) / (texts.size * 2 - 1) + 1
      leftspace -= sub
      rightspace -= sub
    end
    # Zeichnen:
    akt_x = x + width  # aktuelle x-Position
    until texts.empty?
      # - Icon
      icon = icons.pop
      akt_x -= icon.width
      self.blt(akt_x, y + icon_add_y + (32 - icon.height) / 2, icon, icon.rect)
      # - Leftspace + Text + Rightspace
      text = texts.pop
      tw = self.text_size(text).width
      akt_x -= leftspace + [tw, textwidth].max
      self.draw_text(akt_x, y, tw, 32, text, 2)
      akt_x -= rightspace
    end
    # Font zurücksetzen:
    self.font = lastfont
    # benötigte Breite zurückgeben:
    return x + width - (akt_x + rightspace)
  end
end
zum Lesen den Text mit der Maus markieren
Spoiler

Ruby 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
class Window_Gold < Window_Base
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_money(0, 0, self.contents.width, $game_party.gold)
  end
end
 
 
class Window_ShopBuy < Window_Selectable
 
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    # Get items in possession
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    # If price is less than money in possession, and amount in possession is
    # not 99, then set to normal text color. Otherwise set to disabled color
    if item.price <= $game_party.gold and number < 99
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4
    y = index * 32
    rect = Rect.new(x, y, self.width - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_money(x + 240 - 40, y, 88 + 40, item.price)
  end
end
 
 
class Window_ShopNumber < Window_Base
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_item_name(@item, 4, 96)
    self.contents.font.color = normal_color
    self.contents.draw_text(272, 96, 32, 32, "×")
    self.contents.draw_text(308, 96, 24, 32, @number.to_s, 2)
    self.cursor_rect.set(304, 96, 32, 32)
    # Draw total price and currency units
    total_price = @price * @number
    self.contents.draw_money(4, 160, 326, total_price)
  end
end
 
 
class Window_BattleResult < Window_Base
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(@exp.to_s).width
    self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
    x += cx + 4
    self.contents.font.color = system_color
    cx = contents.text_size("EXP").width
    self.contents.draw_text(x, 0, 64, 32, "EXP")
    x += cx + 20
    # ----
    self.contents.font.color = normal_color
    help_bitmap = Bitmap.new(128, 32)
    cw = help_bitmap.draw_money(0, 0, 128, @gold)
    self.contents.blt(x, 2, help_bitmap, Rect.new(128 - cw, 0, cw, 32))
    help_bitmap.dispose
    # ----
    y = 32
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
  end
end
zum Lesen den Text mit der Maus markieren


Allerdings gibt es auch ein paar Punkte die zur Zeit noch problematisch werden könnten, so ist das Script bisher z.B. nur auf die Standardscripts ausgelegt (bzw. auf die in Part 2 geänderten Fenster), andere Scripts verwenden möglicherweise eine andere Darstellung.
Zudem ist gerade im Geld-Fenster nur begrenzt Platz vorhanden, bei den derzeitigen Einstellungen (siehe Part 1 bis Zeile 31) bleiben für die drei Icons bei maximaler Geldmenge etwa 61 Pixel Platz (je nach verwendetem Font). Die einzelnen Stücke werden zusammengeschoben wenn die Breite zu groß wird, trotzdem würde ich hier evtl. zu etwas kleineren Icons (ich hab zum testen 18x18 Pixel große Bilder verwendet) raten.
Wenn du die Schriftgröße veränderst müsste zudem evtl. in Part 2 in Zeile 89 die Y-Position des Geldbetrags auf dem "Kampfergebnis"-Fenster korrigiert werden, indem du die einzelne 2 in dieser Zeile anpasst. Zur Zeit sieht die Anpassung an diesem Fenster zugegebenermaßen noch recht behelfsmäßig aus... :pardon:

Joschie

Ankömmling

  • »Joschie« ist der Autor dieses Themas

Motto: Cola schmeckt besser als aus'm Glas.

  • Nachricht senden

3

Mittwoch, 5. Oktober 2011, 20:22

Nun ich geb zu, ich hab nicht die standard version des menüs...
Aber da ich das menü selbst geändert hab, werd ich das Geld system
da einzubauen...da ist auch viel mehr platz für die Geldanzeige ^^
Und zudem nutze ich das battle report script...weiss grad net von wem das war^^
und falls ich noch aud die Idee komm das Shop window zu bearbeiten, werd ich
das Geld da hoffentlich auch einbauen können...es ging im grunde
nur um das erstellen der Wärung, da ich da nicht ganz mit zurecht komm^^
ich werd das Script bei gelegenheit testen.


Edit:
So habs getestet und umgebaut und es funktioniert, es wird auch nichts gequetscht und das mit 24x24 pics ^^
einziges problem jetzt noch: mir wird jetzt nicht mehr der gewonnene Geldbetrag im Battle Report angezeigt,
nur der alte betrag und nach Klick, der neue Betrag.
Nicht nötig, wäre aber wünschenswert :-P

Engefügter Code: Zeile 168-169
Battle Report:
Spoiler

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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
class Game_Actor < Game_Battler
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
 
      # NEW - David
      $d_new_skill = nil
 
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
 
          # NEW - David
          skill = $data_skills[j.skill_id]
          $d_new_skill = skill.name
 
        end
      end
    end
    while @exp < @exp_list[@level]
      @level -= 1
    end
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
 
  #--------------------------------------------------------------------------
  # * Get the current EXP
  #--------------------------------------------------------------------------
  def now_exp
    return @exp - @exp_list[@level]
  end
  #--------------------------------------------------------------------------
  # * Get the next level's EXP
  #--------------------------------------------------------------------------
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
 
end
 
class Window_LevelUp < Window_Base
 
  #----------------------------------------------------------------
  def initialize(actor, pos)
    #change this to false to show the actor's graphic
    @face = false
    @actor = actor
    y = (pos * 120)
    super(280, y, 360, 120)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 255    
    if $d_dum == false
      refresh
    end
  end
 
  #----------------------------------------------------------------
  def dispose
    super
  end
 
  #----------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.size = 18
    if @face == true
    draw_actor_face(@actor, 4, 0)
    else
    draw_actor_graphic(@actor, 50, 80)
    end
    draw_actor_name(@actor, 111, 0)
    draw_actor_level(@actor, 186, 0)
    show_next_exp = @actor.level == 99 ? "---" : "#{@actor.next_exp}"
    min_bar = @actor.level == 99 ? 1 : @actor.now_exp
    max_bar = @actor.level == 99 ? 1 : @actor.next_exp
    draw_slant_bar(115, 80, min_bar, max_bar, 190, 6, bar_color = Color.new(0, 100, 0, 255), end_color = Color.new(0, 255, 0, 255))
    self.contents.draw_text(115, 24, 300, 32, "Exp:#{@actor.now_exp}")
    self.contents.draw_text(115, 48, 300, 32, "Level Up:" + show_next_exp)
  end
 
 
  #----------------------------------------------------------------
  def level_up
    self.contents.font.color = system_color
    self.contents.draw_text(230, 48, 80, 32, Vocabulary::LVL_UP)
  end
 
  #----------------------------------------------------------------
  def update
    super
  end
 
end # of Window_LevelUp
 
#=================================
#Window_EXP
# Written by: David Schooley
#=================================
 
class Window_EXP < Window_Base
 
  #----------------------------------------------------------------
  def initialize(exp)
    super(0, 0, 280, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 255
    refresh(exp)
  end
 
  #----------------------------------------------------------------
  def dispose
    super
  end
 
  #----------------------------------------------------------------
  def refresh(exp)
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 150, 32, Vocabulary::EXP_ERHALTEN)
    self.contents.font.color = normal_color
    self.contents.draw_text(180, 0, 54, 32, exp.to_s, 2)
  end
 
  #----------------------------------------------------------------
  def update
    super
  end
 
end # of Window_EXP
 
#=================================
#Window_Money_Items
# Written by: David Schooley
#=================================
 
class Window_Money_Items < Window_Base
 
  #----------------------------------------------------------------
  def initialize(money, treasures)
    @treasures = treasures
    super(0, 60, 280, 420)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 255
    refresh(money)
  end
 
  #----------------------------------------------------------------
  def dispose
    super
  end
 
  #----------------------------------------------------------------
  def refresh(money)
    @money = money
    self.contents.clear
 
    self.contents.font.color = system_color
    self.contents.draw_text(4, 4, 100, 32, Vocabulary::ITEM_FOUND)
    self.contents.font.color = normal_color
 
    y = 32
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
    self.contents.font.color = normal_color
    self.contents.draw_money(0, 356, self.contents.width, $game_party.gold)
  end
 
  def update
    super
  end
 
end # of Window_Money_Items
 
 
class Scene_Battle
  alias raz_battle_report_main main
  alias raz_battle_report_be battle_end
 
  def main
    # NEW - David
    #$battle_end = false
    @lvup_window = []
    @show_dummies = true # Show dummy windows or not?
    raz_battle_report_main
    # NEW - David
    @lvup_window = nil
    @level_up = nil
    @ch_stats = nil
    @ch_compare_stats = nil
  end
 
  def battle_end(result)
    raz_battle_report_be(result)
    # NEW - David
    @spriteset.dispose
    Graphics.transition
    if result == 0
      display_lv_up(@exp, @gold, @treasures)
      loop do
        Graphics.update
        Input.update
        if Input.trigger?(Input::C)
          break
        end
      end
      trash_lv_up
    end
 
  end
 
  def start_phase5
    @phase = 5
    $game_system.me_play($game_system.battle_end_me)
    $game_system.bgm_play($game_temp.map_bgm)
    exp = 0
    gold = 0
    treasures = []
    for enemy in $game_troop.enemies
      unless enemy.hidden
        exp += enemy.exp
        gold += enemy.gold
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    treasures = treasures[0..5]
 
    # NEW - David
    @treasures = treasures
    @exp  = exp
    @gold = gold
 
 
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    @phase5_wait_count = 10
  end
 
  def update_phase5
    if @phase5_wait_count > 0
      @phase5_wait_count -= 1
      if @phase5_wait_count == 0
 
        # NEW - David
        $game_temp.battle_main_phase = false        
      end
      return
    end
 
    # NEW - David
      battle_end(0)
 
  end
 
  def display_lv_up(exp, gold, treasures)
 
    $d_dum = false
    d_extra = 0
    i = 0
    for actor in $game_party.actors
        # Fill up the Lv up windows
        @lvup_window[i] = Window_LevelUp.new($game_party.actors[i], i)
        i += 1
    end
 
    # Make Dummies
    if @show_dummies == true
      $d_dum = true
      for m in i..3
        @lvup_window[m] = Window_LevelUp.new(m, m)
      end
    end
 
    @exp_window = Window_EXP.new(exp)
    @m_i_window = Window_Money_Items.new(gold, treasures)
    @press_enter = nil
    gainedexp = exp
    @level_up = [0, 0, 0, 0]
    @d_new_skill = ["", "", "", ""]
    @d_breakout = false
    @m_i_window.refresh(gold)
    wait_for_OK
 
    @d_remember = $game_system.bgs_memorize
    Audio.bgs_play("Audio/SE/032-Switch01", 100, 300)
 
    # NEW - David
    max_exp = exp
    value = 28
    if exp < value
      value = exp
    end
    if value == 0
      value = 1
    end
    for n in 0..gainedexp - (max_exp / value)
      exp -= (max_exp / value)
      if @d_breakout == false
        Input.update
      end
 
      for i in 0...$game_party.actors.size
        actor = $game_party.actors[i]
        if actor.cant_get_exp? == false
          last_level = actor.level
          actor.exp += (max_exp / value)
          # Fill up the Lv up windows
          if @d_breakout == false
            @lvup_window[i].refresh
            @exp_window.refresh(exp)
          end
 
          if actor.level > last_level
            @level_up[i] = 5
            Audio.se_play("Audio/SE/056-Right02.ogg", 70, 150)
            if $d_new_skill
              @d_new_skill[i] = $d_new_skill
            end
          end
 
          if @level_up[i] == 0
            @d_new_skill[i] = ""
          end
 
          if @level_up[i] > 0
            @lvup_window[i].level_up
          end
 
          if Input.trigger?(Input::C) or exp <= 0
            @d_breakout = true
          end
        end
 
        if @d_breakout == false
          if @level_up[i] >0
            @level_up[i] -= 1
          end
          Graphics.update
        end
      end
 
      if @d_breakout == true
        for i in 0...$game_party.actors.size
          actor = $game_party.actors[i]
          if actor.cant_get_exp? == false
            actor.exp += exp
          end
        end
        exp = 0
        break
      end
    end
    Audio.bgs_stop
    @d_remember = $game_system.bgs_restore
 
    for i in 0...$game_party.actors.size
      @lvup_window[i].refresh
    end
    @exp_window.refresh(exp)
    Audio.se_play("Audio/SE/006-System06.ogg", 70, 150)
    $game_party.gain_gold(gold)
    @m_i_window.refresh(0)
    Graphics.update
  end
 
  def trash_lv_up
    # NEW - David
    i=0
 
    for i in 0 ... 4
      @lvup_window[i].visible = false
    end
    @exp_window.visible = false
    @m_i_window.visible = false
    @lvup_window = nil
    @exp_window = nil
    @m_i_window = nil
  end
 
  # Wait until OK key is pressed
  def wait_for_OK
    loop do
      Input.update
      Graphics.update
      if Input.trigger?(Input::C)
        break
      end
    end
  end
 
end
 
class Window_Base < Window
  def draw_actor_face(actor, x, y)
    bitmap = RPG::Cache.picture("Faces/" + actor.character_name)
    self.contents.blt(x, y, bitmap, Rect.new(0,0,96,96))
  end
 
  #--------------------------------------------------------------------------
  # * Draw Slant Bar(by SephirothSpawn)
  #--------------------------------------------------------------------------
  def draw_slant_bar(x, y, min, max, width = 152, height = 6,
      bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
    # Draw Border
    for i in 0..height
      self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
    end
    # Draw Background
    for i in 1..(height - 1)
      r = 100 * (height - i) / height + 0 * i / height
      g = 100 * (height - i) / height + 0 * i / height
      b = 100 * (height - i) / height + 0 * i / height
      a = 255 * (height - i) / height + 255 * i / height
      self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
    end
    # Draws Bar
    for i in 1..( (min / max.to_f) * width - 1)
      for j in 1..(height - 1)
        r = bar_color.red * (width - i) / width + end_color.red * i / width
        g = bar_color.green * (width - i) / width + end_color.green * i / width
        b = bar_color.blue * (width - i) / width + end_color.blue * i / width
        a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
        self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
      end
    end
  end
end
zum Lesen den Text mit der Maus markieren

Aktuelles Projekt


Spoiler

Name: Memories
Maker: :rmxp:
Story: Grundgerüst fertig, jetz geht's ans eingemachte :D
Scripts: ca. 70-80%
RTP: Noch Standard
Maps: Eins nach dem anderen
Gesamtfortschritt: ca. 5%
zum Lesen den Text mit der Maus markieren

Einschätzung meiner Fähigkeiten


Spoiler

Scripten: :star: :star: :star-half: :star-empty: :star-empty:
Story: :star: :star: :star-empty: :star-empty: :star-empty:
Mappen: :star: :star: :star-half: :star-empty: :star-empty:
Events: :star: :star: :star-half: :star-empty: :star-empty:
Pixeln: :star-half: :star-empty: :star-empty: :star-empty: :star-empty:
Musik: :star-empty: :star-empty: :star-empty: :star-empty: :star-empty:
zum Lesen den Text mit der Maus markieren

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Joschie« (5. Oktober 2011, 20:22)


Irrlicht

Leuchtendes Irgendwas

Motto: Keep shining!

  • Nachricht senden

4

Mittwoch, 5. Oktober 2011, 20:57

Beim "quetschen" bin ich von einer verfügbaren Breite von 128 Pixel ausgegangen, wenn mehr Platz da ist kann natürlich auch mehr gefüllt werden^^

Ich habs jetzt nicht ausprobiert, aber versuch mal in der besagten Zeile $game_party.gold zu entfernen und stattdessen wahlweise money oder @money einzusetzen:
$game_party.gold liefert die Geldmenge, die deine Party zu diesem Zeitpunkt besitzt wärend @money in diesem Zusammenhang die gewonnene Geldmenge beinhalten sollte.

Joschie

Ankömmling

  • »Joschie« ist der Autor dieses Themas

Motto: Cola schmeckt besser als aus'm Glas.

  • Nachricht senden

5

Mittwoch, 5. Oktober 2011, 21:13

bestens, jetzt geht auch dieses...
was eine zeile code ausmachen kann^^

Aktuelles Projekt


Spoiler

Name: Memories
Maker: :rmxp:
Story: Grundgerüst fertig, jetz geht's ans eingemachte :D
Scripts: ca. 70-80%
RTP: Noch Standard
Maps: Eins nach dem anderen
Gesamtfortschritt: ca. 5%
zum Lesen den Text mit der Maus markieren

Einschätzung meiner Fähigkeiten


Spoiler

Scripten: :star: :star: :star-half: :star-empty: :star-empty:
Story: :star: :star: :star-empty: :star-empty: :star-empty:
Mappen: :star: :star: :star-half: :star-empty: :star-empty:
Events: :star: :star: :star-half: :star-empty: :star-empty:
Pixeln: :star-half: :star-empty: :star-empty: :star-empty: :star-empty:
Musik: :star-empty: :star-empty: :star-empty: :star-empty: :star-empty:
zum Lesen den Text mit der Maus markieren

Ähnliche Themen

Social Bookmarks