sunwayking 发表于 2013-8-5 14:33:29

原创御用智能修改脚本(增加人口、加速建造、加钱、制造...

本帖最后由 sunwayking 于 2013-8-5 15:46 编辑

作为苦逼挨踢男,平时工作多娱乐少,没时间跟AI软磨硬泡,不用秘籍不行啊。
每次输入秘籍还要查城市代码,越发苦逼。
于是乎,诞生了以下脚本。

用法:
1.下载按键精灵,复制粘贴脚本。
2.仔细看每个脚本后面的说明,最讨厌不看又不会用的小白菜。
3.自由转载,自由分享,注明出处即可。

代码随意写的,不接受任何代码风格的探讨。

1. 加钱(增加40w)KeyPress "`", 1
Delay 500
For 10
SayString "add_money 40000"
    KeyPress "Enter", 1
    Delay 200
Next
KeyPress "`", 12.给某城市加速建造、增加人口
Set voice = createobject("SAPI.SpVoice")
Const SVSFlagsAsync = 1
Const SVSFPurgeBeforeSpeak = 2

Dim d
Dim i
Dim n

input = ""
city = ""
population = 0
process = 0

Rem Main
Call InitDictionary()

//开始记录键盘
Call Plugin.Media.Beep(1046, 400)
Call Plugin.Media.Beep(578, 400)
Call SpeakText("请输入城市名称的完整拼音,按回车结束输入,不输入则使用历史记录",False)
Do While s <> 13
      s = WaitKey()
      If s>=65 And s<=90 Then
                Call Plugin.Media.Beep(1046, 200)
                input = input & Chr(s)
      End If
Loop
Call StopSpeak

If input = "" Then
      If Plugin.File.IsFileExist(".\汉之殇作弊脚本配置文件.ini") Then
                input = Plugin.File.ReadINI("汉之殇", "LastCity", ".\汉之殇作弊脚本配置文件.ini")
      Else
                Call CityNotFoundVoice()
                ExitScript
      End If      
End If

If d.Exists(input) Then
      city=d.Item(input)
      Call Plugin.File.WriteINI("汉之殇", "LastCity", input, ".\汉之殇作弊脚本配置文件.ini")
      
      Call SpeakText("请输入增加人口的次数,每次增加3000人,按回车结束输入,不输入则跳过",False)
      input = ""
      s=0
      Do While s <> 13
                s = WaitKey()
                If s>=48 And s<=57 Then
                        Call Plugin.Media.Beep(1046, 200)
                        input = input & Chr(s)
                End If
      Loop
      Call StopSpeak
      If input <> "" Then
                population=Cint(input)
      End If
      
      Call SpeakText("请输入加快建造的次数,按回车结束输入,不输入则跳过",False)
      input = ""
      s=0
      Do While s <> 13
                s = WaitKey()
                If s>=48 And s<=57 Then
                        Call Plugin.Media.Beep(1046, 200)
                        input = input & Chr(s)
                End If
      Loop
      Call StopSpeak
      If input <> "" Then
                process=Cint(input)
      End If
      
      Call ProcessCheatCode()
Else
      Call CityNotFoundVoice()
End If


//子程序
Sub ProcessCheatCode
      KeyPress "`", 1
      Delay 500
      For i = 1 To population Step 1
                SayString "add_population "&city&" 3000"
                KeyPress "Enter", 1
            Delay 200      
      Next
      For i = 1 To process Step 1
                SayString "process_cq "&city
            KeyPress "Enter", 1
            Delay 200      
      Next
      KeyPress "`", 1
End Sub

//初始化城市代码字典      
Sub InitDictionary()
      Set d = CreateObject("Scripting.Dictionary")
d.CompareMode = vbTextCompare
d.Add "RUXUKOU", "C-0810-b-ruxukou"
d.Add "BEIPING", "C-0101-b-BeiPing"
d.Add "XIANGPING", "C-0102-b-XiangPing"
d.Add "LIAOXI", "C-0103-b-LiaoXi"
d.Add "DAIXIAN", "C-0104-b-DaiXian"
d.Add "FANYANG", "C-0105-b-FanYang"
d.Add "CHANGLI", "C-0106-b-ChangLi"
d.Add "LELANG", "C-0107-b-LeLang"
d.Add "TAIYUAN", "C-0201-b-TaiYuan"
d.Add "SHANGDANG", "C-0202-b-ShangDang"
d.Add "XIHE", "C-0203-b-XiHe"
d.Add "XINXING", "C-0204-b-XinXing"
d.Add "YANMENGUAN", "C-0205-bg-YanMenGuan"
d.Add "HUKOUGUAN", "C-0206-bg-HuKouGuan"
d.Add "YECHENG", "C-0301-b-YeCheng"
d.Add "NANPI", "C-0302-b-NanPi"
d.Add "XINDU", "C-0303-b-Xindu"
d.Add "GUANGPING", "C-0304-b-GuangPing"
d.Add "CHANGSHAN", "C-0305-b-ChangShan"
d.Add "LELING", "C-0306-b-LeLing"
d.Add "LIYANG", "C-0307-b-LiYang"
d.Add "QINGHE", "C-0308-b-QingHe"
d.Add "LINZHI", "C-0401-b-LinZhi"
d.Add "BEIHAI", "C-0402-b-BeiHai"
d.Add "DONGLAI", "C-0403-b-DongLai"
d.Add "LANGYA", "C-0404-b-LangYa"
d.Add "PINGYUAN", "C-0405-b-PingYuan"
d.Add "CHENGYANG", "C-0406-b-ChengYang"
d.Add "XIAPI", "C-0501-b-Xiapi"
d.Add "GUANGLING", "C-0502-b-GuangLing"
d.Add "HUAILING", "C-0503-b-HuaiLing"
d.Add "PENGCHENG", "C-0504-b-PengCheng"
d.Add "CHENLIU", "C-0601-b-ChenLiu"
d.Add "PUYANG", "C-0602-b-PuYang"
d.Add "SHANYANG", "C-0603-b-ShanYang"
d.Add "LUJUN", "C-0604-b-LuJun"
d.Add "JIYING", "C-0605-b-JiYing"
d.Add "TAISHAN", "C-0606-b-TaiShan"
d.Add "XVCHANG", "C-0701-b-XvChang"
d.Add "RUNAN", "C-0702-b-RuNan"
d.Add "QIAO", "C-0703-b-Qiao"
d.Add "ZHANCHUN", "C-0704-b-ZhanChun"
d.Add "XIANGCHENG", "C-0705-b-XiangCheng"
d.Add "YIYANG", "C-0706-b-YiYang"
d.Add "LUYANG", "C-0707-b-LuYang"
d.Add "XIAOPEI", "C-0708-b-XiaoPei"
d.Add "ANFENG", "C-0709-b-AnFeng"
d.Add "WUYIN", "C-0710-b-WuYin"
d.Add "RUYIN", "C-0711-b-RuYin"
d.Add "CHENXIAN", "C-0712-b-ChenXian"
d.Add "ZHUIYANG", "C-0713-b-ZhuiYang"
d.Add "LUOYANG", "Rome"
d.Add "HONGLONG", "C-0802-b-HongLong"
d.Add "HENEI", "C-0803-b-HeNei"
d.Add "HEDONG", "C-0804-b-HeDong"
d.Add "PINGYANG", "C-0805-b-PingYang"
d.Add "HULAOGUAN", "C-0806-bg-HuLaoGuan"
d.Add "TONGGUAN", "C-0807-bg-TongGuan"
d.Add "GUANDU", "C-0808-bg-GuanDu"
d.Add "WUGUAN", "C-0809-bg-WuGuan"
d.Add "CHANGAN", "C-0901-b-ChangAn"
d.Add "TIANSHUI", "C-0902-b-TianShui"
d.Add "CHENCANG", "C-0903-b-ChenCang"
d.Add "LONGXI", "C-0904-b-LongXi"
d.Add "NANAN", "C-0905-b-NanAn"
d.Add "ANDING", "C-0906-b-AnDing"
d.Add "BEIDI", "C-0907-b-BeiDi"
d.Add "FENGYI", "C-0908-b-FengYi"
d.Add "SANGUAN", "C-0909-bg-SanGuan"
d.Add "JIETING", "C-0910-bg-JieTing"
d.Add "WUWEI", "C-1001-b-WuWei"
d.Add "XIPING", "C-1002-b-XiPing"
d.Add "JINCHENG", "C-1003-b-JinCheng"
d.Add "XIANGYANG", "C-1101-b-XiangYang"
d.Add "JIANGLING", "C-1102-b-JiangLing"
d.Add "WANCHENG", "C-1103-b-WanCheng"
d.Add "JIANGXIA", "C-1104-b-JiangXia"
d.Add "XINGYE", "C-1105-b-XingYe"
d.Add "MAICHENG", "C-1106-b-MaiCheng"
d.Add "NANXIANG", "C-1107-b-NanXiang"
d.Add "GAIYANG", "C-1108-b-GaiYang"
d.Add "YILING", "C-1109-bg-YiLing"
d.Add "FANCHENG", "C-1110-b-FanCheng"
d.Add "SHANGXU", "C-1111-b-ShangXu"
d.Add "CHANGSHA", "C-1201-b-ChangSha"
d.Add "GUIYANG", "C-1202-b-GuiYang"
d.Add "WULING", "C-1203-b-WuLing"
d.Add "LINGLING", "C-1204-b-LingLing"
d.Add "HENGYANG", "C-1205-b-HengYang"
d.Add "MOYANG", "C-1206-b-MoYang"
d.Add "BAQIU", "C-1207-b-BaQiu"
d.Add "GONGAN", "C-1208-b-GongAn"
d.Add "WU", "C-1301-b-Wu"
d.Add "JIANYE", "C-1302-b-JianYe"
d.Add "SHOUCHUN", "C-1303-b-ShouChun"
d.Add "HUIJI", "C-1304-b-HuiJi"
d.Add "LUJIANG", "C-1305-b-LuJiang"
d.Add "CHAISANG", "C-1306-b-ChaiSang"
d.Add "HEFEI", "C-1307-b-HeFei"
d.Add "POYANG", "C-1308-b-PoYang"
d.Add "LINHAI", "C-1309-b-LinHai"
d.Add "JIANAN", "C-1310-b-JianAn"
d.Add "YUZHANG", "C-1311-b-YuZhang"
d.Add "LULING", "C-1312-b-LuLing"
d.Add "CANGWU", "C-1313-b-CangWu"
d.Add "SHIXIN", "C-1314-b-ShiXin"
d.Add "JINGXIAN", "C-1315-b-JingXian"
d.Add "CHENGDU", "C-1401-b-ChengDu"
d.Add "JIANGZHOU", "C-1402-b-JiangZhou"
d.Add "ZITONG", "C-1403-b-ZiTong"
d.Add "SHANGYONG", "C-1404-b-ShangYong"
d.Add "LUOCHENG", "C-1405-b-LuoCheng"
d.Add "YONGAN", "C-1406-b-YongAn"
d.Add "JIANGYANG", "C-1407-b-JiangYang"
d.Add "FULING", "C-1408-b-FuLing"
d.Add "DEYANG", "C-1409-b-DeYang"
d.Add "XINCHENG", "C-1410-b-XinCheng"
d.Add "LANGZHONG", "C-1411-b-LangZhong"
d.Add "HANJIA", "C-1412-b-Hanjia"
d.Add "JIANWEI", "C-1413-b-JianWei"
d.Add "WEIXING", "C-1414-b-WeiXing"
d.Add "ZIGUI", "C-1415-b-ZiGui"
d.Add "YINPING", "C-1416-b-YinPing"
d.Add "WENSHAN", "C-1417-b-WenShan"
d.Add "LINJIANG", "C-1418-b-LinJiang"
d.Add "DIANJIANG", "C-1419-b-DianJiang"
d.Add "YANQU", "C-1420-b-YanQu"
d.Add "MIANZHUGUAN", "C-1421-bg-MianZhuGuan"
d.Add "JIANMENGUAN", "C-1422-bg-JianMenGuan"
d.Add "BAISHUIGUAN", "C-1423-bg-BaiShuiGuan"
d.Add "XIAMENGGUAN", "C-1424-bg-XiaMengGuan"
d.Add "HANZHONG", "C-1425-b-HanZhong"
d.Add "WUDU", "C-1426-b-WuDu"
d.Add "YANGPINGGUAN", "C-1427-bg-YangPingGuan"
d.Add "YUNNAN", "C-1501-b-YunNan"
d.Add "JIANNING", "C-1502-b-JianNing"
d.Add "YONGCHANG", "C-1503-b-YongChang"
d.Add "YUEXI", "C-1504-b-YueXi"
d.Add "ZANGKE", "C-1505-b-ZangKe"
d.Add "ZHUTI", "C-1506-b-ZhuTi"
d.Add "WUWAN", "C-1601-b-MY-WuWan"
d.Add "XIONGNU", "C-1602-b-MY-XiongNu"
d.Add "XIANBEI", "C-1603-b-MY-XianBei"
d.Add "JIEHU", "C-1604-b-MY-Jie"
d.Add "QIANGHU", "C-1605-b-MY-Qiang"
d.Add "DIZU", "C-1606-b-MY-Di"
d.Add "SHANYUE", "C-1607-b-MY-ShanYue"
d.Add "YIZHOU", "C-1608-b-MY-TaiWan"
d.Add "PENGLAI", "C-1609-b-MY-PengLai"
d.Add "BABALIKELUN", "Barbaricorum"
End Sub

Sub CityNotFoundVoice
      Call SpeakText("找不到城市",True)
End Sub

Sub SpeakText(text,wait)
      with voice
                   .Volume = 100
                .Speak text, SVSFlagsAsync + SVSFPurgeBeforeSpeak
                .WaitUntilDone wait
      end with
End Sub

Sub StopSpeak
      voice.Speak "", SVSFPurgeBeforeSpeak
End Sub说明:
(1).每次提示输入后,按键要有一点间隔,不要按的太快,太快了就会丢的。如何判断按键不丢(有效)呢,不丢的时候会“嘟”的响一声。
(2).城市名称输入时要求全小写(你只管打字母就行,别按Shift或者CapsLock键),如“幽州※北平”输入“beiping”即可。
(3).城市名称不输入直接按回车的话,会使用上一次使用过的城市名。
(4).脚本中包含操作语音提示,在语音过程中你可以继续按键,不影响的。

3.制造牛人(增加三维和各种属性)KeyPress "`", 1
Delay 500

SayString "give_trait this ZhuGeLiang1100 3"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this ZhuGeLiang1200 3"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this QinWang 3"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this Jn1001 7"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this Jn2001 2"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this Jn3001 2"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this Jn4001 2"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this Jn5001 2"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this C3190JnCQ-A 3"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this C3180JnFX-A 3"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this A1010JnQD-A 3"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this win1000 9"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this win2000 9"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this JnA7000 9"
KeyPress "Enter", 1
Delay 200

SayString "give_trait this JnB7000 9"
KeyPress "Enter", 1
Delay 200

KeyPress "`", 1说明: 一定要先选择一个武将再使用这个脚本

4. 取消武将负面属性(伤病)KeyPress "`", 1
Delay 500

SayString "remove_trait this Z9010JnSB-A 1"
KeyPress "Enter", 1
Delay 200

SayString "remove_trait this Z9010JnSB-A 2"
KeyPress "Enter", 1
Delay 200

SayString "remove_trait this Z9010JnSB-A 3"
KeyPress "Enter", 1
Delay 200

KeyPress "`", 1说明: 一定要先选择一个武将再使用这个脚本

大小叶哥 发表于 2013-8-5 14:49:35

支持一下

sunwayking 发表于 2013-8-5 14:39:19

沙发帖


自创自用,绝不坑爹

笑红尘 发表于 2013-8-5 14:56:04

看看。。。。。。。。。。。。。。。。。。。

★Via丶汉殇★ 发表于 2013-8-5 15:15:48

支持支持!但是我不买!

浪子格言。 发表于 2013-8-5 15:23:24

{:5_108:}什么东东

旦).(騰 发表于 2013-8-5 15:29:30

看看看看看看看看看看

遁世1314 发表于 2013-8-5 15:43:42

-
支持支持

古往今来 发表于 2013-8-5 15:53:31

支持下

安乐侯 发表于 2013-8-5 16:15:52

支持支持

squarehb 发表于 2013-8-5 16:17:14

大家都是穷人 何苦呢 何必呢

earlearl 发表于 2013-8-5 17:13:01

我要了 这个好 这个好

零度の陽光 发表于 2013-8-5 18:21:21

这位仁兄这玩意不好使啊
除了第一个别的不管用啊你试一下

y83685975 发表于 2013-8-5 18:23:22

看看情况再决定买不买{:soso__16324640235148804817_2:}

无言风子 发表于 2013-8-5 19:34:43

买了。不好用,那么麻烦还不如中世纪2六项修改哭,况且按这些步骤来的话比手动输入秘藉又能快多少?

sunwayking 发表于 2013-8-5 21:16:08

无言风子 发表于 2013-8-5 19:34 static/image/common/back.gif
买了。不好用,那么麻烦还不如中世纪2六项修改哭,况且按这些步骤来的话比手动输入秘藉又能快多少? ...

修改器不能修改人物吧?不能立即完成建造吧?

jia413 发表于 2013-8-5 21:22:17

ding~~~~~~~~~~~~

无言风子 发表于 2013-8-5 21:56:24

sunwayking 发表于 2013-8-5 21:16 static/image/common/back.gif
修改器不能修改人物吧?不能立即完成建造吧?

中世纪2:全面战争 王国1.5 +6修改器

功能:

F1:启动修改器
F2:无线钱
F3:一回合建筑
F4:城镇无线招募
F5:无线雇佣军(招募完以后会自动补充)
F6:无限移动(敌人也有效,如果不想一到敌人地界就被对方全国兵力围攻,就在结束回合的时候取消)
F7:自动补充兵力(如果打完仗以后,你的部队建制还在,就帮你把建制补满,这个功能比较不稳定,在结束回合时候可能造成跳出,用完以后及时取消)

还有个叫Med2KDcheat.exe的,专改人物属性

#霆$ 发表于 2013-8-6 08:26:56

不需要啊

爻抽12 发表于 2013-8-7 01:20:00

支持支持
页: [1] 2
查看完整版本: 原创御用智能修改脚本(增加人口、加速建造、加钱、制造...