Últimos temas
» Chaos of Destiny - The Origin
por mdk3dd Hoy a las 9:24 pm

» Laminación [VXACE] [NUEVO LAVADO DE CARA!]
por Pocari Hoy a las 8:22 pm

» [Avance] Chaos of Destiny - The origin
por IvalteK_Dev Hoy a las 7:11 pm

» Proyecto: "En busca del biberón perdido"
por IvalteK_Dev Hoy a las 6:59 pm

» Muz-taller: Charas
por Ruben_modder Hoy a las 2:30 pm

» 2 Dudas: Compatibilidad maker PC y Android
por Ruben_modder Hoy a las 1:36 pm

» Duda Bases Maker MV
por Ruben_modder Hoy a las 11:46 am

» [MV] Precognition
por JapoZero Sáb Dic 08, 2018 8:06 am

» ("TCG") Que RPG Maker es el recomendado?
por JKLmaster Vie Dic 07, 2018 7:48 pm

» Problema con los charas
por mdk3dd Dom Dic 02, 2018 5:55 pm

» Heartland | IGMC 2018
por InvariableZ Dom Dic 02, 2018 11:20 am

» The Town of The Lost Witch - Horror / Suspense - Próximamente
por rstudios Sáb Dic 01, 2018 6:50 pm


(Nuevo Taller) "Herreria de Scripts"

Ir abajo

(Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Miér Ago 19, 2015 2:43 am

Con el permiso de los jefes abro este taller en el cual me presto para solucionar problemas con scripts, modificaciones y/o creaciones particulares ^^.

En este taller se intentara solucionar problemas de cualquier tipo con respecto a scripts del programa VX ACE.
No se admitiran pedidos con prisa xD. Tengan en cuenta que no es tarea sencilla modificar o crear scripts por lo que tengan paciencia para recibir su pedido.
No estoy muy familiarizado con los scripts que involucren modificaciones de batalla por lo que si se diera el caso de no poder hacer el pedido seran avisados por aqui o por MP.
Los pedidos los pueden realizar en este post o por MP.
Los pedidos que sean de creacion de script particular tienen su limitacion y esta es un maximo de 100 lineas de codigo por lo que si me paso no realizare el pedido o lo pospondre para otro rato que tenga mas tiempo. No acepto pedidos que sean crear script de batalla.
Todabia estoy en practicas por lo que si no puedo o no me sale la creacion e un script particular les aviso ^^ y me disculpo xD.
Aceptare 3 pedidos a la ves pues casi siempre estoy ocupado xD.

Funcion nueva: Crear Scenes.
Por ejemplo, que quieren que salga una pantalla o menu particular dentro del menu de vuestro juego, pues os lo hago xD, claro esta con algunas limitaciones... como por ejemplo sprites animados... aun estoy verde en eso pero puedo intentarlo. Por lo demas pueden ser Scenes que impliquen atajos a otros scripts que quiran, datos de otros scripts o datos particulares que se deseen, modificacion de ubicacion de datos, charas animados, faces en donde quieran, etc.

Lo que nececitaria para la creacion de Scenes es un "Croquis" de lo que quieran que salga, es decir un dibujo de "quiero esto aca, esto aca y esto aca" xD. Y con eso ya puedo trabajar.

Tutorial u orientacion sobre algun script: Gratis xD.
Modificacion de script para que haga algo en particular: 50 monedas
Modificacion de script la cual implique imagenes: 100 monedas
Creacion de script particular: 200 monedas (perdon pero es dificil xD
Creacion de Scene personalizada : 200 monedas.

Y eso es todo por ahora, se abren los slots para pedidos a partir de ya! xD.


1----------------- Abierto
2------------------ Abierto
3----------------- Abierto


Última edición por fatyguero el Lun Abr 11, 2016 8:25 am, editado 8 veces
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por KRiZaLiD el Miér Ago 19, 2015 2:57 am

Este es un script que me encanta para VX.
http://www.rmakercom.net/t1374-vx-triple-triad-ffviii?highlight=triple+triad

Quiero que pueda utilizar las distintas reglas del Triple Triad.
Tiene la regla básica, y cuando ganas puedes obtener solo 1 carta. Si recuerdas en FF8 podías obtener TODAS las cartas, o sólo las que tenían tu color, etc. Habían muchas reglas dependiendo de la ciudad.
¿Que me dices? ¿Se puede?

KriZ

_________________
Mi Proyecto:


KRiZaLiD apoya:
avatar
KRiZaLiD
Moderador
Moderador

Masculino
Chile
RPG Maker : Vx
Mensajes : 816
Monedas : 4205
Reputación : 103
Edad : 33
Localización : Florida (pueblo fantasma), Chile

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por TheHeroZX el Miér Ago 19, 2015 9:33 am

Este script para el VX ACE http://www.rmakercom.net/t767-aceactor-columns-menu-por-blackmorning

Lo que me gustaria es, quitar la escena donde aparecen los personajes a la izquierda cuando aparece la tienda de este
script : 
http://www.rmakercom.net/t867-ace-yanfly-engine-ace-shop-options?highlight=yanfly

Imagen del error:
Como se ve en la imagen "atras" de la ventana de la tienda se ven esos personajes, me gustaria (si es posible obvio) que no aparezcan :3
avatar
TheHeroZX
PJ Principal
PJ Principal

Masculino
México
RPG Maker : Ace
Mensajes : 257
Monedas : 1054
Reputación : 44
Edad : 25
Localización : Buscando Gardevoirs~~~~

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Miér Ago 19, 2015 3:59 pm

Holas hero, tu problema es simple, el script de yea utiliza casi las mismas clases que los scripts de bm por lo que interfieren entre si a gran escala... para poder hacer un arreglo total tendria que crear clases particulares para cada ventana o escena peeeeeeero de momento puedes hacer lo siguiente, coloca el script de yea encima de todos los de bm y asi no apareceran las columnas ni las modificaciones de los scripts de bm... pero seguramente te dara errores durante el juego, de momento me dio uno y es en la linea 1118 del script base de BM, el arreglo es facil, eliminar esa linea que intenta cambiar el color de las fuentes a la par que el script de yea. Te recomiendo que no la borres solo la desasparezcas, apreta ctrl + Q y listo.

No te voy a cobrar nada porque no eh hecho nada mas que variar las posiciones xD, si te salen mas errores solo avisame ^^.

------------------------------------------------------------------------

Kriz, desgraciadamente eh estado mirando el script asi por encima y no se me ocurre de momento nada de donde empezar a toquetear para agregar las funciones que pides xD, no te voy a agregar a la lista pero me quedo con tu pedido ^^, asi que seguramente cuando menos te lo esperes te entregare tu pedido xD, de todas formas te mantendre informado y como tu tambien entiendes de la materia pues si quieres nos ponemos los 2 a trabajar en conjunto para intentar agregarle la mayor cantidad de reglas posibles ^^(es que las mates no me se dan mu bien xDDD).

Saludos a los dos primeros clientes!!! xD
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por GameMaster el Miér Ago 19, 2015 4:11 pm

Bueno, pues a petición tuya te escribo por aquí mi pedido.
lo que quiero es que el tinte no afecte al los menús, es decir, que no ocurra lo siguiente:

Imagen:

quiero que se muestre la ventana del script y luego de fondo el mapa con el tinte pero que se vea como se ve realmente o incluso con un punto borroso como el que viene en la pagina del script de menú.

Y bueno, eso sería, espero haberme expresado bien. Si no lo he conseguido abreme mp y te lo intento explicar mejor xD.

PD ahora mismo te paso los scripts por privado.

Saludos
avatar
GameMaster
PJ Principal
PJ Principal

Masculino
España
RPG Maker : Ace
Mensajes : 187
Monedas : 1300
Reputación : 18
Localización : En algún lugar del Omniverso

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Miér Ago 19, 2015 4:18 pm

Game tu pedido ha sido aceptado ^^.

Como en teoria es una modificacion sencilla solo te saldra 50 monedas en cuanto lo corrija.

Paciencia y te lo hago xD.

saluuuuuuudos
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por Turbiosoft.acho el Miér Ago 19, 2015 4:31 pm

Aer. Algún siglo te pediré algún script para mí, pero por el momento vengo para ayudar a otra persona (más que nada porque me he picado con su problema y como me sobran las monedas... -yao-)

Te explico.

El usuario Michoh explica en este tema que tiene el MapInfo.rvdata corrompido. Ayer, tratando de buscar soluciones, encontré algo... pero para el VX Ace.

Básicamente es un snippet que recrea el MapInfo del proyecto. Y nada más. Lo que te vengo a pedir es a ver si es posible que puedas pasarlo de RGSS3 a RGSS2.

Te dejo aquí el snippet, si necesitas algo más está todo en el tema de Michoh.

Código:
mapinfos = {}
i = 0
Dir.entries(File.expand_path('./Data')).each do |filename|
  if filename =~ /Map*(\d+).rvdata2/
    mapinfos[i] = RPG::MapInfo.new
    mapinfos[i].name = sprintf("MAP%03d", $1) rescue "Unknown"
    i += 1
  end
end
save_data(mapinfos, "MapInfos.rvdata2")

Espero que no haya ningún problema ^^"

¡Un saludo!

_________________

¡Apoya PCII colocando esta barrita en tu firma!

Turbiosoft.acho apoya a...:






Y a los juegos de Zoro y Japo (?)


avatar
Turbiosoft.acho
Admin
Admin

Femenino
Rmakercom
RPG Maker : Vx
Mensajes : 1228
Monedas : 4304
Reputación : 179
Localización : En el glorioso y magistral Zulo.

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Miér Ago 19, 2015 4:36 pm

Pedido aceptado jefa.

Como te eh dicho por el xat no se si podre con el cambio de rgss3 al 2 porque solo eh estudiado el 3 xD, pero lo intentare con todas mis ganas jejeje.

saluuuuuuuudos
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Jue Ago 27, 2015 6:31 am

Aqui retorno para solucionar uno de mis pedidos.

El correspondiente a GameMaster:

Como no me has mandado los scripts, ni el de menu que utilizas ni el de los tintes eh intentado solucionarlo con lo que tengo, asi que prueba lo siguiente haber si se te soluciona:

De la linea 478 a la 503 en el script de Advance Game Time cambia todo por esto:
Código:
       def update
          return use_default if SceneManager.scene.is_a?(Scene_Battle) and BATTLE_TINT
          return use_default if SceneManager.scene.is_a?(Scene_Menu)
          return use_khas if USE_KHAS
          return use_victor if USE_VICTOR
          return use_default
        end
        def use_default
          return if self.disposed?
          create_contents if self.bitmap.height != Graphics.height
          create_contents if self.bitmap.width != Graphics.width
          self.visible = SceneManager.scene.is_a?(Scene_Map)
          self.visible = true if SceneManager.scene.is_a?(Scene_Battle) and BATTLE_TINT
          self.visible = true if SceneManager.scene.is_a?(Scene_Menu)
          self.visible = false if SceneManager.scene.is_a?(Scene_Title)
          self.visible = false if no_tint
          return unless self.visible
          min = $game_time.min
          return if min == @old_time
          @old_time = min
          rgba = get_new_tint(min)
          return if rgba == @old_tint
          @old_tint = rgba
          self.bitmap.clear
          self.bitmap.fill_rect(0,0,Graphics.width,Graphics.height,Color.new(rgba[0],rgba[1],rgba[2],rgba[3]))
        end

Y me dices si funciona, en caso contrario o en caso de que te de error posteame los scripts, tanto el que utilizas para cambiar los tintes como el de menu

Saluuuuuuuuudos y ya sabes, si funciona a pagaaaaar xDDDDD.

Edit:
Aver.... segun yo, haciendo lo de antes no te ha de funcionar peeeeeero dont worry, aqui una solucion mas sencilla:

A partir de la linea 795 te saldra la esto:
Código:
   class Scene_Menu
      alias gt_start start
      alias gt_update update
      def start
        gt_start
        @clock = GameTime::Window_GameClock.new if USECLOCK_MENU
        return if @clock.nil?
        @clock.x = 0
        @clock.y = @gold_window.y - @clock.height
        @clock.width = @gold_window.width
        @clock.create_contents
      end
      def update
        gt_update
        @clock.update unless @clock.nil?
        @clock.contents.clear if SceneManager.scene != self and !@clock.nil?
      end
    end

Pues cambialo por esto otro:
Código:
    class Scene_Menu
      alias gt_start start
      alias gt_update update
      def start
        gt_start
        $game_time_tint.use_default
        @clock = GameTime::Window_GameClock.new if USECLOCK_MENU
        return if @clock.nil?
        @clock.x = 0
        @clock.y = @gold_window.y - @clock.height
        @clock.width = @gold_window.width
        @clock.create_contents
      end
      def update
        gt_update
        @clock.update unless @clock.nil?
        @clock.contents.clear if SceneManager.scene != self and !@clock.nil?
      end
    end

Con esto deberia de cambiar el tinte a normal ^^

Prueba primero esto ultimo y si no funciona prueba lo que te puse antes del edit.

Saluuuuuuuuuudos
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por GameMaster el Jue Ago 27, 2015 9:32 am

Bueno Faty, la verdad es que no me ha servido de momento :L te posteo por aquí todo lo que necesitas.

Error en el metodo de antes del edit:
https://gyazo.com/6c0d1d9b957b6e375b1b6f1791ecba06
Utilizando el metodo del edit:
https://gyazo.com/2d9d60456d6a68591e6fc3bec27b453b

Scripts:
Script Tintes:
http://www.rmakercom.net/t29-acescript-dia-noche-reloj (la versión del Edit de Muz)
Script Menú:
http://forums.rpgmakerweb.com/index.php?/topic/5994-xs-icon-menu/

te dejo un link donde descargar los scripts ya que no me deja postearlos (pone que el mensaje es muy largo u.u ) (y si, van dentro de code y ni así me deja)
avatar
GameMaster
PJ Principal
PJ Principal

Masculino
España
RPG Maker : Ace
Mensajes : 187
Monedas : 1300
Reputación : 18
Localización : En algún lugar del Omniverso

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Jue Ago 27, 2015 2:07 pm

Jajaja, sabia que era por tener un script de menu diferente...

Bueno primero de todo, hay que hacer una cosa, a lo mejor ya lo tienes hecho pero ahi va:

Pon el script de Advance Game time encima del de Xail.

Y segundo tienes que agregar esta linea al menu de Xail justo debajo de la linea 508:
Código:
$game_time_tint.use_default

Y listo el pollo, el tinte sera el normal mientras estes en el menu ^^. Eso si, se seguira viendo un poco mas oscuro nomas, como en todos los menus, eso si que no se como cambiarlo x_x, de momento xD, pero si quieres te lo miro

saluuuuuuuuudos
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por GameMaster el Jue Ago 27, 2015 2:22 pm

ahora sí funciona :B
Bueno, pues el pedido esta solucionado aunque me he dado cuenta de que al salir del menu mete un destello del color del tinte pero meh es algo menor (si tuviese solución pues mejor que mejor pero no se me ocurre xD) a si que algun admin que le de su money

EDITO (yo, Game)
Ya he avisado a turbins y ha realizado la transferencia ^^
Saludos
avatar
GameMaster
PJ Principal
PJ Principal

Masculino
España
RPG Maker : Ace
Mensajes : 187
Monedas : 1300
Reputación : 18
Localización : En algún lugar del Omniverso

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Vie Ago 28, 2015 12:05 am

Oins como suben las moneditas xDD.

Bueno pues no me alegro de que te haya funcionado y ahora me pondre con el pedido de turbi. Este me supongo tardare mas porque eh estado viendo y es bastante complicado xD. asi que tenme paciencia jefaaaaaaa
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por Michoh el Jue Oct 22, 2015 5:12 pm

¿Has podido conseguir algún avance con aquel scrpit que pidió Turbi? o.o


EDIT: He leído lo que te ha pasado, lamento mucho lo ocurrido, y vamos, lo del script este como si no existiera hasta que estés recuperado del todo, con ordenador y ganas de hacerlo. Yo no tengo ninguna prisa, y lo principal es tu bienestar.

Un saludo y mucho ánimo, te deseo lo mejor  Wink
avatar
Michoh
PJ de Relleno
PJ de Relleno

Masculino
España
RPG Maker : Vx
Mensajes : 6
Monedas : 15
Reputación : 0
Edad : 22
Localización : Valencia, Sinnoh, España

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Vie Feb 26, 2016 10:12 pm

Muy buenas a todos, como ya algunos sabrán eh regresado de mi reposo xDDDDD. por lo que reavivo este topic en el cual ayudaré a modificar o crear scripts para VX Ace, en particular recalco que son para el ACE porque despues de muchos intentos... como que los del VX no se me dan bien asi que prefiero no meterme con ellos xD.

De momento añado una función y es la de crear Scenes o pantallas para menus perzonalizadas, de cualquier tipo, en el primer post esta el precio y los requisitos.

Así que ale, a pedir se ha dicho!!!!!

Saluuuuuuuuuuuuuuudossssssss
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por ZororoWhite el Mar Mar 22, 2016 12:00 am

Bueno, Faty, el problema que tengo es que quisiera que en el CSCA Achievements se pudieran desbloquear logros mediante interruptores o variables, y que en esos ciertos logros no fuera necesaria la barra de progreso, porque me resulta innecesaria. También he notado un bug gráfico en la parte superior de la pantalla al abrir el menú de logros que es como una flecha marrón, y que solo aparece cuando el resizeo de la pantalla que hace el script está desactivado. 

Como para que te funcione todo como me funciona a mí son necesarios tres scripts, te digo cuáles son y te dejo enlaces para que te los descargues ya que he intentado ponerlos en codes pero me explota la caja de mensajes de foroactivo xDD.

Los scripts son el CSCA Core, el CSCA Achievements y el Gambit Achievement GUI. Para que funcionen correctamente hay que colocarlos en ese orden de arriba a abajo en la sección de scripts. 

Y bueno... eso es todo xDD. Espero que seas capaz de solucionarme algo de todo esto al menos, porque llevo toda la tarde dándole vueltas al script y si no fuera por esos dos pequeños detalles sería perfecto.

Un saludo y cualquier cosa me avisas, Faty.
avatar
ZororoWhite
PJ Principal
PJ Principal

Masculino
España
RPG Maker : Ace
Mensajes : 432
Monedas : 3168
Reputación : 64
Edad : 19
Localización : Escondido en tu corazón <3

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Mar Mar 22, 2016 2:10 am

Pedido aceptado Zoro, no le veo dificultad asi que creo que te lo tendre en poquito tiempo^^

Como es una modificacion serán 50 moneditas xD

saluuuuuuuuuuuuudos y al loro!

Edit: Zoro tengo un problema el  Gambit Achievement GUI no puedo descargarlo porque no me puedo loguear en la pagina asi que porfa pasamelo en pastebin o en un txt subido a cualquier lado, ese es el unico que me falta.

tenkiusssssssssssss

Edit 2: Bueno al final te pude solucionar lo de los interruptores y las variables, aqui tienes el CSCA Archivement modificado para que lo edites a tu gusto ^^
Spoiler:
Código:
=begin
CSCA Achievements
version: 2.2.1
Created by: Casper Gaming (http://www.caspergaming.com/)

Compatibility:
Made for RPGVXAce
IMPORTANT: ALL CSCA Scripts should be compatible with each other unless
otherwise noted.
REQUIRES CSCA Core Script(v1.0.6+)
================================================================================
UPDATES:
version 1.1(September 6th, 2012)
- Optimized & Made more compatible

version 1.2(September 19th, 2012)
- Added support for encyclopedia completion % achievements

version 1.2.1(November 25th, 2012)
- Added score to achievements.

version 1.2.2(November 26th, 2012)
- Fixed bug with progress not tracking items, armors, and weapons properly.
- Added the ability to use different icons for each achievement.

version 1.2.3(March 18, 2013)
- Added support for CSCA Currency System

version 1.2.4(May 6, 2013)
- Fixed bug not allowing items to be a reward with currency system.

version 1.3.0(June 25, 2013)
- Added progress tracking for CSCA Professions' profession level.
- Added progress tracking for discovered recipe's of any type in CSCA Crafting.
- Added progress tracking for CSCA Gathering node and nodetype data.
- Achievemwent popup windows set to 1001 Z (above Toast Manager toasts).

version 2.0.0(June 30th, 2013)
- Complete re-write of the script. Setup is more user friendly now, and code is
a lot easier to understand/more flexible making future updates MUCH easier. Should
slightly improve performance as well.

version 2.1.0(July 13, 2013)
- Fixed bug when trying to display earned achievement with STOP_TRACK enabled.
- Added achievements for amount of achievements earned (and total points)! Now you
can earn achievements while you earn achievements!
- Achievement information window now displays how many Points the achievement is
worth.

version 2.1.1(July 14, 2013)
- Fixed bug with name_before_unlock not working.

version 2.1.2(July 15, 2013)
- Fixed bug with description_before_unlock not working.

version 2.2.0(July 21, 2013)
- Added achievements for total quests completed & specific quests completed.

version 2.2.1(July 25, 2013)
- Fixed bug with custom encyclopedia category achievements.
================================================================================
INTRODUCTION:
This script creates an achievement system in your game.

FEATURES:
-Achievements!
-Score system similar to gamerscore.
-Can assign a reward for each achievement
-Can display a progress bar for each achievement
-Automatically earn achievements when progress bar gets to 100%.
-Can play an SE when achievement is unlocked
-Popup window when achievement is earned
-Able to use custom graphic in place of achievement window(size is 248x72),
image will be resized if bigger or smaller.

SETUP
Setup required. Instructions below.

CREDIT:
Free to use in noncommercial games if credit is given to:
Casper Gaming (http://www.caspergaming.com/)

To use in a commercial game, please purchase a license here:
http://www.caspergaming.com/licenses.html

TERMS:
http://www.caspergaming.com/terms_of_use.html
=end
module CSCA
  module ACHIEVEMENTS
    ACHIEVEMENT  = []
    DESCRIPTION  = []
    PROGRESS    = []
    REWARD      = []
#==============================================================================
# ** Script Calls
#==============================================================================
# earn_achievement(symbol)
#
# Sets an achievement to earned. The symbol parameter is the achievement's symbol.
#==============================================================================
# ** Begin Setup
#==============================================================================



    # hola zoro xD, aqui tienes lo que tienes que modificar:
    # para utilizar un interruptor especifico pon la opcion USASHITCH en
    # true y luego pon el ID del interruptor que quieras que este activado
    # en la opcion INTERRUPTOR.
    #--------------------------------------------------------------------
    # para utilizar el valor de una variable especifica pon USAVARIABLE en true
    # y donde pone VALORVARIABLE pone el valor que quieras que tenga esa variable
    # para que se activen los logros.
    #---------------------------------------------------------------------
    # cabe decir que solo pongas en true una de las dos opciones porque si no
    # te harias un lio xD, aunque si quieres lo configuras como quieras.
    # para que quede por defecto deja las dos primeras opciones en false y listo.
    USASWHITCH    = false
    USAVARIABLE  = false
   
    INTERRUPTOR  = 0  # ID del interruptor que tiene que estar activado.
    VARIABLE      = 0  # ID de la variable que utilizaras para el logro.
    VALORVARIABLE = 0  # valor de la variable anteriormente citada.
   
    # En fins, espero te sirva y te guste ^^, dame creditos un poquito xD.
   
   
    #==========================================================================
    # Description Setup
    #==========================================================================
    #DESCRIPTION[x] = ["Descriptive Text","Seperate lines with commas!"]
    DESCRIPTION[0] = ["Open 10 Treasure Chests","to unlock."]
    DESCRIPTION[1] = ["You opened 10 Treasure","Chests!"]
    DESCRIPTION[2] = ["Obtain 150 Gold."]
    #==========================================================================
    # Progress Setup
    #==========================================================================
    #PROGRESS[x] = [id, upper bound, "describe numbers", :type]
    # The type can be either:
    # :var = amount stored in $game_variables[id]
    # :item = amount of $data_items[id]
    # :weapon = amount of $data_weapons[id]
    # :armor = amount of $data_armors[id]
    # (3) :gold = amount of gold, ignores id value
    # :step = amount of steps, ignores id value
    # :save = amount of saves, ignores id value
    # :battle = amount of battles, ignores id value
    # :playtime = playtime, ignores id value
    # :acht = achievement earned total, ignores id value.
    # :achpt = achievement point total, ignores id value.
    # (1) :loot = amount of gold looted, ignores id value
    # (1) :dtake = amount of damage taken, ignores id value
    # (1) :ddeal = amount of damage dealt, ignores id value
    # (1) :gspend = amount of gold spent at shops, ignores id value
    # (1) :gearn = amount of gold earned from selling to shops, ignores id value
    # (1) :iuse = amount of items used, ignores id value
    # (1) :ibuy = amount of items bought from shops, ignores id value
    # (1) :isell = amount of items sold to shops, ignores id value
    # (2)(*) :ebes = % of bestiary completed, ignores id value
    # (2)(*) :eitm = % of items completed, ignores id value
    # (2)(*) :ewep = % of weapons completed, ignores id value
    # (2)(*) :earm = % of armors completed, ignores id value
    # (2)(*) :eskl = % of skills completed, ignores id value
    # (2)(*) :esta = % of states completed, ignores id value
    # (2)(*) :etot = % of total encyclopedia completed, ignores id value
    # (2)(*) :ecst = % of custom encyclopedia category completed, use id value for
    #            the custom category's key value.
    # (4) :plvl = Profession level, use id value for the profession symbol.
    # (5) :rtda = Recipe Type Discovered Amount, use id value for recipe type.
    # (6) :nga = Node Gathered Amount, use id value for nodes symbol.
    # (6) :ntga = Nodetype Gathered Amount, use id value for nodetypes type.
    # (7) :qamt = Amount of quests completed, ignores id.
    # (7)(*) :sqc = Specific quests complete, use id value as an array of quest symbols.
    #
    # (1) Requires CSCA Extra Stats(1.1+) Get it here:
    # http://www.rpgmakervxace.net/topic/2030-csca-extra-stats/
    #
    # (2) Requires CSCA Encyclopedia(3.0+) Get it here:
    # http://www.rpgmakervxace.net/topic/2775-csca-encyclopedia-w-bestiary/
    #
    # (3) If using CSCA Currency System(http://www.rpgmakervxace.net/topic/13153-csca-currency-system/)
    # the ID value for gold will be the currency symbol.
    #
    # (4) Requires CSCA Professions(1.0.3+) Get it here:
    # http://www.rpgmakervxace.net/topic/14734-csca-professions/
    #
    # (5) Requires CSCA Crafting(v1.0.4+) Get it here:
    # http://www.rpgmakervxace.net/topic/15113-csca-crafting/
    #
    # (6) Requires CSCA Gathering(v1.0.0+) Get it here:
    # http://www.rpgmakervxace.net/topic/15806-csca-gathering/
    #
    # (7) Requires CSCA Quest System(v1.0.0+) Get it here:
    # http://www.rpgmakervxace.net/topic/16963-csca-quest-system/
    #
    # (*) May cause lag if too many entries.
    #
    PROGRESS[0] = [5, 10, "Treasures Opened", :var] # 10 max, tracks variable ID5.
    PROGRESS[1] = [0, 150, "Total Gold", :gold] # 150 max, tracks party's gold.
    #==========================================================================
    # Rewards Setup
    #==========================================================================
    #REWARD[x] = [amount, id, type]
    # The type can be either:
    # :item = amount of $data_items[id]
    # :weapon = amount of $data_weapons[id]
    # :armor = amount of $data_armors[id]
    # :gold = amount of gold, ignores id value*
    # * If using CSCA Currency System(http://www.rpgmakervxace.net/topic/13153-csca-currency-system/)
    # the ID value for gold will be the currency symbol.
    REWARD[0] = [100, 0, :gold] # 100 gold.
    REWARD[1] = [5, 1, :item] # 5 of item ID 1.
    #==========================================================================
    # Achievement Setup
    #==========================================================================
    #ACHIEVEMENT[x] = { The x should start at 0 and increase in sequential order.
    #:symbol => :achievement1      # Symbol used to refer to the achievement in script calls.
    #:name => "Treasure Hunter",    # The name of the achievement.
    #:name_before_unlock => "???",  #(optional) The name of the achievement before unlock.
    #:description => DESCRIPTION[0],# The Description of the achievement.
    #:description_before_unlock => DESCRIPTION[1], #(optional) Description before unlock.
    #progress => PROGRESS[0],  #(optional) The progress tracking of the achievement.
    #:reward => REWARD[0],    #(optional) The reward upon completing the achievement.
    #:graphic => nil,          #(optional) The graphic to display in the popup window.
    #:points => 5,            # The points associated with the achievement.
    #:complete_icon => 621,    # The icon to use when achievement has been earned.
    #:incomplete_icon => 622  # The icon to use when achievement is not earned.
    #}
    # If you are not using an optional feature, write: nil
    ACHIEVEMENT[0] = {
    :symbol => :thunter,
    :name => "Treasure Hunter",
    :name_before_unlock => "???",
    :description => DESCRIPTION[1],
    :description_before_unlock => DESCRIPTION[0],
    :progress => PROGRESS[0],
    :reward => REWARD[0],
    :graphic => nil,
    :points => 5,
    :complete_icon => 621,
    :incomplete_icon => 622
    }
   
    ACHIEVEMENT[1] = {
    :symbol => :thunter2,
    :name => "Treasure Hunter II",
    :name_before_unlock => nil,
    :description => DESCRIPTION[2],
    :description_before_unlock => nil,
    :progress => PROGRESS[1],
    :reward => nil,
    :graphic => "DarkSpace1",
    :points => 10,
    :complete_icon => 620,
    :incomplete_icon => 619
    }
    #==========================================================================
    # Misc. Setup
    #==========================================================================
    HEADER = "Achievements" # Text shown in the head window.
    TOTAL = "Total Achievements Unlocked: " # Text shown before total numbers.
    POINTS = "Score: " # Text shown before points numbers.
    USE_POINTS = true # Use the points system?
    PROGRESS = "Progress:" # Text above progress bar
    REWARD = "Reward: " # Text shown before the reward amount/name.
    UNLOCKED = "Achievement Unlocked!" # Text shown when achievement unlocked.
   
    NUMBERED = false # If true, numbers achieve list. If false, uses icons.
    CENTER = false # Center the description text ? True/false
    STOP_TRACK = true # Stop tracking achievement progress after earned?
   
    COLOR1 = 20 # Color1 of the progress gauge.
    COLOR2 = 21 # Color2 of the progress gauge.
   
    SOUND = "Applause1" # SE Played when an achievement is earned. Set to nil to disable.
   
    POP_ALIGN = :bottom # Alignment of Popup on map when achievement is earned.
    # :bottom = bottom center, :middle = middle of screen, :top = top center
    # Set to nil to disable the Popup Window.
    # Recommended top if using CSCA Toast Manager.
#==============================================================================
# ** End Setup
#==============================================================================
  end
end
$imported ||= {}
$imported["CSCA-Achievements"] = true
msgbox('Missing Script: CSCA Core Script! CSCA Achievements requires this
script to work properly.') if !$imported["CSCA-Core"]
#==============================================================================
# ** CSCA_Achievement
#------------------------------------------------------------------------------
# Stores achievement data.
#==============================================================================
class CSCA_Achievement
  attr_reader :earned, :symbol, :name, :name_before_unlock, :description
  attr_reader :description_before_unlock, :reward, :progress, :points
  attr_reader :incomplete_icon, :complete_icon, :graphic
  attr_reader :switches
  attr_reader :variables
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(achievement)
    @symbol = achievement[:symbol]
    @name = achievement[:name]
    @name_before_unlock = achievement[:name_before_unlock]
    @description = achievement[:description]
    @description_before_unlock = achievement[:description_before_unlock]
    @reward = achievement[:reward].nil? ? nil : CSCA_Item.new(*achievement[:reward])
    @points = achievement[:points]
    @incomplete_icon = achievement[:incomplete_icon]
    @complete_icon = achievement[:complete_icon]
    @graphic = achievement[:graphic]
    @progress = achievement[:progress].nil? ? nil : CSCA_AchievementProgress.new(achievement[:progress])
    @earned = false
  end
  #--------------------------------------------------------------------------
  # Earn achievement processing
  #--------------------------------------------------------------------------
  def earn_achievement
  if CSCA::ACHIEVEMENTS::USASWHITCH
    if $game_switches[CSCA::ACHIEVEMENTS::INTERRUPTOR]
    @earned = true
    $game_party.csca_achievement_reward(@reward) if @reward
    sound = CSCA::ACHIEVEMENTS::SOUND
    Audio.se_play("Audio/SE/" + sound, 80, 100) if sound
    $csca.achievements_earned += 1
    $csca.achievement_total_points += @points
    end
  elsif  CSCA::ACHIEVEMENTS::USAVARIABLE
    if $game_variables[CSCA::ACHIEVEMENTS::VARIABLE] == CSCA::ACHIEVEMENTS::VALORVARIABLE
    @earned = true
    $game_party.csca_achievement_reward(@reward) if @reward
    sound = CSCA::ACHIEVEMENTS::SOUND
    Audio.se_play("Audio/SE/" + sound, 80, 100) if sound
    $csca.achievements_earned += 1
    $csca.achievement_total_points += @points
    end
  elsif
    @earned = true
    $game_party.csca_achievement_reward(@reward) if @reward
    sound = CSCA::ACHIEVEMENTS::SOUND
    Audio.se_play("Audio/SE/" + sound, 80, 100) if sound
    $csca.achievements_earned += 1
    $csca.achievement_total_points += @points
  end
  end
end
#==============================================================================
# ** CSCA_AchievementProgress
#------------------------------------------------------------------------------
# Stores achievement progress data.
#==============================================================================
class CSCA_AchievementProgress
  attr_reader :id, :upper_bound, :description, :type
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(progress)
    @id = progress[0]
    @upper_bound = progress[1]
    @description = progress[2]
    @type = progress[3]
  end
end
#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  Addition of earn_achievement command.
#==============================================================================
class Game_Interpreter
  #--------------------------------------------------------------------------
  # Earn Achievement
  #--------------------------------------------------------------------------
  def earn_achievement(sym)
    achievement = $csca.get_achievement(sym)
    achievement.earn_achievement
    $game_map.ach_earned = true
    $game_map.ach_display = achievement
  end
end
#==============================================================================
# ** CSCA_Core
#------------------------------------------------------------------------------
# Added achievement handling.
#Aliases: initialize
#==============================================================================
class CSCA_Core
  attr_accessor :achievements_earned, :achievement_total_points
  attr_reader :achievements
  #--------------------------------------------------------------------------
  # Alias Method; Object Initialization
  #--------------------------------------------------------------------------
  alias :csca_achievement_initialize :initialize
  def initialize
    csca_achievement_initialize
    initialize_achievements
  end
  #--------------------------------------------------------------------------
  # Initialize Achievements
  #--------------------------------------------------------------------------
  def initialize_achievements
    @achievements = []
    @achievements_earned = 0
    @achievement_total_points = 0
    CSCA::ACHIEVEMENTS::ACHIEVEMENT.each do |achievement|
      @achievements.push(CSCA_Achievement.new(achievement))
    end
  end
  #--------------------------------------------------------------------------
  # Get achievement
  #--------------------------------------------------------------------------
  def get_achievement(symbol)
    @achievements.each do |achievement|
      return achievement if achievement.symbol == symbol
    end
  end
end
#==============================================================================
# ** CSCA_Scene_Achievements
#------------------------------------------------------------------------------
# This class performs the achievement screen processing.
#==============================================================================
class CSCA_Scene_Achievements < Scene_MenuBase
  #--------------------------------------------------------------------------
  # Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_head_window
    create_achievement_window
    create_selection_window
    create_totals_window
  end
  #--------------------------------------------------------------------------
  # Create Background
  #--------------------------------------------------------------------------
  def create_background
    super
    @background_sprite.tone.set(0, 0, 0, 128)
  end
  #--------------------------------------------------------------------------
  # Create Header Window
  #--------------------------------------------------------------------------
  def create_head_window
    @head_window = CSCA_Window_Header.new(0, 0, CSCA::ACHIEVEMENTS::HEADER)
    @head_window.viewport = @viewport
  end
  #--------------------------------------------------------------------------
  # Create Achievement Selection Window
  #--------------------------------------------------------------------------
  def create_selection_window
    @command_window = CSCA_Window_AchievementSelect.new(0,@head_window.height,
      Graphics.width/2,Graphics.height-@head_window.height-48)
    @command_window.viewport = @viewport
    @command_window.help_window = @achievement_window
    @command_window.set_handler(:cancel, method(:return_scene))
    @command_window.activate
  end
  #--------------------------------------------------------------------------
  # Create Achievement Window
  #--------------------------------------------------------------------------
  def create_achievement_window
    @achievement_window = CSCA_Window_AchievementDisplay.new(Graphics.width/2,
      @head_window.height,Graphics.width/2,Graphics.height-@head_window.height-48)
    @achievement_window.viewport = @viewport
  end
  #--------------------------------------------------------------------------
  # Create Achievement Totals Window
  #--------------------------------------------------------------------------
  def create_totals_window
    @totals_window = CSCA_Window_AchievementTotals.new(0,@head_window.height+
      @achievement_window.height,Graphics.width,Graphics.height-@head_window.height-
      @achievement_window.height)
    @totals_window.viewport = @viewport
  end
end
#==============================================================================
# ** CSCA_Window_AchievementSelect
#------------------------------------------------------------------------------
# This window displays the achievement names, numbers, and icons.
#==============================================================================
class CSCA_Window_AchievementSelect < Window_Selectable
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x,y,width,height)
    super
    @data = []
    refresh
    select(0)
  end
  #--------------------------------------------------------------------------
  # Get Item Max
  #--------------------------------------------------------------------------
  def item_max
    @data ? @data.size : 1
  end
  #--------------------------------------------------------------------------
  # Get Item
  #--------------------------------------------------------------------------
  def item
    @data && index >= 0 ? @data[index] : nil
  end
  #--------------------------------------------------------------------------
  # Populate item list
  #--------------------------------------------------------------------------
  def make_item_list
    @data = $csca.achievements
  end
  #--------------------------------------------------------------------------
  # Draw Items
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect(index)
      CSCA::ACHIEVEMENTS::NUMBERED ? draw_item_id(rect, index) : draw_ach_icon(rect, item)
      name = (item.earned || item.name_before_unlock.nil?) ? item.name : item.name_before_unlock
      draw_text(rect.x + 32, rect.y, contents.width - 40, line_height, name)
    end
  end
  #--------------------------------------------------------------------------
  # Draw Numbers
  #--------------------------------------------------------------------------
  def draw_item_id(rect, index)
    draw_text(rect, sprintf("%2d.", index + 1))
  end
  #--------------------------------------------------------------------------
  # Draw Icons
  #--------------------------------------------------------------------------
  def draw_ach_icon(rect, item)
    icon = item.earned ? item.complete_icon : item.incomplete_icon
    draw_icon(icon,rect.x+5,rect.y)
  end
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
    make_item_list
    create_contents
    draw_all_items
  end
  #--------------------------------------------------------------------------
  # Update Help Window
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_item(item)
  end
end
#==============================================================================
# ** CSCA_Window_AchievementTotals
#------------------------------------------------------------------------------
# This window displays the achievement header window.
#==============================================================================
class CSCA_Window_AchievementTotals < Window_Base
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, w, h)
    super(x, y, w, h)
    refresh
  end
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    total_achieves = $csca.achievements.size
    total_points = 0
    points = 0
    unlocked = 0
    $csca.achievements.each do |achievement|
      if achievement.earned
        unlocked += 1
        points += achievement.points
      end
      total_points += achievement.points
    end
    string1 = CSCA::ACHIEVEMENTS::TOTAL + unlocked.to_s + "/" + total_achieves.to_s
    string2 = CSCA::ACHIEVEMENTS::POINTS + points.to_s + "/" + total_points.to_s
    string = CSCA::ACHIEVEMENTS::USE_POINTS ? string1 + "    " + string2 : string1
    draw_text(0,0,contents.width,line_height,string,1)
  end
end
#==============================================================================
# ** CSCA_Window_AchievementDisplay
#------------------------------------------------------------------------------
# This window displays the achievement descriptions.
#==============================================================================
class CSCA_Window_AchievementDisplay < Window_Base
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x,y,w,h)
    super(x,y,w,h)
  end
  #--------------------------------------------------------------------------
  # Draw all info
  #--------------------------------------------------------------------------
  def set_item(achievement)
    contents.clear
    width = contents.width
    height = line_height
    draw_description(0, 0, width, height, achievement)
    draw_progress(0, height*8, width, height, achievement) if achievement.progress
    draw_points(0, height*11-12, width, height, achievement) if CSCA::ACHIEVEMENTS::USE_POINTS
    draw_reward(0, height*12-12, width, height, achievement) if achievement.reward
  end
  #--------------------------------------------------------------------------
  # Draw description
  #--------------------------------------------------------------------------
  def draw_description(x, y, w, h, achievement)
    desc = (achievement.earned || achievement.description_before_unlock.nil?) ? achievement.description :
      achievement.description_before_unlock
    desc.each do |string|
      draw_text(x, y, w, h, string, centered_text?)
      y += line_height
    end
  end
  #--------------------------------------------------------------------------
  # Get centered option
  #--------------------------------------------------------------------------
  def centered_text?
    CSCA::ACHIEVEMENTS::CENTER ? 1 : 0
  end
  #--------------------------------------------------------------------------
  # Draw Progress bar
  #--------------------------------------------------------------------------
  def draw_progress(x, y, w, h, achievement)
    color1 = text_color(CSCA::ACHIEVEMENTS::COLOR1)
    color2 = text_color(CSCA::ACHIEVEMENTS::COLOR2)
    contents.font.size = 20
    draw_text(x, y, w, h, CSCA::ACHIEVEMENTS::PROGRESS, 1)
    if achievement.earned && CSCA::ACHIEVEMENTS::STOP_TRACK
      draw_gauge(x, y + line_height - 8, w, 1/1, color1, color2)
      string = achievement.progress.upper_bound.to_s
      draw_text(x, y  +line_height - 4, w, h, string + "/" + string, 1)
    else
      draw_gauge(x, y+line_height-8, w, csca_get_rate(achievement), color1, color2)
      draw_gauge_numbers(x, y + line_height - 4, w, h, achievement)
    end
    draw_text(x,y+line_height*2-12,w,h,achievement.progress.description, 1)
    contents.font.size = 24
  end
  #--------------------------------------------------------------------------
  # Calculate Rate
  #--------------------------------------------------------------------------
  def csca_get_rate(achievement)
    csca_get_numerator(achievement).to_f/csca_get_denominator(achievement).to_f
  end
  #--------------------------------------------------------------------------
  # Get Numerator
  #--------------------------------------------------------------------------
  def csca_get_numerator(achievement)
    id = achievement.progress.id
    case achievement.progress.type
    when :var
      return $game_variables[id]
    when :item
      return $game_party.item_number($data_items[id])
    when :weapon
      return $game_party.item_number($data_weapons[id])
    when :armor
      return $game_party.item_number($data_armors[id])
    when :gold
      if $imported["CSCA-CurrencySystem"]
        return $game_party.get_csca_cs_currency(id)[:amount]
      end
      return $game_party.gold
    when :step
      return $game_party.steps
    when :save
      return $game_system.save_count
    when :battle
      return $game_system.battle_count
    when :playtime
      return Graphics.frame_count / Graphics.frame_rate
    when :loot
      return $game_variables[CSCA_EXTRA_STATS::LOOTED]
    when :dtake
      return $game_variables[CSCA_EXTRA_STATS::DAMAGE_TAKEN]
    when :ddeal
      return $game_variables[CSCA_EXTRA_STATS::DAMAGE_DEALT]
    when :gspend
      return $game_variables[CSCA_EXTRA_STATS::GOLDSPENT]
    when :gearn
      return $game_variables[CSCA_EXTRA_STATS::GOLDGAINED]
    when :iuse
      return $game_variables[CSCA_EXTRA_STATS::ITEMS_USED]
    when :ibuy
      return $game_variables[CSCA_EXTRA_STATS::ITEMSBOUGHT]
    when :isell
      return $game_variables[CSCA_EXTRA_STATS::ITEMSSOLD]
    when :ebes
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_bestiary*100.00)
      return string
    when :eitm
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_items*100.00)
      return string
    when :ewep
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_weapons*100.00)
      return string
    when :earm
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_armors*100.00)
      return string
    when :eskl
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_skills*100.00)
      return string
    when :esta
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_states*100.00)
      return string
    when :ecst
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage_cust(id)*100.00)
      return string
    when :etot
      string = sprintf("%1.2f%%",$game_party.csca_completion_percentage*100.00)
      return string
    when :plvl
      return $csca.profession_ach_cache[id]
    when :rtda
      return $csca.recipe_types[id][1]
    when :nga
      return $csca.gathered_nodes[id]
    when :ntga
      return $csca.gathered_nodetypes[id]
    when :acht
      return $csca.achievements_earned
    when :achpt
      return $csca.achievement_total_points
    when :qamt
      return $csca.quest_info.completed
    when :sqc
      number = 0
      id.each do |quest_symbol|
        number += 1 if $csca.quest_info.list[quest_symbol]
      end
      return number
    end
    error = "Inappropriate achievement progress type given"
    script = "CSCA Achievements"
    suggestion = "Check to make sure your progress types are all correct"
    $csca.report_error(error, script, suggestion)
  end
  #--------------------------------------------------------------------------
  # Get Denominator
  #--------------------------------------------------------------------------
  def csca_get_denominator(achievement)
    return achievement.progress.upper_bound
  end
  #--------------------------------------------------------------------------
  # Draw Gauge Values
  #--------------------------------------------------------------------------
  def draw_gauge_numbers(x, y, w, h, achievement)
    numerator = csca_get_numerator(achievement).to_s
    denominator = csca_get_denominator(achievement).to_s
    draw_text(x, y, w, h, numerator + "/" + denominator, 1)
  end
  #--------------------------------------------------------------------------
  # Draw Reward
  #--------------------------------------------------------------------------
  def draw_reward(x, y, w, h, achievement)
    reward = achievement.reward
    currency = $game_party.get_csca_cs_currency(reward.id) if $imported["CSCA-CurrencySystem"] && reward.type == :gold
    case reward.type
    when :gold; reward_s = $imported["CSCA-CurrencySystem"] ? currency[:currency_unit] : Vocab::currency_unit
    when :item;  reward_s = " " + $data_items[reward.id].name
    when :weapon; reward_s = " " + $data_weapons[reward.id].name
    when :armor;  reward_s = " " + $data_armors[reward.id].name
    end
    draw_text(x,y,w,h,CSCA::ACHIEVEMENTS::REWARD)
    off_x = text_size(CSCA::ACHIEVEMENTS::REWARD).width
    if $imported["CSCA-CurrencySystem"] && reward.type == :gold
      draw_icon(currency[:icon], x + off_x, y)
      off_x += 24
      change_color(currency[:color])
    end
    draw_text(x+off_x, y, w, h, reward.amount.to_s + reward_s)
    change_color(normal_color)
  end
  #--------------------------------------------------------------------------
  # Draw Points
  #--------------------------------------------------------------------------
  def draw_points(x, y, w, h, achievement)
    string = CSCA::ACHIEVEMENTS::POINTS + achievement.points.to_s
    draw_text(x, y, w, h, string)
  end
