Jump to content
  • 0

Quest Dungeon Script


Limestone

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

can i request a dungeon quest script, if a player not already take the quest, the warp(a warp portal. with a message )will automatically warp back the player to this coordinate 27,40. ( if the quest already done, no npc message at all)

this is what i want on my dungeon script request, a player must talk to npc1 to take the quest, the npc 1 will tell the player to tak to npc2. after the player talked to npc2. npc 2 will tell the player what he needs.

( i will do the items, so you must do the check.), then if the player finish the 1st quest, npc2 will tell him/her again to kill 100 of a specific monster. if the player kill a monster, it will display the amount of the monster's already killed. (EX: 1/100 Poring Killed. ) then if he/she finished already the monster killed requirements, he/she will go back to npc2 to check the 2nd quest, after he/she passes the 2nd quest. the npc2 will tell the player to talk again to npc1 for verification. the player can now enter the dungeon. if the quest is already done, he/she will not repeat the quest anymore. thank you so much.

Edited by Rage
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

( if the quest already done, no npc message at all)
I wonder this is npc1, npc2 or ... 3rd npc ?

let's see ...

npc 1
if ( quest_done ) {
warp "dungeon", 0,0;
end;
}
else if ( quest == 3 ) {
mes "ok now you can access the dungeon";
quest_done | 1 << 0 ;
quest = 0; // save memory;
close;
}
else if ( quest == 1 || quest == 2 ) {
mes "please talk to npc2";
close;
}
mes "want to go in xxx dungeon ?";
next;
mes "talk to npc2";
quest = 1;
close;

npc 2
if ( quest == 2 ) {
if ( kill_poring_count < 100 ) {
 mes "kill not enough poring";
 close;
}
mes "well done, go talk to npc1";
quest = 3;
close;
}
else if ( quest == 1 ) {
mes "then go kill 100 poring";
quest = 2;
close;
}
mes "<insert some text here>";
close;
OnNPCKillEvent:
if ( quest == 2 && killedrid == 1002 && kill_poring_count < 100 )
dispbottom "poring killed ["+ kill_poring_count++ +"/100]";
end;

nostalgic ... I used to love to write this kind of quest script 6 years ago

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

thanks for replying annie.. but 1 want a "Warp Portal" and 2 npc's only :3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,160,180,5    script    portal    45,2,2,{
   if ( quest_done & 1 << 0 )
       warp "guild_vs2",0,0;
   else
//        warp "prontera", 27,40;
       warp "prontera",156,191;
   end;
}

prontera,152,180,5    script    npc1    100,{
   if ( quest_done & 1 << 0 ) {
       mes "now you can access the dungeon";
       close;
   }
   else if ( quest == 3 ) {
       mes "ok now you can access the dungeon";
       quest_done = quest_done | 1 << 0 ;
       quest = 0; // save memory;
       close;
   }
   else if ( quest == 1 || quest == 2 ) {
       mes "please talk to npc2";
       close;
   }
   mes "want to go in xxx dungeon ?";
   next;
   mes "talk to npc2";
   quest = 1;
   close;
}

prontera,156,180,5    script    npc2    100,{
   if ( quest == 2 ) {
       if ( kill_poring_count < 10 ) {
           mes "kill not enough poring";
           close;
       }
       mes "well done, go talk to npc1";
       quest = 3;
       kill_poring_count = 0;
       close;
   }
   else if ( quest == 1 ) {
       mes "then go kill 10 poring";
       quest = 2;
       close;
   }
   mes "lalalala~~";
   close;
OnNPCKillEvent:
   if ( quest == 2 && killedrid == 1002 && kill_poring_count < 10 )
    dispbottom "poring killed ["+ kill_poring_count++ +"/10]";
   end;
}

reset kill_poring_count into 0 when done

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  

annie, i modified the script, but i think i have a problem. after my work, ill post here my script thank you for your help.

Edited by Rage
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

Just

if ( quest_done & 1 << 0 )

lol why not !?

Also you should reset kill_poring_count when quest is finished

quest = 0; // save memory;
kill_poring_count = 0;

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

Just

if ( quest_done & 1 << 0 )

lol why not !?

mind explain ? this is bitmask, which I think you told me you still learning ?

Also you should reset kill_poring_count when quest is finished

quest = 0; // save memory;
kill_poring_count = 0;

yeah lol, add it now
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  647
  • Reputation:   16
  • Joined:  11/21/11
  • Last Seen:  


casp_dun01,279,262,1 script .#1 45,2,2,{
if ( quest_done & 1 << 0 )
warp "casp_dun02",133,114;
else
// warp "prontera", 27,40;
mes "[ Caspen Gatekeeper ]";
mes ".....";
close;
warp "casp_dun01",275,265;
end;
}

