Jump to content
  • 0
Sign in to follow this  
legion

Party Share Kill?

Question

Hi i'm using this Questboard in my server: http://upaste.me/900c106092bf15f5e

But I tested if the kill will be party shared, meaning if I am in a party with a priest and we are on a monster hunting mission if I kill the monster it will also be his kill. I tried it but it doesn't work that way, can anybody tell me what to change so it'll be that way? Thanks!

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

of course not

a check on the OnNPCKillEvent should tells you it doesn't have party kill support

 

a snippet without party support

OnNPCKillEvent:	if ( killedrid == 1002 )		count++;
with party support
OnNPCKillEvent:	if ( killedrid == 1002 ) {		if ( !getcharid(1) ) { // if no party			count++;		}		else {			getmapxy .@map1$, .@x1, .@y1, 0; // killer position			getpartymember getcharid(1), 1;			getpartymember getcharid(1), 2;			for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {				if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {					attachrid $@partymemberaid[.@i];					getmapxy .@map2$, .@x2, .@y2, 0;					if ( .@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) <= 30 ) // same map and the distance is within 30 cell range						count++;				}			}		}	}	end;
this script doesn't have any *getpartymember script command, so there's no way it can support party kills

 

and its quite complex so ... I'll spoon feed the answer instead

http://upaste.me/4e9610616d28161ae

 

 

PS: I bet the original author also doesn't know how to do this

 

 

EDIT: put back the "if ( h_run != 1 )" stuff

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

Thanks Annie it worked you are so great! :D

 

Hmm, one more thing, I duplicated the NPC but it had problems when I kill 1 poring it registers 2 kills because i have 2 questboards NPCs any idea how to duplicate the NPC without having this trouble? thanks!

Share this post


Link to post
Share on other sites
  • 0

this script doesn't support multiple npc nor duplicate npc

nvm, I can write this one too

 

http://upaste.me/a40210640b9cc4c5d

 

note that there are 2 npcs inside, so remember remove 1 of them

so you cannot duplicate it, but have to make multiple copies of it

because the npc variable can overwrite each other if using npc duplicate

Share this post


Link to post
Share on other sites
  • 0

this script doesn't support multiple npc nor duplicate npc

nvm, I can write this one too

 

http://upaste.me/a40210640b9cc4c5d

 

note that there are 2 npcs inside, so remember remove 1 of them

so you cannot duplicate it, but have to make multiple copies of it

because the npc variable can overwrite each other if using npc duplicate

 

Hi I just want to ask if this script really doesnt support multiple rewards?

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
Answer this question...

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