Jump to content
  • 0

Quest NPC With Random Reward


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

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

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

prontera,0,0,0	script	quest	444,{
	mes "do you want to exchange the items:";
	for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){
		mes "(" + .requirements[.@i +1] + ") " + getitemname(.requirements[.@i]);
	}
	mes "for a random reward ?";
	if(select("yes:no") == 2)
		end;
	for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){
		if(countitem(.requirements[.@i]) < .requirements[.@i+1]){
			mes "you dont have (" + .requirements[.@i +1] + ") " + getitemname(.requirements[.@i]);
			end;
		}
	}
	for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){
		delitem .requirements[.@i],.requirements[.@i +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

  • 0

  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

thanks u very much 

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...