- 积分
- 9246193
- 威望
- 181
- 魅力
- 183
- 经验
- 9232934
- 热心度
- 17
- 注册时间
- 2005-11-5
- 最后登录
- 2025-4-20
- 主题
- 569
- 回帖
- 5784
- 精华
- 42
- 阅读权限
- 200
成长值: 32710
TA的每日心情 | 无聊 2020-5-27 00:09 |
---|
签到天数: 24 天 连续签到: 2 天 [LV.4]狂狼人

管理员
精灵奇侠
  
- 积分
- 9246193
   
|
发表于 2009-8-13 13:05:44
|
显示全部楼层
时间关系,以下脚本只是做了初步测试,你将脚本内容复制到Chaser的“转换祭坛(from Heros)-”这个脚本中,重新游戏,看看是不是能够起作用?我修改后进地图没任何问题,但不知道转换祭坛的位置,所以无法测试是否有效。修改前请做好地图备份。- ZVSE
- !#MCv2391:S@once@; init macros (= other names) for the eight used vars
- !#MCv2393:S@weekday@;
- !#MCv2371:S@monday@; !#VR$monday$:S1; init macros and values for weekdays
- [Check version of ERM to see if it's current enough]
- [Display warning message if it isn't]
- !#IF:V1/0;
- !#UN:V?v8/?v9;
- !#IF&v8<358:V1/1;
- !#IF&v9<280:V1/1;
- !#IF&1:M^{警告:版本过时}
- 抱歉,你的[wiki]WoG[/wiki]和/或ERM版本太低,不能使用{转换祭坛脚本v1.3}。
- 请更新文件。^;
- !#UN:P14/1;
- [Check if script is enabled: v1]
- !#UN:P14/?v1;
- [Set up right-click hint text for Altar objects]
- !#VRz451&v1=1:S^转换祭坛^;
- !#VRz452&v1=1:S^转换祭坛(已访问)^;
- !#VRz453&v1=1:S^转换祭坛(未访问)^;
- !#HT63/20&v1=1:P0/451;
- !#HT63/20&v1=1:P1/452;
- !#HT63/20&v1=1:P2/453;
- ----------------------------------------------------------------------------------------
- !?TM2&$weekday$=$monday$/$once$=1; [Timer triggers on day 1 each week]
- !!UN:P14/?y-1; [Check if script is enabled: y-1]
- !!FU&y-1=0:E; [Exit if script isn't enabled]
- [Store number of Altars of Transformation on map in y-2]
- !!UN:U63/20/?y-2;
- [Call function 18002 to reset all Altar text]
- !!VRv2:S-1; [Initialize v2 to -1 to work correctly with new faster UN:U syntax]
- !!DO18002/1/y-2/1:P;
- ----------------------------------------------------------------------------------------
- [Start of function to reset all Altar of Transformation right-click text]
- [This function also sets PM commands to attract AI to Altar objects]
- [This function also resets the Alter's control word to allow visiting]
- !?FU18002;
- [Get coordinates of next Altar into v2/v3/v4]
- !!UN:U63/20/-1/2;
- [Reset Altar text unless Altar hasn't yet been visited]
- [The N number is also used to determine if the Altar may be visited]
- !!PO2:N?y1;
- !!PO2&y1>0:N2;
- [Set Altar to attract AI]
- !!PM2:V1;
- ----------------------------------------------------------------------------------------
- !?OB63/20; [Triggers when any "Lightning Altar" is visited]
- ** vars used
- ** v1 - answer for radioboxes
- ** y-19 : current number of spell points
- ** y-20 - y25: invested spell points
- ** y-1 : chance to get what you want
- ** y-2 : selected town type
- ** y-3 : random town type
- !!UN:P14/?y-1; [Check if script is enabled: y-1]
- !!FU&y-1=0:E; [Exit if script isn't enabled]
- !!VRv1:S0;
- !!PO998:N?y-90; // get current PO:N value to y-90;
- !!IF&y-90=1/1000:M^你爬上祭坛的高处,但是这些能量仅仅发
- 出了几声响动,好像它们已经被用光了。
- 下个礼拜再来吧。^; // show message that already visited
- !!FU&y-90=1:E; // Exit function if altar has been visited yet
- !!IF:V209/0 V210/0 V211/0; [Sets flags 209, 210 and 211 to false]
- [Ask if hero wishes to visit the altar and how much of his mana he want to invest, return in v1]
- !!HE-1:I?y-19; // get number of spell points
- !!VRy-20:Sy-19; !!VRy-20&y-19>99:S100; // set y-20 to act. spell points but max. to 100
- !!VRy-21:Sy-20 *3 :4; !!VRy-22:Sy-20 *2 :3; !!VRy-23:Sy-20 :2; !!VRy-24:Sy-20 :3;
- !!VRy-25:Sy-20 *3 :4; !!VRy-26:Sy-20 :10;
- !!IF&1000:M^我们曾在古老的[wiki]神[/wiki]话中听说过这些神秘的祭坛——它们的力量可以
- 将几乎任何一种生物变成另外一种。即使是愚蠢的农夫也可以使用
- 。但是你需要很多的魔法知识去控制这些能量,得到你想要得到的。
- 具体来说,当你输入 100点魔法,转换的概率
- 是 100%;每减少 1点魔法,概率就降低 1%。
- 慢慢地你走近祭坛,在它几步远的地方停下来,这个位置让
- 你能够控制这些能量,但又不会因为太近而把你也转换了。^;
- !!IF&1000/y-20>99:G1/1/0/114013/114034/114035/114036/114037/114038/114039/114040/114021/114022;
- !!IF&1000/y-20<100:G1/1/0/114013/114014/114015/114016/114017/114018/114019/114020/114021/114022;
- !!FU&v1=256:E; // exit if No Transformation is selected
- !!VRy-1&v1=1:Sy-20; !!VRy-1&v1=1/y-20>99:S100; // 100 SP or max Mana
- !!VRy-1&v1=2:Sy-21; !!VRy-1&v1=4:Sy-22; !!VRy-1&v1=8:Sy-23; !!VRy-1&v1=16:Sy-24; !!VRy-1&v1=32:Sy-25;
- !!VRy-1&v1=64:Sy-26; !!VRy-1&v1=128:S0; // invested mana = chance
- !!VRy-98:Sy-19 -y-1; // get new mana (total - invested)
- !!HE-1&1000:Iy-98; // decrease mana of visiting hero if he is no AI
- !!VRy-1&-1000:S100; // AI has a 100 % chance to convert without mana costs
- [Set Altar right-click text to show it has been visited this week]
- [This value also determines if the Altar may be visited or not]
- !!PO998:N1;
- ** ask for the town type you want
- !!IF&1000/y-1>0:G1/1/0/114033/114023/114024/114025/114026/114027/114028/114029/114030/114031/114032;
- !!VRy-2&v1=1:S0; !!VRy-2&v1=2:S1; !!VRy-2&v1=4:S2; !!VRy-2&v1=8:S3; !!VRy-2&v1=16:S4; !!VRy-2&v1=32:S5;
- !!VRy-2&v1=64:S6; !!VRy-2&v1=128:S7; !!VRy-2&v1=256:S8; !!VRy-2&v1=512:S9;
- !!HE-1&-1000:B2/?y-99; !!VRy-2&-1000:Sy-99 :2; // set town to hero's native town if AI visits
- [If hero visits altar, display this message]
- !!VRz-1:S^在神秘的力量吸引下,你的部队飞向祭坛。
- 它们围绕着巨大的闪电旋转,最后,它们变成了另一种生物。
- ^; // visting altar text
- !!VRz-5:S^转换祭坛^; // "Altar of transformation"
- !!VRz-2:S^..\data\p\s014_altar.jpg^;
- !!UN:J8/2/-2; [Check if file z-2 is present in Data\s folder: Flag 1=0 if file missing]
- !!IF:D7/-1/0/0/-2/0/0/0/-5/0/0/0/0/0/0/0; [Set up custom dialogue box]
- !!IF:F7/0/0/0/0/0; [Disable Cancel button]
- !!IF&1/1000:E1/7; [Display Custom Dialogue]
- !!IF&-1/1000:M^在神秘的力量吸引下,你的部队飞向祭坛。
- 它们围绕着巨大的闪电旋转,最后,它们变成了另一种生物。
- ^; // if picture not exists show usual message
- !!HE-1&1000:Pv998/v999/v1000; // make teleport sound
- !!VRy-3:S0 R9; !!VRy-3&y-3=y-2:S0 R9; // random town type (second dice if random town = selected town)
- !!DO18003/0/6/1:Py-2/y-1/y-3; // call transform-routine for each slot
- [After transformation, display this message plus second message if appropriate]
- !!IF&1000:M^祭坛能量消散,周围一片寂静。
- 十分钟后,第一批生物开始缓慢的移动……
- 过了一会儿,你带着新部队离开了祭坛……^;
- !!IF&210:M^因为是没有肉体的生命,[wiki]鬼[/wiki]魂保持着原来的形态。^; // show no-ghost-transformation message
- !!IF&209/-211/1000:M^部队中强大的龙没有发生变化!^;
- !!IF&211/-209/1000:M^部队中[wiki]神的象征[/wiki]没有发生变化!^;
- !!IF&209/211/1000:M^部队中强大的龙和深的象征没有发生变化!^;
- !!PM998:V0; [Set Altar to tell AI it has been visited this week]
- ----------------------------------------------------------------------------------------
- [Start of function to convert each creature stack to new town type (x1)]
- !?FU18003;
- ** x1 = desired town
- ** x2 = chance to convert to target town
- ** x3 = random town
- ** x16 = current stack
- ** y1 = old monster type
- ** y2 = level
- ** y3 = number of monsters
- [Stores monster type found in hero's slot x16 in variable y1, number in y3]
- !!HE-1:C0/x16/?y1/?y3;
- !!FU&y1<0:E; // exit if slot is empty
- !!MA:Ly1/?y2; // Store creature's level in y2
- [Set correct level for higher-level creatures]
- !!VRy2&y1>=150/y1<=158|y1=134:S7; [Level 8 WoG creatures and Faerie Dragons]
- !!VRy2|y1=132/y1=133/y1=135/y1=160/y1=161/y1=162/y1=163/y1=196:S99; [Neutral dragons & Emissaries]
- !!VRy2&y1=159:S99; // do not convert ghosts
- !!UN:P67/?y10; // check if neutral town is activated
- !!VRy2&y10=1/y1=135:S6; // if yes set monster Level for Rust dragon to L7
- [If creature is level 8 or less, convert it with Function 18004]
- !!FU18004&y2<=7:Py1/y2/y3/x16/x1/x2/x3; // give old type / level / number / slot / new town type / chance to convert correct / random town
- [If creature is powerful neutral dragon (except Faerie), set flag 209 to true]
- !!IF|y1=132/y1=133/y1=135/y1=196:V209/1;
- !!IF&y10=1/y1=135:V209/0; // not if neutral town activated and creature = rust dragon
- [If creature is a God's Representative (level 12), set flag 211 to true]
- !!IF&y1>=160/y1<=163:V211/1;
- [If creature is a ghost]
- !!IF&y1=159:V210/1; // ghosts must not be transfered
- ----------------------------------------------------------------------------------------
- [Start of function to convert level 7 or lower creatures]
- !?FU18004;
- ** x1=old type
- ** x2=level
- ** x3=number
- ** x4=slot number
- ** x5=new town type (desired)
- ** x6=chance for new town type
- ** x7=random town
- ** y3=upgraded (1) or not (0)
- ** y4 = health of one old creature
- ** y5 = type for new creature
- ** y6 = health of one new creature
- ** y7 = total health of old creatures
- ** y8 = number of new creatures
- ** y9 = real town (random or desired if it has a good chance)
- [Check if creature is upgraded - store result in y3 - odd numbers are upgraded]
- [A value of 1 means upgraded]
- !!VRy3:Sx1 %2;
- [Fix upgrade exceptions (Neutrals plus Elementals) - store in y3]
- [This is what the creature is counted as for purposes of]
- [converting to another creature type of the same level]
- [Switch to Non-Upgraded: Earth Elementals(113),Water Elementals(115),Diamond Golems(117)]
- [Sharpshooters(137),Peasants(139),Mummies(141),Rogues(143),Ghosts(159)]
- [Earth Messengers(165),Air Messengers(167),Lava Sharpshooters(171),Sorceress(193)]
- !!VRy3|x1=113/x1=115/x1=117/x1=137/x1=139/x1=141/x1=143/x1=159/x1=165/x1=167/x1=171/x1=193:S0;
- [Switch to Upgraded: Halflings(138),Boars(140),Nightmares(172),Gorynyches(168)]
- [Sylvan Centaurs(192),Werewolves(194),Enchanter(136)]
- !!VRy3|x1=138/x1=140/x1=172/x1=168/x1=192/x1=194/x1=136:S1;
- !!UN:P67/?y10; // check if neutral town is activated in Wog-Options; if yes:
- !!VRy3&y10=1/x1=138|x1=140/x1=194/x1=193/x1=195:S0;// Switch to Non-Upgraded: Halflings(138),Boars(140),Werewolves(194),Sorceress(193),Hell Steed(195)
- !!VRy3&y10=1/x1=167|x1=143/x1=135/x1=142/x1=144:S1; // Switch to Upgraded: Air Messengers(167),Rogues(143),Nomad(142),Troll(144),Rust Dragons(135)
- ** get real new town
- !!VRy99:S0 R100; // random 0-100
- !!VRy9:Sx5; !!VRy9&y99>x6:Sx7; // set y9 to wanted new town type; set it to the random if odds are bad
- ** get new type
- !!VRy3|y3<0/y3>1:S0; // correction for upgraded: may be only 0 or 1 (sometime - whyever - it isn't set correct)
- !!UN&y9<9/x2<7:Ty9/x2/y3/?y5; // get new monster type to y5 (town y9, Lvl x2, upgr. y3) (if no neutral creature and Level 1-7)
- !!VRy5&x2=7:Sy9 +150; // L8-Units (town typ + 150)
- !!FU18005&y9=9:Px2/y3; // If town type is 9 (Neutral), calculate creature with function 18008; return in v1
- !!VRy5&y9=9:Sv1; // set new monster type to v1 (if neutral)
- !!VRy1:S0 R1; // random number
- !!VRy5&y5=60/y1=1:S141; [For Necropolis, 50% chance of a Mummy instead of a Wight]
- !!VRy5&y5=19/y1=1:S192; [For Rampart, 50% chance of a Sylvan Centaur instead of a Grand Elf]
- ****** conversion by health again disabled by samot ************
- *!MA:Px1/?y4; // get Health of original monsters to y4
- *!MA:Py5/?y6; // get Health of new monsters to y6
- *!VRy7:Sy4 *x3; // calculate total health of original creature (health * number)
- *!VRy8:Sy7 :y6; // calculate number of new monsters (total org. health : new health)
- *!VRy9:Sy7 %y6; // calculate reminder of division
- *!VRy10:Sy6 :2; // half of new health
- *!VRy8&y9>y10:+1; // if reminder > half of new health add 1 (mathem. round at 0,5)
- !!HE-1:C0/x4/y5/d/0/3; // change creatures in slot x4 to type y5 number y8, don't change their experience
- ----------------------------------------------------------------------------------------
- [Start of function to calculate Neutral creatures, Return in v1]
- !?FU18005;
- ** x1 = Level
- ** x2 = upgr. (1) or non upgr (0)
- [Calculate Neutral creature]
- !!VRy2:S1 R1; [Random number 1..2: y2]
- !!VRy3:S1 R2; [Random number 1..3: y3]
- !!VRv1&x1=0/x2=0:S138; [Halfling] - Level 1
- !!VRv1&x1=0/x2=1:S138; [Halfling] - Level 1 Upgraded
- !!VRv1&x1=1/x2=0:S143; [Rogue] - Level 2
- !!VRv1&x1=1/x2=1:S140; [Boar] - Level 2 Upgraded
- !!VRv1&x1=2/x2=0:S141; [Mummy] - Level 3
- !!VRv1&x1=2/x2=1/y2=1:S142; [Nomad] - Level 3 Upgraded
- !!VRv1&x1=2/x2=1/y2=2:S173; [Santa Gremlin] - Level 3 Upgraded
- !!VRv1&x1=3/x2=0:S137; [Sharpshooter] - Level 4
- !!VRv1&x1=3/y2=1/x2=1:S194; [Werewolf] - Level 4 Upgraded
- !!VRv1&x1=3/y2=2/x2=1:S144; [Troll] - Level 4 Upgraded
- !!VRv1&x1=4/y3=1/x2=0:S170; [Arctic Sharpshooter] - Level 5
- !!VRv1&x1=4/y3=2/x2=0:S171; [Lava Sharpshooter] - Level 5
- !!VRv1&x1=4/y3=3/x2=0:S116; [Gold Golems] - Level 5
- !!VRv1&x1=4/x2=1:S169; [War Zealot] - Level 5 Upgraded
- !!VRv1&x1=5/y3=1/x2=0:S136; [Enchanter] - Level 6
- !!VRv1&x1=5/y3=2/x2=0:S193; [Sorceress] - Level 6
- !!VRv1&x1=5/y3=3/x2=0:S117; [Diamond Golems] - Level 6
- !!VRv1&x1=5/y2=1/x2=1:S172; [Nightmare] - Level 6 Upgraded
- !!VRv1&x1=5/y2=2/x2=1:S195; [Hell Steed] - Level 6 Upgraded
- !!VRv1&x1=6/x2=0:S168; [Gorynych] - Level 7
- !!VRv1&x1=6/x2=1:S168; [Gorynych] - Level 7 Upgraded
- !!VRv1&x1=7:S134; [Faerie Dragon] - Level 8
- ** End of Script **
复制代码 |
|