Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Anthonyaiken

NEED HELP with this VX Script

Recommended Posts

I was wondering if there's a way to make this scrip work in XP I really don't use VX

 

 

 

#===============================================================================

#===============================================================================

#===============================================================================

#========================Shop FF-XII============================================

#===============================================================================

#===============================================================================

#========================by: Master I===========================================

#===============================================================================

#===============================================================================

#===============================================================================

 

#######################

#Configurações do Shop#

#######################

module Pernalonga

#############################################

#Configurações de Fonte, Tamanho e Descrição#

#############################################

#===============================================================================

#Fonte usada para a exibição dos itens, da janela help e números

#-------------------------------------------------------------------------------

Shop_Fonte = "Arial Narrow" #Fonte

Shop_Tamanho = 16 #Tamanho

 

#===============================================================================

#Descrição exibida, as duas últimas opções você pode trocar a fonte e o tamanho.

#-------------------------------------------------------------------------------

Shop_Descrição = []

Shop_Descrição = ["Armas","Escudos","Armaduras","Elmos","Acessórios","Itens","Arial Black", 18]

 

#===============================================================================

#Nomes apresentados para os itens, você também pode trocar de fonte e tamanho nas

#duas últimas opções.

#-------------------------------------------------------------------------------

Shop_Name = []

Shop_Name = ["Nome","Preço","Quantidade","Inventório","Impact", 16]

 

#===============================================================================

#Se trata da janela Help (Exibida em cima) para a descrição dos comandos.

#Essa parte é quando se compra no shop.

#-------------------------------------------------------------------------------

Shop_Help_Buy = []

Shop_Help_Buy = ["Comprar Armas","Comprar Escudos","Comprar Armaduras","Comprar Elmos","Comprar Acessorios","Comprar Itens"]

 

#===============================================================================

#Essa é a parte quando se vende os itens.

#-------------------------------------------------------------------------------

Shop_Help_Sell = []

Shop_Help_Sell = ["Vender Armas","Vender Escudos","Vender Armaduras","Vender Elmos","Vender Acessorios","Vender Itens"]

 

##########################

#Configuração das imagens#

##########################

#===============================================================================

#Se trata das imagens exibidas no shop, elas devem ficar na pasta pictures.

#-------------------------------------------------------------------------------

Shop_Armas = "shop_armas" #Imagem do ícone da arma

Shop_Escudos = "shop_escudo" #Imagem do ícone do escudo

Shop_Armaduras = "shop_armadura" #Imagem do ícone da armadura

Shop_Elmos = "shop_elmo" #Imagem do ícone do elmo

Shop_Acessorios = "shop_acessorios" #Imagem do ícone dos acessorios

Shop_Itens = "shop_itens" #Imagem do ícone dos itens

Shop_Help = "Help" #Imagem do ícone de ajuda

Shop_Borda = "Borda" #Imagem das bordas

Shop_Fundo = "Back" #Imagem de fundo

Shop_Fundo_Opacidade = 100 #Opacidade do fundo

 

#######################

#Fim das Configurações#

#######################

 

 

#!!!!!!!!!!!!!!!!!!!!!!!!!

#Variavel Global não mexa!

#!!!!!!!!!!!!!!!!!!!!!!!!!

$armas_shop_scene = true

$shop_pernalonga = true

end

 

 

################################################################################

# Window Pernalonga Help

#-------------------------------------------------------------------------------

class Window_Pernalonga_ShopHelp < Window_Base

def initialize

super(0, 0, 400, 50)

self.opacity = 0

refresh

end

 

def refresh

self.contents.clear

self.contents.font.name = Pernalonga::Shop_Fonte

self.contents.font.size = Pernalonga::Shop_Tamanho

if $armas_shop_scene == true

if $vendendo == true

tx = -50

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Sell[0])

else

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Buy[0])

end

elsif $escudos_shop_scene == true

if $vendendo == true

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Sell[1])

else

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Buy[1])

end

elsif $armaduras_shop_scene == true

if $vendendo == true

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Sell[2])

else

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Buy[2])

end

elsif $elmos_shop_scene == true

if $vendendo == true

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Sell[3])

else

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Buy[3])

end

elsif $acessorios_shop_scene == true

if $vendendo == true

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Sell[4])

else

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Buy[4])

