Jump to content
  • 0

How to create an NPC to deliver items by unique_id?


Tdi123

Question


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.04
  • Content Count:  192
  • Reputation:   3
  • Joined:  12/12/17
  • Last Seen:  

Example:

prontera,150,150,3 script pack 99,{

  mes "[Pack]";

  mes "Do you want to receive your pack right now?";

  next;
    switch(select("Yes, please:No, Thanks!")) {
        case 1:

               close2;

              getitem 607,3;

               end;

        case 2:

               close;

}

}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   167
  • Joined:  04/05/13
  • Last Seen:  

Which UID do you mean

- UID of item

- UID of Account ID

- UID of Char ID

Or something else?

Edited by Start_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.04
  • Content Count:  192
  • Reputation:   3
  • Joined:  12/12/17
  • Last Seen:  

On 4/25/2022 at 11:47 AM, Start_ said:

Which UID do you mean

- UID of item

- UID of Account ID

- UID of Char ID

Or something else?

Unique_ID of Account ID, by: Gepard Shield

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

prontera,150,150,3 script pack 99,{
  .@unique_id$ = get_unique_id();
  mes "[Pack]";
  if(.@unique_id$) {
	  mes "You already received this.";
	  close;
  }
  mes "Do you want to receive your pack right now?";
  next;
    switch(select("Yes, please:No, Thanks!")) {
        case 1:
			close2;
			getitem 607,3;
			.@unique_id$ = 1;
			end;
        case 2:
            close;
	}
}

I just added the unique_id check from gepard, you can add check for char or account to make it more secure.

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