Jump to content
  • 0

How to show time remaining.


s2pidnab

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  05/11/12
  • Last Seen:  

To begin with, I would like to ask if it is possible to show the the remaining time before a player will get his/her next reward.

 

The script is all about using @reward to check the remaining time of the player before he/she can get the reward.

 

See script:

-	script	hourlypoint1s	-1,{

//--Start of the Script
OnPCLoginEvent:
dispbottom "Hourly Points will start now.";
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;

OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set #IGPOINTS, #IGPOINTS + 2;
dispbottom "You received 2 In-Game Points for staying 1 hour in-game.";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 5) {
set @consecutive_hour,0;
set #IGPOINTS, #IGPOINTS + 10;
dispbottom "You received 10 In-Game Points for staying 5 hours in-game.";
}
stopnpctimer;
initnpctimer;
end;

}

-	script	check	-1,{
    OnInit:
        bindatcmd "igpts",strnpcinfo(3)+"::OnCheck";
        end;
    OnCheck:
        dispbottom "You have " +#IGPOINTS+ " In-Game Points.";
        end;
}

-	script	time	-1,{
    OnInit:
        bindatcmd "reward",strnpcinfo(3)+"::OnReward";
        end;
    OnReward:
        dispbottom "You still have " +//remaining minutes+ " to get your next reward.";
        end;
}

How can you set the timer to 60minutes as starting or [1hr] and the "@minute" in the script will be the one to decrement it so I can use it in my @reward command? Thanks alot. 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   Paste as plain text instead

  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.

×
×
  • Create New...