end

elsif $item_shop_scene == true

if $vendendo == true

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Sell[5])

else

self.contents.draw_text(10, - 95, 300, 200, Pernalonga::Shop_Help_Buy[5])

end

end

end

 

 

def update

refresh

end

end

 

################################################################################

#Window_Item

#-------------------------------------------------------------------------------

class Window_Item_2 < Window_Selectable

 

def initialize(x, y, width, height)

super(x, y, width, height)

@column_max = 1

self.index = 0

refresh

end

 

def item

return @data[self.index]

end

 

def include?(item)

return false if item == nil

if $game_temp.in_battle

return false unless item.is_a?(RPG::Item)

end

return true

end

 

def refresh

@data = []

for item in $game_party.items

next unless include?(item)

if $armas_shop_scene == true

@data.push(item) if item.is_a?(RPG::Weapon)

elsif $escudos_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 0

elsif $armaduras_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 1

elsif $elmos_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 2

elsif $acessorios_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 3

elsif $item_shop_scene == true

@data.push(item) if item.is_a?(RPG::Item) and item.price > 0

end

 

if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id

self.index = @data.size - 1

end

end

 

@data.push(nil) if include?(nil)

@item_max = @data.size

create_contents

for i in 0...@item_max

draw_item(i)

end

end

 

def draw_item(index)

self.contents.font.name = Pernalonga::Shop_Fonte

self.contents.font.size = Pernalonga::Shop_Tamanho

rect = item_rect(index)

self.contents.clear_rect(rect)

item = @data[index]

if item != nil

number = $game_party.item_number(item)#item

enabled = enable?(item)

rect.width -= 4

draw_item_name(item, rect.x, rect.y, enabled)#item

self.contents.draw_text(rect, sprintf("%2d", number), 2)

end

end

 

 

def update_help

@help_window.set_text(item == nil ? "" : item.description)

end

end

 

 

################################################################################

#Shop Sell

#-------------------------------------------------------------------------------

class Window_ShopSell < Window_Item_2

 

def initialize(x, y, width, height)

super(x, y, width, height)

end

 

def include?(item)

return item != nil

end

 

def enable?(item)

return (item.price > 0)

end

end

 

 

################################################################################

#Shop Number

#-------------------------------------------------------------------------------

class Window_ShopNumber < Window_Base

alias pernalonga_initialize_window_shopnumber initialize

def initialize(x,y)

super(x, y, 400, 200)

end

 

 

alias pernalonga_refresh_window_shopnumber refresh

 

def refresh

pernalonga_refresh_window_shopnumber

self.contents.font.name = Pernalonga::Shop_Fonte

self.contents.font.size = Pernalonga::Shop_Tamanho

y = 96

self.contents.clear

draw_item_name(@item, 0, y)

self.contents.font.color = normal_color

self.contents.draw_text(248, y, 20, WLH, @number, 1)

self.cursor_rect.set(244, y, 28, WLH)

valor = @price * @number

self.contents.draw_text(280, y, 80, WLH, valor.to_s, 2)#330

end

end

 

 

################################################################################

#Shop Pernalonga

#-------------------------------------------------------------------------------

class Window_Shop_Pernalonga < Window_Base

 

def initialize

super(120, 150, 450, 200)

self.opacity = 0

refresh

end

 

def refresh

self.contents.clear

self.contents.font.name = Pernalonga::Shop_Name[4]

self.contents.font.size = Pernalonga::Shop_Name[5]

if $shop_scene_buy_pernalonga == true

self.contents.draw_text(300, 0, 100, 100, Pernalonga::Shop_Name[3], 2)

unless $vendendo == true

self.contents.draw_text(220, 0, 100, 100, Pernalonga::Shop_Name[1], 1)

end

self.contents.draw_text(0, 0, 100, 100, Pernalonga::Shop_Name[0], 1)

else

self.contents.draw_text(285, 0, 100, 100, Pernalonga::Shop_Name[1], 2)

self.contents.draw_text(235, 0, 100, 100, Pernalonga::Shop_Name[2], 1)

self.contents.draw_text(0, 0, 100, 100, Pernalonga::Shop_Name[0], 1)

end

 

self.contents.font.name = Pernalonga::Shop_Descrição[6]

self.contents.font.size = Pernalonga::Shop_Descrição[7]