end
#==============================================================================
# ** CSCA_Window_AchievementPop
#------------------------------------------------------------------------------
#  This window displays when an achievement is unlocked if no custom graphic
#  is available.
#==============================================================================
class CSCA_Window_AchievementPop < Window_Base
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    case CSCA::ACHIEVEMENTS::POP_ALIGN
    when :bottom
      super(Graphics.width/4,Graphics.height-fitting_height(3),window_width,fitting_height(3))
    when :middle
      super(Graphics.width/4,Graphics.height/2-fitting_height(1),window_width,fitting_height(3))
    when :top
      super(Graphics.width/4, 0, window_width, fitting_height(3))
    end
    self.opacity = 0
    self.contents_opacity = 0
    self.z = 1001
    @show_count = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 272
  end
  #--------------------------------------------------------------------------
  # Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if @show_count > 0
      update_fadein
      @show_count -= 1
    else
      update_fadeout
    end
  end
  #--------------------------------------------------------------------------
  # Update Fadein
  #--------------------------------------------------------------------------
  def update_fadein
    self.opacity += 16 if $game_map.ach_display.graphic.nil? unless $game_map.ach_display.nil?
    self.contents_opacity += 16
  end
  #--------------------------------------------------------------------------
  # Update Fadeout
  #--------------------------------------------------------------------------
  def update_fadeout
    self.opacity -= 16 if $game_map.ach_display.graphic.nil? unless $game_map.ach_display.nil?
    self.contents_opacity -= 16
  end
  #--------------------------------------------------------------------------
  # Open Window
  #--------------------------------------------------------------------------
  def open
    refresh
    @show_count = 150
    self.contents_opacity = 0
    self.opacity = 0
    self
  end
  #--------------------------------------------------------------------------
  # Close Window
  #--------------------------------------------------------------------------
  def close
    @show_count = 0
    self
  end
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    return if $game_map.ach_display.nil?
    if $game_map.ach_display.graphic.nil?
      contents.font.bold = true
      draw_text(0, 0, contents.width, line_height, CSCA::ACHIEVEMENTS::UNLOCKED, 1)
      contents.font.bold = false
      draw_text(0,line_height,contents.width,line_height,$game_map.ach_display.name,1)
      draw_reward($game_map.ach_display) unless $game_map.ach_display.reward.nil?
    else
      draw_custom_image
    end
  end
  #--------------------------------------------------------------------------
  # Draw Reward if Exist
  #--------------------------------------------------------------------------
  def draw_reward(achievement)
    reward = achievement.reward
    currency = $game_party.get_csca_cs_currency(reward.id) if $imported["CSCA-CurrencySystem"] && reward.type == :gold
    case reward.type
    when :gold; reward_s = $imported["CSCA-CurrencySystem"] ? currency[:currency_unit] : reward_s = Vocab::currency_unit
    when :item;  reward_s = " " + $data_items[reward.id].name
    when :weapon; reward_s = " " + $data_weapons[reward.id].name
    when :armor;  reward_s = " " + $data_armors[reward.id].name
    end
    draw_text(0,line_height*2,contents.width,line_height,CSCA::ACHIEVEMENTS::REWARD+reward.amount.to_s+reward_s,1)
  end
  #--------------------------------------------------------------------------
  # Draw Popup Graphic if Exist
  #--------------------------------------------------------------------------
  def draw_custom_image
    bitmap = Cache.picture($game_map.ach_display.graphic)
    rect = Rect.new(0,0,bitmap.width,bitmap.height)
    target = Rect.new(0,0,contents.width,contents.height)
    contents.stretch_blt(target, bitmap, rect, 255)
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# Overwrites: none
# Aliases: create_all_windows, update, pre_transfer
#==============================================================================
class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # Alias Method; create all windows
  #--------------------------------------------------------------------------
  alias :csca_create_all_windows :create_all_windows
  def create_all_windows
    csca_create_all_windows
    csca_create_achievement_window unless CSCA::ACHIEVEMENTS::POP_ALIGN.nil?
  end
  #--------------------------------------------------------------------------
  # create achievement window
  #--------------------------------------------------------------------------
  def csca_create_achievement_window
    @achievement_window = CSCA_Window_AchievementPop.new
    @achievement_window.viewport = @viewport
  end
  #--------------------------------------------------------------------------
  # Alias Method; pre-transfer processing
  #--------------------------------------------------------------------------
  alias :csca_ach_pre_transfer :pre_transfer
  def pre_transfer
    @achievement_window.close unless CSCA::ACHIEVEMENTS::POP_ALIGN.nil?
    csca_ach_pre_transfer
  end
  #--------------------------------------------------------------------------
  # Alias Method; update
  #--------------------------------------------------------------------------
  alias :csca_ach_update :update
  def update
    csca_ach_update
    if $game_map.ach_earned
      @achievement_window.open unless CSCA::ACHIEVEMENTS::POP_ALIGN.nil?
      $game_map.ach_earned = false
    end
  end
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# Overwrites: none
# Aliases: none
#==============================================================================
class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # Gives Reward
  #--------------------------------------------------------------------------
  def csca_achievement_reward(reward)
    case reward.type
    when :gold; $imported["CSCA-CurrencySystem"] ? gain_currency(get_csca_cs_currency(reward.id), reward.amount) : gain_gold(reward.amount)
    when :item;  gain_item($data_items[reward.id], reward.amount)
    when :weapon; gain_item($data_weapons[reward.id], reward.amount)
    when :armor;  gain_item($data_armors[reward.id], reward.amount)
    end
  end
