The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Events Help
Author Message
jeem
Apprentice
*

Posts: 33
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 3



Post: #1
Auto Events Help
Yes, I'm making automated events for SCP.. I'm adding two screenshots to better reflect the concept I have in mind. Calendar thing is pretty much done, I'll probably tweak the layout a bit because it's ugly as hell and optimise the code some. The other dialog is just a crude example and in no way done.

What I can't figure out is how to store the events.

Imagine adding events to Google Calendar or whatever you're using, but through a dialog in UO client. You select the event type (pvp, bomberman etc.), you type in player limits, rewards, entry fee, date and time, other stuff. Below that is the repetition section, you can select weekly, monthly and every X days, below that is until which date the repetition will occur. When you press the apply button, the event will be stored in some way. Repetitions will be stored separately so they can appear on the calendar.

So far I've considered these methods of storage:
LISTs - dismissed because they are not practical and flexible.
MySQL - would be the best options but I want to keep the system drag-and-drop.
Defnames - this was khaos' recommendation but dismissed because events can't be altered ingame which contradicts my idea above.
VARs - this is the idea I'm currently entertaining. Better control than LIST, doesn't have MySQL's ease-to-use and features like sort, and unlike DEFs, can easily be altered ingame.

So help me choose or recommend a new way I haven't thought of.

PS: With VARs I made this test function to add events:
Code:
[function deneme] // date, time, type, buyin, reward, minplayer, maxplayer
var.events_5.3.2012 = 3
var.events_5.3.2012_0 = 13:00,Death Match,10000,100000,8,64
var.events_5.3.2012_1 = 15:00,1v1 Tournament,20000,100000,8,64
var.events_5.3.2012_2 = 21:00,Bomberman,20000,5,10,1000


Attached File(s) Thumbnail(s)
       
(This post was last modified: 05-03-2012 09:32 AM by jeem.)
05-03-2012 09:29 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Auto Events Help
I've never really tried lists before... why do you think they are less flexible?
05-03-2012 09:33 AM
Find all posts by this user Like Post Quote this message in a reply
jeem
Apprentice
*

Posts: 33
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 3



Post: #3
RE: Auto Events Help
Also, which events should be included in this? I've already thought of 1v1, 2v2, 4v4, Deathmatch and Team Deathmatch, and Bomberman.

Second, what are good places in the map to hold these events?
05-03-2012 09:37 AM
Find all posts by this user Like Post Quote this message in a reply
Valios
Super Moderator
****

Posts: 390
Likes Given: 0
Likes Received: 12 in 9 posts
Joined: Mar 2010
Reputation: 6

Sphere Suite 2013

Post: #4
RE: Auto Events Help
Your idea is just brilliant, can we work this concept for the script community pack?
05-03-2012 09:43 AM
Find all posts by this user Like Post Quote this message in a reply
jeem
Apprentice
*

Posts: 33
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 3



Post: #5
RE: Auto Events Help
(05-03-2012 09:33 AM)RanXerox Wrote:  I've never really tried lists before... why do you think they are less flexible?
Adding a new item is hard because I need to keep separate list for every data I need to store. I can't do:
Code:
list.sphere_events.add "date,time,other stuff"
I have to do:
Code:
list.sphere_events_date.add "date"
list.sphere_events_time.add "time"
list.sphere_events_stuff.add "stuff"

Can't tell you the reason but I messed around with it enough when I was making SCP's gmpage system. Findelem doesn't work with the first way.


Selecting is pretty much impossible for what I have in mind because findelem only returns the first item it finds and ignores the rest. This makes it possible for only one event to take place in a day.

Updating is hard. First you have to find what you want to change with findelem and store its position, then you update it. It's a non-issue but this will probably turn out to be a thousand line of coding. It might grow tiring.
(05-03-2012 09:43 AM)Valios Wrote:  Your idea is just brilliant, can we work this concept for the script community pack?

