yudi91 Posted July 17, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 29 Reputation: 0 Joined: 06/14/13 Last Seen: September 3, 2013 Share Posted July 17, 2013 i make egg shop, but when i try to buy and hatch it with pet incubator, map server having error wrong egg item inventory this is my script prt_in.gat,38,103,7 shop Egg Shop 703,643:-1,9001:-1,9002:-1,9003:-1,9004:-1,9005:-1,9006:-1,9007:-1,9008:-1,9009:-1,9010:-1,9011:-1,9012:-1,9013:-1,9014:-1,9015:-1,9016:-1,9017:-1,9018:-1,9019:-1,9020:-1,9021:-1,9022:-1,9023:-1,9024:-1,9025:-1,9026:-1,9027:-1,9028:-1,9029:-1,9030:-1,9031:-1,9032:-1,9033:-1,9034:-1,9035:-1,9036:-1,9037:-1,9038:-1,9040:-1,9041:-1,9042:-1,9043:-1,9044:-1,9045:-1,9046:-1,9047:-1,9048:-1,9049:-1,9050:-1,9051:-1,9052:-1,9053:-1,9054:-1,9055:-1,9056:-1 i try to get item with @item, it's work fine.. Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 18, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 18, 2013 this error appear on eathena, not in the latest rathena revision You can make a normal shop by script command. Here a sample // dummy shop - shop Egg Shop 703,501:-1 prontera,160,172,7 script special egg 56,{ callshop "Egg Shop",1; end; OnBuyItem: set .@size, getarraysize( @bought_nameid ); while ( .@i < .@size ) { for ( set .@j, 0; .@j < .size_id; set .@j, .@j +1 ) if ( @bought_nameid[.@i] == .item_id[.@j] ) break; set .@total, .@total + .price[.@j] * @bought_quantity[.@i]; set .@i, .@i +1; } if ( Zeny < .@total ) { dispbottom "you don't have enough zeny"; end; } set Zeny, Zeny - .@total; for ( set .@j, 0; .@j < .@size; set .@j, .@j +1 ) makepet @bought_nameid[.@j]; end; OnInit: setarray .item_id, 9001, 9002;// yours pet egg setarray .price, 20, 20;// yours pet egg price set .size_id, getarraysize( .item_id); npcshopdelitem "Egg Shop",501; for ( ; .@i < .size_id; set .@i, .@i +1) npcshopadditem "Egg Shop",.item_id[.@i],.price[.@i]; npcshopattach "Egg Shop"; end; } your setting OnInit: setarray .item_id, 9001, 9002;// yours pet egg setarray .price, 20, 20;// yours pet egg price Quote Link to comment Share on other sites More sharing options...
Xynvaroth Posted July 17, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 254 Reputation: 72 Joined: 07/10/13 Last Seen: October 9, 2017 Share Posted July 17, 2013 The script itself which you have posted here (the "Egg Shop") is working fine. I can buy several eggs for 20z each (because the default value in `item_db`.`price_buy` is used when using -1 as a price). You should provide more information. Hatching which egg will make the error message occur? What is the complete error message? Quote Link to comment Share on other sites More sharing options...
yudi91 Posted July 18, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 29 Reputation: 0 Joined: 06/14/13 Last Seen: September 3, 2013 Author Share Posted July 18, 2013 yes the shop i think it's good, but when i buy for example pet incubator and poring egg, and i try to hatch the egg with pet incubator, the egg is gone, but the poring is not coming.. and in the map server show error like in my attachment Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 18, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 18, 2013 Custom_Pets Q. Why does the egg name become red when I try to hatch it and the pet not show up?A. This is caused by the egg being spawned via an @item command (orequivalent). To create the egg you need to use the @makeegg command. Your problem may be related to that. I suggest to make a menu to give yours pets with a npc using makepet *makepet <pet id>;This command will create a pet egg and put it in the invoking character'sinventory. The kind of pet is specified by pet ID numbers listed in'db/pet_db.txt'. The egg is created exactly as if the character just successfullycaught a pet in the normal way. // This will make you a poring: makepet 1002;Notice that you absolutely have to create pet eggs with this command. If you tryto give a pet egg with 'getitem', pet data will not be created by the charserver and the egg will disappear when anyone tries to hatch it. 1 Quote Link to comment Share on other sites More sharing options...
yudi91 Posted July 18, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 29 Reputation: 0 Joined: 06/14/13 Last Seen: September 3, 2013 Author Share Posted July 18, 2013 so i can't make egg shop like others normal shop? Quote Link to comment Share on other sites More sharing options...
Skorm Posted July 18, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 18, 2013 Custom_Pets Q. Why does the egg name become red when I try to hatch it and the pet not show up? A. This is caused by the egg being spawned via an @item command (or equivalent). To create the egg you need to use the @makeegg command. Your problem may be related to that. I suggest to make a menu to give yours pets with a npc using makepet >*makepet <pet id>; This command will create a pet egg and put it in the invoking character's inventory. The kind of pet is specified by pet ID numbers listed in 'db/pet_db.txt'. The egg is created exactly as if the character just successfully caught a pet in the normal way. // This will make you a poring: makepet 1002; Notice that you absolutely have to create pet eggs with this command. If you try to give a pet egg with 'getitem', pet data will not be created by the char server and the egg will disappear when anyone tries to hatch it. Extremely useful information had no idea. Quote Link to comment Share on other sites More sharing options...
yudi91 Posted July 19, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 29 Reputation: 0 Joined: 06/14/13 Last Seen: September 3, 2013 Author Share Posted July 19, 2013 i must set the price too? can i use the price from item_db? Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted July 19, 2013 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted July 19, 2013 rathena already fixed that isse http://rathena.org/board/tracker/issue-6472-about-pet-item-data/ Quote Link to comment Share on other sites More sharing options...
Question
yudi91
i make egg shop, but when i try to buy and hatch it with pet incubator, map server having error
wrong egg item inventory
this is my script
prt_in.gat,38,103,7 shop Egg Shop 703,643:-1,9001:-1,9002:-1,9003:-1,9004:-1,9005:-1,9006:-1,9007:-1,9008:-1,9009:-1,9010:-1,9011:-1,9012:-1,9013:-1,9014:-1,9015:-1,9016:-1,9017:-1,9018:-1,9019:-1,9020:-1,9021:-1,9022:-1,9023:-1,9024:-1,9025:-1,9026:-1,9027:-1,9028:-1,9029:-1,9030:-1,9031:-1,9032:-1,9033:-1,9034:-1,9035:-1,9036:-1,9037:-1,9038:-1,9040:-1,9041:-1,9042:-1,9043:-1,9044:-1,9045:-1,9046:-1,9047:-1,9048:-1,9049:-1,9050:-1,9051:-1,9052:-1,9053:-1,9054:-1,9055:-1,9056:-1
i try to get item with @item, it's work fine..
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.