|
发表于 2005-5-10 20:49:06
|
显示全部楼层
|阅读模式
来自 中国–广东–广州–海珠区
/**************************************************************************************************
* ============================
* == earn_health_mod v1.0 ==
* == made by Amok ==
* ============================
* 微波炉汉化+修正+增强
* Thanks for downloading the earn_health_mod.
*
* Description: For each kill you gain experience-points (xp).
* After reaching a certain amount of xp, you level up.
* With each level you get more HP (Healthpoints) at
* the beginning of a round. You start at level 0 with 100 HP.
*
* Level: HP:
* 0 100
* 1 120
* 2 135
* 3 145
* 4 150
*
* You will get a bonus for difficult kills:
*
* Sort of kill: XP you gain:
* - normal kill 10
* - Headshot 15
* - grenade kill 25
* - knifekill 40
*
* I think that's all you need to know and I hope you'll enjoy it.
*
* Amok
*
*
**************************************************************************************************/
#include <amxmodx>
#include <fun>
// =============================================
new xp[33]
new level[33]
// =============================================
public event_deathmsg() // Event called when a deathmessage is displayed
{
new killer = read_data(1)
new victim = read_data(2)
new wpn[32]
read_data(4,wpn,31)
// Don't do anything if it's a suicide or TK
if ( !killer || killer==victim || get_user_team(killer)==get_user_team(victim) )
{
return PLUGIN_CONTINUE
}
// Do the following if it's a normal kill
else
{
if (killer)
{
set_hudmessage(255,255,255,0.3, 0.53, 0, 3.0, 6.0, 0.5, 0.15, 3)
// Xp Bonus
if ( equal(wpn,"knife") )
{
xp[killer] += 40
}
else if ( equal(wpn,"grenade") )
{
xp[killer] += 25
}
else if (read_data(3))
{
xp[killer] += 15
}
else
{
xp[killer] += 10
}
// End of the xp bonus
if (xp[killer] <= 49)
{
level[killer] = 0
show_hudmessage(killer,"火线任务: %d / 50 ^n 等级: %d ^n 您为一等兵,血值不变: 100" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 49) && (xp[killer] < 100) )
{
level[killer] = 1
show_hudmessage(killer,"火线任务: %d / 100 ^n 等级: %d ^n 恭喜您升级为二等兵,增加血值: 110" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 99) && (xp[killer] < 150) )
{
level[killer] = 2
show_hudmessage(killer,"火线任务: %d / 150 ^n 等级: %d ^n 恭喜您升级为三等兵,增加血值: 120" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 149) && (xp[killer] < 200) )
{
level[killer] = 3
show_hudmessage(killer,"火线任务: %d / 200 ^n 等级: %d ^n 恭喜您升级为上等兵,增加血值: 130" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 199) && (xp[killer] < 250) )
{
level[killer] = 4
show_hudmessage(killer,"火线任务: %d / 250 ^n 等级: %d ^n 恭喜您升级为准士,增加血值: 140" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 249) && (xp[killer] < 300) )
{
level[killer] = 5
show_hudmessage(killer,"火线任务: %d / 300 ^n 等级: %d ^n 恭喜您升级为下士,增加血值: 150" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 299) && (xp[killer] < 350) )
{
level[killer] = 6
show_hudmessage(killer,"火线任务: %d / 350 ^n 等级: %d ^n 恭喜您升级为中士,增加血值: 160" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 349) && (xp[killer] < 400) )
{
level[killer] = 7
show_hudmessage(killer,"火线任务: %d / 400 ^n 等级: %d ^n 恭喜您升级为上士,增加血值: 170" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 449) && (xp[killer] < 500) )
{
level[killer] = 8
show_hudmessage(killer,"火线任务: %d / 500 ^n 等级: %d ^n 恭喜您升级为少尉,增加血值: 180" , xp[killer] , level[killer] )
}
else if (xp[killer] > 499)
{
level[killer] = 9
show_hudmessage(killer,"老天,您杀敌无数,万众爱戴,您成为了中尉!. ^n 火线任务: %d ^n 你血值: 190" , xp[killer] )
}
else if ( (xp[killer] > 599) && (xp[killer] < 600) )
{
level[killer] = 10
show_hudmessage(killer,"火线任务: %d / 600 ^n 等级: %d ^n 恭喜您升级为上尉,增加血值: 200" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 699) && (xp[killer] < 700) )
{
level[killer] = 11
show_hudmessage(killer,"火线任务: %d / 700 ^n 等级: %d ^n 恭喜您升级为少校,增加血值: 210" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 799) && (xp[killer] < 800) )
{
level[killer] = 12
show_hudmessage(killer,"火线任务: %d / 800 ^n 等级: %d ^n 恭喜您升级为中校,增加血值: 220" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 899) && (xp[killer] < 900) )
{
level[killer] = 13
show_hudmessage(killer,"火线任务: %d / 900 ^n 等级: %d ^n 恭喜您升级为上校,增加血值: 230" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 999) && (xp[killer] < 1000) )
{
level[killer] = 14
show_hudmessage(killer,"火线任务: %d / 1000 ^n 等级: %d ^n 恭喜您升级为准将,增加血值: 250" , xp[killer] , level[killer] )
}
else if ( (xp[killer] > 1099) && (xp[killer] < 1100) )
{
level[killer] = 15
show_hudmessage(killer,"火线任务: %d / 1100 ^n 等级: %d ^n 恭喜您升级为将军,增加血值: 280" , xp[killer] , level[killer] )
}
}
}
return PLUGIN_CONTINUE
}
// =============================================
public eNewRound(id)
{
set_hudmessage(255,255,255,0.3, 0.53, 0, 3.0, 6.0, 0.5, 0.15, 3)
if (level[id] == 0)
{
show_hudmessage(id,"火线任务: %d / 50 ^n 您的等级-一等兵: %d ^n 您为一等兵,未杀敌,血值不变: 100" , xp[id] , level[id] )
set_user_health(id, 100)
}
else if (level[id] == 1)
{
show_hudmessage(id,"火线任务: %d / 100 ^n 您的等级-二等兵: %d ^n 您当前血值: 110" , xp[id] , level[id] )
set_user_health(id, 110)
}
else if (level[id] == 2)
{
show_hudmessage(id,"火线任务: %d / 150 ^n 您的等级-三等兵: %d ^n 您当前血值: 120" , xp[id] , level[id] )
set_user_health(id, 120)
}
else if (level[id] == 3)
{
show_hudmessage(id,"火线任务: %d / 200 ^n 您的等级-上等兵: %d ^n 您当前血值: 130" , xp[id] , level[id] )
set_user_health(id, 130)
}
else if (level[id] == 4)
{
show_hudmessage(id,"火线任务: %d / 250 ^n 您的等级-准士: %d ^n 您当前血值: 140" , xp[id] , level[id] )
set_user_health(id, 140)
}
else if (level[id] == 5)
{
show_hudmessage(id,"火线任务: %d / 300 ^n 您的等级-下士: %d ^n 您当前血值: 150" , xp[id] , level[id] )
set_user_health(id, 150)
}
else if (level[id] == 6)
{
show_hudmessage(id,"火线任务: %d / 350 ^n 您的等级-中士: %d ^n 您当前血值: 160" , xp[id] , level[id] )
set_user_health(id, 160)
}
else if (level[id] == 7)
{
show_hudmessage(id,"火线任务: %d / 400 ^n 您的等级-上士: %d ^n 您当前血值: 170" , xp[id] , level[id] )
set_user_health(id, 170)
}
else if (level[id] == 8)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-少尉: %d ^n 您当前血值: 180" , xp[id] , level[id] )
set_user_health(id, 180)
}
else if (level[id] == 9)
{
show_hudmessage(id,"您已为中尉,获得终极血值190大点!. ^n 您现为火线任务中尉: %d ^n 您当前血值: 1000" , xp[id])
set_user_health(id, 190)
}
else if (level[id] == 10)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-上尉: %d ^n 您当前血值: 200" , xp[id] , level[id] )
set_user_health(id, 200)
}
else if (level[id] == 11)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-少校: %d ^n 您当前血值: 210" , xp[id] , level[id] )
set_user_health(id, 210)
}
else if (level[id] == 12)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-中校: %d ^n 您当前血值: 220" , xp[id] , level[id] )
set_user_health(id, 220)
}
else if (level[id] == 13)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-上校: %d ^n 您当前血值: 230" , xp[id] , level[id] )
set_user_health(id, 230)
}
else if (level[id] == 14)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-准将: %d ^n 您当前血值: 240" , xp[id] , level[id] )
set_user_health(id, 250)
}
else if (level[id] == 15)
{
show_hudmessage(id,"火线任务: %d / 500 ^n 您的等级-将军: %d ^n 您当前血值: 280" , xp[id] , level[id] )
set_user_health(id, 280)
}
}
// =============================================
public plugin_init()
{
register_plugin("earn_health_mod","1.0","amok-微波炉汉化增强版-by lai-xiwan")
register_event("DeathMsg","event_deathmsg","a")
register_event("RoundTime", "eNewRound", "bc")
} |
|