独孤求败 发表于 2012-5-13 20:14:13

【已解决】八级生物工会的打开方式为右键城堡图片打开

目前是鼠标右键单击议事厅打开,求改为右键城堡打开。

因为这个脚本和建筑师的脚本打开有冲突。

ZVSE
ERMS_ScriptDate=12.1(January).2007
_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
****************************************************************
********************* New Upgrades *****************************
**** done by: **************************************************
**** Acid Dragon (building, dwelling and modifying parts) ******
**** Timothy Pulver (upgrading part) ***************************
**** special thanks to Thomas Franz for the PO:V3 bit ;) *******
****************************************************************
* Variables Used: v9500-v9600 (not all of them, there exist some irregullar gaps)
* Functions Used: FU9500-FU9513
* z Variables Used: z943-z959, z199500-z199604
!#VRv9500:S-1;
!#VRv9520:S0;
!#VRv9562:S0;
!?TM19&v9562=0;
!!UN:P555/?v1;
!!FU9508&v1=1:P;
!?FU9508;
!#UN:P555/?v1;
!#UN:P67/?v2;
!#UN&v2=1/v1=1:P67/0;
!#UN:P125/?v2;
!#UN&v2=1/v1=1:P125/0;
!!MA:U29/-1; *Tower*
!!MA:U138/-1; *Tower*
****************************************************************
************************ Upgrading Part ************************
****************************************************************
!?CM1;
!!UN:P555/?v1;
!!FU9500&v1=1:P;
!?FU9500;
!!UN:P555/?v1;
!!UN:P173/?v4;
!!UN:P37/?v3;
!!MA&v1=1/v4=1/v3<>1:U29/173; *Tower*
!!MA&v1=1/v4=1/v3=1:U29/138; *Tower*
!!MA&v1=1/v4=1/v3=1:U138/29; *Tower*
!!UN:P900/?v5;
!!MA&v1=1/v4=1/v3<>1/v5=0:U29/138; *Tower*
!!MA&v1=1/v4=1/v3<>1/v5=0:U138/29; *Tower*

!!CA-1:T?y1;
!!CM:I?y2;
!!CA-1:P?v9530/?v9531/?v9532;

!!CA-1:P?y3/?y4/?y5;
!!POy3/y4/y5:O?y6;
!!FU9502&y6>0/y6<8:Py1;

!!FU9501&y2>=115/y2<=121:Py1/y2;
!!FU9501&y2>=140/y2<=146:Py1/y2;
------------------------------------------------------------------------------------------------------------------


!?FU9501;
!!VRy1:S-1;!!VRy2:S-1;
!!VRy1&x2>=115/x2<=121:Sx2 -115;
!!VRy2&x2>=140/x2<=146:Sx2 -140;

!!CA-1:H0/?y3 H1/?y4;
!!HEy3&y3>=0/y1>=0:C0/y1/?y5/d;
!!CA-1&y3<0/y1>=0:M2/y1/?y5/d;
!!HEy4&y4>=0/y2>=0:C0/y2/?y5/d;
!!FU&y5<0:E;
!!MA:Uy5/?y7;

!!VRy6&y7=-1/y5<=111:Sy5 %2;
!!VRy7&y7=-1/y5<=111/y6=0:Sy5 +1;

!!VRy7&y7=-1/y5=112:S127;
!!VRy7&y7=-1/y5=113:S125;
!!VRy7&y7=-1/y5=114:S129;
!!VRy7&y7=-1/y5=115:S123;
!!VRy7&y7=-1/y5=118:S119;
!!VRy7&y7=-1/y5=120:S121;
!!VRy7&y7=-1/y5=130:S131;
!!VRy6:S1;
!!VRy6&y7>=0:S0;
!!FU|y6=1/y7=-2:E;
!!MA:Ly5/?v9502;
!!VRy8:S37 +v9502;
!!CA-1:B3/y8;
!!CA-1&-1:B3/19;
!!CA-1&-1:B3/25;
!!FU&-1:E;
!!POv9530/v9531/v9532:V3/?y-2; get flag for current town
!!VRy-2:&64; test if the bit 7 is set
!!FU&y-2=0:E; Exit if there's no special structure in town
!!VRv9500:Sy5;
!!MA:Oy5/?v9501;
!!FU&v9501<>x1:E;
!!VRv9510:Sy7;
!!MA:Oy7/?v9511;
!!MA:Ly7/?v9512;

