Jump to content
  • 0

R> NPC THAT COMBINES ITEM,


Critica

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

HI can someone help me make a script NPC that let you combine items when you have the requirments, its kinda like the quest item NPC's but there is nothing to choose which item to build.. it will just automatically build the item for you if you have the right item required, and will fail if its not the right items,

i saw a script like this before in eathena,, but i cant find it now /sob(

can someone help me? i really appriciate it T.Y. =) (pardon my english)

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

assuming you already know the format how to start an npc, here's the sample code.

(if not, you might want to read about scripting before you proceed. you might not want to count on anybody here to feed you what you would always need.)

map_name,123,123,4<tab>script<tab>NameOfNpc<tab>826,{
mes "[NameOfNpc]";
mes "";
next;
if(countitem(909) > 99 && countitem(910) > 99)
{
 mes "[NameOfNpc]";
 mes "Trade your jellopies and garlets for an oridecon?";
 switch(select("Yes","No"))
 {
  case 1:
delitem 909, 100;
delitem 910, 100;
getitem 984, 1;
next;
mes "-trade success-";
close;
  break;
  case 2:
mes "-trade cancelled-";
close;
  break;
 }
}
else // if(!countitem(909) > 99 && !countitem(910) > 99)
{
 mes "[NameOfNpc]";
 mes "Please do come back if you gather the items...";
 close;
}
}

that one's for the full npc.

if you want a one-click-npc, this one's for you.

map_name,123,123,4<tab>script<tab>NameOfNpc<tab>826,{
if(countitem(909) > 99 && countitem(910) > 99)
{
delitem 909, 100;
delitem 910, 100;
getitem 984, 1;
Emotion e_no1;
end;
}
else // if(!countitem(909) > 99 && !countitem(910) > 99)
{
Emotion e_swt;
end;
}
}

* please do correct me if there is something wrong with my coding. /sob

Edited by Jhedzkie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

Basically...you use

if(countitem());

delitem

getitem

in seperate sections

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

hmm ok.. can you make it a full sript..??

what im talking about here, is like Horadic Cube in diablo.. which is basically the players will just guess the item requirments.. and if the items that they give on the npc were right, it will built the item.. and failed if they dont have the right items..

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