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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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