Module use requiring special items?

General Chat, Comments
Post Reply
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Module use requiring special items?

Post by cbsarge »

I'm trying to come up with a way to have special events that are time limited. We would call them Blitz events and they would last for about an hour and offer special prizes.

I'm trying to come up with a way to do this but, haven't been able to come up with a real good way. We have kicked around the idea of making a second Combat module and requiring more AP to enter than we allow our users. Then when the event is starting we could drop it down to a normal amount or even 0 to allow for a total free-for-all. This would work but, then I remembered we also have the option to create items with an "hour of the day" qualifier. We could set that to whatever hour we want the event to take place but, I can't figure out how to then use that to allow or restrict entry.

I'm open to suggestions if anyone has any. If I get this working then I'll have to come up with a way to score it but, that can happen later.
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: Module use requiring special items?

Post by KaL »

Well you can create a timer function and loop all your players uservariable.
Example:

1) PutTimeEvent (60) - this part will activate the time
2) intimeEvent() - you have to loop all player uservariables in the intimeEvent($user) using "while"
3) display the time for all players to see at home.php with this script:
Use this to display the time but you have to loop the $user variable on this line:

home.php

While {
<span style='color:#FFFFFF'> %s</span> until your time is expire.</b>\", TimeInterval(time(), intval(GetUserVariable(event,$user))));
}
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Module use requiring special items?

Post by hallsofvallhalla »

I would set your AP costs in a table with headers like Base, Current, DateTIme then just modify everything through there. You then set the DateTime to the ending time. Anytime you need an AP you query and if the timer has already passed the DateTime stamp then use Base, if it happens to be for an hour later or whatever you use the current. This way you just set the current time + length of time of the event into the DateTIme field.
Post Reply

Return to “General”