procedure use_p_proc
begin //procedure starts
if (critter_inven_obj(Dude_obj,INVEN_TYPE_RIGHT_HAND) != Self_obj and critter_inven_obj(Dude_obj,INVEN_TYPE_LEFT_HAND) != Self_obj) then
begin
// **********THIS IS FOR TRUE**********
if (global_var(GVAR_DVMAG) < 19)then
begin
script_overrides;
gfade_out(ONE_GAME_SECOND);
rm_obj_from_inven(Dude_obj, self_obj);
set_global_var(GVAR_DVMAG, global_var(GVAR_DVMAG)+1);
critter_mod_skill(dude_obj,random(0,17), 4);
display_mstr(113);
display_mstr(100);
give_exp_points(100);
display_mstr("You gained 100 exp points!");
float_msg(dude_obj, mstr(random( 101, 108 )),9);
gfade_in(ONE_GAME_SECOND);
scr_return(1);
end else if (global_var(GVAR_DVMAG) == 19) then
begin
script_overrides;
gfade_out(ONE_GAME_SECOND);
rm_obj_from_inven(Dude_obj, self_obj);
set_global_var(GVAR_DVMAG, global_var(GVAR_DVMAG)+1);
critter_add_trait(dude_obj,TRAIT_PERK, PERK_gain_intelligence_perk, 1);
critter_mod_skill(dude_obj,random(0,17), 4);
display_mstr(113);
display_mstr(100);
give_exp_points(100);
display_mstr("You gained 100 exp points!");
display_mstr(111);
float_msg(dude_obj, 112,9);
gfade_in(ONE_GAME_SECOND);
scr_return(1);
end else begin
script_overrides;
gfade_out(ONE_GAME_SECOND);
rm_obj_from_inven(Dude_obj, self_obj);
critter_mod_skill(dude_obj,random(0,17), 4);
display_mstr(113);
display_mstr(100);
give_exp_points(100);
display_mstr("You gained 100 exp points!");
float_msg(dude_obj, mstr(random( 101, 108 )),9);
gfade_in(ONE_GAME_SECOND);
scr_return(1);
end
end
//**********THIS IS FOR NOT TRUE**********
else begin
script_overrides;
display_mstr(114);
scr_return(1);
end // THIS IS WHERE IF ENDS!
end // procedure ends