Jump to content
  • 0

Item to Box Converter


greenieken

Question


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  154
  • Reputation:   1
  • Joined:  05/02/12
  • Last Seen:  

Hello. 

Can anyone help me edit this script?

https://pastebin.com/raw/UKr5WjMH

 

This one converts 100ygg into a ygg box. I wanted this npc to convert multiple items into box.

Example: 100 ygg seed to box, 100 box of drowsiness to box and so on

 

Thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   233
  • Joined:  07/24/13
  • Last Seen:  

6 hours ago, greenieken said:

Hello. 

Can anyone help me edit this script?

https://pastebin.com/raw/UKr5WjMH

 

This one converts 100ygg into a ygg box. I wanted this npc to convert multiple items into box.

Example: 100 ygg seed to box, 100 box of drowsiness to box and so on

 

Thanks!

prontera,150,190,4	script	Example_changer	83,{ 
	mes "Hello!";
	mes "I can pack your items in the box.";
	mes "What items you want to pack?";
	next;
	.@i = select(.menu$+"Cancel")-1;
	if(.@i == getarraysize(.boxid)) {
		mes "Bye~";
		close;
	}
	mes "To make "+getitemname(.boxid[.@i]);
	mes "I need ^0000FF"+getitemname(.item[.@i])+"^000000 - "+.amount[.@i]+" ea.";
	next;
	select("Ok");
	if(countitem(.item[.@i]) < .amount[.@i]) {
		mes "You don`t have enough items.";
		close;
	}
	mes "Here your "+getitemname(.boxid[.@i])+"~";
	delitem .item[.@i], .amount[.@i];
	getitem .boxid[.@i],1;
	close;

OnInit:
	setarray .item[0],	608,	607;
	setarray .amount[0],	30,	15;
	setarray .boxid[0],	12534,	12535;
	for( .@i = 0; .@i < getarraysize(.boxid); .@i++ )
		.menu$ = .menu$ + getitemname(.boxid[.@i])+":";
	end;
}

Hi, i write a simple script for you, you can add new item and box after OnInit.
If you want to show items name and ea. change
.menu$ = .menu$ + getitemname(.boxid[.@i])+":";
to
.menu$ = .menu$ + getitemname(.item[.@i])+" - "+.amount[.@i]+" ea.:";

Edited by Balfear
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...