Jump to content
  • 0

Requesting Converter NPC... read below.


Question

10 answers to this question

Recommended Posts

Posted (edited)
if(countitem(card_id) && countitem(card_id) && countitem(card_id)){delitem card_id,1; delitem card_id,1; delitem card_id,1; getitem 7179, 10; }

Edited by Viole
Posted

can you guys make a full NPC script, im still noob in scripting...

a NPC that can convert 1 or more pcses of cards at the same time....

if (countitem(your_card)) { delitem your_card,1; getitem 7179,amount; }

else if (...)

else if (....) <---- what will i put hir?

thanks...

Posted

multiple card...and only 1 requirements..

its just like trade in, you will trade your mvp card to pods..

but each mvp card have different amount...

ex...

1 Garm Card = 10pods

1 Fallen Bishop Card = 50pods

1 Lightalzen MVP Card = 100pods

sorry for my bad english...

okei! ill try your script...

btw thank you for helping..

Posted
npc header {
 // Variable ID's
   .@cards[0],id1,id2,id3;       // Item ID's to Get as Reward (Card ID)    .@cards[0],a,b,c
   .@reqs[0],1001,1002,1003;     // Item ID's to Turn In                    .@reqs[0],a,b,c
   .@req_amount[0],10,50,100;    // Amount of Required Items to Turn in...  .@req_amount[0],a,b,c
                                 // all 'a' corresponds to 1 item, all 'b' corresponds to another, and all 'c' corresponds to another.

 // Welcome Dialog
   mes "Hello nub...";
   mes "Pick Something";

 // Create Menu
   set .@menu$, getitemname(.@cards[0]);
   for (set .@a, 1; .@a < getarraysize(.@cards); set .@a, .@a + 1) {
     set .@menu$, .@menu$ + ":" + .@cards[@a];
   }

 // Query Player Selection
   set .@choice, select(.@menu$) - 1;

 // Display Requirements of Selected Item
   mes "You will need: " + .@req_amount[.@choice] + " of " + .@reqs[.@choice];
   mes "Let me see if you have them...";

 // Check Requirements of Selected Item
   if (countitem(.@reqs[.@choice]) >= .@req_amount[.@choice]) {
     mes "Great! You do!";
     mes "Would you like to exchange?";

     // Requirements Verified - Ask Player to Swap
       if (select("Yes:No") == 1) {
         mes "Ok!";
         delitem .@reqs[.@choice], .@req_amount[.@choice];
         getitem .@cards[.@choice], 1;
         mes "Enjoy!";
       close;
       } 
       else {
         mes "Come back soon";
         close;
       }
   else {
     mes "Sorry you don't seem to have what I need...";
     close;
   }

}

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