Jump to content
  • 0
Sign in to follow this  
Litro

Help Me Make A Ladder

Question

before i was asking how to make a timer for how long a partner spend they time in the game, here my script im a noob in script

please be gentle with me, point me where im wrong  :meow: 

 

-	script	asdasdawe	-1,{OnPCLoginEvent:	query_sql "SELECT `name` FROM `char` WHERE `char_id`="+getpartnerid()+" ",@couplename$;	set .@couple,getcharid(3,@couplename$);	set .@invokeid,getcharid(3);	detachrid;	if(.@couple && attachrid(.@couple)) {		message strcharinfo(0),"Couple Has Logged In";		attachnpctimer ""+strcharinfo(0)+"";		initnpctimer;		end;	} else {		set .@couple,0;		end;	}	if(attachrid(.@invokeid)) {	if(.@playerid) {		attachnpctimer ""+strcharinfo(0)+"";		initnpctimer;		end;	}	else {		end;    }OnPCLogoutEvent:	query_sql "SELECT `name` FROM `char` WHERE `char_id`="+getpartnerid()+" ",@couplename$;	set .@couple,getcharid(3,@couplename$);	set .@invokeid,getcharid(3);	detachrid;	if(.@couple && attachrid(.@couple)) {		message strcharinfo(0),"Couple Has Logged Out";		stopnpctimer;		end;	} else {		set .@couple,0;		end;	}	if(attachrid(.@invokeid)) {	if(.@playerid) {		stopnpctimer;		end;	}	else {		end;    }OnTimer60000:OnTimer120000:OnTimer180000:OnTimer240000:OnTimer300000:OnTimer360000:OnTimer420000:OnTimer480000:OnTimer540000:OnTimer600000:OnTimer660000:OnTimer720000:OnTimer780000:OnTimer840000:OnTimer900000:OnTimer960000:OnTimer1020000:OnTimer1080000:OnTimer1140000:	if (checkvending() >= 1) {		stopnpctimer;		end;	}OnTimer60000:	set CoupleDay,CoupleDay + 1;	stopnpctimer;	initnpctimer getcharid(3);	end;}

and now how i make a npc ladder from its, if wee talk to the npc it will make look alike

 

1. Player A & Player B : 37 Day

2. Player C & Player D : 38 Day

3. Player E & Player F : 40 Day

 

it will log 20 Couple that have longest day,

 

if its possible please make or guide me how to make it excactly lika @Emistry - MVP Ladder Script http://pastebin.com/raw.php?i=KQFjt7ia

Edited by Litro

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You could try look into

*getpartnerid()This function returns the character ID of the invoking character's marriage partner, if any. If the invoking character is not married, it will return 0, which is a quick way to see if they are married:

 

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.