Jump to content
Sign in to follow this  
AnnieRuru

Vendor Control (rewrite)

Recommended Posts

me start to love rewrite Emistry's script .... hehehe
sure he don't mind

 

Download: 2.1
script & plugin
plugin is meant for players can vend on top of npc

 

look for the original topic here for description
https://rathena.org/board/topic/84828-utility-vendor-control/
... but download the script here .. hahaha

Spoiler

Vendor Control


A script that basically used to control messy vendors in your server.

Included one helper npc that enable Vendor to pick their spot easily.

Some minor settings and math calculations are required to setup this.

wTJFzSl.jpg

 

 

Archive
1.0
- fix his script display menu option too long
- no need to run the npc timer on every npc even nobody is standing on it ...
- other optimization that I couldn't think of
vendor_control_1.0.txt

2.0
script & plugin
due to this bug report, spark my interest to update this script
- change npc sprite ID into constant
- fixed player can't stand on the cell by changing unitwalk into warp
- use source modification so players can vend on the npc while min_npc_vendchat_distance activated

2.1
script & plugin
- fix the script and use constant properly
- revert back to *unitwalk

 

Share this post


Link to post
Share on other sites

I think I'm going to start a "New Script Festival" LOL

 

I have so many scripts in my hard-disk ...

so I just have to post them 1 at a time ... everyday ! -> keep my fan base happy :D

Share this post


Link to post
Share on other sites

I think I'm going to start a "New Script Festival" LOL

 

I have so many scripts in my hard-disk ...

so I just have to post them 1 at a time ... everyday ! -> keep my fan base happy :D

I am one of them

Share this post


Link to post
Share on other sites

after I saw this bug report

https://github.com/HerculesWS/Hercules/issues/834

suddenly an urge for me to update this script

 

version 2.0

- change npc sprite ID into constant

- fixed player can't stand on the cell by changing unitwalk into warp

- use source modification so players can vend on the npc while min_npc_vendchat_distance activated

Share this post


Link to post
Share on other sites

after I saw this bug report

https://github.com/HerculesWS/Hercules/issues/834

suddenly an urge for me to update this script

 

version 2.0

- change npc sprite ID into constant

- fixed player can't stand on the cell by changing unitwalk into warp

- use source modification so players can vend on the npc while min_npc_vendchat_distance activated

 

Do we need to use both the script and the plugin? or just the script will do? because in rathena they only have script

Share this post


Link to post
Share on other sites

the plugin will bypass the 'min_npc_vendchat_distance' check

so your server can still on the 'min_npc_vendchat_distance' to disallow players to vend too near other npc

but still able vend on the npc for these coordinates

Share this post


Link to post
Share on other sites

you should assume all my plugins broken, just like my signature says

2.1
script & plugin
- fix the script and use constant properly
- revert back to *unitwalk

Share this post


Link to post
Share on other sites
18 hours ago, Begin said:

Thanks, Ms. @AnnieRuru! But I'm having this message in console.

[Debug]: Source (NPC): Vending Helper at mall (99,95)

Is that okay?

How do you get this error message ? :o

Share this post


Link to post
Share on other sites

up to plugin to 2.1a
- fix a bug that will cause map-server to spam error if the player has pets or homunculus walk over the tiles
----- should have use BL_CAST and not BL_UCAST... BL_UCAST should only use in iterations

[Debug]: mapindex_id2name: Requested name for non-existant map index [0] in cache. ..\src\plugins\zzz.c::53

 


 

12 minutes ago, Begin said:

I dont know Ms. Annie. I just change the coordinates and npc sprite.

post your edited script here or in discord

 

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Hi! Good Day!

I got an error while compiling my server. 

