找回密码
 点一下
查看: 1885|回复: 5

其实SC2做BAT更加简单。

[复制链接]
发表于 2010-12-29 15:35:49 | 显示全部楼层 |阅读模式
SC2本来就允许你往硬盘上写文本文件。

所以甚至还没有war3的pld文件的那些额外的多余代码。

直接用Debug Message函数和输出Debug Message到指定文件的函数就可以做出很干净的bat文件了。没有多余代码。这其实已经不算漏洞了,因为它本来就允许你输出文本文件来。


除了文件头有个三个utf-8的BOM,所以可以直接输出“”来空出第一行。


未命名.jpg



而且你甚至可以直接覆盖掉硬盘上已有的文件哦,只要文件名和路径对上就可以。我刚才就用地图输出的文件覆盖掉了一个exe,这个exe里头的内容变成文本了。
222.jpg
 楼主| 发表于 2010-12-29 16:04:33 | 显示全部楼层
[trigger]
Create BAT
    Events
        UI - Player Any Player presses Escape key Down with shift Allow, control Allow, alt Allow
    Local Variables
    Conditions
    Actions
        Debug - Set the output file for debug message type Type 1 to "..\\ABC\\SC2.Bat"
        Debug - Display "" as debug output using Type 1, and Do Not display it in the game window
        Debug - Display "@cls" as debug output using Type 1, and Do Not display it in the game window
        Debug - Display "@color a" as debug output using Type 1, and Do Not display it in the game window
        Debug - Display "@echo Hello World" as debug output using Type 1, and Do Not display it in the game window
        Debug - Display "@echo This BAT file is generated by..." as debug output using Type 1, and Do Not display it in the game window
        Debug - Display "@pause" as debug output using Type 1, and Do Not display it in the game window
[/trigger]
回复

使用道具 举报

发表于 2010-12-29 17:12:27 | 显示全部楼层
美。
回复

使用道具 举报

发表于 2010-12-29 20:44:32 | 显示全部楼层
于是去做了一个看看BN能不能通过。
万一糟糕掉我的CE账号就惨了。
回复

使用道具 举报

发表于 2010-12-29 20:46:26 | 显示全部楼层
楼主好强大,求交往
回复

使用道具 举报

发表于 2010-12-29 20:52:20 | 显示全部楼层
威武。
越来越想扔War3了。(功能强大谁不爱)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-4-28 00:33 , Processed in 0.138922 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表