- 积分
- 9883
- 威望
- 156
- 魅力
- 161
- 经验
- 5187
- 热心度
- 0
- 注册时间
- 2009-12-24
- 最后登录
- 2018-7-8
- 主题
- 55
- 回帖
- 1546
- 精华
- 4
- 阅读权限
- 90
该用户从未签到
论坛嘉宾
- 积分
- 9883
|
发表于 2010-11-28 11:38:42
|
显示全部楼层
【鹰眼术加强I】事件版脚本
ZVSE
ERMS_ScriptDate=28.11(November).2010
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2004.6.29.918
*************************************************************************
*鹰眼术增强I事件版
*提取自官方脚本script01.erm、script03.erm及script03.ert
*升级时可学习魔法
*未被地图禁止的魔法已经学完时,鹰眼术不删除
*可以学会除飞行和次元门之外的5级未禁魔法
*v变量使用:v1,v901,v903,v904,v908-v910,v3500
*************************************************************************
****生成随机魔法****
!#MCv3500:S@spell@;设置宏,v3500赋值为@spell@
!#VR$spell$:S7777; @spell@赋值为7777
Syntax:
* FU$spell$:P#1/#2/#3/#4/#5/#6/#7/#8/#9/#10/#11/#12/#13/#14/#15;
* Spell Number is returned in y-99, value is -1 if no spell exists.
#1 = minimum spell level: 0=any, or 1..5
#2 = maximum spell level: 0=any, or 1..5
#3 = type: 0=any, 1=adventure, 2=combat
#4 = element: 0=any, 1=air, 2=earth, 4=fire, 8=water. Add numbers for multiple elements.
#5 = banning: 0=ignore spell banning, 1=skip banned spells
#6 = exclusions: 0=no exclusions, 1..9=number of specific spell exclusions (#7..#15)
#7..#15 = specific spell exclusions: 0..69 for spell number, anything else is ignored
and only exclusions up to the number in #6 are used, so if #6 is 0, all
specific exclusions will be ignored.
Example:
To generate a random Level 3 Combat Fire or Air spell excluding all Banned
spells and excluding the Misfortune (spell #52), use:
* !!FU$spell$:P3/3/2/5/1/1/52;
A subfunction of this function may be used to determine the level, element and type
(combat or adventure) of any given spell:
Syntax:
FU7779:P#;
#=spell number being checked (0..69).
Returned Values:
y-96 : Level (1..5)
y-97 : Type (1=Adventure, 2=Combat)
y-98 : Element (1=air, 2=earth, 4=fire, 8=water, 15=all elements)
--------------------------------------------------------------------------------
!?FU7777;
[x1=min. level, x2=max. level, x3=type, x4=element, x5=banning]
[x6=number of exclusions, x7..x15=specific exclusions]
[Display invalid parameter message for an invalid parameter]
!!IF|x1<0/x1>5:M1/z100032;
!!IF|x2<0/x2>5:M1/z100033;
!!IF|x3<0/x3>2:M1/z100034;
!!IF|x4<0/x4>15:M1/z100035;
!!IF|x5<0/x5>3:M1/z100036;
!!IF|x6<0/x6>9:M1/z100037;
[Set y-99 to -99 for an invalid parameter]
!!VRy-99|x1<0/x1>5/x2<0/x2>5/x3<0/x3>2/x4<0/x4>15/x5<0/x5>3/x6<0/x6>9:S-99;
!!FU&y-99=-99:E; [Exit if an invalid parameter is entered]
!!VRy-99:S-1; [Initialize y-99 to -1]
[Do up to 500 loops to find a valid spell number: y-99]
!!DO7778/1/500/1:Px1/x2/x3/x4/x5/x6/x7/x8/x9/x10/x11/x12/x13/x14/x15;
--------------------------------------------------------------------------------
[生成有效魔法编号y-99]
!?FU7778;
[x1=min. level, x2=max. level, x3=类型(战斗、冒险), x4=四系类别, x5=禁止]
[x6=number of exclusions, x7..x15=specific exclusions]
!!VRy1:S0 R69; [y1为0-69的随机数,魔法编号]
!!FU7779:Py1; [检查魔法等级(y-96), 类型(y-97), 四系分类(y-98)]
!!VRy2:S0; [给y2赋值为0,初始化变量]
!!VRy2&x1<>0/y-96<x1:S1; [If level too low, set y2 to 1]
!!VRy2&x2<>0/y-96>x2:S1; [If level too high, set y2 to 1]
!!VRy2&x3<>0/x3<>y-97:S1; [If invalid type, set y2 to 1]
!!VRy3:Sx4; [给y3赋值为x4,四系类别]
!!VRy3:&1; [检查气系]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=1/y3<>1:S1; [If Air Spell and invalid, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&2; [Check for Earth Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=2/y3<>2:S1; [If Earth Spell and invalid, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&4; [Check for Fire Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=4/y3<>4:S1; [If Fire Spell and invalid, set y2 to 1]
!!VRy3:Sx4; [Copy x4 (elements) to y3]
!!VRy3:&8; [Check for Water Element]
!!VRy2&x4<>0/x4<>15/y-98<>15/y-98=8/y3<>8:S1; [If Water Spell and invalid, set y2 to 1]
!!UN:J0/y1/?y4; [Check if spell is enabled (0) or disabled (1): y4]
!!VRy2&y4=1/x5=1:S1; [If spell is disabled and banning is selected, set y2 to 1]
!!VRy5:S0; [Initialize y5 to 0]
!!UN&y1=0:P152/?y5; [检查是否禁止召船-如果禁止y5=1]
!!UN&y1=1:P221/?y5; [检查是否禁止毁船-如果禁止y5=1]
!!UN&y1=2:P222/?y5; [检查是否禁止透眼-如果禁止y5=1]
!!UN&y1=3:P247/?y5; [检查是否禁止观地-如果禁止y5=1]
!!UN&y1=4:P651/?y5; [检查是否禁止伪装-如果禁止y5=1]
!!UN&y1=5:P246/?y5; [检查是否禁止观天-如果禁止y5=1]
!!UN&y1=6:P156/?y5; [检查是否禁止飞行-如果禁止y5=1]
!!UN&y1=7:P153/?y5; [检查是否禁止踏水-如果禁止y5=1]
!!UN&y1=8:P155/?y5; [检查是否禁止次元-如果禁止y5=1]
!!UN&y1=9:P154/?y5; [检查是否禁止回城-如果禁止y5=1]
!!UN&y1=26:P223/?y5; [检查是否禁止末日-如果禁止y5=1]
!!UN&y1=38:P272/?y5; [检查是否禁止复活-如果禁止y5=1]
!!UN&y1=39:P271/?y5; [检查是否禁止聚灵-如果禁止y5=1]
!!VRy2&y5=1/x5=1:S1; [魔法被禁止时, y2赋值为1]
!!VRy2&x6>=1/x7=y1:S1; [If spell is 1st excluded spell, set y1 to 1]
!!VRy2&x6>=2/x8=y1:S1; [If spell is 2nd excluded spell, set y1 to 1]
!!VRy2&x6>=3/x9=y1:S1; [If spell is 3rd excluded spell, set y1 to 1]
!!VRy2&x6>=4/x10=y1:S1; [If spell is 4th excluded spell, set y1 to 1]
!!VRy2&x6>=5/x11=y1:S1; [If spell is 5th excluded spell, set y1 to 1]
!!VRy2&x6>=6/x12=y1:S1; [If spell is 6th excluded spell, set y1 to 1]
!!VRy2&x6>=7/x13=y1:S1; [If spell is 7th excluded spell, set y1 to 1]
!!VRy2&x6>=8/x14=y1:S1; [If spell is 8th excluded spell, set y1 to 1]
!!VRy2&x6>=9/x15=y1:S1; [If spell is 9th excluded spell, set y1 to 1]
!!VRy-99&y2=0:Sy1; [If spell is valid, set y-99 to spell number: y-99]
!!VRx16&y2=0:S999; [If spell is valid, set x16 to 999 to exit loop: x16]
--------------------------------------------------------------------------------
[确定魔法等级, 类型, 元素]
!?FU7779;
[x1=魔法编号, y-96 返回魔法级别, y-97 返回魔法类型, y-98 返回魔法四系类别]
!!VRy-97&x1<=9:S1; [Set y-97 to 1 for an 冒险魔法]
!!VRy-97&x1>=10:S2; [Set y-97 to 2 for a 战斗魔法]
!!VRy-96&x1=0:S1; [召船]
!!VRy-98&x1=0:S8; [水系]
!!VRy-96&x1=1:S2; [毁船]
!!VRy-98&x1=1:S8; [水系]
!!VRy-96&x1=2:S2; [透视之言]
!!VRy-98&x1=2:S15; [四系]
!!VRy-96&x1=3:S1; [观地]
!!VRy-98&x1=3:S2; [土系]
!!VRy-96&x1=4:S2; [伪装]
!!VRy-98&x1=4:S1; [气系]
!!VRy-96&x1=5:S1; [观天]
!!VRy-98&x1=5:S1; [气系]
!!VRy-96&x1=6:S5; [飞行]
!!VRy-98&x1=6:S1; [气系]
!!VRy-96&x1=7:S4; [踏水]
!!VRy-98&x1=7:S8; [水系]
!!VRy-96&x1=8:S5; [次元门]
!!VRy-98&x1=8:S1; [气系]
!!VRy-96&x1=9:S4; [回城]
!!VRy-98&x1=9:S2; [土系]
!!VRy-96&x1=10:S2; [流沙]
!!VRy-98&x1=10:S2; [土系]
!!VRy-96&x1=11:S3; [埋雷]
!!VRy-98&x1=11:S4; [火系]
!!VRy-96&x1=12:S3; [力盾]
!!VRy-98&x1=12:S2; [土系]
!!VRy-96&x1=13:S2; [火墙]
!!VRy-98&x1=13:S4; [火系]
!!VRy-96&x1=14:S3; [地震]
!!VRy-98&x1=14:S2; [土系]
!!VRy-96&x1=15:S1; [魔箭]
!!VRy-98&x1=15:S15;[四系]
!!VRy-96&x1=16:S2; [冰箭]
!!VRy-98&x1=16:S8; [水系]
!!VRy-96&x1=17:S2; [闪电]
!!VRy-98&x1=17:S1; [气系]
!!VRy-96&x1=18:S4; [爆裂]
!!VRy-98&x1=18:S2; [土系]
!!VRy-96&x1=19:S4; [连闪]
!!VRy-98&x1=19:S1; [气系]
!!VRy-96&x1=20:S3; [冰环]
!!VRy-98&x1=20:S8; [水系]
!!VRy-96&x1=21:S3; [火球]
!!VRy-98&x1=21:S4; [火系]
!!VRy-96&x1=22:S4; [地狱烈焰]
!!VRy-98&x1=22:S4; [火系]
!!VRy-96&x1=23:S4; [流星雨]
!!VRy-98&x1=23:S2; [土系]
!!VRy-96&x1=24:S2; [死亡波纹]
!!VRy-98&x1=24:S2; [土系]
!!VRy-96&x1=25:S3; [圣言]
!!VRy-98&x1=25:S1; [气系]
!!VRy-96&x1=26:S4; [末日]
!!VRy-98&x1=26:S4; [火系]
!!VRy-96&x1=27:S1; [土盾]
!!VRy-98&x1=27:S2; [土系]
!!VRy-96&x1=28:S3; [气盾]
!!VRy-98&x1=28:S1; [气系]
!!VRy-96&x1=29:S4; [火盾]
!!VRy-98&x1=29:S4; [火系]
!!VRy-96&x1=30:S2; [御气]
!!VRy-98&x1=30:S1; [气系]
!!VRy-96&x1=31:S1; [御火]
!!VRy-98&x1=31:S4; [火系]
!!VRy-96&x1=32:S1; [御水]
!!VRy-98&x1=32:S8; [水系]
!!VRy-96&x1=33:S3; [御土]
!!VRy-98&x1=33:S2; [土系]
!!VRy-96&x1=34:S3; [抗魔]
!!VRy-98&x1=34:S2; [土系]
!!VRy-96&x1=35:S1; [驱魔]
!!VRy-98&x1=35:S8; [水系]
!!VRy-96&x1=36:S4; [魔镜]
!!VRy-98&x1=36:S1; [气系]
!!VRy-96&x1=37:S1; [疗伤]
!!VRy-98&x1=37:S8; [水系]
!!VRy-96&x1=38:S4; [复活]
!!VRy-98&x1=38:S2; [土系]
!!VRy-96&x1=39:S3; [聚灵]
!!VRy-98&x1=39:S2; [土系]
!!VRy-96&x1=40:S4; [牺牲]
!!VRy-98&x1=40:S4; [火系]
!!VRy-96&x1=41:S1; [祝福]
!!VRy-98&x1=41:S8; [水系]
!!VRy-96&x1=42:S1; [诅咒]
!!VRy-98&x1=42:S4; [火系]
!!VRy-96&x1=43:S1; [嗜血]
!!VRy-98&x1=43:S4; [火系]
!!VRy-96&x1=44:S2; [精准]
!!VRy-98&x1=44:S1; [气系]
!!VRy-96&x1=45:S2; [虚弱]
!!VRy-98&x1=45:S8; [水系]
!!VRy-96&x1=46:S1; [石肤]
!!VRy-98&x1=46:S2; [土系]
!!VRy-96&x1=47:S2; [瓦解]
!!VRy-98&x1=47:S1; [气系]
!!VRy-96&x1=48:S4; [祈祷]
!!VRy-98&x1=48:S8; [水系]
!!VRy-96&x1=49:S3; [鼓舞]
!!VRy-98&x1=49:S8; [水系]
!!VRy-96&x1=50:S4; [悲伤]
!!VRy-98&x1=50:S2; [土系]
!!VRy-96&x1=51:S2; [幸运]
!!VRy-98&x1=51:S1; [气系]
!!VRy-96&x1=52:S3; [大难]
!!VRy-98&x1=52:S4; [火系]
!!VRy-96&x1=53:S1; [加速]
!!VRy-98&x1=53:S1; [气系]
!!VRy-96&x1=54:S1; [减速]
!!VRy-98&x1=54:S2; [土系]
!!VRy-96&x1=55:S4; [屠戮]
!!VRy-98&x1=55:S4; [火系]
!!VRy-96&x1=56:S4; [孤注]
!!VRy-98&x1=56:S4; [火系]
!!VRy-96&x1=57:S5; [泰坦之箭]
!!VRy-98&x1=57:S1; [气系]
!!VRy-96&x1=58:S4; [反击]
!!VRy-98&x1=58:S1; [气系]
!!VRy-96&x1=59:S4; [狂乱]
!!VRy-98&x1=59:S4; [火系]
!!VRy-96&x1=60:S3; [蛊惑]
!!VRy-98&x1=60:S1; [气系]
!!VRy-96&x1=61:S3; [失忆]
!!VRy-98&x1=61:S8; [水系]
!!VRy-96&x1=62:S2; [失明]
!!VRy-98&x1=62:S4; [火系]
!!VRy-96&x1=63:S3; [瞬移]
!!VRy-98&x1=63:S8; [水系]
!!VRy-96&x1=64:S2; [清障]
!!VRy-98&x1=64:S8; [水系]
!!VRy-96&x1=65:S4; [镜像]
!!VRy-98&x1=65:S8; [水系]
!!VRy-96&x1=66:S4; [招火]
!!VRy-98&x1=66:S4; [火系]
!!VRy-96&x1=67:S4; [招土]
!!VRy-98&x1=67:S2; [土系]
!!VRy-96&x1=68:S4; [招水]
!!VRy-98&x1=68:S8; [水系]
!!VRy-96&x1=69:S4; [招气]
!!VRy-98&x1=69:S1; [气系]
************魔法等级类型分类结束**********************
*************英雄升级触发开始*************************
!?HL-1; 英雄升级时触发 [Start of level-up trigger for EE]
!!UN:P103/1; 打开鹰眼术加强I开关
!!HE-1:S11/?v901; 获取当前英雄鹰眼术等级,保存至v901
!!FU&v901=0:E; 鹰眼术级别为0时终止
!!HE-1:A2/0/?y-2/?y-3; 检查英雄的魔法书,魔法书总数量存入y-2,已装备的数量存入y-3
!!HE-1:B0/?z70; 获取英雄名字,保存至z70
!!HE-1:R2/?y-1; 获取英雄性别保存至y-1
!!VRz-3&y-1=0:S^他^; 如果英雄是男性,z-3赋值为"他"
!!VRz-3&y-1=1:S^她^; 如果英雄是女性,z-3赋值为"她"
!!IF&y-3=0:M^%Z70 可以通过鹰眼术学习一种魔法, 但 %Z-3 没有魔法书来记录它。^;如果英雄没有装备魔法书时显示的文本
!!FU&y-3=0:E; 英雄未装备魔法书时终止
!!VRv903:S0; [reset] v903赋值为0-变量复位
!!VRv904:S0; v904赋值为0-变量复位
!!HE-1:O?v908; 获取当前英雄颜色存入v908
!!OW&v908<>-1:Iv908/?v909; 当前英雄颜色不等于-1时,该颜色的控制者存入v909
!!VRv910:S0; [assume AI] v910赋值为0,用来代表AI
!!VRv910&v908<>-1/v909=0:S1; 当前英雄颜色不等于-1,且属于人类玩家控制时,v910赋值为1,
** prepare strings for male/female
!!VRz71&y-1=0:S^他^; [he: z71] z71赋值=他
!!VRz72&y-1=0:S^他^; [He: z72] z72赋值=他
!!VRz71&y-1=1:S^她^; [she: z71] z71赋值=她
!!VRz72&y-1=1:S^她^; [She: z72] z72赋值=她
!!VRz73&y-1=0:S^他的^; [his: z73] z73赋值=他的
!!VRz73&y-1=1:S^她的^; [her: z73] z73赋值=她的
!!HE-1:S7/?y-4; 获取当前英雄智慧术等级,保存至y-4
!!VRy-5:Sv901; 给y-5赋值为v901,901即之前获取的鹰眼术等级
!!VRy-5:+1; 给y-5加1,
!!VRy-5&y-5=4/y-4<2:S3; 当鹰眼术等级为3,智慧术为初级,y-5赋值为3
!!VRy-5&y-5=3/y-4<1:S2; 当鹰眼术等级为2,没有智慧术时,y-5赋值为2
!!FU654&y-5=2:P1/903; y-5=2时,获取一级魔法至v903
!!FU654&y-5=3:P2/903; y-5=3时,获取二级魔法至v903
!!FU654&y-5=4:P3/903; y-5=4时,获取三级魔法至v903
!!FU654&y-5=2:P2/904; y-5=2时,获取二级魔法至v904
!!FU654&y-5=3:P3/904; y-5=3时,获取三级魔法至v904
!!FU654&y-5=4:P4/904; y-5=4时,获取四级魔法至v904
!!FU656&v903=999/v904=999/y-5=4:P; 魔法=999,鹰眼术等级为3级时执行函数
!!FU&v903=999/v904=999/y-5=4:E; 魔法=999,鹰眼术等级为3级时,函数终止
!!FU655&y-5=2:P1; 鹰眼术等级为1级时,执行函数655
!!FU655&y-5=3:P2; 鹰眼术等级为2级时,执行函数655
!!FU655&y-5=4:P3; 鹰眼术等级为3级时,执行函数655
**********英雄升级触发结束*********************************
**********弹出魔法学习对话框*******************************
!?FU654; [Function for launching spell loop]
!!VRv1:S0; v1赋值为0,变量复位
!!DO657/2/2/1:Px1; 调用函数触发器,函数编号657,起始值2,结束值2,增量1,x1魔法等级
!!VRvx2&v1>99:S999; v1大于99时,vx2赋值为999
!!VRvx2&v1<99:Sy-99; v1小于99时,Vx2赋值为y-99,y-99=魔法编号
** End of Function for launching spell loop
!?FU655; [Function for passing spells and displaying messages]
** prepare strings
!!VRz-1&x1=1:S^一^; z-1赋值
!!VRz-2&x1=1:S^二^; z-2赋值
!!VRz-1&x1=2:S^二^; z-1赋值
!!VRz-2&x1=2:S^三^; z-2赋值
!!VRz-1&x1=3:S^三^; z-2赋值
!!VRz-2&x1=3:S^四^; z-2赋值
** left and right available
!!IF&v910=1/v903<>999/v904<>999:Q2/9/v903/9/v904/7^{鹰眼术}
借助鹰眼术的力量,%Z70 学习了一种魔法!选择你要学习的魔法。^;
!!IF&v910<>1/v903<>999/v904<>999:V2/0; AI会挑高级的魔法
!!HE-1&2/v903<>999/v904<>999:Mv903/1; 学左侧的魔法
!!HE-1&-2/v903<>999/v904<>999:Mv904/1; 学右侧的魔法
** only left available 只剩左侧魔法可以学,
!!IF&v910=1/v903<>999/v904=999:Q2/9/v903/1^{鹰眼术}
%Z70 已经学会了所有%Z-2级魔法,因此%Z71只能学习一个%Z-1级魔法!^;
!!HE-1&v903<>999/v904=999:Mv903/1; 给予魔法
** only right available 只剩右侧魔法可以学
!!IF&v910=1/v903=999/v904<>999:Q2/9/v904/1^{鹰眼术}
%Z70 已经学会了所有%Z-1级魔法,因此%Z71只能学习一个%Z-2级魔法!^;
!!HE-1&v903=999/v904<>999:Mv904/1; [learn spell] 给予魔法
!!IF&v910=1/v903=999/v904=999:Q2/20/36/1^{鹰眼术}
%Z70 已经学会了所有%Z73的{鹰眼术}和智慧术提供的魔法!%Z72也许可以在稍后使用它……^; **学完所有未禁的魔法后**
**************对话显示结束*******************************************
**************魔法循环函数开始***************************************
!?FU657; [Spell loop] 魔法循环函数
!!FU$spell$:Px1/x1/0/0/1/0;
!!HE-1:M=y-99/1;
!!VRx16&1:-1;
!!VRv1:+1;
!!VRx16&v1>100:+1;
*************魔法学习函数结束****************************************
****************全剧终***********************************************
[ 本帖最后由 fastarrow 于 2010-11-28 11:55 编辑 ] |
评分
-
1
查看全部评分
-
|