Good morning everyone. I am using this npc on my server. thank you @n0tttt !!!
But when I choose the option to buy item 7720. (Golden Coin) npc returns an error saying that I do not have enough cash points. Could someone take a look and if possible test to see if I did something wrong?
prontera,169,179,1 script Hefesto 813,{
mes "Bem Vindo;
mes "Hoje estamos vendendo diversos Conjuntos de Itens Especiais.";
next;
mes "Como você prefere pagar?";
switch(select("Pontos de Voto","Rops","Moedas Douradas","Sair")) {
case 1:
callshop "shop1",1;
end;
case 2:
callshop "shop2",1;
end;
case 3:
callshop "shop3",1;
end;
case 4:
close;
}
}
- pointshop shop1 -1,#VOTEPOINTS,15110:100,20732:60
- cashshop shop2 -1,15110:10000,20732:6000
- itemshop shop3 -1,7720,15110:500,20732:300
I used the <TABs> correctly. I do not know what the problem might be. My client is new:
#ifndef PACKETVER
/// Do NOT edit this line! To set your client version, please do this instead:
/// In Windows: Add this line in your src\custom\defines_pre.hpp file: #define PACKETVER YYYYMMDD
/// In Linux: The same as above or run the following command: ./configure --enable-packetver=YYYYMMDD
#define PACKETVER 20180620
#endif
#ifndef PACKETVER_RE
/// From this point on only kRO RE clients are supported
#if PACKETVER > 20151104
#define PACKETVER_RE
#endif
#endif
Something's missing? I've seen the npcs that put the separate price items like this:
// This code runs first. When the server is started.
OnInit:
setarray .customs[0],7179,6665,16683,17441,12549,12103,12912,12412,12411,12105,18550,2423,22014,15041,6230,6234,6228,6232,13710,7620,7619,6240,6241,6226,6225,6438,6439,12436,12437,12475; // An array of out custom items.
set .CoinID,7720; // ID da Moeda em uso.
setarray .Price[0],5,50,100,300,10,35,70,100,150,20,120,250,300,250,100,100,200,200,50,5,5,7,7,10,10,15,15,2,2,2; // The amount of coins needed for our items. (For example: Item 12103 = 20 coins)
npcshopitem "custom_seller2",0,0; // Remove all items from our dummy shop.
for( set .@i, 0; .customs[.@i]; set .@i, .@i+1 ) // Loop through our custom items.
npcshopadditem "custom_seller2",.customs[.@i],.Price[.@i]; // Add our custom items to the cleared dummy shop.
end;
}
But I need it to be like stores because there are many items to add and in two lines it gets tricky to find and modify some item.
In time have problems if I duplicate an npc? Changing only the name and name of the stores? The variables that start with @ in an npc, can not give problems in another npc with the variable of the same name ???
Question
Tassadar
Good morning everyone. I am using this npc on my server. thank you @n0tttt !!!
But when I choose the option to buy item 7720. (Golden Coin) npc returns an error saying that I do not have enough cash points. Could someone take a look and if possible test to see if I did something wrong?
I used the <TABs> correctly. I do not know what the problem might be. My client is new:
Something's missing? I've seen the npcs that put the separate price items like this:
But I need it to be like stores because there are many items to add and in two lines it gets tricky to find and modify some item.
In time have problems if I duplicate an npc? Changing only the name and name of the stores? The variables that start with @ in an npc, can not give problems in another npc with the variable of the same name ???
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.