Yeah, see first sentence of first post Tongue I am making this for SCP and once I set the foundation, I am hoping to turn this into a collective project. Any input will be welcome.
(This post was last modified: 05-03-2012 09:57 AM by jeem.)
05-03-2012 09:54 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #6
RE: Auto Events Help
Deflist would work. You can always edit and reload a script... and people should be doing a server restart daily in a maintenance hour. At least that is my opinion.

Every professional company ran server does a server down time. I do as well. I restart my computer. Clear any background resource using processes which arent neccessary. etc.

Again, that is just my opinion. I know you can reload scripts after an edit and I personally wouldn't make a last minute change in event planning. I'd be able to keep me upcoming events in order on maintanence days.
05-03-2012 10:05 AM
Find all posts by this user Like Post Quote this message in a reply
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #7
RE: Auto Events Help
Here is something I made but haven't finished yet. You may be able to use this unless you're using a command for people to join the event instead of a physical portal. Also provided is a list of events ill be doing on my shard for more event ideas. This will probably have some initial flaws because I haven't really fully started working on my events just here and there so some of this may need fixed.

Code:
[DIALOG d_start_event]
0,0
page 0
resizepic 42 27 9200 361 356
resizepic 55 39 9200 333 31
dtext 185 45 0480 Event Startup
button 67 118 2117 2118 1 0 1
dtext 88 116 0480 1v1 Supplied
button 67 144 2117 2118 1 0 2
dtext 88 142 0480 1v1 Regular
button 67 168 2117 2118 1 0 3
dtext 88 166 0480 1v1 Replacement
button 67 194 2117 2118 1 0 4
dtext 88 192 0480 2v2 Supplied
button 67 221 2117 2118 1 0 5
dtext 88 219 0480 2v2 Regular
button 67 247 2117 2118 1 0 6
dtext 88 245 0480 2v2 Replacement
button 67 272 2117 2118 1 0 7
dtext 88 270 0480 FFA Supplied
button 67 298 2117 2118 1 0 8
dtext 88 296 0480 FFA Regular
button 67 324 2117 2118 1 0 9
dtext 88 322 0480 Capture The Flag
button 233 118 2117 2118 1 0 10
dtext 254 116 0480 Color Wars
button 233 143 2117 2118 1 0 11
dtext 254 141 0480 Death by Dice
button 233 168 2117 2118 1 0 12
dtext 254 166 0480 Open Duels
button 233 193 2117 2118 1 0 13
dtext 254 191 0480 Mud Wrestling

[DIALOG d_start_event text]
Event Startup
1v1 Supplied
1v1 Regular
1v1 Replacement
2v2 Supplied
2v2 Regular
2v2 Replacement
FFA Supplied
FFA Regular
Capture The Flag
Color Wars
Death by Dice
Open Duels
Mud Wrestling

[DIALOG d_start_event button]

ON=1
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_1v1_supply
endif

ON=2
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_1v1_regular
endif

ON=3
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_1v1_replacement
endif

ON=4
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_2v2_supply
endif

ON=5
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_2v2_regular
endif

ON=6
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_2v2_replacement
endif

ON=7
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_ffa_supply
endif

ON=8
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_ffa_regular
endif

ON=9
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_ctf
endif

ON=10
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_colorwars
endif

ON=11
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_deathbydice
endif

ON=12
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_open_duels
endif

ON=13
if <VAR.EVENTSTATUS> == 1
src.sysmessage An event is already in progress you cant start another event.
else
start_mud_wrestling
endif

[EOF]

///

[COMMENT Instructions]
Set up:
This script will enable you to start an event and place a moongate at the front of every bank. The system will spam for 10 minutes automatically and then close the portal
The Portal will take you to the pre-post duel pit area. All portals are the same except the britain bank portal which is the spammer portal and sends out the message
to clients.
.startevent

[DIALOG D_ENTER_DUEL_PITS]
270,170
SRC.CLOSEALLDIALOGS
PAGE 0
resizepic 20 0 5054 420 280
gumppictiled 29 10 400 20 2624
checkertrans 29 10 400 20
xmfhtmlgumpcolor 29 10 120 25 1062051 0 0 30849
gumppictiled 29 40 400 200 2624
checkertrans 29 40 400 200
IF (STRCMPI(<SRC.REGION.NAME>,Doom Gauntlet))
xmfhtmlgumpcolor 29 40 400 200 1062049 0 1 31393
ELSE
xmfhtmlgumpcolor 29 40 400 200 1062109 0 1 31393
ENDIF
gumppictiled 29 250 400 20 2624
checkertrans 29 250 400 20

