Jump to content
  • 0

I need @itemmap


systemD2540

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  70
  • Reputation:   10
  • Joined:  07/17/14
  • Last Seen:  

I uesd rA lasted version can't compilte anything about @itemmap.diff

somebody can fix for me please

@rAthena 25654

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

Hi! Here's what I use, you wont need any source edits for this one:

-	script	itemmap	-1,{
OnInit:
    bindatcmd "itemmap",strnpcinfo(3)+"::OnAtcommand",99,99;
    end;
OnAtcommand:
		if ( .@atcmd_numparameters != 2 ) {
			message .@myname$, "Usage: "+ .@atcmd_command$ +" <item id> <amount>";
			end;
		}
		.atoi_id = atoi( .@atcmd_parameters$[0] );
		.atoi_amount = atoi( .@atcmd_parameters$[1] );
		.@myname$ = strcharinfo(0);
		if ( getiteminfo( .atoi_id,0 ) == -1 ) {
			message .@myname$, "Requesting to send an non-existing item ("+ .atoi_id +"). "+ .@atcmd_command$ +" failed.";
			end;
		}
		else if ( .atoi_amount < 1 ) {
			message .@myname$, "You can't send "+ .atoi_amount +" item. "+ .@atcmd_command$ +" failed.";
			end;
		}
		addrid(1);
		if(checkvending(strcharinfo(0))) { end; }
		else { getitem .atoi_id, .atoi_amount; }
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  70
  • Reputation:   10
  • Joined:  07/17/14
  • Last Seen:  

Oh thanks let me try and review later

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