OK論壇

 找回密碼
 註冊
查看: 1353|回復: 4

關於時間與顏色

 關閉 [複製鏈接]
  • TA的每日心情
    開心
    2010-7-1 02:30 AM
  • 簽到天數: 22 天

    連續簽到: 0 天

    [LV.4]偶爾看看III

    發表於 2009-6-23 09:03:09 | 顯示全部樓層 |閱讀模式
    本帖最後由 ~阿宏~ 於 2009-6-24 09:00 AM 編輯

    1.請問以下如何將上下線公告改為 藍色
    2.請問2這種的時間有何差別          會的大大搶幫忙   感恩

    -        script        OnPCLogoutEvent        -1,{

    OnPCLogoutEvent:
            if ( getgmlevel() >= $@GameManagement ) {
                    if ( $@G_On_Offline == 1 ) {
                            announce "公告 : GM "+strcharinfo(0)+" 已登出伺服器!!",15;
                    }
                    if ( #WarpOnOff == 1 ) {
                            set Zeny,Zeny - $@WarpZeny;
                                warp "SavePoint",0,0;
                    }
                    end;
            }
            if ( $@P_On_Offline == 1 ) {
                    announce "公告 : 玩家 "+strcharinfo(0)+" 已登出伺服器!!",15;
            }
            if ( #WarpOnOff == 1 ) {
                    set Zeny,Zeny - $@WarpZeny;
                        warp "SavePoint",0,0;
            }
            end;
    }
    --------------------------------------------------------------------------------------------------------------------
    OnMinute00:

    OnClock2400:
    回復

    使用道具 舉報

  • TA的每日心情
    開心
    2013-10-16 12:53 AM
  • 簽到天數: 15 天

    連續簽到: 15 天

    [LV.4]偶爾看看III

    發表於 2009-6-23 09:35:30 | 顯示全部樓層
    有何差別我是不知道  ..  不過顏色的話

    玩家 "+strcharinfo(0)+" 已登出伺服器

    應該是在這一行加上顏色代碼  ..  至於代碼就自己找找吧

    ^ff0000玩家 "+strcharinfo(0)+" 已登出伺服器^000000 < 紅色

    ^0000ff玩家 "+strcharinfo(0)+" 已登出伺服器^000000 <藍色

    如果我的想法沒有錯的話 .. 這樣就能變顏色了吧 !! 有錯誤的話還請會的人幫忙解答了
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2009-6-23 09:40:47 | 顯示全部樓層
    *announce "<text>",<flag>{,<color>};

    This command will broadcast a message to all or most players, similar to
    @kami/@kamib GM commands.

    The region the broadcast is heard in and the color the message will come up as
    will be determined by the flags:

        announce "This will be shown to everyone at all in yellow.",0;

    The flag values are coded as constants in db/const.txt to make them easier to use:
    - bc_all: Broadcast message is sent server-wide
    - bc_map: Message is sent to everyone in the same map
    - bc_area: Message is sent to players in the vecinity of the source.
    - bc_self: Message is sent only to current player.

    - bc_npc: Broadcast source is the npc, not the player attached to the script
      (useful when a player is not attached or the message should be sent to those
      nearby the npc)

    - bc_yellow: The default is to send broadcasts in yellow color.
    - bc_blue: Alternate broadcast is displayed in blue color.

    The optional parameter, color, allows usage of broadcasts in any custom color.
    The color parameter is a single number which can be in hexadecimal notation.
    For example:
        announce "This will be shown to everyone at all in yellow.",bc_all,0xFFFF00;
    Will display a global announce in yellow. The color format is in RGB (0xRRGGBB).

    Using this for private messages to players is probably not that good an idea,
    but it can be used instead in NPCs to "preview" an announce.

        // This will be a private message to the player using the NPC that made the
        // annonucement
        announce "This is my message just for you",bc_blue|bc_self;

        // This will be shown on everyones screen that is in sight of the NPC.
        announce "This is my message just for you people here",bc_area;
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2010-7-1 02:30 AM
  • 簽到天數: 22 天

    連續簽到: 0 天

    [LV.4]偶爾看看III

     樓主| 發表於 2009-6-23 17:52:29 | 顯示全部樓層
    版大     我看不懂你英文= =    好長一篇
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2009-6-23 17:57:06 | 顯示全部樓層
    看不懂去爬文吧

    教學區也有
    回復 支持 反對

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2024-5-3 06:36 PM , Processed in 0.091451 second(s), 19 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表