穿墙练习插件{源码/ 2010 02 05更新}
本帖最后由 lovehuai 于 2010-2-5 04:22 编辑最近打平台老是被穿死反穿老是找不到点 囧Rz
所以单机BOT练穿点
但是问题就来了 Bot在特定位置 才能穿ING
所以就操起记事本匆忙敲了一个
配合 死亡复活 插件 yapb机器人 使用
请下载最新的yapb机器人(里面有多国语言自己设置成中文就行了)
http://yapb.bots-united.com/downloads.html
http://yapb.jeefo.net/
并把yapb.cfg里的 yb_stopbots 设置成 "1" 暂停BOT活动不然BOT到处乱跑你砸穿列
Bot每隔一秒检测一次HP如果低于255就把HP改为255避免穿啊穿就挂了-_,-不过这样貌似还是不妥
随意定位坐标并传送BOT到坐标
显示坐标线 (在BOT跟自己之间画一条直线显示时间为5秒 5秒后消失)
每打一枪的HP值
效果如图/代码使劲往下拉
最后一更 获取攻击部位 攻击HP Bot损失HP后直接恢复到255 只要不是拿AWP不隔墙爆头bot基本就不会死
不隔直接打AWP最大伤害(全套护甲)我读取到的是 444HP 门穿中是 201HP左右
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
/*
My Blog : http://www.lovehuai.cn
E-Mail: darkzol_huai@163.com
如果你有更好建议请发邮件谢谢!~
*/
new Bot_Id
new origin
new g_sprite
new Dw_Boby[] = {
"全身",
"头部",
"胸部",
"腹部",
"左臂",
"右臂",
"左腿",
"右腿"
}
public plugin_init()
{
register_plugin("Bot_Exercise", "0.4", "天下第一小賤人");
register_clcmd("exercise_bot", "Exercise_Menu")
RegisterHam(Ham_TraceAttack, "player", "HamTraceAttack");
}
public HamTraceAttack(Vic, Att, Float:dmg, Float:dir, traceresult, dmgbits)
{
if(!is_user_connected(Att) || Vic == Att)
return PLUGIN_HANDLED;
new xx=get_tr2(traceresult, TR_iHitgroup)
new Vic_Hp= 255 - get_user_health(Vic)
//new CsArmorType:ArmorType
//new Vic_Armor =255- cs_get_user_armor(Vic, ArmorType)
set_hudmessage(0, 100, 200, 0.07, 0.71, 0, 6.0, 3.0)
cs_set_user_armor(Vic,255,CS_ARMOR_VESTHELM)
set_user_health(Vic,255)
show_hudmessage(Att, "击中部位%s Hp:%i ",Dw_Boby,Vic_Hp)
//show_hudmessage(Att, "击中部位%s Hp:%i 护甲 %i",Dw_Boby,Vic_Hp,Vic_Armor)
return HAM_IGNORED;
}
public plugin_precache()
{
g_sprite = precache_model("sprites/dot.spr");
}
public Exercise_Menu(id, level, cid)
{
new menu = menu_create("穿点练习:", "Exercise_Handler")
menu_additem(menu, "记录当前坐标", "1", ADMIN_ALL)
menu_additem(menu, "添加BOT练习", "2",ADMIN_ALL)
menu_additem(menu, "传送到坐标点", "3", ADMIN_ALL)
menu_additem(menu, "显示坐标线", "4", ADMIN_ALL)
menu_additem(menu, "退出", "0", ADMIN_ALL)
menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
menu_display(id, menu, 0)
return PLUGIN_HANDLED
}
public Exercise_Handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new cmd, name, access,csid,user_name
get_user_info(id, "name", user_name, 31)
menu_item_getinfo(menu, item, access, cmd, 31, name, 31, access)
get_user_name(id,csid,31)
if (strcmp(cmd, "0")==0)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
if (strcmp(cmd, "1")==0)
{
get_user_origin(id, origin)
client_print(id, print_chat, "坐标已保存")
} else{
if (strcmp(cmd, "2")==0)
{
if ((cs_get_user_team(id) == CS_TEAM_CT) && is_user_alive(id))
{
server_cmd("yapb add 100 0 1 %s_bot",user_name)
client_print(id, print_chat, "命令已执行请稍等")
set_task(random_float(3.0,10.0), "Bot_Origin", id)
} else {
if ((cs_get_user_team(id) == CS_TEAM_T) && is_user_alive(id))
{
server_cmd("yapb add 100 0 2 %s_bot",user_name)
client_print(id, print_chat, "命令已执行请稍等")
set_task(random_float(3.0,10.0), "Bot_Origin", id)
}
}
}
if (strcmp(cmd, "3")==0)
{
set_user_origin(Bot_Id, origin)
client_print(id, print_chat, "BOT已传送到坐标点")
}
if (strcmp(cmd, "4")==0)
{
Look_Cross(id)
client_print(id, print_chat, "显示坐标线")
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public Bot_Origin(id)
{
new user_name
get_user_info(id, "name", user_name, 31)
strcat(user_name, "_bot", sizeof(user_name)-1)
Bot_Id = is_name_inuse(id,user_name)
set_user_origin(Bot_Id, origin)
cs_set_user_armor(Bot_Id,255,CS_ARMOR_VESTHELM)
set_user_health(Bot_Id,255)
client_print(id, print_chat, "BOT已添加")
}
is_name_inuse(id, const sample[])
{
new name
for (new i=1; i<=get_maxplayers(); i++)
{
if (!is_user_connected(i)) continue
if (id==i) continue
get_user_name(i, name, 31)
if (strcmp(name, sample)==0)
return i
}
return 0
}
public client_connect(id)
{
Bot_Id =0;
origin ="";
}
public client_disconnect (id)
{
Bot_Id =0;
origin ="";
}
public Look_Cross(id)
{
new vec_user;
new vec_bot;
get_user_origin(id, vec_user);
get_user_origin(Bot_Id, vec_bot);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, {0, 0, 0}, id);
write_byte(0);
write_coord(vec_user);
write_coord(vec_user);
write_coord(vec_user);
write_coord(vec_bot);
write_coord(vec_bot);
write_coord(vec_bot);
write_short(g_sprite);
write_byte(1);
write_byte(1);
write_byte(50);//显示时间 数值乘0.1
write_byte(10);
write_byte(0);
write_byte(100); //R
write_byte(100); //G
write_byte(255); //B
write_byte(100);
write_byte(0);
message_end();
return PLUGIN_HANDLED;
}
挺好,支持 很好很不错~~ 用伤害显示插件bullet_damage.amxx;伤害显示不就行了,BOT和真人是有差距的(却都会乱动).
不过还是支持楼主的创意~ 用伤害显示插件不就行了,BOT和真人是有差距的(却都会乱动).
不过还是支持楼主的创意~
caihanzi 发表于 2010-2-2 19:03 http://www.dt-club.net/forum/images/common/back.gif
新版的BOT都有暂停活动的命令选项
启用就行了如果是旧版的升级下就行了
而且新版的都是多国语言的不用再去手工汉化里面直接就有中文选项 更新后顶上去 更新后顶上去 我喜欢你这个,带源码,有创意,还不歧视盗版 很不错的练习插件 怎么输入 Exercise_Menu打不开菜单额
页:
[1]
2