Hello guys, today I am having this problem and the problem is the end; instruction executed by the Hourly Reward script I have in my server.
Here is the code:
I've added some dispbottom messages to see where the problem is, and it is from the end; instruction. Look:
The problem is, that the end; is that also executes in the NPC script or there is some kind of trouble between scripts. How can I fix this? Or is there a way to detect that a message box is running?
Here is the code:
- script hourlypoints -1,{
//-- Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
//-- Check if Vending (normal or @at)
OnTimer3000:
if(checkvending() >= 1 || checkchatting() == 1)
{
dispbottom "AriaRO hourly reward event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
dispbottom "Chat 1";
}
dispbottom "Chat 2";
end;
//OnTimer60000:
OnTimer10000:
set @minute, @minute + 1;
dispbottom "1 minute";
//Check for 1 Minute
if(@minute == 60)
{
set @minute,0;
set .@point_amt, 10; //Points to get every hour (default: 10)
dispbottom "1 Hour";
getitem 20107,10;
dispbottom "You received AriaRO Hourly Ticket by staying ingame for 1 hour";
set @consecutive_hour, @consecutive_hour + 1;
}
stopnpctimer;
initnpctimer;
end;
}
//--End of the Script
//-- Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
//-- Check if Vending (normal or @at)
OnTimer3000:
if(checkvending() >= 1 || checkchatting() == 1)
{
dispbottom "AriaRO hourly reward event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
dispbottom "Chat 1";
}
dispbottom "Chat 2";
end;
//OnTimer60000:
OnTimer10000:
set @minute, @minute + 1;
dispbottom "1 minute";
//Check for 1 Minute
if(@minute == 60)
{
set @minute,0;
set .@point_amt, 10; //Points to get every hour (default: 10)
dispbottom "1 Hour";
getitem 20107,10;
dispbottom "You received AriaRO Hourly Ticket by staying ingame for 1 hour";
set @consecutive_hour, @consecutive_hour + 1;
}
stopnpctimer;
initnpctimer;
end;
}
//--End of the Script
I've added some dispbottom messages to see where the problem is, and it is from the end; instruction. Look:
The problem is, that the end; is that also executes in the NPC script or there is some kind of trouble between scripts. How can I fix this? Or is there a way to detect that a message box is running?