关于常见命令参数表详见2楼……
1.对话
message @文本地址 0x?
(1)文本的种类
0x2普通对话框
0x3告示牌(玩家面对它就会显示文本,之后按任意键都会自动关闭)
0x4对话框(不能被手动关闭)closeonkeypress关闭命令
0x5选择对话
compare LASTRESULT 0x?
if 0x? goto @?
当玩家选择Yes时,LASTRESULT自动被设置为0x1,反之则被设置为0x0.
这时compare会把LASTRESULT和0x1进行对比,如果两者不同,那么得到的结果就是0x0,相同则为0x1.
(2)主角和对手名字
主角 - [player]
对手 - [rival]
2.赠送
giveitem [种类编号][数量]
givepokemon [种类编号] [等级] [所持道具的种类编号] 0x0 0x0 0x0
giveegg [种类编号]
三个参数都必须是16进制
3.移动
Applymovement【人物事件编号】【地址】
waitmovement 0x0停止移动
Pause 0x?它表示停顿时间的长短.(每0x20 = 约1秒)
#raw 0xFE 是必不可少的结束语句
4战斗
(1)野生精灵
wildbattle PM编号 等级 道具编号
(2)训练师
trainerbattle 0x0 [训练师ID] 0x0 [和你战斗前说的话所在地址] [被你打败后说的话所在地址]
trainerbattle 0x1 0x001 0x0 @before @after@later(可以指向另外一个脚本)
5.音乐
(1)常用……
fanfare 0x100 治愈PM效果音
fanfare 0x13E 得到PM效果音
waitfanfare 对话框在音乐结束前不能关闭(解除:closeonkeypress)
(2)背景音乐
playsong 0x背景音乐编号 0x0
(3)精灵叫声
Cry 0x精灵编号 0x0
(6)屏幕变化
Fadescreen
0x0 使屏幕由黑会到原状
0x1 使屏幕变黑
0x2 使屏幕由白会到原状?
0x3 使屏幕变白
7.坐标
1.显示图片
showpokepic [PM] [X 坐标][Y 坐标]
一般我们都会取屏幕中心来放图,所以坐标是这样的:(10,3).换成HEX就是0x0A0x03了.
hidepokepic 负责关闭它
8.金钱
给玩家金钱givemoney [金额] 0x00 '0x00其实是个比较麻烦的参数,我们不去详细研究了
从玩家那扣除金钱paymoney [金额] 0x00 '0x00同上
检查玩家身上是否有这些金钱checkmoney [金额] 0x00 '0x00同上.这个命令和checkflag一样会返回一个值来表示足(0x1)或不足(0x0)
显示一个包含有玩家身上金额的框 showmoney [X 坐标] [Y 坐标] 0x00 '0x00同上.
关闭上述的框hidemoney [X 坐标] [Y 坐标] '注意,没有0x00
更新上述框中的金额为当前值updatemoney [X 坐标] [Y 坐标] 0x00 '0x00同上.
9.硬币
给玩家硬币givecoins [数目]
从玩家那扣除硬币removecoins [数目]
检查玩家身上是否有这些硬币checkcoins [数目]
显示一个包含有玩家身上硬币数量的框 showcoins [X 坐标] [Y 坐标]
关闭上述的框hidecoins [X 坐标] [Y 坐标]
更新上述框中的数目为当前值updatecoins [X 坐标] [Y 坐标]
10.门
setdooropened [X 坐标] [Y 坐标] 打开门的动画
setdoorclosed [X 坐标] [Y 坐标] 关闭门的动画
doorchange '无参数
范例:
setdooropened 0x10 0x0D
doorchange
applymovement 0xFF @move
waitmovement 0x0
setdoorclosed 0x10 0x0D
doorchange
11.天气
(1)普通天气
setweather [天气]
doweather'无参数
惟有2条命令都执行,天气才会改变.
Setweather 0x3 雨天
(2)还原
resetweather(无参数),同样的,它要实现也需要doweather来激活.
12.瞬移
warp [地图库号] [地图号] [出口号] (X坐标) (Y坐标)
在[出口号]中写明一个出口的编号时,warp会把主角从该出口送出(如果是一个门,则主角开门出来;若是其它,则直接出现在那里),此时的(X坐标) (Y坐标)无论写什么都不会奏效,但这个位置必须写东西. 而当我们在[出口号]中写0xff时,warp则将主角送别指定的坐标,即随后的(X坐标) (Y坐标).此时的(X坐标) (Y坐标)不能乱写.
特别的,warp [地图库号] [地图号] 0xff 0xff 0xff会把主角送至该地图的正中央
warp命令有一个极其特殊的地方:一旦成功执行,其后的脚本都自动无视.
无声的:warpmuted[地图库号] [地图号] [出口号] (X坐标) (Y坐标)
走路效果:warpwalk[地图库号] [地图号] [出口号] (X坐标) (Y坐标)
传送效果:warpteleport[地图库号] [地图号] [出口号] (X坐标) (Y坐标)
另一种传送效果:warpteleport2[地图库号] [地图号] [出口号] (X坐标) (Y坐标)
掉进洞中的效果:warphole[地图库号] [地图号]'该命令不支持位置选择.
13.交易
pokemart @somewhere'指向的地址是物品清单.
#org @somewhere
#raw word [值1]
#raw word [值2]
......
#raw word 0x0
清单中的[值]实际上是道具的编号,而最末的0x0则是清单结束的标志.
14.图腾字
message @? MSG_NORMAL '必须前置一个对话框
braille @?
'指向要变为图腾的文字
15.speical和speical2
详见4楼某命令列表……
special2配合0x17C可以得出队伍中PM的数量,
special2和special很类似,但是除了完成特定的功能之外还会反馈一个值,并且把这个值储存在你想储存的变量当中(通常我们会存在0x800开头的几个运行变量中)。
16.机械移动
movesprite [人物编号] [X 坐标] [Y 坐标]
其中[人物编号]与移动脚本相同,[X 坐标] [Y 坐标]均为地图坐标.
17.消失与还原
(1)
hidesprite [人物编号].
长期的消失比短暂消失只多了一步:setflag [人物ID]
(2)出现
showsprite [人物编号]
clearflag(清除setflag造成的消失)
18.地图块
setmaptile [X 坐标] [Y 坐标] [图块编号] [移动许可](图块编号在左下角)
setmaptile后追加special 0x8E可以实现地图的即时刷新
19.变量
变量赋值:
setvar [变量名] [变量值]
变量值加减:
addvar [变量名] [要加上的值]
subvar [变量名] [要减去的值]
变量间复制:
copyvar [被覆盖的变量] [被复制的变量]
变量值比较:
compare [变量名] [值]
获得主角在游戏中的坐标值并将其写入变量:
getplayerpos [写入X坐标的变量] [写入Y坐标的变量]
random [值上限]'值下限只能为0x0,生成的值自动存入变量0x800D
范例:
#org @1
=[lightblue3_fr] Hi..
White - [white_fr]
Black - [black_fr]
Gray - [grey_fr]
Red - [red_fr]
Orange - [orange_fr]
Green - [green_fr]
Light Green - [lightgreen_fr]
Blue - [blue_fr]
Light Blue - [lightblue_fr]
Light Blue 2 - [lightblue2_fr]
Black - [black_fr]
Gray - [grey_fr]
Red - [red_fr]
Orange - [orange_fr]
Green - [green_fr]
Light Green - [lightgreen_fr]
Blue - [blue_fr]
Light Blue - [lightblue_fr]
Light Blue 2 - [lightblue2_fr]
Cyan - [cyan_fr]
Light Blue 3 - [lightblue3_fr]
Navy Blue - [navyblue_fr]
Dark Navy Blue - [darknavyblue_fr]
Face Down 0x00
Face Up 0x01
Face Left 0x02
Face Right 0x03
Step Down (Very Slow) 0x08
Step Up (Very Slow) 0x09
Step Left (Very Slow) 0x0A
Step Right (Very Slow) 0x0B
Step Down (Slow) 0x0C
Step Up (Slow) 0x0D
Step Left (Slow) 0x0E
Step Right (Slow) 0x0F
Step Down (Normal) 0x10
Step Up (Normal) 0x11
Step Left (Normal) 0x12
Step Right (Normal) 0x13
Jump Down 2 Squares 0x14
Jump Up 2 Squares 0x15
Jump Left 2 Squares 0x16
Jump Right 2 Squares 0x17
Step Down (Fast) 0x1D
Step Up (Fast) 0x1E
Step Left (Fast) 0x1F
Step Right (Fast) 0x20
Step on the Spot Down 0x21
Step on the Spot Up 0x22
Step on the Spot Left 0x23
Step on the Spot Right 0x24
Step on the Spot Down (Fast) 0x25
Step on the Spot Up (Fast) 0x26
Step on the Spot Left (Fast) 0x27
Step on the Spot Right (Fast) 0x28
Step on the Spot Down (Very Fast) 0x29
Step on the Spot Up (Very Fast) 0x2A
Step on the Spot Left (Very Fast) 0x2B
Step on the Spot Right (Very Fast) 0x2C
Face Down (Non-Instant) 0x2D
Face Up (Non-Instant) 0x2E
Face Left (Non-Instant) 0x2F
Face Right (Non-Instant) 0x30
Slide Down 0x31
Slide Up 0x32
Slide Left 0x33
Slide Right 0x34
Slide Down On Right Foot 0x3D
Slide Up On Right Foot 0x3E
Slide Left On Right Foot 0x3F
Slide Right On Right Foot 0x40
Slide Down On Left Foot 0x41
Slide Up On Left Foot 0x42
Slide Left On Left Foot 0x43
Slide Right On Left Foot 0x44
Face Player 0x4A
Face Away from Player 0x4B
Jump Down 1 Square 0x4E
Jump Up 1 Square 0x4F
Jump Left 1 Square 0x50
Jump Right 1 Square 0x51
Jump in Place (Facing Down) 0x52
Jump in Place (Facing Up) 0x53
Jump in Place (Facing Left) 0x54
Jump in Place (Facing Right) 0x55
Jump in Place (Facing Down->Up) 0x56
Jump in Place (Facing Up->Down) 0x57
Jump in Place (Facing Left->Right) 0x58
Jump in Place (Facing Right->Left) 0x59
Disappear 0x60
Reappear 0x61
"!" box popup 0x62
"?" box popup 0x63
"X" box popup 0x64
"!!" box popup 0x65
"^_^" box popup 0x66
3.speical
special 0x0 - 恢复PM
special 0x3C - 进入PM存储系统(FR/LG)
special 0x98 - 览车 (R/S)
special 0x10F - 游戏重启
special 0x110 - 胜利殿堂
special 0x111 - 电梯动画
special 0x131 - 地震 (R/S)
special 0x132 - 显示楼层
special 0x136 - 地震 (FR/LG)
special 0x137 - 教学战
special 0x156 - 触发幽灵 (FR/LG)
special 0x157 - 骑车 (FR/LG)
special 0x161 - 冲浪 (FR/LG)
special 0x16F - 激活全国图鉴 (FR/LG)
special 0x17B - 快艇动画
special 0x18D- 完成包括选PM、学习招式的整个过程.
special 0x191 - 圣安奴号离开
special 0x1F3 - 激活全国图鉴 (Emerald)
4.if后值的逻辑意义:
小于(0x0)
等于(0x1)
大于(0x2)
小于等于(0x3)
大于等于(0x4)
不等于(0x5)
2010.01.06
战斗部分补充
cleartrainerflag [训练师编号] 清楚某训练师的标识(可再次战斗)
settrainerflag [训练师编号] 在不战斗的前提下就设置训练师标识
repeattrainerbattle 触发上一次的战斗
欢迎光临 口袋社区-Poke The BBS (https://ww.poketb.com/) | Powered by Discuz! 6.1.0F |