end
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
# Overwrites: none
# Aliases: initialize, update
#==============================================================================
class Game_Map
  attr_accessor :ach_earned
  attr_accessor :ach_display
  #--------------------------------------------------------------------------
  # Alias Method; initialize
  #--------------------------------------------------------------------------
  alias :csca_ach_initialize :initialize
  def initialize
    csca_ach_initialize
    @ach_earned = false
    @ach_display = nil
  end
  #--------------------------------------------------------------------------
  # Alias Method; update
  #--------------------------------------------------------------------------
  alias :csca_ach_update :update
  def update(main)
    csca_update_achievements
    csca_ach_update(main)
  end
  #--------------------------------------------------------------------------
  # automatically earn achievement if progress 100%
  #--------------------------------------------------------------------------
  def csca_update_achievements
    $csca.achievements.each do |achievement|
      next if achievement.earned
      next if achievement.progress.nil?
      if csca_get_progress_completion(achievement)
        achievement.earn_achievement
        $game_map.ach_earned = true
        $game_map.ach_display = achievement
      end
    end
  end
  #--------------------------------------------------------------------------
  # determine progress completion
  #--------------------------------------------------------------------------
  def csca_get_progress_completion(achievement)
    return csca_ach_numerator(achievement)/csca_ach_denominator(achievement) >= 1
  end
  #--------------------------------------------------------------------------
  # determine rate numerator
  #--------------------------------------------------------------------------
  def csca_ach_numerator(achievement)
    id = achievement.progress.id
    case achievement.progress.type
    when :var
      return $game_variables[id]
    when :item
      return $game_party.item_number($data_items[id])
    when :weapon
      return $game_party.item_number($data_weapons[id])
    when :armor
      return $game_party.item_number($data_armors[id])
    when :gold
      if $imported["CSCA-CurrencySystem"]
        return $game_party.get_csca_cs_currency(id)[:amount]
      end
      return $game_party.gold
    when :step
      return $game_party.steps
    when :save
      return $game_system.save_count
    when :battle
      return $game_system.battle_count
    when :playtime
      return Graphics.frame_count / Graphics.frame_rate
    when :loot
      return $game_variables[CSCA_EXTRA_STATS::LOOTED]
    when :dtake
      return $game_variables[CSCA_EXTRA_STATS::DAMAGE_TAKEN]
    when :ddeal
      return $game_variables[CSCA_EXTRA_STATS::DAMAGE_DEALT]
    when :gspend
      return $game_variables[CSCA_EXTRA_STATS::GOLDSPENT]
    when :gearn
      return $game_variables[CSCA_EXTRA_STATS::GOLDGAINED]
    when :iuse
      return $game_variables[CSCA_EXTRA_STATS::ITEMS_USED]
    when :ibuy
      return $game_variables[CSCA_EXTRA_STATS::ITEMSBOUGHT]
    when :isell
      return $game_variables[CSCA_EXTRA_STATS::ITEMSSOLD]
    when :ebes
      return $game_party.csca_completion_percentage_bestiary*100.00
    when :eitm
      return $game_party.csca_completion_percentage_items*100.00
    when :ewep
      return $game_party.csca_completion_percentage_weapons*100.00
    when :earm
      return $game_party.csca_completion_percentage_armors*100.00
    when :eskl
      return $game_party.csca_completion_percentage_skills*100.00
    when :esta
      return $game_party.csca_completion_percentage_states*100.00
    when :ecst
      return $game_party.csca_completion_percentage_cust(id)*100.00
    when :etot
      return $game_party.csca_completion_percentage*100.00
    when :plvl
      return $csca.profession_ach_cache[id]
    when :rtda
      return $csca.recipe_types[id][1]
    when :nga
      return $csca.gathered_nodes[id]
    when :ntga
      return $csca.gathered_nodetypes[id]
    when :acht
      return $csca.achievements_earned
    when :achpt
      return $csca.achievement_total_points
    when :qamt
      return $csca.quest_info.completed
    when :sqc
      number = 0
      id.each do |quest_symbol|
        number += 1 if $csca.quest_info.list[quest_symbol]
      end
      return number
    end
    error = "Inappropriate achievement progress type given"
    script = "CSCA Achievements"
    suggestion = "Check to make sure your progress types are all correct"
    $csca.report_error(error, script, suggestion)
  end
  #--------------------------------------------------------------------------
  # determine rate denominator
  #--------------------------------------------------------------------------
  def csca_ach_denominator(achievement)
    return achievement.progress.upper_bound
  end
end

Uno de los problemas resueltos, lo hice en 10 minutos xD, lo otro esta dentro del gui archivemente por lo que no puedo hacer nada porque no tengo aun el script.

saludossssssssssssss
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por ZororoWhite el Mar Mar 22, 2016 11:04 am

¡Muchas gracias, Faty! Iré probando el CSCA Achievements a ver si funciona con los arreglos que le has hecho. En cuanto al de Gambit, te lo dejo por aquí a ver si no me explota foroactivo.

Spoiler:

Código:
#==============================================================================
# GAMBIT ACHIEVEMENT GUI
#------------------------------------------------------------------------------
# WRITTEN BY: Gambit
#
# Special thanks to: Casper Gaming, Moghunter, and Omegas7 for script references
#  and trophy graphics
#------------------------------------------------------------------------------
# VERSION: 1.11
#
# Updates may be found at: http://www.rpgmakervxace.net/topic/14939-gambit-achievement-gui/
#------------------------------------------------------------------------------
# CHANGELOG:
#  v 1.11 - May 13, 2014  > Incorporated updates since CSCA Achievements 2.0.0
#                        > Automatically incorporates new achievement types as
#                          they are added to the CSCA Achievements script
#  v 1.10 - July 13, 2013 > Script overhaul to maintain compatibility with the
#                          CSCA Achievements 2.0.0 update
#                        > Massive performance improvement when drawing badges
#                          as the number of calculations was cut exponentially
#                        > Fixed issue with gauges going beyond description
#                          bubbles when STOP_TRACK is false and the
#                          achievements' requirements are exceeded (STOP_TRACK
#                          will now function as expected based on setting in
#                          CSCA Achievements script)
#                        > Fixed issue where Achievements menu command greyed
#                          out but was not removed when ADD_COMMAND_TO_MENU is
#                          set to false
#  v 1.02 - May 13, 2013 > Included option to store total achievement score in a
#                          game variable
#  v 1.01 - May 13, 2013 > Included option to add Achievements command to menu
#                        > If interrupted while displaying banners of multiple
#                          achievements, banners will now finish displaying
#                          when appropriate
#                        > Fixed issue with banner staying on screen for a scene
#                          if interrupted
#                        > Updated to include CSCA Achievements 1.2.4 bug fix
#  v 1.00 - May 3, 2013  > Initial release
#------------------------------------------------------------------------------
# DESCRIPTION AND FEATURES:
#  This script creates an aesthetically-pleasing and customizable achievements
#  interface that is powered by the CSCA Achievement System. Each achievement
#  will be associated with a badge rather than simple text. This badge can
#  either be specific to the achievement or general to all achievements without
#  a badge specified. This script was inspired by the badges in Pokemon games.
#
#  Features:
#  - Banner graphic that appears live when a player earns an achievement
#    - Banner is dynamic and will feature the specific badge of the earned
#      achievement, congratulatory text, and the title and reward (if any) of
#      the earned achievement.
#    - If several achievements are earned simultaneously, banners will queue
#      and continue displaying until all are shown. If banners are interrupted,
#      any earned achievements that have not been shown will automatically
#      continue displaying when appropriate (e.g. upon finishing a battle,
#      exiting a menu, etc.)
#  - Achievements screen that displays the available badges
#    - Image of choice may serve as the background for the screen
#    - Locked badges will either appear as a generic locked image or with a
#      lock superimposed on a greyed-out version of the actual badge image
#    - Unlocked badges can each have a specific image. If not specified for
#      certain badges, a generic image will be used.
#    - BGM can be played upon opening the Achievements screen
#    - The amount of badges in each row and the number of rows of badges that
#      are displayed at once can be customized. The script will calculate and
#      position the badges accordingly.
#    - Expected system sound effects are associated with all actions on the
#      Achievements screen.
#    - Animated cursor is used to navigate the badges.
#    - Achievement title changes and corresponds to the highlighted badge
#    - Intuitive controls (holding a directional button will continuously
#      move in that direction, pushing down and up will skip to the next row,
#      the cursor will jump to the first/last achievement when you reach the
#      beginning/end, navigation loops so going back from the beginning will
#      allow you to jump to the last badge and vice versa)
#    - Selecting an achievement will open a description bubble which will
#      display a one-line (aim for a maximum of 5 words) description, a
#      progress bar, and the reward (if any). This is powered by, and
#      configured in, the CSCA Achievements script. This bubble allows the
#      player to continue navigating through the badges as it moves and updates
#      with the current selection. Canceling will erase the bubble.
#    - Animated arrows will indicate whether additional badges are located
#      below or above the current view.
#    - The bottom of the screen displays a summary of the totals with an
#      optional percentage calculation. This is in addition to the score option
#      in the CSCA Achievements script.
#    - Ability to change font of achievement titles, description bubbles, and
#      the dynamic parts of the achievement banner
#    - Ability to customize all images used by the script
#    - Ability to change game resolution to 640 x 480 as recommended. You will
#      need to use custom images if using a different resolution. At minimum,
#      the background will need to be changed.
#  - Ability to add Achievements option to menu
#  - Ability to store total achievement score in a game variable
#------------------------------------------------------------------------------
# REQUIRES:
# - CSCA Core Script (http://www.rpgmakervxace.net/topic/6879-csca-core-script/)
# - CSCA Achievements (http://www.rpgmakervxace.net/topic/5554-csca-achievements/)
#------------------------------------------------------------------------------
# INSTRUCTIONS AND SETUP:
#  Place the CSCA Core Script first, followed by CSCA Achievements, and then
#  this script below the Materials heading and above the Main Process heading.
#
#  Create a new folder named Gambit Achievement in the Graphics folder of your
#  project. Place all png images that are relevant to the script in this folder.
#  These include the background, cursors, badges, bubbles, etc. A black version
#  of the background is also included (file name is AchievementBG). Black
#  description bubbles are not included.
#
#  The badges tested were 90 x 90. Other sizes should work since the screen is
#  dynamically created based on the sizes of your badges; however, all of your
#  badges should be the same size as one another.
#
#  Changing the description bubbles is not recommended. Their coding will not
#  adapt well if other images are used. I would recommend sticking with the
#  current bubbles or disabling descriptions. More details on this are in the
#  appropriate comments below.
#
#  Please note that this script was designed for a 640 x 480 resolution. Using
#  this resolution is HIGHLY recommended. You will need to create custom
#  graphics if you do not. This script will adjust your resolution to 640 x 480
#  by default. The option to disable it is below (RESIZE).

#  Setup options are available below AND at the top of the CSCA Achievements
#  script. Configure the achievements themselves in the CSCA Achievements script
#  and the aesthetics of the Achievements screen in this script.
#
#  Setting up the achievements in the CSCA Achievements script:
#    1. Limit descriptions to ONLY ONE LINE if you plan on using the description
#      bubble and tracking progress for the achievement. I recommend up to 5
#      words per description line. Using multiple lines for a description when
#      also tracking progress will result in the description text overlapping
#      with the progress text. If you do not use the bubbles, descriptions will
#      not be shown so description setup can be ignored.
#        Example: DESCRIPTION[0] = ["Open 10 Treasure Chests"]
#            NOT: DESCRIPTION[0] = ["Open 10 Treasure Chests","to unlock."]
#    2. Setup progress and rewards as explained in that script.
#    3. For the actual achievement setup:
#      - :graphic, :complete_icon, and :incomplete_icon are not used or
#        relevant when this script is used; you do not have to include those
#        features in your achievement setup unless you plan to use the CSCA
#        text-based Achievements scene in conjunction with this.
#      - This script adds another feature, :badge. This is the name of the
#        specific badge associated with the achievement. If one is not
#        specified, or nil, the default badge (set below) will be used. The
#        name of the file should be in quotes. Here is an example of a properly
#        setup achievement:
#            ACHIEVEMENT[0] = {
#            :symbol => :tkam,
#            :name => "To Kill a Mockingbird",
#            :name_before_unlock => "???",
#            :description => DESCRIPTION[0],
#            :description_before_unlock => DESCRIPTION[1],
#            :progress => PROGRESS[1],
#            :reward => REWARD[0],
#            :points => 5,
#            :badge => "TKAMBadge"
#            }
#      - Remember, the first achievement should be numbered 0, NOT 1.
#      - Pay attention to the commas. If you add the :badge entry to the end of
#        your current achievement setup, remember to add a comma to the end of
#        the previous line.
#      - The title of the achievement is "To Kill a Mockingbird"
#      - ??? will be displayed as the title until the achievement is unlocked.
#        If nil was used instead of "???", "To Kill a Mockingbird" would be
#        displayed as the title regardless of whether the achievement has been
#        earned or not.
#      - :description refers to the description that will be shown before
#        unlocking the achievement. :description_before_unlock refers to that
#        displayed after unlocking it. If nil was used instead of
#        DESCRIPTION[1] for :description_before_unlock, then DESCRIPTION[0]
#        would be shown in both cases, similar to the title example mentioned
#        in the previous bullet.
#      - :progress and :reward refer to the progress tracking and rewards that
#        will be given, respectively.
#      - :graphic, :complete_icon, and :incomplete_icon are the ignored
#          features and have been left out. Again, you could also include them
#          if you wish but they have no effect on the Achievement GUI.
#      - **IMPORTANT** Finally, :badge refers to the file name of the badge
#        associated with this achievement. The file name should be "TKAMBadge"
#        in this example. If nil was used or if it was skipped entirely, the
#        default badge image, set below, will be used. This is a new feature
#        added by this script. Since, by default, this feature does not exist
#        in the CSCA Achievements script, all achievements will display the
#        default badge until one is added.
#    4. In the Misc. setup section of the CSCA Achievements script, the
#      following options are used by this script and should be configured if
#      necessary: TOTAL, POINTS, USE_POINTS, PROGRESS, REWARD, STOP_TRACK,
#      COLOR1, COLOR2
#      - I recommend setting USE_POINTS to false if the score is interfering
#        with the down page cursor in your game.
#      - I recommend setting STOP_TRACK to true if you do not want to see
#        fractions such as 1500/100 in the description bubbles of completed
#        achievements after the player has exceeded the achievements'
#        requirements.
#    5. Other necessary changes to the CSCA Achievements options may be
#      configured automatically based on your settings in this script.
#
#**All images for this script should be located in Graphics\Gambit Achievement**
#
#  Setup for this script is below. Please read explanations in comments.
#------------------------------------------------------------------------------
# To access the Achievements screen, use the line below in a script call:
#  SceneManager.call(Gambit_Achievement)
#
# You can add add the Achievements screen to the menu using this or various
# other scripts, add an event that calls the script when interacted with, etc.
#------------------------------------------------------------------------------
# Terms of Use:
# - Credit if used
# - Free for use in non-commercial projects
# - Please do not repost elsewhere, convert, or translate this script without
#  permission.
# - If seeking to use in commercial projects (projects that are generating money
#  in any way, including advertisements), please contact me via PM at:
#  http://www.rpgmakervxace.net/topic/14939-gambit-achievement-gui/
# - When using third-party scripts, the terms and conditions of those scripts
#  also apply. Please be aware of them prior to using.
# - Not for use in any project involving any form of nudity, commercial or not
#==============================================================================

module Gambit
  module Achievement
   
   
    BADGES_ROW = 5  # How many badges to display in each row. If DESCRIPTION_ALLOW is set to true, recommended setting: 4 or 5 (same value as ROWS_PAGE).
    ROWS_PAGE =  5  # How many rows of badges to display at once. If DESCRIPTION_ALLOW is set to true, recommended setting: 4 or 5 (same value as BADGES_ROW).
    BG_PICTURE = "AchievementBG2"  # File name of background picture for Achievements screen.
   
   
    CHANGE_FONT = false  # Set to true to change the font of achievement titles, description bubbles, and the achievement banner. If true, configure FONT_NAME.
    FONT_NAME = "Arial"  # Only needed if CHANGE_FONT is set to true. Specify the desired font name.
    USE_PERCENT = true  # Calculate and display the percentage of completed achievements at the bottom of the screen. Using percent will disable score. in the CSCA Achievements script.
    CENTER_T = true  # If true, achievement titles will be centered. Recommended setting: true.
   
   
    ADD_COMMAND_TO_MENU = true  # If true, a command to access the Achievements screen will be added to the menu.
    MENUCOMMAND = "Achievements"  # Only needed if ADD_COMMAND_TO_MENU is set to true. Text that will be displayed in the menu.
   
   
    FADEOUT_BGM = false  # Fadeout background music when opening Achievements screen.
    PLAY_BGM = false  # Play specific BGM on Achievements screen. If true, configure BGM_NAME, BGM_VOLUME, and BGM_PITCH.
    BGM_NAME = "Theme4"  # Only needed if PLAY_BGM is set to true. File name of BGM that is played when the Achievements screen is opened. If custom, audio file should be located in the Audio/BGM folder.
    BGM_VOLUME = 100  # Only needed if PLAY_BGM is set to true. Volume of BGM that is played when the Achievements screen is opened. Recommended setting: 100.
    BGM_PITCH = 100  # Only needed if PLAY_BGM is set to true. Pitch of BGM that is played when the Achievements screen is opened. Recommended setting: 100.
   
   
    TROPHY_PICTURE = "Trophy"  # File name of default unlocked badge image. This will be used for achievements that do not have specific badge images specified.
    USE_LOCKED_GRAPHIC = false  # If true, a generic badge image will be used for locked achievements. If true, configure LOCKED_TROPHY_PICTURE.
                                # If false, a lock image will be displayed above a greyed-out version of each actual badge. Setting to false may result in longer loading times to open the Achievements screen, especially for games with many achievements. If false, configure LOCK_PICTURE.
    LOCKED_TROPHY_PICTURE = "LockedTrophy"  # Only needed if USE_LOCKED_GRAPHIC is set to true. File name for generic badge image displayed for locked achievements.
    LOCK_PICTURE = "Lock"  # Only needed if USE_LOCKED_GRAPHIC is set to false. File name for lock image that is displayed above the greyed-out badge when achievement is still locked.
   
   
    BADGECURSOR = "BadgeCursor"  # File name of cursor image used to select badges.
    CURSOR_ANIM = true  # If true, two images will be used for the cursor, animating the selection. If true, configure BADGECURSOR2.
    BADGECURSOR2 = "BadgeCursor2"  # Only needed if CURSOR_ANIM is set to true. File name of second cursor.
   
   
    CURSOR_UP = "CursorU"  # File name of the icon indicating additional badges are located above the currvent view.
    CURSOR_DOWN = "CursorD"  # File name of the icon indicating additional badges are located below the current view.
   
   
    RESIZE = true  # If true, game resolution will be changed to 640 x 480. Recommended setting: true. If set to false, BG_PICTURE will need to be custom-made and DESCRIPTION_ALLOW should be set to false for the best experience.
   
   
    DESCRIPTION_ALLOW = true  # Allow badges to be selected and, if so, the description bubble. If playing at a resolution other than 640 x 480, recommended setting: false. If having issues with description bubble locations or using unrecommended values for BADGES_ROW and/or ROWS_PAGE, recommended setting: false.
    DESCRIPTION_BG = "DescriptionBubble"  # Only needed if DESCRIPTION_ALLOW is set to true. File name of description bubble extending to the upper left.
    DESCRIPTION_BG_R = "DescriptionBubbleR"  # Only needed if DESCRIPTION_ALLOW is set to true. File name of description bubble extending to the lower right.
    DESCRIPTION_BG_H = "DescriptionBubbleH"  # Only needed if DESCRIPTION_ALLOW is set to true. File name of description bubble extending horizontally to the right.
    DESCRIPTION_BG_V = "DescriptionBubbleV"  # Only needed if DESCRIPTION_ALLOW is set to true. File name of description bubble extending vertically downward.
    DESCRIPTION_BG_VR = "DescriptionBubbleVR"  # Only needed if DESCRIPTION_ALLOW is set to true. File name of description bubble extending vertically upward.
    DESCRIPTION_BG_CH = "DescriptionBubbleCH"  # Only needed if DESCRIPTION_ALLOW is set to true. File name of description bubble extending horizontally to the right and a little downward, designed for descriptions of some center badges that would otherwise not fit.
    CENTER_DESC = true  # Only needed if DESCRIPTION_ALLOW is set to true. If true, description text will be centered. Recommended setting: true.
   
   
    BANNER = "AchievementBanner"  # File name of the initial achievement banner shown first when an achievement is earned. This should include static content you would like for all achievements (e.g. Congratulations!).
    BANNER_BG = "AchievementBannerBG"  # File name of the clean achievement banner background for dynamic text (such as achievement name and reward) to be displayed on top.
    BANNER_PLAY_SE = true  # Play specific SE when an achievement is earned. If true, configure BANNER_SE_NAME, BANNER_SE_VOLUME, and BANNER_SE_PITCH.
    BANNER_SE_NAME = "Applause1"  # Only needed if BANNER_PLAY_SE is set to true. File name of banner SE that is played when an achievement is earned. If custom, audio file should be located in the Audio/SE folder.
    BANNER_SE_VOLUME = 100  # Only needed if BANNER_PLAY_SE is set to true. Volume of banner SE that is played when an achievement is earned. Recommended setting: 100.
    BANNER_SE_PITCH = 100  # Only needed if BANNER_PLAY_SE is set to true. Pitch of banner SE that is played when an achievement is earned. Recommended setting: 100.
   
   
    USE_SCORE_VARIABLE = false  # Store total achievement score in a game variable. If true, configure SCORE_VARIABLE.
    SCORE_VARIABLE = 0  # Only needed if USE_SCORE_VARIABLE is set to true. Game variable used to store total score.
   
   
  end