button 29 250 4005 4006 1 0 1
xmfhtmlgumpcolor 64 250 70 25 1011011 0 0 32767

button 230 250 4005 4006 1 0 0
xmfhtmlgumpcolor 265 250 70 25 1060051 0 0 32767

[DIALOG D_ENTER_DUEL_PITS BUTTON]
ON=1
IF  (<DISTANCE>>2)
REF1=<UID>
    IF (!(<SRC.ISGM>))
        FORCHARS 5
            IF (<ISMYPET>)
            GO Duel Pits
            ENDIF
        ENDFOR
    ENDIF
SRC.GO Duel Pits
ENDIF

[PLEVEL 4]
.startevent

[FUNCTION startevent]
SRC.DIALOG D_START_EVENT

[DEFNAME portal_coord]
britain_bank 1431,1695,0,0
minoc_bank 2504,562,0,0
moonglow_bank 4472,1178,0,0
cove_bank 2234,1198,0,0
jhelom_bank 1324,3780,0,0
skara_bank 577,2131,0,0
trinsic_bank 1822,2825,0,0
wind_bank 5222,185,5,0
yew_bank 636,859,0,0
del_bank 5270,3991,37,0
vesp_bank 2899,673,0,0
occlo_bank 3690,2522,0,0
bucs_bank 2723,2188,0,0
serp_bank 2893,3475,15,0
papua_bank 5674,3142,12,0
//add Magincia Later

[PLEVEL 4]
.start_1v1_supply

[FUNCTION start_1v1_supply]
SERV.NEWITEM i_event_portal_spam_1v1_supply
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_1v1_supply
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_1v1_supply]
ID=0F6C
NAME=1v1 Auto Supply Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Spamming Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Auto Supply in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Auto Supply in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Auto Supply in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Auto Supply in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Auto Supply *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_1v1_supply]
ID=0F6C
NAME=1v1 Auto Supply Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=1v1 Auto Supply Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_1v1_regular

[FUNCTION start_1v1_regular]
SERV.NEWITEM i_event_portal_spam_1v1_regular
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_1v1_regular
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_1v1_regular]
ID=0F6C
NAME=1v1 Regular Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=1v1 Regular Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Regular in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Regular in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Regular in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Regular in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Regular *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_1v1_regular]
ID=0F6C
NAME=1v1 Regular Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=1v1 Regular Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_1v1_replacement

[FUNCTION start_1v1_Replacement]
SERV.NEWITEM i_event_portal_spam_1v1_Replacement
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_1v1_Replacement
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_1v1_Replacement]
ID=0F6C
NAME=1v1 Replacement Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=1v1 Replacement Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Replacement in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Replacement in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Replacement in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Replacement in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 1v1 Replacement *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_1v1_Replacement]
ID=0F6C
NAME=1v1 Replacement Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=1v1 Replacement Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_2v2_supply

[FUNCTION start_2v2_supply]
SERV.NEWITEM i_event_portal_spam_2v2_supply
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_2v2_supply
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_2v2_supply]
ID=0F6C
NAME=2v2 Auto Supply Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Spamming Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Auto Supply in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Auto Supply in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Auto Supply in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Auto Supply in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Auto Supply *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_2v2_supply]
ID=0F6C
NAME=2v2 Auto Supply Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=2v2 Auto Supply Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_2v2_regular

[FUNCTION start_2v2_regular]
SERV.NEWITEM i_event_portal_spam_2v2_regular
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_2v2_regular
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_2v2_regular]
ID=0F6C
NAME=2v2 Regular Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=2v2 Regular Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Regular in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Regular in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Regular in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Regular in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Regular *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_2v2_regular]
ID=0F6C
NAME=2v2 Regular Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=2v2 Regular Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_2v2_replacement

