Jump to content
  • 0

Party Checker (job)


Question

Posted

So i need help with this script because it needs to,

(to go further on with the quest, player must be partied with a wanderer and minstrel)

a function perhaps?

Must be 3 in a party with the wanderer and minstrel.

Must be all online.

9 answers to this question

Recommended Posts

Posted (edited)

try this not test

set .@pid,getcharid(1);
if (!.@pid){
 mes "you need to join a party";
 colse

}
set .@said,getcharid(3);
getpartymember .@pid,1;
getpartymember .@pid,2;
while( .@i<$@partymembercount) {
if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i]) && attachrid $@partymemberaid[.@i]  ){
	set .@c, .@c +1;
	if ( Class == 4075 && !compare(.@temp$,"m") || Class == 4076 && !compare(.@temp$,"w") ){
			set .@cj, .@cj +1;
			set .@temp$,.@temp$+ (Class == 4075 ?"m":"w");	
	}
}
set .@i, .@i+1;
}

attachrid(.@said);

if(.@c<3){
 mes "Must be 3 online player in a party";
 close;
}

if(.@cj<2){
 mes "Must party with a wanderer and minstrel ";
 close;
}

Edited by QQfoolsorellina
Posted

I think the requirements that the TS wants is

- In order to proceed the quest there should be a Wanderer and a Minstrel in the party.

- The party members should be equal to 3. Not sure if more than or equal to 3, but at least 3 is needed.

- And must be all online.

Posted

I think the requirements that the TS wants is

- In order to proceed the quest there should be a Wanderer and a Minstrel in the party.

- The party members should be equal to 3. Not sure if more than or equal to 3, but at least 3 is needed.

- And must be all online.

This,
Posted (edited)

prontera,156,188,5    script    kjdfhkshfs    100,{

    getpartymember getcharid(1), 1;

    getpartymember getcharid(1), 2;

    .@compare_job$ = "#";

.@origin = getcharid(3);

    for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {

        if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {

            attachrid $@partymemberaid[.@i];

            .@online++;

            .@compare_job$ = .@compare_job$ + class +"#";

        }

    }

attachrid .@origin;

// dispbottom .@online + .@compare_job$;

    if ( .@online < 3 )

        mes "your party needs at least 3 party member online";

    else if ( !compare( .@compare_job$, "#"+ Job_Wanderer +"#" ) )

        mes "your party needs a wanderer in your party";

    else if ( !compare( .@compare_job$, "#"+ Job_Minstrel +"#" ) )

        mes "your party needs a minstrel in your party";

    else

        mes "you are free the go";

    close;

}

its kinda like a habit of mine prefer to use string with #value#value#value# and use *compare to search for a value Edited by AnnieRuru
  • Upvote 1
Posted

script error on npc/a.txt line 4

parse_line: expect command, missing function name or calling undeclared function

1 : {

2 : getpartymember getcharid(1), 1;

3 : getpartymember getcharid(1), 2;

* 4 : '.'@compare_job$ = "#";

Posted (edited)

Your emulator probably don't support it yet. When did you last updated rathena?

Just put 'set ' in front of

.@compare_job$

same for

.@online++;

&

.@compare_job$ = .@compare_job$ + class +"#";

And of course you'll need to change '=' to ','

Edited by Nameless2you
  • Upvote 1

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