if $armas_shop_scene == true

self.contents.draw_text(0, - 35, 100, 100, Pernalonga::Shop_Descrição[0])

elsif $escudos_shop_scene == true

self.contents.draw_text(0, - 35, 100, 100, Pernalonga::Shop_Descrição[1])

elsif $armaduras_shop_scene == true

self.contents.draw_text(0, - 35, 100, 100, Pernalonga::Shop_Descrição[2])

elsif $elmos_shop_scene == true

self.contents.draw_text(0, - 35, 100, 100, Pernalonga::Shop_Descrição[3])

elsif $acessorios_shop_scene == true

self.contents.draw_text(0, - 35, 100, 100, Pernalonga::Shop_Descrição[4])

elsif $item_shop_scene == true

self.contents.draw_text(0, - 35, 100, 100, Pernalonga::Shop_Descrição[5])

end

end

 

 

def update

refresh

end

end

 

################################################################################

# Window Help

################################################################################

class Window_Help_2 < Window_Base

 

def initialize

super(10, - 8, 544, WLH + 32)

end

 

def set_text(text, align = 0)

self.contents.font.name = Pernalonga::Shop_Fonte

self.contents.font.size = Pernalonga::Shop_Tamanho

if text != @text or align != @align

self.contents.clear

self.contents.font.color = normal_color

self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)

@text = text

@align = align

end

end

end

 

################################################################################

# Shop Status

#-------------------------------------------------------------------------------

 

class Window_ShopStatus < Window_Base

alias pernalonga_initialize_shop_status initialize

def initialize(x,y)

super(x,y,500,150)

end

 

def refresh

self.contents.clear

if @item != nil

number = $game_party.item_number(@item)

self.contents.font.name = Pernalonga::Shop_Fonte

self.contents.font.size = Pernalonga::Shop_Tamanho

for actor in $game_party.members

x = WLH * (2 + actor.index * 4)

y = 100

draw_actor_parameter_change(actor, x, y)

end

end

end

 

 

def draw_actor_parameter_change(actor, x, y)

return if @item.is_a?(RPG::Item)

enabled = actor.equippable?(@item)

self.contents.font.color = normal_color

self.contents.font.color.alpha = enabled ? 255 : 128

draw_actor_face(actor, x, 0, 90)

if @item.is_a?(RPG::Weapon)

item1 = weaker_weapon(actor)

elsif actor.two_swords_style and @item.kind == 0

item1 = nil

else

item1 = actor.equips[1 + @item.kind]

end

if enabled

if @item.is_a?(RPG::Weapon)

atk1 = item1 == nil ? 0 : item1.atk

atk2 = @item == nil ? 0 : @item.atk

change = atk2 - atk1

else

def1 = item1 == nil ? 0 : item1.def

def2 = @item == nil ? 0 : @item.def

change = def2 - def1

end

self.contents.font.size = 21

self.contents.draw_text(x + 40, 100, 200, WLH, sprintf("%+d", change))

self.contents.font.size = 16

end

end

end

 

################################################################################

#Shop Buy

#-------------------------------------------------------------------------------

class Window_ShopBuy < Window_Selectable

 

def initialize(x, y)

super(x, y, 380, 150)

@shop_goods = $game_temp.shop_goods

refresh

 

self.index = 0

end

 

def item

return @data[self.index]

end

 

 

def refresh

@data = []

for goods_item in @shop_goods

case goods_item[0]

when 0

item = $data_items[goods_item[1]]

when 1

item = $data_weapons[goods_item[1]]

when 2

item = $data_armors[goods_item[1]]

end

 

if item != nil and $item_shop_scene == true

@data.push(item) if item.is_a?(RPG::Item)

#arma

elsif item != nil and $armas_shop_scene == true

@data.push(item) if item.is_a?(RPG::Weapon)

#escudos

elsif item != nil and$escudos_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 0

#armaduras

elsif item != nil and $armaduras_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 2

#elmos

elsif item != nil and $elmos_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 1

#acessorios

elsif item != nil and $acessorios_shop_scene == true

@data.push(item) if item.is_a?(RPG::Armor) and item.kind == 3

end

end

@item_max = @data.size

create_contents

for i in 0...@item_max

draw_item(i)

end

end

 

def draw_item(index)

