Jump to content
  • 0

Quest Restriction per account use ONLY.


Rhen

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  06/25/13
  • Last Seen:  

Hello and Good day,

 

I need help regarding about adding a restriction to the Quest NPC we are currently working on.

The NPC should be able to reject the player once the quest has been done once. (Per account use)

 

Our server is currently running on eATHENA.

 

Thank you so much for the help!

 

Here is the script:

/*=========================================================
Lighthalzen Aura Quest
by Zephy
===========================================================
Description:
===========================================================
Simple quest NPC to obtain the Lighthalzen Aura item.
===========================================================
Additional Notes:
===========================================================
Changelog
	- Edited line 88. Switched the options.
	- Added more dialogue.
	- Changed dialogue a little.
=========================================================*/

amatsu,97,121,4	script	Nekomata	421,{


	mes .npc_name$;
 
	for(set .@i,0; .@i < getarraysize(.qitem); set .@i,.@i+1)
	{
		// Check if current item fails to meet prerequisite
		if(countitem(.qitem[.@i]) < .qamt)
		{
			
		mes "I am the Blue Queen's Guardian. I was born to protect and guard the forest... But now I have failed due to my lack of discipline the Queen's dragon died.";
            next;

			mes .npc_name$;
			mes "Do you wish to help me gather the materials needed for the resurrection of the Blue Queen's Dragon?";
           	        next;
    
            if(select("I will help you in your holy task.:Sorry, I don't want to help.") == 2)
            {
                mes .npc_name$;
                mes "Stop wasting my time!";
                close;
            }
 
            mes .npc_name$;
            mes "You are quite determined! Ha ha! I like your spirit!";
            next;
 
            mes .npc_name$;
            mes "Here are the materials needed for the Blue Queen's Dragon awaited resurrection.";
 
            // Loop to print out item requirements
            for(set .@j,0; .@j < getarraysize(.qitem); set .@j,.@j+1)
            {
                mes "^FF0000"+ .qamt[.@j] +"x - "+ getitemname(.qitem[.@j]) +"^000000";
            }
            
            close;
            
        }
    }
    


    // If player meets the required amount of items
    mes "EXCELLENT! Now we can revive the dragon! Let's make haste and prepare for the revival of the Blue Queen's Dragon!";
    next;
 
    mes .npc_name$;
    mes "Show me the materials!"; // change the dialogue
    next;
 
    if(select("No:Yes") == 1)
    {
        mes .npc_name$;
        mes "WHAT?! I told you! STOP WASTING MY TIME!"; 
        close;
    }
 
    mes .npc_name$;
    mes "I will go get your reward for the hard work and dedication for the Blue Queen."; 
 
    // Loop to delete all quest items
    for (set .@i,0; .@i < getarraysize(.qitem); set .@i,.@i+1)
    {
        delitem .qitem[.@i], .qamt[.@i];
    }
    
    next;
    
    mes .npc_name$;
    mes "......."; 
    next;
    mes "*CLANK* *CLINK* *CLANK*";
    next;
    mes "......";
    next;
    
    specialeffect 100;
    mes .npc_name$;
    mes "You will not be forgotten Noble wanderer, you name will now be included in the Blue Queen's kingdom history.";
    getitem .pitem, .pamt; // Get prize item
    next;
    close;

	
OnInit: 
    // Configuration
        // General
        set .npc_name$,"[^008800Nekomata^000000]"; // NPC's dialogue name
 
        // Items
        set .pitem,21605; // Prize item for completing the quest
        set .pamt,1; // Prize item amount
        setarray .qitem[0], 21606, 21607, 21608, 21609, 738, 7510, 7215, 7098, 7125, 7320, 7155, 7009, 7195, 7512, 964, 7317; // Quest items (IDs)
        setarray .qamt[0], 5, 5, 5, 5, 10, 20, 300, 250, 250, 300, 250, 250, 250, 250, 250, 600; // Quest item amount
    end;

}
Edited by Rhen
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

/*=========================================================
Lighthalzen Aura Quest
by Zephy
===========================================================
Description:
===========================================================
Simple quest NPC to obtain the Lighthalzen Aura item.
===========================================================
Additional Notes:
===========================================================
Changelog
	- Edited line 88. Switched the options.
	- Added more dialogue.
	- Changed dialogue a little.
=========================================================*/

amatsu,97,121,4	script	Nekomata	421,{


	mes .npc_name$;
 	if(#DoneQuest == 1)
	{
	mes "I am sorry it seems that you used me once";
	end;
	}
	for(set .@i,0; .@i < getarraysize(.qitem); set .@i,.@i+1)
	{
		// Check if current item fails to meet prerequisite
		if(countitem(.qitem[.@i]) < .qamt)
		{
			
		mes "I am the Blue Queen's Guardian. I was born to protect and guard the forest... But now I have failed due to my lack of discipline the Queen's dragon died.";
            next;

			mes .npc_name$;
			mes "Do you wish to help me gather the materials needed for the resurrection of the Blue Queen's Dragon?";
           	        next;
    
            if(select("I will help you in your holy task.:Sorry, I don't want to help.") == 2)
            {
                mes .npc_name$;
                mes "Stop wasting my time!";
                close;
            }
 
            mes .npc_name$;
            mes "You are quite determined! Ha ha! I like your spirit!";
            next;
 
            mes .npc_name$;
            mes "Here are the materials needed for the Blue Queen's Dragon awaited resurrection.";
 
            // Loop to print out item requirements
            for(set .@j,0; .@j < getarraysize(.qitem); set .@j,.@j+1)
            {
                mes "^FF0000"+ .qamt[.@j] +"x - "+ getitemname(.qitem[.@j]) +"^000000";
            }
            
            close;
            
        }
    }
    


    // If player meets the required amount of items
    mes "EXCELLENT! Now we can revive the dragon! Let's make haste and prepare for the revival of the Blue Queen's Dragon!";
    next;
 
    mes .npc_name$;
    mes "Show me the materials!"; // change the dialogue
    next;
 
    if(select("No:Yes") == 1)
    {
        mes .npc_name$;
        mes "WHAT?! I told you! STOP WASTING MY TIME!"; 
        close;
    }
 
    mes .npc_name$;
    mes "I will go get your reward for the hard work and dedication for the Blue Queen."; 
 
    // Loop to delete all quest items
    for (set .@i,0; .@i < getarraysize(.qitem); set .@i,.@i+1)
    {
        delitem .qitem[.@i], .qamt[.@i];
    }
    
    next;
    
    mes .npc_name$;
    mes "......."; 
    next;
    mes "*CLANK* *CLINK* *CLANK*";
    next;
    mes "......";
    next;
    
    specialeffect 100;
    mes .npc_name$;
    mes "You will not be forgotten Noble wanderer, you name will now be included in the Blue Queen's kingdom history.";
    getitem .pitem, .pamt; // Get prize item
    set #DoneQuest, 1;
    next;
    close;

	
OnInit: 
    // Configuration
        // General
        set .npc_name$,"[^008800Nekomata^000000]"; // NPC's dialogue name
 
        // Items
        set .pitem,21605; // Prize item for completing the quest
        set .pamt,1; // Prize item amount
        setarray .qitem[0], 21606, 21607, 21608, 21609, 738, 7510, 7215, 7098, 7125, 7320, 7155, 7009, 7195, 7512, 964, 7317; // Quest items (IDs)
        setarray .qamt[0], 5, 5, 5, 5, 10, 20, 300, 250, 250, 300, 250, 250, 250, 250, 250, 600; // Quest item amount
    end;

}

Try this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  06/25/13
  • Last Seen:  

Thank you so much! It worked :)

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