Jump to content

Recommended Posts

thumb-74501c47b130318ab4b24e267c13191c-screenhercules011.jpg

File Name: Restock System

File Submitter: Dastgir

File Submitted: 10 Jan 2015

File Category: Plugins

 

It is a restock system(which I apparently made 5-6 months ago) [Also its a Plugin - Yay]

So I am just releasing it, as I feel its been useful for many servers.

Though there can be some optimizations on script-side(will be applied later on).

 

 

You need to enable plugin as well as script provided in the download.

 

2 commands:

@restock - Enables/Disables Restock System

@restock2 - To Add/Remove item

Usage:@restock2 <itemid> <quantity> <type1> <type2>Type 1:1 = Storage2 = GStorageType 2:1 = Add2 = Remove3 = Help4 = List5 = Empty The List@restock2 x y z 3 For Help@restock2 x y z 4 For Current Restocking List@restock2 x y z 5 For Removing All Items From Restockx,y,z Can be any number, e.g: @restock2 0 0 0 3 will give you help option,@restock2 x y z 5 will Empty your list

It Support Restocking of All Kinds of Item.

 

Click here to download this file

Share this post


Link to post
Share on other sites

Hi @@Dastgir

I'm gonna try this, what does this exactly do when using @restock? send item to storage automatically? and vice versa?

Edited by Kong

Share this post


Link to post
Share on other sites

Hi @@Dastgir

I'm gonna try this, what does this exactly do when using @restock? send item to storage automatically? and vice versa?

When you go out of items in inventory. It will get those items from storage/gstorage.

Share this post


Link to post
Share on other sites

what about making a config so user need to pay a 'fee' everytime he uses the command? (nice to deal with zeny inflation ingame lol)

Share this post


Link to post
Share on other sites

 

Hi @@Dastgir

I'm gonna try this, what does this exactly do when using @restock? send item to storage automatically? and vice versa?

When you go out of items in inventory. It will get those items from storage/gstorage.

 

Does this bypass the @storage or @gstorage command when on pvp/gvg maps? Can they still restock items?

Share this post


Link to post
Share on other sites

 

 

Hi @@Dastgir

I'm gonna try this, what does this exactly do when using @restock? send item to storage automatically? and vice versa?

When you go out of items in inventory. It will get those items from storage/gstorage.
 Does this bypass the @storage or @gstorage command when on pvp/gvg maps? Can they still restock items?
Yup it bypass it, maybe I will add a configuration to avoid those.

Share this post


Link to post
Share on other sites
1>------ Operación Generar iniciada: proyecto: restock, configuración: Release Win32 ------1>Compilación iniciada a las 23-04-2015 15:45:24.1>InitializeBuildStatus:1>  Aplicando tarea Touch a "restockrestock.unsuccessfulbuild".1>ClCompile:1>  restock.c1>..srcpluginsrestock.c(45): error C2143: error de sintaxis : falta ';' delante de 'tipo'1>..srcpluginsrestock.c(47): error C2065: 'index' : identificador no declarado1>..srcpluginsrestock.c(48): error C2065: 'index' : identificador no declarado1>1>ERROR al compilar.1>1>Tiempo transcurrido 00:00:00.28========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========

Share this post


Link to post
Share on other sites

1>  restock.c
1>..srcpluginsrestock.c(45): error C2143: 語法錯誤 : 遺漏 ';' (在 '型別' 之前)
1>..srcpluginsrestock.c(47): error C2065: 'index' : 未宣告的識別項
1>..srcpluginsrestock.c(48): error C2065: 'index' : 未宣告的識別項

Edited by foreveriori

Share this post


Link to post
Share on other sites

1>  restock.c

1>..srcpluginsrestock.c(45): error C2143: 語法錯誤 : 遺漏 ';' (在 '型別' 之前)

1>..srcpluginsrestock.c(47): error C2065: 'index' : 未宣告的識別項

1>..srcpluginsrestock.c(48): error C2065: 'index' : 未宣告的識別項

 

1>------ Operación Generar iniciada: proyecto: restock, configuración: Release Win32 ------1>Compilación iniciada a las 23-04-2015 15:45:24.1>InitializeBuildStatus:1>  Aplicando tarea Touch a "restockrestock.unsuccessfulbuild".1>ClCompile:1>  restock.c1>..srcpluginsrestock.c(45): error C2143: error de sintaxis : falta ';' delante de 'tipo'1>..srcpluginsrestock.c(47): error C2065: 'index' : identificador no declarado1>..srcpluginsrestock.c(48): error C2065: 'index' : identificador no declarado1>1>ERROR al compilar.1>1>Tiempo transcurrido 00:00:00.28========== Generar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========
Sorry for late update, error should be fixed now.

Share this post


Link to post
Share on other sites

@@samsudin script ? this is plugin.

Why you take @@Dastgir plugin in your github ?

 

sorry,

 

1. that restock plugin need a script, provide by dastgir , 

2. im not take datsgir plugin, just manage to make the plugin work on latest Herc, and i mentioned at readme, the credit goes to original owner..

Share this post


Link to post
Share on other sites

where is the script??

It's in the download link..

However you can find it in my repo too:

https://github.com/dastgir/HPM-Plugins/tree/master/NPC

 

I will update all plugin tomorrow,

For those having error, just change malloc.h to memmgr.h and it will work.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

On script, search for

OnRestock:

Below it add

if (getmapflag(strcharinfo(PC_MAP), mf_town) == 0) {
    restkid = 0;
    end;
}
Above changes will allow restock only when you are in town

Share this post


Link to post
Share on other sites

Thank 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 !!

Share this post


Link to post
Share on other sites

Thank 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 !!

I probably need to preHook pc_setpos which will check if map changed, and force check the restock list

Share this post


Link to post
Share on other sites

Oh, can you do that ?
I know it's I am asking a lot.. but who knows, maybe you're in a charitable mood.  :D 

Thanks!



 

Thank 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 !!

I probably need to preHook pc_setpos which will check if map changed, and force check the restock list

Oh, can you do that ?
I know it's I am asking a lot.. but who knows, maybe you're in a charitable mood.   :D 

Thanks!

Share this post


Link to post
Share on other sites

Error on make plugins on latest emulator.

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
Reply to this topic...

×   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.