(03-11-2021, 10:44 PM)eMMe97 Ha scritto: Secondo me invece è fattibile, anche se veramente complicato…vediamo come fare.
Ovviamente lo script deve essere unico da assegnare al professore.
Io lo strutturerei così:
1) parli col prof e ti da una masterball ed un pokemon;
2a) fai dirigere il protagonista nell’erba alta tramite movesprite e parte una wildbattle random tra i 3 pokémon;
2b) qui arriva la parte interessante. Imposti l’id del pokémon in una var, per esempio la 4001, servirà per dopo. Quindi per ogni voce del random scrivi
setvat 0x4001 0x1 (in questo caso è bulbasaur)
wildbattle 0x4001 0x5 0x…etc
3) fine della battaglia parte lo special assegnato anche a snorlax che ti permette di determinare se il pokémon sia stato catturato, ucciso o sei fuggito (se perdi ovviamente ritorni a casa o centro pokémon e sei un pirla perché con una masterball non puoi perdere ?);
4) torni dal professore, se non hai catturato il pokémon ti dice che sei un pirla e ti dice di tornare nell’erba alta e lo script si ripete dal punto 2a con possibilità di trovare un diverso pokémon. Se invece lo hai catturato usi lo special per cancellare completamente la squadra, quindi viene tolto il pokémon del professore ed il tuo. Per ripristinare il tuo usi il comando givepokemon 0x4001 0x5 0x…etc
5) finisci lo script come meglio credi.
Un po’ macchinosa e più brutta come soluzione, ma penso funzioni.
Edit: se è un level script che non parte subito devi mettere un valore tipo 0x1 alla var che usi per il level script. Finché non imposti quella var sul valore 0x1, lo script non verrà eseguito.
anche questa soluzione è interessante, io comunque l'ho strutturato così, con la cattura e la restituzione del pokemon funziona, gli altri casi ci stavo lavorando ma mi è successo casino con la rom (in pratica mi assegna lo stesso level script a due mappe diverse, devo aver fatto un po' di casino con il #removeall per resettare gli offset e riscrivere gli script, fortuna che ho un backup della rom).
se vuoi dargli un'occhiata la bozza dello script è così (la var ho letto che va settata anche nello script che rimanda a questo):
#dynamic 0x800000
#org @start
lockall
fadescreen 0x1
movesprite 0x2 0xC 0x2
applymovement 0xFF @sguardodx
waitmovement 0x0
fadescreen 0x0
setvar 0x4053 0x1
msgbox @pokedex 0x6
setflag 0x829
msgbox @prestato 0x6
givepokemon 0xA 0x5 0x0 0x0 0x0 0x0
msgbox @masterball 0x6
additem 0x1 0x1
bufferitem 0x0 0x1
fanfare 0x101
msgbox @ottenuto 0x4
waitfanfare
closeonkeypress
msgbox @arriva 0x6
random 0x3
compare LASTRESULT 0x0
if 0x1 goto @venonat
compare LASTRESULT 0x1
if 0x1 goto @chinchou
compare LASTRESULT 0x2
if 0x1 goto @taillow
releaseall
end
#org @venonat
random 0x13
compare LASTRESULT 0x0
if 0x1 goto @venonatshiny
compare LASTRESULT 0x1
if 0x1 goto @venonatnormale
compare LASTRESULT 0x2
if 0x1 goto @venonatnormale
compare LASTRESULT 0x3
if 0x1 goto @venonatnormale
compare LASTRESULT 0x4
if 0x1 goto @venonatnormale
compare LASTRESULT 0x5
if 0x1 goto @venonatnormale
compare LASTRESULT 0x6
if 0x1 goto @venonatnormale
compare LASTRESULT 0x7
if 0x1 goto @venonatnormale
compare LASTRESULT 0x8
if 0x1 goto @venonatnormale
compare LASTRESULT 0x9
if 0x1 goto @venonatnormale
compare LASTRESULT 0xA
if 0x1 goto @venonatnormale
compare LASTRESULT 0xB
if 0x1 goto @venonatnormale
compare LASTRESULT 0xC
if 0x1 goto @venonatnormale
compare LASTRESULT 0xD
if 0x1 goto @venonatnormale
compare LASTRESULT 0xE
if 0x1 goto @venonatnormale
compare LASTRESULT 0xF
if 0x1 goto @venonatnormale
compare LASTRESULT 0x10
if 0x1 goto @venonatnormale
compare LASTRESULT 0x11
if 0x1 goto @venonatnormale
compare LASTRESULT 0x12
if 0x1 goto @venonatnormale
releaseall
end
#org @chinchou
random 0x13
compare LASTRESULT 0x0
if 0x1 goto @chinchoushiny
compare LASTRESULT 0x1
if 0x1 goto @chinchounormale
compare LASTRESULT 0x2
if 0x1 goto @chinchounormale
compare LASTRESULT 0x3
if 0x1 goto @chinchounormale
compare LASTRESULT 0x4
if 0x1 goto @chinchounormale
compare LASTRESULT 0x5
if 0x1 goto @chinchounormale
compare LASTRESULT 0x6
if 0x1 goto @chinchounormale
compare LASTRESULT 0x7
if 0x1 goto @chinchounormale
compare LASTRESULT 0x8
if 0x1 goto @chinchounormale
compare LASTRESULT 0x9
if 0x1 goto @chinchounormale
compare LASTRESULT 0xA
if 0x1 goto @chinchounormale
compare LASTRESULT 0xB
if 0x1 goto @chinchounormale
compare LASTRESULT 0xC
if 0x1 goto @chinchounormale
compare LASTRESULT 0xD
if 0x1 goto @chinchounormale
compare LASTRESULT 0xE
if 0x1 goto @chinchounormale
compare LASTRESULT 0xF
if 0x1 goto @chinchounormale
compare LASTRESULT 0x10
if 0x1 goto @chinchounormale
compare LASTRESULT 0x11
if 0x1 goto @chinchounormale
compare LASTRESULT 0x12
if 0x1 goto @chinchounormale
releaseall
end
#org @taillow
random 0x13
compare LASTRESULT 0x0
if 0x1 goto @taillowshiny
compare LASTRESULT 0x1
if 0x1 goto @taillownormale
compare LASTRESULT 0x2
if 0x1 goto @taillownormale
compare LASTRESULT 0x3
if 0x1 goto @taillownormale
compare LASTRESULT 0x4
if 0x1 goto @taillownormale
compare LASTRESULT 0x5
if 0x1 goto @taillownormale
compare LASTRESULT 0x6
if 0x1 goto @taillownormale
compare LASTRESULT 0x7
if 0x1 goto @taillownormale
compare LASTRESULT 0x8
if 0x1 goto @taillownormale
compare LASTRESULT 0x9
if 0x1 goto @taillownormale
compare LASTRESULT 0xA
if 0x1 goto @taillownormale
compare LASTRESULT 0xB
if 0x1 goto @taillownormale
compare LASTRESULT 0xC
if 0x1 goto @taillownormale
compare LASTRESULT 0xD
if 0x1 goto @taillownormale
compare LASTRESULT 0xE
if 0x1 goto @taillownormale
compare LASTRESULT 0xF
if 0x1 goto @taillownormale
compare LASTRESULT 0x10
if 0x1 goto @taillownormale
compare LASTRESULT 0x11
if 0x1 goto @taillownormale
compare LASTRESULT 0x12
if 0x1 goto @taillownormale
releaseall
end
#org @venonatshiny
setvar 0x8003 0x1
wildbattle 0x30 0x5 0x0
countpokemon
compare LASTRESULT 0x1
if 0x1 goto @rilotta
msgbox @dopocattura 0x6
special2 0x8005 0xBA
setvar 0x8004 0xA
bufferpokemon 0x0 0x8005
comparevars 0x8005 0x8004
if 0x0 goto @nulla
special 0x176
cmdc3 0x2F
msgbox @ripreso 0x4
closeonkeypress
fadescreen 0x1
hidesprite 0x2
setflag 0x200
fadescreen 0x0
setflag 0x828
releaseall
end
#org @venonatnormale
setvar 0x8003 0x0
wildbattle 0x30 0x5 0x0
countpokemon
compare LASTRESULT 0x1
if 0x1 goto @rilotta
msgbox @dopocattura 0x6
special2 0x8005 0xBA
setvar 0x8004 0xA
bufferpokemon 0x0 0x8005
comparevars 0x8005 0x8004
if 0x0 goto @nulla
special 0x176
cmdc3 0x2F
msgbox @ripreso 0x4
closeonkeypress
fadescreen 0x1
hidesprite 0x2
setflag 0x200
fadescreen 0x0
setflag 0x828
releaseall
end
#org @chinchoushiny
setvar 0x8003 0x1
wildbattle 0xAA 0x5 0x0
countpokemon
compare LASTRESULT 0x1
if 0x1 goto @rilotta
msgbox @dopocattura 0x6
special2 0x8005 0xBA
setvar 0x8004 0xA
bufferpokemon 0x0 0x8005
comparevars 0x8005 0x8004
if 0x0 goto @nulla
special 0x176
cmdc3 0x2F
msgbox @ripreso 0x4
closeonkeypress
fadescreen 0x1
hidesprite 0x2
setflag 0x200
fadescreen 0x0
setflag 0x828
releaseall
end
#org @chinchounormale
setvar 0x8003 0x0
wildbattle 0xAA 0x5 0x0
countpokemon
compare LASTRESULT 0x1
if 0x1 goto @rilotta
msgbox @dopocattura 0x6
special2 0x8005 0xBA
setvar 0x8004 0xA
bufferpokemon 0x0 0x8005
comparevars 0x8005 0x8004
if 0x0 goto @nulla
special 0x176
cmdc3 0x2F
msgbox @ripreso 0x4
closeonkeypress
fadescreen 0x1
hidesprite 0x2
setflag 0x200
fadescreen 0x0
setflag 0x828
releaseall
end
#org @taillowshiny
setvar 0x8003 0x1
wildbattle 0x130 0x5 0x0
countpokemon
compare LASTRESULT 0x1
if 0x1 goto @rilotta
msgbox @dopocattura 0x6
special2 0x8005 0xBA
setvar 0x8004 0xA
bufferpokemon 0x0 0x8005
comparevars 0x8005 0x8004
if 0x0 goto @nulla
special 0x176
cmdc3 0x2F
msgbox @ripreso 0x4
closeonkeypress
fadescreen 0x1
hidesprite 0x2
setflag 0x200
fadescreen 0x0
setflag 0x828
releaseall
end
#org @taillownormale
setvar 0x8003 0x0
wildbattle 0x130 0x5 0x0
countpokemon
compare LASTRESULT 0x1
if 0x1 goto @rilotta
msgbox @dopocattura 0x6
special2 0x8005 0xBA
setvar 0x8004 0xA
bufferpokemon 0x0 0x8005
comparevars 0x8005 0x8004
if 0x0 goto @nulla
special 0x176
cmdc3 0x2F
msgbox @ripreso 0x4
closeonkeypress
fadescreen 0x1
hidesprite 0x2
setflag 0x200
fadescreen 0x0
setflag 0x828
releaseall
end
#org @rilotta
random 0x3
compare LASTRESULT 0x0
if 0x1 goto @venonat
compare LASTRESULT 0x1
if 0x1 goto @chinchou
compare LASTRESULT 0x2
if 0x1 goto @taillow
releaseall
end
#org @nulla
releaseall
end
#org @prestato
= Ti presto Caterpie
#org @pokedex
= Tieni Pokedex
#org @masterball
= Tieni ball
#org @ottenuto
= Ottieni [buffer1]
#org @arriva
= Eccolo
#org @dopocattura
= Ben fatto
#org @ripreso
= Riprendo Caterpie
#org @sguardodx
#raw 0x3 0xFE
Non far caso ai messaggi, sono così solo per provare che funzioni tutto.
Certo che comunque io le cose facili mai

P.S.: si è vero che con la masterball non puoi perdere, ma potresti sbagliare tasto, volontario o involontario, devo coprire tutti i casi