Jump to content
  • 0

Can you give me an example of story line quest! thanks


jangelo

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/17/12
  • Last Seen:  

can anyone give me an example of a story quest. npc to another Npc script thanks ! /??

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Jangelo:

dude your the one who help me with my quest.. i dont understnd what is this all about lemon = 1 ?o,o what if i want my quest make 10npc before completing o,o.. what should i do? for example in npc 1.. hello this is blah blah. go to my frnds and etc

 

Here is your request. It just need some minor adjustments. Feel free to modify the whole script. :)
 

- script Quest_Quest -1,{

OnInit:

setarray $QReq[0],501,502,503,504,505,506,507,508,509,510; // Input Quest Requirements here, you can add or remove.

setarray $Prize[0],501,502,503,504,505,506,507,508,509,510; // Input Prizes here, you can add or remove.

setarray $Amount[0],1,1,1,1,1,1,1,1,1,1; // Amount of items to be deleted in for statement.

/*

lemon = Variable to determine what quest is set or attach to the player.

*/



}



city,84,317,5 script DudeMan 665,{



//I always like to index quest variables at the top

if(lemon == 1){goto QUESTNAME1;} if(lemon == 2){goto QUESTNAME2;} if(lemon == 3){goto QUESTNAME3;}

if(lemon == 4){goto QUESTNAME4;} if(lemon == 5){goto QUESTNAME5;} if(lemon == 6){goto QUESTNAME6;}

if(lemon == 7){goto QUESTNAME7;} if(lemon == 8){goto QUESTNAME8;} if(lemon == 9){goto QUESTNAME9;}

if(lemon == 10){goto QUESTNAME10;} if(lemon == 11){goto QUESTNAME11;}

if(lemon == 11){goto QUESTNAME12;}

mes "[DudeMan]";

mes "Go and punch Lemon and i will reward you.";

set lemon, 1;

close;

QUESTNAME1:

mes "[DudeMan]";

mes "Did you do it?";

mes "Come on, i know you didn't.";

close;

QUESTNAME2:

mes "[DudeMan]";

mes "Its seems you need to prepare first before punching that lemon.";

next;

mes "[DudeMan]";

​ mes "Now talk to orange! To find out how!";

    set lemon,3;

     close;

    QUESTNAME3:

     mes "[DudeMan]";

     mes "Did you talk already to Orange?";

     close;

    QUESTNAME4:

     mes "[DudeMan]";

     mes "So whats Orange did told you?";

     next;

     mes "[DudeMan]";

     mes "Ohh so he wanted you to talk to apple eh...";

     close;

    QUESTNAME5:

     mes "[DudeMan]";

     mes "Did you already punch Lemon?";

     close;

    QUESTNAME6:

     mes "[DudeMan]";

     mes "Whats the news man! Your talking it too long!";

     close;

    QUESTNAME 7:

     mes "[DudeMan]";

     mes "So whats Orange tell you to do now?";

     close;

    QUESTNAME 8:

     mes "[DudeMan]";

     mes "If you dont want to do what i told you i will not give you your prize!";

     close;

    QUESTNAME 9:

     mes "[DudeMan]";

     mes "Why the task taking you so long?";

     close;

    QUESTNAME 9:

     mes "[DudeMan]";

     mes "OMG! It taking my patient off!";

     close;

    QUESTNAME 10:

     mes "[DudeMan]";

     mes "Yeah! Im waiting for that chance! I will now avenge my lose to that woman!";

     close;

    QUESTNAME 11:

     mes "[DudeMan]";

mes "Hehe, you showed that idiot.";

next;

mes "[DudeMan]";

mes "Now here is your reward!";

set .@prize,$Prize[rand(getarraysize($Prize))]; // Seting random Prize in the list above

     set .@amount,rand(5,10); // Setting random amount of prize

     getitem .@prize,.@amount;

close;

QUESTNAME11:

mes "[DudeMan]";

mes "Thanks buddy! I owe you one!";

close;

}//End of DudeMan



