Jump to content
  • 0

Monster Kill via Quest


Teraxes

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  02/24/21
  • Last Seen:  

Hey, i try a little bit scripting and make some quests.

the last quest my admin say the kill doesnt work, can anyone explain what is wrong.

here is the npc script that i write.

alberta,167,177,3	script	Simon	10079,{

	set .@npcname$, "^FF0000[Simon]^000000";

if(storage_password==0) goto quest0;
if(storage_password==1) goto quest1;
if(storage_password==2) goto quest2;
if(storage_password==3) goto quest3;
if(storage_password==4) goto quest4;

quest0:
				mes .@npcname$;
				mes "blabla";
				close;
quest1:
				mes .@npcname$;
				mes "Toete bitte je 500 Snake, Wormtail und Willows fuer mich.";
				set storage_password,2;
				close;
quest2:
				mes .@npcname$;
				mes "Geh bitte die 500 Snake, Wormtail und Willows toeten.";
				close;
				
OnNPCKillEvent:
	if (storage_password == 2) { 
		if (killedrid == 1025) { //Snake
			set kill_count_variable, kill_count_variable+1; 
			if (kill_count_variable == 500) 
	}
}
	if (storage_password == 2) { 
		if (killedrid == 1010) { //Willow
			set kill_count_variable, kill_count_variable+1; 
			if (kill_count_variable == 500) 
	}
}
	if (storage_password == 2) { 
		if (killedrid == 1024) { //Worm Tail
			set kill_count_variable, kill_count_variable+1; 
			if (kill_count_variable == 500) 
	}
}
set storage_password,3;
end;

quest3:
				mes .@npcname$;
				mes "blabla";
				set storage_password,4;
				close;
quest4:
				mes .@npcname$;
				mes "blabla";
				close;
}

 

and can i make monster kills quest, so kill 50.000 monster of your choice with an timer.

 

Thx ?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  06/16/13
  • Last Seen:  

better use quest_db.yml

example: 

- Id: 90000
  Title: Custom Quest!
   Targets:
  - Mob: PORING
     Count: 50000
  -TimeLimit: +1h ( d - day(s), h - hour(s), mn - minute(s), s - second(s) )

then create a npc that will set/erase/change the quest in player.
once the player killed all target monster quest. to check it use checkquest
 

if(checkquest(90000,HUNTING) == 2) {
mes "bla bla bla";
erasequest 90000;
setquest 900001;
OR
changequest 90000,900001;
set storage_password,1;
close;

}


better read the script_commands.txt for checkquest parameter

Link to comment
Share on other sites

  • 0

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

alberta,167,177,3	script	Simon	10079,{
	.@npcname$ = "^FF0000[Simon]^000000";
	switch (storage_password) {
		default:
			mes .@npcname$;
			mes "blabla";
			break;
		case 1:
			mes .@npcname$;
			mes "Toete bitte je 500 Snake, Wormtail und Willows fuer mich.";
			set storage_password,2;
			break;
		case 2:
			mes .@npcname$;
			mes "Geh bitte die 500 Snake, Wormtail und Willows toeten.";
			break;
		case 3:
			mes .@npcname$;
			mes "blabla";
			set storage_password,4;
			break;
		case 4:
			mes .@npcname$;
			mes "blabla";
			break;
	}
	close;
	
OnNPCKillEvent:
	if (storage_password == 2) { 
		if (killedrid == 1025 || killedrid == 1010 ||  killedrid == 1024) {
			kill_count_variable++;
			dispbottom "Progress ["+kill_count_variable+"/500]";
			if (kill_count_variable == 500)
				storage_password = 3;
	}
	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...