In file included from vendor.c:21:0:
vendor.c: In function ‘plugin_init’:
../plugins/HPMHooking.h:53:11: error: ‘HPMHOOK_pre_unit_walktoxy_timer’ undeclared (first use in this function)
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:53:11: note: each undeclared identifier is reported only once for each function it appears in
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:53:51: error: expected ‘)’ before numeric constant
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                   ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:53:63: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                               ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:63:11: error: ‘HPMHOOK_post_unit_walktoxy_timer’ undeclared (first use in this function)
   (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
vendor.c:69:2: note: in expansion of macro ‘addHookPost’
  addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post );
  ^
../plugins/HPMHooking.h:63:52: error: expected ‘)’ before numeric constant
   (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                    ^
vendor.c:69:2: note: in expansion of macro ‘addHookPost’
  addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post );
  ^
../plugins/HPMHooking.h:63:64: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                                ^
vendor.c:69:2: note: in expansion of macro ‘addHookPost’
  addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post );
  ^

 

 

please help.

Share this post


Link to post
Share on other sites
Posted (edited)
On 6/12/2020 at 7:10 AM, adobo said:

Hi! Good Day!

I got an error while compiling my server. 

In file included from vendor.c:21:0: vendor.c: In function ‘plugin_init’: ../plugins/HPMHooking.h:53:11: error: ‘HPMHOOK_pre_unit_walktoxy_timer’ undeclared (first use in this function) (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:68:2: note: in expansion of macro ‘addHookPre’ addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre ); ^ ../plugins/HPMHooking.h:53:11: note: each undeclared identifier is reported only once for each function it appears in (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:68:2: note: in expansion of macro ‘addHookPre’ addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre ); ^ ../plugins/HPMHooking.h:53:51: error: expected ‘)’ before numeric constant (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:68:2: note: in expansion of macro ‘addHookPre’ addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre ); ^ ../plugins/HPMHooking.h:53:63: warning: left-hand operand of comma expression has no effect [-Wunused-value] (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:68:2: note: in expansion of macro ‘addHookPre’ addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre ); ^ ../plugins/HPMHooking.h:63:11: error: ‘HPMHOOK_post_unit_walktoxy_timer’ undeclared (first use in this function) (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:69:2: note: in expansion of macro ‘addHookPost’ addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post ); ^ ../plugins/HPMHooking.h:63:52: error: expected ‘)’ before numeric constant (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:69:2: note: in expansion of macro ‘addHookPost’ addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post ); ^ ../plugins/HPMHooking.h:63:64: warning: left-hand operand of comma expression has no effect [-Wunused-value] (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ vendor.c:69:2: note: in expansion of macro ‘addHookPost’ addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post ); ^

In file included from vendor.c:21:0:
vendor.c: In function ‘plugin_init’:
../plugins/HPMHooking.h:53:11: error: ‘HPMHOOK_pre_unit_walktoxy_timer’ undeclared (first use in this function)
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:53:11: note: each undeclared identifier is reported only once for each function it appears in
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:53:51: error: expected ‘)’ before numeric constant
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                   ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:53:63: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                               ^
vendor.c:68:2: note: in expansion of macro ‘addHookPre’
  addHookPre(unit, walktoxy_timer, unit_walktoxy_timer_pre );
  ^
../plugins/HPMHooking.h:63:11: error: ‘HPMHOOK_post_unit_walktoxy_timer’ undeclared (first use in this function)
   (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
vendor.c:69:2: note: in expansion of macro ‘addHookPost’
  addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post );
  ^
../plugins/HPMHooking.h:63:52: error: expected ‘)’ before numeric constant
   (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                    ^
vendor.c:69:2: note: in expansion of macro ‘addHookPost’
  addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post );
  ^
../plugins/HPMHooking.h:63:64: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                                ^
vendor.c:69:2: note: in expansion of macro ‘addHookPost’
  addHookPost(unit, walktoxy_timer, unit_walktoxy_timer_post );
  ^

 

 

please help.

same problem here, but i fixed.

change walktoxy_timer

to walk_toxy_timer in all file .c

 

Edited by brunosc

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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