Jump to content
AnnieRuru

@market clone

Recommended Posts

market.c: In function âatcommand_reloadscriptâ:market.c:273: warning: suggest parentheses around assignment used as truth valuemarket.c: In function âbattle_check_target_postâ:market.c:296: warning: suggest parentheses around assignment used as truth valuemarket.c: In function âchat_joinchat_preâ:market.c:312: warning: suggest parentheses around assignment used as truth valuemarket.c: In function âclif_getareachar_unit_postâ:market.c:335: warning: suggest parentheses around assignment used as truth valuemarket.c: In function âmap_quit_preâ:market.c:343: warning: suggest parentheses around assignment used as truth valuemarket.c: In function âstatus_percent_change_preâ:market.c:352: warning: suggest parentheses around assignment used as truth value 

Market works well. just that error should i remove the reloadscript on atcommand.c?

And also why the clone is on size 1 mode, and it also dont copy the creators character position like how dastgir works.

Edited by Wynne

Share this post


Link to post
Share on other sites

Market works well. just that error should i remove the reloadscript on atcommand.c?

I don't understand this

plugin should be able to overwrite the original atcommand

.

.

And also why the clone is on size 1 mode

Michieru recently revert back the SZ_SMALL and SZ_MEDIUM constant

https://github.com/HerculesWS/Hercules/commit/8ab61745b81d1cf0602c7998f590aac8749187da

so change the SZ_SMALL into SZ_MEDIUM

I also don't really understand why though

.

.

it also dont copy the creators character position like how dastgir works.

it should spawn on character's coordinate ...

where do your server spawn the clone then ?

 

 

EDIT: Fixed your error on 1.0a

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

 

it should spawn on character's coordinate ...

where do your server spawn the clone then ?

 

What im saying is the character position, for example you face is on the north is south the clone should copy it too and also if its your sitting while using @market

the clone will copy ur character sitting too but the problem is you have to refresh/rewarp to see it sitting. (dastgir market)

 

 

I don't understand this

plugin should be able to overwrite the original atcommand

 

Its just throw me that error :D

 

 

Michieru recently revert back the SZ_SMALL and SZ_MEDIUM constant

https://github.com/H...590aac8749187da

so change the SZ_SMALL into SZ_MEDIUM

I also don't really understand why though

 

Its fine its cute, just the character direction ehe. and compile warning o.O

Share this post


Link to post
Share on other sites

When creating this " clone ", is it possible to obtain it's GID? Because if so, you'd be able to command it like any normal mob right? I'm interested in this, because then I'd be able to attach the clones to a script and control them to fulfill my every whim.... Mainly I wanna use it in combination with my campfire system lol, eliminating my need for npc duplicates.

Share this post


Link to post
Share on other sites

What im saying is the character position, for example you face is on the north is south the clone should copy it too and also if its your sitting while using @market

the clone will copy ur character sitting too but the problem is you have to refresh/rewarp to see it sitting. (dastgir market)

fixed in 1.1

download again

 

@GmOcean

yes, read the mob_clone_spawn_market function

have you forgotten about mob controller system ?

Share this post


Link to post
Share on other sites

No, I didn't forget, just didn't know if these created mobs/clones would be able to function the same. Wasn't sure if there was a limitation put on them in the src which prevented it from being able to do whatever lol. But thanks for the info, gonna go run some tests now =p

Share this post


Link to post
Share on other sites

Hi~Annie,I'd like to report an  issue:

 

if you kill clone via @killmonster command(still working) ,and then log out your Character , map server will get crashed

 

edit : I m using plugin v1.1

Edited by Angelmelody

Share this post


Link to post
Share on other sites

@Annie just a question can it be allowed the same function like mapflag autotrade so it will only be usable on Towns. because Players might spam clones out of Town maps.

Share this post


Link to post
Share on other sites

The patch already has those inside,

+	if ( !map->list[sd->bl.m].flag.town ) {+		clif->message( fd, "You can only use @market in a town.");+		return false;+	}+	if ( map->getcell( sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOCHAT ) ) {+		clif->message( fd, "You cannot use @market in this area.");+		return false;+	}+	if ( pc_isdead(sd) ) {+		clif->message( fd, "You can't create a Market clone while you are dead." );+		return false;+	}+	if ( npc->isnear( &sd->bl ) ) {+		clif->message( fd, "You can't create a Market clone too near to an npc." );+		return false;+	}

Share this post


Link to post
Share on other sites
im getting this error in compiling:./configure --disable-renewal --enable-packetver=20140115using cygwinmake[1]: Entering directory '/home/tbl7/her/src/plugins'        CC      sample.c        CC      db2sql.c        CC      HPMHooking.c        CC      maintenance.c        CC      market_clone.cmarket_clone.c: In function ‘mob_clone_spawn_market’:market_clone.c:101:2: warning: implicit declaration of function ‘getFromMOBDATA’ [-Wimplicit-function-declaration]  mmd = getFromMOBDATA(md,0);  ^market_clone.c:101:6: warning: assignment makes pointer from integer without a cast [enabled by default]  mmd = getFromMOBDATA(md,0);      ^market_clone.c:105:2: warning: implicit declaration of function ‘addToMOBDATA’ [-Wimplicit-function-declaration]  addToMOBDATA( md, mmd, 0, true );  ^market_clone.c: In function ‘battle_check_target_post’:market_clone.c:298:13: warning: assignment makes pointer from integer without a cast [enabled by default]   if (( mmd = getFromMOBDATA( (TBL_MOB*)target, 0 ) ))             ^market_clone.c: In function ‘chat_joinchat_pre’:market_clone.c:314:13: warning: assignment makes pointer from integer without a cast [enabled by default]   if (( mmd = getFromMOBDATA(md,0) )) {             ^market_clone.c: In function ‘clif_getareachar_unit_post’:market_clone.c:337:13: warning: assignment makes pointer from integer without a cast [enabled by default]   if (( mmd = getFromMOBDATA( (TBL_MOB*)bl, 0) ))             ^market_clone.c: In function ‘status_percent_change_pre’:market_clone.c:354:13: warning: assignment makes pointer from integer without a cast [enabled by default]   if (( mmd = getFromMOBDATA( (TBL_MOB*)target, 0 ) )) {             ^/tmp/ccVolWjl.o: In function `battle_check_target_post':/home/tbl7/her/src/plugins/market_clone.c:298: undefined reference to `getFromMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:298:(.text+0x8d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `getFromMOBDATA'/tmp/ccVolWjl.o: In function `chat_joinchat_pre':/home/tbl7/her/src/plugins/market_clone.c:314: undefined reference to `getFromMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:314:(.text+0x18a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `getFromMOBDATA'/tmp/ccVolWjl.o: In function `clif_getareachar_unit_post':/home/tbl7/her/src/plugins/market_clone.c:337: undefined reference to `getFromMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:337:(.text+0x6d3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `getFromMOBDATA'/tmp/ccVolWjl.o: In function `status_percent_change_pre':/home/tbl7/her/src/plugins/market_clone.c:354: undefined reference to `getFromMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:354:(.text+0x737): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `getFromMOBDATA'/tmp/ccVolWjl.o: In function `mob_clone_spawn_market':/home/tbl7/her/src/plugins/market_clone.c:101: undefined reference to `getFromMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:101:(.text+0xa6d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `getFromMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:105: undefined reference to `addToMOBDATA'/home/tbl7/her/src/plugins/market_clone.c:105:(.text+0xad2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `addToMOBDATA'collect2: error: ld returned 1 exit statusMakefile:82: recipe for target '../../plugins/market_clone.dll' failedmake[1]: *** [../../plugins/market_clone.dll] Error 1make[1]: Leaving directory '/home/tbl7/her/src/plugins'Makefile:116: recipe for target 'plugins' failedmake: *** [plugins] Error 2

Share this post


Link to post
Share on other sites

Hi~Annie,I'd like to report an  issue:

 

if you kill clone via @killmonster command(still working) ,and then log out your Character , map server will get crashed

 

edit : I m using plugin v1.1

 

Confirmed.

Share this post


Link to post
Share on other sites

Hi~Annie,I'd like to report an  issue:

 

if you kill clone via @killmonster command(still working) ,and then log out your Character , map server will get crashed

 

edit : I m using plugin v1.1

Confirming this.

 

Thanks Annie!

Share this post


Link to post
Share on other sites

 

Hi~Annie,I'd like to report an  issue:

 

if you kill clone via @killmonster command(still working) ,and then log out your Character , map server will get crashed

 

edit : I m using plugin v1.1

Confirming this.

 

Thanks Annie!

 

Confirmed too.. :(

Share this post


Link to post
Share on other sites

Hi~Annie,I'd like to report an  issue:

 

if you kill clone via @killmonster command(still working) ,and then log out your Character , map server will get crashed

 

edit : I m using plugin v1.1

I try building a hooking function to prevent the market clone killed by @killmonster CMD
int atkillmonster_sub_pre(struct block_list *bl, va_list *ap){	struct mob_data *md;	struct monster_data *mmd;	md = (struct mob_data *)bl;		if ( ( mmd = getFromMOBDATA( md, 0 ) ) ) {		if(mmd->market_chat_id){			hookStop();			return 0;		}	}	return 1;}addHookPre( "atcommand->atkillmonster_sub", atkillmonster_sub_pre );

Share this post


Link to post
Share on other sites

thx Angelmelody

up to version 1.2

 

@tlacson7

the plugin works but you have to patch this

atm, I didn't properly code the removeFromMOBDB, removeFromMOBDATA, removeFromITEMDATA stuff (I never use them =/)

so don't use these 3 commands yet

Share this post


Link to post
Share on other sites

@AnnieRuru,
I have a suggestion, can you disable @market while vending, based on my knowledge in official you cannot create chatroom while vending.
Thank you.

Share this post


Link to post
Share on other sites

@AnnieRuru,

I have a suggestion, can you disable @market while vending, based on my knowledge in official you cannot create chatroom while vending.

Thank you.

 

Yeah when people vend, the clone must die :D

Share this post


Link to post
Share on other sites

I just noticed somebody in rathena actually start converting my patch into rathena ... namely Napster

well kinda a competition then, as rathena does have more user base than hercules

 

version 1.3 released

plugin or patch

-- change back all status-damage into status-kill for readability

-- fix a bug that when a server enabled show_mob_info, the clone shouldn't has listed the hp nor level (credit: Napster)

-- fix a bug that player shouldn't create a market clone while chatting or vending

-- and for the patch, move all configuration into battle folder, makes more sense in this way (credit: Napster)

-- add zeny requirement

Edited by AnnieRuru

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.