Jump to content
  • 0

Check party members timer


Promise

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

I need something like this.

On trying to enter:
	if (anypartymember #partyquest1 > 0) {
	mes "Any of your party members didn't wait 6 hours before trying to start the PQ again";
	}


OnFinish: // This part is done.

	set #partyquest1, gettimetick ( 2 ) + 21600;
	end;

I need a entrance check of timer.

If any of the party members have #partyquest1 timer, they cant enter the partyquest.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

something similar ....

.@origin_aid = getcharid(3);
getpartymember getcharid(1),2;
for ( .@i = 0; .@i < $@partymembercount && !.@fail; .@i++ )
	if ( attachrid( $@partymemberaid[.@i] ) 
		if ( #partyquest1 > 0 ) {
			.@fail;
		}
attachrid( .@origin_aid );
if ( .@fail ) {
	mes "Any of your party members didn't wait 6 hours before trying to start the PQ again";
}

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   344
  • Joined:  10/17/12
  • Last Seen:  

There is a good example of checking party members variables in this.

https://rathena.org/board/topic/60376-tr0ns-questboard-165/

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

Thabk u, ill check it.

There is a good example of checking party members variables in this.

https://rathena.org/board/topic/60376-tr0ns-questboard-165/

 

didn't found that.

bump!

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   46
  • Joined:  08/14/12
  • Last Seen:  

It starts at line 271

getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
for(set .@j, 0; .@j < $@partymembercount; .@j++){
	if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){
		if(attachrid($@partymemberaid[.@j])){
			if(h_run==1 && getcharid(3) != .@killerid && .@currentquest$ == currentquest$ && HP > 0){
				getmapxy(.@map2$,.@x2,.@y2,0);
				if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){
					if(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+.@currentquest$+"_huntingmob["+.@i+"]"))
					{
						setd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
						dispbottom getd("."+.@currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+.@currentquest$+"_huntingmob["+.@i+"]")+")";
					}
				}
			}
		}
	}
}
attachrid(.@killerid);

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

 

something similar ....

.@origin_aid = getcharid(3);
getpartymember getcharid(1),2;
for ( .@i = 0; .@i < $@partymembercount && !.@fail; .@i++ )
	if ( attachrid( $@partymemberaid[.@i] ) 
		if ( #partyquest1 > 0 ) {
			.@fail;
		}
attachrid( .@origin_aid );
if ( .@fail ) {
	mes "Any of your party members didn't wait 6 hours before trying to start the PQ again";
}

 

Fking love u. Really thanks mate.

 

Another question, trying to store account cooldown and getting this:

http://prntscr.com/bmfxnr

 

Script:

	set #partyquest1, gettimetick ( 2 ) + 21600;

Its just 6 hours (360 mins)

and showing 24mil mins and storing:

1467198312 secs in acc_reg_num table.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

remaining time calculation should be

( #partyquest1 - gettimetick ( 2 ) ) / 60
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

Solved. Thank u so much dude.

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