[FUNCTION start_2v2_Replacement]
SERV.NEWITEM i_event_portal_spam_2v2_Replacement
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_2v2_Replacement
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_2v2_Replacement]
ID=0F6C
NAME=2v2 Replacement Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=2v2 Replacement Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Replacement in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Replacement in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Replacement in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Replacement in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Replacement *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_2v2_Replacement]
ID=0F6C
NAME=2v2 Replacement Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=2v2 Replacement Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_ffa_supplied

[FUNCTION start_ffa_supplied]
SERV.NEWITEM i_event_portal_spam_ffa_supplied
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_ffa_supplied
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_ffa_supplied]
ID=0F6C
NAME=FFA Supplied Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=FFA Supplied Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Supplied in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Supplied in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Supplied in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Supplied in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Supplied *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_ffa_supplied]
ID=0F6C
NAME=FFA Supplied Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=FFA Supplied Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_ffa_Regular

[FUNCTION start_ffa_Regular]
SERV.NEWITEM i_event_portal_spam_ffa_Regular
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_ffa_Regular
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_ffa_Regular]
ID=0F6C
NAME=FFA Regular Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=FFA Regular Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 2v2 Regular in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Regular in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Regular in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Regular in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 FFA Regular *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_ffa_Regular]
ID=0F6C
NAME=FFA Regular Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=FFA Regular Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_ctf

[FUNCTION start_ctf]
SERV.NEWITEM i_event_portal_spam_ctf
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_ctf
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_ctf]
ID=0F6C
NAME=Capture the Flag Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Capture the Flag Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Capture the Flag in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Capture the Flag in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Capture the Flag in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Capture the Flag in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Capture the Flag *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_ctf]
ID=0F6C
NAME=Capture the Flag Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Capture the Flag Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_colorwars

[FUNCTION start_colorwars]
SERV.NEWITEM i_event_portal_spam_colorwars
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_colorwars
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_colorwars]
ID=0F6C
NAME=Color Wars Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Color Wars Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Color Wars in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Color Wars in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Color Wars in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Color Wars in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Color Wars *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_colorwars]
ID=0F6C
NAME=Color Wars Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Color Wars Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_deathbydice

[FUNCTION start_deathbydice]
SERV.NEWITEM i_event_portal_spam_deathbydice
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_deathbydice
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_deathbydice]
ID=0F6C
NAME=Death by Dice Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Death by Dice Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Death by Dice in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Death by Dice in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Death by Dice in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Death by Dice in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Death by Dice *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_deathbydice]
ID=0F6C
NAME=Death by Dice Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Death by Dice Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_open_duels

[FUNCTION start_open_duels]
SERV.NEWITEM i_event_portal_spam_open_duels
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_open_duels
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_open_duels]
ID=0F6C
NAME=Open Duels Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Open Duels Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Open Duels in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Open Duels in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Open Duels in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Open Duels in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Open Duels *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_open_duels]
ID=0F6C
NAME=Open Duels Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Open Duels Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
//
[PLEVEL 4]
.start_mud_wrestling

[FUNCTION start_mud_wrestling]
SERV.NEWITEM i_event_portal_spam_mud_wrestling
NEW.P <def.britain_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.minoc_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.moonglow_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.cove_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.jhelom_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.skara_brae>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.trinsic_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.wind_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.yew_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.del_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.vesp_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.occlo_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.bucs_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.serp_bank>
SERV.NEWITEM i_event_portal_mud_wrestling
NEW.P <def.papua_bank>

[ITEMDEF i_event_portal_spam_mud_wrestling]
ID=0F6C
NAME=Mud Wrestling Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Mud Wrestling Portal Spam

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

ON=@TIMER
    IF (<MOREX>=1)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Mud Wrestling in 10 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    VAR.EVENTSTATUS=1
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Mud Wrestling in 8 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Mud Wrestling in 5 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Mud Wrestling in 2 Minutes!
    SERV.ALLCLIENTS sysmessage @0482,0,1 To join the event visit any bank and pass through the event portal.
    MOREX=481
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    SERV.ALLCLIENTS sysmessage @0482,0,1 Mud Wrestling *CLOSED*
    REMOVE
    VAR.EVENTSTATUS=0 //Add this to the end of every event script end.
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
    
