I'm tired and sleepy, but the logic would be this, maybe some adjustment is needed.
PHP Code:
check_health(index)
{
new current_health
current_health = get_user_health(index)
if ((g_gondar_health / 2) >= current_health && (g_gondar_health / 3) < current_health)
{
set_user_maxspeed(index , 450.0)
set_user_rendering(index, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha,155)
message_begin(MSG_ALL,iconstatus,{0,0,0},index)
write_byte(1) // status (0=hide, 1=show, 2=flash)
write_string("dmg_poison") // sprite name
write_byte(255) // red
write_byte(255) // green
write_byte(0) // blue
message_end()
}
else if ((g_gondar_health / 3) >= current_health)
{
set_user_maxspeed(index , 800.0)
set_user_rendering(index, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha,55)
message_begin(MSG_ALL,iconstatus,{0,0,0},index)
write_byte(1) // status (0=hide, 1=show, 2=flash)
write_string("dmg_poison") // sprite name
write_byte(255) // red
write_byte(0) // green
write_byte(0) // blue
message_end()
}
}
__________________