Jump to content
  • 0

NPC item giver for test server


Question

Posted

I'm trying to put on a test server a simple npc to test the items, which to any player (also non-GM players) asks him for the ID and quantity of the item he wants and gives it to him... if the id is not exists, he writes it!
I could simply activate the "@item" command to all players but I need this system to be a script and not a command... any suggestions?

3 answers to this question

Recommended Posts

  • 0
Posted
mes "quantity";

input .@q;

next;

mes "item id";

input .@i;

if(getiteminfo(.@i,2)<=0){

setarray $item_non_exist[getarraysize($item_non_exist)],.@i;

clear;

mes "non existed";

close;

}

getitem .@i,.@q;

mes "Here you go";

close;

 

  • Love 1
  • 0
Posted (edited)

change getiteminfo type  (doc/script_command (Find *getiteminfo), doc/item_db (For type list)).

Edited by Start_

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