city,85,300,5    script    Orange    665,{

    if(lemon == 3) {goto QUESTNAME1;}

if(lemon == 4) {goto QUESTNAME2;}

    if(lemon == 5) {goto QUESTNAME3;}

    if(lemon == 6) {goto QUESTNAME4;}

    if(lemon == 7 && lemon == 8 && lemon == 9) {goto QUESTNAME5; }

    if(lemon == 10) {goto QUESTNAME6;} if(lemon == 11) {goto QUESTNAME7; }

    mes "[Orange]";

    mes "I Have no business with you....";

    close;

    

    QUESTNAME1:

    mes "[Orange]";

    mes "So, Dudeman got grudge on Lemon ehh...";

    next;

    mes "[Orange]";

    mes "In order to punch Lemon, you must first get "+getitemname($QReq[0])+" and "+getitemname($QReq[1])+" to Apple. Now talk to Apple";

    set lemon,4;

    close;

    QUESTNAME2:

    mes "[Orange]";

    mes "Did you already talked to Apple?...";

    close;

    QUESTNAME3:

    mes "[Orange]";

    mes "Wow good job! Now talk to Strawberry to get other items";

    close;

    QUESTNAME4:

    mes "[Orange]";

    mes "You are doing great! Now talk to Watermelon to get the remaining items.";

    mes "The items are the following "+getitemname($QReq[6])+", "+getitemname($QReq[7])+", "+getitemname($QReq[8])+" and "+getitemname($QReq[9])+".";

    close;

    QUESTNAME5:

    mes "[Orange]";

    mes "Im geting bored, you need to finish my task asap!";

    close;

    QUESTNAME6:

    mes "[Orange]";

    mes "Ok! Now you have the items, all you need to do is give them to orange and offer them for free. Then when he grabs the items go and punch him and run!";

    set lemon,12;

close;

QUESTNAME7:

mes "[Orange]";

mes "LOL! I wonder whats Lemon looks like when you punch him! That suit him for stealing my girl Strawberry!";

close;

}





city,150,200,5    script    Water Melon    665,{

    if(lemon == 6) {goto QUESTNAME1;}

    if(lemon == 9) {goto QUESTNAME2;}

    mes "[Water Melon]";

    set .@i,rand(1,2);

    if(.@i == 1){

    mes "Its a boring day!";

    close; }

    if(.@i == 2){

    mes "I wanted to sleep now, please stop bothering me!"

    close;}

    QUESTNAME1:

    mes "[Water Melon]";

    mes "So Apple like to have "+getitemname($QReq[6])+", "+getitemname($QReq[7])+", "+getitemname($QReq[8])+" and "+getitemname($QReq[9])+"?";

    next;

    mes "[Water Melon]";

    mes "I will give it to you but in one condition.";

    mes "You must give this "+getitemname(712)+" to Strawberry";

    getitem 712,1;

    set lemon8,

    close;



    QUESTNAME2:

    mes "[Water Melon]";

    mes "Wow thanks! im really shy giving the flower to straberry personally, thanks for your help!";

    mes "Here you go! This are your "+getitemname($QReq[6])+", "+getitemname($QReq[7])+", "+getitemname($QReq[8])+" and "+getitemname($QReq[9])+".";

    set Zeny,Zeny-500;

    getitem $QReq[6],1;

    getitem $QReq[7],1;

    getitem $QReq[8],1;

    getitem $QReq[8],9;

    set lemon,10;

    close;

}



city,87,200,5    script    Strawberry    665,{

    if(lemon == 5) {goto QUESTNAME1;}

    if(lemon == 8) {goto QUESTNAME2;}

    mes "[Straberry]";

    set .@i,rand(1,2);

    if(.@i == 1){

    mes "Its a great day today isnt it?";

    close; }

    if(.@i == 2){

    mes "I wonder where is my lover Lemon?"

    close;}

    QUESTNAME1:

    mes "[Straberry]";

    mes "So Apple like to have "+getitemname($QReq[3])+", "+getitemname($QReq[4])+" and "+getitemname($QReq[5])+"?";

    next;

    mes "[Straberry]";

    mes "I will give it to you cheap, because you are refered by Apple. It will cost 500Zeny.";

    next;

    if(Zeny < 500 ){

    mes "[Straberry]";

    mes "You dont have enought Zeny";

    close; }

    mes "[Straberry]";

    mes "Here you go! This are your "+getitemname($QReq[3])+", "+getitemname($QReq[4])+" and "+getitemname($QReq[5])+".";

    set Zeny,Zeny-500;

    getitem $QReq[3],1;

    getitem $QReq[4],1;

    getitem $QReq[5],1;

    set lemon,6;

    close;

    QUESTNAME2:

    if(countitem 712 == 0){

        mes "[Straberry]";

        mes "Why are you here for?";

        mes "Is there something wrong?";

        close; }

    mes "[Straberry]";

    mes "Wow im very thankful for this beautiful flowers! Please tell Water Melon my appreciation!";

    set lemon,10;

    delitem 712,1;

    close;

}