!!CA-1:P?y13/?y14/?y15;
!!POy13/y14/y15:B0/?y16 B1/?y17 O?y18;
!!VRy9:Sy18 -1;
!!UN&v9502<>y9:Tx1/v9502/0/?y18;
!!UN&v9502<>y9:Tx1/v9502/1/?y19;
!!VRy10&v9502<>y9:Sy18 +1;
!!VRy11&v9502<>y9:Sy19 +1;
!!VRy12&v9502<>y9:Sv9502 +1;
!!POy13/y14/y15&v9502<>y9:B0/y10;
!!POy13/y14/y15&v9502<>y9:B1/y11;
!!POy13/y14/y15&v9502<>y9:Oy12;

!!UN:Tx1/v9502/0/y5;
!!UN:Tx1/v9502/1/y7;
------------------------------------------------------------------------------------------------------------------

!?FU9502;
!!CA-1:P?y1/?y2/?y3;

!!POy1/y2/y3:B0/?y4 B1/?y5 O?y6;
!!VRy4&y4>0:-1;
!!VRy5&y5>0:-1;
!!VRy6&y6>0:-1;
!!UN&y4>=0:Tx1/y6/0/y4;
!!UN&y5>=0:Tx1/y6/1/y5;
!!FU&v9500<0:E;

!!MA:Ov9500/v9501;

!!MA:Ov9510/v9511;

!!VRv9500:S-1;

************************* set new upgrades ***********************************
!#UN:P555/?v1;
!#MA&v1=1:U13/150; *Castle Level 8*
!#MA&v1=1:U27/151; *Rampart Level 8*
!#MA&v1=1:U41/152; *Tower Level 8*
!#MA&v1=1:U55/153; *Inferno Level 8*
!#MA&v1=1:U69/154; *Necropolis Level 8*
!#MA&v1=1:U83/155; *Dungeon Level 8*
!#MA&v1=1:U97/156; *Stronghold Level 8*
!#MA&v1=1:U111/157; *Fortress Level 8*
!#MA&v1=1:U131/158; *Conflux Level 8*

!#MA&v1=1:O169/0;War Zealot > Castle
!#MA&v1=1:O192/1;Sylvan Centaurs > Rampart
!#MA&v1=1:O137/1;Sharpshooters > Rampart
!#MA&v1=1:O170/1;Arctic Sharpshooters > Rampart
!#MA&v1=1:O171/1;Lava Sharpshooters > Rampart
!#MA&v1=1:O138/2;Halflings > Tower
!#MA&v1=1:O173/2;Santa Gremlin > Tower
!#MA&v1=1:O116/2;Gold Golem > Tower
!#MA&v1=1:O117/2;Diamond Golem > Tower
!#MA&v1=1:O193/2;Sorceresses > Tower
!#MA&v1=1:O136/2;Enchanters > Tower
!#MA&v1=1:O159/4;Ghosts > Necropolis
!#MA&v1=1:O141/4;Mummies > Necropolis
!#MA&v1=1:O168/7;Gorynyches > Fortress
!#MA&v1=1:O164/8;Fire Messengers > Fortress
!#MA&v1=1:O165/8;Earth Messengers > Fortress
!#MA&v1=1:O166/8;Air Messengers > Fortress
!#MA&v1=1:O167/8;Water Messengers > Fortress
* changing statistics:


!?OB35;
!!UN:P555/?v2;
!!FU&v2<>1:E;
!!MA:U127/166; *Conflux*
!!MA:U125/165; *Conflux*
!!MA:U129/164; *Conflux*
!!MA:U123/167; *Conflux*
!!MA:U09/169; *Castle*
!!MA:U19/192; *Rampart*
!!UN:P37/?v3;
!!MA&v2=1/v3<>1:U29/173; *Tower*
!!MA&v2=1/v3=1:U29/138; *Tower*
!!MA&v2=1/v3=1:U138/29; *Tower*
!!UN:P900/?v5;
!!MA&v2=1/v3<>1/v5=0:U29/138; *Tower*
!!MA&v2=1/v3<>1/v5=0:U138/29; *Tower*
!!MA:U33/116; *Tower*
!!MA:U59/141; *Necropolis*
!!MA:U116/117; *Tower*
!!MA:U137/170; *Rampart*
!!MA:U136/193; *Tower*
!!MA:U170/171; *Rampart*
!!MA:U193/136; *Tower*
!!MA:U195/172; *Neutral*
!!MA:U111/168; *Fortress*
!!MA:U168/157; *Fortress Level 8*

