Stopping multiple giftings
Posted: Fri Jan 30, 2004 5:41 pm
Hey, im back with another pretty stupid question, when you finally get round to completing a mission, and you go to get a gift, how in gods name do you stop it being given to you infinite times, the code i currently have that involves this is.
#define LVAR_One_Reward (8)
procedure talk_p_proc
begin
if((not(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED)) and (not(global_var(GVAR_KILL_MAGE) == QUEST_COMPLETED))) then begin
start_gdialog(NAME,Self_obj,4,-1,-1);
gSay_Start;
call Node01;
gSay_End;
end_dialogue;
end
else if((global_var(GVAR_KILL_MAGE) == QUEST_COMPLETED) and (not(local_var(LVAR_One_Reward) == 1))) then begin
set_local_var(LVAR_One_Reward,1);
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start;
call Node06;
gSay_End;
end_dialogue;
end
else if((global_var(GVAR_KILL_MAGE) == QUEST_COMPLETED) and (local_var(LVAR_One_Reward) == 1)) then begin
floater(159);
end
end
procedure Node06
Begin
Reply(154);
NOption(157,Node999,004);
Item := create_object(PID_BRASS_KNUCKLES,0,0);
add_mult_objs_to_inven(dude_obj,item,1);
end
which the stuff relating to one reward is more or less copied directly from the shamen ( with appropriate changes for anything that needs changing ), ive also tried doing this with a map variable rather than a local var, and im also aware that its kinda stupid to have plants give you brass knucks, its just practice, honest.
So once again, if anyone has any ideas why it might keep giving the gift everytime you talk to them and how to stop it, id appreciate it.
Thanks
Pill
#define LVAR_One_Reward (8)
procedure talk_p_proc
begin
if((not(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED)) and (not(global_var(GVAR_KILL_MAGE) == QUEST_COMPLETED))) then begin
start_gdialog(NAME,Self_obj,4,-1,-1);
gSay_Start;
call Node01;
gSay_End;
end_dialogue;
end
else if((global_var(GVAR_KILL_MAGE) == QUEST_COMPLETED) and (not(local_var(LVAR_One_Reward) == 1))) then begin
set_local_var(LVAR_One_Reward,1);
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start;
call Node06;
gSay_End;
end_dialogue;
end
else if((global_var(GVAR_KILL_MAGE) == QUEST_COMPLETED) and (local_var(LVAR_One_Reward) == 1)) then begin
floater(159);
end
end
procedure Node06
Begin
Reply(154);
NOption(157,Node999,004);
Item := create_object(PID_BRASS_KNUCKLES,0,0);
add_mult_objs_to_inven(dude_obj,item,1);
end
which the stuff relating to one reward is more or less copied directly from the shamen ( with appropriate changes for anything that needs changing ), ive also tried doing this with a map variable rather than a local var, and im also aware that its kinda stupid to have plants give you brass knucks, its just practice, honest.
So once again, if anyone has any ideas why it might keep giving the gift everytime you talk to them and how to stop it, id appreciate it.
Thanks
Pill