Jump to content
  • 0

How to set kill quest?


Dolphin86

Question


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  704
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

as title, i was trying to set player to hunt 50 poring, but yeah i fail, can someone show me how it should be done?

Spoiler
new_1-3,100,35,4	script	Newbie Guide	418,{

	
	if( dagger == 1 ){
	killedrid == 1002
    poring_count++;
    dispbottom "You killed "+poring_count+" Poring.";
	}
	if( poring_count >=50 ){ //This part checks if you have met the requirements.(auto-prize)
	dispbottom "You have killed the required number of porings!";
	getitem 501,1; // give prize?
	poring_count = 0; //reset/delete char variable
	}
	end;
	else
	mes "==^741188Equipment Guide^000000==";
	mes "Hello welcome to our server,";
	mes "i am here to guide all new";
	mes "player that have joined our server";
	mes "to craft your starting gear";
	next;
	switch(select("- Tell me more:- Craft Beginner Equipment:- Exit"))
	{
		case 1:
			mes "==^741188Equipment Guide^000000==";
			mes "As you may or my not knowing";
			mes "that equipment will not drop by";
			mes "monster, but player can still";
			mes "obtain offical equipment from";
			mes "merchat class equipment crafting";
			mes "or from offical quest";
			next;
			mes "==^741188Equipment Guide^000000==";
			mes "This server does not follow";
			mes "offical equipment drop";
			mes "but each server custom ";
			mes "equipment will have it's own";
			mes "speciality";
			end;
		case 2:
			mes "==^741188Equipment Guide^000000==";
			mes "To craft your starting gear";
			mes "which is Beginner Dagger";
			mes "firstly i will need you to";
			mes "hunt 50 poring, i will reward";
			mes "you with 1 Common Blue Print";
			mes "Common Blue Print are use to craft";
			mes "Common equipment";
			next;
			menu "Take this quest",Acc,"No Thanks",Den;
				Acc:
					mes "==^741188Equipment Guide^000000==";
					mes "Now please help me hunt 50 poring";
					set dagger, 1;
					end;
				Den:
					mes "==^741188Equipment Guide^000000==";
					mes "Sure just come back to me when you change your mind";
					end;
		case 3:
			mes "==^741188Equipment Guide^000000==";
			mes "Very well, come to me if you need guide";
			close;
		
	}
	close;

}

 

 

Edited by Dolphin86
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

You can make a quest like Elysium said or use this one.
 

new_1-3,100,35,4	script	Newbie Guide	418,{
	mes "==^741188Equipment Guide^000000==";
	mes "Hello welcome to our server,";
	mes "i am here to guide all new";
	mes "player that have joined our server";
	mes "to craft your starting gear";
	next;
	switch(select("- Tell me more:- Craft Beginner Equipment:- Exit"))
	{
		case 1:
			mes "==^741188Equipment Guide^000000==";
			mes "As you may or my not knowing";
			mes "that equipment will not drop by";
			mes "monster, but player can still";
			mes "obtain offical equipment from";
			mes "merchat class equipment crafting";
			mes "or from offical quest";
			next;
			mes "==^741188Equipment Guide^000000==";
			mes "This server does not follow";
			mes "offical equipment drop";
			mes "but each server custom ";
			mes "equipment will have it's own";
			mes "speciality";
			end;
		case 2:
			mes "==^741188Equipment Guide^000000==";
			mes "To craft your starting gear";
			mes "which is Beginner Dagger";
			mes "firstly i will need you to";
			mes "hunt 50 poring, i will reward";
			mes "you with 1 Common Blue Print";
			mes "Common Blue Print are use to craft";
			mes "Common equipment";
			next;
			menu "Take this quest",Acc,"No Thanks",Den;
				Acc:
					if(dagger) {
						mes "You already have this hunting quest.";
						close;
					}
					mes "==^741188Equipment Guide^000000==";
					mes "Now please help me hunt 50 poring";
					set dagger, 1;
					end;
				Den:
					mes "==^741188Equipment Guide^000000==";
					mes "Sure just come back to me when you change your mind";
					end;
		case 3:
			mes "==^741188Equipment Guide^000000==";
			mes "Very well, come to me if you need guide";
			close;
		
	}
	end;
OnNPCKillEvent:
	if(!dagger) end;
	if(killedrid == .mob_id) {
		poring_count++;
		dispbottom "You have killed "+poring_count+"/"+.kill_amount+"] "+getmonsterinfo(.mob_id, MOB_NAME)+".";
	}
	if(poring_count >= .kill_amount) {
		poring_count = 0;
		for(.@i = 0; .@i < getarraysize(.reward); .@i += 2) {
			getitem .reward[.@i],.reward[.@i+1];
		}
	}
	end;
	
OnInit:
	setarray .reward,501,1,502,1; // add rewards here
	.mob_id = 1002; // monster id
	.kill_amount = 50; // amount of porings needed
	end;
}

 

