joyy95 Posted September 13, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.04 Content Count: 51 Reputation: 0 Joined: 06/28/23 Last Seen: 15 hours ago Share Posted September 13, 2023 Quote - shop dynamicshop -1,501:22 prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; end; OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( countitem(.currency) < .items[.@j+1] || countitem(.currency) < ( .items[.@j+1] * @bought_quantity[.@k] ) ) dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item."; else { delitem .currency, .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: set .currency, 7227; // TCG is used to buy items setarray .items, 4001,5,4002,5,4003,5,4004,5,4005,5; // Usage : <item id>,<price> npcshopitem "dynamicshop",0,0; for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop",.items[.@i],.items[.@i+1]; end; } How to solve this showing [Error]: builtin_npcshopitem: Item ID 0 does not exist. Quote Link to comment Share on other sites More sharing options...
0 Zeref-X Posted September 16, 2023 Group: Members Topic Count: 5 Topics Per Day: 0.01 Content Count: 25 Reputation: 17 Joined: 11/08/22 Last Seen: Tuesday at 02:29 PM Share Posted September 16, 2023 Delete: npcshopitem "dynamicshop",0,0; Replace: npcshopitem "dynamicshop",512,100; npcshopdelitem "dynamicshop",512; Quote Link to comment Share on other sites More sharing options...
0 joyy95 Posted September 16, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.04 Content Count: 51 Reputation: 0 Joined: 06/28/23 Last Seen: 15 hours ago Author Share Posted September 16, 2023 1 hour ago, Zeref-X said: Delete: npcshopitem "dynamicshop",0,0; Replace: npcshopitem "dynamicshop",512,100; npcshopdelitem "dynamicshop",512; Thanks! Quote Link to comment Share on other sites More sharing options...
Question
joyy95
How to solve this showing [Error]: builtin_npcshopitem: Item ID 0 does not exist.
Link to comment
Share on other sites
2 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.