self.contents.font.name = Pernalonga::Shop_Fonte

self.contents.font.size = Pernalonga::Shop_Tamanho

item = @data[index]

number = $game_party.item_number(item)

enabled = (item.price <= $game_party.gold and number < 99)

rect = item_rect(index)

self.contents.clear_rect(rect)

draw_item_name(item, rect.x, rect.y, enabled)

rect.width -= 104

self.contents.draw_text(rect, item.price, 2)

rect.x += 100

self.contents.draw_text(rect, sprintf("%2d", number), 2)

end

 

def update_help

@help_window.set_text(item == nil ? "" : item.description)

end

end

 

#==============================================================================

# Scene_Shop

#------------------------------------------------------------------------------

# Classe responsável pelo gerenciamento de lojas.

#==============================================================================

 

class Scene_Shop < Scene_Base

 

def start

super

$shop_scene_buy_pernalonga = true

create_menu_background

create_command_window

@help_pernalonga = Window_Pernalonga_ShopHelp.new

@help_pernalonga.visible = false

@help_window = Window_Help_2.new

@help_window.opacity = 0

@gold_window = Window_Gold.new(- 50, 375)

@borda = Sprite.new

@borda.bitmap = Cache.picture(Pernalonga::Shop_Borda)

@Fundo = Sprite.new

@Fundo.bitmap = Cache.picture(Pernalonga::Shop_Fundo)

@help = Sprite.new

@help.bitmap = Cache.picture(Pernalonga::Shop_Help)

@help.y = 5

@Fundo.opacity = Pernalonga::Shop_Fundo_Opacidade

@gold_window.opacity = 0

@dummy_window = Window_Base.new(0, 112, 544, 304)

@dummy_window.opacity = 0

@buy_window = Window_ShopBuy.new(150, 230)

@buy_window.opacity = 0

@buy_window.active = false

@buy_window.visible = false

@buy_window.help_window = @help_window

@sell_window = Window_ShopSell.new(150, 230, 380, 150)

@sell_window.opacity = 0

@sell_window.active = false

@sell_window.visible = false

@sell_window.help_window = @help_window

@number_window = Window_ShopNumber.new(150, 112)

@number_window.opacity = 0

@number_window.active = false

@number_window.visible = false

@status_window = Window_ShopStatus.new(90, 20)

@status_window.opacity = 0

s1 = ""

s2 = ""

s3 = ""

s4 = ""

s5 = ""

s6 = ""

@comandos = Window_Command.new(360,[s1,s2,s3,s4,s5,s6], 6)

@comandos.opacity = 0

@comandos.x = 195

@comandos.y = 150

@comandos.active = false

@window_pernalonga = Window_Shop_Pernalonga.new

@window_pernalonga.z = 1

@armas_shop = Sprite.new

@escudos_shop = Sprite.new

@armaduras_shop = Sprite.new

@elmos_shop = Sprite.new

@acessorios_shop = Sprite.new

@items_shop = Sprite.new

@armas_shop.bitmap = Cache.picture(Pernalonga::Shop_Armas)

@escudos_shop.bitmap = Cache.picture(Pernalonga::Shop_Escudos)

@armaduras_shop.bitmap = Cache.picture(Pernalonga::Shop_Armaduras)

@elmos_shop.bitmap = Cache.picture(Pernalonga::Shop_Elmos)

@acessorios_shop.bitmap = Cache.picture(Pernalonga::Shop_Acessorios)

@items_shop.bitmap = Cache.picture(Pernalonga::Shop_Itens)

y = 168

x = 60

@armas_shop.x = 215

@armas_shop.y = y - 2

@escudos_shop.x = @armas_shop.x + x

@escudos_shop.y = y - 2

@armaduras_shop.x = @escudos_shop.x + x

@armaduras_shop.y = y

@elmos_shop.x = @armaduras_shop.x + x

@elmos_shop.y = y

@acessorios_shop.x = @elmos_shop.x + x

@acessorios_shop.y = y

@items_shop.x = @acessorios_shop.x + x

@items_shop.y = y

@borda2 = Sprite.new

@borda2.bitmap = Cache.picture(Pernalonga::Shop_Borda)

@borda2.y = 382

end

#--------------------------------------------------------------------------

# Fim do processo

