Jump to content
  • 0
Alexandria

Small edition to restock plugin

Question

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!

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

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;
}

Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

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

Edited by Alexandria

Share this post


Link to post
Share on other sites
  • 0

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,{

Share this post


Link to post
Share on other sites
  • 0

 

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)

 

 

 

Edited by Alexandria

Share this post


Link to post
Share on other sites
  • 0

Hello guys, im wondering if there is any solution for that. thank you!

 

just change the return 0 to return true;

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.