Jump to content
  • 0

Some Party Event


Strand

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

Hello community.

 

I hope you're ok :)

 

Well, i was wondering if someone could help me out with some script...

 

Its about a NPCKillEvent, that i want to make it work but it doesnt:

 

I want that if someone in the "Party" kills certain monster, him and his whole party receive buffs. The script works only for the person who killed the monster, not the whole party and him, and i don't know why:

 

Heres the script:

OnNPCKillEvent:

	if( killedrid == 3054 ){

	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
        for (.@i = 0; .@i < $@partymembercount; .@i++) {
	if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) {
	attachrid $@partymemberaid[.@i];
	message strcharinfo(0),"You've killed the Dragon!";
	sc_start SC_BLESSING,300000,50;
	sc_start SC_INCREASEAGI,300000,50;
	sc_start SC_MAGNIFICAT,300000,5;
	sc_start SC_ANGELUS,300000,10;
	specialeffect2 668;
	end;
	}
	}
}

I hope someone helps me with it, making it work for the whole party and himself.

 

Greetings!

Edited by GMHelios
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   79
  • Joined:  06/13/13
  • Last Seen:  

try this

OnNPCKillEvent:
	if (killedrid == 3054) {
		.@origin = getcharid(3);
		getpartymember getcharid(1),1;
		getpartymember getcharid(1),2;
		for (.@i = 0; .@i < $@partymembercount; .@i++) {
			if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) {
				attachrid $@partymemberaid[.@i];
				message strcharinfo(0),"You've killed the Dragon!";
				sc_start SC_BLESSING,300000,50;
				sc_start SC_INCREASEAGI,300000,50;
				sc_start SC_MAGNIFICAT,300000,5;
				sc_start SC_ANGELUS,300000,10;
				specialeffect2 668;
			}
		}
		attachrid .@origin;
		end;
	}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

Hey Litro Endemic, thanks for answering.

 

It didnt work tho...

 

The console doesnt show any problem, but it has no effect. Just the leader of the party get the buffs. :/

 

Anything?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

Anything?

 

If you're using rAthena you could do it like this...

OnNPCKillEvent:
	if( killedrid == 3054 ) {
		message strcharinfo(0),"You've killed the Dragon!";
		addrid( 2, 0, getcharid(1) );
		sc_start SC_BLESSING, 300000, 50;
		sc_start SC_INCREASEAGI, 300000, 50;
		sc_start SC_MAGNIFICAT, 300000, 5;
		sc_start SC_ANGELUS, 300000, 10;
		specialeffect2 668;
	}
	end;

It would be much better for your server to do it like this...

-	script	NPCNAME	-1,{
On3054DeathEvent:
	message strcharinfo(0),"You've killed the Dragon!";
	addrid( 2, 0, getcharid(1) );
	sc_start SC_BLESSING, 300000, 50;
	sc_start SC_INCREASEAGI, 300000, 50;
	sc_start SC_MAGNIFICAT, 300000, 5;
	sc_start SC_ANGELUS, 300000, 10;
	specialeffect2 668;
	end;
}

Which would work with either...

monster "prontera",0,0,"--ja--",3054,1,"NPCNAME::On3054DeathEvent";

Or

prontera,0,0,20,20	monster	--ja--	3054,1,0,0,"NPCNAME::On3054DeathEvent"
Link to comment
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.   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.

×
×
  • Create New...