!$OB35;
!!UN:P555/?v2;
!!FU&v2<>1:E;
!!UN:P173/?v6;
!!UN:P174/?v7;
!!MA&v6<>1/v7<>1:U127/-1; *Conflux*
!!MA&v6<>1/v7<>1:U125/-1; *Conflux*
!!MA&v6<>1/v7<>1:U129/-1; *Conflux*
!!MA&v6<>1/v7<>1:U123/-1; *Conflux*
!!MA&v6<>1/v7<>1:U09/-1; *Castle*
!!MA&v6<>1/v7<>1:U19/-1; *Rampart*
!!MA&v6<>1/v7<>1:U29/-1; *Tower*
!!MA&v6<>1/v7<>1:U138/-1; *Tower*
!!MA&v6<>1/v7<>1:U33/-1; *Tower*
!!MA&v6<>1/v7<>1:U59/-1; *Necropolis*
!!MA&v6<>1/v7<>1:U116/-1; *Tower*
!!MA&v6<>1/v7<>1:U137/-1; *Rampart*
!!MA&v6<>1/v7<>1:U136/-1; *Tower*
!!MA&v6<>1/v7<>1:U170/-1; *Rampart*
!!MA&v6<>1/v7<>1:U193/-1; *Tower*
!!MA&v6<>1/v7<>1:U195/-1; *Neutral*
!!MA:U111/157; *Fortress Level 8*
!!MA&v6<>1/v7<>1:U168/-1; *Fortress Level 8*
*****************************************************************************
************** the special structure in a town used for upgrading ***********
*****************************************************************************
!?CM1; (trigger on clicking in town screen)
!!UN:P555/?v2;
!!FU&v2<>1:E;
******* auto-destructing the special building if there's no vilage hall *****
* it's up here so as to skip the player/owner check and happens after
* just any kind of click after destroying the vilage hall (like exiting)
!!CA-1:B3/10;    check if there's a vilage hall
!!CA-1&-1:B3/11; check town hall
!!CA-1&-1:B3/12; check city hall
!!CA-1&-1:B3/13; check capitol
* if something is built somewhere a flag +1 had to happen
!!POv9530/v9531/v9532&-1:V3/?y-2; get flag for current town
!!VRy-2&-1:&64; test if the bit 7 is set
!!POv9530/v9531/v9532&-1/y-2=64:V3/?y-3; get flag for current town
!!VRy-3&y-2=64/-1:&-65; unset bit 7
!!POv9530/v9531/v9532&-1/y-2=64:V3/y-3; once again set flag
!!CA-1:O?y-2; (owner of the town: y-2)
!!OW:C?v9540;   (current player: y-3)
!!FU&y-2<>v9540:E; (Exit if player doesn't own town)
!!CM:S?y1; (Get what type of click)
!!FU&y1<>14:E; (exit if not right click)
!!CM:I?y1;         (Get what type of click)
!!FU&y1<10:E;      (abort if not town hall type)
!!FU&y1>13:E;      (abort if not town hall type)
!!CA-1:T?y2;         (get town type)
!!CM:R0;             (Disable normal popup)
!!CA-1:B3/13;      (if capitol built - reenable standard text)
!!CM&1:R1;
!!VRv4:S0;
!!VRv5:S0;
!!VRv6:S0;
!!CA-1:B3/9;(ckeck if there's a castle)
!!VRv4&1:S1;(set a helping var)
!!CA-1:B3/8;(check for citadel)
!!VRv5&1:S1;
!!CA-1:B3/7;(check for fort)
!!VRv6&1:S1;
!!CM&v4=0/v5=0/v6=0:R1;   (if no fort, citadel or castle reenable standard text)
!!UN:P4/?y2;   check if town demolition is enabled
!!CM&y2=1:R0;   if it is not enabled - disable any standard text
************ get current resources *************
!!OW:Rv9540/6/?v9541;    1 - gold
!!OW:Rv9540/0/?v9542;    2 - wood
!!OW:Rv9540/2/?v9543;    3 - ore
!!OW:Rv9540/1/?v9544;    4 - mercury
!!OW:Rv9540/3/?v9545;    5 - sulfur
!!OW:Rv9540/4/?v9546;    6 - crystal
!!OW:Rv9540/5/?v9547;    7 - gems
!!OW:Rv9540/7/?v9548;    8 - mithril
************ set texts ********************
!!VRz946:Sz199601; already build
!!VRz947:Sz199602; can build
!!VRz948:Sz199603; not enough resources
!!VRz949:Sz199604; need to have a castle
!!VRz945:S^^;
!!VRz950:S^^;
!!CA-1:T?y2; check town type
************************ CONFLUX *****************************
!!VRz945&y2=8:Sz199500;                      text before building
!!VRz950&y2=8:Sz199501;                      text after building
!!VRz953&y2=8:Sz199502;                      the name of the graphic
!!VRv9551&y2=8:S20000;                     price in gold
!!VRv9552&y2=8:S30;                        price in crystals
!!VRv9553&y2=8:S15;                        price in gems
!!VRv9554&y2=8:Sv9546;                     second resource amount
!!VRv9555&y2=8:Sv9547;                     third resource amount
!!VRv9556&y2=8:S4;                           second resource is crystal
!!VRv9557&y2=8:S5;                           third resource is gems
************************* CASTLE *****************************
!!VRz945&y2=0:Sz199503;                      text before building
!!VRz950&y2=0:Sz199504;                      text after building
!!VRz953&y2=0:Sz199505;                      the name of the graphic
!!VRv9551&y2=0:S22000;                     price in gold
!!VRv9552&y2=0:S30;                        price in gems
!!VRv9553&y2=0:S30;                        price in ore
!!VRv9554&y2=0:Sv9547;                     second resource amount
!!VRv9555&y2=0:Sv9543;                     third resource amount
!!VRv9556&y2=0:S5;                           second resource is gems
!!VRv9557&y2=0:S2;                           third resource is ore
************************ RAMPART ****************************
!!VRz945&y2=1:Sz199506;                      text before building
!!VRz950&y2=1:Sz199507;                      text after building
!!VRz953&y2=1:Sz199508;                      the name of the graphic
!!VRv9551&y2=1:S20000;                     price in gold
!!VRv9552&y2=1:S25;                        price in crystals
!!VRv9553&y2=1:S40;                        price in wood
!!VRv9554&y2=1:Sv9546;                     second resource amount
!!VRv9555&y2=1:Sv9542;                     third resource amount
!!VRv9556&y2=1:S4;                           second resource is crystal
!!VRv9557&y2=1:S0;                           third resource is wood
************************ TOWER *****************************
!!VRz945&y2=2:Sz199509;                      text before building
!!VRz950&y2=2:Sz199510;                      text after building
!!VRz953&y2=2:Sz199511;                      the name of the graphic
!!VRv9551&y2=2:S25000;                     price in gold
!!VRv9552&y2=2:S30;                        price in gems
!!VRv9553&y2=2:S15;                        price in mercury
!!VRv9554&y2=2:Sv9547;                     second resource amount
!!VRv9555&y2=2:Sv9544;                     third resource amount
!!VRv9556&y2=2:S5;                           second resource is gems
!!VRv9557&y2=2:S1;                           third resource is mercury
************************ INFERNO *****************************
!!VRz945&y2=3:Sz199512;                      text before building
!!VRz950&y2=3:Sz199513;                      text after building
!!VRz953&y2=3:Sz199514;                      the name of the graphic
!!VRv9551&y2=3:S19000;                     price in gold
!!VRv9552&y2=3:S30;                        price in mercury
!!VRv9553&y2=3:S15;                        price in sulfur
!!VRv9554&y2=3:Sv9544;                     second resource amount
!!VRv9555&y2=3:Sv9545;                     third resource amount
!!VRv9556&y2=3:S1;                           second resource is mercury
!!VRv9557&y2=3:S3;                           third resource is sulfur
************************ NECROPOLIS *****************************
!!VRz945&y2=4:Sz199515;                      text before building
!!VRz950&y2=4:Sz199516;                      text after building
!!VRz953&y2=4:Sz199517;                      the name of the graphic
!!VRv9551&y2=4:S21000;                     price in gold
!!VRv9552&y2=4:S25;                        price in mercury
!!VRv9553&y2=4:S35;                        price in wood
!!VRv9554&y2=4:Sv9544;                     second resource amount
!!VRv9555&y2=4:Sv9542;                     third resource amount
!!VRv9556&y2=4:S1;                           second resource is mercury
!!VRv9557&y2=4:S0;                           third resource is wood
************************ DUNGEON *****************************
!!VRz945&y2=5:Sz199521;                      text before building
!!VRz950&y2=5:Sz199522;                      text after building
!!VRz953&y2=5:Sz199523;                      the name of the graphic
!!VRv9551&y2=5:S23000;                     price in gold
!!VRv9552&y2=5:S30;                        price in sulfur
!!VRv9553&y2=5:S35;                        price in ore
!!VRv9554&y2=5:Sv9545;                     second resource amount
!!VRv9555&y2=5:Sv9543;                     third resource amount
!!VRv9556&y2=5:S3;                           second resource is sulfur
!!VRv9557&y2=5:S2;                           third resource is ore
************************ STRONGHOLD *****************************
!!VRz945&y2=6:Sz199524;                      text before building
!!VRz950&y2=6:Sz199525;                      text after building
!!VRz953&y2=6:Sz199526;                      the name of the graphic
!!VRv9551&y2=6:S19000;                     price in gold
!!VRv9552&y2=6:S60;                        price in crystals
!!VRv9553&y2=6:S15;                        price in gems
!!VRv9554&y2=6:Sv9543;                     second resource amount
!!VRv9555&y2=6:Sv9546;                     third resource amount
!!VRv9556&y2=6:S2;                           second resource is ore
!!VRv9557&y2=6:S4;                           third resource is crystal
************************ FORTRESS *****************************
!!VRz945&y2=7:Sz199527;                      text before building
!!VRz950&y2=7:Sz199528;                      text after building
!!VRz953&y2=7:Sz199529;                      the name of the graphic
!!VRv9551&y2=7:S18000;                     price in gold
!!VRv9552&y2=7:S50;                        price in wood
!!VRv9553&y2=7:S20;                        price in sulfur
!!VRv9554&y2=7:Sv9542;                     second resource amount
!!VRv9555&y2=7:Sv9545;                     third resource amount
!!VRv9556&y2=7:S0;                           second resource is wood
!!VRv9557&y2=7:S3;                           third resource is sulfur

********************** check if the building is built ****************
!!VRv9520:S0;
!!POv9530/v9531/v9532:V3/?y-2; get flag for current town
!!VRy-2:&64; test if the bit 7 is set
!!VRv9520&y-2=64:S1; set a check value for 'yes' on the v9520

********************** handle texts on the town screen ***************
!!CA-1:R?y3;
!!VRz945&v9520=0/y3=1:Sz945+z946;
!!VRz945&v9520=0/y3=0/v4=1/v9554>=v9552/v9541>=v9551/v9555>=v9553:Sz945+z947;
!!VRz945&v9520=0/y3=0/v4=1/v9541>=v9551/v9554>=v9552/v9555<v9553:Sz945+z948;
!!VRz945&v9520=0/y3=0/v4=1/v9541>=v9551/v9554<v9552:Sz945+z948;
!!VRz945&v9520=0/y3=0/v4=1/v9541<v9551:Sz945+z948;
!!VRz945&v9520=0/y3=0/v4=0:Sz945+z949;
!!IF&v9520=0:V1/0;
!!IF&v9520=0/y3=1:M1/945;
!!IF&v9520=0/y3=0/v4=1/v9541<v9551:Q2/6/v9551/v9556/v9552/v9557/v9553/1/945;
!!IF&v9520=0/y3=0/v4=1/v9541>=v9551/v9554<v9552:Q2/6/v9551/v9556/v9552/v9557/v9553/1/945;
!!IF&v9520=0/y3=0/v4=1/v9541>=v9551/v9554>=v9552/v9555<v9553:Q2/6/v9551/v9556/v9552/v9557/v9553/1/945;
!!IF&v9520=0/y3=0/v4=1/v9541>=v9551/v9554>=v9552/v9555>=v9553:Q1/6/v9551/v9556/v9552/v9557/v9553/2/945;
!!IF&v9520=0/y3=0/v4=0:M1/945;
!!FU&v9520=0/-1:E;      (exit if player doesn't build)
******************************* building the special structure procedure *************
!!VRv9541&v9520=0/1:Sv9541-v9551;   substract 'price' from 'gold'
!!VRv9554&v9520=0/1:Sv9554-v9552;   substract 'price' from 'second resource amount'
!!VRv9555&v9520=0/1:Sv9555-v9553;   substract 'price' from 'third resource amount'
!!OW&v9520=0/1:Rv9540/6/v9541;      set new gold value
!!OW&v9520=0/1:Rv9540/v9556/v9554;set new second resource
!!OW&v9520=0/1:Rv9540/v9557/v9555;set new third resource
!!VRz10&v9520=0/1:S^..\data\p\BUILDTWN.WAV^;
!!SN&v9520=0/1:Pz10; Play the sound of a new building
!!POv9530/v9531/v9532&v9520=0/1:V3/?y1; get flag for current town
!!VRy1&v9520=0/1:|64; set the structure to 'built' (set bit 7)
!!POv9530/v9531/v9532&v9520=0/1:V3/y1; set flag
!!CA-1&v9520=0/1:R1;    no more building today for this town
!!VRv9520&v9520=0/1:S1; set the helping v9520 because I don't want to re-write the entire code :P
**************************** text if the structure is built **************
!!IF&v9520=1:D3/950/0/0/952/0/0/0/953/0/0/0/0/0/0/0;
!!IF&v9520=1:F3/0/0/0/0/0;
!!IF&v9520=1:E1/3;

***************************************************************************
************ AI building the special structure and upgrading **************
***************************************************************************
!?OB98&-1000; !!FU9504:P; -occur when AI is entering town
!$OB98&-1000; !!FU9504:P; -occur when AI is leaving town
!?FU9504;
!!UN:P555/?v1;
!!FU&v1<>1:E;
***************************** building part ******************************
!!CA998:O?y-2; (owner of the town: y-2)
!!OW:C?v9540;   (current player: y-3)
!!FU&y-2<>v9540:E; (Exit if player doesn't own town)
!!VRv4:S0;
!!CA998:B3/9;(ckeck if there's a castle)
!!VRv4&1:S1;(set a helping var)
;get money
!!OW:Rv9540/6/?v9541;    1 - gold
!!OW:Rv9540/0/?v9542;    2 - wood
!!OW:Rv9540/2/?v9543;    3 - ore
!!OW:Rv9540/1/?v9544;    4 - mercury
!!OW:Rv9540/3/?v9545;    5 - sulfur
!!OW:Rv9540/4/?v9546;    6 - crystal
!!OW:Rv9540/5/?v9547;    7 - gems
!!OW:Rv9540/7/?v9548;    8 - mithril
!!CA998:T?y2; check town type

************************ CONFLUX *****************************
!!VRv9551&y2=8:S15000;                     price in gold
!!VRv9552&y2=8:S30;                        price in crystals
!!VRv9553&y2=8:S15;                        price in gems
!!VRv9554&y2=8:Sv9546;                     second resource amount
!!VRv9555&y2=8:Sv9547;                     third resource amount
!!VRv9556&y2=8:S4;                           second resource is crystal
!!VRv9557&y2=8:S5;                           third resource is gems
************************* CASTLE *****************************
!!VRv9551&y2=0:S16000;                     price in gold
!!VRv9552&y2=0:S30;                        price in gems
!!VRv9553&y2=0:S30;                        price in ore
!!VRv9554&y2=0:Sv9547;                     second resource amount
!!VRv9555&y2=0:Sv9543;                     third resource amount
!!VRv9556&y2=0:S5;                           second resource is gems
!!VRv9557&y2=0:S2;                           third resource is ore
************************ RAMPART ****************************
!!VRv9551&y2=1:S15000;                     price in gold
!!VRv9552&y2=1:S25;                        price in crystals
!!VRv9553&y2=1:S40;                        price in wood
!!VRv9554&y2=1:Sv9546;                     second resource amount
!!VRv9555&y2=1:Sv9542;                     third resource amount
!!VRv9556&y2=1:S4;                           second resource is crystal
!!VRv9557&y2=1:S0;                           third resource is wood
************************ TOWER *****************************
!!VRv9551&y2=2:S17000;                     price in gold
!!VRv9552&y2=2:S30;                        price in gems
!!VRv9553&y2=2:S15;                        price in mercury
!!VRv9554&y2=2:Sv9547;                     second resource amount
!!VRv9555&y2=2:Sv9544;                     third resource amount
!!VRv9556&y2=2:S5;                           second resource is gems
!!VRv9557&y2=2:S1;                           third resource is mercury
************************ INFERNO *****************************
!!VRv9551&y2=3:S14500;                     price in gold
!!VRv9552&y2=3:S30;                        price in mercury
!!VRv9553&y2=3:S15;                        price in sulfur
!!VRv9554&y2=3:Sv9544;                     second resource amount
!!VRv9555&y2=3:Sv9545;                     third resource amount
!!VRv9556&y2=3:S1;                           second resource is mercury
!!VRv9557&y2=3:S3;                           third resource is sulfur
************************ NECROPOLIS *****************************
!!VRv9551&y2=4:S15500;                     price in gold
!!VRv9552&y2=4:S25;                        price in mercury
!!VRv9553&y2=4:S35;                        price in wood
!!VRv9554&y2=4:Sv9544;                     second resource amount
!!VRv9555&y2=4:Sv9542;                     third resource amount
!!VRv9556&y2=4:S1;                           second resource is mercury
!!VRv9557&y2=4:S0;                           third resource is wood
************************ DUNGEON *****************************
!!VRv9551&y2=5:S17000;                     price in gold
!!VRv9552&y2=5:S30;                        price in sulfur
!!VRv9553&y2=5:S35;                        price in ore
!!VRv9554&y2=5:Sv9545;                     second resource amount
!!VRv9555&y2=5:Sv9543;                     third resource amount
!!VRv9556&y2=5:S3;                           second resource is sulfur
!!VRv9557&y2=5:S2;                           third resource is ore
************************ STRONGHOLD *****************************
!!VRv9551&y2=6:S14500;                     price in gold
!!VRv9552&y2=6:S60;                        price in crystals
!!VRv9553&y2=6:S15;                        price in gems
!!VRv9554&y2=6:Sv9543;                     second resource amount
!!VRv9555&y2=6:Sv9546;                     third resource amount
!!VRv9556&y2=6:S2;                           second resource is ore
!!VRv9557&y2=6:S4;                           third resource is crystal
************************ FORTRESS *****************************
!!VRv9551&y2=7:S14000;                     price in gold
!!VRv9552&y2=7:S50;                        price in wood
!!VRv9553&y2=7:S20;                        price in sulfur
!!VRv9554&y2=7:Sv9542;                     second resource amount
!!VRv9555&y2=7:Sv9545;                     third resource amount
!!VRv9556&y2=7:S0;                           second resource is wood
!!VRv9557&y2=7:S3;                           third resource is sulfur

********************** check if the building is built ****************
!!VRv9520:S0;
!!CA998:P?v9530/?v9531/?v9532; get position of the town
!!POv9530/v9531/v9532:V3/?y-2; get flag for current town
!!VRy-2:&64; test if the bit 7 is set
!!VRv9520&y-2=64:S1; set a check value for 'yes' on the v9520

********************** set a flag if the right conditions are met***************
*** NOTE: to make it easier for the AI, it builds as soon as it gets the right resources,
*** no matter if AI built in tis turn or not
!!IF&v9520=0/v4=0:V1/0;
!!IF&v9520=0/v4=1/v9541>=v9551:V1/1;
!!IF&v9520=0/v4=1/v9541<v9551:V1/0;
!!FU&v9520=0/-1:E;      (exit if player doesn't build)
******************************* building the special structure procedure **************
***** NOTE: AI has to have only the right ammount of gold - resources will be substracted
***** (if not enough resources, then take away what AI has), but the building procedure
***** for the AI doesn't depend on them - only on gold.
***** (this is because AI doesn't know it 'needs' the right resources and won't use the
***** marketplace or won't save resources to get them)
***************************************************************************************
***** UPDATE: AI now has to have only about 75% of the gold ammount for human players
***************************************************************************************
!!VRv9541&v9520=0/1:Sv9541-v9551;                substract 'price' from 'gold'
!!VRv9554&v9520=0/1/v9554<v9552:S0;            set '0' for 'second resource amount' (if NOT enough)
!!VRv9554&v9520=0/1/v9554>=v9552:Sv9554-v9552;   substract 'price' from 'second resource amount' (if enough)
!!VRv9555&v9520=0/1/v9555<v9553:S0;            set '0' for 'third resource amount'(if NOT enough)
!!VRv9555&v9520=0/1/v9555>=v9553:Sv9555-v9553;   substract 'price' from 'third resource amount'(if enough)
!!OW&v9520=0/1:Rv9540/6/v9541;      set new gold value
!!OW&v9520=0/1:Rv9540/v9556/v9554;set new second resource
!!OW&v9520=0/1:Rv9540/v9557/v9555;set new third resource
!!POv9530/v9531/v9532&v9520=0/1:V3/?y1; get flag for current town
!!VRy1&v9520=0/1:|64; set the structure to 'built' (set bit 7)
!!POv9530/v9531/v9532&v9520=0/1:V3/y1; set flag

***************************** upgrading part *****************************
!!POv9530/v9531/v9532:V3/?y-2; get flag for current town
!!VRy-2:&64; test if the bit 7 is set
!!FU&y-2=0:E; Exit if there's no special structure in town
!!HE-1:N?v1;
!!CA998:T?v2;

!!DO9503/0/6/1:Pv1/v2;



!?FU9503;
!!HEx1:C0/x16/?y1/?y7;
!!FU|y1<0/y7=0:E;
!!MA:Oy1/?y2;
!!MA:Uy1/?y3;
!!MA:Ly1/?y4;

!!VRy6:Sy4 +37;
!!CA998:B3/y6;
!!CA998&-1:B3/19;
!!CA998&-1:B3/25;

!!FU&y3=-2:E;
!!FU&y3=-1:E;
!!FU&y2<>x2:E;
!!FU&-1:E;
*
*!VRy5&y3=-1/y1<=111:Sy1 %2;
*!VRy3&y3=-1/y1<=111/y5=0:Sy1 +1;
*
*!VRy3&y3=-1/y1=112:S127;
*!VRy3&y3=-1/y1=113:S125;
*!VRy3&y3=-1/y1=114:S129;
*!VRy3&y3=-1/y1=115:S123;
*!VRy3&y3=-1/y1=118:S119;
*!VRy3&y3=-1/y1=120:S121;
*!VRy3&y3=-1/y1=130:S131;
!!VRy5:S1;
!!VRy5&y3>=0:S0;
!!FU|y5=1:E;
!!OW:C?v9540;   (current player: v6540)
!!OW:Rv9540/6/?v9541;    get gold
!!HEx1:C0/x16/y1/?v9588;
!!MA:Cy1/6/?v9589;
!!MA:Cy3/6/?v9590;
!!VRv9590: v9590-v9589;
!!VRv9590: v9590*v9588;
!!VRv9590: v9590:4;
!!VRv9590: v9590*3;
!!HEx1&v9590<=v9541:C0/x16/y3/d;
!!VRv9591&v9590<=v9541:Sv9541-v9590;   substract 'price' from 'gold'
!!OW&v9590<=v9541:Rv9540/6/v9591;      set new gold value
*** this was used for bug-catching only :)
*!IF&v9590<=v9541:M ^AI upgrades creature number %Y1 to %Y3 in a quantity of %V9588 for %V9590 gold. He had %V9541 gold, now he has %V9591^;

[ 本帖最后由 独孤求败 于 2012-5-13 21:24 编辑 ]

沧海一粟 发表于 2012-5-13 21:16:07

回复 1# 的帖子

问下:你这八级生物工会具体功能是什么?官方脚本我确实不记得了,你这几千行看得头都晕。

另外你所说的改变点击议事厅为城堡,我想只要找到
!!FU&y1<10:E;      (abort if not town hall type)
!!FU&y1>13:E;      (abort if not town hall type)
把它改成
!!FU&y1<>9:E;   先试试

独孤求败 发表于 2012-5-13 21:23:20

OK!!

这个脚本是在城里建造把自己的7级生物升级为8级生物的建筑,很多人永远都找不到如何才能自己生产出8级生物。

已经解决 ,就是这样。

祝沧海前辈永远生活开心快乐!

[ 本帖最后由 独孤求败 于 2012-5-13 23:46 编辑 ]

songfx 发表于 2012-5-14 07:25:34

右键?拆城也是用右键啊。

eva2000as 发表于 2012-5-15 16:04:19

楼主贴的是新生物升级,3.57可用(3.58f是否可用忘记了),Script99.erm的那个……
页: [1]
查看完整版本: 【已解决】八级生物工会的打开方式为右键城堡图片打开

捐赠