#--------------------------------------------------------------------------

def terminate

super

dispose_menu_background

dispose_command_window

@borda2.dispose

@help_window.dispose

@gold_window.dispose

@dummy_window.dispose

@buy_window.dispose

@sell_window.dispose

@number_window.dispose

@status_window.dispose

@window_pernalonga.dispose

@comandos.dispose

@armas_shop.dispose

@escudos_shop.dispose

@armaduras_shop.dispose

@elmos_shop.dispose

@acessorios_shop.dispose

@items_shop.dispose

@borda.dispose

@Fundo.dispose

@help.dispose

@help_pernalonga.dispose

end

#--------------------------------------------------------------------------

# Atualização

#--------------------------------------------------------------------------

def update

super

@help_pernalonga.update

case @comandos.index

#arma

when 0

$escudos_shop_scene = false

$item_shop_scene = false

$armas_shop_scene = true

if $vendendo == true

@sell_window.refresh

else

@buy_window.refresh

end

#escudo

when 1

$armas_shop_scene = false

$armaduras_shop_scene = false

$escudos_shop_scene = true

if $vendendo == true

@sell_window.refresh

else

@buy_window.refresh

end

#armaduras

when 2

$escudos_shop_scene = false

$elmos_shop_scene = false

$armaduras_shop_scene = true

if $vendendo == true

@sell_window.refresh

else

@buy_window.refresh

end

when 3

#elmos

$armaduras_shop_scene = false

$acessorios_shop_scene = false

$elmos_shop_scene = true

if $vendendo == true

@sell_window.refresh

else

@buy_window.refresh

end

#acessorios

when 4

$item_shop_scene = false

$elmos_shop_scene = false

$acessorios_shop_scene = true

if $vendendo == true

@sell_window.refresh

else

@buy_window.refresh

end

when 5

$acessorios_shop_scene = false

$item_shop_scene = true

$armas_shop_scene = false

if $vendendo == true

@sell_window.refresh

else

@buy_window.refresh

end

end

@comandos.update

update_menu_background

@help_window.update

@command_window.update

@gold_window.update

@dummy_window.update

@buy_window.update

@sell_window.update

@number_window.update

@status_window.update

@window_pernalonga.update

if @command_window.active

update_command_selection

elsif @buy_window.active

update_buy_selection

elsif @sell_window.active

update_sell_selection

elsif @number_window.active

update_number_input

elsif @comandos.active

comandos

end

end

#--------------------------------------------------------------------------

# Criação da janela de comandos

#--------------------------------------------------------------------------

def create_command_window

s1 = Vocab::ShopBuy

s2 = Vocab::ShopSell

s3 = Vocab::ShopCancel

@command_window = Window_Command.new(150, [s1, s2, s3])

@command_window.opacity = 0

@command_window.y = 50

if $game_temp.shop_purchase_only

@command_window.draw_item(1, false)

end

end

 

def dispose_command_window

@command_window.dispose

end

 

def comandos

if Input.trigger?(Input::B)

Sound.play_cancel

@comandos.active = false

@command_window.active = true

@buy_window.visible = false

@sell_window.visible = false

$vendendo = false

$shop_scene_buy_pernalonga = true

@help_pernalonga.visible = false

elsif Input.trigger?(Input::C)

case @comandos.index

#arma

when 0, 1, 2, 3, 4, 5

if $vendendo == true

Sound.play_decision

@comandos.active = false

@sell_window.active = true

@help_pernalonga.visible = false

else

Sound.play_decision

@comandos.active = false

@buy_window.active = true

@help_pernalonga.visible = false

# @buy_window.visible = true

@buy_window.refresh

end

end

end

end

 

 

def update_command_selection

if Input.trigger?(Input::B)

Sound.play_cancel

$shop_scene_buy_pernalonga = true

$scene = Scene_Map.new

elsif Input.trigger?(Input::C)

case @command_window.index

when 0 # Comprar

Sound.play_decision

@command_window.active = false

@dummy_window.visible = false

@buy_window.active = false

@comandos.active = true

@buy_window.visible = true

@buy_window.refresh

@help_pernalonga.visible = true

#@status_window.visible = true

when 1 # Vender

if $game_temp.shop_purchase_only

Sound.play_buzzer

else

Sound.play_decision

$vendendo = true

