网站地图
新开私服
57私服首页 网游私服外挂 今日传奇3私服 今日奇迹私服 新开传奇私服 最新私服IP

Athena脚本制作讲座(四)物品相关指令


奇迹私服,传奇私服首页 作者:ro 发表时间:2004-3-4 12:58:17

【更多今日新开奇迹私服点这里查看...】


第四讲 物品相关指令

13、getitem "ii"
getitem 501,1;取得红色药水1个
道具代码请查看item_db.txt
14、delitem "ii"
delitem 501,1;删除红色药水1个
请在执行这条语句前确定是否有该项物品 不然可能发生未知错误
18、itemheal "ii"
可能与道具损坏有关
具体用法不明,武器损坏还没开放
21、countitem "i"
if(countitem(501)==1) goto L_YES;
如果红色药水数量为1,跳转到L_YES 否则顺序执行
物品语句统计命令,在()内填入想检查的物品代码
24、getequipname","i"
getequipname(1);
按照精练时列出的装备顺序取第1个(头1),以次类推 取得装备名,一般用于判断
25、getequipisequiped "i"
getequipisequiped(1);
判断头1是否有装备 序号同上
26、getequipisenableref "i"
getequipisenableref(1);
判断头1上的装备是否可精练 序号同上
27、getequipisidentify "i"
getequipisidentify(1);
判断头1的装备是否鉴定过
有些奇怪的命令,没鉴定的装备怎么装备呢
28、getequiprefinerycnt "i"
if(getequiprefinerycnt(1)<10) goto L_YES;
如果头1的精练<10,跳转到L_YES 判断装备是否达到预定精练值
29、getequipweaponlv "i"
if(getequipweaponlv(1)>0) goto L_YES;
判断头1是否是武器 判断武器等级,小于1为防具,1为1级武器,2为2级武器,依此类推
30、getequippercentrefinery "i"
if(getequippercentrefinery(1)==100) goto L_YES;
判断头1的装备是否到达安定值
这里需要读取refine_db.txt中的数据以判断是否到达安定值
在实际使用中,可以用rand(100)得到1个随机数与已知安定值比较以判定是否精练成功
31、successrefitem "i"
successrefitem 1;
将头1装备升1级 装备升级语句
32、failedrefitem "i" failedrefitem 1;
将头1装备做精练失败处理
40、setcart ""
setcart;
得到手推车,限定商人铁匠
41、setfalcon ""
setfalcon;
得到猎鹰,限定猎人
42、setriding ""
setriding;
得到骑乘的大嘴鸟或嘟嘟鸟,限定骑士十字军
44、openstorage ""
openstorage;
原地打开仓库
45、itemskill "iis"
三个参数分别为技能代码,技能等级,和名称
46、produce "i"
制造物品,参数为物品等级,
具体等级可以查看produce_db.txt

例1,精炼+20的脚本
cmd_in01.gat,127,81,8 script 神秘人 731,{
mes"[神秘人]";
mes"很久没看到猫妹妹了,你有她的照片吗?";
next;
mes"[神秘人]";
mes"有的话我可以帮你把物品安全+20";
next;
mes"[神秘人]";
mes"说吧!你想要锻治装置项目";
mes"中的哪一项物品呢?";
next;
menu getequipname(1),L_MENU_1,getequipname(2),L_MENU_2,getequipname(3),L_MENU_3,getequipname(4),L_MENU_4,getequipname(5),L_MENU_5,getequipname(6),L_MENU_6,getequipname(7),L_MENU_7,getequipname(8),L_MENU_8,getequipname(9),L_MENU_9,getequipname(10),L_MENU_10;
L_MENU_1:
set @part,1;
if (getequipisequiped(1)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_2:
set @part,2;
if (getequipisequiped(2)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_3:
set @part,3;
if (getequipisequiped(3)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_4:
set @part,4;
if (getequipisequiped(4)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_5:
set @part,5;
if (getequipisequiped(5)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_6:
set @part,6;
if (getequipisequiped(6)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_7:
set @part,7;
if (getequipisequiped(7)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_8:
set @part,8;
if (getequipisequiped(8)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_9:
set @part,9;
if (getequipisequiped(9)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_MENU_10:
set @part,10;
if (getequipisequiped(10)) goto L_START_1;
mes"[神秘人]";
mes"有毛病啊!";
goto L_CLOSE;
L_START_1:
if (getequipisenableref(@part)) goto L_START_2;
mes"[神秘人]";
mes"这个项目是无法锻治的。";
mes"我想我师傅应该可以";
goto L_CLOSE;
L_START_2:
if (getequipisidentify(@part)) goto L_START_3;
mes"[神秘人]";
mes"这个还没通过鉴定,无法锻治。";
goto L_CLOSE;
L_START_3:
if (getequiprefinerycnt(@part) < 20) goto L_REFINE_0;
mes"[ 神秘人]";
mes"还想炼?你有毛病啊!";
goto L_CLOSE;
L_REFINE_0:
L_0_SUB:
L_REFINE_1:
if (countitem(4131) < 1) goto L_CANCEL_2;
delitem 4131,1;
L_1_SUB:
L_REFINE_2:
L_2_SUB:
L_REFINE_3:
L_3_SUB:
L_REFINE_4:
L_4_SUB:
L_REFINE_5:
mes"[神秘人]";
mes" 锵!锵!锵!";
mes" 锵!锵!锵!锵!";
successrefitem @part;
mes" 宝刀未老啊!";
goto L_CLOSE;
L_REFINE_6:
L_CANCEL_1:
L_CANCEL_2:
mes"[神秘人]";
mes" 拿到照片再来吧!";
goto L_CLOSE;
L_CANCEL_3:
mes"[神秘人]";
mes" ......";
L_CLOSE:
close;
}

相关新闻
[3-4] Athena脚本制作讲座(三)属性相关指令
[3-4] Athena脚本制作讲座(二)流程控制与输入输出
[3-4] Athena脚本制作讲座(一)基础知识

免责声明:57sf.com登载此文出于传递更多信息之目的,并不意味着57sf.com赞同其观点或证实其描述
 
 Copyright 2004 57sf.com Corporation. All Rights. 奇迹私服版权所有传奇私服 热血江湖私服