Jump to content

Question

Posted

Hello everyone! Good evening! Can you help me please? I need a quest NPC that has the following situation: in the first dialogue this NPC asks to deliver to him 10x YGG and 10x Red Potion, only after this delivery the NPC releases two options, both being Quests.

Menu 1: requests 10 YGG and 1 GTB letter and delivers 1 custom item ID 18200

Menu 2: requests 10 YGG, 10 red potions and 10 gold delivers 1 custom item ID 18201.

@rokimoki help pls

3 answers to this question

Recommended Posts

  • 0
Posted
prontera,150,180,4	script	QuestNPC	1002,{

    mes "Hello adventurer! Do you want to complete a mission?";
    if (getquest(9000) == -1) {
        mes "First, I need you to bring me some items.";
        if (countitem(607) >= 10 && countitem(501) >= 10) {
            mes "Great! You brought the required items.";
            delitem 607,10;
            delitem 501,10;
            setquest 9000;
        } else {
            mes "Bring me 10 Yggdrasil Berry and 10 Red Potions.";
            close;
        }
    }
    
    mes "Now you can choose one of the missions!";
    set .@menu, select("Mission 1:Mission 2:Exit");
    if (.@menu == 1) {
        if (countitem(607) >= 10 && countitem(4145) >= 1) {
            mes "Well done! Here is your reward.";
            delitem 607,10;
            delitem 4145,1;
            getitem 18200,1;
        } else {
            mes "You need to bring 10 Yggdrasil Berry and 1 GTB Card.";
        }
    } else if (.@menu == 2) {
        if (countitem(607) >= 10 && countitem(501) >= 10 && countitem(969) >= 10) {
            mes "Great job! Take your reward.";
            delitem 607,10;
            delitem 501,10;
            delitem 969,10;
            getitem 18201,1;
        } else {
            mes "You need to bring 10 Yggdrasil Berry, 10 Red Potions, and 10 Gold.";
        }
    }
    close;
}

 

would that be it? (made by chatgpt)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...