I want ask, do someone known how made it better?
Already i just used method to remove and add different item to inventory. The same script is used in two items and its work. But i want do this else way: coin will change in hands (not go to inventory after throw)
Here is my coin script:
And msg content:
{100}{}{Eagle}
{200}{}{Head}
Already i just used method to remove and add different item to inventory. The same script is used in two items and its work. But i want do this else way: coin will change in hands (not go to inventory after throw)
Here is my coin script:
Code:
procedure start;
procedure use_p_proc;
procedure start begin
end
procedure use_p_proc begin
variable eagle;
variable head;
variable los;
eagle:=create_object(568,0,0);
head:=create_object(569,0,0);
los:=random(1,2);
if (obj_is_carrying_obj_pid(dude_obj, 568) >=1 and (los==1)) then begin
add_obj_to_inven(dude_obj,head);
float_msg(dude_obj,mstr(200),8);
remove_pid_qty(dude_obj, 568, 1)
end else
if (obj_is_carrying_obj_pid(dude_obj, 568) >=1 and (los==2)) then begin
add_obj_to_inven(dude_obj,eagle);
float_msg(dude_obj,mstr(100),8);
remove_pid_qty(dude_obj, 568, 1)
end else
if (obj_is_carrying_obj_pid(dude_obj, 569) >=1 and (los==1)) then begin
add_obj_to_inven(dude_obj,eagle);
float_msg(dude_obj,mstr(100),8);
remove_pid_qty(dude_obj, 569, 1)
end else
if (obj_is_carrying_obj_pid(dude_obj, 569) >=1 and (los==2)) then begin
add_obj_to_inven(dude_obj,head);
float_msg(dude_obj,mstr(200),8);
remove_pid_qty(dude_obj, 569, 1)
end
end
And msg content:
{100}{}{Eagle}
{200}{}{Head}