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
- 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
please be gentle with me, point me where im wrong
- 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
Last edited by a moderator: