Jump to content
  • 0

Simple Poring Coin Shop


Killmesoftly

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  73
  • Reputation:   6
  • Joined:  06/16/12
  • Last Seen:  

I am just looking for a simple poring coin shop, i've been searching and people recommends dynamic shop, but every dynamic script doesnt fit to what i need, i just want a simple shop just like a tool dealer, but when you buy instead of zeny you pay with poring coins, most of them after clicking the npc's pop up's a menu where there are like shop 1 shop 2 shop 3, i dont want any menu to appear, just a normal shop.

 

thank you in advance.

Edited by Killmesoftly
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

-	shop	custom_seller2	-1,501:20
prontera.gat,95,99,5	script	Poring Coin Shop	100,{
	mes "I will sell you items for " + getitemname(.CoinID) + ".";
	callshop "custom_seller2",1;
	npcshopattach "custom_seller2";
	end;
	OnBuyItem:
	for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) {
		for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) {
			if(@bought_nameid[.@d]==.customs[.@i]) {
				if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) {
					if(countitem(.CoinID) >= .Price[.@i]*@bought_quantity[.@d]) {
						delitem .CoinID,.Price[.@i]*@bought_quantity[.@d];
						getitem @bought_nameid[.@d],@bought_quantity[.@d];
					} else dispbottom "You don't have enough "+getitemname(.CoinID)+" to purchase that item.";
				} else dispbottom "Purchasing these items will put you over the weight limit!";
			}
		}
	}
	deletearray @bought_quantity, getarraysize(@bought_quantity);
	deletearray @bought_nameid, getarraysize(@bought_nameid);
	close;

OnInit:
	setarray .customs[0],12103,607,678;// Enter the ID of customs here
	set .CoinID,7539; // Enter the ID of the coin here.
	setarray .Price[0],20,40,300; // Price for each custom is set to 20 coins
	npcshopitem "custom_seller2",0,0; // Don't touch any coding beyond here
	for(set .i,0; .customs[.i]; set .i,.i+1) npcshopadditem "custom_seller2",.customs[.i],.Price[.i];
	end;
}

 

Fill out the arrays .customs, and .price...

 

Edit-- Didn't see Emistry's post... Haha this is an old script back from the eAthena days anyways :). It's a very good one though I come back to this as a base for all of my shops. ^_^

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  73
  • Reputation:   6
  • Joined:  06/16/12
  • Last Seen:  

-	shop	custom_seller2	-1,501:20
prontera.gat,95,99,5	script	Poring Coin Shop	100,{
	mes "I will sell you items for " + getitemname(.CoinID) + ".";
	callshop "custom_seller2",1;
	npcshopattach "custom_seller2";
	end;
	OnBuyItem:
	for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) {
		for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) {
			if(@bought_nameid[.@d]==.customs[.@i]) {
				if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) {
					if(countitem(.CoinID) >= .Price[.@i]*@bought_quantity[.@d]) {
						delitem .CoinID,.Price[.@i]*@bought_quantity[.@d];
						getitem @bought_nameid[.@d],@bought_quantity[.@d];
					} else dispbottom "You don't have enough "+getitemname(.CoinID)+" to purchase that item.";
				} else dispbottom "Purchasing these items will put you over the weight limit!";
			}
		}
	}
	deletearray @bought_quantity, getarraysize(@bought_quantity);
	deletearray @bought_nameid, getarraysize(@bought_nameid);
	close;

OnInit:
	setarray .customs[0],12103,607,678;// Enter the ID of customs here
	set .CoinID,7539; // Enter the ID of the coin here.
	setarray .Price[0],20,40,300; // Price for each custom is set to 20 coins
	npcshopitem "custom_seller2",0,0; // Don't touch any coding beyond here
	for(set .i,0; .customs[.i]; set .i,.i+1) npcshopadditem "custom_seller2",.customs[.i],.Price[.i];
	end;
}

 

Fill out the arrays .customs, and .price...

 

Edit-- Didn't see Emistry's post... Haha this is an old script back from the eAthena days anyways :). It's a very good one though I come back to this as a base for all of my shops. ^_^

 

exactly what i've been looking for THANK YOU SO MUCH!

Excuse me in the first line says 

 y4f2.png

but when i remove it 

-    shop    garmentseller    -1,501:20 > -    shop    garmentseller    -1,

 

im not able to click the npc XD

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

custom_seller2 is a dummy shop. You can raise the price to avoid this warning

-	shop	custom_seller2	-1,501:2000000
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...