Jump to content
  • 0

npc that adds slot into glasses


ADM Ytallo

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   3
  • Joined:  09/02/18
  • Last Seen:  

I need a npc that puts slots in the sunglasses with a rate of 10%

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

function	script	F_MesItemInfo	{
    .@item = getarg(0);
    return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", getitemname(.@item), .@item);
}

prontera,155,185,5	script	skdfjhskdf	1_F_MARIA,{
	if ( !countitem(2201) ) {
		mes "I need a "+ F_MesItemInfo(2201);
		close;
	}
	if ( Zeny < 1000 ) {
		mes "you don't have a thousand zeny";
		close;
	}
	disable_items;
	mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	if ( !countitem(2201) ) { // just a double check
		mes "I need a "+ F_MesItemInfo(2201);
		close;
	}
	if ( Zeny < 1000 ) {
		mes "you don't have a thousand zeny";
		close;
	}
	Zeny -= 1000;
	if ( rand(100) < 10 ) {
		delitem 2201, 1;
		getitem 2202, 1;
		mes "your "+ F_MesItemInfo(2201) +" now has slot";
		emotion ET_BEST;
	}
	else {
		delitem 2201, 1;
		mes "it fails";
		emotion ET_SORRY;
	}
	close;
}

script_commands.txt is your best friend

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,155,185,5	script	skdfjhskdf	1_F_MARIA,{
	if ( !countitem(2201) ) {
		mes "I need a sunglasses";
		close;
	}
	disable_items;
	mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	if ( !countitem(2201) ) { // just a double check
		mes "I need a sunglasses";
		close;
	}
	if ( rand(100) < 10 ) {
		delitem 2201, 1;
		getitem 2202, 1;
		mes "your sunglasses now has slot";
	}
	else {
		delitem 2201, 1;
		mes "it fails";
	}
	close;
}

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   3
  • Joined:  09/02/18
  • Last Seen:  

6 hours ago, AnnieRuru said:

prontera,155,185,5	script	skdfjhskdf	1_F_MARIA,{
	if ( !countitem(2201) ) {
		mes "I need a sunglasses";
		close;
	}
	disable_items;
	mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	if ( !countitem(2201) ) { // just a double check
		mes "I need a sunglasses";
		close;
	}
	if ( rand(100) < 10 ) {
		delitem 2201, 1;
		getitem 2202, 1;
		mes "your sunglasses now has slot";
	}
	else {
		delitem 2201, 1;
		mes "it fails";
	}
	close;
}

 

very good . I want him to order a thousand zenys. and tells me how I put emotion when the process fails..: )

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