Jump to content
  • 0

Simple Poring Exchanger


Radian

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

I got this error :(

 

1502539_1579950088892796_156466372209723

 

and im using this script

-	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);
	end;

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;
}
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

mes "I will sell you items for " + getitemname(.CoinID) + ".";    // remove this line

or

mes "I will sell you items for " + getitemname(.CoinID) + ".";
close2;    // add this line
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

mes "I will sell you items for " + getitemname(.CoinID) + ".";    // remove this line

or

mes "I will sell you items for " + getitemname(.CoinID) + ".";
close2;    // add this line

 

this warning shows up everytime i try to purchase an item on the shop without the required item.

itemdb_search: item ID 0 does not exists in the item_db. Using dummy data.

@bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Bump!

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