end

#####################################################################################
#####################################################################################
#####################################################################################
#####################################################################################
###### END OF SETTING UP ###### ONLY EDIT BELOW IF YOU KNOW WHAT YOU ARE DOING ######
#####################################################################################
#####################################################################################
#####################################################################################
#####################################################################################


($imported ||={})["GambitAchievementGUI"] = true
raise "Gambit Achievement GUI requires CSCA Core Script" unless $imported["CSCA-Core"]
raise "Gambit Achievement GUI requires CSCA Achievements" unless $imported["CSCA-Achievements"]


Graphics.resize_screen(640, 480) if Gambit::Achievement::RESIZE


class Gambit_Achievement < Scene_MenuBase
  #--------------------------------------------------------------------------#
  # Start Processing                                                        #
  #--------------------------------------------------------------------------#
  def start
    super
    fadeout_bgm if Gambit::Achievement::FADEOUT_BGM
    RPG::BGM.new(Gambit::Achievement::BGM_NAME, Gambit::Achievement::BGM_VOLUME, Gambit::Achievement::BGM_PITCH).play if Gambit::Achievement::PLAY_BGM
    create_head_window
    create_achievement_window
    create_selection_window
    create_totals_window
  end
  #--------------------------------------------------------------------------#
  # Fadeout BGM                                                              #
  #--------------------------------------------------------------------------#
  def fadeout_bgm (time = 60)
    RPG::BGM.fade(time)
    RPG::BGM.stop
  end
  #--------------------------------------------------------------------------#
  # Create Background                                                        #
  #--------------------------------------------------------------------------#
  def create_background
    @background_sprite = Sprite_Base.new
    @background_sprite.bitmap = Cache.gamachpic(Gambit::Achievement::BG_PICTURE)
  end
  #--------------------------------------------------------------------------#
  # Create Header Window                                                    #
  #--------------------------------------------------------------------------#
  def create_head_window
    @head_window = Gam_Window_Header.new(0, 0)
    @head_window.viewport = @viewport
    @head_window.height = Graphics.height/10
    @head_window.opacity = 0
  end
  #--------------------------------------------------------------------------#
  # Create Achievement Selection Window                                      #
  #--------------------------------------------------------------------------#
  def create_selection_window
    @command_window = Gam_Window_SelectableBadgeDisplay.new(0,
      @head_window.height+@achievement_window.height,Graphics.width,Graphics.height-@head_window.height-
      @achievement_window.height-48)
    @command_window.viewport = @viewport
    @command_window.opacity = 0
    @command_window.help_window = @achievement_window
    @command_window.set_handler(:cancel, method(:return_scene))
  end
  #--------------------------------------------------------------------------#
  # Create Achievement Window                                                #
  #--------------------------------------------------------------------------#
  def create_achievement_window
    @achievement_window = Gam_Window_AchievementNameDisplay.new(0,@head_window.height,
      Graphics.width,Graphics.height/6)
    @achievement_window.viewport = @viewport
    @achievement_window.opacity = 0
  end
  #--------------------------------------------------------------------------#
  # Create Achievement Totals Window                                        #
  #--------------------------------------------------------------------------#
  def create_totals_window
    @totals_window = CSCA_Window_AchievementTotals.new(0,@head_window.height+@achievement_window.height+@command_window.height,
      Graphics.width,48)
    @totals_window.viewport = @viewport
    @totals_window.opacity = 0
  end
end

module Cache   
  def self.gamachpic(picname)
      load_bitmap("Graphics/Gambit Achievement/", picname)
    end
end
 
module CSCA
  module ACHIEVEMENTS
    POP_ALIGN = :bottom  # Leave as :bottom.
  end
end