Edited by cook1e
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  155
  • Reputation:   51
  • Joined:  07/15/13
  • Last Seen:  

54 minutes ago, Dolphin86 said:

as title, i was trying to set player to hunt 50 poring, but yeah i fail, can someone show me how it should be done?

  Hide contents
new_1-3,100,35,4	script	Newbie Guide	418,{

	
	if( dagger == 1 ){
	killedrid == 1002
    poring_count++;
    dispbottom "You killed "+poring_count+" Poring.";
	}
	if( poring_count >=50 ){ //This part checks if you have met the requirements.(auto-prize)
	dispbottom "You have killed the required number of porings!";
	getitem 501,1; // give prize?
	poring_count = 0; //reset/delete char variable
	}
	end;
	else
	mes "==^741188Equipment Guide^000000==";
	mes "Hello welcome to our server,";
	mes "i am here to guide all new";
	mes "player that have joined our server";
	mes "to craft your starting gear";
	next;
	switch(select("- Tell me more:- Craft Beginner Equipment:- Exit"))
	{
		case 1:
			mes "==^741188Equipment Guide^000000==";
			mes "As you may or my not knowing";
			mes "that equipment will not drop by";
			mes "monster, but player can still";
			mes "obtain offical equipment from";
			mes "merchat class equipment crafting";
			mes "or from offical quest";
			next;
			mes "==^741188Equipment Guide^000000==";
			mes "This server does not follow";
			mes "offical equipment drop";
			mes "but each server custom ";
			mes "equipment will have it's own";
			mes "speciality";
			end;
		case 2:
			mes "==^741188Equipment Guide^000000==";
			mes "To craft your starting gear";
			mes "which is Beginner Dagger";
			mes "firstly i will need you to";
			mes "hunt 50 poring, i will reward";
			mes "you with 1 Common Blue Print";
			mes "Common Blue Print are use to craft";
			mes "Common equipment";
			next;
			menu "Take this quest",Acc,"No Thanks",Den;
				Acc:
					mes "==^741188Equipment Guide^000000==";
					mes "Now please help me hunt 50 poring";
					set dagger, 1;
					end;
				Den:
					mes "==^741188Equipment Guide^000000==";
					mes "Sure just come back to me when you change your mind";
					end;
		case 3:
			mes "==^741188Equipment Guide^000000==";
			mes "Very well, come to me if you need guide";
			close;
		
	}
	close;

}

 

 

You can try quest sample in emulator/doc/sample/npc_test_quest

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  704
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

49 minutes ago, cook1e said:

You can make a quest like Elysium said or use this one.
 

