Ogłoszenie |
Administracja Forum
|
Rodzaje monet |
Autor |
Wiadomość |
puchatek07
Preferowany:
Dołączył: 16 Lis 2011 Posty: 12
|
Wysłany: Sro 28 Gru, 2011 23:00
|
|
Rodzaje monet
|
~Rodzaje monet VX~
Twórca:
Tłumaczenie:
Opis:
Kod: | Zmienia tradycyjne monety na złote,srebrne i brązowe. |
Skrypt:
Kod: | #=============================================
# ** Oni Monetary System
#---------------------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
# Remember: MAX_GOLD always is 999.999
# Do not make a item that costs more than that
#==============================================
module OnidsouzaGold
# OPTIONAL
#If not using icons
GOLD = "Z"
SILVER = "S"
BRONZE = "B"
USE_ICON = true
#If using icons, icon ID
GOLD_ICON = 102
SILVER_ICON = 98
BRONZE_ICON = 97
end
class Game_Party < Game_Unit
alias onidsouzagoldinit initialize
def initialize
onidsouzagoldinit
@gold = [0, 0, 0]
end
def gold_array
return @gold
end
def gold
return total_gold
end
def gain_gold(n)
@gold[2] += n
update_gold
end
def lose_gold(n)
gain_gold(-n)
end
def total_gold
return (@gold[2] + (@gold[1]*100) + (@gold[0]*1000000))
end
def gold_to_silver
return (@gold[2]/100) + (@gold[1]) + (@gold[0]*100)
end
def gold_to_gold
return @gold[0] + (@gold[1]/100) + (@gold[2]/100000)
end
def update_gold
times = @gold[2] / 100
@gold[2] -= times * 100
@gold[1] += times
times = @gold[1] / 100
@gold[1] -= times * 100
@gold[0] += times
if @gold[0] > 99
@gold[0] = @gold[1] = @gold[2] = 99
end
end
def make_gold_text
return to_monetary_system(total_gold)
end
end
class Window_Base < Window
def draw_currency_value(value, x, y, width, gold = true)
if not OnidsouzaGold::USE_ICON
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width, WLH, to_monetary_system(value), 2)
elsif OnidsouzaGold::USE_ICON and gold
self.contents.font.color = normal_color
xx = 20
draw_icon(OnidsouzaGold::GOLD_ICON, x, y)
self.contents.draw_text(x + 20, y, xx, WLH, $game_party.gold_array[0])
x += 40
draw_icon(OnidsouzaGold::SILVER_ICON, x, y)
self.contents.draw_text(x + 20, y, xx, WLH, $game_party.gold_array[1])
x += 40
draw_icon(OnidsouzaGold::BRONZE_ICON, x, y)
self.contents.draw_text(x + 20, y, xx, WLH, $game_party.gold_array[2])
else
arr = to_monetary_array(value)
self.contents.font.color = normal_color
xx = 20
draw_icon(OnidsouzaGold::GOLD_ICON, x, y)
self.contents.draw_text(x + 20, y, xx, WLH, arr[0])
x += 40
draw_icon(OnidsouzaGold::SILVER_ICON, x, y)
self.contents.draw_text(x + 20, y, xx, WLH, arr[1])
x += 40
draw_icon(OnidsouzaGold::BRONZE_ICON, x, y)
self.contents.draw_text(x + 20, y, xx, WLH, arr[2])
end
end
end
class Window_ShopBuy < Window_Selectable
def draw_item(index)
item = @data[index]
number = $game_party.item_number(item)
enabled = (item.price <= $game_party.total_gold and number < 99)
rect = item_rect(index)
self.contents.clear_rect(rect)
if item != nil
draw_icon(item.icon_index, rect.x, rect.y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
wid = contents.text_size(item.name).width
self.contents.draw_text(rect.x + 24, rect.y, wid, WLH, item.name)
end
#rect.width -= 4
price = to_monetary_system(item.price)
self.contents.draw_text(rect.x + 24 + wid, rect.y, rect.width - 24 - wid, WLH, price, 2)
# NEW
#self.contents.draw_text(rect.x + 30, rect.y, rect.width - rect.x - 30, WLH, to_monetary_system(item.price), 2)
#draw_currency_value(item.price, rect.x + rect.width + 8, rect.y, rect.width, false, )
end
end
def to_monetary_system(integ)
data = [0, 0, 0]
data[2] = integ
times = data[2] / 100
data[2] -= times * 100
data[1] += times
times = data[1] / 100
data[1] -= times * 100
data[0] += times
return "#{data[0]} #{OnidsouzaGold::GOLD} - #{data[1]} #{OnidsouzaGold::SILVER} - #{data[2]} #{OnidsouzaGold::BRONZE}"
end
def to_monetary_array(integ)
data = [0, 0, 0]
data[2] = integ
times = data[2] / 100
data[2] -= times * 100
data[1] += times
times = data[1] / 100
data[1] -= times * 100
data[0] += times
return data
end |
Skrypt wkleja się jak każdy inny.
Screen niepotrzebny.
Demo:
http://www.megaupload.com/?d=3J4Z7WGG |
________________________ Praca nad Energy Kurii trwa.
Fabuła 3%
Grafika 5%
Skrypty 50%
Inne 8%
Ogólnie 2%
|
|
|
|
Root'N
Preferowany:
Pomógł: 2 razy Dołączył: 23 Lis 2011 Posty: 16 Skąd: Kraków :)
|
Wysłany: Czw 29 Gru, 2011 08:07
|
|
|
mi brązowa moneta nie pasuje bo wygląda jak jakaś czarny amulet xD
skrypt fajniutki musze przyznać i właśnie chyba tego mi brakowało :) polecam |
________________________ Poffraczam! Nikt mnie nie zna, ale co tam... |
|
|
|
tracersgta
Preferowany:
Pomógł: 45 razy Dołączył: 10 Sty 2011 Posty: 612 Skąd: mam wiedzieć?
|
Wysłany: Czw 29 Gru, 2011 08:48
|
|
|
Cytat: | Tłumaczenie:
Puchatek07 |
Jest tam tylko jedno zdanie(nie ma konfiguracji), które i tak nie jest przetłumaczone...
Skrypt podobny już był na forum... |
________________________ I'm a tiger! I roar. I hunt, I climb, I eat, I wash, I sleep!
Gość, jeżeli pomogłem daj "Pomógł"
|
|
|
|
puchatek07
Preferowany:
Dołączył: 16 Lis 2011 Posty: 12
|
Wysłany: Czw 29 Gru, 2011 09:18
|
|
|
Tak ale tam w iconset nie ma żadnej brązowej. Jak ci nie pasuje to sobie zmień. |
________________________ Praca nad Energy Kurii trwa.
Fabuła 3%
Grafika 5%
Skrypty 50%
Inne 8%
Ogólnie 2%
|
|
|
|
misterbanan
Preferowany:
Dołączył: 07 Kwi 2013 Posty: 8 Skąd: Zamość
|
Wysłany: Nie 07 Kwi, 2013 14:07
|
|
|
pomogłęś mi bardzo
[ Dodano: Nie 14 Kwi, 2013 09:47 ]
spoko skrypt
|
|
|
|
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum
|
Dodaj temat do Ulubionych Wersja do druku
|
|