版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一个不需要指定任何状态的NPC
functionstart(){
cm.sendOk("IamanNPCwithoutastatus.");
cm.dispose();
}
因为不需要状态直接start调用就可以
另外一个例子
functionstart(){
cm.sendOk("HereisanotherexampleofanNPCwithoutstatus.");
}
functionaction(mode,type,selection){
cm.warp(100000000,0);
cm.gainItem(4001126,1);
cm.sendOk("See?Here,Iwarpedyouandgaveyouanitemwithoutusingstatus.");
cm.dispose();
}
点了以后,传送,获得物品,再讲话,结束
属性文本
#b=Bluetext.蓝色文本,在这之后的字在没设置其他属性下为蓝色字
如#b蓝色字
#c[itemid]#Showshowmany[itemid]theplayerhasintheirinventory.
显示玩家背包里的道具数量
如#c1002357#
#d=Purpletext.紫色字体颜色之间一起用以最后一个为准
#e=Boldtext.粗体
如#b#e蓝色粗体字
#f[imagelocation]#-Showsanimageinsidethe.wzfiles.
显示wz文件中的图片指定路径可以是物品技能地图等等
#g=Greentext.绿色字体
#h#-Showsthenameoftheplayer.显示玩家名称
如[#h#]你好
#i[itemid]#-Showsapictureoftheitem.
显示物品图片
#k=Blacktext.黑色子图
#L[number]#Selectionopen.
#l-Selectionclose.
这两个连用
#L0#这是选项1#l
#m[mapid]#-Showsthenameofthemap.
显示地图名称
#n=Normaltext(removesbold).
恢复正常字体
#o[mobid]#-Showsthenameofthemob.
显示怪物名称
#p[npcid]#-ShowsthenameoftheNPC.
显示npc名称
#q[skillid]#-Showsthenameoftheskill.
显示技能名称
#r=Redtext.红色字体
#s[skillid]#-Showstheimageoftheskill.
显示技能图片
#t[itemid]#-Showsthenameoftheitem.
显示物品名称
#v[itemid]#-Showsapictureoftheitem.
显示物品图片和前面的i可能相同
#x-Returns"0%"(needmoreinformationonthis).
#z[itemid]#-Showsthenameoftheitem.
显示物品名称,和前面t同
#B[%]#-Showsa'progress'bar.
显示进度条
#F[imagelocation]#-Showsanimageinsidethe.wzfiles.
同前面f
\r\n-Movesdownaline.
换行
\r=ReturnCarriage
\n=NewLine
\t=Tab(4spaces)制表符4个空格
\b=Backwards回退
这里又把前面说一次
dispose
结束对话允许再次对话
EndstheconversationwithanNPC,allowsyoutotalktoNPCsagain.
Howtouse:cm.dispose();
sendNext
有下一个的窗口
Showsaconversationwindowwitha'Next'button.
Howtouse:cm.sendNext("[text]");
sendPrev
有上一个的窗口
Showsaconversationwindowwitha'Prev'(previous)button.
Howtouse:cm.sendPrev("[text]");
sendNextPrev
Showsaconversationwindowwitha'Next'and'Prev'button(seeabove).
Howtouse:cm.sendNextPrev("[text]");
sendOk
Showsaconversationwindowwithan'Ok'button.
Howtouse:cm.sendOk("[text]");
sendYesNo
Showsaconversationwindowwitha'Yes'and'No'button,'No'endstheconversationunlessotherwisestated.
Howtouse:cm.sendYesNo("[text]");
sendAcceptDecline
有确认取消的窗口
Showsaconversationwindowwithan'Accept'and'Decline'button.'Decline'endstheconversationunlessotherwisestated.
Howtouse:cm.sendAcceptDecline("[text]");
sendSimple
没有东西的窗口,但是实际是有下一个的
有代码
if(!text.contains("#L")){
sendNext(text);
return;
}
文本如果没有包括"#L"就是那个有选项的就有Next
Showsaconversationwindowwithnobuttons.
Howtouse:cm.sendSimple("[text]");
sendStyle
带风格的窗口,一般不常用有需要的风格变量
Showsastyle-selectwindow.
Howtouse:cm.sendStyle("[Text]",[variable]);//You'llneedtodeclarethevariableinaVarstatement.
warp
传送,第二个参数是0的话用默认的传送点
Warpstheplayertoamap.
Howtouse:cm.warp([mapid],[portal]);//Set[portal]as0ifyouwantdefault.
openShop
Opensashopwindow.
Howtouse:cm.openShop([shopid]);
haveItem
Checksiftheplayerhasanitem(intheirinventoriesorequipped).
Howtouse:cm.haveItem([itemid]);
gainItem
Givestheplayeranitem/takesanitemfromaplayer.
Howtouse:cm.gainItem([itemid],[ammount]);//Change[ammount]to-[ammount]totakeanitem.
changeJob
Changesthejoboftheplayer.
Howtouse:cm.changeJob([jobid]);
getJob
Findsoutwhatjobtheplayerhas.
Howtouse:cm.getJob();
startQuest
Startsaquest.
Howtouse:cm.startQuest([questid]);
completeQuest
Finishesaquest.
Howtouse:pleteQuest([questid]);
forfeitQuest
Forfeitsaquest.
Howtouse:cm.forfeitQuest([questid]);
getMeso
Findsouthowmanymesosaplayerhas.
Howtouse:cm.getMeso();
gainMeso
Givesaplayermesos/takesmesosfromaplayer.
Howtouse:cm.gainMeso([ammount]);//use-[ammount]totakemesos.
gainExp
Givesaplayerexp/takesexpfromaplayer.
Howtouse:cm.gainExp([ammount]);//use-[ammount]totakeexp.
getLevel
Findsouttheleveloftheplayer.
Howtouse:cm.getLevel();
teachSkill
Teachesaplayeraskill.
Howtouse:cm.teachSkill([skillid],[skilllevel],[maxskilllevel]);
get[Stat]
Findsoutthe[Stat]oftheplayer.[Stat]being:HP,MP,STR,DEX,INT,LUK.
Howtouse:cm.get[Stat]();
modifyNX
Gives/Takestheplayernx
Howtouse:cm.gainNX([amount]);
Makeitnegativetomakeittakeaway.
send函数返回接收
-----------
sendNext();&sendOk();
-----------
Type=0
Ifendchat
-
mode=-1
结束对话后下次收到-1
Ifnext/ok
-
mode=1
按ok或下一个
-----------
sendNextPrev();
-----------
Type=0
Ifendchat
-
mode=-1
结束对话
Ifnext
-
mode=1下一个
ifback
-
mode=0返回
-----------
sendYesNo();
-----------
Type=1
Ifendchat
-
mode=-1
Ifyes
-
mode=1
Ifno
-
mode=0
-----------
sendAcceptDecline();
-----------
Type=12
Ifendchat
-
mode=-1
Ifaccept
-
mode=1
Ifdecline
-
mode=0
-----------
sendGetText();
-----------
Nothingo____oitssomethingspecial<3
-----------
sendGetNumber();
-----------
Type=3
Ifendchat
-
mode=0
ifok
-
mode=1
-----------
sendSimple();
-----------
Type=4
Ifendchat
-
mode=0
ifselect
-
mode=1选择
这里再介绍
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2027届安徽省安庆市桐城市第二中学九年级化学第一学期期末调研模拟试题含解析
- 2027届江西省吉安市九年级物理第一学期期末联考试题含解析
- 2027届江苏省盐城市东台第一教育集团化学九年级第一学期期中达标检测试题含解析
- 2027届广西贵港市覃塘区九上化学期末学业质量监测模拟试题含解析
- 黄冈中学2027届九年级化学第一学期期中学业水平测试模拟试题含解析
- 福州市重点中学2027届化学九上期中考试试题含解析
- 年下学期小学六年级数学竞赛试题及答案1
- 2027届海南省儋州市第五中学九上物理期末质量跟踪监视模拟试题含解析
- 校园突发公共卫生事件处置手册
- 起重机械备件库房管理制度
- 高盛-中国工业科技:全球化3.0:中国AI工业化时代-Go Global 3.0:The Age of China's AI Industrialization-20260811
- 高电压工程课后答案
- ISO9001质量管理体系培训教材
- 护士耳鼻喉科护理进修汇报PPT模板
- 周口店实习报告
- 污水管网穿越公路施工方案
- 南京秦淮外国语学校新初一分班英语试卷含答案
- 办公室卫生值日表
- 2022-2023学年山东省济宁市高一年级上册学期期末数学试题【含答案】
- GB/T 24962-2010冷冻烃类流体静态测量计算方法
- GB/T 21238-2016玻璃纤维增强塑料夹砂管
评论
0/150
提交评论