Registrarse

[Script] Tema de scripts de Miscelánea[ACTU AGO/7/14]

Danny0317

Todavía no sé español ;-;
Idea de The Miscellaneous Script Thread - The PokéCommunity Forums.
El punto de este tema as poner scripts para que otras pesonas usen (pero no cosas como scripts do tu storia o algo asi, cosas como Vendedor de Pokemones y algo asi.)
Si quieres añadir uno, utilice esto:
Código:
[B]Nombre:[/B]
[B]ROM:[/B]
[B]Effecto:[/B]
[B]Script:[/B]
[B]Commentarios y errores:[/B]
[B]Creditos:[/B]
Los scripts
Nombre: Escojer Pokemon para pelea
ROM:Esmeralda
Ejemplo:
Effecto:Escoje pokemon para una pelea.
Script:
#dynamic 0xE40000
#org @start
lock
faceplayer
msgbox @1 0x6 //just had that there, obviously not mandatory
goto @choose
end

#org @choose
special 0x28 //stores party in RAM
fadescreen 0x1
special 0x2A //Pokemon choosing screen
waitstate
compare LASTRESULT 0x0
if 0x5 goto @it //if all went well, like no cancelling, go to @it
special 0x29 //restores party (In my case it won't be mandatory since I'm forcing the player to choose in @no, obviously you can change that like in the steven battle where he tells you to get ready or something
goto @no //if something bad did happen, goto @no

#org @it
callasm 0x(offset + 1) //sets proper slot for 0xEA
special 0xFB //removes all other Pokémon
msgbox @3 0x6
trainerbattle 0x3 0x10 0x0 @Win
msgbox @4 0x6
setvar 0x8004 0x6
special 0xEA //store new stats into temporary space
special 0x29 //restore your party from temporary space
release
end

#org @Win
= Oh no.

#org @4
= I will now return your party.

#org @3
= Battle begin.

#org @no
msgbox @2 0x6
goto @choose //here for all of @no you can make it do something else, and it will be fine because your party has already been restored back with special 0x29

#org @2
= I said choose.

#org @1
= Choose.
Y sin mis commentarios:
#dynamic 0xE40000
#org @start
lock
faceplayer
goto @choose
end

#org @choose
special 0x28
fadescreen 0x1
special 0x2A
waitstate
compare LASTRESULT 0x0
if 0x5 goto @it
special 0x29
goto @no

#org @it
callasm 0x(offset + 1) //sets proper slot for 0xEA
special 0xFB //removes all other Pokémon
msgbox @3 0x6
trainerbattle 0x3 0x10 0x0 @Win
msgbox @4 0x6
setvar 0x8004 0x6
special 0xEA //store new stats into temporary space
special 0x29 //restore your party from temporary space
release
end

#org @no
EL ASM
EL ASM:
Código:
.text
.align 2
.thumb
.thumb_func
.global ParkHack

