View Single Post
  #7129    
Old July 25th, 2012, 06:11 AM
DrFuji's Avatar
DrFuji
repeat repeat repeat
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by raging-inferno-1986 View Post
Game: Fire Red
Type: yes/no, give pokemon, give item, talk
Editor: XSE

Spoiler:
#org $begin
lock
faceplayer
message $talk
boxset 6
goto $pokedex

#ORG $talk
$talk 1 = Hello [PLAYER] are you ready to\lstart your adventure?\p.......\pI thought so.

#ORG $pokedex
lock
faceplayer
message $takethis
special 0x16F
boxset 6
goto $pokemon

#ORG $takethis
$takethis 1 = [PLAYER] received Pokédex.

#ORG $pokemon
message $yesno
boxset 5
compare LASTRESULT 1
if B_true goto $yes1
if B_false goto $no1
boxset 6

#ORG $yes1
message $receive1
givepokemon 152 5
boxset 6
release
end

#ORG $no1
message $decline1
compare LASTRESULT 1
if B_true goto $yes2
if B_false goto $no2
boxset 6

#ORG $yes2
message $receive2
givepokemon 155 5
boxset 6
release
end

#ORG $no2
message $decline2
givepokemon 158 5
boxset 6
release
end

#ORG $yesno
$yesno 1 = Do you want a CHIKORITA??

#ORG $receive1
$receive1 1 = I see! An excellent choice.\p [PLAYER] received CHIKORITA.

#ORG $decline1
$decline1 1 = Ok, how about a CYNDAQUIL?

#ORG $receive2
$receive2 1 = I see! An excellent choice.\p {PLAYER] received CYNDAQUIL.

#ORG $decline2
$decline1 1 = Ah! Your choice is TOTODILE.\p [PLAYER] received TOTODILE.


When i try to compile, i get this error; Too less parameters on line 4. The correct number is 2.

Whats wrong? Also is anything else wrong?
The problem with this is that you're using PokeScript based commands, while XSE only accepts a completely different scripting language. All script editors have different variations of commands and the data that you have to apply to each one. I would strongly urge you to read this tutorial to learn the correct structure of each command in XSE.

Anyway, here's a cleaned up version of your script that will work in XSE:

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @talk 0x2
setflag 0x828
setflag 0x829
msgbox @pokedex 0x2
special 0x16F
msgbox @yesno 0x5
compare 0x800D 0x1
if 0x1 goto @yes1
msgbox @decline1 0x5
compare 0x800D 0x1
if 0x1 goto @yes2
msgbox @decline2 0x2
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
release
end

#org @yes1
msgbox @receive1 0x2
givepokemon 0x98 0x5 0x0 0x0 0x0 0x0
release
end

#org @yes2
msgbox @receive2 0x2
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
release
end

#org @talk
= Hello [PLAYER] are you ready to\nstart your adventure?\p.......\pI thought so.

#org @pokedex
= [PLAYER] received Pokédex.

#org @yesno
= Do you want a CHIKORITA??

#org @receive1
= I see! An excellent choice.\p[PLAYER] received CHIKORITA.

#org @decline1
= Ok, how about a CYNDAQUIL?

#org @receive2
= I see! An excellent choice.\p[PLAYER] received CYNDAQUIL.

#org @decline2
= Ah! Your choice is TOTODILE.\p[PLAYER] received TOTODILE.
The script looks pretty different to what you had, but that's because a lot of the initial commands were unnecessary so I shortened it a bit. I've also added the commands 'setflag 0x828/ 829' as they activate the Pokemon and Pokedex options in the menu respectively (Assuming that this is the first time that the player is getting their Pokemon). Also, this dialogue will play every time you talk to the NPC so put a 'checkflag 0x828/9' command at the start of the script to check if the player has gone through it before and then branch off how ever you see fit.