AnnieRuru

@market clone

Recommended Posts

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

@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

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.   Paste as plain text instead

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