Jump to content
  • 0

Shop Script


Ukiram

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

new_1-1,44,103,5	script	Basic Weapons	100,{
   mes "select an item to buy";
   next;
   .@s = select( .menu$ ) -1;
   if ( countitem( .itemuse ) < .sellcost[.@s] ) {
       mes "not enough "+ getitemname( .itemuse );
       close;
   }
   delitem .itemuse, .sellcost[.@s];
   getitem2 .sellitem[.@s], 1,1,10,0, 0,0,0,0;
   close;
OnInit:
   setarray .sellitem, 28113, 1201, 1301;
   setarray .sellcost, 10, 20, 30;
   set .itemuse, 7929;
   .@size = getarraysize( .sellitem );
   for ( .@i = 0; .@i < .@size; .@i++ )
    .menu$ = .menu$ + getitemname( .sellitem[.@i] )+" +10 [Cost -> "+ .sellcost[.@i] +"]:";
   end;
}

Hi, can i request this script to buy using zeny.

I want it to change to instead of item, i can buy using zeny?

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

-	script	Basic Weapons	-1,{
	mes "[ Basic Weapons ]";
	mes "What item do you wish to purchase?";
	next;
	.@s = select(.menu$) - 1;
	if(Zeny < .zeny[.@s]){
		mes "[ Basic Weapons ]";
		mes "You don't have enough zeny.";
		close;
	}
	Zeny -= .zeny[.@s];
	getitem2 .sellitem[.@s],1,1,10,0,0,0,0,0;
	close;
OnInit:
	setarray .sellitem, 28113,1201,1301;
	setarray .zeny, 1,2,3;
	for(.@i = 0; .@i < getarraysize(.sellitem); .@i++)
		.menu$ = .menu$ + getitemname(.sellitem[.@i])+" +10 [Cost -> "+.zeny[.@i]+"]:";
end;
}

Untested.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

4 minutes ago, Moooooon-Aisha said:

-	script	Basic Weapons	-1,{
	mes "[ Basic Weapons ]";
	mes "What item do you wish to purchase?";
	next;
	.@s = select(.menu$) - 1;
	if(Zeny < .zeny[.@s]){
		mes "[ Basic Weapons ]";
		mes "You don't have enough zeny.";
		close;
	}
	Zeny -= .zeny[.@s];
	getitem2 .sellitem[.@s],1,1,10,0,0,0,0,0;
	close;
OnInit:
	setarray .sellitem, 28113,1201,1301;
	setarray .zeny, 1,2,3;
	for(.@i = 0; .@i < getarraysize(.sellitem); .@i++)
		.menu$ = .menu$ + getitemname(.sellitem[.@i])+" +10 [Cost -> "+.zeny[.@i]+"]:";
end;
}

Untested.

Hi where's the NPC coor?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

2 minutes ago, Ryo Osaki said:

Hi where's the NPC coor?

Just add it on your own, just copy-paste the header of your original NPC on it.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

I will replace this 

-	script	Basic Weapons	-1,{

to

new_1-1,44,103,5	script	Basic Weapons	100,{

?

Lol, I'm just make sure. Because, he changed my script to that. I'm curious. lol. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}

^ why not use that?

Edited by Mabuhay
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

1 minute ago, Mabuhay said:

<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}

^ why not use that?

my script if you buy the item it has automatic refine to +10

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

ahh i see, didnt read the script. My bad.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

4 minutes ago, Ryo Osaki said:

I will replace this 


-	script	Basic Weapons	-1,{

to

 


new_1-1,44,103,5	script	Basic Weapons	100,{

?

just duplicate the npc

prontera,150,150,4	duplicate(Basic Weapons)	Basic Weapons#prt	4_DOG01

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

4 hours ago, Mabuhay said:

ahh i see, didnt read the script. My bad.

Yes, its okay. Thanks.

4 hours ago, Bringer said:

just duplicate the npc


prontera,150,150,4	duplicate(Basic Weapons)	Basic Weapons#prt	4_DOG01

 

I already done and fixed it. I'm just asking why did he changed the header. Hmm. ?

By the way, thanks @Moooooon-Aisha

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

please stay cool and don't go off-topic

stay on the topic or we would be forced to lock this post

if you found your answer , please mark it as an answer and if you have another question , open a new topic with that question

if it's a personal question , you can ask the person in the private messages if he agree to contact you (i am talking about all who are moving off-topic)

  • Upvote 1
  • Love 2
  • Like 1
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...