#==============================================================================
# ** Gam_Window_AchievementDisplay
#------------------------------------------------------------------------------
# This window displays the badges and allows for selection.
#==============================================================================
class Gam_Window_SelectableBadgeDisplay < Window_Selectable
 
  def initialize(x,y,width,height)
    super
    @csca_window = CSCA_Window_AchievementDisplay.new(0, 0, 0, 0)
    @data = []
    @index = 0
    @hold_key = 0
    @prev_dir = nil
    @draw_desc = false
    refresh
    select(0)
  end
 
  def setup_pages
    @badges_per_page = Gambit::Achievement::BADGES_ROW * Gambit::Achievement::ROWS_PAGE
    @badges_per_row = Gambit::Achievement::BADGES_ROW
    @rows_per_page = Gambit::Achievement::ROWS_PAGE
    @total_rows = @data.size / @badges_per_row
    remainder_rows = @data.size % @badges_per_row
    @total_rows += 1 if remainder_rows != 0
    @total_rows = 1 if @total_rows == 0
    @extra_rows = @total_rows - @rows_per_page
    @y_pad = ((11*Graphics.height/15 - 48) - contents.height) / 2
    @co = 255
    @opacity_speed = 0
    @cursor_speed = 0
  end

  def create_page_cursors
    @d_cursor = Sprite_Base.new
    @d_cursor.bitmap = Cache.gamachpic(Gambit::Achievement::CURSOR_DOWN)
    @d_cursor.z = 500
    @d_cursor.x = 7*Graphics.width/8 - @d_cursor.width/2
    @d_cursor.y = Graphics.height - 48 - @y_pad - @y_spacing
   
    @u_cursor = Sprite_Base.new
    @u_cursor.bitmap = Cache.gamachpic(Gambit::Achievement::CURSOR_UP)
    @u_cursor.z = 2
    @u_cursor.x = Graphics.width/8 - @u_cursor.width/2
    @u_cursor.y = 4*Graphics.height/15 - @u_cursor.height + @y_pad + @y_spacing
    @u_cursor.visible = false
   
    @cy1 = 0
    @cy2 = 0
  end
 
  def item_rect(index)
    rect = Rect.new
    rect.width = contents.width
    rect.height = contents.height
    rect.x = 0
    rect.y = 0
    rect
  end

  def update_cursor
    if @cursor_all
      cursor_rect.set(0, 0, contents.width, row_max * item_height)
      self.top_row = 0
    elsif @index < 0
      cursor_rect.empty
    else
      ensure_cursor_visible
    end
  end
 
  def update_padding
    self.padding = standard_padding
  end
 
  def contents_height
    return 280 if Graphics.height == 480
    return 233 if Graphics.height == 416
  end
 
  def create_cursors
    @cursor = Sprite_Base.new
    @cursor.bitmap = Cache.gamachpic(Gambit::Achievement::BADGECURSOR)
    @cursor.z = 1
    @cursor.x,@cursor.y = @badges[0].badge.x,@badges[0].badge.y
    if Gambit::Achievement::CURSOR_ANIM
      @cursor2 = Sprite_Base.new
      @cursor2.bitmap = Cache.gamachpic(Gambit::Achievement::BADGECURSOR2)
      @cursor2.z = 1
      @cursor2.x,@cursor2.y = @cursor.x,@cursor.y
      @cursor2.opacity = 0
    end
  end

  def draw_badge(index)
    achievement = @data[index]
    return unless achievement
    @badges ||= []
    @badges.push(GamBadge.new(achievement,contents.width,contents.height,@total_rows))
    @badge_height = @badges[0].badge.height if @badges[0].badge.height
    @badge_width = @badges[0].badge.width if @badges[0].badge.width
    @y_spacing = (contents.height - Gambit::Achievement::ROWS_PAGE*@badge_height) / (Gambit::Achievement::ROWS_PAGE+1)
  end
 
  def draw_item(index)
    draw_badge(index)
  end
 
  def update_help
    @help_window.set_item(@data[index])
  end
 
  def call_update_help
    update_help if @help_window
  end
 
  def move_cursor(achievement, last_index)
    @laterY = @badges[achievement].badge.y
    a = false
    while @laterY >= @y_pad + @y_spacing*(@rows_per_page + 1) + (@badge_height * @rows_per_page) + 4*Graphics.height/15
      if achievement == @data.size - 1 && last_index == 0 && @extra_rows > 0
        changeY(-1*@extra_rows*(@badge_height + @y_spacing))
        @u_cursor.visible = true
        @d_cursor.visible = false
      else
        changeY(-1*(@badge_height + @y_spacing))
        @u_cursor.visible = true
        @d_cursor.visible = false if @badges[@data.size - 1].badge.y < @y_pad + @y_spacing*(@rows_per_page + 1) + (@badge_height * @rows_per_page) + 4*Graphics.height/15
      end
      a = true
    end
    if !a
      while @laterY < 4*Graphics.height/15 + @y_pad + @y_spacing
        if achievement == 0 && last_index == @data.size - 1 && @extra_rows > 0
          changeY(@extra_rows*(@badge_height + @y_spacing))
          @u_cursor.visible = false
          @d_cursor.visible = true
        else
          changeY(@badge_height + @y_spacing)
          @d_cursor.visible = true
          @u_cursor.visible = false if @badges[0].badge.y >= 4*Graphics.height/15 + @y_pad + @y_spacing #== @badges[0].badge.oy
        end
      end
    end
    @cursor.x,@cursor.y = @badges[achievement].badge.x,@badges[achievement].badge.y
    @cursor2.x,@cursor2.y = @cursor.x,@cursor.y if Gambit::Achievement::CURSOR_ANIM
  end

  def changeY(y)
    for i in 0...@badges.size
      row_number = i / @badges_per_row
      @badges[i].badge.y += y
      @badges[i].lock.y = @badges[i].badge.y if !@badges[i].lock.nil?
      if @badges[i].badge.y > Graphics.height - 48 - @y_spacing - @y_pad - @badge_height || @badges[i].badge.y < 4*Graphics.height/15 + @y_spacing + @y_pad
        @badges[i].badge.visible = false
        @badges[i].lock.visible = false if !@badges[i].lock.nil?
      elsif !@badges[i].badge.visible
        @badges[i].badge.visible = true
        @badges[i].lock.visible = true if !@badges[i].lock.nil?
      end
      @laterY += y
    end
  end
 
  def flash_cursor
    @opacity_speed += 1
    case @opacity_speed
    when 1...15
      @co -= 17
      when 16...30
        @co += 17
      when 45
        @opacity_speed = 0
        @co = 255
      end
    @cursor.opacity = @co
    @cursor2.opacity = 255 - @co if Gambit::Achievement::CURSOR_ANIM
  end
 
  def animate_page_cursors
    @cursor_speed += 1
    case @cursor_speed
      when 1...20
        @cy1 += 0.5
        @cy2 += 0.5
      when 21...40
        @cy1 -= 0.5
        @cy2 -= 0.5
      when 60
        @cursor_speed = 0
        @cy1 = 0
        @cy2 = 0
    end
    @u_cursor.y = 4*Graphics.height/15 - @u_cursor.height + @y_pad + @y_spacing - @cy2/4
    @d_cursor.y = Graphics.height - 48 - @y_pad - @y_spacing + @cy1/4
  end
 
  def item_max
    return 0
  end

  def data_max
    @data ? @data.size : 1
  end

  def draw_all_items
    data_max.times {|i| draw_item(i) }
  end
 
  def process_cursor_move
    return unless cursor_movable?
  end
 
  def update
    super
    last_index = @index
    flash_cursor
    animate_page_cursors if @data.size > @badges_per_page
    check_sel_input
    check_dir_input
    @hold_key >= 5 ? repeat_dir : trigger_dir
    if @index < 0
      if last_index == 0
        @index = @data.size - 1
      else
        @index = 0
      end
    end
    if @index > @data.size - 1
      if last_index == @data.size - 1
        @index = 0
      else
        @index = @data.size - 1
      end
    end
    if @index != last_index
      Sound.play_cursor
      select(@index)
      move_cursor(@index, last_index)
    end
    if @draw_desc
      contents.clear
      draw_desc_bg
      achievement = @data[@index]
      draw_description(determine_desc_x,determine_desc_y,3*@desc_bg.width/4,line_height,achievement)
      draw_progress(determine_desc_x,determine_desc_y+3*line_height/2,3*@desc_bg.width/4,line_height,achievement) if achievement.progress
      draw_reward(determine_desc_x,determine_desc_y+15*line_height/4,3*@desc_bg.width/4,line_height,achievement) if achievement.reward
    end
  end
 
  def check_dir_input
    if Input.press?(:UP)
      if @prev_dir == :UP
        @hold_key += 1
      else
        @hold_key = 0
      end
      @prev_dir = :UP
    end
    if Input.press?(:DOWN)
      if @prev_dir == :DOWN
        @hold_key += 1
      else
        @hold_key = 0
      end
      @prev_dir = :DOWN
    end
    if Input.press?(:RIGHT)
      if @prev_dir == :RIGHT
        @hold_key += 1
      else
        @hold_key = 0
      end
      @prev_dir = :RIGHT
    end
    if Input.press?(:LEFT)
      if @prev_dir == :LEFT
        @hold_key += 1
      else
        @hold_key = 0
      end
      @prev_dir = :LEFT
    end
  end
 
  def check_sel_input
    if Input.trigger?(:C) && Gambit::Achievement::DESCRIPTION_ALLOW
      if !@draw_desc
        @draw_desc = true
        draw_desc_bg
      else
        Sound.play_cursor
      end
      Sound.play_ok
    end
    if Input.trigger?(:B)
      Sound.play_cancel
      if @draw_desc
        @draw_desc = false
        clear_desc_bg
        contents.clear
      else
        prepare_quit
      end
    end
  end
 
  def prepare_quit
    Graphics.freeze
    clear_badges
    clear_cursors
    fadeout_bgm if Gambit::Achievement::PLAY_BGM
    SceneManager.return
  end
 
  def clear_badges
    for i in 0...@badges.size
      @badges[i].badge.dispose
      @badges[i].lock.dispose if !@badges[i].lock.nil?
      @badges[i] = nil
    end
  end
 
  def clear_cursors
    @cursor.dispose
    @d_cursor.dispose if @data.size > @badges_per_page
    @u_cursor.dispose if @data.size > @badges_per_page
    @cursor2.dispose if Gambit::Achievement::CURSOR_ANIM
    @cursor = nil
    @d_cursor = nil if @data.size > @badges_per_page
    @u_cursor = nil if @data.size > @badges_per_page
    @cursor2 = nil if Gambit::Achievement::CURSOR_ANIM
  end
 
  def fadeout_bgm (time = 60)
    RPG::BGM.fade(time)
    RPG::BGM.stop
  end
 
  def repeat_dir
    @index += @badges_per_row if Input.repeat?(:DOWN)
    @index -= @badges_per_row if Input.repeat?(:UP)
    @index += 1 if Input.repeat?(:RIGHT)
    @index -= 1 if Input.repeat?(:LEFT)
  end
 
  def trigger_dir
    @index += @badges_per_row if Input.trigger?(:DOWN)
    @index -= @badges_per_row if Input.trigger?(:UP)
    @index += 1 if Input.trigger?(:RIGHT)
    @index -= 1 if Input.trigger?(:LEFT)
  end
 
  def draw_desc_bg
    if @desc_bg.nil?
      @desc_bg = Sprite_Base.new
      @desc_bg.bitmap = Cache.gamachpic(Gambit::Achievement::DESCRIPTION_BG)
      @desc_bg_r = Sprite_Base.new
      @desc_bg_r.bitmap = Cache.gamachpic(Gambit::Achievement::DESCRIPTION_BG_R)
      @desc_bg_h = Sprite_Base.new
      @desc_bg_h.bitmap = Cache.gamachpic(Gambit::Achievement::DESCRIPTION_BG_H)
      @desc_bg_v = Sprite_Base.new
      @desc_bg_v.bitmap = Cache.gamachpic(Gambit::Achievement::DESCRIPTION_BG_V)
      @desc_bg_vr = Sprite_Base.new
      @desc_bg_vr.bitmap = Cache.gamachpic(Gambit::Achievement::DESCRIPTION_BG_VR)
      @desc_bg_ch = Sprite_Base.new
      @desc_bg_ch.bitmap = Cache.gamachpic(Gambit::Achievement::DESCRIPTION_BG_CH)
      @desc_bg.z = 1
      @desc_bg_r.z = 1
      @desc_bg_h.z = 1
      @desc_bg_v.z = 1
      @desc_bg_vr.z = 1
      @desc_bg_ch.z = 1
    end
    if @cursor.y - @desc_bg.height > 4*Graphics.height/15
      @desc_bg_r.visible = false
      @desc_bg_h.visible = false
      @desc_bg_v.visible = false
      @desc_bg_vr.visible = false
      @desc_bg_ch.visible = false
      @desc_bg.visible = true
    elsif @cursor.y + @badge_height + @desc_bg_r.height <= Graphics.height - 48
      @desc_bg.visible = false
      @desc_bg_h.visible = false
      @desc_bg_v.visible = false
      @desc_bg_vr.visible = false
      @desc_bg_ch.visible = false
      @desc_bg_r.visible = true
    else
      @desc_bg.visible = false
      @desc_bg_r.visible = false
      determine_horv_bubble
    end
    if @cursor.x < Graphics.width / 2
      @desc_bg.mirror = true
      @desc_bg_r.mirror = false
      @desc_bg_h.mirror = false
      @desc_bg.x,@desc_bg.y = @cursor.x + @badge_width/2,@cursor.y - @desc_bg.height
      @desc_bg_r.x,@desc_bg_r.y = @cursor.x + @badge_width/2,@cursor.y + @badge_height
      @desc_bg_h.x,@desc_bg_h.y = @cursor.x + @badge_width,@cursor.y - 2*@badge_height/3
    else
      @desc_bg.mirror = false
      @desc_bg_r.mirror = true
      @desc_bg_h.mirror = true
      @desc_bg.x,@desc_bg.y = @cursor.x + @badge_width/2 - @desc_bg.width,@cursor.y - @desc_bg.height
      @desc_bg_r.x,@desc_bg_r.y = @cursor.x + @badge_width/2 - @desc_bg.width,@cursor.y + @badge_height
      @desc_bg_h.x,@desc_bg_h.y = @cursor.x - @desc_bg_h.width,@cursor.y - 2*@badge_height/3
    end
  end
 
  def determine_horv_bubble
    if @cursor.x + @badge_width + @desc_bg_h.width > Graphics.width + 10 && @cursor.x - @desc_bg_h.width < 0 - 10
      @desc_bg_h.visible = false
      if @cursor.y - @desc_bg_vr.height + @badge_height/2 > 4*Graphics.height/15 - 5
        @desc_bg_v.visible = false
        @desc_bg_ch.visible = false
        @desc_bg_vr.visible = true
        @desc_bg_vr.x,@desc_bg_vr.y = @cursor.x + @badge_width/2 - @desc_bg_vr.width/2,@cursor.y + @badge_height/2 - @desc_bg_vr.height
      elsif @cursor.y + @badge_height/2 + @desc_bg_v.height > Graphics.height - 48
        @desc_bg_v.visible = false
        @desc_bg_vr.visible = false
        @desc_bg_ch.visible = true
        @desc_bg_ch.x,@desc_bg_ch.y = @cursor.x + @badge_width/2 - 10,@cursor.y + @badge_height/2 - 25
      else
        @desc_bg_vr.visible = false
        @desc_bg_ch.visible = false
        @desc_bg_v.visible = true
        @desc_bg_v.x,@desc_bg_v.y = @cursor.x + @badge_width/2 - @desc_bg_v.width/2,@cursor.y + @badge_height/2
      end
    else
      @desc_bg_v.visible = false
      @desc_bg_vr.visible = false
      @desc_bg_ch.visible = false
      @desc_bg_h.visible = true
    end
  end
 
  def determine_desc_x
    if @desc_bg.visible
      return @desc_bg.x + @desc_bg.width/11
    elsif @desc_bg_r.visible
      return @desc_bg_r.x + @desc_bg_r.width/11
    elsif @desc_bg_r.mirror
      return @desc_bg_h.x + @desc_bg_h.width/11
    elsif @desc_bg_v.visible
      return @desc_bg_v.x + @desc_bg_v.width/11
    elsif @desc_bg_vr.visible
      return @desc_bg_vr.x + @desc_bg_vr.width/11
    elsif @desc_bg_ch.visible
      return @desc_bg_ch.x + @desc_bg_ch.width/7
    else
      return @desc_bg_h.x + @desc_bg_h.width/6
    end
  end
 
  def determine_desc_y
    if @desc_bg.visible
      return @desc_bg.y - 8*@desc_bg.height/15
    elsif @desc_bg_r.visible
      return @desc_bg_r.y - @desc_bg_r.height/3
    elsif @desc_bg_v.visible
      return @desc_bg_v.y - 3*@desc_bg_v.height/10
    elsif @desc_bg_vr.visible
      return @desc_bg_vr.y - 13*@desc_bg_vr.height/25
    elsif @desc_bg_ch.visible
      return @desc_bg_ch.y - 6*@desc_bg_ch.height/13
    else
      return @desc_bg_h.y - 6*@desc_bg_h.height/13
    end
  end
 
  def clear_desc_bg
    @desc_bg.dispose
    @desc_bg = nil
    @desc_bg_r.dispose
    @desc_bg_r = nil
    @desc_bg_h.dispose
    @desc_bg_h = nil
    @desc_bg_v.dispose
    @desc_bg_v = nil
    @desc_bg_vr.dispose
    @desc_bg_vr = nil
    @desc_bg_ch.dispose
    @desc_bg_ch = nil
  end
 
  def draw_description(x,y,w,h,achievement)
    desc = (achievement.earned || achievement.description_before_unlock.nil?) ? achievement.description :
      achievement.description_before_unlock
    desc.each do |string|
      contents.font.name = Gambit::Achievement::FONT_NAME if Gambit::Achievement::CHANGE_FONT
      draw_text(x, y, w, h, " " + string + " ", centered_text?)
      y += line_height
    end
  end
 
  def centered_text?
    Gambit::Achievement::CENTER_DESC ? 1 : 0
  end
 
  def refresh
    make_item_list
    setup_pages
    create_contents
    draw_all_items
    create_cursors
    create_page_cursors if @data.size > @badges_per_page
  end
 
  #--------------------------------------------------------------------------#
  # Draw Progress bar                                                        #
  #--------------------------------------------------------------------------#
  def draw_progress(x, y, w, h, achievement)
    color1 = text_color(CSCA::ACHIEVEMENTS::COLOR1)
    color2 = text_color(CSCA::ACHIEVEMENTS::COLOR2)
    contents.font.size = 20
    draw_text(x,y,w,h," " + CSCA::ACHIEVEMENTS::PROGRESS + " ",1)
    if achievement.earned && CSCA::ACHIEVEMENTS::STOP_TRACK
      draw_gauge(x, y+line_height-8, w, 1/1, color1, color2)
      string = achievement.progress.upper_bound.to_s
      draw_text(x, y+line_height-4, w, h, " " + string + "/" + string + " ", 1)
    else
      draw_gauge(x, y+line_height-8, w, csca_get_rate(achievement), color1, color2)
      draw_gauge_numbers(x, y+line_height-4, w, h, achievement)
    end
    draw_text(x,y+line_height*2-12,w,h," " + achievement.progress.description + " ", 1)
    contents.font.size = 24
  end
  #--------------------------------------------------------------------------#
  # Calculate Rate                                                          #
  #--------------------------------------------------------------------------#
  def csca_get_rate(achievement)
    rate = @csca_window.csca_get_numerator(achievement).to_f/@csca_window.csca_get_denominator(achievement).to_f
    rate > 1 ? 1 : rate
  end
  #--------------------------------------------------------------------------#
  # Draw Gauge Values                                                        #
  #--------------------------------------------------------------------------#
  def draw_gauge_numbers(x,y,w,h,achievement)
    numerator = @csca_window.csca_get_numerator(achievement).to_s
    denominator = @csca_window.csca_get_denominator(achievement).to_s
    draw_text(x, y, w, h, " " + numerator + "/" + denominator + " ", 1)
  end
  #--------------------------------------------------------------------------#
  # Draw Reward                                                              #
  #--------------------------------------------------------------------------#
  def draw_reward(x, y, w, h, achievement)
    reward = achievement.reward
    currency = $game_party.get_csca_cs_currency(reward.id) if $imported["CSCA-CurrencySystem"] && reward.type == :gold
    case reward.type
    when :gold; reward_s = $imported["CSCA-CurrencySystem"] ? currency[:currency_unit] : Vocab::currency_unit
    when :item;  reward_s = " " + $data_items[reward.id].name
    when :weapon; reward_s = " " + $data_weapons[reward.id].name
    when :armor;  reward_s = " " + $data_armors[reward.id].name
    end
    draw_text(x,y,w,h,CSCA::ACHIEVEMENTS::REWARD)
    off_x = text_size(CSCA::ACHIEVEMENTS::REWARD).width
    if $imported["CSCA-CurrencySystem"] && reward.type == :gold
      draw_icon(currency[:icon], x + off_x, y)
      off_x += 24
      change_color(currency[:color])
    end
    draw_text(x+off_x, y, w, h, reward.amount.to_s + reward_s)
    change_color(normal_color)
  end
  #--------------------------------------------------------------------------#
  # Populate item list                                                      #
  #--------------------------------------------------------------------------#
  def make_item_list
    @data = $csca.achievements
  end
end

class CSCA_Core
  #--------------------------------------------------------------------------
  # Initialize Achievements
  #--------------------------------------------------------------------------
  def initialize_achievements
    @achievements = []
    @achievements_earned = 0
    @achievement_total_points = 0
    CSCA::ACHIEVEMENTS::ACHIEVEMENT.each_with_index do |achievement, index|
      @achievements.push(CSCA_Achievement.new(achievement, index))
    end
  end
end

class GamBadge
  attr_accessor :badge
  attr_accessor :lock
  def initialize(achievement,w,h,rows)
    unlocked = achievement.earned
    @badge = Sprite_Base.new
      if !achievement.badge.nil?
        @badge.bitmap = Cache.gamachpic(achievement.badge)
      else
        @badge.bitmap = Cache.gamachpic(Gambit::Achievement::TROPHY_PICTURE)
      end
    if !unlocked
      if Gambit::Achievement::USE_LOCKED_GRAPHIC
        @badge.bitmap = Cache.gamachpic(Gambit::Achievement::LOCKED_TROPHY_PICTURE)
      else
        @badge.tone.set(0, 0, 0, 255)
        @lock = Sprite_Base.new
        @lock.bitmap = Cache.gamachpic(Gambit::Achievement::LOCK_PICTURE)
      end
    end
    x_spacing = (w - Gambit::Achievement::BADGES_ROW*badge.width) / (Gambit::Achievement::BADGES_ROW+1)
    y_spacing = (h - Gambit::Achievement::ROWS_PAGE*badge.height) / (Gambit::Achievement::ROWS_PAGE+1)
    x_pad = (Graphics.width - w) / 2
    y_pad = ((11*Graphics.height/15 - 48) - h) / 2
    achievement_id = achievement.index
    row_number = achievement_id / Gambit::Achievement::BADGES_ROW
    @badge.x = x_spacing*(achievement_id+1-row_number*Gambit::Achievement::BADGES_ROW) + badge.width*(achievement_id-row_number*Gambit::Achievement::BADGES_ROW) + x_pad
    @badge.y = y_spacing*(row_number + 1) + 4*Graphics.height/15 + badge.height*row_number + y_pad
    @lock.x,@lock.y = @badge.x,@badge.y if !unlocked
    if @badge.y > Graphics.height - 48 - y_spacing - y_pad - badge.height || @badge.y < 4*Graphics.height/15 + y_spacing + y_pad
      @badge.visible = false
      @lock.visible = false if !unlocked
    end
  end
end

class Gam_Window_Header < Window_Base
 
  def initialize(x, y, width = Graphics.width, height = line_height*2)
    super(x, y, width, height)
  end
 
end

#==============================================================================
# ** CSCA_Window_AchievementTotals
#------------------------------------------------------------------------------
# This window displays the achievement header window.
#==============================================================================
class CSCA_Window_AchievementTotals < Window_Base
  #--------------------------------------------------------------------------#
  # Refresh                                                                  #
  #--------------------------------------------------------------------------#
  def refresh
    contents.clear
    total_achieves = $csca.achievements.size
    total_points = 0
    points = 0
    unlocked = 0
    $csca.achievements.each do |achievement|
      if achievement.earned
        unlocked += 1
        points += achievement.points
      end
      total_points += achievement.points
    end
    string1 = CSCA::ACHIEVEMENTS::TOTAL + unlocked.to_s + "/" + total_achieves.to_s
    string2 = CSCA::ACHIEVEMENTS::POINTS + points.to_s + "/" + total_points.to_s
    total_percent = unlocked * 100.0 / total_achieves
    string3 = total_percent.round(1).to_s + "%"
    if CSCA::ACHIEVEMENTS::USE_POINTS && Gambit::Achievement::USE_PERCENT
      string = string1 + " (" + string3 + ")" + "    " + string2
    elsif CSCA::ACHIEVEMENTS::USE_POINTS
      string = string1 + "    " + string2
    elsif Gambit::Achievement::USE_PERCENT
      string = string1 + " (" + string3 + ")"
    else
      string = string1
    end
    contents.font.name = Gambit::Achievement::FONT_NAME if Gambit::Achievement::CHANGE_FONT
    draw_text(0,0,contents.width,line_height,string,1)
  end