casp_dun01,273,269,1 script Unknown Stone 111,{
if ( quest_done & 1 << 0 ) {
mes ".............";
close;
}
else if ( quest == 3 ) {
mes "Congratulations! "+strcharinfo(0)+",";
mes "i wish you are the one who can defeat";
mes "^FF0000Draconus^000000";
next;
mes "You can now enter Level 2 Dungeon";
announce ""+strcharinfo(0)+" can now access Caspen Dungeons Level 2! Congratulations!",bc_all;
quest_done = quest_done | 1 << 0 ;
quest = 0; // save memory;
close;
}
else if ( quest == 0 ) {
mes "[ Unknown Stone ]";
mes "God's given us powers to use it on good ways.";
next;
mes "[ Unknown Stone ]";
mes "But some monsters abuse it and use it in evil,";
mes "help us to defeat ^FF0000Draconus^000000,";
mes "and our world will be at in peace.";
next;
mes "[ Unknown Stone ]";
mes "Are you willing to help us on our problem?";
switch(select("No. I'm Scared:Yes! for Prosperity!")){
case 1:
next;
mes "[ Unknown Stone ]";
mes "Oh my.. I thought you are the chosen one.";
mes "my big mistake..!";
close;

case 2:
next;
mes "[ Unknown Stone ]";
mes "^FA5000Old Man, Theus^000000 knows all about the history";
mes "of this dungeon.";
next;
mes "[ Unknown Stone ]";
mes "Theus will ask you to find him some items and kill some monsters";
next;
mes "[ Unknown Stone ]";
mes "Talk to ^FA5000Old Man, Theus^000000,";
mes "you can locate him in Caspen Fields.";
next;
mes "[ Unknown Stone ]";
mes "Good luck and Take care.!";
quest = 1;
close;
}
if( quest == 1 ){
mes "[ Unknown Stone ]";
mes "You must ask ^FA5000Old Man, Theus^000000 on other informations.";
close;
}
}
}

casp_fild01,186,55,4 script Old Man Theus 120,{
if ( item_need_req == 1 ){
mes "[ Theus ]";
mes "Oh.. you've returned!";
mes "isn't it difficult?";
switch(select("Piece of Cake.:LOL....")){
case 1:
if(countitem(909) < 100){
next;
mes "[ Theus ]";
mes "Insuficient item requirements";
mes "Come back again if you collect what i've said";
close;
}
else {
next;
mes "[ Theus ]";
mes "Ohh! Well done.";
mes "here's my next request on you";
next;
mes "[ Theus ]";
mes "You must Kill these Monsters.";
mes "10 Poring";
mes "10 Fabre";
set monster_kill,1;
close;
}

case 2:
next;
mes "[ Theus ]";
mes "...........??";
close;
}
mes "lalalala~~";
close;
}
else
if ( monster_kill == 1 ) {
if ( kill_monster_count < 10 && kill_monster_count2 < 10 ) {
mes "kill not enough poring";
close;
}
mes "well done, go talk to npc1";
quest = 3;
kill_poring_count = 0;
close;

if ( quest == 1 ) {
mes "[ Theus ]";
mes "So you must be "+strcharinfo(0)+",";
mes "the one who sent by our Gate keeper.";
next;
mes "[ Theus ]";
mes "So, are you ready to explore Caspen Dungeons?";
switch(select("No~ Thank you.:Yes, I'm excited.")){
case 1:
next;
mes "[ Theus ]";
mes "Don't Talk to me.";
emotion e_shy;
close;

case 2:
next;
mes "[ Theus ]";
mes "Before you can Enter the Dungeon";
mes "you must finished my requirements to you";
next;
mes "[ Theus ]";
mes "bring me these items.";
mes "^00FF00100 Jellopies^000000";
set item_need_req,1;
close;
}

mes "then go kill 10 poring";
quest = 2;
close;
}
mes "lalalala~~";
close;
OnNPCKillEvent:
if ( quest == 2 && killedrid == 1002 && kill_monster_count < 10 )
if ( quest == 2 && killedrid == 1007 && kill_monster_count2 < 10 )
dispbottom "poring killed ["+ kill_monster_count++ +"/10]";
dispbottom "fabre killed ["+ kill_monster_count2++ +"/10]";
end;
}
}

// Warp Portals
casp_dun02,132,109,0 warp casp_dun1-1 1,1,casp_dun01,275,265

Here's my Modified Script @AnnieRuru.. please check what is my problem.

prob 1: i can't click the npc2 "old man theus" after talking to "unknown stone"

prob 2, how can i set the dispbottom to show 2 monsters? only shows one.

Bump!

Edited by Rage
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  


casp_dun01,279,262,1	script	#azergthyjuhgfd1	45,2,2,{
if ( quest_done & 1 << 0 )
	warp "casp_dun02",133,114;
else {
	mes "[ Caspen Gatekeeper ]";
	mes ".....";
	close2;
	warp "casp_dun01",275,265;
}
end;
}