[ITEMDEF i_event_portal_mud_wrestling]
ID=0F6C
NAME=Mud Wrestling Gate

CATEGORY=Custom Event System
SUBSECTION=Event Portals
DESCRIPTION=Mud Wrestling Portal

on=@create
    COLOR=0485
    ATTR=08012
    TIMER=1

ON=@STEP
IF (<SRC.ACCOUNT.PLEVEL>>1)
SRC.GO Duel Pits
RETURN 1
ELSE
SRC.SDIALOG D_ENTER_DUEL_PITS
RETURN 1

on=@dclick
trigger step
return 1

ON=@TIMER
    IF (<MOREX>=1)
    MOREX=2
    TIMER=1
    RETURN 1
    
    ELSEIF (<MOREX>=120)
    MOREX=121
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=300)
    MOREX=301
    TIMER=1
    RETURN 1

    ELSEIF (<MOREX>=480)
    MOREX=481
    RETURN 1
    
    ELSEIF (<MOREX>=600)
    REMOVE
    RETURN 1

    ELSE
    TIMER=1
    MOREX=<MOREX>+1
    RETURN 1
    ENDIF
(This post was last modified: 05-03-2012 10:16 AM by Reflex.)
05-03-2012 10:14 AM
Find all posts by this user Like Post Quote this message in a reply
Valios
Super Moderator
****

Posts: 390
Likes Given: 0
Likes Received: 12 in 9 posts
Joined: Mar 2010
Reputation: 6

Sphere Suite 2013

Post: #8
RE: Auto Events Help
Storing the info or the whole event itself?
For the first one you can use speech events to store the info as strings ingame and then do the comparissons between these strings and your preset defnames

Click button > select event's name
Say the name ingame, i.e: Bomberman
If (player_spk_string"Bomberman" == defname"Bomberman")
store data in a string (var.eventname_date.dd.mm.yy.hr = player_spk_string)
else
message "that event is not listed in your database"
05-03-2012 10:18 AM
Find all posts by this user Like Post Quote this message in a reply
jeem
Apprentice
*

Posts: 33
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 3



Post: #9
RE: Auto Events Help
@Reflex Thanks for the input. At the very least I will include your events. I'll know what else I can get when I look through your code.
(05-03-2012 10:18 AM)Valios Wrote:  Storing the info or the whole event itself?
For the first one you can use speech events to store the info as strings ingame and then do the comparissons between these strings and your preset defnames

Click button > select event's name
Say the name ingame, i.e: Bomberman
If (player_spk_string"Bomberman" == defname"Bomberman")
store data in a string (var.eventname_date.dd.mm.yy.hr = player_spk_string)
else
message "that event is not listed in your database"

I'm not sure what you mean here. What do you mean by speech events? And I can't quite figure out what the pseudo-code does but I suppose you are recommending me to group the events by their types. That would make it harder to call them in the calendar. I believe primary criterion should be date and then time to easily list them in the calendar and automatically start the event when its time comes.

I'd appreciate if you clarify.
(This post was last modified: 05-03-2012 10:44 AM by jeem.)
05-03-2012 10:21 AM
Find all posts by this user Like Post Quote this message in a reply
Valios
Super Moderator
****

Posts: 390
Likes Given: 0
Likes Received: 12 in 9 posts
Joined: Mar 2010
Reputation: 6

Sphere Suite 2013

Post: #10
RE: Auto Events Help
Sorry for the misconception and poor explanation. Forget it, in that moment what crossed to my mind was to create an interaction between the dialog and the client by capturing player speech arguments to save all the event specifications into the scheduler this way, don't ask me why, I took a quick look at the post description and my mind processed the whole thing the way it liked. As for the pseudocode I tend to do this regulary when I'm messing with other programming languges.

What you're asking for is "how to" update the calendar once you have set the event dates and info right? If I'm still lost do not berate me Tongue
Anyways I can contribute coding some stuff you can use for the script including new dialogs if you don't like yours.
05-03-2012 06:57 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)