city,85,300,5    script    Apple    665,{

    if(lemon == 4) {goto QUESTNAME1;}

    mes "[Apple]";

    set .@i,rand(1,2);

    if(.@i == 1){

    mes "Selling Apples cheap! Want to buy?";

    close; }

    if(.@i == 2){

    mes "You will love this cheap Apples!"

    close; }

    

    QUESTNAME1:

    mes "[Apple]";

    mes "So, Orange told you something ehhh....";

    mes "He wants to have "+getitemname($QReq[0])+" and "+getitemname($QReq[1])+"?";

    next;

    mes "[Apple]";

    mes "Ok wait for a moment while im getting the items...";

    sleep2 1000;

    mes "........";

    sleep2 1000;

    mes "....";

    sleep2 1000;

    mes "Ok! here is your "+getitemname($QReq[0])+" and "+getitemname($QReq[1])+" now talk to Orange again.";

    getitem $QReq[0],1;

    getitem $QReq[1],1;

    set lemon,5;

    close;

}



city,84,317,5 script Lemon 665,{

if(lemon == 1){goto QUESTNAME1;}

if(lemon == 10){goto QUESTNAME2;}

if(lemon == 11){goto QUESTNAME3;}



mes "[Lemon]";

mes "This script is UNNACEPTABLEEEEEE!.";

close;

    

QUESTNAME1:

    mes "[Lemon]";

    mes "Please bug off!";

    set lemon, 2;

    close;

    

QUESTNAME2:

for (.@i = 0; .@i < getarraysize($QReq); .@i++){ // For Statement

        if (countitem($QReq[.@i]) < 1 ){ // Check the requirements.

            message "I wonder how can sneak and punch Lemon";

             }

    }

dispbottom "You punch him really hard in the belly.";

sleep2 2000;

emotion e_sob;

mes "[Lemon]";

mes "w... why?";

sleep2 3000;

emotion e_sob;

mes "That hurts!";

set lemon, 11;

for (.@i = 0; .@i < getarraysize($QReq); .@i++) delitem $QReq[.@i], $Amount[.@i];    // Delete all items. (For statement)

close;



QUESTNAME3:

emotion e_sob;

mes "[Lemon]";

mes "Please don't hurt me!";

close;

}//End of Lemon
Edited by Lil Troll
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

-    script    Quest_Quest    -1,{
OnInit:
setarray    $QReq[0],501,502,503,504,505,506,507,508,509,510;  // Input Quest Requirements here 

}

city,84,317,5    script    DudeMan    665,{
    
    //I always like to index quest variables at the top
    if(lemon == 1){goto QUESTNAME1;}
    if(lemon == 2){goto QUESTNAME2;}
    
    mes "[DudeMan]";
    mes "So... you will blahblah, go and punch Lemon.";
    set lemon, 1;
    close;
    
    QUESTNAME1:
        mes "[DudeMan]";
        mes "Did you do it?";
        mes "Come on, i know you didn't.";
        close;
    QUESTNAME2:
        mes "[DudeMan]";
        mes "Hehe, you showed that idiot.";
        next;
        mes "[DudeMan]";
        mes "What? Did you expect a reward? You went and punched a guy for no reason, fuck off!";
        close;
    
}//End of DudeMan

city,84,317,5    script    Lemon    665,{
    if(lemon == 1){goto QUESTNAME1;}
    if(lemon == 2){goto QUESTNAME2;}
    
    mes "[Lemon]";
    mes "This script is UNNACEPTABLEEEEEE!.";
    close;

    QUESTNAME1:
        set .@req,getarraysize($QReq);
        for ( .@i = 0; .@i < .@req; .i++ ) {
        if (countitem(.@req[.@i])<1) {
        dispbottom "Its seems there is something wrong! I cant punch the lemon!";
        close;
        }
        dispbottom "You punch him really hard in the belly.";
        sleep2 2000;
        emotion e_sob;
        mes "[Lemon]";
        mes "w... why?";
        sleep2 3000;
        emotion e_sob;
        mes "That hurts!";
        set lemon, 2;
        close;
        
    QUESTNAME2:
        emotion e_sob;
        mes "[Lemon]";
        mes "Please don't hurt me!";
        close;
}//End of Lemon

try this one (above), if not working just say so. :)

 

 