casp_dun01,273,269,1	script	Unknown Stone	111,{
if ( quest_done & 1 << 0 )
	mes ".............";
else if ( quest & 1 << 3 ) {
	mes "Congratulations! "+strcharinfo(0)+",";
	mes "i wish you are the one who can defeat";
	mes "^FF0000Draconus^000000";
	next;
	mes "You can now enter Level 2 Dungeon";
	announce ""+strcharinfo(0)+" can now access Caspen Dungeons Level 2! Congratulations!",bc_all;
	quest_done = 1 ;
	quest = 0; // save memory;
}
else if ( quest == 0 ) {
	mes "[ Unknown Stone ]";
	mes "God's given us powers to use it on good ways.";
	next;
	mes "[ Unknown Stone ]";
	mes "But some monsters abuse it and use it in evil,";
	mes "help us to defeat ^FF0000Draconus^000000,";
	mes "and our world will be at in peace.";
	next;
	mes "[ Unknown Stone ]";
	mes "Are you willing to help us on our problem?";
	switch(select("No. I'm Scared:Yes! for Prosperity!")) {
		case 1:
			next;
			mes "[ Unknown Stone ]";
			mes "Oh my.. I thought you are the chosen one.";
			mes "my big mistake..!";
			close;

		case 2:
			next;
			mes "[ Unknown Stone ]";
			mes "^FA5000Old Man, Theus^000000 knows all about the history";
			mes "of this dungeon.";
			next;
			mes "[ Unknown Stone ]";
			mes "Theus will ask you to find him some items and kill some monsters";
			next;
			mes "[ Unknown Stone ]";
			mes "Talk to ^FA5000Old Man, Theus^000000,";
			mes "you can locate him in Caspen Fields.";
			next;
			mes "[ Unknown Stone ]";
			mes "Good luck and Take care.!";
			quest = 1;
	}
}
else {
	mes "[ Unknown Stone ]";
	mes "You must ask ^FA5000Old Man, Theus^000000 on other informations.";
}
close;
}

casp_fild01,186,55,4	script	Old Man Theus	120,{
if ( quest & 1 << 0 ) {
	mes "[ Theus ]";
	mes "So you must be "+strcharinfo(0)+",";
	mes "the one who sent by our Gate keeper.";
	next;
	mes "[ Theus ]";
	mes "So, are you ready to explore Caspen Dungeons?";
	switch(select("No~ Thank you.:Yes, I'm excited.")){
		case 1:
			next;
			mes "[ Theus ]";
			mes "Don't Talk to me.";
			emotion e_shy;
			close;

		case 2:
			next;
			mes "[ Theus ]";
			mes "Before you can Enter the Dungeon";
			mes "you must finished my requirements to you";
			next;
			mes "[ Theus ]";
			mes "bring me these items.";
			mes "^00FF00100 Jellopies^000000";
			quest = 1 << 1;
			close;
	}
}
else if ( quest & 1 << 1 ) {
	mes "[ Theus ]";
	mes "Oh.. you've returned!";
	mes "isn't it difficult?";
	switch(select("Piece of Cake.:LOL....")) {
		case 1:
			if(countitem(909) < 100){
				next;
				mes "[ Theus ]";
				mes "Insuficient item requirements";
				mes "Come back again if you collect what i've said";
			}
			else {
				next;
				mes "[ Theus ]";
				mes "Ohh! Well done.";
				mes "here's my next request on you";
				next;
				mes "[ Theus ]";
				mes "You must Kill these Monsters.";
				mes "10 Poring";
				mes "10 Fabre";
				quest = 1 << 2;
			}
			close;

		case 2:
			next;
			mes "[ Theus ]";
			mes "...........??";
			close;
	}
}
else if ( quest & 1 << 2 ) {
	if ( kill_monster_count < ( 10 << 0 ) + ( 10 << 4 ) ) {
		mes "kill not enough poring & fabre";
		close;
	}
	mes "well done, go talk to npc1";
	quest = 1 << 3;
	kill_poring_count = 0;
	close;
}
mes "lalalala~~";
close;
OnNPCKillEvent:
if ( ( quest & 1 << 2 ) && ( killedrid == 1002 || killedrid == 1007 ) ) {
	.@count = ( killedrid == 1002 ? 0 : 1 );
	if ( ( kill_monster_count >> 4 * .@count ) % ( 1 << 4 ) < 10 ) {
		kill_monster_count = kill_monster_count + ( 1 << 4 * .@count );
		dispbottom ( killedrid == 1002 ? "poring" : "fabre" ) +" killed ["+ ( ( kill_monster_count >> 4 * .@count ) % ( 1 << 4 ) ) +"/10]";
	}
}
end;
}

// Warp Portals
casp_dun02,132,109,0	warp	casp_dun1-1 1,1,casp_dun01,275,265

Edit:

@AnnieRuru

I just tried to point

if ( quest_done & 1 << 0 )

was harder to read than

 if ( quest_done )

~

Edited by Capuche
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...