I'm trying to create a loop for an NPC that counts down from 10 to 0 every second, and when it reaches 0 the loop stops and performs an action like hiding the npc, the problem I'm having is that it doesn't stop at 0 and when clicking on the npc the numbers get out of control, I just want the npc to count from 10 backwards to 0 and that when it reaches 0 the npc hides and on the other hand clicking on the npc does not affect or alter his account In the loop
guild_vs1-1,50,49,3 script Valkyrie 811 ,{
query_sql "UPDATE `valkyrie` SET `puntos` = 10";
OnInit:
query_sql "SELECT `puntos` FROM `valkyrie`",.@puntos$;
do {
waitingroom "HP: "+.@puntos$+"",0;
query_sql "UPDATE `valkyrie` SET `puntos` = `puntos` - 1";
Question
Kawita
I'm trying to create a loop for an NPC that counts down from 10 to 0 every second, and when it reaches 0 the loop stops and performs an action like hiding the npc, the problem I'm having is that it doesn't stop at 0 and when clicking on the npc the numbers get out of control, I just want the npc to count from 10 backwards to 0 and that when it reaches 0 the npc hides and on the other hand clicking on the npc does not affect or alter his account In the loop
guild_vs1-1,50,49,3 script Valkyrie 811 ,{
query_sql "UPDATE `valkyrie` SET `puntos` = 10";
OnInit:
query_sql "SELECT `puntos` FROM `valkyrie`",.@puntos$;
do {
waitingroom "HP: "+.@puntos$+"",0;
query_sql "UPDATE `valkyrie` SET `puntos` = `puntos` - 1";
sleep 1000;
} while(1);
disablenpc "Valkyrie";
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.