@market clone

@AnnieRuru

latest version

Code:
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 ==========
 
@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.

 
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? =/
 

 
Last edited by a moderator:
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

 
update to version 1.9

plugin

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

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

 
Getting this error. Using latest version.

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

 
Getting this error. Using latest version.

View attachment 6800

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

View attachment 6801
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

 
Last edited by a moderator:
Back
Top