start:		ldr r0, addr1
		ldr r1, val1
		ldr r0, [r0]
		add r0, r0, r1
		ldr r1, addr2
		ldrh r1, [r1]
		strb r1, [r0]
		mov r1, #0x0
		strb r1, [r0, #0x2]
		strb r1, [r0, #0x4]
		strb r1, [r0, #0x6]
		strb r1, [r0, #0x8]
		strb r1, [r0, #0xA]
		bx lr

.align 2
addr1:		.word 0x03005D90
addr2:		.word 0x020375F0
val1:		.word 0x00000CAA
Commentarios y errores:Si pierdes, tus pokemones se quedan. Para arreglar eso, puedes poner un sethealingplace en el script, y en la ciudad que van cuando pierden puedes poner un script de nivel con "special 0x29"
Creditos:Diegoisawsome por el ASM. necesario y Dark Sneasel, pero no es necesario.
Nombre: Mostrar animacion de HM para pokemon que no es tuyo.
ROM:EM/FR
Effecto:Click
Script:
Código:
special 0x28 //guarda tus pokemones en el RAM, 
callasm 0x8E40AA1 //de Hackmew, borra tus pokemones
callasm 0x8E40AA1
callasm 0x8E40AA1
callasm 0x8E40AA1
callasm 0x8E40AA1
callasm 0x8E40AF1 // de hackmew, borra tu ultimo pokemon
givepokemon 0x15F 0xA 0x0 0x0 0x0 0x0 //El pokemon que quieres que apaersca
checkattack 0x96 //pon un attacke que tu saves que el pokemon va a tener 100%
bufferpokemon 0x0 LASTRESULT
setanimation 0x0 LASTRESULT
doanimation 0x25
waitstate
special 0x29 //te devuelve tus pokemones
Commentarios y errores: Muestra la animacion de OW de el jugador pero puedes mover la camara 7 blocks arriba como yo hice. Tambien, para FR tienes que cambiar "special 0x28" con "special 0x27" y "special 0x29" con "special 0x28"
Creditos:Yo, pero no es necesario.
Nombre: Pokéradio
ROM: FR
Comentarios y errores: Es una Pokéradio, y reproduce música xD!
Código:
#dynamic 0x800000

#org @inicio
msgbox @msj1 0x5
compare LASTRESULT 0x1
if 0x1 goto @sip
release
end

#org @sip
random 0x15
compare LASTRESULT 0x0
if 0x1 goto @0
compare LASTRESULT 0x1
if 0x1 goto @1
compare LASTRESULT 0x2
if 0x1 goto @2
compare LASTRESULT 0x3
if 0x1 goto @3
compare LASTRESULT 0x4
if 0x1 goto @4
compare LASTRESULT 0x5
if 0x1 goto @5
compare LASTRESULT 0x6
if 0x1 goto @6
compare LASTRESULT 0x7
if 0x1 goto @7
compare LASTRESULT 0x8
if 0x1 goto @8
compare LASTRESULT 0x9
if 0x1 goto @9
compare LASTRESULT 0xA
if 0x1 goto @A
compare LASTRESULT 0xB
if 0x1 goto @B
compare LASTRESULT 0xC
if 0x1 goto @C
compare LASTRESULT 0xD
if 0x1 goto @D
compare LASTRESULT 0xE
if 0x1 goto @E
compare LASTRESULT 0xF
if 0x1 goto @F
release
end

#org @0
playsong 0x14D 0x0
release
end

#org @1
playsong 0x146 0x0
release
end

#org @2
playsong 0x134 0x0
release
end

#org @3
playsong 0x138 0x0
release
end

#org @4
playsong 0x117 0x0
release
end

#org @5
playsong 0x123 0x0
release
end

#org @6
playsong 0x13A 0x0
release
end

#org @7
playsong 0x130 0x0
release
end

#org @8
playsong 0x111 0x0
release
end

#org @9
playsong 0x118 0x0
release
end

#org @A
playsong 0x11E 0x0
release
end

#org @B
playsong 0x132 0x0
release
end

#org @C
playsong 0x116 0x0
release
end

#org @D
playsong 0x135 0x0
release
end


#org @E
playsong 0x11A 0x0
release
end

#org @F
playsong 0x124 0x0
release
end


#org @msj1
= Es una Pokéradio. ¿Te gustaría\nencenderla?
Creditos: Foxz
 

Gold

Porrero a tiempo parcial
Miembro insignia
Respuesta: Tema de scripts de Miscelánea[ACTU 7/30/14]

Dios mio no vi este tema, es una pasada, muy util si se quiere recurrir a una idea para hacer scripts mas complicados.

Al no haber moderador para la zona, Marcado como importante
 

Foxz.

Foxz.
Respuesta: Tema de scripts de Miscelánea[ACTU 7/30/14]


Bueno antes que nada, me gustaría decir que es una gran idea y una buena forma
de apoyar a los demás. Sería bueno que le tomen importancia y le den un
poco más de organización al tema.

Nombre: Pokéradio
ROM: FR
Comentarios y errores: Es una Pokéradio, y reproduce música xD!

Código:
#dynamic 0x800000

#org @inicio
msgbox @msj1 0x5
compare LASTRESULT 0x1
if 0x1 goto @sip
release
end

#org @sip
random 0x15
compare LASTRESULT 0x0
if 0x1 goto @0
compare LASTRESULT 0x1
if 0x1 goto @1
compare LASTRESULT 0x2
if 0x1 goto @2
compare LASTRESULT 0x3
if 0x1 goto @3
compare LASTRESULT 0x4
if 0x1 goto @4
compare LASTRESULT 0x5
if 0x1 goto @5
compare LASTRESULT 0x6
if 0x1 goto @6
compare LASTRESULT 0x7
if 0x1 goto @7
compare LASTRESULT 0x8
if 0x1 goto @8
compare LASTRESULT 0x9
if 0x1 goto @9
compare LASTRESULT 0xA
if 0x1 goto @A
compare LASTRESULT 0xB
if 0x1 goto @B
compare LASTRESULT 0xC
if 0x1 goto @C
compare LASTRESULT 0xD
if 0x1 goto @D
compare LASTRESULT 0xE
if 0x1 goto @E
compare LASTRESULT 0xF
if 0x1 goto @F
release
end

#org @0
playsong 0x14D 0x0
release
end

#org @1
playsong 0x146 0x0
release
end

#org @2
playsong 0x134 0x0
release
end

#org @3
playsong 0x138 0x0
release
end

#org @4
playsong 0x117 0x0
release
end

#org @5
playsong 0x123 0x0
release
end

#org @6
playsong 0x13A 0x0
release
end

#org @7
playsong 0x130 0x0
release
end

#org @8
playsong 0x111 0x0
release
end

#org @9
playsong 0x118 0x0
release
end

#org @A
playsong 0x11E 0x0
release
end

#org @B
playsong 0x132 0x0
release
end

#org @C
playsong 0x116 0x0
release
end

#org @D
playsong 0x135 0x0
release
end


#org @E
playsong 0x11A 0x0
release
end

#org @F
playsong 0x124 0x0
release
end


#org @msj1
= Es una Pokéradio. ¿Te gustaría\nencenderla?
 
M

Miembro eliminado 28262

Invitado
Interesantongo, veo que está bien hecho así que lo copio y compilo.
Muchas gracias!
 
M

Miembro eliminado 28262

Invitado
Ya lo dije hace un año y no es por hacer necropost,
pero este tema me ha vuelto a ser de ayuda jajja
Es raro lo rápido con lo que las cosas se olvidan.

Muchas Gracias!
 

Lunos

Enfrentando a La Organización
Miembro insignia
Acabo de droppear esto en el de PokeCommunity y no veo motivos para no traerlo hasta acá.
Nombre: Arbol de Bayas "Aleatorizado"
ROMs: Pokémon Ruby v1.0 (AXVE) (USA), Pokémon Fire Red v1.0 (BPRE) (USA), Pokémon Emerald (BPEE) (USA)
Efecto: Puede darle una baya aleatoria al Jugador tras interactuar con lo que sea a lo que le des este script.
Script:
Código:
#dynamic 0x800000
#org @inicio
lock
faceplayer
msgbox @1 0x4
closeonkeypress
random 0x10 // Elige un numero aleatorio entre 1 y 10.
compare LASTRESULT 0x9
if 0x3 goto @nothing // Si obtuviste un numero entre 1 y 9, vé a @nothing.
if 0x5 goto @berry // Si obtuviste un numero distinto (10) vé a @berry.

#org @berry
random 0x176 // Elige un numero aleatorio entre 1 y 374, la cantidad de objetos en los juegos de Pokémon para GBA.
compare LASTRESULT 0x84 // Comprueba si obtuviste el Objeto #132 (Retro Mail)
if 0x3 goto @berry // Si obtuviste un Retro Mail o un objeto que venga antes que él, vuelve a ejecutar @berry.
compare LASTRESULT 0xAF // Comprueba si obtuviste el Objeto #175 (Enigma Berry)
if 0x4 goto @berry // Si obtuviste una Enigma Berry o un objeto que venga despues que ella, vuelve a ejecutar @berry.
msgbox @2 0x6
giveitem LASTRESULT 0x1 0x0
release
end

#org @nothing
msgbox @3 0x4
closeonkeypress
release
end

#org @1
= It's a weird-looking tree.

#org @2
= Oh! There's a berry on it!

#org @3
= But there's nothing inside it[.]
Comentarios y errores: Insertar el script como un signpost en Advance Map.
Dicho eso, el script está funcionando correctamente pero probablemente haria que #org @berry solo se pudiese ejecutar una vez por dia (si supiera como se hace, hahaha), en cuyo caso tambien removeria o modificaria la posibilidad de conseguir una baya en la 8va Linea del Script para hacerlo un poco mas sencillo, pero eso ya es subjetivo.

EDITO: Y una muestra de como funciona dentro del juego porque por qué no.
 
Última edición:
Arriba