pokecrystal/docs/scripting_commands.md

346 lines
6.0 KiB
Markdown
Raw Normal View History

# Scripting Commands
2017-12-12 02:40:21 +00:00
## `$00`: `scall` *script*
2017-12-12 02:40:21 +00:00
## `$01`: `farscall` *script*
2017-12-12 02:40:21 +00:00
## `$02`: `ptcall` *script*
2017-12-12 02:40:21 +00:00
## `$03`: `jump` *script*
2017-12-12 02:40:21 +00:00
## `$04`: `farjump` *script*
2017-12-12 02:40:21 +00:00
## `$05`: `ptjump` *script*
2017-12-12 02:40:21 +00:00
## `$06`: `if_equal` *byte*, *script*
2017-12-12 02:40:21 +00:00
## `$07`: `if_not_equal` *byte*, *script*
2017-12-12 02:40:21 +00:00
## `$08`: `iffalse` *script*
2017-12-12 02:40:21 +00:00
## `$09`: `iftrue` *script*
2017-12-12 02:40:21 +00:00
## `$0A`: `if_greater_than` *byte*, *script*
2017-12-12 02:40:21 +00:00
## `$0B`: `if_less_than` *byte*, *script*
2017-12-12 02:40:21 +00:00
## `$0C`: `jumpstd` *std_script*
2017-12-12 02:40:21 +00:00
## `$0D`: `callstd` *std_script*
2017-12-12 02:40:21 +00:00
## `$0E`: `callasm` *asm*
2017-12-12 02:40:21 +00:00
## `$0F`: `special` *special_pointer*
2017-12-12 02:40:21 +00:00
## `$10`: `ptcallasm` *asm*
2017-12-12 02:40:21 +00:00
## `$11`: `checkmaptriggers` *map*
2017-12-12 02:40:21 +00:00
## `$12`: `domaptrigger` *map*, *trigger_id*
2017-12-12 02:40:21 +00:00
## `$13`: `checktriggers`
2017-12-12 02:40:21 +00:00
## `$14`: `dotrigger` *trigger_id*
2017-12-12 02:40:21 +00:00
## `$15`: `writebyte` *value*
2017-12-12 02:40:21 +00:00
## `$16`: `addvar` *value*
2017-12-12 02:40:21 +00:00
## `$17`: `random` *value*
2017-12-12 02:40:21 +00:00
## `$18`: `checkver`
2017-12-12 02:40:21 +00:00
## `$19`: `copybytetovar` *address*
2017-12-12 02:40:21 +00:00
## `$1A`: `copyvartobyte` *address*
2017-12-12 02:40:21 +00:00
## `$1B`: `loadvar` *address*, *value*
2017-12-12 02:40:21 +00:00
## `$1C`: `checkcode` *variable*
2017-12-12 02:40:21 +00:00
## `$1D`: `writevarcode` *variable*
2017-12-12 02:40:21 +00:00
## `$1E`: `writecode` *variable*, *value*
2017-12-12 02:40:21 +00:00
## `$1F`: `giveitem` *item_id*[, *quantity*=1]
2017-12-12 02:40:21 +00:00
## `$20`: `takeitem` *item_id*[, *quantity*=1]
2017-12-12 02:40:21 +00:00
## `$21`: `checkitem` *item_id*
2017-12-12 02:40:21 +00:00
## `$22`: `givemoney` *account*, *value*
2017-12-12 02:40:21 +00:00
## `$23`: `takemoney` *account*, *value*
2017-12-12 02:40:21 +00:00
## `$24`: `checkmoney` *account*, *value*
2017-12-12 02:40:21 +00:00
## `$25`: `givecoins` *value*
2017-12-12 02:40:21 +00:00
## `$26`: `takecoins` *value*
2017-12-12 02:40:21 +00:00
## `$27`: `checkcoins` *value*
2017-12-12 02:40:21 +00:00
## `$28`: `addcellnum` *contact_id*
2017-12-12 02:40:21 +00:00
## `$29`: `delcellnum` *contact_id*
2017-12-12 02:40:21 +00:00
## `$2A`: `checkcellnum` *contact_id*
2017-12-12 02:40:21 +00:00
## `$2B`: `checktime` *time*
2017-12-12 02:40:21 +00:00
- **`checkmorn`:** `checktime MORN`
- **`checkday`:** `checktime DAY`
- **`checknite`:** `checktime NITE`
2017-12-12 02:40:21 +00:00
## `$2C`: `checkpoke` *mon_id*
2017-12-12 02:40:21 +00:00
## `$2D`: `givepoke` *mon_id*, *level*[, *item*=0[, *trainer*=0, *ot_name*, *nickname*]]
2017-12-12 02:40:21 +00:00
## `$2E`: `giveegg` *mon_id*, *level*
2017-12-12 02:40:21 +00:00
## `$2F`: `givepokeitem` *pointer*
2017-12-12 02:40:21 +00:00
## `$30`: `checkpokeitem` *pointer*
2017-12-12 02:40:21 +00:00
## `$31`: `checkevent` *event_flag*
2017-12-12 02:40:21 +00:00
## `$32`: `clearevent` *event_flag*
2017-12-12 02:40:21 +00:00
## `$33`: `setevent` *event_flag*
2017-12-12 02:40:21 +00:00
## `$34`: `checkflag` *engine_flag*
2017-12-12 02:40:21 +00:00
## `$35`: `clearflag` *engine_flag*
2017-12-12 02:40:21 +00:00
## `$36`: `setflag` *engine_flag*
2017-12-12 02:40:21 +00:00
## `$37`: `wildon`
2017-12-12 02:40:21 +00:00
## `$38`: `wildoff`
2017-12-12 02:40:21 +00:00
## `$39`: `xycompare` *pointer*
2017-12-12 02:40:21 +00:00
## `$3A`: `warpmod` *warp_id*, *map*
2017-12-12 02:40:21 +00:00
## `$3B`: `blackoutmod` *map*
2017-12-12 02:40:21 +00:00
## `$3C`: `warp` *map*, *x*, *y*
2017-12-12 02:40:21 +00:00
## `$3D`: `readmoney` *account*, *memory*
2017-12-12 02:40:21 +00:00
## `$3E`: `readcoins` *memory*
2017-12-12 02:40:21 +00:00
## `$3F`: `RAM2MEM` *memory*
2017-12-12 02:40:21 +00:00
## `$40`: `pokenamemem` *mon_id*, *memory*
2017-12-12 02:40:21 +00:00
## `$41`: `itemtotext` *item_id*, *memory*
2017-12-12 02:40:21 +00:00
## `$42`: `mapnametotext` *memory*
2017-12-12 02:40:21 +00:00
## `$43`: `trainertotext` *trainer_id*, *trainer_group*, *memory*
2017-12-12 02:40:21 +00:00
## `$44`: `stringtotext` *text_pointer*, *memory*
2017-12-12 02:40:21 +00:00
## `$45`: `itemnotify`
2017-12-12 02:40:21 +00:00
## `$46`: `pocketisfull`
2017-12-12 02:40:21 +00:00
## `$47`: `opentext`
2017-12-12 02:40:21 +00:00
## `$48`: `refreshscreen` *dummy*
2017-12-12 02:40:21 +00:00
## `$49`: `closetext`
2017-12-12 02:40:21 +00:00
## `$4A`: `loadbytec2cf` *byte*
2017-12-12 02:40:21 +00:00
## `$4B`: `farwritetext` *text_pointer*
2017-12-12 02:40:21 +00:00
## `$4C`: `writetext` *text_pointer*
2017-12-12 02:40:21 +00:00
## `$4D`: `repeattext` *byte1*, *byte2*
2017-12-12 02:40:21 +00:00
## `$4E`: `yesorno`
2017-12-12 02:40:21 +00:00
## `$4F`: `loadmenudata` *data_pointer*
2017-12-12 02:40:21 +00:00
## `$50`: `closewindow`
2017-12-12 02:40:21 +00:00
## `$51`: `jumptextfaceplayer` *text_pointer*
2017-12-12 02:40:21 +00:00
## `$52`: `farjumptext` *text_pointer*
2017-12-12 02:40:21 +00:00
## `$53`: `jumptext` *text_pointer*
2017-12-12 02:40:21 +00:00
## `$54`: `waitbutton`
2017-12-12 02:40:21 +00:00
## `$55`: `buttonsound`
2017-12-12 02:40:21 +00:00
## `$56`: `pokepic` *mon_id*
2017-12-12 02:40:21 +00:00
## `$57`: `closepokepic`
2017-12-12 02:40:21 +00:00
## `$58`: `_2dmenu`
2017-12-12 02:40:21 +00:00
## `$59`: `verticalmenu`
2017-12-12 02:40:21 +00:00
## `$5A`: `loadpikachudata`
2017-12-12 02:40:21 +00:00
## `$5B`: `randomwildmon`
2017-12-12 02:40:21 +00:00
## `$5C`: `loadmemtrainer`
2017-12-12 02:40:21 +00:00
## `$5D`: `loadwildmon` *mon_id*, *level*
2017-12-12 02:40:21 +00:00
## `$5E`: `loadtrainer` *trainer_group*, *trainer_id*
2017-12-12 02:40:21 +00:00
## `$5F`: `startbattle`
2017-12-12 02:40:21 +00:00
## `$60`: `reloadmapafterbattle`
2017-12-12 02:40:21 +00:00
## `$61`: `catchtutorial` *byte*
2017-12-12 02:40:21 +00:00
## `$62`: `trainertext` *which_text*
2017-12-12 02:40:21 +00:00
## `$63`: `trainerflagaction` *action*
2017-12-12 02:40:21 +00:00
## `$64`: `winlosstext` *win_text_pointer*, *loss_text_pointer*
2017-12-12 02:40:21 +00:00
## `$65`: `scripttalkafter`
2017-12-12 02:40:21 +00:00
## `$66`: `end_if_just_battled`
2017-12-12 02:40:21 +00:00
## `$67`: `check_just_battled`
2017-12-12 02:40:21 +00:00
## `$68`: `setlasttalked` *person*
2017-12-12 02:40:21 +00:00
## `$69`: `applymovement` *person*, *data_pointer*
2017-12-12 02:40:21 +00:00
## `$6A`: `applymovement2` *data_pointer*
2017-12-12 02:40:21 +00:00
## `$6B`: `faceplayer`
2017-12-12 02:40:21 +00:00
## `$6C`: `faceperson` *person1*, *person2*
2017-12-12 02:40:21 +00:00
## `$6D`: `variablesprite` *variable_sprite_id*, *sprite_id*
2017-12-12 02:40:21 +00:00
## `$6E`: `disappear` *person*
2017-12-12 02:40:21 +00:00
## `$6F`: `appear` *person*
2017-12-12 02:40:21 +00:00
## `$70`: `follow` *person2*, *person1*
2017-12-12 02:40:21 +00:00
## `$71`: `stopfollow`
2017-12-12 02:40:21 +00:00
## `$72`: `moveperson` *person*, *x*, *y*
2017-12-12 02:40:21 +00:00
## `$73`: `writepersonxy` *person*
2017-12-12 02:40:21 +00:00
## `$74`: `loademote` *emote_id*
2017-12-12 02:40:21 +00:00
## `$75`: `showemote` *emote_id*, *person*, *length*
2017-12-12 02:40:21 +00:00
## `$76`: `spriteface` *person*, *facing*
2017-12-12 02:40:21 +00:00
## `$77`: `follownotexact` *person2*, *person1*
2017-12-12 02:40:21 +00:00
## `$78`: `earthquake` *param*
2017-12-12 02:40:21 +00:00
## `$79`: `changemap` *bank*, *blockdata_pointer*
2017-12-12 02:40:21 +00:00
## `$7A`: `changeblock` *x*, *y*, *block*
2017-12-12 02:40:21 +00:00
## `$7B`: `reloadmap`
2017-12-12 02:40:21 +00:00
## `$7C`: `reloadmappart`
2017-12-12 02:40:21 +00:00
## `$7D`: `writecmdqueue` *queue_pointer*
2017-12-12 02:40:21 +00:00
## `$7E`: `delcmdqueue` *byte*
2017-12-12 02:40:21 +00:00
## `$7F`: `playmusic` *music_id*
2017-12-12 02:40:21 +00:00
## `$80`: `encountermusic`
2017-12-12 02:40:21 +00:00
## `$81`: `musicfadeout` *music_id*, *length*
2017-12-12 02:40:21 +00:00
## `$82`: `playmapmusic`
2017-12-12 02:40:21 +00:00
## `$83`: `dontrestartmapmusic`
2017-12-12 02:40:21 +00:00
## `$84`: `cry` *mon_id*
2017-12-12 02:40:21 +00:00
## `$85`: `playsound` *sfx_id*
2017-12-12 02:40:21 +00:00
## `$86`: `waitsfx`
2017-12-12 02:40:21 +00:00
## `$87`: `warpsound`
2017-12-12 02:40:21 +00:00
## `$88`: `specialsound`
2017-12-12 02:40:21 +00:00
## `$89`: `passtoengine` *data_pointer*
2017-12-12 02:40:21 +00:00
## `$8A`: `newloadmap` *which_method*
2017-12-12 02:40:21 +00:00
## `$8B`: `pause` *length*
2017-12-12 02:40:21 +00:00
## `$8C`: `deactivatefacing` *length*
2017-12-12 02:40:21 +00:00
## `$8D`: `priorityjump` *script*
2017-12-12 02:40:21 +00:00
## `$8E`: `warpcheck`
2017-12-12 02:40:21 +00:00
## `$8F`: `ptpriorityjump` *script*
2017-12-12 02:40:21 +00:00
## `$90`: `return`
2017-12-12 02:40:21 +00:00
## `$91`: `end`
2017-12-12 02:40:21 +00:00
## `$92`: `reloadandreturn` *which_method*
2017-12-12 02:40:21 +00:00
## `$93`: `end_all`
2017-12-12 02:40:21 +00:00
## `$94`: `pokemart` *dialog_id*, *mart_id*
2017-12-12 02:40:21 +00:00
## `$95`: `elevator` *floor_list*
2017-12-12 02:40:21 +00:00
## `$96`: `trade` *trade_id*
2017-12-12 02:40:21 +00:00
## `$97`: `askforphonenumber` *contact_id*
2017-12-12 02:40:21 +00:00
## `$98`: `phonecall` *call_id*
2017-12-12 02:40:21 +00:00
## `$99`: `hangup`
2017-12-12 02:40:21 +00:00
## `$9A`: `describedecoration` *byte*
2017-12-12 02:40:21 +00:00
## `$9B`: `fruittree` *tree_id*
2017-12-12 02:40:21 +00:00
## `$9C`: `specialphonecall` *call_id*
2017-12-12 02:40:21 +00:00
## `$9D`: `checkphonecall`
2017-12-12 02:40:21 +00:00
## `$9E`: `verbosegiveitem` *item_id*[, *quantity*=1]
2017-12-12 02:40:21 +00:00
## `$9F`: `verbosegiveitem2` *item_id*, *variable*
2017-12-12 02:40:21 +00:00
## `$A0`: `swarm` *swarm_id*, *map*
2017-12-12 02:40:21 +00:00
## `$A1`: `halloffame`
2017-12-12 02:40:21 +00:00
## `$A2`: `credits`
2017-12-12 02:40:21 +00:00
## `$A3`: `warpfacing` *facing*, *map*, *x*, *y*
2017-12-12 02:40:21 +00:00
## `$A4`: `battletowertext` *memory*
2017-12-12 02:40:21 +00:00
## `$A5`: `landmarktotext` *landmark_id*, *memory*
2017-12-12 02:40:21 +00:00
## `$A6`: `trainerclassname` *trainer_group*, *memory*
2017-12-12 02:40:21 +00:00
## `$A7`: `name` *type*, *id*, *memory*
2017-12-12 02:40:21 +00:00
## `$A8`: `wait` *duration*
2017-12-12 02:40:21 +00:00
## `$A9`: `check_save`