Jump to content
  • 0
PapaZola

Quest NPC With Random Reward

Question

hello its there posibble to make quest npc give a random reward

here my list for reward 7073,7074,7075,7076,7077,7078,7079,7080,7081,7082,

 

item requirements

7020 -10

1054-50

7035-15

1009-50

7442-50

 

after create the item npc will annouce player make the quest

Edited by PapaZola
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
prontera,0,0,0	script	quest	444,{
	mes "do you want to exchange the items:";
	for([email protected]=0;[email protected]<getarraysize(.requirements);[email protected]+=2){
		mes "(" + .requirements[[email protected] +1] + ") " + getitemname(.requirements[[email protected]]);
	}
	mes "for a random reward ?";
	if(select("yes:no") == 2)
		end;
	for([email protected]=0;[email protected]<getarraysize(.requirements);[email protected]+=2){
		if(countitem(.requirements[[email protected]]) < .requirements[[email protected]+1]){
			mes "you dont have (" + .requirements[[email protected] +1] + ") " + getitemname(.requirements[[email protected]]);
			end;
		}
	}
	for([email protected]=0;[email protected]<getarraysize(.requirements);[email protected]+=2){
		delitem .requirements[[email protected]],.requirements[[email protected] +1];
	}
	getitem .rewards[rand(getarraysize(.rewards))],1;
	announce "player: " + strcharinfo(0) + "Did the quest!!!!",bc_all;
end;
OnInit:
	setarray .rewards,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082;
	setarray .requirements,7020,10,1054,50,7035,15,1009,50,7442,50;
end;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.