@help_pernalonga.visible = true

@command_window.active = false

@dummy_window.visible = false

@sell_window.active = false

@sell_window.visible = true

@comandos.active = true

@sell_window.refresh

end

when 2 # Sair

Sound.play_decision

$scene = Scene_Map.new

end

end

end

#--------------------------------------------------------------------------

# Atualização da seleção: Comprar

#--------------------------------------------------------------------------

def update_buy_selection

@status_window.item = @buy_window.item

if Input.trigger?(Input::B)

Sound.play_cancel

@command_window.active = false

@dummy_window.visible = true

@buy_window.active = false

@buy_window.visible = true

@comandos.active = true

@buy_window.index = 0

@status_window.visible = true

$shop_scene_buy_pernalonga = true

@status_window.item = nil

@help_window.set_text("")

@help_pernalonga.visible = true

return

end

if Input.trigger?(Input::C)

@help_pernalonga.visible = false

@item = @buy_window.item

number = $game_party.item_number(@item)

if @item == nil or @item.price > $game_party.gold or number == 99

Sound.play_buzzer

else

Sound.play_decision

max = @item.price == 0 ? 99 : $game_party.gold / @item.price

max = [max, 99 - number].min

@buy_window.active = false

@buy_window.visible = false

@number_window.set(@item, max, @item.price)

$shop_scene_buy_pernalonga = false

@number_window.active = true

@number_window.visible = true

end

end

end

#--------------------------------------------------------------------------

# Atualizaão da seleção: Vender

#--------------------------------------------------------------------------

def update_sell_selection

if Input.trigger?(Input::B)

Sound.play_cancel

@command_window.active = false

@sell_window.index = 0

@dummy_window.visible = true

@sell_window.active = false

@sell_window.visible = true

@comandos.active = true

@status_window.item = nil

@help_window.set_text("")

@help_pernalonga.visible = true

elsif Input.trigger?(Input::C)

@help_pernalonga.visible = false

$shop_scene_buy_pernalonga = false

@item = @sell_window.item

@status_window.item = @item

if @item == nil or @item.price == 0

Sound.play_buzzer

@help_pernalonga.visible = false

$shop_scene_buy_pernalonga = true

else

Sound.play_decision

max = $game_party.item_number(@item)

@sell_window.active = false

@sell_window.visible = false

@number_window.set(@item, max, @item.price / 2)

@number_window.active = true

@number_window.visible = true

#@status_window.visible = true

end

end

end

#--------------------------------------------------------------------------

# Atualização do número inserido

#--------------------------------------------------------------------------

def update_number_input

if Input.trigger?(Input::B)

cancel_number_input

$shop_scene_buy_pernalonga = true

elsif Input.trigger?(Input::C)

decide_number_input

$shop_scene_buy_pernalonga = true

end

end

#--------------------------------------------------------------------------

# Cancelamento do número inserido

#--------------------------------------------------------------------------

def cancel_number_input

Sound.play_cancel

@number_window.active = false

@number_window.visible = false

case @command_window.index

when 0 # Comprando

@buy_window.active = true

@buy_window.visible = true

when 1 # Vendendo

@sell_window.active = true

@sell_window.visible = true

#@status_window.visible = true

end

end

#--------------------------------------------------------------------------

# Decisão do número inserido

#--------------------------------------------------------------------------

def decide_number_input

Sound.play_shop

@number_window.active = false

@number_window.visible = false

case @command_window.index

when 0 # Comprando

$game_party.lose_gold(@number_window.number * @item.price)

$game_party.gain_item(@item, @number_window.number)

@gold_window.refresh

@buy_window.refresh

@status_window.refresh

@buy_window.active = true

@buy_window.visible = true

when 1 # Vendendo

$game_party.gain_gold(@number_window.number * (@item.price / 2))

$game_party.lose_item(@item, @number_window.number)

@gold_window.refresh

@sell_window.refresh

@status_window.refresh

@sell_window.active = true

@sell_window.visible = true

# @status_window.visible = true

end

end

 

end

 

 

Share this post


Link to post
Share on other sites

if its a VX script then it is RGSS 2 and wont work in XP which uses RGSS1

There are some conversion modules, but they are usually specialized to a specific script and the chances of it working are slim to none, your better off finding an XP alternative

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...