Jump to content
AnnieRuru

@market clone

Recommended Posts

1.5

plugin

- fix an issue that when using @hide, the market clone also clone as invisible

---- the real issue about this is, if that GM do @marketkill, the surrounding client will crash

Share this post


Link to post
Share on other sites

hello, is it possible to make this market clone can only be use in a specific area? to prevent abuse using in different areas?

i know there is a town use only with this command but is it possible like you can only use @market at prontera <x>,<y> ( if area already take switch to other coordinate)

Share this post


Link to post
Share on other sites

nope, this is just an update to compatible with latest hercules, no new feature added or anything

1.6 - plugin
- update to latest revision
- remove all TBL_ and change to struct
- add NULL checks to places where it needed
- update the clif_charnameack with struct packet_reqnameall_ack

and special thanks to dastgir helped maintaining this plugin

 

On 6/7/2016 at 6:49 PM, Pandaaa said:

hello, is it possible to make this market clone can only be use in a specific area? to prevent abuse using in different areas?

i know there is a town use only with this command but is it possible like you can only use @market at prontera <x>,<y> ( if area already take switch to other coordinate)

just add the check like you did in scripting

in npc script

	getmapxy .@map$, .@x, .@y, UNITTYPE_PC;
	if ( .@map$ == "prontera" && .@x == 155 && .@y == 185 )
		dispbottom "OK";

in source

	if ( strcmp( mapindex_id2name(sd->mapindex), "prontera" ) == 0 && sd->bl.x == 155 && sd->bl.y == 185 )
		clif->message( sd->fd, "OK" );

 

Share this post


Link to post
Share on other sites
In file included from marketclone.c:55:0:
marketclone.c: In function plugin_init’:
../plugins/HPMHooking.h:49:11: error: HPMHOOK_pre_clif_charnameack undeclared                                 (first use in this function); did you mean HPMHOOK_pre_clif_charnameupdate’?
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
marketclone.c:493:2: note: in expansion of macro addHookPre
  addHookPre(clif, charnameack, clif_charnameack_pre);
  ^~~~~~~~~~
../plugins/HPMHooking.h:49:11: note: each undeclared identifier is reported only                                 once for each function it appears in
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
           ^
marketclone.c:493:2: note: in expansion of macro addHookPre
  addHookPre(clif, charnameack, clif_charnameack_pre);
  ^~~~~~~~~~
../plugins/HPMHooking.h:49:51: error: expected ‘)’ before numeric constant
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                   ^
marketclone.c:493:2: note: in expansion of macro addHookPre
  addHookPre(clif, charnameack, clif_charnameack_pre);
  ^~~~~~~~~~
../plugins/HPMHooking.h:49:63: warning: left-hand operand of comma expression ha                                s no effect [-Wunused-value]
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                               ^
marketclone.c:493:2: note: in expansion of macro addHookPre
  addHookPre(clif, charnameack, clif_charnameack_pre);
  ^~~~~~~~~~

I think the plugin isn't compatible with the latest herc?

Share this post


Link to post
Share on other sites

First time seeing this. Thought I'd try it out. Really cool idea, surprised I'm just seeing this now.

Reports:
• If you are in a chatroom of the clone then the clone dies, the chat closes then your char is stuck.
• Something interesting, you can send friend and party requests to clone mobs, which then send to the real char.

Share this post


Link to post
Share on other sites
On 4/11/2019 at 5:25 AM, AnnieRuru said:

1.8 - plugin
- update to latest revision

Edit: Its broken again on the latest version. @AnnieRuru

Edited by vBrenth

Share this post


Link to post
Share on other sites

@AnnieRuru

latest version

1>------ Build started: Project: clone, Configuration: Debug Win32 ------
1>clone.c
1>c:\hercules\src\plugins\clone.c(441): error C2079: 'packet' uses undefined struct 'packet_reqnameall_ack'
1>c:\hercules\src\plugins\clone.c(442): error C2224: left of '.packet_id' must have struct/union type
1>c:\hercules\src\plugins\clone.c(443): error C2224: left of '.gid' must have struct/union type
1>c:\hercules\src\plugins\clone.c(444): error C2224: left of '.name' must have struct/union type
1>c:\hercules\src\plugins\clone.c(444): warning C4022: 'memcpy': pointer mismatch for actual parameter 2
1>c:\hercules\src\plugins\clone.c(444): error C2198: 'memcpy': too few arguments for call
1>Done building project "clone.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 7 up-to-date, 0 skipped ==========


 

Share this post


Link to post
Share on other sites
On 6/14/2019 at 10:40 PM, Bringer said:

@AnnieRuru

latest version

1>------ Build started: Project: clone, Configuration: Debug Win32 ------ 1>clone.c 1>c:\hercules\src\plugins\clone.c(441): error C2079: 'packet' uses undefined struct 'packet_reqnameall_ack' 1>c:\hercules\src\plugins\clone.c(442): error C2224: left of '.packet_id' must have struct/union type 1>c:\hercules\src\plugins\clone.c(443): error C2224: left of '.gid' must have struct/union type 1>c:\hercules\src\plugins\clone.c(444): error C2224: left of '.name' must have struct/union type 1>c:\hercules\src\plugins\clone.c(444): warning C4022: 'memcpy': pointer mismatch for actual parameter 2 1>c:\hercules\src\plugins\clone.c(444): error C2198: 'memcpy': too few arguments for call 1>Done building project "clone.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 7 up-to-date, 0 skipped ==========