new_1-3,100,35,4	script	Newbie Guide	418,{
	mes "==^741188Equipment Guide^000000==";
	mes "Hello welcome to our server,";
	mes "i am here to guide all new";
	mes "player that have joined our server";
	mes "to craft your starting gear";
	next;
	switch(select("- Tell me more:- Craft Beginner Equipment:- Exit"))
	{
		case 1:
			mes "==^741188Equipment Guide^000000==";
			mes "As you may or my not knowing";
			mes "that equipment will not drop by";
			mes "monster, but player can still";
			mes "obtain offical equipment from";
			mes "merchat class equipment crafting";
			mes "or from offical quest";
			next;
			mes "==^741188Equipment Guide^000000==";
			mes "This server does not follow";
			mes "offical equipment drop";
			mes "but each server custom ";
			mes "equipment will have it's own";
			mes "speciality";
			end;
		case 2:
			mes "==^741188Equipment Guide^000000==";
			mes "To craft your starting gear";
			mes "which is Beginner Dagger";
			mes "firstly i will need you to";
			mes "hunt 50 poring, i will reward";
			mes "you with 1 Common Blue Print";
			mes "Common Blue Print are use to craft";
			mes "Common equipment";
			next;
			menu "Take this quest",Acc,"No Thanks",Den;
				Acc:
					if(dagger) {
						mes "You already have this hunting quest.";
						close;
					}
					mes "==^741188Equipment Guide^000000==";
					mes "Now please help me hunt 50 poring";
					set dagger, 1;
					end;
				Den:
					mes "==^741188Equipment Guide^000000==";
					mes "Sure just come back to me when you change your mind";
					end;
		case 3:
			mes "==^741188Equipment Guide^000000==";
			mes "Very well, come to me if you need guide";
			close;
		
	}
	end;
OnNPCKillEvent:
	if(!dagger) end;
	if(killedrid == .mob_id) {
		poring_count++;
		dispbottom "You have killed "+poring_count+"/"+.kill_amount+"] "+getmonsterinfo(.mob_id, MOB_NAME)+".";
	}
	if(poring_count >= .kill_amount) {
		poring_count = 0;
		for(.@i = 0; .@i < getarraysize(.reward); .@i += 2) {
			getitem .reward[.@i],.reward[.@i+1];
		}
	}
	end;
	
OnInit:
	setarray .reward,501,1,502,1; // add rewards here
	.mob_id = 1002; // monster id
	.kill_amount = 50; // amount of porings needed
	end;
}

 

hye thanks it works as it should now, but instead of giving reward, how can i change the quest state? since i am planning to add 2 part of the quest, also the kill count still continue even i have completed the quest

Edited by Dolphin86
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  155
  • Reputation:   51
  • Joined:  07/15/13
  • Last Seen:  

You can add a quest variable when you kill 50 porings:

 

new_1-3,100,35,4	script	Newbie Guide	418,{
	mes "==^741188Equipment Guide^000000==";
	mes "Hello welcome to our server,";
	mes "i am here to guide all new";
	mes "player that have joined our server";
	mes "to craft your starting gear";
	next;
	switch(select("- Tell me more:- Craft Beginner Equipment:- Exit"))
	{
		case 1:
			mes "==^741188Equipment Guide^000000==";
			mes "As you may or my not knowing";
			mes "that equipment will not drop by";
			mes "monster, but player can still";
			mes "obtain offical equipment from";
			mes "merchat class equipment crafting";
			mes "or from offical quest";
			next;
			mes "==^741188Equipment Guide^000000==";
			mes "This server does not follow";
			mes "offical equipment drop";
			mes "but each server custom ";
			mes "equipment will have it's own";
			mes "speciality";
			end;
		case 2:
			mes "==^741188Equipment Guide^000000==";
			mes "To craft your starting gear";
			mes "which is Beginner Dagger";
			mes "firstly i will need you to";
			mes "hunt 50 poring, i will reward";
			mes "you with 1 Common Blue Print";
			mes "Common Blue Print are use to craft";
			mes "Common equipment";
			next;
			menu "Take this quest",Acc,"No Thanks",Den;
				Acc:
					if(dagger) {
						mes "You already have this hunting quest.";
						close;
					}
					mes "==^741188Equipment Guide^000000==";
					mes "Now please help me hunt 50 poring";
					set dagger, 1;
					end;
				Den:
					mes "==^741188Equipment Guide^000000==";
					mes "Sure just come back to me when you change your mind";
					end;
		case 3:
			mes "==^741188Equipment Guide^000000==";
			mes "Very well, come to me if you need guide";
			close;
		
	}
	end;
OnNPCKillEvent:
	if(!dagger) end;
	if(killedrid == .mob_id) {
		poring_count++;
		dispbottom "You have killed "+poring_count+"/"+.kill_amount+"] "+getmonsterinfo(.mob_id, MOB_NAME)+".";
	}
	if(poring_count >= .kill_amount) {
		poring_count = 0;
		for(.@i = 0; .@i < getarraysize(.reward); .@i += 2) {
			getitem .reward[.@i],.reward[.@i+1];
			set dagger_quest2, 1; 
		}
	}
	end;
	
OnInit:
	setarray .reward,501,1,502,1; // add rewards here
	.mob_id = 1002; // monster id
	.kill_amount = 50; // amount of porings needed
	end;
}

