找回密码
 点一下
查看: 3549|回复: 17

华丽的trigger标签测试!!!

[复制链接]
发表于 2006-4-2 07:26:41 | 显示全部楼层 |阅读模式
[trigger]
    Events
        Map initialization
    Conditions
    Actions
        Custom script:   set udg_cache = InitGameCache("battleships.w3v")
        Set SecondGoldPeopleSouth = 1
        Set SecondGoldPeopleNorth = 1
        Set UpgradeCheckSouth = True
        Set KickOn = False
        Unit Group - Pick every unit in (Units in RemoveShips <gen>) and do (Actions)
            Loop - Actions
                Unit - Remove (Picked unit) from the game
        Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current gold to 200
                Player - Turn Gives bounty On for (Picked player)
                Player - Turn Gives bounty On for (Picked player)
                Set PlayerBoat[(Player number of (Picked player))] = (Random unit from (Units owned by (Picked player) of type Battle Ship))
                Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across South Harbour <gen>
                Camera - Apply First Camera S <gen> for (Picked player) over 0.00 seconds
                Set PlayerLumber[(Player number of (Picked player))] = 0
        Player Group - Pick every player in (All allies of Player 2 (Blue)) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current gold to 200
                Player - Turn Gives bounty On for (Picked player)
                Player - Turn Gives bounty On for (Picked player)
                Set PlayerBoat[(Player number of (Picked player))] = (Random unit from (Units owned by (Picked player) of type Battle Ship))
                Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across North Harbour <gen>
                Camera - Apply First Camera N <gen> for (Picked player) over 0.00 seconds
                Set PlayerLumber[(Player number of (Picked player))] = 0
        Set VotingPlayersTotal = 10
        For each (Integer B) from 3 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer B))) slot status) Not equal to Is playing
                    Then - Actions
                        Unit - Remove (Random unit from (Units owned by (Player((Integer B))))) from the game
                        Set VotingPlayersTotal = (VotingPlayersTotal - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Player((Integer B))) is an ally of Player 1 (Red)) Equal to True
                            Then - Actions
                                Set SecondGoldPeopleSouth = (SecondGoldPeopleSouth + 1)
                            Else - Actions
                                Set SecondGoldPeopleNorth = (SecondGoldPeopleNorth + 1)
                    Else - Actions
        Game - Set the time of day to 12.00
        Game - Set time of day speed to 150.00% of the default speed
        Wait 0.10 seconds
        Unit Group - Pick every unit in (Units in (Entire map) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
            Loop - Actions
                Unit - Pause (Picked unit)
        Set VoteDoneBool = False
        Set VoteNumberNoBP = 0
        Set VoteNumberNoTraders = 0
        Set VoteNumberOnlyTraders = 0
        Set VoteNumberOnlySailors = 0
        Set VoteNumberNormalPlay = 0
        Game - Set ally color filtering to 0
        Trigger - Run Seagull Sounds <gen> (ignoring conditions)
        Trigger - Run Rowboat Spawn <gen> (ignoring conditions)
        Trigger - Run Battle Ship Spawn <gen> (ignoring conditions)
        Trigger - Run Cruiser Spawn <gen> (ignoring conditions)
        Quest - Create a Required quest titled General Help with the description |cffffcc00Weapons|r..., using icon path ReplaceableTextures\CommandButtons\BTNStatUp.blp
        Quest - Create a Required quest titled Commands with the description |cffFF6666Commands ..., using icon path ReplaceableTextures\CommandButtons\BTNStatUp.blp
        Quest - Create a Required quest titled Change Log with the description |cffFF6666Change Lo..., using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOff.blp
        Quest - Create a Optional quest titled Trading with the description |cffffcc00Step 1|r:..., using icon path ReplaceableTextures\CommandButtons\BTNScroll.blp
        Quest - Create a Optional quest titled Missile Firing with the description |cffffcc00Step 1|r:..., using icon path ReplaceableTextures\CommandButtons\BTNFlare.blp
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Game - Display to (Player group((Picked player))) the text: (Welcome captain |cffffcc00 + ((Name of (Picked player)) + |r to the Carribean. If you need help, just go to the |cff33BBBBQuest Menu|r.))
                Set Kills[(Player number of (Picked player))] = 0
                Set Deaths[(Player number of (Picked player))] = 0
        -------- Vote-Board --------
        Wait 0.10 seconds
        Multiboard - Create a multiboard with 2 columns and 10 rows, titled Vote-Board
        Set VoteBoard = (Last created multiboard)
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Multiboard - Set the display style for VoteBoard item in column 1, row (Integer A) to Show text and Hide icons
                Multiboard - Set the display style for VoteBoard item in column 2, row (Integer A) to Show text and Hide icons
                Multiboard - Set the width for VoteBoard item in column 1, row (Integer A) to 14.00% of the total screen width
                Multiboard - Set the width for VoteBoard item in column 2, row (Integer A) to 4.50% of the total screen width
        Multiboard - Set the text for VoteBoard item in column 1, row 1 to |cffFF1111No Black ...
        Multiboard - Set the text for VoteBoard item in column 2, row 1 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 2 to |cffFF2222No Trader...
        Multiboard - Set the text for VoteBoard item in column 2, row 2 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 3 to |cffFF3333Only Trad...
        Multiboard - Set the text for VoteBoard item in column 2, row 3 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 4 to |cffFF4444Only Sail...
        Multiboard - Set the text for VoteBoard item in column 2, row 4 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 5 to |cffFFFF55No Pearl ...
        Multiboard - Set the text for VoteBoard item in column 2, row 5 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 6 to |cff66FF66Normal Pl...
        Multiboard - Set the text for VoteBoard item in column 2, row 6 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 7 to <Empty String>
        Multiboard - Set the text for VoteBoard item in column 2, row 7 to <Empty String>
        Multiboard - Set the display style for VoteBoard item in column 1, row 8 to Show text and Show icons
        Multiboard - Set the icon for VoteBoard item in column 1, row 8 to ReplaceableTextures\PassiveButtons\PASBTNStatUp.blp
        Multiboard - Set the text for VoteBoard item in column 1, row 8 to |cffFFFFFFPlayers:|...
        Multiboard - Set the text for VoteBoard item in column 2, row 8 to (|cffffcc00 + ((String(VotingPlayersTotal)) + |r))
        Multiboard - Set the display style for VoteBoard item in column 1, row 9 to Show text and Show icons
        Multiboard - Set the icon for VoteBoard item in column 1, row 9 to ReplaceableTextures\PassiveButtons\PASBTNStatUp.blp
        Multiboard - Set the text for VoteBoard item in column 1, row 9 to |cffFFFFFFVotes:|r
        Multiboard - Set the text for VoteBoard item in column 2, row 9 to |cffffcc000|r
        Multiboard - Set the text for VoteBoard item in column 1, row 10 to <Empty String>
        Multiboard - Set the text for VoteBoard item in column 2, row 10 to <Empty String>
        Multiboard - Show VoteBoard
        Dialog - Change the title of KickDialogHelp to |cffFF6666You are k...
        Dialog - Create a dialog button for KickDialogHelp labelled Ok
        -------- Vote --------
        Dialog - Change the title of VoteDialog to Vote Menu
        Dialog - Create a dialog button for VoteDialog labelled |cff66FF66Normal Pl...
        Set VoteNormalPlay = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialog labelled |cffFFFF55No Pearl ...
        Set VoteNoPearlAndNoTraders = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialog labelled |cffFF1111No Black ...
        Set VoteNoBlackPearl = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialog labelled |cffFF2222No Trader...
        Set VoteNoTraders = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialog labelled |cffFF3333Only Trad...
        Set VoteOnlyTraders = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialog labelled |cffFF4444Only Sail...
        Set VoteOnlySailors = (Last created dialog Button)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Dialog - Show VoteDialog for (Picked player)
        Wait 1.50 seconds
        Set VoteTimer = 15
        Multiboard - Change the number of rows for VoteBoard to 11
        Multiboard - Set the display style for VoteBoard item in column 1, row 11 to Show text and Hide icons
        Multiboard - Set the display style for VoteBoard item in column 2, row 11 to Show text and Hide icons
        Multiboard - Set the width for VoteBoard item in column 1, row 11 to 14.00% of the total screen width
        Multiboard - Set the width for VoteBoard item in column 2, row 11 to 4.50% of the total screen width
        Multiboard - Set the text for VoteBoard item in column 1, row 11 to |cff33BBBBVote-Time...
        Multiboard - Set the text for VoteBoard item in column 2, row 11 to (String(VoteTimer))
        For each (Integer A) from 1 to 15, do (Actions)
            Loop - Actions
                Wait 0.90 seconds
                Set VoteTimer = (VoteTimer - 1)
                Multiboard - Set the text for VoteBoard item in column 2, row 11 to (String(VoteTimer))
        Wait 1.00 seconds
        Multiboard - Change the number of rows for VoteBoard to 10
        Set VoteDoneBool = True
        Trigger - Run Mode Vote Done Check <gen> (checking conditions)
        Wait 10.00 seconds
        Set KickOn = True
[/trigger]

[ 本帖最后由 greedwind 于 2006-4-2 07:27 编辑 ]
发表于 2006-4-2 07:32:57 | 显示全部楼层
华丽滴沙发...
都完美老...
正则表达式可是个好东东..

[ 本帖最后由 白银の游戏王 于 2006-4-2 07:35 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2006-4-2 07:47:34 | 显示全部楼层
我可从来没学过PHP

10多年前看到perl就头疼,所以不学和perl一样的php
回复

使用道具 举报

发表于 2006-4-2 07:52:34 | 显示全部楼层
测试一下
不知道怎么样
回复

使用道具 举报

 楼主| 发表于 2006-4-2 08:06:18 | 显示全部楼层
换行
            空格          空格


已经很空了
回复

使用道具 举报

发表于 2006-4-2 08:49:43 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2006-4-2 09:16:56 | 显示全部楼层
[trigger]瀵规??????
    浜?欢
        ?板??????
    ???
    ?ㄤ?
        瀵规?娓告? - 瀵圭?瀵规?????磋?缃?(瀵规????瀹?
        瀵规?娓告? - 姣??绫诲??????????涓??瀵规????瀹?
        瀵规?娓告? - 缁????????杞?(瀵规????瀹?
        瀵规?娓告? - 璁剧疆???璧?? (瀵规????瀹?
        瀵规?娓告? - 浠??浣跨??????浣?疆 涓???ら????浣??灏????(瀵规????瀹?
        瀵规?娓告? - ??缓?????? (瀵规????瀹?
        瀵规?娓告? - 杩??瀵规? AI ??? (瀵规???????瀹?
        瀵规?娓告? - 寮鸿揩???/澶辫触?′欢锛??????╁?锛?
[/trigger]
回复

使用道具 举报

发表于 2006-4-2 09:19:02 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2006-4-2 09:21:01 | 显示全部楼层
原帖由 啊丹 于 2006-4-2 09:16 发表
[trigger]瀵规??????
    浜?欢
        ?板??????
    ???
    ?ㄤ?
        瀵规?娓告? - 瀵圭?瀵规?????磋?缃?(瀵规????瀹?
        瀵规?娓告? - 姣??绫诲????? ...


恩恩..直接复制中文WE的T的后果..
回复

使用道具 举报

发表于 2006-4-2 09:23:09 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2006-4-2 11:49:06 | 显示全部楼层

Bug:引用中若含有trigger标签,则会造成混乱

原帖由 啊丹 于 2006-4-2 09:16 发表
[trigger]瀵规??????
    浜?欢
        ?板??????
    ???
    ?ㄤ?
        瀵规?娓告? - 瀵圭?瀵规?????磋?缃?(瀵规????瀹?
        瀵规?娓告? - 姣??绫诲????? ...


是UTF-8问题

原内容是:
[trigger]
对战初始?
    事件
        地图初始?
    环境
    动作
        对战游戏 - 对用对战的时间设?(对所有玩?
        对战游戏 - 每一类型的英雄只召唤一?对所有玩?
        对战游戏 - 给英雄回城卷?(对所有玩?
        对战游戏 - 设置初始资源 (对所有玩?
        对战游戏 - 从被使用?初始位置 中删除野生单位和小动?(对所有玩?
        对战游戏 - 创建初始单位 (对所有玩?
        对战游戏 - 运行对战 AI 脚本 (对所有电脑玩?
        对战游戏 - 强迫胜利/失败条件(对所有玩家)
[/trigger]

[ 本帖最后由 zyl910 于 2006-4-2 12:28 编辑 ]
回复

使用道具 举报

发表于 2006-4-2 12:25:50 | 显示全部楼层
我也来尝试一下华丽的中文触发器

[trigger]
对战初始化
    事件
        地图初始化
    环境
    动作
        对战游戏 - 对用对战的时间设置 (对所有玩家)
        对战游戏 - 每一类型的英雄只召唤一个 对所有玩家)
        对战游戏 - 给英雄回城卷轴 (对所有玩家)
        对战游戏 - 设置初始资源 (对所有玩家)
        对战游戏 - 从被使用的 初始位置 中删除野生单位和小动物 (对所有玩家)
        对战游戏 - 创建初始单位 (对所有玩家)
        对战游戏 - 运行对战 AI 脚本 (对所有电脑玩家)
        对战游戏 - 强迫胜利/失败条件(对所有玩家)
[/trigger]
回复

使用道具 举报

发表于 2006-4-2 12:31:04 | 显示全部楼层
都华丽的说不支持中文的了。中文不显示图标D。。
回复

使用道具 举报

发表于 2006-4-2 12:33:52 | 显示全部楼层
缩进也不对啊
触发器名、事件、条件、动作在同一层
回复

使用道具 举报

发表于 2006-4-2 12:35:38 | 显示全部楼层
还存在一个问题:
若存在水平滚动条
就不会显示最后一行
老要我们拖动滚动条

[ 本帖最后由 zyl910 于 2006-4-2 12:37 编辑 ]
回复

使用道具 举报

发表于 2006-4-2 13:28:25 | 显示全部楼层
呃。。。这个也是。不过不好判断内容有多大。所以就这样显示了。
回复

使用道具 举报

 楼主| 发表于 2006-4-2 15:49:36 | 显示全部楼层
叫啊丹增加对中文的支持(很容易)

但PHP版的ANSI2UNICODE就。。。。。。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-20 11:33 , Processed in 0.038909 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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