Jump to content
  • 0

Incorporating #item in an NPC.


noheavenuro

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/25/12
  • Last Seen:  

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 .@prize;

input .@prizeqty;

charcommand "#item .plname$ .@prize .@prizeqty";

}

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/25/12
  • Last Seen:  

Thanks Emistry.

Will try this.

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