

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!treasure_chest_ChooseRandomWeapon()
treasure_chest_ChooseWeightedRandomWeapon()
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
add_limited_weapon( "tesla_gun", 1);
for( i = 0; i < keys.size; i++ )
{
if( !get_is_in_box( keys[i] ) )
{
continue;
}
if( player has_weapon_or_upgrade( keys[i] ) )
{
continue;
}
if( !IsDefined( keys[i] ) )
{
continue;
}
// If the chests are not completed or the reward is still in the map, do not add the weapon to the box
if( level.chest_active && keys[i] == "tesla_gun" || keys[i] == "tesla_gun" && !level.chest_active && !chest_reward_picked_up() )
{
continue;
}
chest_reward_picked_up()
{
reward_picked_up = false;
players = get_players();
for( i=0 ; i<players.size ; i++ )
{
if( players[i].free_ray_gun )
{
reward_picked_up = true;
break;
}
}
return reward_picked_up;
}