Jump to content
  • 0
Sign in to follow this  
madmonkey

317 pi shop problems, please help!!

Question

hey, runelocus community

I am coding a very long time 317's and never had problems whit adding a new npc with a shop but somehow i do now a problem whit it, i think i fergot something but i have no idea so here i am looking for help.

i am added the npc and the shop he need's to open all works fine.
Also i put items in the shops, no problems untill here.

now i want to buy from my shop, but that won't work somehow.

what i did?
[CODE]actionhandler.java

case 543://karim - pure shop
c.getShops().openShop(33);
break;[/CODE]
shops.cfg
[CODE]shop = 33 pure_shop 2 2 11694 10][/CODE]
shop assistant.java

[CODE]} else if (c.myShopId == 15) {
buyVoid(itemID);
return false;
} else if (c.myShopId == 33) {
buyVoid(itemID);
return false;
} else if (c.myShopId == 1) {
buyVoid(itemID);
return false;
}[/CODE]
the way how it stands about buy/sell, in shopassistant.java

[CODE]} elsepublic void buyFromShopPrice(int removeId, int removeSlot){
int ShopValue = (int)Math.floor(getItemShopValue(removeId, 0, removeSlot));
ShopValue *= 1;
String ShopAdd = "";

if (c.myShopId == 18) {
c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getMageItemValue(removeId) + "</col> PC Points.");
return;
}

if (c.myShopId == 15) {
c.sM("This item current costs " + c.getItems().getUntradePrice(removeId) + "</col> coins.");
return;
}
if (c.myShopId == 48) {
c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSlayerItemValue(removeId) + "</col> SlayerPoints.");
return;
}
if (c.myShopId == 28 || c.myShopId == 29) {
c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSlayerItemValue(removeId) + "</col> PkPoints.");
return;
}
if (c.myShopId == 84) {
c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSpecialItemValue(removeId) + "</col> Dungeoneering Points.");
return;
}
if (c.myShopId == 85) {
c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSpecialItemValue(removeId) + "</col> Dungeoneering Points.");
return;
}
if (c.myShopId == 26) {
c.sM(c.getItems().getItemName(removeId)+": currently costs: <col=255> " + getDonatorItemValue(removeId) + "</col> DonatorPoints");
return;
}
if (c.myShopId == 27) {
c.sM(c.getItems().getItemName(removeId)+": currently costs: <col=255> " + getVoteItemValue(removeId) + "</col> Vote Points");
return;
}
if (c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) {
c.sM(c.getItems().getItemName(removeId)+": currently costs <col=255>" + getTokkulItemValue(removeId) + "</col> Tokkuls.");
return;
}
if (ShopValue >= 1000 && ShopValue < 1000000) {
ShopAdd = " (" + (ShopValue / 1000) + "k)";
} else if (ShopValue >= 1000000 && ShopValue < 1000000000) {
ShopAdd = " (" + (ShopValue / 1000000) + " million)";
} else if (ShopValue >= 1000000000) {
ShopAdd = " (" + (ShopValue / 1000000000) + " billion)";
}
c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> "+ShopValue+"</col> coins"+ShopAdd);
}
}[/CODE]
also on "spawn-config" it did spawn the npc, else i coudn't even open the shop.

but it just wont sell his items, the greedy fkr :P
ps, i can sell my items to him.

i am really having trouble for the first time with this and i cant fix it.

all help is welcome.

Note: I am did put this same post on ************ for help but i dont get any response i hope here i get, since i really need to know what's wrong all 90% of the shops did work already but all new shops and the other 10% dont work somehow.

What i am missing please help?!

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
here's your problem buddy.

[CODE]
Here;
shop = 33 pure_shop 2 2 11694 10]

You want to remove ] at the end of it.
[/CODE]

Share this post


Link to post
Share on other sites
  • 0
[quote name='malimt']here's your problem buddy.

[CODE]
Here;
shop = 33 pure_shop 2 2 11694 10]

You want to remove ] at the end of it.
[/CODE][/QUOTE]

done that already XD still won't work.

Share this post


Link to post
Share on other sites
  • 0
this right here;
[CODE]
} elsepublic void buyFromShopPrice(int removeId, int removeSlot){

FIX IT AT THE END, PUT A SPACE BETWEEN THE ){ SO IT BECOMES ) {
[/CODE]
There are too many errors in this, if you want to keep it, you'd have to go through all the files and makes sure that they are correct.

Share this post


Link to post
Share on other sites
  • 0
[quote name='malimt']this right here;
[CODE]
} elsepublic void buyFromShopPrice(int removeId, int removeSlot){

FIX IT AT THE END, PUT A SPACE BETWEEN THE ){ SO IT BECOMES ) {
[/CODE]
There are too many errors in this, if you want to keep it, you'd have to go through all the files and makes sure that they are correct.[/QUOTE]

if that whas the error than no shop shall work, so this not the error still i did try it (who know's) but diddn't work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×