Jump to content
  • 0
noheavenuro

Incorporating #item in an NPC.

Question

I'm having trouble with my script.

I want to make it use the charcommand #item.

I want this to be as simple as possible.

Here's my test script.

quiz_01,186,195,4 script zor 802,{

input .plname$;

input [email protected];

input [email protected];

charcommand "#item .plname$ [email protected] [email protected]";

}

How this NPC might work:

It asks the name, then item number, then quantity of the item. Then when it's all set it uses #item to give the item directly to player inputted in the first inputBox.

But it always says "#item failed. Player not found.

Already tried adding double quotes("<name>") in the input the character name box, but it still says that.

Help. :(

Or a better script that gives items specifically to players at the whim of a GM.

I tried searching for this but all I keep seeing is the one that goddameit made. I like his script but I don't understand how to edit it to fit my needs. :/

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

prontera,155,181,5 script Sample 757,{
if( getgmlevel() > 80 ){
mes "Enter Items ID :";
mes " 0 = Cancel";
do{
 input [email protected];
 if( [email protected] < 1 ) close;
}while( getitemname( [email protected] ) == "null" );
mes "Enter Amount :";
input [email protected],1,30000;
mes "Enter Name :";
input [email protected]$;
next;
mes "Name : "[email protected]$;
mes "Item : "+getitemname( [email protected] );
mes "Amount : "[email protected];
if( select("Confirm:Cancel") == 1 ){
 if( !attachrid( getcharid(3,[email protected]$) ) )
  message strcharinfo(0),"Player not Found.";
 else{
  getitem [email protected],[email protected],getcharid(3,[email protected]$);
  message strcharinfo(0),"Item Sent";
  message [email protected]$,"You Received item from "+strcharinfo(0);
 }
}
}
close;
}

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.