1>------ Build started: Project: clone, Configuration: Debug Win32 ------
1>clone.c
1>c:\hercules\src\plugins\clone.c(441): error C2079: 'packet' uses undefined struct 'packet_reqnameall_ack'
1>c:\hercules\src\plugins\clone.c(442): error C2224: left of '.packet_id' must have struct/union type
1>c:\hercules\src\plugins\clone.c(443): error C2224: left of '.gid' must have struct/union type
1>c:\hercules\src\plugins\clone.c(444): error C2224: left of '.name' must have struct/union type
1>c:\hercules\src\plugins\clone.c(444): warning C4022: 'memcpy': pointer mismatch for actual parameter 2
1>c:\hercules\src\plugins\clone.c(444): error C2198: 'memcpy': too few arguments for call
1>Done building project "clone.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 7 up-to-date, 0 skipped ==========


 

Remove this.

			else {
				struct packet_reqnameall_ack packet = { 0 };
				packet.packet_id = reqName;
				packet.gid = md->bl.id;
				memcpy( packet.name, md->name, NAME_LENGTH );
				clif->send( &packet, sizeof(struct packet_reqname_ack), *bl, AREA );
				hookStop();
				return;
			}

and recompile you emulator.

Share this post


Link to post
Share on other sites

market.c: In function ‘mob_clone_spawn_market’:
market.c:138: error: too few arguments to function ‘mob->once_spawn_sub’
market.c:143: error: ‘struct unit_interface’ has no member named ‘setdir’
market.c:161: error: ‘SI_ON_PUSH_CART’ undeclared (first use in this function)
market.c:161: error: (Each undeclared identifier is reported only once
market.c:161: error: for each function it appears in.)
market.c: In function ‘clif_getareachar_unit_post’:
market.c:425: error: ‘SI_ON_PUSH_CART’ undeclared (first use in this function)
market.c: In function ‘clif_blname_ack_pre’:
market.c:441: error: variable ‘packet’ has initializer but incomplete type
market.c:441: warning: excess elements in struct initializer
market.c:441: warning: (near initialization for ‘packet’)
market.c:441: error: storage size of ‘packet’ isn’t known
market.c:441: warning: unused variable ‘packet’

how to fix @AnnieRuru? =/
 

Edited by Zeca

Share this post


Link to post
Share on other sites
On 5/17/2020 at 12:10 AM, Zeca said:

market.c: In function ‘mob_clone_spawn_market’:
market.c:138: error: too few arguments to function ‘mob->once_spawn_sub’
market.c:143: error: ‘struct unit_interface’ has no member named ‘setdir’
market.c:161: error: ‘SI_ON_PUSH_CART’ undeclared (first use in this function)
market.c:161: error: (Each undeclared identifier is reported only once
market.c:161: error: for each function it appears in.)
market.c: In function ‘clif_getareachar_unit_post’:
market.c:425: error: ‘SI_ON_PUSH_CART’ undeclared (first use in this function)
market.c: In function ‘clif_blname_ack_pre’:
market.c:441: error: variable ‘packet’ has initializer but incomplete type
market.c:441: warning: excess elements in struct initializer
market.c:441: warning: (near initialization for ‘packet’)
market.c:441: error: storage size of ‘packet’ isn’t known
market.c:441: warning: unused variable ‘packet’

how to fix @AnnieRuru? =/
 

Check here: https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/%40market.c

For mob_once_spawn_sub, you need to add extra argument 0 (for Npc id)

For Status Icon, need to use clif->sc_load

Share this post


Link to post
Share on other sites

update to version 1.9

plugin

big thanks to dastgir to give some hints how to update this plugin

 

On 7/15/2019 at 3:15 AM, Mihael said:

Remove this.

else { struct packet_reqnameall_ack packet = { 0 }; packet.packet_id = reqName; packet.gid = md->bl.id; memcpy( packet.name, md->name, NAME_LENGTH ); clif->send( &packet, sizeof(struct packet_reqname_ack), *bl, AREA ); hookStop(); return; }


			else {
				struct packet_reqnameall_ack packet = { 0 };
				packet.packet_id = reqName;
				packet.gid = md->bl.id;
				memcpy( packet.name, md->name, NAME_LENGTH );
				clif->send( &packet, sizeof(struct packet_reqname_ack), *bl, AREA );
				hookStop();
				return;
			}

and recompile you emulator.

if you removed that, any server that has show_mob_info settings on, will allow players to see the level and hp of the mobs

it seems the function has changed, now just need clif_mobname_ack to work

Share this post


Link to post
Share on other sites

Getting this error. Using latest version.

 

image.thumb.png.8615f43dc49583655b7418b86d653e64.png

 

 

Also in-game when I created the clone:

- clone retain even after logging out

- can create another clone even it's still exist 

- double-clicking a clone pug will let you enter the pub instead of seeing the message

image.png.613a11770ae47376fd3bc7556a6775de.png

Share this post


Link to post
Share on other sites
1 minute ago, Hadeszeus said:

Getting this error. Using latest version.

 

image.thumb.png.8615f43dc49583655b7418b86d653e64.png

 

 

Also in-game when I created the clone:

- clone retain even after logging out

- can create another clone even it's still exist 

- double-clicking a clone pug will let you enter the pub instead of seeing the message

image.png.613a11770ae47376fd3bc7556a6775de.png

Enable the HPMHooking plugin

NOTE : HPMHooking.c is already in src/plugin folder, just enable it in makefile

edit makefile.ini and makefile in trunk/src/plugin

enable it too in conf/plugin.conf

 

recompile your server

 

Edited by Kuya Jeo

Share this post


Link to post
Share on other sites
3 minutes ago, Kuya Jeo said:

Enable the HPMHooking plugin

 

edit makefile.ini and makefile in trunk/src/plugin

enable it too in conf/plugin.conf

 

recompile your server

It's working now. Thank you so much Kuys!

Kakahiya. :D 

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.