|
Junior Member
|

06-06-2008
, 07:39
Re: Diablo Mod v8.0
|
#163
|
I have some suggestions for powerups:
Code:
public award_powerup(id)
{
if (is_user_connected(id) && is_user_alive(id) && !powerup_taken)
{
new pu_num
pu_num = random_num(1,10)
{
if (pu_num == 1)
{
if (cs_get_user_money(id) < 5000)
cs_set_user_money(id,5000)
else if (cs_get_user_money(id) < 10000)
cs_set_user_money(id,10000)
else if (cs_get_user_money(id) < 16000)
cs_set_user_money(id,16000)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Money Boost")
}
if (pu_num == 2)
{
Give_Xp(id,get_cvar_num("diablo_xpbonus")*2)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Experience")
}
if (pu_num == 3)
{
set_user_health(id,get_user_health(id)+10)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Health")
}
if (pu_num == 4)
{
set_user_armor(id,get_user_armor(id)+10)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Armor")
}
if (pu_num == 5)
{
player_b_damage[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Damage")
}
if (pu_num == 6)
{
player_strength[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Strength")
}
if (pu_num == 7)
{
player_dextery[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Dexterity")
}
if (pu_num == 8)
{
player_agility[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Agility")
}
if (pu_num == 9)
{
player_intelligence[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Intelligence")
}
if (pu_num == 10)
{
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Better luck next time!")
}
}
powerup_taken = true
}
}
Each one is tested and working. Only thing is that damage bonus is lost when you drop or lose your item, and health will go back to normal when next round starts. Armor however is saved. I tried to make powerups for invisibility and ammo too but couldn't get them to work.
And if stats are too valuable to get so easy from powerups you can always increase the chance for everything else:
Code:
public award_powerup(id)
{
if (is_user_connected(id) && is_user_alive(id) && !powerup_taken)
{
new pu_num
pu_num = random_num(1,16)
{
if (pu_num == 1|2)
{
if (cs_get_user_money(id) < 5000)
cs_set_user_money(id,5000)
else if (cs_get_user_money(id) < 10000)
cs_set_user_money(id,10000)
else if (cs_get_user_money(id) < 16000)
cs_set_user_money(id,16000)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Money Boost")
}
if (pu_num == 3|4)
{
Give_Xp(id,get_cvar_num("diablo_xpbonus")*2)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Experience")
}
if (pu_num == 5|6)
{
set_user_health(id,get_user_health(id)+10)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Health")
}
if (pu_num == 7|8)
{
set_user_armor(id,get_user_armor(id)+10)
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Armor")
}
if (pu_num == 9|10)
{
player_b_damage[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Damage")
}
if (pu_num == 11)
{
player_strength[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Strength")
}
if (pu_num == 12)
{
player_dextery[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Dexterity")
}
if (pu_num == 13)
{
player_agility[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Agility")
}
if (pu_num == 14)
{
player_intelligence[id]+=1
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Powerup: Intelligence")
}
if (pu_num == 15|16)
{
set_hudmessage(100, 200, 55, -1.0, 0.40, 0, 3.0, 2.0, 0.2, 0.3, 5)
show_hudmessage(id, "Better luck next time!")
}
}
powerup_taken = true
}
}
For the save xp you could make it optional, and then those who like to play that way that beginners have it harder gets to play that way. And/or then you could get more exp points if the victim is a higher level and less exp points if the victim is a lower level. And I also noticed that you spelled dexterity -> dextery... nothing severe but..
It'd also be nice with a sword model as the knife
Last edited by Econy; 06-06-2008 at 15:43.
|
|