Jump to content
  • 0

Question

Posted (edited)

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

3 answers to this question

Recommended Posts

Posted

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;
	}
Posted

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?

Posted
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"

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...