This event is something that a player on my server, will only have the right to play my server for 5 hours a day, when it goes beyond that it is automatically sent and arrested in the first city of my game, prevented from accessing the portals of that city, some items etc ..., Upon arrival 00:00 AM (Midnight), the curse of the conometro will be removed ..., And all players will be able to play normally again ..., It has some errors and I need the guidance of someone experienced to help me...
Script:
Spoiler
- script penalidadeconometrada -1,{
//86400000 // 1 dia
//18000000 // 5 horas
//3600000 // 1 hora
//60000 // 1 minuto
//1000 // 1 segundo
// ADD TIMER
OnClock0000: // 00:00 AM = Del Effects
set CHARHMC, CHARHMC = 4; // Hours
set CHARMMC, CHARMMC = 59; // Minutes
set CHARSMC, CHARSMC = 59; // Seconds
set CHARTMC, CHARTMC = 0; // if == 18000000, On Cursed Time // Del 5 hours penality
set VerifiqueEventMC, VerifiqueEventMC = 0; //
set CallCidadeEventMC, CallCidadeEventMC = 0; // Call Char City
announce "A Maldição do Conometro Foi Removida...", bc_all;
end;
Question
cder
This event is something that a player on my server, will only have the right to play my server for 5 hours a day, when it goes beyond that it is automatically sent and arrested in the first city of my game, prevented from accessing the portals of that city, some items etc ..., Upon arrival 00:00 AM (Midnight), the curse of the conometro will be removed ..., And all players will be able to play normally again ..., It has some errors and I need the guidance of someone experienced to help me...
Script:
- script penalidadeconometrada -1,{
//86400000 // 1 dia
//18000000 // 5 horas
//3600000 // 1 hora
//60000 // 1 minuto
//1000 // 1 segundo
// ADD TIMER
OnClock0000: // 00:00 AM = Del Effects
set CHARHMC, CHARHMC = 4; // Hours
set CHARMMC, CHARMMC = 59; // Minutes
set CHARSMC, CHARSMC = 59; // Seconds
set CHARTMC, CHARTMC = 0; // if == 18000000, On Cursed Time // Del 5 hours penality
set VerifiqueEventMC, VerifiqueEventMC = 0; //
set CallCidadeEventMC, CallCidadeEventMC = 0; // Call Char City
announce "A Maldição do Conometro Foi Removida...", bc_all;
end;
OnPCLoginEvent: // if char on
if(PenalidadeConometrada < 1){
PenalidadeConometrada++;
set CHARHMC, CHARHMC = 4;
set CHARMMC, CHARMMC = 59;
set CHARSMC, CHARSMC = 59;
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;
}
else
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;
// Labels ADDTIMER
OnHoras: // Hours
if (CHARHMC > 0){
CHARHMC--;
deltimer strnpcinfo(3) + "::OnHoras";
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
end;
}
else
deltimer strnpcinfo(3) + "::OnHoras";
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
end;
OnMinutos: // Minutes
if (VerifiqueEventMC == 1){
deltimer strnpcinfo(3) + "::OnMinutos";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
}
else
if (CHARMMC < 0){
set CHARMMC, CHARMMC = 59;
deltimer strnpcinfo(3) + "::OnMinutos";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
end;
}
else
CHARMMC--;
deltimer strnpcinfo(3) + "::OnMinutos";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
end;
OnSegundos: // Seconds
if (VerifiqueEventMC == 1){
deltimer strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
}
else
if (CHARSMC < 0){
set CHARSMC, CHARSMC = 59;
deltimer strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
end;
}
else
CHARSMC--;
deltimer strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
end;
OnVerifiqueEvent: // A cada 1 segundo online verifica se está com CallCidadeEventMC e OnVerifiqueEventMC Ligado == 1
if (CallCidadeEventMC == 1){
deltimer strnpcinfo(3) + "::OnVerifiqueEvent";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;
}
else
if (CHARTMC == 18000000){
CallCidadeEventMC++;
VerifiqueEventMC++;
warp "genese",214,168;
deltimer strnpcinfo(3) + "::OnVerifiqueEvent";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;
}
else
set CHARTMC, CHARTMC + 1000;
deltimer strnpcinfo(3) + "::OnVerifiqueEvent";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;
}
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.