Small edition to restock plugin

Alexandria

New member
Messages
341
Points
0
Location
localhost
Hello there!

We have this plugin but my users dont want it working in pvp/gvg/bg maps. When you are in those maps, you wont get items but when you are out of those maps, you will get the items if you are out of them.

Any help would be appreciated. Thank you!

 
find  and add after

if (!sd) return 0;
if(map_flag_vs(sd->bl.m)) {
clif->message(sd->fd, "command cant be used on pvp/gvg/bg maps");
return 0;
}

 
Last edited by a moderator:
if (!sd) return 0;

To

if (!sd) return true;

 
Perfect. You can't use @restock in those maps and when you are in those maps the command wont restore a specific item that you chosen before.

But I'm getting this error in console when the command tries to restore the item when you are out of it.

[Debug]: Source (NPC): Restock at prontera (140,140)

https://github.com/dastgir/HPM-Plugins/blob/master/NPC/Restock.txt
prontera,140,140,5 script Restock 999,{

change  into

-  script  Restok  -1,{
Thank you for answering but now...

[Debug]: Source (NPC): Restock (invisible/not on a map)

 
Last edited by a moderator:
Thank you for answering but it always gives the Debug in console.
if (!sd) return 0;

if(map_flag_vs(sd->bl.m)) {

clif->message(sd->fd, "command cant be used on pvp/gvg/bg maps");

return 0;

}

what i mean is change all the return 0 to return true

 
Back
Top