and the easy way to understand(below):

city,84,317,5    script    DudeMan    665,{
    
	//I always like to index quest variables at the top
    if(lemon == 1){goto QUESTNAME1;}
    if(lemon == 2){goto QUESTNAME2;}
    
    mes "[DudeMan]";
    mes "So... you will blahblah, go and punch Lemon.";
    set lemon, 1;
    close;
    
    QUESTNAME1:
        mes "[DudeMan]";
        mes "Did you do it?";
        mes "Come on, i know you didn't.";
        close;
    QUESTNAME2:
        mes "[DudeMan]";
        mes "Hehe, you showed that idiot.";
        next;
        mes "[DudeMan]";
        mes "What? Did you expect a reward? You went and punched a guy for no reason, fuck off!";
        close;
    
}//End of DudeMan
 
city,84,317,5    script    Lemon    665,{
    if(lemon == 1){goto QUESTNAME1;}
    if(lemon == 2){goto QUESTNAME2;}
    
    mes "[Lemon]";
    mes "This script is UNNACEPTABLEEEEEE!.";
    close;
 
    QUESTNAME1:
	if (countitem(501)<1 && countitem(502)<1 && countitem(503)<1 )  {
		mes "You need to get a set of "+getitemname(501)+","+getitemname(502)+","+getitemname(503)+" to punch the lemon!";
		close;
	}

        dispbottom "You punch him really hard in the belly.";
        sleep2 2000;
        emotion e_sob;
        mes "[Lemon]";
        mes "w... why?";
        sleep2 3000;
        emotion e_sob;
        mes "That hurts!";
        set lemon, 2;
        close;
        
    QUESTNAME2:
        emotion e_sob;
        mes "[Lemon]";
        mes "Please don't hurt me!";
        close;
}//End of Lemon
 QUESTNAME1:
	if (countitem(501)<1 && countitem(502)<1 && countitem(503)<1 )  {
		mes "You need to get a set of "+getitemname(501)+","+getitemname(502)+","+getitemname(503)+" to be able to punch the lemon!
		close;
	}

change item id in the upper box ^^^^ 501,502,503

Edited by Lil Troll
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   3
  • Joined:  05/27/12
  • Last Seen:  

Not exactly sure of what you want.

 

You mean, an NPC advancing a story so another NPC gives you a different dialog? That would be like this:

 

city,84,317,5	script	DudeMan	665,{
	//I always like to index quest variables at the top
	if(lemon == 1){goto QUESTNAME1;}
	if(lemon == 2){goto QUESTNAME2;}
	
	mes "[DudeMan]";
	mes "So... you will blahblah, go and punch Lemon.";
	set lemon, 1;
	close;
	
	QUESTNAME1:
		mes "[DudeMan]";
		mes "Did you do it?";
		mes "Come on, i know you didn't.";
		close;
	QUESTNAME2:
		mes "[DudeMan]";
		mes "Hehe, you showed that idiot.";
		next;
		mes "[DudeMan]";
		mes "What? Did you expect a reward? You went and punched a guy for no reason, fuck off!";
		close;
	
}//End of DudeMan

city,84,317,5	script	Lemon	665,{
	if(lemon == 1){goto QUESTNAME1;}
	if(lemon == 2){goto QUESTNAME2;}
	
	mes "[Lemon]";
	mes "This script is UNNACEPTABLEEEEEE!.";
	close;

	QUESTNAME1:
		dispbottom "You punch him really hard in the belly.";
		sleep2 2000;
		emotion e_sob;
		mes "[Lemon]";
		mes "w... why?";
		sleep2 3000;
		emotion e_sob;
		mes "That hurts!";
		set lemon, 2;
		close;
		
	QUESTNAME2:
		emotion e_sob;
		mes "[Lemon]";
		mes "Please don't hurt me!";
		close;
}//End of Lemon

That's the format I like to use, with some sleeps to make it more pretty.

 

Now, personally I don't like to use player variables. It depends on your emulator but they used to be a limited amount of player variables (256?). Since I'm kinda obsessive and we have many quests better made my own questing system xD (limits are scary!)

Edited by Francisco
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/17/12
  • Last Seen:  

what about npc nid a requirements before go to another quest.. thanks in advance sir /ok

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