On script, search forOnRestock:Hi, thanks for the plugin, it works perfectly!
Is there any way to make not bypass the gvg and the WoE mapflags and storage mapflags, so users can restock only when they get back to town ?
Have a great day!
if (getmapflag(strcharinfo(PC_MAP), mf_town) == 0) {
restkid = 0;
end;
}
I probably need to preHook pc_setpos which will check if map changed, and force check the restock listThank you for you quick answer. I follow the instructions, it worked, I can only restock in towns, but I still got a problem.
For exemple if I am in a dungeon and I used all of my Grappe Juice, when I get back in town, the Grappe Juice are not restocked (though there are in my restock list). Any help for that cases ?
Thanks !!
Oh, can you do that ?I probably need to preHook pc_setpos which will check if map changed, and force check the restock listThank you for you quick answer. I follow the instructions, it worked, I can only restock in towns, but I still got a problem.
For exemple if I am in a dungeon and I used all of my Grappe Juice, when I get back in town, the Grappe Juice are not restocked (though there are in my restock list). Any help for that cases ?
Thanks !!
It will check if the last of selected item was consumed and do ::OnRestock NPC Event to restock the items to the selected amount. Works very well and without any ms of lag. Thanks to @Dastgirdoes it restock item's after all item consumed?
CREATE TABLE `restock` (
`charid` INT(10) NOT NULL,
`restockid` INT(6) NOT NULL,
`restkq` INT(5) NOT NULL,
`restkf` INT(10) NOT NULL DEFAULT '1'
)
COLLATE='latin1_swedish_ci'
ENGINE=MyISAM
;
if (.@qu){
.@ru = restkid;
++ if (getiteminfo(.@ru, ITEMINFO_TYPE) == 10) autoequip(.@ru, 1);
restock_item(.@ru,.@qu,.@fr);
if (.@fr == 1) .@from$ = "Storage";
if (.@fr == 2) .@from$ = "Guild Storage";
sleep2 500;
if (countitem(.@ru) == 0) {
announce "Trying to restock "+.@qu+"x "+.@ru+" from "+.@from$+". Failed. Amount does not fit.",bc_self,0xFF8F01;
}
++ if (getiteminfo(.@ru, ITEMINFO_TYPE) == 10) autoequip(.@ru, 0);
restkid = 0;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.