//Second Quest
new_1-3,100,37,4	script	Newbie Guide 2	418,{

	if ( dagger_quest2 == 0 ) {
		mes "==^741188Equipment Guide 2^000000==";
		mes "You have to 'Kill 50 Porings' and then come back to me.";
		close;
	}
	
	mes "==^741188Equipment Guide 2^000000==";
	mes "Hey you made it!";
	close;
	
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  704
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

On 6/16/2022 at 11:29 AM, EIysium said:

You can add a quest variable when you kill 50 porings:

 

new_1-3,100,35,4	script	Newbie Guide	418,{
	mes "==^741188Equipment Guide^000000==";
	mes "Hello welcome to our server,";
	mes "i am here to guide all new";
	mes "player that have joined our server";
	mes "to craft your starting gear";
	next;
	switch(select("- Tell me more:- Craft Beginner Equipment:- Exit"))
	{
		case 1:
			mes "==^741188Equipment Guide^000000==";
			mes "As you may or my not knowing";
			mes "that equipment will not drop by";
			mes "monster, but player can still";
			mes "obtain offical equipment from";
			mes "merchat class equipment crafting";
			mes "or from offical quest";
			next;
			mes "==^741188Equipment Guide^000000==";
			mes "This server does not follow";
			mes "offical equipment drop";
			mes "but each server custom ";
			mes "equipment will have it's own";
			mes "speciality";
			end;
		case 2:
			mes "==^741188Equipment Guide^000000==";
			mes "To craft your starting gear";
			mes "which is Beginner Dagger";
			mes "firstly i will need you to";
			mes "hunt 50 poring, i will reward";
			mes "you with 1 Common Blue Print";
			mes "Common Blue Print are use to craft";
			mes "Common equipment";
			next;
			menu "Take this quest",Acc,"No Thanks",Den;
				Acc:
					if(dagger) {
						mes "You already have this hunting quest.";
						close;
					}
					mes "==^741188Equipment Guide^000000==";
					mes "Now please help me hunt 50 poring";
					set dagger, 1;
					end;
				Den:
					mes "==^741188Equipment Guide^000000==";
					mes "Sure just come back to me when you change your mind";
					end;
		case 3:
			mes "==^741188Equipment Guide^000000==";
			mes "Very well, come to me if you need guide";
			close;
		
	}
	end;
OnNPCKillEvent:
	if(!dagger) end;
	if(killedrid == .mob_id) {
		poring_count++;
		dispbottom "You have killed "+poring_count+"/"+.kill_amount+"] "+getmonsterinfo(.mob_id, MOB_NAME)+".";
	}
	if(poring_count >= .kill_amount) {
		poring_count = 0;
		for(.@i = 0; .@i < getarraysize(.reward); .@i += 2) {
			getitem .reward[.@i],.reward[.@i+1];
			set dagger_quest2, 1; 
		}
	}
	end;
	
OnInit:
	setarray .reward,501,1,502,1; // add rewards here
	.mob_id = 1002; // monster id
	.kill_amount = 50; // amount of porings needed
	end;
}

//Second Quest
new_1-3,100,37,4	script	Newbie Guide 2	418,{

	if ( dagger_quest2 == 0 ) {
		mes "==^741188Equipment Guide 2^000000==";
		mes "You have to 'Kill 50 Porings' and then come back to me.";
		close;
	}
	
	mes "==^741188Equipment Guide 2^000000==";
	mes "Hey you made it!";
	close;
	
}

 

tested, but the kill count still continue even when i have completed kill 50 poring.

@Emistry

Edited by Dolphin86
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2347
  • Joined:  10/28/11
  • Last Seen:  

OnNPCKillEvent:
	if(!dagger) end;

Change to

OnNPCKillEvent:
	if(!dagger || dagger_quest2 == 1) 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...