廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 1718 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
ss1352tw
個人頭像
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x0
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] zp4.3的BOT倒數前不開槍
zp4.3的BOT倒數前不開槍的插件在zp5.0裡不管用

誰能幫我修改一下

謝謝

複製程式
/********************************************
=============================================
*    ZBot Helper For Zombie Plague 4.3+     *
=============================================
Description:
Fix some issues happens when playing with
Bots on CS:CZ

Additional CVAR:
bot_auto_kill <1|0>
bot_show_notification <1|0>

Modules:
- csx (for Countdown HUD Message)
- fakemeta (for flashlight code)

Changelog:
1.0 Initial release

1.1 Fix event_start so it works

1.2 Fix release
+ Added HUD Countdown features
+ Added 2 new cvars
+ Added experimental force flashlight
+ Added show notification
> Fix round end, bots stop attacking
  each others now
 
1.3 Change logic, Fix sync issue

1.4 Fix release
+ Added bot_auto_kill
- Remove countdown code
- Remove force flashlight code
> Bots don't use smg (more survive)
> Bots don't use sniper (more survive)

Credits:
- AMXModx Team (AMXModX 1.8.1)
- Mercylezz (Zombie Plague 4.3)
********************************************/

#include <amxmodx>
#include <csx>
#include <fakemeta>
#include <amxmisc>
#include <zombieplague>

#define PLUGIN "[ZP] ZBot Helper Lite"
#define VERSION "1.4"
#define AUTHOR "Dels"
    
new freeze_time, max_player;
new cvar_zbot_autokill, cvar_zbot_notification;
const TASK_ID = 1603;

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);    
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
    
    //used for "bot_auto_kill"
    register_event("DeathMsg","event_death","a");
    
    //cvars
    cvar_zbot_autokill = register_cvar("bot_auto_kill", "0"); //auto kill when all human die
    cvar_zbot_notification = register_cvar("bot_show_notification", "0"); //not actual debug, just show notification
}

public event_round_start()
{
    //bugfix
    remove_task(TASK_ID);
    
    //initialization each time round start
    set_cvar_num("mp_autoteambalance", 0);        //是否啟動自動隊伍平衡功能 0=關閉 1=開啟 或是人數例如32
    set_cvar_num("mp_friendlyfire", 1);        //玩家是否可以傷害到隊友 0=關閉 1=開啟
    set_cvar_num("mp_freezetime", 4);        //回合開始前的凍結時間 (單位: 秒, 0 為無凍結時間)
    set_cvar_num("mp_limitteams", 0);        //隊伍雙方人數最大可相差幾人 0=關閉 或是人數例如32
    set_cvar_num("bot_allow_grenades", 1);        //設定BOT是否使用手榴彈 1=使用
    set_cvar_num("bot_allow_shotguns", 1);        //設定BOT是否使用散彈槍 1=使用
    set_cvar_num("bot_allow_pistols", 1);        //設定BOT是否使用手槍 1=使用
    set_cvar_num("bot_allow_snipers", 1);        //設定BOT是否使用狙擊槍 1=使用
    set_cvar_num("bot_allow_rogues", 0);        //設定BOT是否跟隨隊伍 1=使用
    set_cvar_num("bot_allow_machine_guns", 1);    //設定BOT是否使用機槍 1=使用
    set_cvar_num("bot_allow_sub_machine_guns", 1);    //設定BOT是否使用衝鋒槍 1=使用
    set_cvar_num("bot_allow_shield", 0);        //設定BOT不使用盾牌 1=不使用
    set_cvar_num("bot_allow_rifles", 1);        //設定BOT是否使用步槍 1=使用
    set_cvar_num("bot_zombie", 1);            //設定BOT喪屍出現前不亂跑及不亂開槍 1=不亂跑及不亂開槍

    //notification stuff
    if (get_pcvar_num(cvar_zbot_notification) == 1)
        client_print(0, print_chat, "DUMB BOTS: ENABLED");
    
    freeze_time = get_cvar_num("zp_delay") - 1;
    set_task(4.0, "freeze_bots", TASK_ID);
}

public freeze_bots()
{    
    --freeze_time;
        
    if(freeze_time >= 1)
    {
        set_task(1.0, "freeze_bots", TASK_ID);
    }
    else
    {
        set_cvar_num("bot_zombie", 0);    
        remove_task(TASK_ID);
        
        //notification stuff
        if (get_pcvar_num(cvar_zbot_notification) == 1)
            client_print(0, print_chat, "DUMB BOTS: DISABLED");
    }
}

public zp_round_ended(winteam)
{
    if (winteam != WIN_NO_ONE)
    {
        set_cvar_num("bot_zombie", 1);
        
        //notification stuff
        if (get_pcvar_num(cvar_zbot_notification) == 1)
            client_print(0, print_chat, "DUMB BOTS: ENABLED");
    }
}

public event_death()
{
    if (get_pcvar_num(cvar_zbot_autokill) == 1)
    {
        new alive_humans;
        max_player = get_maxplayers();
        
        for (new i = 1; i <= max_player; i++)
        {
            if (!is_user_bot(i) && !is_user_hltv(i) && is_user_alive(i))
                alive_humans++;
        }
        
        if (alive_humans == 0)    
        {
            //set_cvar_string("bot_kill", "all"); //the simple way, bot frag decreased
            for (new j = 1; j <= max_player; j++)
            {
                if (is_user_bot(j) && !is_user_hltv(j) && is_user_alive(j))
                    user_kill(j, 1)
            }
        }        
    }
}



獻花 x0 回到頂端 [樓 主] From:臺灣中華電信股份有限公司 | Posted:2012-07-17 00:45 |
ak47klo
個人頭像
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x8 鮮花 x36
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

目前本人也不太懂zp5.0這東西爺((上個禮拜才知道有這東西存在
所以我也愛莫能助((本人現在才開始學編寫插件表情

此文章被評分,最近評分記錄
財富:-20 (by Hatsuyuki) | 理由: 不清楚答案可提出見解,胡亂回覆則當灌水論


獻花 x0 回到頂端 [1 樓] From:臺灣凱擘股份有限公司 | Posted:2012-07-18 20:47 |
zxzyman 手機
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎
小有名氣
級別: 小有名氣 該用戶目前不上站
推文 x40 鮮花 x144
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

我的ZP5.0 全部都能支持耶....

但據我知道 有註明是ZP4.3的插件 ZP5.0不能用 (殭屍類型除外...)


用用看這個吧:

http://bbs-mychat.com/reads.php?tid=897211&keyword=BOT


記得把射1 槍改成 0








  表情


UWC3NG 終極魔獸-次世代 (繁體中文版)
     -按此連結-   

獻花 x0 回到頂端 [2 樓] From:臺灣中嘉寬頻股份有限公司 | Posted:2012-07-19 15:01 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.015079 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言