end

#==============================================================================
# ** Gam_Window_AchievementNameDisplay
#------------------------------------------------------------------------------
# This window displays the achievement names.
#==============================================================================
class Gam_Window_AchievementNameDisplay < Window_Base
  #--------------------------------------------------------------------------#
  # Object Initialization                                                    #
  #--------------------------------------------------------------------------#
  def initialize(x,y,w,h)
    super(x,y,w,h)
  end
  #--------------------------------------------------------------------------#
  # Draw all info                                                            #
  #--------------------------------------------------------------------------#
  def set_item(achievement)
    contents.clear
    draw_name(0, contents.width, line_height, achievement)
  end

  def draw_name(x, w, h, achievement)
    name = (achievement.earned || achievement.name_before_unlock.nil?) ? achievement.name : achievement.name_before_unlock
    contents.font.size = 28 if Graphics.height == 480
    contents.font.size = 21 if Graphics.height == 416
    contents.font.name = Gambit::Achievement::FONT_NAME if Gambit::Achievement::CHANGE_FONT
    draw_text(0, h/2, w, 2*h, " " + name.to_s + " ", centered_text?)
  end

  def centered_text?
    Gambit::Achievement::CENTER_T ? 1 : 0
  end
end

#==============================================================================
# ** Gam_Window_AchievementBanner
#------------------------------------------------------------------------------
#  These banners and window display when an achievement is unlocked.
#==============================================================================
class Gam_Window_AchievementBanner < Window_Base
 
  def initialize
    super(4*Graphics.width/11,Graphics.height-fitting_height(3.5),3*window_width/4,fitting_height(3.5))
    self.opacity = 0
    self.contents_opacity = 0
    contents.font.name = Gambit::Achievement::FONT_NAME if Gambit::Achievement::CHANGE_FONT
    @banner_exists = false
    @foreshadow_earned = false
    @show_count = 0
    @show_banner_count = 0
    prepare_banners
    refresh
  end
 
  def window_width
    return Graphics.width / 2
  end
 
  def update
    super
    if !@banner_exists
      if @show_count > 0
        update_fadein
        @show_count -= 1
      elsif @foreshadow_earned && self.contents_opacity <= 0
        repeat_banner
      else
        update_fadeout
        if !@banner.nil?
          update_banner_fadeout2
          complete_banner_fadeout if @banner_badge.opacity <= 0
        end
      end
    else
      if @show_banner_count > 0
        update_banner_fadein
        @show_banner_count -= 1
      elsif @banner.opacity <= 0
        @banner_exists = false
      else
        update_banner_fadeout
      end
    end
  end
 
  def complete_banner_fadeout
    clear_banner
    banner_setup_again if !banners_done?
  end
 
  def update_fadein
    self.contents_opacity += 16
  end
 
  def update_banner_fadein
      @banner.opacity += 16
      @banner_badge.opacity += 16
      @banner_bg.opacity += 16
  end
 
  def update_fadeout
    self.contents_opacity -= 16
  end

  def update_banner_fadeout
    unless $game_map.ach_display.nil?
      @banner.opacity -= 16
    end
  end
 
  def update_banner_fadeout2
    unless $game_map.ach_display.nil?
      @banner_bg.opacity -= 16
      @banner_badge.opacity -= 16
    end
  end
 
  def open
    refresh
    @show_count = 150
    self.contents_opacity = 0
    self.opacity = 0
    self
  end
 
  def close
    @show_count = 0
    @show_banner_count = 0
    self
  end
 
  def refresh
    contents.clear
    unless $game_map.ach_display.nil?
        contents.font.bold = true
        contents.font.size = 28
        draw_text(0,0,contents.width,5*line_height/4," " + $game_map.ach_display.name,1)
        contents.font.bold = false
        contents.font.size = 24
        draw_reward($game_map.ach_display) unless $game_map.ach_display.reward.nil?
    end
  end
 
  def draw_reward(achievement)
    reward = achievement.reward
    currency = $game_party.get_csca_cs_currency(reward.id) if $imported["CSCA-CurrencySystem"] && reward.type == :gold
    case reward.type
    when :gold; reward_s = $imported["CSCA-CurrencySystem"] ? currency[:currency_unit] : reward_s = Vocab::currency_unit
    when :item;  reward_s = " " + $data_items[reward.id].name
    when :weapon; reward_s = " " + $data_weapons[reward.id].name
    when :armor;  reward_s = " " + $data_armors[reward.id].name
    end
    draw_text(0,line_height,contents.width,line_height," " + CSCA::ACHIEVEMENTS::REWARD+reward.amount.to_s+reward_s,1)
  end
 
  def draw_banner
    @banner = Sprite_Base.new
    @banner.bitmap = Cache.gamachpic(Gambit::Achievement::BANNER)
    @banner.z = 200
    @banner.x = Graphics.width/2 - @banner.width/2
    @banner.y = Graphics.height - @banner.height
   
    @banner_bg = Sprite_Base.new
    @banner_bg.bitmap = Cache.gamachpic(Gambit::Achievement::BANNER_BG)
    @banner_bg.z = 150
    @banner_bg.x,@banner_bg.y = @banner.x,@banner.y
   
    @banner_badge = Sprite_Base.new
    badge = $game_map.ach_display.badge
    if !badge.nil?
      @banner_badge.bitmap = Cache.gamachpic(badge)
    else
      @banner_badge.bitmap = Cache.gamachpic(Gambit::Achievement::TROPHY_PICTURE)
    end
    @banner_badge.z = 250
    @banner_badge.x = Graphics.width/2 - @banner.width/2 + @banner_badge.width/9
    @banner_badge.y = Graphics.height - @banner_badge.height - @banner.height/5
   
    @banner.opacity = 1
    @banner_badge.opacity = 1
    @banner_bg.opacity = 1
   
    @show_banner_count = 150
    $game_map.banner_present = true
    @banner_exists = true
  end
 
  def make_data_list
    @data = $csca.achievements
  end
 
  def prepare_banners
    make_data_list
    data_max
  end
 
  def data_max
    @data ? @data.size : 1
  end
 
  def draw_all_banners
    data_max.times {|i| draw_banner(i) }
  end
 
  def banners_done?
    return true if $game_map.achievement_list == []
  end
 
  def banner_setup_again
    $game_map.ach_display = $game_map.achievement_list[-1]
    @foreshadow_earned = true
  end
 
  def repeat_banner
    @foreshadow_earned = false
    Audio.se_play("Audio/SE/" + Gambit::Achievement::BANNER_SE_NAME, Gambit::Achievement::BANNER_SE_VOLUME, Gambit::Achievement::BANNER_SE_PITCH) unless
      !Gambit::Achievement::BANNER_PLAY_SE
    $game_map.ach_earned = true
  end
 
  def clear_banner
    @banner.dispose
    @banner_bg.dispose
    @banner_badge.dispose
    @banner = nil
    @banner_bg = nil
    @banner_badge = nil
    self.contents.clear
    @banner_exists = false
    $game_map.banner_present = false
  end
 
end


#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
  attr_accessor :achievement_list
  attr_accessor :banner_present
 
  alias gam_ach_initialize csca_ach_initialize
  def csca_ach_initialize
    gam_ach_initialize
    @achievement_list = []
    @banner_present = false
  end
 
end

#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map < Scene_Base
 
  alias gam_ach_update csca_ach_update
  def csca_ach_update
    gam_ach_update
    if $game_map.ach_earned
      banner_update_list
      @achievement_window.draw_banner
      @achievement_window.open unless CSCA::ACHIEVEMENTS::POP_ALIGN.nil?
      $game_map.ach_earned = false
    end
  end
 
  alias gam_create_achievement_window csca_create_achievement_window
  def csca_create_achievement_window
    @achievement_window = Gam_Window_AchievementBanner.new
    @achievement_window.viewport = @viewport
  end
 
  def banner_update_list
    $game_map.achievement_list -= [$game_map.ach_display]
  end
 
  alias gam_pre_terminate pre_terminate
  def pre_terminate
    if $game_map.banner_present
      @achievement_window.clear_banner
    end
    gam_pre_terminate
  end
 
  alias gam_post_start post_start
  def post_start
    super
    banner_setup if !banners_done?
  end
 
  def banners_done?
    return true if $game_map.achievement_list == []
  end
 
  def banner_setup
    $game_map.ach_display = $game_map.achievement_list[-1]
    Audio.se_play("Audio/SE/" + Gambit::Achievement::BANNER_SE_NAME, Gambit::Achievement::BANNER_SE_VOLUME, Gambit::Achievement::BANNER_SE_PITCH) unless
      !Gambit::Achievement::BANNER_PLAY_SE
    $game_map.ach_earned = true
  end
 
end

#==============================================================================
# ** CSCA_Achievement
#------------------------------------------------------------------------------
# Stores achievement data.
#==============================================================================
class CSCA_Achievement
  attr_reader :badge, :index
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  alias gam_ach_initialize initialize
  def initialize(achievement, index)
    @badge = achievement[:badge]
    @index = index
    gam_ach_initialize(achievement)
  end
  #--------------------------------------------------------------------------
  # Earn achievement processing
  #--------------------------------------------------------------------------
  def earn_achievement
    @earned = true
    $game_party.csca_achievement_reward(@reward) if @reward
    Audio.se_play("Audio/SE/" + Gambit::Achievement::BANNER_SE_NAME, Gambit::Achievement::BANNER_SE_VOLUME, Gambit::Achievement::BANNER_SE_PITCH) unless
      !Gambit::Achievement::BANNER_PLAY_SE
    $csca.achievements_earned += 1
    $csca.achievement_total_points += @points
    $game_map.achievement_list << self
    $game_variables[Gambit::Achievement::SCORE_VARIABLE] += @points if Gambit::Achievement::USE_SCORE_VARIABLE
  end
end

if Gambit::Achievement::ADD_COMMAND_TO_MENU
#==============================================================================
# ** Add to Menu
#==============================================================================

class Window_MenuCommand < Window_Command
 
  alias gam_add_original_commands  add_original_commands
  def add_original_commands
    gam_add_original_commands
    add_command(Gambit::Achievement::MENUCOMMAND, :gambit_achievement, Gambit::Achievement::ADD_COMMAND_TO_MENU)
  end
 
end
 
class Scene_Menu < Scene_MenuBase
 
  alias gam_create_command_window  create_command_window
  def create_command_window
    gam_create_command_window
    @command_window.set_handler(:gambit_achievement,  method(:command_gambit_achievement))
  end 
 
  def command_gambit_achievement
    SceneManager.call(Gambit_Achievement)
  end
 
end
end


Ea, pues eso. Saludos.
avatar
ZororoWhite
PJ Principal
PJ Principal

Masculino
España
RPG Maker : Ace
Mensajes : 432
Monedas : 3168
Reputación : 64
Edad : 19
Localización : Escondido en tu corazón <3

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por fatyguero el Mar Mar 22, 2016 4:37 pm

Bueno ya esta todo solucioneti zoro ahi va:

Spoiler:
[url= https://mega.nz/#!FMEW0QqZ!mcF6kEA3oLo5n90NU_NoLqeakxRsRX_BcrfiITfpY88] https://mega.nz/#!FMEW0QqZ!mcF6kEA3oLo5n90NU_NoLqeakxRsRX_BcrfiITfpY88[/url]

Solo remplaza este script con el tuyo de GAMBIT ACHIEVEMENT GUI y listo., ademas pon este archivo dentro de la carpeta system de tu juego y listo, no le cambies el nombre:

Spoiler:
[url= https://mega.nz/#!cNNH0R6L!RvHAOgJP8YXzw77jUBYOYF4o2P4xNUafncj3DIuCWxg] https://mega.nz/#!cNNH0R6L!RvHAOgJP8YXzw77jUBYOYF4o2P4xNUafncj3DIuCWxg[/url]

De momento son 50 moneditas, no te via cobrar el anterior porque entendi mal (te explicaste mal cugh!...) xD

cobren cobrennn

Edita Muzgar: Pagaoh, disfruta la fruta
avatar
fatyguero
PJ Principal
PJ Principal

Masculino
Argentina
RPG Maker : Ace
Mensajes : 341
Monedas : 377
Reputación : 94
Edad : 34
Localización : en el culo del mundo... digo el centro xD

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por ZororoWhite el Mar Mar 22, 2016 5:18 pm

¡Páguenle, páaaaguenle! Conforme con los arreglos que has hecho, Faty, son justo lo que necesitaba xDD. Aunque aún sigo viendo "errores" en cuanto al script. 
Recuerdo que te dije por chat que las descripciones daban error, pero no sé lo que has hecho con ese script editado que ya se me han arreglado solas.

Bien, te dejo por aquí pedidos el resto de ajustes que he visto necesarios (si consigues arreglarme ese par de cosillas te pongo en letras doradas en los créditos, en serio xDDD).

Bueno, lo que supongo que sería más "fácil" sería lo referente a la música: hay una opción en el script de Gambit que permite reproducir una música dentro de la pantalla de logros, pero al salir de la misma y volver a las opciones del menú la música de la pantalla de logros se detiene pero no vuelve a dejarse oír la música que hay en el mapa y de hecho hay que salir del mapa y entrar a otro para que vuelva la música. Mi pedido con respecto a esto sería que al salir de la pantalla de logros se volviese a reproducir automáticamente la música del mapa (no sé, pero me imagino que debe haber algún código para realizar eso).



Lo segundo que me gustaría también es que junto a la barra de progreso (que has conseguido que desaparezca) desaparecieran la palabra "Progreso:" y el texto de debajo (aunque eso último con no escribir nada creo que se solucionaría, ¿no? xD) para así tener más espacio para la frase de descripción, que en el ejemplo sería "No cambiaste el nombre del héroe".

Espero haberme explicado, sobre todo en la segunda parte en conjunto con la imagen.
Cualquier cosa nuevamente dímela y te contesto a la brevedad. ¡Páguenle ya mis sucias 50 monedas por lo otro, por dios D:<!

Saludos, Zororo.
avatar
ZororoWhite
PJ Principal
PJ Principal

Masculino
España
RPG Maker : Ace
Mensajes : 432
Monedas : 3168
Reputación : 64
Edad : 19
Localización : Escondido en tu corazón <3

Volver arriba Ir abajo

Re: (Nuevo Taller) "Herreria de Scripts"

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.