diff --git a/SierraUp.cfg b/SierraUp.cfg index a1773d9..31c140b 100644 --- a/SierraUp.cfg +++ b/SierraUp.cfg @@ -1,7 +1,7 @@ ProductName "Tribes2" DisplayName "Tribes 2" PatchFolder .\patch -CurrentVersion 0.22460.0.0 +CurrentVersion 0.22649.0.0 AutoStart MonitorPatch LaunchExe "tribes2.exe" diff --git a/base/console_end.cs b/base/console_end.cs index 5b4157b..0d84c2f 100644 --- a/base/console_end.cs +++ b/base/console_end.cs @@ -607,7 +607,7 @@ function DispatchLaunchMode() } } -if($LaunchMode !$= "Demo") - VerifyCDCheck(DispatchLaunchMode); -else +// if($LaunchMode !$= "Demo") +// VerifyCDCheck(DispatchLaunchMode); +// else DispatchLaunchMode(); diff --git a/base/gui/ChatGui.gui b/base/gui/ChatGui.gui index 95609dc..3751865 100644 --- a/base/gui/ChatGui.gui +++ b/base/gui/ChatGui.gui @@ -7,6 +7,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; @@ -15,12 +17,15 @@ new GuiChunkedBitmapCtrl(ChatGui) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "12 46"; - extent = "620 390"; + position = "12 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "CHAT"; + maxLength = "255"; noTitleBar = "0"; new ShellTabFrame(ChatTabFrame) { @@ -31,6 +36,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "576 254"; minExtent = "26 254"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; isVertical = "0"; useCloseButton = "0"; @@ -44,6 +51,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "560 29"; minExtent = "38 29"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; glowOffset = "7"; tabSpacing = "2"; @@ -55,9 +64,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { horizSizing = "width"; vertSizing = "height"; position = "33 91"; - extent = "381 251"; + extent = "381 284"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -72,9 +83,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { horizSizing = "width"; vertSizing = "height"; position = "6 7"; - extent = "353 237"; + extent = "353 270"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiChannelVectorCtrl(ChatGuiMessageVector) { @@ -82,14 +95,17 @@ new GuiChunkedBitmapCtrl(ChatGui) { horizSizing = "width"; vertSizing = "height"; position = "0 0"; - extent = "357 19"; + extent = "357 52"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "0"; lineContinuedIndex = "5"; allowedMatches[0] = "http"; matchColor = "4 235 105 255"; + maxColorIndex = "9"; }; }; }; @@ -98,9 +114,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { horizSizing = "left"; vertSizing = "height"; position = "412 62"; - extent = "175 308"; + extent = "175 341"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -115,9 +133,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 6"; - extent = "151 296"; + extent = "151 329"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellChatMemberList(ChatRoomMemberList) { @@ -125,9 +145,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "149 8"; + extent = "151 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "ChatPrivate();"; helpTag = "0"; enumerate = "1"; @@ -142,17 +164,20 @@ new GuiChunkedBitmapCtrl(ChatGui) { profile = "NewTextEditProfile"; horizSizing = "width"; vertSizing = "top"; - position = "27 337"; + position = "27 370"; extent = "392 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "ChatSendText();"; helpTag = "0"; - historySize = "0"; maxLength = "255"; + historySize = "0"; password = "0"; - glowOffset = "9 9"; tabComplete = "1"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; }; new GuiTextCtrl() { profile = "ShellTextRightProfile"; @@ -162,8 +187,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "38 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "TOPIC:"; + maxLength = "255"; }; new GuiBubbleTextCtrl(ChatChannelTopic) { profile = "ShellTopicTextProfile"; @@ -173,8 +201,11 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "207 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "This is a sample chat topic"; + maxLength = "255"; }; new ShellBitmapButton(ChatOpenPaneBtn) { profile = "ShellButtonProfile"; @@ -184,6 +215,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "100 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ChatTabView.openNewPane();"; helpTag = "0"; text = "CHANNELS"; @@ -197,6 +230,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "43 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ChatTabView.closeCurrentPane();"; accelerator = "x"; helpTag = "0"; @@ -211,6 +246,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "128 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EditChannelOptions();"; helpTag = "0"; text = "CHANNEL OPTIONS"; @@ -224,6 +261,8 @@ new GuiChunkedBitmapCtrl(ChatGui) { extent = "128 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EditChatOptions();"; helpTag = "0"; text = "CHAT OPTIONS"; diff --git a/base/gui/EmailGui.gui b/base/gui/EmailGui.gui index 98235f5..b837be8 100644 --- a/base/gui/EmailGui.gui +++ b/base/gui/EmailGui.gui @@ -7,6 +7,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; @@ -15,10 +17,12 @@ new GuiChunkedBitmapCtrl(EmailGui) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "12 46"; - extent = "620 390"; + position = "12 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "EMAIL"; maxLength = "255"; @@ -32,6 +36,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "90 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailEditBlocks();"; helpTag = "0"; text = "BLOCK LIST"; @@ -45,6 +51,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "93 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailBlockSender();"; helpTag = "0"; text = "TRACK SENDER"; @@ -58,6 +66,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "65 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailMessageDelete();"; accelerator = "delete"; helpTag = "0"; @@ -72,6 +82,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "75 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailMessageForward();"; helpTag = "0"; text = "FORWARD"; @@ -85,6 +97,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "80 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailMessageReplyAll();"; helpTag = "0"; text = "REPLY ALL"; @@ -98,6 +112,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "60 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailMessageReply();"; helpTag = "0"; text = "REPLY"; @@ -111,6 +127,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "53 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailMessageNew();"; helpTag = "0"; text = "NEW"; @@ -121,9 +139,11 @@ new GuiChunkedBitmapCtrl(EmailGui) { horizSizing = "width"; vertSizing = "height"; position = "18 70"; - extent = "583 301"; + extent = "583 334"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; columns = "0"; rows = "0 146"; @@ -142,6 +162,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "583 142"; minExtent = "8 72"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; fixedHorizontal = "1"; vertSpacerBitmap = "gui/shll_vertspacer"; @@ -155,6 +177,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "583 126"; minExtent = "8 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "0"; hScrollBar = "alwaysOff"; @@ -171,6 +195,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "559 118"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl() { @@ -178,9 +204,11 @@ new GuiChunkedBitmapCtrl(EmailGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "8 8"; + extent = "8 59"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; }; @@ -193,6 +221,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "563 138"; minExtent = "8 20"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; startScrollRegion = "4 0"; headerBitmap = "gui/server_tabs"; @@ -209,6 +239,7 @@ new GuiChunkedBitmapCtrl(EmailGui) { drawSeparators = "0"; headerSort = "1"; allowReposition = "1"; + noSelect = "0"; iconBase = "gui/email"; unreadFontType = "Univers Bold"; unreadFontSize = "16"; @@ -221,9 +252,11 @@ new GuiChunkedBitmapCtrl(EmailGui) { horizSizing = "left"; vertSizing = "height"; position = "0 146"; - extent = "583 155"; + extent = "583 188"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -238,9 +271,11 @@ new GuiChunkedBitmapCtrl(EmailGui) { horizSizing = "right"; vertSizing = "bottom"; position = "7 7"; - extent = "553 141"; + extent = "553 174"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(EMailInboxBodyText) { @@ -248,13 +283,16 @@ new GuiChunkedBitmapCtrl(EmailGui) { horizSizing = "width"; vertSizing = "bottom"; position = "0 0"; - extent = "551 18"; + extent = "551 248"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; }; @@ -267,6 +305,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "100 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailEditBuddys();"; helpTag = "0"; text = "TRACKING LIST"; @@ -280,6 +320,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "105 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailBlockSender();"; helpTag = "0"; text = "BLOCK SENDER"; @@ -293,6 +335,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "75 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GetEmailBtnClick();"; helpTag = "0"; text = "GET MAIL"; @@ -306,6 +350,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "101 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EMailGui.ButtonClick(0);"; helpTag = "0"; text = "INBOX"; @@ -320,6 +366,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "110 30"; minExtent = "26 27"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "SENT MAIL"; maxLength = "255"; @@ -333,6 +381,8 @@ new GuiChunkedBitmapCtrl(EmailGui) { extent = "112 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "EmailGui.buttonClick(1);"; helpTag = "0"; text = "DELETED MAIL"; diff --git a/base/gui/ForumsGui.gui b/base/gui/ForumsGui.gui index 4b864ff..8f2acaa 100644 --- a/base/gui/ForumsGui.gui +++ b/base/gui/ForumsGui.gui @@ -7,28 +7,22 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; - forumCount = "-1"; - refreshFlag = "0"; - state = "done"; - eid = "112"; - ebstat = "1"; - initialized = "1"; - key = "163"; - TDialogOpen = "0"; - bflag = "4"; - TextCheck = "0"; new ShellPaneCtrl(ForumShell) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "13 46"; - extent = "620 390"; + position = "13 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "FORUMS"; maxLength = "255"; @@ -39,9 +33,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "19 26"; - extent = "582 350"; + extent = "582 383"; minExtent = "8 8"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { @@ -52,6 +48,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "36 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "TOPIC:"; maxLength = "255"; @@ -64,6 +62,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "522 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Actual Topic Will Go Here"; maxLength = "255"; @@ -73,9 +73,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "2 18"; - extent = "578 292"; + extent = "578 325"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; columns = "0"; rows = "0 158"; @@ -94,6 +96,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "578 154"; minExtent = "24 72"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; fixedHorizontal = "1"; vertSpacerBitmap = "gui/shll_vertspacer"; @@ -107,6 +111,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "578 138"; minExtent = "8 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "0"; hScrollBar = "alwaysOff"; @@ -123,6 +129,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "554 130"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl() { @@ -130,9 +138,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "8 21"; + extent = "8 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; }; @@ -145,6 +155,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "558 150"; minExtent = "8 20"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "LinkBrowser(getField(ForumsMessageList.getRowTextById(ForumsMessageList.getSelectedID()),6),\"Warrior\");"; helpTag = "0"; startScrollRegion = "3 0"; @@ -163,12 +175,7 @@ new GuiChunkedBitmapCtrl(ForumsGui) { headerSort = "0"; allowReposition = "0"; noSelect = "0"; - lastID = "413653"; - state = "done"; - highestUpdate = "413653"; - lastDate = "04/20/2001 11:09am"; - allRead = "1"; - key = "162"; + allowColorChars = "1"; }; }; new ShellScrollCtrl() { @@ -176,9 +183,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "0 158"; - extent = "578 134"; + extent = "578 167"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -193,9 +202,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "7 7"; - extent = "548 120"; + extent = "548 153"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(ForumsText) { @@ -203,9 +214,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "0 0"; - extent = "532 36"; + extent = "532 18"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; @@ -219,10 +232,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "38 309"; + position = "38 342"; extent = "80 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsEditPost();"; helpTag = "0"; text = "EDIT"; @@ -232,10 +247,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "110 309"; + position = "110 342"; extent = "80 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsAcceptPost();"; accelerator = "alt a"; helpTag = "0"; @@ -246,10 +263,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "182 309"; + position = "182 342"; extent = "80 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsRejectPost();"; accelerator = "delete"; helpTag = "0"; @@ -260,10 +279,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "275 309"; + position = "275 342"; extent = "80 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsReply();"; accelerator = "alt r"; helpTag = "0"; @@ -274,10 +295,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "405 309"; + position = "405 342"; extent = "80 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsNext();"; accelerator = "s"; helpTag = "0"; @@ -288,10 +311,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "340 309"; + position = "340 342"; extent = "80 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsPrevious();"; accelerator = "w"; helpTag = "0"; @@ -302,10 +327,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "470 309"; + position = "470 342"; extent = "115 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsGoTopics();"; accelerator = "backspace"; helpTag = "0"; @@ -318,9 +345,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "15 26"; - extent = "580 349"; + extent = "580 382"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellScrollCtrl() { @@ -328,9 +357,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "height"; position = "7 16"; - extent = "161 291"; + extent = "161 324"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -345,9 +376,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 6"; - extent = "137 279"; + extent = "137 312"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellTextList(ForumsList) { @@ -355,9 +388,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "137 414"; + extent = "137 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; enumerate = "1"; resizeCell = "1"; @@ -372,9 +407,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "166 1"; - extent = "418 306"; + extent = "418 339"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; fixedHorizontal = "1"; vertSpacerBitmap = "gui/shll_vertspacer"; @@ -385,9 +422,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "344 16"; - extent = "74 290"; + extent = "74 323"; minExtent = "8 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "0"; hScrollBar = "alwaysOff"; @@ -401,9 +440,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 7"; - extent = "50 276"; + extent = "50 309"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl() { @@ -411,9 +452,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "52 1902"; + extent = "52 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; }; @@ -423,9 +466,11 @@ new GuiChunkedBitmapCtrl(ForumsGui) { horizSizing = "width"; vertSizing = "height"; position = "0 0"; - extent = "398 302"; + extent = "398 335"; minExtent = "8 20"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "ForumsOpenThread();"; helpTag = "0"; startScrollRegion = "3 0"; @@ -444,6 +489,7 @@ new GuiChunkedBitmapCtrl(ForumsGui) { headerSort = "1"; allowReposition = "0"; noSelect = "0"; + allowColorChars = "1"; }; }; new GuiTextCtrl() { @@ -454,6 +500,8 @@ new GuiChunkedBitmapCtrl(ForumsGui) { extent = "47 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "FORUMS"; maxLength = "255"; @@ -462,10 +510,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "160 300"; + position = "160 333"; extent = "90 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsNewTopic();"; helpTag = "0"; text = "NEW TOPIC"; @@ -475,10 +525,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "291 300"; + position = "291 333"; extent = "82 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsRefreshTopics();"; helpTag = "0"; text = "REFRESH "; @@ -488,10 +540,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "357 300"; + position = "357 333"; extent = "53 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsGui.NextThreadPage();"; helpTag = "0"; text = "--->"; @@ -501,10 +555,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "254 300"; + position = "254 333"; extent = "53 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "ForumsGui.PreviousThreadPage();"; helpTag = "0"; text = "<---"; @@ -514,10 +570,12 @@ new GuiChunkedBitmapCtrl(ForumsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "1 300"; + position = "1 333"; extent = "118 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GetForumsList();"; helpTag = "0"; text = "REFRESH FORUMS"; diff --git a/base/gui/GameGui.gui b/base/gui/GameGui.gui index 5e59d39..b468cc4 100644 --- a/base/gui/GameGui.gui +++ b/base/gui/GameGui.gui @@ -7,6 +7,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; @@ -15,10 +17,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "12 46"; - extent = "620 390"; + position = "12 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "GAME"; maxLength = "255"; @@ -32,6 +36,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "576 254"; minExtent = "26 254"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; isVertical = "0"; useCloseButton = "0"; @@ -45,6 +51,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "560 29"; minExtent = "38 29"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; glowOffset = "7"; tabSpacing = "2"; @@ -56,9 +64,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "width"; vertSizing = "height"; position = "31 62"; - extent = "558 312"; + extent = "558 345"; minExtent = "8 8"; - visible = "1"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { @@ -69,6 +79,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "48 26"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "FILTER:"; maxLength = "255"; @@ -81,6 +93,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "104 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl(GMJ_FilterText) { @@ -91,6 +105,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "67 26"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "All Servers"; maxLength = "255"; @@ -104,6 +120,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "190 26"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Status Text..."; maxLength = "255"; @@ -116,6 +134,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "154 18"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; new ShellBitmapButton(GMJ_StopBtn) { @@ -126,6 +146,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "59 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "stopServerQuery();"; accelerator = "escape"; helpTag = "0"; @@ -137,9 +159,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "width"; vertSizing = "height"; position = "0 25"; - extent = "558 253"; + extent = "558 286"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; fixedHorizontal = "0"; vertSpacerBitmap = "gui/shll_vertspacer"; @@ -149,10 +173,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellServerBrowserProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "184 16"; - extent = "374 237"; + position = "194 16"; + extent = "364 270"; minExtent = "8 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "0"; hScrollBar = "alwaysOn"; @@ -166,9 +192,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 4"; - extent = "350 213"; + extent = "340 246"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl() { @@ -176,9 +204,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "831 8"; + extent = "810 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; }; @@ -188,9 +218,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "538 232"; + extent = "538 265"; minExtent = "8 20"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "Canvas.pushDialog(ServerInfoDlg);"; helpTag = "0"; startScrollRegion = "1 0"; @@ -215,10 +247,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "38 273"; + position = "38 306"; extent = "110 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "Canvas.pushDialog(ChooseFilterDlg);"; helpTag = "0"; text = "CHANGE FILTER"; @@ -228,10 +262,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "140 273"; + position = "140 306"; extent = "110 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GMJ_Browser.runQuery();"; helpTag = "0"; text = "REFRESH LIST"; @@ -241,10 +277,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "242 273"; + position = "242 306"; extent = "110 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GMJ_Browser.refreshSelectedServer();"; helpTag = "0"; text = "REFRESH SERVER"; @@ -254,10 +292,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "344 273"; + position = "344 306"; extent = "110 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "Canvas.pushDialog(ServerInfoDlg);"; helpTag = "0"; text = "SERVER INFO"; @@ -267,10 +307,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "446 273"; + position = "446 306"; extent = "110 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "JoinSelectedGame();"; helpTag = "0"; text = "JOIN GAME"; @@ -282,19 +324,23 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "width"; vertSizing = "height"; position = "31 62"; - extent = "558 312"; + extent = "558 345"; minExtent = "8 8"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl() { profile = "GuiDefaultProfile"; horizSizing = "center"; vertSizing = "center"; - position = "0 0"; + position = "0 16"; extent = "558 312"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { @@ -305,6 +351,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "60 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Game Type:"; maxLength = "255"; @@ -317,6 +365,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "165 36"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "GAME TYPE"; maxLength = "255"; @@ -334,6 +384,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "75 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Mission Name:"; maxLength = "255"; @@ -346,6 +398,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "218 251"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -363,6 +417,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "210 239"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellTextList(GMH_MissionList) { @@ -373,6 +429,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "210 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "tryToStartHostedGame();"; helpTag = "0"; enumerate = "1"; @@ -391,6 +449,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "270 268"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { @@ -401,6 +461,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "80 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Server Name:"; maxLength = "255"; @@ -413,11 +475,15 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "180 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$Host::GameName"; helpTag = "0"; maxLength = "24"; historySize = "0"; password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; new GuiTextCtrl() { @@ -428,6 +494,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "80 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Password:"; maxLength = "255"; @@ -440,11 +508,15 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "180 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$Host::Password"; helpTag = "0"; maxLength = "16"; historySize = "0"; password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; new GuiTextCtrl() { @@ -455,6 +527,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "80 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Max Players:"; maxLength = "255"; @@ -467,12 +541,16 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "180 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$Host::MaxPlayers"; helpTag = "0"; maxLength = "3"; validate = "validateMaxPlayers();"; historySize = "0"; password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; new ShellBitmapButton(GMH_AdvancedBtn) { @@ -483,6 +561,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "180 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "Canvas.pushDialog(AdvancedHostDlg);"; helpTag = "0"; text = "ADVANCED OPTIONS"; @@ -496,6 +576,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "167 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$Host::BotsEnabled"; helpTag = "0"; text = "ENABLE BOTS"; @@ -509,6 +591,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "270 105"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { @@ -519,6 +603,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "90 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Number of Bots:"; maxLength = "255"; @@ -531,6 +617,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "16 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "(0)"; maxLength = "255"; @@ -543,12 +631,14 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "185 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "setMinCombatants();"; helpTag = "0"; range = "0.000000 1.000000"; ticks = "15"; - value = "0.136667"; + value = "0.00333333"; usePlusMinus = "1"; }; new GuiTextCtrl(GMH_BotDiffText) { @@ -559,6 +649,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "90 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Bot Difficulty:"; maxLength = "255"; @@ -571,6 +663,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "42 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Min:"; maxLength = "255"; @@ -583,6 +677,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "185 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "updateMinBotDifficulty();"; helpTag = "0"; @@ -599,6 +695,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "42 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Max:"; maxLength = "255"; @@ -611,6 +709,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "185 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "updateMaxBotDifficulty();"; helpTag = "0"; @@ -629,6 +729,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "180 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "StartHostedGame();"; helpTag = "0"; text = "START GAME"; @@ -641,9 +743,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "width"; vertSizing = "height"; position = "31 62"; - extent = "558 312"; + extent = "558 345"; minExtent = "8 8"; - visible = "0"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { @@ -654,6 +758,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "74 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Warrior:"; maxLength = "255"; @@ -666,6 +772,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "200 38"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Select Warrior"; maxLength = "255"; @@ -679,10 +787,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "GuiDefaultProfile"; horizSizing = "left"; vertSizing = "center"; - position = "290 6"; + position = "290 22"; extent = "257 300"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellBitmapButton(GMW_PlayerPageBtn) { @@ -693,6 +803,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "152 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GM_WarriorPane.gotoPlayerPage();"; helpTag = "0"; text = "JUMP TO PLAYER PAGE"; @@ -706,6 +818,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "80 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Race/Gender:"; maxLength = "255"; @@ -718,6 +832,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "152 38"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Select Race/Gender"; maxLength = "255"; @@ -735,6 +851,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "80 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Skin:"; maxLength = "255"; @@ -747,6 +865,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "152 38"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Select Skin"; maxLength = "255"; @@ -764,6 +884,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "80 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Voice:"; maxLength = "255"; @@ -776,6 +898,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "152 38"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Select Voice"; maxLength = "255"; @@ -784,6 +908,7 @@ new GuiChunkedBitmapCtrl(GameGui) { rolloverBarBitmap = "gui/shll_pulldownbar_rol"; selectedBarBitmap = "gui/shll_pulldownbar_act"; noButtonStyle = "0"; + voiceIndex = "0"; }; new GuiTextCtrl() { profile = "ShellTextRightProfile"; @@ -793,6 +918,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "100 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Test Voice:"; maxLength = "255"; @@ -805,6 +932,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "24 24"; minExtent = "24 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GMW_VoicePopup.test();"; helpTag = "0"; simpleStyle = "1"; @@ -817,6 +946,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "152 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GM_WarriorPane.createNewAlias();"; helpTag = "0"; text = "NEW ALIAS"; @@ -830,6 +961,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "152 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GM_WarriorPane.deleteWarrior();"; helpTag = "0"; text = "DELETE ALIAS"; @@ -841,9 +974,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "width"; vertSizing = "height"; position = "25 41"; - extent = "261 263"; + extent = "261 296"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiPlayerView(GMW_PlayerModel) { @@ -851,19 +986,23 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "width"; vertSizing = "height"; position = "1 1"; - extent = "259 261"; + extent = "259 294"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; new ShellRadioButton(GMW_LightRdo) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "top"; - position = "0 176"; + position = "0 209"; extent = "80 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GMW_PlayerModel.update();"; helpTag = "0"; text = "LIGHT"; @@ -874,10 +1013,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "top"; - position = "0 206"; + position = "0 239"; extent = "80 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GMW_PlayerModel.update();"; helpTag = "0"; text = "MEDIUM"; @@ -888,10 +1029,12 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "top"; - position = "0 236"; + position = "0 269"; extent = "80 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "GMW_PlayerModel.update();"; helpTag = "0"; text = "HEAVY"; @@ -908,6 +1051,8 @@ new GuiChunkedBitmapCtrl(GameGui) { extent = "160 22"; minExtent = "8 8"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; maxLength = "255"; }; diff --git a/base/gui/JoystickConfigDlg.gui b/base/gui/JoystickConfigDlg.gui index ddee113..b60fbba 100644 --- a/base/gui/JoystickConfigDlg.gui +++ b/base/gui/JoystickConfigDlg.gui @@ -7,6 +7,8 @@ new GuiControl(JoystickConfigDlg) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; pane = "0"; @@ -18,8 +20,11 @@ new GuiControl(JoystickConfigDlg) { extent = "450 380"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "CONFIGURE JOYSTICK"; + maxLength = "255"; noTitleBar = "0"; new ShellBitmapButton() { @@ -30,6 +35,8 @@ new GuiControl(JoystickConfigDlg) { extent = "140 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "Canvas.popDialog(JoystickConfigDlg);"; helpTag = "0"; text = "DONE"; @@ -43,6 +50,8 @@ new GuiControl(JoystickConfigDlg) { extent = "254 283"; minExtent = "254 26"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; isVertical = "1"; useCloseButton = "0"; @@ -56,28 +65,36 @@ new GuiControl(JoystickConfigDlg) { extent = "278 263"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiTextCtrl() { profile = "ShellTextRightProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "6 50"; + position = "6 48"; extent = "60 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Action:"; + maxLength = "255"; }; new ShellPopupMenu(JoyAxisActionMenu) { profile = "ShellPopupProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "63 41"; + position = "63 39"; extent = "200 36"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -88,32 +105,40 @@ new GuiControl(JoystickConfigDlg) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "47 82"; + position = "47 80"; extent = "57 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Sensitivity:"; + maxLength = "255"; }; new GuiTextCtrl(JoySensText) { profile = "ShellAltTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "109 82"; + position = "109 80"; extent = "28 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "(0.5)"; + maxLength = "255"; }; new ShellSliderCtrl(JoyAxisSlider) { profile = "ShellSliderProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "57 97"; + position = "57 95"; extent = "170 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "JoySensText.update();"; helpTag = "0"; @@ -126,43 +151,54 @@ new GuiControl(JoystickConfigDlg) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "75 169"; + position = "75 167"; extent = "127 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "INVERT"; + maxLength = "255"; }; new GuiTextCtrl() { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "47 122"; + position = "47 120"; extent = "57 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Dead Zone:"; + maxLength = "255"; }; new GuiTextCtrl(DeadZoneText) { profile = "ShellAltTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "109 122"; + position = "109 120"; extent = "28 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "(0.5)"; + maxLength = "255"; }; new ShellSliderCtrl(DeadZoneSlider) { profile = "ShellSliderProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "57 137"; + position = "57 135"; extent = "170 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "DeadZoneText.update();"; helpTag = "0"; @@ -171,6 +207,20 @@ new GuiControl(JoystickConfigDlg) { value = "0.5"; usePlusMinus = "1"; }; + //new ShellToggleButton(JoyAxisRelativeTgl) { + // profile = "ShellRadioProfile"; + // horizSizing = "right"; + // vertSizing = "bottom"; + // position = "75 197"; + // extent = "127 30"; + // minExtent = "26 27"; + // visible = "1"; + // hideCursor = "0"; + // bypassHideCursor = "0"; + // helpTag = "0"; + // text = "RELATIVE"; + // maxLength = "255"; + //}; }; }; }; diff --git a/base/gui/LaunchToolbarDlg.gui b/base/gui/LaunchToolbarDlg.gui index 18b704d..5f77cd2 100644 --- a/base/gui/LaunchToolbarDlg.gui +++ b/base/gui/LaunchToolbarDlg.gui @@ -60,7 +60,7 @@ new GuiControl(LaunchToolbarDlg) { profile = "CloseButtonProfile"; horizSizing = "left"; vertSizing = "bottom"; - position = "583 46"; + position = "583 13"; extent = "33 26"; minExtent = "8 8"; visible = "1"; diff --git a/base/gui/NewsGui.gui b/base/gui/NewsGui.gui index b87c933..3379e85 100644 --- a/base/gui/NewsGui.gui +++ b/base/gui/NewsGui.gui @@ -7,6 +7,8 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; @@ -15,22 +17,27 @@ new GuiChunkedBitmapCtrl(NewsGui) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "12 46"; - extent = "620 390"; + position = "12 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "NEWS"; + maxLength = "255"; noTitleBar = "0"; new ShellBitmapButton() { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "52 335"; + position = "52 368"; extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "PostNews();"; helpTag = "0"; text = "SUBMIT NEWS"; @@ -44,8 +51,11 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "55 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Web Links:"; + maxLength = "255"; }; new ShellPopupMenu(WebLinksMenu) { profile = "ShellPopupProfile"; @@ -55,7 +65,10 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "200 36"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -70,6 +83,8 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "53 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "WebLinksMenu.launchWebBrowser();"; helpTag = "0"; text = "GO"; @@ -83,6 +98,8 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "332 45"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(NewsMOTDText) { @@ -93,9 +110,13 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "310 16"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; + maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; new GuiTextCtrl() { @@ -106,17 +127,22 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "60 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "HEADLINES"; + maxLength = "255"; }; new ShellScrollCtrl() { profile = "NewScrollCtrlProfile"; horizSizing = "right"; vertSizing = "height"; position = "21 91"; - extent = "190 220"; + extent = "190 253"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -131,9 +157,11 @@ new GuiChunkedBitmapCtrl(NewsGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 7"; - extent = "182 206"; + extent = "182 239"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellTextList(NewsHeadlines) { @@ -144,6 +172,8 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "182 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; enumerate = "0"; resizeCell = "1"; @@ -157,10 +187,12 @@ new GuiChunkedBitmapCtrl(NewsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "28 307"; + position = "28 340"; extent = "85 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "NewsGui.getPreviousNewsItems();"; helpTag = "0"; text = "PREV"; @@ -170,10 +202,12 @@ new GuiChunkedBitmapCtrl(NewsGui) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "119 307"; + position = "119 340"; extent = "85 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "NewsGui.getNextNewsItems();"; helpTag = "0"; text = "NEXT"; @@ -184,9 +218,11 @@ new GuiChunkedBitmapCtrl(NewsGui) { horizSizing = "width"; vertSizing = "height"; position = "211 91"; - extent = "385 275"; + extent = "385 308"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -201,9 +237,11 @@ new GuiChunkedBitmapCtrl(NewsGui) { horizSizing = "width"; vertSizing = "height"; position = "4 6"; - extent = "361 263"; + extent = "361 296"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(NewsText) { @@ -214,9 +252,13 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "387 16"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; + maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; }; @@ -228,6 +270,8 @@ new GuiChunkedBitmapCtrl(NewsGui) { extent = "100 38"; minExtent = "32 38"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "NewsEditMOTD();"; helpTag = "0"; text = "EDIT MOTD"; diff --git a/base/gui/PlayGui.gui b/base/gui/PlayGui.gui index f1f5704..ba86ee6 100644 --- a/base/gui/PlayGui.gui +++ b/base/gui/PlayGui.gui @@ -405,6 +405,11 @@ new GameTSCtrl(PlayGui) { markerImageNames[2] = "small_diamond"; // assigned task markerImageNames[3] = "small_cross"; // client waypoint markerImageNames[4] = "small_circle"; // target + + missileMarker1 = "gui/RET_missile_marker"; + missileMarker2 = "gui/RET_missile_marker_red"; + missileFlash1 = "gui/RET_missile_horizflash_red"; + missileFlash2 = "gui/RET_missile_vertflash_red"; }; new GuiControl(dashboardHud) { diff --git a/base/gui/TrainingGui.gui b/base/gui/TrainingGui.gui index d1c1043..79f2c1c 100644 --- a/base/gui/TrainingGui.gui +++ b/base/gui/TrainingGui.gui @@ -7,6 +7,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; @@ -15,12 +17,15 @@ new GuiChunkedBitmapCtrl(TrainingGui) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "12 46"; - extent = "620 390"; + position = "12 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "TRAINING"; + maxLength = "255"; noTitleBar = "0"; new ShellFieldCtrl(TrainingPicFrame) { @@ -31,6 +36,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "175 175"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiBitmapCtrl(TrainingPic) { @@ -41,6 +48,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "169 169"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; wrap = "0"; }; @@ -49,22 +58,28 @@ new GuiChunkedBitmapCtrl(TrainingGui) { profile = "ShellTextRightProfile"; horizSizing = "left"; vertSizing = "top"; - position = "236 344"; + position = "236 377"; extent = "74 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Difficulty:"; + maxLength = "255"; }; new ShellPopupMenu(TrainingDifficultyMenu) { profile = "ShellPopupProfile"; horizSizing = "left"; vertSizing = "top"; - position = "307 335"; + position = "307 368"; extent = "137 36"; minExtent = "49 36"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -79,6 +94,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "183 146"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -96,6 +113,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "169 132"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellTextList(TrainingMissionList) { @@ -106,6 +125,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "169 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; enumerate = "1"; resizeCell = "1"; @@ -123,9 +144,12 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "140 30"; minExtent = "26 27"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$pref::TrainingPlayBriefing"; helpTag = "0"; text = "Play Briefing"; + maxLength = "255"; }; new GuiTextCtrl() { profile = "ShellTextRightProfile"; @@ -135,8 +159,11 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "122 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Play Briefing:"; + maxLength = "255"; }; new ShellBitmapButton(TrainingPlayBtn) { profile = "SoundTestButtonProfile"; @@ -146,6 +173,8 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "24 24"; minExtent = "24 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TrainingGui.toggleBriefing();"; helpTag = "0"; simpleStyle = "1"; @@ -158,17 +187,22 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "99 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "MISSION BRIEFING"; + maxLength = "255"; }; new ShellScrollCtrl(TrainingBriefingScroll) { profile = "NewScrollCtrlProfile"; horizSizing = "width"; vertSizing = "height"; position = "214 50"; - extent = "378 285"; + extent = "378 318"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -183,9 +217,11 @@ new GuiChunkedBitmapCtrl(TrainingGui) { horizSizing = "width"; vertSizing = "bottom"; position = "7 7"; - extent = "348 271"; + extent = "348 304"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(TrainingBriefingText) { @@ -196,9 +232,13 @@ new GuiChunkedBitmapCtrl(TrainingGui) { extent = "348 18"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; + maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; }; @@ -206,10 +246,12 @@ new GuiChunkedBitmapCtrl(TrainingGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "469 335"; + position = "469 368"; extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TrainingGui.startTraining();"; helpTag = "0"; text = "START"; diff --git a/base/gui/TribeAndWarriorBrowserGui.gui b/base/gui/TribeAndWarriorBrowserGui.gui index c042176..e6528fc 100644 --- a/base/gui/TribeAndWarriorBrowserGui.gui +++ b/base/gui/TribeAndWarriorBrowserGui.gui @@ -7,6 +7,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; @@ -15,10 +17,12 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { profile = "ShellPaneProfile"; horizSizing = "width"; vertSizing = "height"; - position = "12 46"; - extent = "620 390"; + position = "12 13"; + extent = "620 423"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "COMMUNITY BROWSER"; maxLength = "255"; @@ -32,6 +36,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "576 254"; minExtent = "26 254"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; isVertical = "0"; useCloseButton = "0"; @@ -45,6 +51,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "560 29"; minExtent = "38 29"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; glowOffset = "7"; tabSpacing = "2"; @@ -56,9 +64,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "33 63"; - extent = "554 270"; + extent = "554 303"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellFieldCtrl(TribePane) { @@ -66,9 +76,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "3 27"; - extent = "550 239"; + extent = "550 272"; minExtent = "16 18"; visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellFieldCtrl() { @@ -76,9 +88,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "237 20"; - extent = "310 217"; + extent = "310 250"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellScrollCtrl(TWBScroll) { @@ -86,9 +100,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "2 6"; - extent = "306 209"; + extent = "306 242"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -103,9 +119,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "bottom"; position = "9 9"; - extent = "288 191"; + extent = "288 224"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(TWBText) { @@ -116,10 +134,13 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "272 16"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "1"; maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; }; @@ -129,9 +150,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "right"; vertSizing = "height"; position = "3 3"; - extent = "234 234"; + extent = "234 267"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiChunkedBitmapCtrl(TeamPix) { @@ -142,6 +165,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "228 150"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; bitmap = "texticons/twb_Lineup.jpg"; useVariable = "0"; @@ -152,9 +177,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "-2 151"; - extent = "237 85"; + extent = "237 118"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; fixedHorizontal = "1"; vertSpacerBitmap = "gui/shll_vertspacer"; @@ -165,9 +192,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 16"; - extent = "237 69"; + extent = "237 102"; minExtent = "8 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "0"; hScrollBar = "alwaysOff"; @@ -181,9 +210,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 7"; - extent = "213 55"; + extent = "213 88"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl(ML4) { @@ -194,6 +225,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "8 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; }; @@ -203,9 +236,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "0 0"; - extent = "217 81"; + extent = "217 114"; minExtent = "8 20"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "TribePane.RosterDblClick();"; helpTag = "0"; startScrollRegion = "2 0"; @@ -224,6 +259,7 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { headerSort = "1"; allowReposition = "1"; noSelect = "0"; + allowColorChars = "1"; }; }; }; @@ -235,6 +271,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "64 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TribePane.ButtonClick(4);"; helpTag = "0"; text = "ADMIN"; @@ -249,6 +287,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "66 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TribePane.ButtonClick(3);"; helpTag = "0"; text = "INVITES"; @@ -263,6 +303,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "65 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TribePane.ButtonClick(0);"; helpTag = "0"; text = "PROFILE"; @@ -277,6 +319,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "65 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TribePane.ButtonClick(1);"; helpTag = "0"; text = "ROSTER"; @@ -291,6 +335,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "60 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TribePane.ButtonClick(2);"; helpTag = "0"; text = "NEWS"; @@ -303,9 +349,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "3 27"; - extent = "550 239"; + extent = "550 272"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellFieldCtrl() { @@ -313,9 +361,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "237 20"; - extent = "310 217"; + extent = "310 250"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellScrollCtrl(W_Scroll) { @@ -323,9 +373,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "2 2"; - extent = "306 213"; + extent = "306 246"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -340,9 +392,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "bottom"; position = "4 4"; - extent = "298 205"; + extent = "298 238"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextCtrl(W_Text) { @@ -353,10 +407,13 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "286 16"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; }; @@ -366,9 +423,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "right"; vertSizing = "height"; position = "3 3"; - extent = "234 234"; + extent = "234 267"; minExtent = "16 18"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiChunkedBitmapCtrl(PlayerPix) { @@ -379,6 +438,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "228 150"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; bitmap = "texticons/twb_soclose.jpg"; useVariable = "0"; @@ -389,9 +450,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "-2 151"; - extent = "237 83"; + extent = "237 116"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; fixedHorizontal = "1"; vertSpacerBitmap = "gui/shll_vertspacer"; @@ -402,9 +465,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 16"; - extent = "237 67"; + extent = "237 100"; minExtent = "8 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "0"; hScrollBar = "alwaysOff"; @@ -418,9 +483,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 7"; - extent = "213 53"; + extent = "213 86"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiControl(W_ML4) { @@ -431,6 +498,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "8 8"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; }; }; @@ -440,9 +509,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "height"; position = "0 0"; - extent = "217 79"; + extent = "217 112"; minExtent = "8 20"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; altCommand = "PlayerPane.DblClick();"; helpTag = "0"; startScrollRegion = "3 0"; @@ -460,6 +531,7 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { headerSort = "1"; allowReposition = "0"; noSelect = "0"; + allowColorChars = "1"; }; }; }; @@ -471,6 +543,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "64 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "PlayerPane.ButtonClick(5);"; helpTag = "0"; text = "ADMIN"; @@ -485,6 +559,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "78 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "PlayerPane.ButtonClick(3);"; helpTag = "0"; text = "BUDDYLIST"; @@ -499,6 +575,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "67 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "PlayerPane.ButtonClick(0);"; helpTag = "0"; text = "PROFILE"; @@ -513,6 +591,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "69 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "PlayerPane.ButtonClick(1);"; helpTag = "0"; text = "HISTORY"; @@ -527,6 +607,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "62 27"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "PlayerPane.ButtonClick(2);"; helpTag = "0"; text = "TRIBES"; @@ -539,9 +621,11 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { horizSizing = "width"; vertSizing = "bottom"; position = "7 5"; - extent = "155 26"; + extent = "142 26"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "EAST [DEV]"; maxLength = "255"; @@ -557,6 +641,8 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { extent = "43 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "TWBTabView.closeCurrentPane();"; accelerator = "escape"; helpTag = "0"; @@ -567,10 +653,12 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "221 335"; + position = "221 368"; extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "CreateTribe();"; helpTag = "0"; text = "CREATE TRIBE"; @@ -580,10 +668,12 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "341 335"; + position = "341 368"; extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "SearchTribes();"; helpTag = "0"; text = "TRIBE SEARCH"; @@ -593,10 +683,12 @@ new GuiChunkedBitmapCtrl(TribeAndWarriorBrowserGui) { profile = "ShellButtonProfile"; horizSizing = "left"; vertSizing = "top"; - position = "461 335"; + position = "461 368"; extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "SearchWarriors();"; helpTag = "0"; text = "WARRIOR SEARCH"; diff --git a/base/input.log b/base/input.log index 3e96b03..b730040 100644 --- a/base/input.log +++ b/base/input.log @@ -1,4 +1,4 @@ -Input log opened at Mon Apr 23 18:55:20 2001 +Input log opened at Fri May 4 19:01:37 2001 Operating System: WinNT version 5.0 diff --git a/base/missions/Alcatraz.mis b/base/missions/Alcatraz.mis index 2076fb7..ca7ebf0 100644 --- a/base/missions/Alcatraz.mis +++ b/base/missions/Alcatraz.mis @@ -14,9 +14,9 @@ //--- OBJECT WRITE BEGIN --- new SimGroup(MissionGroup) { - powerCount = "0"; cdTrack = "6"; musicTrack = "desert"; + powerCount = "0"; new MissionArea(MissionArea) { area = "-568 -672 1120 1120"; @@ -36,6 +36,7 @@ new SimGroup(MissionGroup) { cloudSpeed3 = "0.0003"; visibleDistance = "450"; useSkyTextures = "1"; + renderBottomTexture = "0"; SkySolidColor = "0.365000 0.390000 0.420000 0.000000"; fogDistance = "200"; fogColor = "0.450000 0.500000 0.500000 1.000000"; @@ -55,10 +56,10 @@ new SimGroup(MissionGroup) { direction = "0.57735 0.57735 -0.57735"; color = "0.800000 0.800000 0.800000 1.000000"; ambient = "0.450000 0.450000 0.450000 1.000000"; - position = "0 0 0"; - locked = "true"; - rotation = "1 0 0 0"; scale = "1 1 1"; + locked = "true"; + position = "0 0 0"; + rotation = "1 0 0 0"; }; new TerrainBlock(Terrain) { rotation = "1 0 0 0"; @@ -67,20 +68,20 @@ new SimGroup(MissionGroup) { terrainFile = "Alcatraz.ter"; squareSize = "8"; emptySquares = "93307 93309 93536 93563 93565 97673"; - position = "-1024 -1024 0"; locked = "true"; + position = "-1024 -1024 0"; }; new NavigationGraph(NavGraph) { conjoinAngleDev = "65"; cullDensity = "0.1"; customArea = "0 0 0 0"; - coverage = "0"; - position = "0 0 0 1"; - locked = "true"; - GraphFile = "Alcatraz.nav"; - rotation = "0 0 0 0"; - conjoinBowlDev = "20"; scale = "1 1 1"; + coverage = "0"; + GraphFile = "Alcatraz.nav"; + locked = "true"; + position = "0 0 0 1"; + conjoinBowlDev = "20"; + rotation = "0 0 0 0"; }; new WaterBlock() { position = "-1016 -1024 7.51567"; @@ -169,11 +170,11 @@ new SimGroup(MissionGroup) { }; new SimGroup(Teams) { - new SimGroup(Team0) { + new SimGroup(team0) { }; new SimGroup(Team1) { - new SimGroup(SpawnSpheres) { + new SimGroup(spawnspheres) { new SpawnSphere() { position = "349.552 -587.696 268.264"; @@ -190,25 +191,111 @@ new SimGroup(MissionGroup) { }; }; new FlyingVehicle() { - position = "454.673 -633.206 265.521"; + position = "454.673 -633.206 265.516"; rotation = "0 0 -1 55.0039"; scale = "1 1 1"; dataBlock = "hapcFlyer"; lockCount = "0"; homingCount = "0"; disableMove = "0"; - mountable = "1"; - locked = "true"; - selfPower = "1"; - respawn = "1"; - respawnTime = 10000; resetPos = "1"; + locked = "true"; + respawn = "1"; + Marker = "4046"; + mountable = "1"; + selfPower = "1"; + respawnTime = "10000"; + }; + new WheeledVehicle() { + position = "326.459 -574.189 261.78"; + rotation = "0.0337559 0.0559473 -0.997863 14.8542"; + scale = "1 1 1"; + dataBlock = "mobileBaseVehicle"; + lockCount = "0"; + homingCount = "0"; + disableMove = "1"; + resetPos = "1"; + fullyDeployed = "1"; + spawnPos2 = "336.459 -574.189 259.728"; + shield = "5551"; + spawnPos6 = "336.459 -564.189 259.229"; + isDeployed = "1"; + immobilized = "1"; + spawnPos10 = "331.459 -559.189 258.74"; + Turret = "5550"; + spawnPos3 = "316.459 -569.189 259.59"; + spawnPosCount = "11"; + locked = "true"; + spawnPos7 = "316.459 -559.189 261.431"; + Marker = "4045"; + deployed = "1"; + spawnPos11 = "336.459 -559.189 259.021"; + mountable = "0"; + spawnPos0 = "316.459 -579.189 261.03"; + station = "5548"; + spawnPos4 = "336.459 -569.189 259.493"; + selfPower = "1"; + spawnPos8 = "321.459 -559.189 258.231"; + noEnemyControl = "1"; + spawnPos1 = "316.459 -574.189 259.813"; + spawnPos5 = "316.459 -564.189 258.979"; + spawnPos9 = "326.459 -559.189 258.465"; + }; + new WheeledVehicle() { + position = "349.371 -568.109 261.609"; + rotation = "-0.0238971 -0.0161185 -0.999584 49.6404"; + scale = "1 1 1"; + dataBlock = "mobileBaseVehicle"; + lockCount = "0"; + homingCount = "0"; + disableMove = "1"; + spawnPos13 = "359.371 -558.109 260.568"; + resetPos = "1"; + spawnPos17 = "364.371 -553.109 266.312"; + fullyDeployed = "1"; + spawnPos2 = "359.371 -583.109 260.798"; + shield = "5546"; + spawnPos6 = "364.371 -573.109 259.188"; + isDeployed = "1"; + immobilized = "1"; + spawnPos10 = "364.371 -563.109 260.109"; + spawnPos14 = "364.371 -558.109 261.336"; + Turret = "5545"; + spawnPos3 = "364.371 -583.109 260.812"; + spawnPosCount = "17"; + locked = "true"; + spawnPos7 = "364.371 -568.109 259.188"; + Marker = "4044"; + deployed = "1"; + spawnPos11 = "329.371 -558.109 258.626"; + mountable = "0"; + spawnPos15 = "354.371 -553.109 260.855"; + spawnPos0 = "359.371 -588.109 259.932"; + station = "5543"; + spawnPos4 = "359.371 -578.109 259.665"; + selfPower = "1"; + spawnPos8 = "329.371 -563.109 258.964"; + noEnemyControl = "1"; + spawnPos12 = "334.371 -558.109 258.914"; + spawnPos16 = "359.371 -553.109 263.556"; + spawnPos1 = "364.371 -588.109 259.813"; + spawnPos5 = "364.371 -578.109 259.665"; + spawnPos9 = "334.371 -563.109 259.17"; + }; + new TSStatic() { + position = "344.827 -579.839 261.293"; + rotation = "0 0 1 53.858"; + scale = "1 1 1"; + shapeName = "stackable2l.dts"; + locked = "true"; }; new ParticleEmissionDummy() { position = "404.845 -630.947 260.67"; rotation = "1 0 0 0"; scale = "1 1 1"; dataBlock = "defaultEmissionDummy"; + lockCount = "0"; + homingCount = "0"; emitter = "SmallHeavyDamageSmoke"; velocity = "1"; locked = "true"; @@ -252,39 +339,20 @@ new SimGroup(MissionGroup) { homingCount = "0"; locked = "true"; }; - new WheeledVehicle() { - position = "326.489 -574.186 261.78"; - rotation = "0.0337659 0.0559541 -0.997862 14.8516"; + new InteriorInstance() { + position = "383.436 -584.135 254.463"; + rotation = "1 0 0 0"; scale = "1 1 1"; - dataBlock = "mobileBaseVehicle"; - lockCount = "0"; - homingCount = "0"; - disableMove = "1"; - Marker = "3867"; - mountable = "0"; - resetPos = "1"; + interiorFile = "bmisc4.dif"; + showTerrainInside = "0"; locked = "true"; - selfPower = "1"; - deployed = "1"; - Turret = "3879"; - immobilized = "1"; }; - new WheeledVehicle() { - position = "349.355 -568.108 261.61"; - rotation = "-0.0238953 -0.016121 -0.999584 49.6413"; + new TSStatic() { + position = "404.232 -632.478 256.071"; + rotation = "-0.848432 -0.187958 -0.494808 61.6042"; scale = "1 1 1"; - dataBlock = "mobileBaseVehicle"; - lockCount = "0"; - homingCount = "0"; - disableMove = "1"; - Marker = "3866"; - mountable = "0"; - resetPos = "1"; + shapeName = "vehicle_land_assault_wreck.dts"; locked = "true"; - selfPower = "1"; - deployed = "1"; - Turret = "3876"; - immobilized = "1"; }; new TSStatic() { position = "338.722 -580.918 259.503"; @@ -307,32 +375,10 @@ new SimGroup(MissionGroup) { shapeName = "stackable2l.dts"; locked = "true"; }; - new TSStatic() { - position = "344.827 -579.839 261.293"; - rotation = "0 0 1 53.858"; - scale = "1 1 1"; - shapeName = "stackable2l.dts"; - locked = "true"; - }; - new InteriorInstance() { - position = "383.436 -584.135 254.463"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - interiorFile = "bmisc4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new TSStatic() { - position = "404.232 -632.478 256.071"; - rotation = "-0.848432 -0.187958 -0.494808 61.6042"; - scale = "1 1 1"; - shapeName = "vehicle_land_assault_wreck.dts"; - locked = "true"; - }; }; new SimGroup(Team2) { - new SimGroup(SpawnSpheres) { + new SimGroup(spawnspheres) { new SpawnSphere() { position = "59.4014 -115.417 280.16"; @@ -389,17 +435,18 @@ new SimGroup(MissionGroup) { }; new SimGroup(IslandBase) { - new StaticShape() { + new StaticShape(Obj) { position = "40.0495 -103.975 291.518"; rotation = "1 0 0 0"; scale = "1 1 1"; dataBlock = "FlipFlop"; lockCount = "0"; homingCount = "0"; + WayPoint = "4040"; locked = "true"; - needsObjectiveWaypoint = true; + needsObjectiveWaypoint = "1"; }; - new InteriorInstance() { + new InteriorInstance(base) { position = "40 -104 277.557"; rotation = "0 0 1 90"; scale = "1 1 1"; @@ -408,27 +455,14 @@ new SimGroup(MissionGroup) { AudioProfile = "Universal_Base_2"; locked = "true"; }; - new StaticShape() { - position = "-251.651 -147.796 296.153"; - rotation = "0 0 -1 120"; - scale = "1 1 1"; - nameTag = "Lakeside"; - dataBlock = "SolarPanel"; - lockCount = "0"; - homingCount = "0"; + new TSStatic(Plug) { + position = "66.0336 -62.8706 290.539"; + rotation = "-1 0 0 90"; + scale = "2.03887 2.02471 1"; + shapeName = "bmiscf.dts"; locked = "true"; }; - new StaticShape() { - position = "-255.381 -147.696 296.15"; - rotation = "0 0 -1 120"; - scale = "1 1 1"; - nameTag = "Lakeside"; - dataBlock = "SolarPanel"; - lockCount = "0"; - homingCount = "0"; - locked = "true"; - }; - new StaticShape() { + new StaticShape(Gen1) { position = "54.8393 -98.2081 269.568"; rotation = "0 0 1 180"; scale = "1 1 1"; @@ -436,9 +470,11 @@ new SimGroup(MissionGroup) { dataBlock = "GeneratorLarge"; lockCount = "0"; homingCount = "0"; + WayPoint = "4041"; locked = "true"; + needsObjectiveWaypoint = "1"; }; - new StaticShape() { + new StaticShape(Gen2) { position = "54.715 -110.291 269.551"; rotation = "1 0 0 0"; scale = "1 1 1"; @@ -446,144 +482,18 @@ new SimGroup(MissionGroup) { dataBlock = "GeneratorLarge"; lockCount = "0"; homingCount = "0"; + WayPoint = "4042"; locked = "true"; + needsObjectiveWaypoint = "1"; }; - new SimGroup(OutdoorTurrets) { - - new InteriorInstance() { - position = "59.5768 -44.1561 343.731"; - rotation = "0 0 -1 90"; - scale = "1 1 1"; - interiorFile = "bmisc3.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new Turret() { - position = "58.9339 -44.1643 345.785"; - rotation = "0 0 1 90"; - scale = "1 1 1"; - nameTag = "East"; - dataBlock = "TurretBaseLarge"; - lockCount = "0"; - homingCount = "0"; - initialBarrel = "PlasmaBarrelLarge"; - locked = "true"; - originalBarrel = "PlasmaBarrelLarge"; - }; - new InteriorInstance() { - position = "-163.125 -155.59 332.082"; - rotation = "0 0 1 90"; - scale = "1 1 1"; - interiorFile = "bmisc3.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new Turret() { - position = "-162.429 -155.581 333.901"; - rotation = "0 0 -1 90"; - scale = "1 1 1"; - nameTag = "West"; - dataBlock = "TurretBaseLarge"; - lockCount = "0"; - homingCount = "0"; - initialBarrel = "PlasmaBarrelLarge"; - locked = "true"; - originalBarrel = "PlasmaBarrelLarge"; - }; - }; - new SimGroup(ForceFields) { - - new ForceFieldBare() { - position = "35.5007 -109.255 281.814"; - rotation = "1 0 0 0"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "35.5007 -109.265 282.822"; - rotation = "1 0 0 0"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "35.4969 -99.2443 281.814"; - rotation = "1 0 0 0"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "35.4969 -99.2543 282.822"; - rotation = "1 0 0 0"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "35.2456 -108.499 281.801"; - rotation = "0 0 -1 90"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "35.2556 -108.499 282.809"; - rotation = "0 0 -1 90"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "44.7699 -99.497 281.792"; - rotation = "0 0 1 90"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "44.7599 -99.497 282.8"; - rotation = "0 0 1 90"; - scale = "9 0.5 0.5"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "12.963 -108.133 277.45"; - rotation = "1 0 0 0"; - scale = "0.25 8.25 6.25"; - dataBlock = "defaultForceFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "70.5441 -71.5 287.531"; - rotation = "1 0 0 0"; - scale = "1 1 6.25"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "70.5441 -69.5 287.531"; - rotation = "1 0 0 0"; - scale = "1 1 6.25"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "70.546 -67.4763 287.531"; - rotation = "1 0 0 0"; - scale = "1 1 6.25"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; - new ForceFieldBare() { - position = "70.546 -65.4836 287.531"; - rotation = "1 0 0 0"; - scale = "1 1 6.25"; - dataBlock = "defaultTeamSlowFieldBare"; - locked = "true"; - }; + new ForceFieldBare(NoPassGateway) { + position = "12.963 -108.133 277.45"; + rotation = "1 0 0 0"; + scale = "0.25 8.25 6.25"; + dataBlock = "defaultForceFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; }; new SimGroup(equipment) { @@ -637,37 +547,16 @@ new SimGroup(MissionGroup) { homingCount = "0"; locked = "true"; }; - new Turret() { - position = "39.9025 -140.001 293.029"; - rotation = "0.57735 -0.57735 -0.57735 120"; + new Item() { + position = "54.0053 -128.993 263.219"; + rotation = "1 0 0 0"; scale = "1 1 1"; - nameTag = "Split Room"; - dataBlock = "SentryTurret"; + dataBlock = "RepairPack"; lockCount = "0"; homingCount = "0"; - initialBarrel = "SentryTurretBarrel"; - locked = "true"; - }; - new Turret() { - position = "36.0018 -135.192 283.92"; - rotation = "0 -1 0 90"; - scale = "1 1 1"; - nameTag = "Hallway"; - dataBlock = "SentryTurret"; - lockCount = "0"; - homingCount = "0"; - initialBarrel = "SentryTurretBarrel"; - locked = "true"; - }; - new Turret() { - position = "43.9628 -135.192 283.92"; - rotation = "0.707107 -3.09086e-08 -0.707107 180"; - scale = "1 1 1"; - nameTag = "Hallway"; - dataBlock = "SentryTurret"; - lockCount = "0"; - homingCount = "0"; - initialBarrel = "SentryTurretBarrel"; + collideable = "0"; + static = "1"; + rotate = "0"; locked = "true"; }; new Item() { @@ -682,132 +571,308 @@ new SimGroup(MissionGroup) { rotate = "0"; locked = "true"; }; - new Item() { - position = "54.0053 -128.993 263.219"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "RepairPack"; - lockCount = "0"; - homingCount = "0"; - collideable = "0"; - static = "1"; - rotate = "0"; - locked = "true"; - }; }; - new SimGroup(ForestStructures) { + }; + new SimGroup(BackDoorFFPower) { - new InteriorInstance() { - position = "-254 -148 287.64"; - rotation = "0 0 1 90"; - scale = "1 1 1"; - interiorFile = "bbunkd.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "6.49918 -214.356 288.578"; - rotation = "-0 0 -1 71.0468"; - scale = "1 1 1"; - interiorFile = "bwall4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "-85.5753 -252.647 276"; - rotation = "-0 0 -1 26.3561"; - scale = "1 1 1"; - interiorFile = "bwall1.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "-73.1529 -279.972 276"; - rotation = "0 0 -1 116.356"; - scale = "1 1 1"; - interiorFile = "bwall2.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "-80.2479 -263.399 276"; - rotation = "0 0 -1 116.356"; - scale = "1 1 1"; - interiorFile = "bwall4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "-57.0239 -271.981 276"; - rotation = "0 0 -1 116.356"; - scale = "1 1 1"; - interiorFile = "bwall4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "-12.1128 -207.955 288.578"; - rotation = "-0 0 -1 71.0468"; - scale = "1 1 1"; - interiorFile = "bwall3.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "-30.3864 -201.689 288.578"; - rotation = "-0 0 -1 71.0468"; - scale = "1 1 1"; - interiorFile = "bwall4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "87.2278 89.1079 269.882"; - rotation = "-0 0 -1 71.0468"; - scale = "1 1 1"; - interiorFile = "bwall4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "68.6158 95.5089 269.882"; - rotation = "-0 0 -1 71.0468"; - scale = "1 1 1"; - interiorFile = "bwall3.dif"; - showTerrainInside = "0"; - locked = "true"; - }; - new InteriorInstance() { - position = "50.3422 101.775 269.882"; - rotation = "-0 0 -1 71.0468"; - scale = "1 1 1"; - interiorFile = "bwall4.dif"; - showTerrainInside = "0"; - locked = "true"; - }; + new ForceFieldBare(BDFF1) { + position = "70.546 -67.4763 287.531"; + rotation = "1 0 0 0"; + scale = "1 1 6.25"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(BDFF2) { + position = "70.5441 -69.5 287.531"; + rotation = "1 0 0 0"; + scale = "1 1 6.25"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(BDFF3) { + position = "70.546 -65.4836 287.531"; + rotation = "1 0 0 0"; + scale = "1 1 6.25"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(BDFF3) { + position = "70.5441 -71.5 287.531"; + rotation = "1 0 0 0"; + scale = "1 1 6.25"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "44.7599 -99.497 282.8"; + rotation = "0 0 1 90"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "44.7699 -99.497 281.792"; + rotation = "0 0 1 90"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "35.5007 -109.265 282.822"; + rotation = "1 0 0 0"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "35.4969 -99.2543 282.822"; + rotation = "1 0 0 0"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "35.4969 -99.2443 281.814"; + rotation = "1 0 0 0"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "35.2556 -108.499 282.809"; + rotation = "0 0 -1 90"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "35.5007 -109.255 281.814"; + rotation = "1 0 0 0"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new ForceFieldBare(PitBar) { + position = "35.2456 -108.499 281.801"; + rotation = "0 0 -1 90"; + scale = "9 0.5 0.5"; + dataBlock = "defaultTeamSlowFieldBare"; + lockCount = "0"; + homingCount = "0"; + locked = "true"; + }; + new StaticShape(BackDoorGen) { + position = "-27.9528 -133.32 279.551"; + rotation = "1 0 0 0"; + scale = "1 1 1"; + nameTag = "North Forcefield"; + dataBlock = "GeneratorLarge"; + lockCount = "0"; + homingCount = "0"; + WayPoint = "4043"; + needsObjectiveWaypoint = "1"; }; }; - new Item() { - position = "7.71477 -104.164 285.647"; - rotation = "1 0 0 0"; - scale = "1 1 1"; - dataBlock = "RepairPack"; - lockCount = "0"; - homingCount = "0"; - collideable = "0"; - static = "1"; - rotate = "0"; - locked = "true"; - }; - new TSStatic() { - position = "66.0336 -62.8706 290.539"; - rotation = "-1 0 0 90"; - scale = "2.03887 2.02471 1"; - shapeName = "bmiscf.dts"; - locked = "true"; + new SimGroup(IslandBaseTurrets) { + + new StaticShape(Solar) { + position = "-254.248 -147.975 296.15"; + rotation = "0 0 1 240"; + scale = "1 1 1"; + nameTag = "Turret Power"; + dataBlock = "SolarPanel"; + lockCount = "0"; + homingCount = "0"; + }; + new Turret() { + position = "43.9628 -135.192 283.92"; + rotation = "0.707107 -3.09086e-08 -0.707107 180"; + scale = "1 1 1"; + nameTag = "Hallway"; + dataBlock = "SentryTurret"; + lockCount = "0"; + homingCount = "0"; + initialBarrel = "SentryTurretBarrel"; + locked = "true"; + }; + new Turret() { + position = "36.0018 -135.192 283.92"; + rotation = "0 -1 0 90"; + scale = "1 1 1"; + nameTag = "Hallway"; + dataBlock = "SentryTurret"; + lockCount = "0"; + homingCount = "0"; + initialBarrel = "SentryTurretBarrel"; + locked = "true"; + }; + new Turret() { + position = "39.9025 -140.001 293.029"; + rotation = "0.57735 -0.57735 -0.57735 120"; + scale = "1 1 1"; + nameTag = "Split Room"; + dataBlock = "SentryTurret"; + lockCount = "0"; + homingCount = "0"; + initialBarrel = "SentryTurretBarrel"; + locked = "true"; + }; + new Turret(WestBase) { + position = "-162.429 -155.581 333.901"; + rotation = "0 0 -1 90"; + scale = "1 1 1"; + nameTag = "West"; + dataBlock = "TurretBaseLarge"; + lockCount = "0"; + homingCount = "0"; + initialBarrel = "PlasmaBarrelLarge"; + locked = "true"; + originalBarrel = "PlasmaBarrelLarge"; + }; + new Turret(EastBase) { + position = "58.9339 -44.1643 345.785"; + rotation = "0 0 1 90"; + scale = "1 1 1"; + nameTag = "East"; + dataBlock = "TurretBaseLarge"; + lockCount = "0"; + homingCount = "0"; + initialBarrel = "PlasmaBarrelLarge"; + locked = "true"; + originalBarrel = "PlasmaBarrelLarge"; + }; }; }; }; + new SimGroup(ForestStructures) { + + new InteriorInstance() { + position = "-254 -148 287.64"; + rotation = "0 0 1 90"; + scale = "1 1 1"; + interiorFile = "bbunkd.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "6.49918 -214.356 288.578"; + rotation = "-0 0 -1 71.0468"; + scale = "1 1 1"; + interiorFile = "bwall4.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-85.5753 -252.647 276"; + rotation = "-0 0 -1 26.3561"; + scale = "1 1 1"; + interiorFile = "bwall1.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-73.1529 -279.972 276"; + rotation = "0 0 -1 116.356"; + scale = "1 1 1"; + interiorFile = "bwall2.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-80.2479 -263.399 276"; + rotation = "0 0 -1 116.356"; + scale = "1 1 1"; + interiorFile = "bwall4.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-57.0239 -271.981 276"; + rotation = "0 0 -1 116.356"; + scale = "1 1 1"; + interiorFile = "bwall4.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-12.1128 -207.955 288.578"; + rotation = "-0 0 -1 71.0468"; + scale = "1 1 1"; + interiorFile = "bwall3.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-30.3864 -201.689 288.578"; + rotation = "-0 0 -1 71.0468"; + scale = "1 1 1"; + interiorFile = "bwall4.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "87.2278 89.1079 269.882"; + rotation = "-0 0 -1 71.0468"; + scale = "1 1 1"; + interiorFile = "bwall4.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "68.6158 95.5089 269.882"; + rotation = "-0 0 -1 71.0468"; + scale = "1 1 1"; + interiorFile = "bwall3.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "50.3422 101.775 269.882"; + rotation = "-0 0 -1 71.0468"; + scale = "1 1 1"; + interiorFile = "bwall4.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "-163.125 -155.59 332.082"; + rotation = "0 0 1 90"; + scale = "1 1 1"; + interiorFile = "bmisc3.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + new InteriorInstance() { + position = "59.5768 -44.1561 343.731"; + rotation = "0 0 -1 90"; + scale = "1 1 1"; + interiorFile = "bmisc3.dif"; + showTerrainInside = "0"; + locked = "true"; + }; + }; new SimGroup(RandomOrganics) { new SimGroup(Addition1belgtree16) { @@ -1835,7 +1900,7 @@ new SimGroup(MissionGroup) { }; new TSStatic() { position = "-452 292 276.75"; - rotation = "0 0 -1 120"; + rotation = "0 0 1 240"; scale = "2.4 2.4 2.4"; shapeName = "borg19.dts"; locked = "true"; @@ -2160,7 +2225,7 @@ new SimGroup(MissionGroup) { }; new TSStatic() { position = "-20 -92 308.219"; - rotation = "0 0 -1 120"; + rotation = "0 0 1 240"; scale = "2.3 2.3 2.3"; shapeName = "borg16.dts"; locked = "true"; @@ -3211,7 +3276,7 @@ new SimGroup(MissionGroup) { new TSStatic() { position = "-116 -100 331.969"; - rotation = "0 0 1 240"; + rotation = "0 0 -1 120"; scale = "1.8 1.8 1.8"; shapeName = "borg16.dts"; locked = "true"; diff --git a/base/missions/Caldera.mis b/base/missions/Caldera.mis index 28d1c30..29dd29b 100644 --- a/base/missions/Caldera.mis +++ b/base/missions/Caldera.mis @@ -27,10 +27,10 @@ new SimGroup(MissionGroup) { direction = "0.57735 0.57735 -0.57735"; color = "0.600000 0.600000 0.600000 1.000000"; ambient = "0.200000 0.200000 0.200000 1.000000"; + scale = "1 1 1"; + locked = "true"; position = "-1024 -1024 0"; rotation = "1 0 0 0"; - locked = "true"; - scale = "1 1 1"; }; new TerrainBlock(Terrain) { rotation = "1 0 0 0"; @@ -39,24 +39,24 @@ new SimGroup(MissionGroup) { terrainFile = "Caldera.ter"; squareSize = "8"; emptySquares = "250"; - position = "-1024 -1024 0"; - hazeDistance = "250"; - locked = "true"; visibleDistance = "1200"; + locked = "true"; + hazeDistance = "250"; + position = "-1024 -1024 0"; }; new NavigationGraph(NavGraph) { conjoinAngleDev = "45"; cullDensity = "0.3"; customArea = "0 0 0 0"; - position = "0 0 0 1"; + scale = "1 1 1"; + locked = "true"; + coverage = "0"; XDimOverSize = "0"; + position = "0 0 0 1"; + GraphFile = "Caldera.nav"; YDimOverSize = "0"; rotation = "0 0 0 0"; - locked = "true"; conjoinBowlDev = "20"; - scale = "1 1 1"; - GraphFile = "Caldera.nav"; - coverage = "0"; }; new WaterBlock() { position = "112 -96 63.1568"; @@ -87,6 +87,7 @@ new SimGroup(MissionGroup) { cloudSpeed3 = "0.0003"; visibleDistance = "550"; useSkyTextures = "1"; + renderBottomTexture = "0"; SkySolidColor = "0.106000 0.125000 0.235000 0.000000"; fogDistance = "222"; fogColor = "0.850000 0.380000 0.100000 1.000000"; @@ -99,8 +100,8 @@ new SimGroup(MissionGroup) { fogVolumeColor1 = "128.000000 128.000000 128.000000 -0.000000"; fogVolumeColor2 = "128.000000 128.000000 128.000000 -0.000000"; fogVolumeColor3 = "128.000000 128.000000 128.000000 -0.000000"; - cloudSpeed0 = "0.001000 0.001000"; locked = "true"; + cloudSpeed0 = "0.001000 0.001000"; }; new SimGroup(ObserverDropPoints) { @@ -135,7 +136,8 @@ new SimGroup(MissionGroup) { new SimGroup(Teams) { new SimGroup(Team1) { - providesPower = true; + providesPower = "1"; + new SimGroup(WBase) { new StaticShape() { @@ -146,7 +148,6 @@ new SimGroup(MissionGroup) { dataBlock = "SensorMediumPulse"; lockCount = "0"; homingCount = "0"; - Target = "33"; locked = "true"; }; new Item() { @@ -159,7 +160,6 @@ new SimGroup(MissionGroup) { collideable = "0"; static = "1"; rotate = "0"; - Target = "-1"; locked = "true"; }; new StaticShape() { @@ -170,9 +170,8 @@ new SimGroup(MissionGroup) { dataBlock = "StationInventory"; lockCount = "0"; homingCount = "0"; - damageTimeMS = "783957"; - Target = "34"; locked = "true"; + damageTimeMS = "783957"; }; new StaticShape() { position = "-50.5461 -154.429 180.337"; @@ -182,9 +181,8 @@ new SimGroup(MissionGroup) { dataBlock = "StationInventory"; lockCount = "0"; homingCount = "0"; - damageTimeMS = "782064"; - Target = "35"; locked = "true"; + damageTimeMS = "782064"; }; new StaticShape() { position = "-215.474 -235.369 148.1"; @@ -194,13 +192,15 @@ new SimGroup(MissionGroup) { dataBlock = "StationVehiclePad"; lockCount = "0"; homingCount = "0"; - mobileBaseVehicle = "Removed"; - damageTimeMS = "219608"; - Target = "-1"; scoutVehicle = "Removed"; locked = "true"; + damageTimeMS = "219608"; + WayPoint = "3444"; AssaultVehicle = "Removed"; - needsObjectiveWaypoint = true; + Ready = "1"; + mobileBaseVehicle = "Removed"; + needsObjectiveWaypoint = "1"; + station = "3373"; }; new InteriorInstance() { position = "-45.7829 -144.124 180.354"; @@ -224,7 +224,8 @@ new SimGroup(MissionGroup) { rotation = "-0 0 -1 29.7938"; scale = "5.1479 4.14776 0.526289"; dataBlock = "defaultTeamSlowFieldBare"; - Target = "38"; + lockCount = "0"; + homingCount = "0"; locked = "true"; }; new ForceFieldBare() { @@ -232,7 +233,8 @@ new SimGroup(MissionGroup) { rotation = "-0 0 -1 29.7938"; scale = "5.1479 4.14776 0.526289"; dataBlock = "defaultTeamSlowFieldBare"; - Target = "39"; + lockCount = "0"; + homingCount = "0"; locked = "true"; }; new ForceFieldBare() { @@ -240,7 +242,8 @@ new SimGroup(MissionGroup) { rotation = "0 0 1 149.152"; scale = "1.60793 8.34049 7.7216"; dataBlock = "defaultTeamSlowFieldBare"; - Target = "40"; + lockCount = "0"; + homingCount = "0"; locked = "true"; }; new Turret() { @@ -252,7 +255,6 @@ new SimGroup(MissionGroup) { lockCount = "0"; homingCount = "0"; initialBarrel = "PlasmaBarrelLarge"; - Target = "41"; locked = "true"; originalBarrel = "PlasmaBarrelLarge"; }; @@ -304,18 +306,21 @@ new SimGroup(MissionGroup) { dataBlock = "SensorLargePulse"; lockCount = "0"; homingCount = "0"; - Target = "42"; locked = "true"; }; - new ForceFieldBare() { - position = "264.56 8.06406 219.686"; - rotation = "1 0 0 0"; - scale = "1 22.9263 8.12996"; - dataBlock = "defaultTeamSlowFieldBare"; - Target = "43"; + new StaticShape() { + position = "174.821 19.469 219.67"; + rotation = "0 0 1 90.5273"; + scale = "1 1 1"; + nameTag = "Secondary"; + dataBlock = "GeneratorLarge"; + lockCount = "0"; + homingCount = "0"; locked = "true"; - color = "0.500000 0.500000 1.000000 1.000000"; - triggerCount = "0"; + WayPoint = "3445"; + name = "Tactical Generator"; + scoreValue = "5"; + needsObjectiveWaypoint = "1"; }; new Item() { position = "211.16 42.98 252.866"; @@ -327,7 +332,6 @@ new SimGroup(MissionGroup) { collideable = "0"; static = "1"; rotate = "0"; - Target = "-1"; locked = "true"; }; new Turret() { @@ -339,7 +343,6 @@ new SimGroup(MissionGroup) { lockCount = "0"; homingCount = "0"; initialBarrel = "SentryTurretBarrel"; - Target = "44"; locked = "true"; }; new Turret() { @@ -351,24 +354,9 @@ new SimGroup(MissionGroup) { lockCount = "0"; homingCount = "0"; initialBarrel = "PlasmaBarrelLarge"; - Target = "45"; locked = "true"; originalBarrel = "PlasmaBarrelLarge"; }; - new StaticShape() { - position = "174.821 19.469 219.67"; - rotation = "0 0 1 90.5273"; - scale = "1 1 1"; - nameTag = "Tactical"; - dataBlock = "GeneratorLarge"; - lockCount = "0"; - homingCount = "0"; - Target = "46"; - locked = "true"; - name = "Tactical Generator"; - scoreValue = "5"; - needsObjectiveWaypoint = true; - }; }; new SimGroup(Stations) { @@ -380,7 +368,6 @@ new SimGroup(MissionGroup) { dataBlock = "StationInventory"; lockCount = "0"; homingCount = "0"; - Target = "47"; locked = "true"; scoreValue = "5"; }; @@ -392,9 +379,9 @@ new SimGroup(MissionGroup) { dataBlock = "FlipFlop"; lockCount = "0"; homingCount = "0"; - Target = "48"; locked = "true"; - needsObjectiveWaypoint = true; + WayPoint = "3446"; + needsObjectiveWaypoint = "1"; }; new InteriorInstance() { position = "210.961 -2.7616 219.719"; @@ -406,18 +393,19 @@ new SimGroup(MissionGroup) { locked = "true"; }; new StaticShape() { - position = "268.399 9.43564 219.67"; - rotation = "0 0 -1 89.9544"; + position = "211.031 12.9246 239.71"; + rotation = "1 0 0 0"; scale = "1 1 1"; nameTag = "Primary"; dataBlock = "GeneratorLarge"; lockCount = "0"; homingCount = "0"; - Target = "49"; locked = "true"; + WayPoint = "3447"; + damageTimeMS = "35412"; name = "Primary Generator"; scoreValue = "5"; - needsObjectiveWaypoint = true; + needsObjectiveWaypoint = "1"; }; new StaticShape() { position = "182.86 -5.01 219.7"; @@ -427,7 +415,6 @@ new SimGroup(MissionGroup) { dataBlock = "StationInventory"; lockCount = "0"; homingCount = "0"; - Target = "50"; locked = "true"; }; new StaticShape() { @@ -438,7 +425,6 @@ new SimGroup(MissionGroup) { dataBlock = "StationInventory"; lockCount = "0"; homingCount = "0"; - Target = "51"; locked = "true"; }; new StaticShape() { @@ -449,7 +435,6 @@ new SimGroup(MissionGroup) { dataBlock = "StationInventory"; lockCount = "0"; homingCount = "0"; - Target = "52"; locked = "true"; }; new ForceFieldBare() { @@ -457,7 +442,8 @@ new SimGroup(MissionGroup) { rotation = "1 0 0 0"; scale = "1 17.0756 8.19376"; dataBlock = "defaultForceFieldBare"; - Target = "53"; + lockCount = "0"; + homingCount = "0"; locked = "true"; }; }; @@ -517,6 +503,8 @@ new SimGroup(MissionGroup) { rotation = "1 0 0 0"; scale = "1 1 1"; dataBlock = "doubleTimeEmissionDummy"; + lockCount = "0"; + homingCount = "0"; emitter = "LightDamageSmoke"; velocity = "1"; locked = "true"; @@ -590,6 +578,8 @@ new SimGroup(MissionGroup) { rotation = "1 0 0 180.091"; scale = "1.97494 1.80987 1"; dataBlock = "doubleTimeEmissionDummy"; + lockCount = "0"; + homingCount = "0"; emitter = "PlasmaExplosionEmitter"; velocity = "1"; locked = "true"; @@ -599,6 +589,8 @@ new SimGroup(MissionGroup) { rotation = "0 1 0 180.664"; scale = "1 1 1"; dataBlock = "doubleTimeEmissionDummy"; + lockCount = "0"; + homingCount = "0"; emitter = "PlasmaExplosionEmitter"; velocity = "1"; locked = "true"; diff --git a/base/missions/Minotaur.mis b/base/missions/Minotaur.mis index 23bd4d3..f3228c5 100644 --- a/base/missions/Minotaur.mis +++ b/base/missions/Minotaur.mis @@ -381,7 +381,7 @@ new SimGroup(MissionGroup) { locked = "true"; }; new TSStatic() { - position = "-23.79 -325.171 130.635"; + position = "-23.79 -325.171 129.2"; rotation = "0 0 1 108.719"; scale = "1.3 1.3 1.3"; shapeName = "xorg5.dts"; diff --git a/base/scripts/CTFGame.cs b/base/scripts/CTFGame.cs index 0625e21..2602f13 100644 --- a/base/scripts/CTFGame.cs +++ b/base/scripts/CTFGame.cs @@ -2,9 +2,9 @@ //--- GAME RULES BEGIN --- //Prevent enemy from capturing your flag -//Capture enemy flag and bring it to your team's flag stand -//Score a point each time enemy flag is "capped" -//To score, your flag must be at its stand when the enemy flag arrives +//Score one point for grabbing the enemy's flag +//To capture, your flag must be at its stand +//Score 100 points each time enemy flag is captured //--- GAME RULES END --- //exec the AI scripts @@ -84,7 +84,8 @@ function CTFGame::initGameVars(%game) %game.SCORE_PER_KILL = 1; %game.SCORE_PER_PLYR_FLAG_CAP = 3; - %game.SCORE_PER_TEAM_FLAG_CAP = 1; + %game.SCORE_PER_TEAM_FLAG_CAP = 100; + %game.SCORE_PER_TEAM_FLAG_TOUCH = 1; %game.SCORE_PER_GEN_DESTROY = 2; %game.SCORE_PER_ESCORT_ASSIST = 1; @@ -101,10 +102,13 @@ function CTFGame::initGameVars(%game) %game.RADIUS_GEN_DEFENSE = 20; //meters %game.RADIUS_FLAG_DEFENSE = 20; //meters + %game.TOUCH_DELAY_MS = 20000; //20 secs + %game.fadeTimeMS = 2000; %game.notifyMineDist = 7.5; + %game.stalemate = false; %game.stalemateObjsVisible = false; %game.stalemateTimeMS = 60000; @@ -194,6 +198,9 @@ function CTFGame::playerTouchEnemyFlag(%game, %player, %flag) //if this flag was "at home", see if both flags have now been taken if (%flag.isHome) { + // tiebreaker score + game.awardScoreFlagTouch( %client, %flag ); + %startStalemate = false; if ($TeamFlag[1] == %flag) %startStalemate = !$TeamFlag[2].isHome; @@ -660,12 +667,34 @@ function CTFGame::awardScoreFlagCap(%game, %cl, %flag) %game.checkScoreLimit(%cl.team); } + +function CTFGame::awardScoreFlagTouch(%game, %cl, %flag) +{ + %team = %cl.team; + if( $DontScoreTimer[%team] ) + return; + + $dontScoreTimer[%team] = true; + schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;"); + $TeamScore[%team] += %game.SCORE_PER_TEAM_FLAG_TOUCH; + messageAll('MsgTeamScoreIs', "", %team, $TeamScore[%team]); + + if (%game.SCORE_PER_TEAM_FLAG_TOUCH > 0) + { + %plural = (%game.SCORE_PER_TEAM_FLAG_TOUCH != 1 ? 's' : ""); + messageTeam(%team, 'msgCTFFriendFlagTouch', '\c0Your team receives %1 point%2 for grabbing the enemy flag!', %game.SCORE_PER_TEAM_FLAG_TOUCH, %plural); + messageTeam(%flag.team, 'msgCTFEnemyFlagTouch', '\c0Enemy team %1 receives %2 point%3 for grabbing your flag!', %cl.name, %game.SCORE_PER_TEAM_FLAG_TOUCH, %plural); + } + %game.recalcScore(%cl); + %game.checkScoreLimit(%team); +} + function CTFGame::checkScoreLimit(%game, %team) { - %scoreLimit = MissionGroup.CTF_scoreLimit; + %scoreLimit = MissionGroup.CTF_scoreLimit * %game.SCORE_PER_TEAM_FLAG_CAP; // default of 5 if scoreLimit not defined if(%scoreLimit $= "") - %scoreLimit = 5; + %scoreLimit = 5 * %game.SCORE_PER_TEAM_FLAG_CAP; if($TeamScore[%team] >= %scoreLimit) %game.scoreLimitReached(); } diff --git a/base/scripts/ChatGui.cs b/base/scripts/ChatGui.cs index 21cdd7d..dd6cc4b 100644 --- a/base/scripts/ChatGui.cs +++ b/base/scripts/ChatGui.cs @@ -52,7 +52,7 @@ function JoinChatDlg::onWake(%this) else MessageBoxYesNo("Connect IRC","Connect to IRC server?","IRCClient::connect();","Canvas.popDialog(JoinChatDlg);"); } - + //------------------------------------------------------------------------------ function JoinChatList::onAdd( %this ) { @@ -63,7 +63,7 @@ function JoinChatList::onAdd( %this ) %this.setSortIncreasing( false ); %this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "180 180 180", "220 220 220", "40 40 40" ); } - + //------------------------------------------------------------------------------ function JoinChatList::onSelect(%this,%id,%text) { @@ -73,17 +73,17 @@ function JoinChatList::onSelect(%this,%id,%text) //------------------------------------------------------------------------------ function JoinChatDlg::join(%this) { - if(trim(JoinChatName.getValue()) $= "") - { - messageBoxOK("ERROR", "Invalid Channel Name"); - return; - } - else - { - IRCClient::join(IRCClient::channelName(trim( JoinChatName.getValue()) )); - Canvas.popDialog(JoinChatDlg); - LaunchTabView.viewTab("CHAT", ChatGui, 0); - } + if(trim(JoinChatName.getValue()) $= "") + { + messageBoxOK("ERROR", "Invalid Channel Name"); + return; + } + else + { + IRCClient::join(IRCClient::channelName(trim( JoinChatName.getValue()) )); + Canvas.popDialog(JoinChatDlg); + LaunchTabView.viewTab("CHAT", ChatGui, 0); + } } //------------------------------------------------------------------------------ @@ -136,11 +136,11 @@ function ChatGui::onWake(%this) { Canvas.pushDialog(LaunchToolbarDlg); - ChatTabView.addSet(1,"gui/shll_horztabbuttonB","5 5 5","50 50 0","5 5 5"); + ChatTabView.addSet(1,"gui/shll_horztabbuttonB","5 5 5","50 50 0","5 5 5"); ChatGui.awake = true; ChatTabView.setSelected($IRCClient::currentChannel); - ChatGuiScroll.scrollToBottom(); + ChatGuiScroll.scrollToBottom(); ChatMessageEntry.schedule(1, makeFirstResponder, true); } @@ -152,29 +152,29 @@ function ChatGui::setKey(%this,%ignore) //------------------------------------------------------------------------------ function ChatTabView::onAdd(%this) { - if ($LaunchMode $= "Normal") - %this.addTab($IRCClient::channels.getObject(0),"STATUS"); + if ($LaunchMode $= "Normal") + %this.addTab($IRCClient::channels.getObject(0),"STATUS"); } //------------------------------------------------------------------------------ function ChatTabView::onSelect(%this,%obj,%name) { - ChatTabFrame.setAltColor(%obj.private); - %i = %obj.findMember($IRCClient::people.getObject(0)); - ChatEditChannelBtn.setVisible(%obj.getFlags(%i) & $PERSON_OPERATOR); - - //is this the status window? do we need the options button - %vis = (%name $= "STATUS" ? true : false); - ChatEditOptionsBtn.setVisible(%vis); - - ChatChannelTopic.setValue(%obj.topic); + ChatTabFrame.setAltColor(%obj.private); + %i = %obj.findMember($IRCClient::people.getObject(0)); + ChatEditChannelBtn.setVisible(%obj.getFlags(%i) & $PERSON_OPERATOR); + + //is this the status window? do we need the options button + %vis = (%name $= "STATUS" ? true : false); + ChatEditOptionsBtn.setVisible(%vis); + + ChatChannelTopic.setValue(%obj.topic); if (ChatGui.awake) { if ($IRCClient::currentChannel == $IRCClient::attachedChannel) ChatGuiMessageVector.detach(); ChatGuiMessageVector.attach(%obj); - //ChatGuiMessageVector.scrollToBottom(); - $IRCClient::attachedChannel = %obj; + //ChatGuiMessageVector.scrollToBottom(); + $IRCClient::attachedChannel = %obj; } $IRCClient::currentChannel = %obj; ChatRoomMemberList_rebuild(%obj); @@ -184,7 +184,7 @@ function ChatTabView::onSelect(%this,%obj,%name) //------------------------------------------------------------------------------ function ChatTabView::openNewPane(%this) { - Canvas.pushDialog(JoinChatDlg); + Canvas.pushDialog(JoinChatDlg); } //------------------------------------------------------------------------------ @@ -199,207 +199,207 @@ function ChatTabView::closeCurrentPane(%this) //------------------------------------------------------------------------------ function JoinPublicTribeChannel(%tribe) { - IRCClient::join(IRCClient::channelName(%tribe) @ "_Public"); - LaunchTabView.viewTab("CHAT",ChatGui,0); + IRCClient::join(IRCClient::channelName(%tribe) @ "_Public"); + LaunchTabView.viewTab("CHAT",ChatGui,0); } //------------------------------------------------------------------------------ function JoinPrivateTribeChannel(%tribe) { - IRCClient::join(IRCClient::channelName(%tribe) @ "_Private"); - LaunchTabView.viewTab("CHAT",ChatGui,0); + IRCClient::join(IRCClient::channelName(%tribe) @ "_Private"); + LaunchTabView.viewTab("CHAT",ChatGui,0); } //------------------------------------------------------------------------------ function KeyChannelJoin() { - Canvas.popDialog(ChannelKeyDlg); - IRCClient::join($IRCClient::keyChannel SPC EditChannelKey.getValue()); + Canvas.popDialog(ChannelKeyDlg); + IRCClient::join($IRCClient::keyChannel SPC EditChannelKey.getValue()); } //------------------------------------------------------------------------------ function ChatGuiMessageVector::urlClickCallback(%this,%type,%url,%content) { - switch$(%type) - { - case "http": - gotoWebPage(%url); - case "server": - //IRCClient::onJoinGame(%content,%url); - %url = nextToken(%url,a," "); - %url = nextToken(%url,map,"("); - %url = nextToken(%url,type,")"); + switch$(%type) + { + case "http": + gotoWebPage(%url); + case "server": + //IRCClient::onJoinGame(%content,%url); + %url = nextToken(%url,a," "); + %url = nextToken(%url,map,"("); + %url = nextToken(%url,type,")"); - if(getSubStr(%content, 0, 1) $= "#") - { - // this is a fake server, its really a channel for invites - IRCClient::join(%content); - return; - } - // set the loading gui + if(getSubStr(%content, 0, 1) $= "#") + { + // this is a fake server, its really a channel for invites + IRCClient::join(%content); + return; + } + // set the loading gui // LoadingGui.map = %map; -// LoadingGui.missionType = %type; -// Canvas.setContent(LoadingGui); -// Canvas.repaint(); - - JoinGame(%content); - case "warrior": - LaunchBrowser(%url,"Warrior"); - } +// LoadingGui.missionType = %type; +// Canvas.setContent(LoadingGui); +// Canvas.repaint(); + + JoinGame(%content); + case "warrior": + LaunchBrowser(%url,"Warrior"); + } } //------------------------------------------------------------------------------ function ChatSendText() { if ($IRCClient::people.getObject(0).flags & $PERSON_AWAY) - IRCClient::away(""); - else - { - if ($IRCClient::awaytimeout) - cancel($IRCClient::awaytimeout); - $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); - } + IRCClient::away(""); + else + { + if ($IRCClient::awaytimeout) + cancel($IRCClient::awaytimeout); + $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); + } if ($IRCClient::currentChannel.private) - IRCClient::send2(ChatMessageEntry.getValue(),$IRCClient::currentChannel.getName()); - else - IRCClient::send2(ChatMessageEntry.getValue(),""); + IRCClient::send2(ChatMessageEntry.getValue(),$IRCClient::currentChannel.getName()); + else + IRCClient::send2(ChatMessageEntry.getValue(),""); ChatMessageEntry.setValue(""); } //------------------------------------------------------------------------------ function ChatAway_Timeout() { - $IRCClient::awaytimeout = 0; - IRCClient::away($pref::IRCClient::awaymsg); + $IRCClient::awaytimeout = 0; + IRCClient::away($pref::IRCClient::awaymsg); } //------------------------------------------------------------------------------ -function ChatRoomMemberList::onAdd(%this) +function ChatRoomMemberList::onAdd(%this) { - ChatRoomMemberList.addStyle($PERSON_OPERATOR, - "sys_op_eye.png", "", - "","",""); - ChatRoomMemberList.addStyle($PERSON_IGNORE, - "", "mute_speaker.png", - "","",""); - ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_OPERATOR, - "sys_op_eye.png", "mute_speaker.png", - "","",""); - ChatRoomMemberList.addStyle($PERSON_AWAY, - "", "", - "128 128 128","",""); - ChatRoomMemberList.addStyle($PERSON_OPERATOR | $PERSON_AWAY, - "sys_op_eye.png", "", - "128 128 128","",""); - ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_AWAY, - "", "mute_speaker.png", - "128 128 128","",""); - ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_OPERATOR | $PERSON_AWAY, - "sys_op_eye.png", "mute_speaker.png", - "128 128 128","",""); + ChatRoomMemberList.addStyle($PERSON_OPERATOR, + "sys_op_eye.png", "", + "","",""); + ChatRoomMemberList.addStyle($PERSON_IGNORE, + "", "mute_speaker.png", + "","",""); + ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_OPERATOR, + "sys_op_eye.png", "mute_speaker.png", + "","",""); + ChatRoomMemberList.addStyle($PERSON_AWAY, + "", "", + "128 128 128","",""); + ChatRoomMemberList.addStyle($PERSON_OPERATOR | $PERSON_AWAY, + "sys_op_eye.png", "", + "128 128 128","",""); + ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_AWAY, + "", "mute_speaker.png", + "128 128 128","",""); + ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_OPERATOR | $PERSON_AWAY, + "sys_op_eye.png", "mute_speaker.png", + "128 128 128","",""); } //------------------------------------------------------------------------------ function ChatRoomMemberList_rebuild(%c) { - if(!%c) - %c = $IRCClient::currentChannel; + if(!%c) + %c = $IRCClient::currentChannel; - //error("ChatRoomMemberList_rebuild("@%c@")"); - ChatRoomMemberList.clear(); - for (%i = 0; %i < %c.numMembers(); %i++) - { - ChatRoomMemberList.addRow(%c.getMemberId(%i),%c.getMemberNick(%i)); - ChatRoomMemberList.setRowStyle(%i,%c.getMemberId(%i).flags | %c.getFlags(%i)); - } + //error("ChatRoomMemberList_rebuild("@%c@")"); + ChatRoomMemberList.clear(); + for (%i = 0; %i < %c.numMembers(); %i++) + { + ChatRoomMemberList.addRow(%c.getMemberId(%i),%c.getMemberNick(%i)); + ChatRoomMemberList.setRowStyle(%i,%c.getMemberId(%i).flags | %c.getFlags(%i)); + } } //------------------------------------------------------------------------------ function ChatRoomMemberList_refresh(%channel) { - %list = nameToId(ChatRoomMemberList); - - // we only want to refresh the list if its the currently active channel - // we will rebuild the list on channel switch - if(%channel != $IRCClient::currentChannel) - return; - - //%me = $IRCClient::people.getObject(0); + %list = nameToId(ChatRoomMemberList); + + // we only want to refresh the list if its the currently active channel + // we will rebuild the list on channel switch + if(%channel != $IRCClient::currentChannel) + return; + + //%me = $IRCClient::people.getObject(0); - //echo("Gui count :"@%list.rowCount()); - //echo("Member count :" @ %channel.numMembers()); - %add = ( %list.rowCount() < %channel.numMembers() ? true : false); + //echo("Gui count :"@%list.rowCount()); + //echo("Member count :" @ %channel.numMembers()); + %add = ( %list.rowCount() < %channel.numMembers() ? true : false); - if(%add) - { - // get our gui list - for(%i = 0; %i < %list.rowCount(); %i++) - { - %list.guiValue[%i] = %list.getRowId(%i); - //echo("List "@%i@": "@%list.guiValue[%i]@"("@%channel.getMemberNick(%i)@")"); - } - // get "real" list - for(%i = 0; %i < %channel.numMembers(); %i++) - { - %member = %channel.getMemberId(%i); - if(%member != %list.guiValue[%i]) - { - - // here is the difference, lets do the magic - //echo("did we just add: " SPC %channel.getMemberNick(%i)); - %list.addRow(%channel.getMemberId(%i), %channel.getMemberNick(%i), %i); - %list.setRowStyle(%i, %channel.getMemberId(%i).flags | %channel.getFlags(%i)); - - break; - } - } - } - else - { - for(%i = 0; %i < %list.rowCount(); %i++) - { - %list.guiValue[%i] = %list.getRowId(%i); - } + if(%add) + { + // get our gui list + for(%i = 0; %i < %list.rowCount(); %i++) + { + %list.guiValue[%i] = %list.getRowId(%i); + //echo("List "@%i@": "@%list.guiValue[%i]@"("@%channel.getMemberNick(%i)@")"); + } + // get "real" list + for(%i = 0; %i < %channel.numMembers(); %i++) + { + %member = %channel.getMemberId(%i); + if(%member != %list.guiValue[%i]) + { + + // here is the difference, lets do the magic + //echo("did we just add: " SPC %channel.getMemberNick(%i)); + %list.addRow(%channel.getMemberId(%i), %channel.getMemberNick(%i), %i); + %list.setRowStyle(%i, %channel.getMemberId(%i).flags | %channel.getFlags(%i)); + + break; + } + } + } + else + { + for(%i = 0; %i < %list.rowCount(); %i++) + { + %list.guiValue[%i] = %list.getRowId(%i); + } - for(%i = 0; %i < %channel.numMembers(); %i++) - { - %member = %channel.getMemberId(%i); - if(%member != %list.guiValue[%i]) - { - //echo("List "@%i@": "@%list.guiValue[%i] SPC IRCClient::taggedNick(%list.guiValue[%i])); - //error(%list.getRowId(%i)); - - %list.removeRow(%i); - break; - } - } - - } + for(%i = 0; %i < %channel.numMembers(); %i++) + { + %member = %channel.getMemberId(%i); + if(%member != %list.guiValue[%i]) + { + //echo("List "@%i@": "@%list.guiValue[%i] SPC IRCClient::taggedNick(%list.guiValue[%i])); + //error(%list.getRowId(%i)); + + %list.removeRow(%i); + break; + } + } + + } } //------------------------------------------------------------------------------ function ChannelBannedList_refresh() { - ChannelBanList.clear(); - %j = 0; + ChannelBanList.clear(); + %j = 0; for (%i = 0; %i < $IRCClient::numBanned; %i++) - { - %p = $IRCClient::banList[%i]; - if (!$IRCClient::removeBan[%p]) - { - ChannelBanList.addRow(%p,IRCClient::taggedNick(%p)); - ChannelBanList.setRowStyle(%j,%p.flags); - %j++; - } - } - ChannelBanList.sort(0); + { + %p = $IRCClient::banList[%i]; + if (!$IRCClient::removeBan[%p]) + { + ChannelBanList.addRow(%p,IRCClient::taggedNick(%p)); + ChannelBanList.setRowStyle(%j,%p.flags); + %j++; + } + } + ChannelBanList.sort(0); } //------------------------------------------------------------------------------ function ChannelRemoveBan() { - $IRCClient::removeBan[ChannelBanList.getSelectedId()] = true; - ChannelBannedList_refresh(); + $IRCClient::removeBan[ChannelBanList.getSelectedId()] = true; + ChannelBannedList_refresh(); } //------------------------------------------------------------------------------ @@ -407,70 +407,70 @@ function ChatRoomMemberList::onRightMouseDown(%this,%column,%row,%mousePos) { // Open the action menu: ChatMemberPopup.member = %this.getRowId(%row); - ChatMemberPopup.position = %mousePos; - - ChatMemberPopup.clear(); - %nick = IRCClient::displayNick(ChatMemberPopup.member); - %is = $IRCClient::currentChannel.findMember(ChatMemberPopup.member); - %im = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); + ChatMemberPopup.position = %mousePos; + + ChatMemberPopup.clear(); + %nick = IRCClient::displayNick(ChatMemberPopup.member); + %is = $IRCClient::currentChannel.findMember(ChatMemberPopup.member); + %im = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); - // if ( !ChatMember.player.isBot ) + // if ( !ChatMember.player.isBot ) - ChatMemberPopup.add(%nick,-1); - for (%i = 0; %i < strlen(%nick) * 1.5; %i++) - %line = %line @ "-"; - ChatMemberPopup.add(%line,-1); + ChatMemberPopup.add(%nick,-1); + for (%i = 0; %i < strlen(%nick) * 1.5; %i++) + %line = %line @ "-"; + ChatMemberPopup.add(%line,-1); - if (ChatMemberPopup.member == $IRCClient::people.getObject(0)) - { - if (ChatMemberPopup.member.flags & $PERSON_AWAY) - ChatMemberPopup.add("Set Present",0); - else - ChatMemberPopup.add("Set Away",1); - } - else - { - if (strcmp(ChatMemberPopup.member.displayName,$IRCClient::currentChannel.getName())) - ChatMemberPopup.add("Chat",2); - - if ($IRCClient::currentChannel.getFlags(%im) & $PERSON_OPERATOR) - { - if (strlen(ChatMemberPopup.member.nick) && - !($IRCClient::currentChannel.getFlags(%is) & $PERSON_OPERATOR)) - ChatMemberPopup.add("Admin",3); - ChatMemberPopup.add("Kick",4); - ChatMemberPopup.add("Ban",5); - } - if (ChatMemberPopup.member.flags & $PERSON_IGNORE) - ChatMemberPopup.add("Unmute",6); - else - ChatMemberPopup.add("Mute",6); - for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) - { - %c = $IRCClient::channels.getObject(%i); - if (%c.private) - continue; - %cis = %c.findMember(ChatMemberPopup.member); - %cim = %c.findMember($IRCClient::people.getObject(0)); - if (%cis < 0 && - (!(%c.flags & $CHANNEL_INVITE) || - %c.getFlags(%cim) & $PERSON_OPERATOR)) - ChatMemberPopup.add("Invite to" SPC IRCClient::displayChannel(%c.getName()),%c); - } - } - - Canvas.pushDialog(ChatMemberActionDlg); - ChatMemberPopup.forceOnAction(); + if (ChatMemberPopup.member == $IRCClient::people.getObject(0)) + { + if (ChatMemberPopup.member.flags & $PERSON_AWAY) + ChatMemberPopup.add("Set Present",0); + else + ChatMemberPopup.add("Set Away",1); + } + else + { + if (strcmp(ChatMemberPopup.member.displayName,$IRCClient::currentChannel.getName())) + ChatMemberPopup.add("Chat",2); + + if ($IRCClient::currentChannel.getFlags(%im) & $PERSON_OPERATOR) + { + if (strlen(ChatMemberPopup.member.nick) && + !($IRCClient::currentChannel.getFlags(%is) & $PERSON_OPERATOR)) + ChatMemberPopup.add("Admin",3); + ChatMemberPopup.add("Kick",4); + ChatMemberPopup.add("Ban",5); + } + if (ChatMemberPopup.member.flags & $PERSON_IGNORE) + ChatMemberPopup.add("Unmute",6); + else + ChatMemberPopup.add("Mute",6); + for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) + { + %c = $IRCClient::channels.getObject(%i); + if (%c.private) + continue; + %cis = %c.findMember(ChatMemberPopup.member); + %cim = %c.findMember($IRCClient::people.getObject(0)); + if (%cis < 0 && + (!(%c.flags & $CHANNEL_INVITE) || + %c.getFlags(%cim) & $PERSON_OPERATOR)) + ChatMemberPopup.add("Invite to" SPC IRCClient::displayChannel(%c.getName()),%c); + } + } + + Canvas.pushDialog(ChatMemberActionDlg); + ChatMemberPopup.forceOnAction(); } //------------------------------------------------------------------------------ function ChatPrivate() { - if (ChatRoomMemberList.getSelectedId() != $IRCClient::people.getObject(0)) - { - %c = IRCClient::findChannel(ChatRoomMemberList.getSelectedId().getName(),true); - ChatTabView.setSelected(%c); - } + if (ChatRoomMemberList.getSelectedId() != $IRCClient::people.getObject(0)) + { + %c = IRCClient::findChannel(ChatRoomMemberList.getSelectedId().getName(),true); + ChatTabView.setSelected(%c); + } } //------------------------------------------------------------------------------ @@ -478,46 +478,46 @@ function ChatMemberPopup::onSelect(%this,%id,%text) { switch( %id ) { - case 0: // Set Back - IRCClient::away(""); - case 1: // Set Away - IRCClient::away($pref::IRCClient::awaymsg); - case 2: // Chat - %c = IRCClient::findChannel(ChatMemberPopup.member.displayName,true); - ChatTabView.setSelected(%c); + case 0: // Set Back + IRCClient::away(""); + case 1: // Set Away + IRCClient::away($pref::IRCClient::awaymsg); + case 2: // Chat + %c = IRCClient::findChannel(ChatMemberPopup.member.displayName,true); + ChatTabView.setSelected(%c); case 3: // Admin IRCClient::setOperator(ChatMemberPopup.member); case 4: // Kick IRCClient::kick(ChatMemberPopup.member,$pref::IRCClient::kickmsg); case 5: // Ban IRCClient::ban(ChatMemberPopup.member,true); - IRCClient::kick(ChatMemberPopup.member,$pref::IRCClient::banmsg); + IRCClient::kick(ChatMemberPopup.member,$pref::IRCClient::banmsg); case 6: // Mute/Unmute IRCClient::ignore(ChatMemberPopup.member,!(ChatMemberPopup.member.flags & $PERSON_IGNORE)); - default: // Invite - IRCClient::invite(ChatMemberPopup.member,%id); + default: // Invite + IRCClient::invite(ChatMemberPopup.member,%id); } } //------------------------------------------------------------------------------ function ChannelBanList::onAdd(%this) { - ChannelBanList.addStyle($PERSON_IGNORE, - "", "mute_speaker.png", - "","",""); - ChannelBanList.addStyle($PERSON_AWAY, - "", "", - "128 128 128","",""); - ChannelBanList.addStyle($PERSON_IGNORE | $PERSON_AWAY, - "", "mute_speaker.png", - "128 128 128","",""); + ChannelBanList.addStyle($PERSON_IGNORE, + "", "mute_speaker.png", + "","",""); + ChannelBanList.addStyle($PERSON_AWAY, + "", "", + "128 128 128","",""); + ChannelBanList.addStyle($PERSON_IGNORE | $PERSON_AWAY, + "", "mute_speaker.png", + "128 128 128","",""); } //------------------------------------------------------------------------------ function ChatGui::onClose(%key) { - if ($IRCClient::people.getObject(0).flags & $PERSON_AWAY) - IRCClient::away(""); + if ($IRCClient::people.getObject(0).flags & $PERSON_AWAY) + IRCClient::away(""); for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) IRCClient::part($IRCClient::channels.getObject(%i).getName()); } @@ -526,144 +526,144 @@ function ChatGui::onClose(%key) function ChatGui::onSleep(%this) { ChatGui.awake = false; - $IRCClient::attachedChannel = 0; + $IRCClient::attachedChannel = 0; - Canvas.popDialog(LaunchToolbarDlg); + Canvas.popDialog(LaunchToolbarDlg); } //------------------------------------------------------------------------------ function EditChannelOptions() { - %c = $IRCClient::currentChannel; - ChannelOptionsDlg.channel = %c; - %im = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); + %c = $IRCClient::currentChannel; + ChannelOptionsDlg.channel = %c; + %im = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); - EditChannelName.setValue(IRCClient::displayChannel(%c.getName())); + EditChannelName.setValue(IRCClient::displayChannel(%c.getName())); - IRCClient::requestBanList($IRCClient::currentChannel); - - EditChannelTopic.setValue(%c.topic); + IRCClient::requestBanList($IRCClient::currentChannel); + + EditChannelTopic.setValue(%c.topic); - $EditChannelInvite = %c.flags & $CHANNEL_INVITE; - ButtonChannelInvite.setActive(!%c.tribe); + $EditChannelInvite = %c.flags & $CHANNEL_INVITE; + ButtonChannelInvite.setActive(!%c.tribe); - $EditChannelModerate = %c.flags & $CHANNEL_MODERATED; - - $EditChannelLimit = %c.flags & $CHANNEL_LIMITED; - ButtonChannelLimit.setActive(!%c.tribe && !$EditChannelInvite); - if ($EditChannelLimit) - { - EditChannelMaxMembers.setValue(%c.personLimit); - EditChannelMaxMembers.setActive(!%c.tribe && !$EditChannelInvite); - } - else - EditChannelMaxMembers.setActive(false); + $EditChannelModerate = %c.flags & $CHANNEL_MODERATED; + + $EditChannelLimit = %c.flags & $CHANNEL_LIMITED; + ButtonChannelLimit.setActive(!%c.tribe && !$EditChannelInvite); + if ($EditChannelLimit) + { + EditChannelMaxMembers.setValue(%c.personLimit); + EditChannelMaxMembers.setActive(!%c.tribe && !$EditChannelInvite); + } + else + EditChannelMaxMembers.setActive(false); - $EditChannelKey = %c.flags & $CHANNEL_HAS_KEY; - ButtonChannelKey.setActive(!%c.tribe); - if ($EditChannelKey) - { - EditChannelPassword.setValue(%c.key); - EditChannelPassword.setActive(!%c.tribe); - } - else - EditChannelPassword.setActive(false); - - Canvas.pushDialog(ChannelOptionsDlg); + $EditChannelKey = %c.flags & $CHANNEL_HAS_KEY; + ButtonChannelKey.setActive(!%c.tribe); + if ($EditChannelKey) + { + EditChannelPassword.setValue(%c.key); + EditChannelPassword.setActive(!%c.tribe); + } + else + EditChannelPassword.setActive(false); + + Canvas.pushDialog(ChannelOptionsDlg); } //------------------------------------------------------------------------------ function ToggleChannelInvite() { - if ($EditChannelInvite) - { - ButtonChannelLimit.setActive(false); - EditChannelMaxMembers.setActive(false); - } - else - { - ButtonChannelLimit.setActive(true); - ToggleChannelLimit(); - } + if ($EditChannelInvite) + { + ButtonChannelLimit.setActive(false); + EditChannelMaxMembers.setActive(false); + } + else + { + ButtonChannelLimit.setActive(true); + ToggleChannelLimit(); + } } //------------------------------------------------------------------------------ function ToggleChannelLimit() { - EditChannelMaxMembers.setActive($EditChannelLimit); + EditChannelMaxMembers.setActive($EditChannelLimit); } //------------------------------------------------------------------------------ function ToggleChannelKey() { - EditChannelPassword.setActive($EditChannelKey); + EditChannelPassword.setActive($EditChannelKey); } //------------------------------------------------------------------------------ function CancelChannelOptions() { - Canvas.popDialog(ChannelOptionsDlg); - // remove temporarily created people - for (%i = 0; %i < $IRCClient::numBanned; %i++) - { - %p = $IRCClient::banList[%i]; - if (!%p.ref) - { - $IRCClient::people.remove(%p); - %p.delete(); - } - } + Canvas.popDialog(ChannelOptionsDlg); + // remove temporarily created people + for (%i = 0; %i < $IRCClient::numBanned; %i++) + { + %p = $IRCClient::banList[%i]; + if (!%p.ref) + { + $IRCClient::people.remove(%p); + %p.delete(); + } + } } //------------------------------------------------------------------------------ function AcceptChannelOptions() { - Canvas.popDialog(ChannelOptionsDlg); + Canvas.popDialog(ChannelOptionsDlg); - %c = ChannelOptionsDlg.channel; + %c = ChannelOptionsDlg.channel; - // undo bans and remove temporarily created people - for (%i = 0; %i < $IRCClient::numBanned; %i++) - { - %p = $IRCClient::banList[%i]; - if ($IRCClient::removeBan[%p]) - IRCClient::ban(%p,false); - if (!%p.ref) - { - $IRCClient::people.remove(%p); - %p.delete(); - } - } + // undo bans and remove temporarily created people + for (%i = 0; %i < $IRCClient::numBanned; %i++) + { + %p = $IRCClient::banList[%i]; + if ($IRCClient::removeBan[%p]) + IRCClient::ban(%p,false); + if (!%p.ref) + { + $IRCClient::people.remove(%p); + %p.delete(); + } + } - %t = EditChannelTopic.getValue(); - if (strcmp(%t,%c.topic)) - IRCClient::topic(%c,%t); + %t = EditChannelTopic.getValue(); + if (strcmp(%t,%c.topic)) + IRCClient::topic(%c,%t); - if ($EditChannelInvite != (%c.flags & $CHANNEL_INVITE)) - IRCClient::setInvite(%c,$EditChannelInvite); + if ($EditChannelInvite != (%c.flags & $CHANNEL_INVITE)) + IRCClient::setInvite(%c,$EditChannelInvite); - if ($EditChannelModerate != (%c.flags & $CHANNEL_MODERATED)) - IRCClient::setModerate(%c,$EditChannelModerate); - - if ($EditChannelLimit) - { - %l = EditChannelMaxMembers.getValue(); - if (!(%c.flags & $CHANNEL_LIMITED) || %l != %c.personLimit) - IRCClient::setLimit(%c,true,%l); - } - else - if (%c.flags @ $CHANNEL_LIMITED) - IRCClient::setLimit(%c,false,0); - - if ($EditChannelKey) - { - %k = EditChannelPassword.getValue(); - if (!(%c.flags & $CHANNEL_HAS_KEY) || strcmp(%k,%c.key)) - IRCClient::setKey(%c,true,%k); - } - else - if (%c.flags & $CHANNEL_HAS_KEY) - IRCClient::setKey(%c,false,""); + if ($EditChannelModerate != (%c.flags & $CHANNEL_MODERATED)) + IRCClient::setModerate(%c,$EditChannelModerate); + + if ($EditChannelLimit) + { + %l = EditChannelMaxMembers.getValue(); + if (!(%c.flags & $CHANNEL_LIMITED) || %l != %c.personLimit) + IRCClient::setLimit(%c,true,%l); + } + else + if (%c.flags @ $CHANNEL_LIMITED) + IRCClient::setLimit(%c,false,0); + + if ($EditChannelKey) + { + %k = EditChannelPassword.getValue(); + if (!(%c.flags & $CHANNEL_HAS_KEY) || strcmp(%k,%c.key)) + IRCClient::setKey(%c,true,%k); + } + else + if (%c.flags & $CHANNEL_HAS_KEY) + IRCClient::setKey(%c,false,""); } //======================================================================== @@ -672,67 +672,67 @@ function AcceptChannelOptions() //------------------------------------------------------------------------------ function EditChatOptions() { - $tempHighlightOn = $pref::IRCClient::HighlightOn; - ButtonChatHighlight.setValue($tempHighlightOn); + $tempHighlightOn = $pref::IRCClient::HighlightOn; + ButtonChatHighlight.setValue($tempHighlightOn); - $tempHideLinks = $pref::IRCClient::hideLinks; - ButtonChatNameLinkToggle.setValue($tempHideLinks); + $tempHideLinks = $pref::IRCClient::hideLinks; + ButtonChatNameLinkToggle.setValue($tempHideLinks); - //for now - ButtonChatShowJoin.setVisible(false); - ButtonChatChannelHighlight.setVisible(false); + //for now + ButtonChatShowJoin.setVisible(false); + ButtonChatChannelHighlight.setVisible(false); - EditChatAwayMessage.setValue($pref::IRCClient::awaymsg); - EditChatKickMessage.setValue($pref::IRCClient::kickmsg); - EditChatBanMessage.setValue($pref::IRCClient::banmsg); + EditChatAwayMessage.setValue($pref::IRCClient::awaymsg); + EditChatKickMessage.setValue($pref::IRCClient::kickmsg); + EditChatBanMessage.setValue($pref::IRCClient::banmsg); - Canvas.pushDialog(ChatOptionsDlg); + Canvas.pushDialog(ChatOptionsDlg); } //------------------------------------------------------------------------------ function acceptChatOptions() { - //error("Accepting Chat Options...."); - $pref::IRCClient::HighlightOn = $tempHighlightOn; + //error("Accepting Chat Options...."); + $pref::IRCClient::HighlightOn = $tempHighlightOn; - $pref::IRCClient::hideLinks = $tempHideLinks; + $pref::IRCClient::hideLinks = $tempHideLinks; - if($tempAwayMsg !$= "") - $pref::IRCClient::awaymsg = $tempAwayMsg; - else - $pref::IRCClient::awaymsg = $DefaultChatAwayMessage; - - if($tempkickmsg !$= "") - $pref::IRCClient::kickmsg = $tempkickmsg; - else - $pref::IRCClient::kickmsg = $DefaultChatKickMessage; - - if($tempbanmsg !$= "") - $pref::IRCClient::banmsg = $tempbanmsg; - else - $pref::IRCClient::banmsg = $DefaultChatBanMessage; - - canvas.popDialog(ChatOptionsDlg); + if($tempAwayMsg !$= "") + $pref::IRCClient::awaymsg = $tempAwayMsg; + else + $pref::IRCClient::awaymsg = $DefaultChatAwayMessage; + + if($tempkickmsg !$= "") + $pref::IRCClient::kickmsg = $tempkickmsg; + else + $pref::IRCClient::kickmsg = $DefaultChatKickMessage; + + if($tempbanmsg !$= "") + $pref::IRCClient::banmsg = $tempbanmsg; + else + $pref::IRCClient::banmsg = $DefaultChatBanMessage; + + canvas.popDialog(ChatOptionsDlg); } //------------------------------------------------------------------------------ function CancelChatOptions() { - canvas.popDialog(ChatOptionsDlg); + canvas.popDialog(ChatOptionsDlg); } //------------------------------------------------------------------------------ function ToggleChatHiglight() { - $tempHighlightOn = !$tempHighlightOn; - ButtonChatHighlight.setValue($tempHighlightOn); + $tempHighlightOn = !$tempHighlightOn; + ButtonChatHighlight.setValue($tempHighlightOn); } //------------------------------------------------------------------------------ function ToggleChatLinkedNicks() { - $tempHideLinks = !$tempHideLinks; - ButtonChatNameLinkToggle.setValue($tempHideLinks); + $tempHideLinks = !$tempHideLinks; + ButtonChatNameLinkToggle.setValue($tempHideLinks); } //------------------------------------------------------------------------------ @@ -742,52 +742,52 @@ function IRCClient::init() $IRCClient::people = new SimGroup(IRCPeople); $IRCClient::channels = new SimGroup(IRCChannels); - $IRCClient::connectwait = 0; + $IRCClient::connectwait = 0; $IRCClient::room = ""; $IRCClient::numCensorWords = 0; - $IRCClient::previousChannelCount = 0; + $IRCClient::previousChannelCount = 0; $IRCClient::people.add(new SimObject() - { - real = ""; - identity = ""; - nick = ""; - flags = 0; - ping = 0; - ref = 1; - }); - + { + real = ""; + identity = ""; + nick = ""; + flags = 0; + ping = 0; + ref = 1; + }); + $IRCClient::channels.add(new ChannelVector($CHANNEL_STATUS) - { - topic = "IRC Status"; - key = ""; - flags = 0; - personLimit = 0; - private = false; - tribe = false; - }); + { + topic = "IRC Status"; + key = ""; + flags = 0; + personLimit = 0; + private = false; + tribe = false; + }); } //------------------------------------------------------------------------------ function IRCClient::notify(%event) { - switch$(%event) - { - case IDIRC_CONNECTING_SOCKET: - case IDIRC_CONNECTED: - IRCClient::requestChannelList(); - case IDIRC_ERR_HOSTNAME: - MessageBoxOK("Bad Hostname","Could not resolve IRC server address " @ $IRCClient::server @ ".",""); - case IDIRC_ERR_TIMEOUT: - MessageBoxOK("No Response","Connection failed. The IRC server did not respond.",""); - case IDIRC_ERR_DROPPED: - MessageBoxOK("Connection Dropped","You have been disconnected from IRC server " @ $IRCClient::server @ ".",""); - case IDIRC_ERR_BADCHALLENGE: - case IDIRC_ERR_BADCHALRESP_REPLY: - case IDIRC_CHANNEL_LIST: - JoinChatList.clear(); - for (%i = 0; %i < $IRCClient::numChannels; %i++) - { + switch$(%event) + { + case IDIRC_CONNECTING_SOCKET: + case IDIRC_CONNECTED: + IRCClient::requestChannelList(); + case IDIRC_ERR_HOSTNAME: + MessageBoxOK("Bad Hostname","Could not resolve IRC server address " @ $IRCClient::server @ ".",""); + case IDIRC_ERR_TIMEOUT: + MessageBoxOK("No Response","Connection failed. The IRC server did not respond.",""); + case IDIRC_ERR_DROPPED: + MessageBoxOK("Connection Dropped","You have been disconnected from IRC server " @ $IRCClient::server @ ".",""); + case IDIRC_ERR_BADCHALLENGE: + case IDIRC_ERR_BADCHALRESP_REPLY: + case IDIRC_CHANNEL_LIST: + JoinChatList.clear(); + for (%i = 0; %i < $IRCClient::numChannels; %i++) + { switch$ ( $IRCClient::channelNames[%i] ) { case "#Tribes2": %temp = 3; @@ -795,108 +795,108 @@ function IRCClient::notify(%event) case "#Help": %temp = 1; default: %temp = 0; } - JoinChatList.addRow(%i, IRCClient::displayChannel( $IRCClient::channelNames[%i]) TAB $IRCClient::channelUsers[%i] TAB %temp ); + JoinChatList.addRow(%i, IRCClient::displayChannel( $IRCClient::channelNames[%i]) TAB $IRCClient::channelUsers[%i] TAB %temp ); JoinChatList.setRowStyle( %i, %temp > 0 ); - } - JoinChatList.sort(); + } + JoinChatList.sort(); JoinChatName.onCharInput(); - case IDIRC_CHANNEL_HAS_KEY: - KeyChannelName.setValue(IRCClient::displayChannel($IRCClient::keyChannel)); - Canvas.pushDialog(ChannelKeyDlg); - case IDIRC_ADDCHANNEL: - if (ChatTabView.tabCount() < $IRCClient::channels.getCount()) - ChatTabView.addTab($IRCClient::nextChannel, - IRCClient::displayChannel($IRCClient::nextChannel.getName()), - $IRCClient::nextChannel.private); - if ($IRCClient::nextChannel && !$IRCClient::nextChannel.private) - { - ChatTabView.setSelected($IRCClient::nextChannel); - $IRCClient::nextChannel = 0; - } - alxPlay(sButtonDown,0,0,0); - case IDIRC_JOIN: - %i = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); - ChatEditChannelBtn.setVisible($IRCClient::currentChannel.getFlags(%i) & $PERSON_OPERATOR); - ChatRoomMemberList_refresh($IRCClient::currentChannel); - case IDIRC_SORT: - %i = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); - ChatEditChannelBtn.setVisible($IRCClient::currentChannel.getFlags(%i) & $PERSON_OPERATOR); - ChatRoomMemberList_refresh($IRCClient::currentChannel); - case IDIRC_PART: - ChatRoomMemberList_refresh($IRCClient::currentChannel); - case IDIRC_KICK: - if ($IRCClient::nextChannel) - { - $IRCClient::attachedChannel = 0; - ChatTabView.setSelected($IRCClient::nextChannel); - $IRCClient::nextChannel = 0; - } - ChatTabView.removeTab($IRCClient::deletedChannel); - case IDIRC_INVITED: - //MessageBoxOKCancel("Invite", "You have been invited to channel " @ IRCClient::displayChannel($IRCClient::invitechannel) @ " by " @ $IRCClient::inviteperson @ ".", "IRCClient::join($IRCClient::invitechannel);"); - IRCClient::newMessage($IRCClient::CurrentChannel, "You have been invited to channel " @ $IRCClient::invitechannel @ " by " @ $IRCClient::inviteperson @ "."); - case IDIRC_BAN_LIST: - ChannelBannedList_refresh(); - case IDIRC_TOPIC: - ChatChannelTopic.setValue($IRCClient::currentChannel.topic); - case IDIRC_DELCHANNEL: - if ($IRCClient::nextChannel) - { - $IRCClient::attachedChannel = 0; - ChatTabView.setSelected($IRCClient::nextChannel); - $IRCClient::nextChannel = 0; - } - ChatTabView.removeTab($IRCClient::deletedChannel); + case IDIRC_CHANNEL_HAS_KEY: + KeyChannelName.setValue(IRCClient::displayChannel($IRCClient::keyChannel)); + Canvas.pushDialog(ChannelKeyDlg); + case IDIRC_ADDCHANNEL: + if (ChatTabView.tabCount() < $IRCClient::channels.getCount()) + ChatTabView.addTab($IRCClient::nextChannel, + IRCClient::displayChannel($IRCClient::nextChannel.getName()), + $IRCClient::nextChannel.private); + if ($IRCClient::nextChannel && !$IRCClient::nextChannel.private) + { + ChatTabView.setSelected($IRCClient::nextChannel); + $IRCClient::nextChannel = 0; + } + alxPlay(sButtonDown,0,0,0); + case IDIRC_JOIN: + %i = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); + ChatEditChannelBtn.setVisible($IRCClient::currentChannel.getFlags(%i) & $PERSON_OPERATOR); + ChatRoomMemberList_refresh($IRCClient::currentChannel); + case IDIRC_SORT: + %i = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); + ChatEditChannelBtn.setVisible($IRCClient::currentChannel.getFlags(%i) & $PERSON_OPERATOR); + ChatRoomMemberList_refresh($IRCClient::currentChannel); + case IDIRC_PART: + ChatRoomMemberList_refresh($IRCClient::currentChannel); + case IDIRC_KICK: + if ($IRCClient::nextChannel) + { + $IRCClient::attachedChannel = 0; + ChatTabView.setSelected($IRCClient::nextChannel); + $IRCClient::nextChannel = 0; + } + ChatTabView.removeTab($IRCClient::deletedChannel); + case IDIRC_INVITED: + //MessageBoxOKCancel("Invite", "You have been invited to channel " @ IRCClient::displayChannel($IRCClient::invitechannel) @ " by " @ $IRCClient::inviteperson @ ".", "IRCClient::join($IRCClient::invitechannel);"); + IRCClient::newMessage($IRCClient::CurrentChannel, "You have been invited to channel " @ $IRCClient::invitechannel @ " by " @ $IRCClient::inviteperson @ "."); + case IDIRC_BAN_LIST: + ChannelBannedList_refresh(); + case IDIRC_TOPIC: + ChatChannelTopic.setValue($IRCClient::currentChannel.topic); + case IDIRC_DELCHANNEL: + if ($IRCClient::nextChannel) + { + $IRCClient::attachedChannel = 0; + ChatTabView.setSelected($IRCClient::nextChannel); + $IRCClient::nextChannel = 0; + } + ChatTabView.removeTab($IRCClient::deletedChannel); - default: - echo("IRCClient: [NOTIFY] " @ %event); - } + default: + echo("IRCClient: [NOTIFY] " @ %event); + } } //------------------------------------------------------------------------------ function IRCClient::statusMessage(%message) { - //error("IRCClient::statusMessage( "@%message@" )"); + //error("IRCClient::statusMessage( "@%message@" )"); $IRCClient::channels.getObject(0).pushBackLine("[STATUS] " @ %message); } //------------------------------------------------------------------------------ function IRCClient::connecting() { - $IRCClient::connectwait++; - if ($IRCClient::connectwait > 1) - return; + $IRCClient::connectwait++; + if ($IRCClient::connectwait > 1) + return; - ChatChannelPane.setTitle("CONNECTING"); - JoinChatPane.setTitle("CONNECTING"); - ChannelBanPane.setTitle("CONNECTING"); + ChatChannelPane.setTitle("CONNECTING"); + JoinChatPane.setTitle("CONNECTING"); + ChannelBanPane.setTitle("CONNECTING"); } //------------------------------------------------------------------------------ function IRCClient::connected() { - if (!$IRCClient::connectwait) - return; + if (!$IRCClient::connectwait) + return; - $IRCClient::connectwait--; - if ($IRCClient::connectwait) - return; + $IRCClient::connectwait--; + if ($IRCClient::connectwait) + return; - ChatChannelPane.setTitle("CHAT"); - JoinChatPane.setTitle("CHOOSE CHAT CHANNEL"); - ChannelBanPane.setTitle("EDIT BAN LIST"); + ChatChannelPane.setTitle("CHAT"); + JoinChatPane.setTitle("CHOOSE CHAT CHANNEL"); + ChannelBanPane.setTitle("EDIT BAN LIST"); } //------------------------------------------------------------------------------ function IRCClient::newMessage(%channel,%message) { - %message = IRCClient::findChannelURL(%message); + %message = IRCClient::findChannelURL(%message); if (%channel == $IRCClient::channels.getObject(0) || - %channel $= "") + %channel $= "") $IRCClient::channels.getObject(0).pushBackLine(%message); - else - %channel.pushBackLine(%message); + else + %channel.pushBackLine(%message); } //------------------------------------------------------------------------------ @@ -906,71 +906,71 @@ function IRCClient::findPerson(%nick) { %person = $IRCClient::people.getObject(%i); if (%person.displayName $= %nick) - return %person; + return %person; } } //------------------------------------------------------------------------------ function IRCClient::findPerson2(%prefix,%create) { - // typical name - // Yakuza|!yakuzasama@pool032-max7.ds23-ca-us.dialup.earthlink.net - %prefix = nextToken(%prefix,nick," !"); - nextToken(%prefix,ident," "); + // typical name + // Yakuza|!yakuzasama@pool032-max7.ds23-ca-us.dialup.earthlink.net + %prefix = nextToken(%prefix,nick," !"); + nextToken(%prefix,ident," "); - if (strlen(%nick)) - { - if (getSubStr(%nick,0,1) $= "@" || getSubStr(%nick,0,1) $= "+") - %nick = getSubStr(%nick,1,strlen(%nick)-1); - if (strlen(%ident) && getSubStr(%ident,0,1) $= "~") - %ident = getSubStr(%ident,1,strlen(%ident)-1); + if (strlen(%nick)) + { + if (getSubStr(%nick,0,1) $= "@" || getSubStr(%nick,0,1) $= "+") + %nick = getSubStr(%nick,1,strlen(%nick)-1); + if (strlen(%ident) && getSubStr(%ident,0,1) $= "~") + %ident = getSubStr(%ident,1,strlen(%ident)-1); - // look 'em up - %p = IRCClient::findPerson(%nick); - if (%p) - { - if (strlen(%ident) && strcmp(%ident,%p.identity)) - { - IRCClient::setIdentity(%p,%ident); - IRCClient::correctNick(%p); - } + // look 'em up + %p = IRCClient::findPerson(%nick); + if (%p) + { + if (strlen(%ident) && strcmp(%ident,%p.identity)) + { + IRCClient::setIdentity(%p,%ident); + IRCClient::correctNick(%p); + } - return %p; - } - - if (%create) - { - %p = new SimObject() - { - real = ""; - identity = ""; - nick = ""; - flags = 0; - ping = 0; - ref = 0; + return %p; + } + + if (%create) + { + %p = new SimObject() + { + real = ""; + identity = ""; + nick = ""; + flags = 0; + ping = 0; + ref = 0; displayName = %nick; - }; - IRCClient::setIdentity(%p,%ident); - $IRCClient::people.add(%p); + }; + IRCClient::setIdentity(%p,%ident); + $IRCClient::people.add(%p); - %c = IRCClient::findChannel(%nick); - if (%c && %c.numMembers != 2) - { - IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has reconnected."); - %c.addMember(%p,IRCClient::taggedNick(%p)); - %p.ref++; - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_JOIN); - } + %c = IRCClient::findChannel(%nick); + if (%c && %c.numMembers != 2) + { + IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has reconnected."); + %c.addMember(%p,IRCClient::taggedNick(%p)); + %p.ref++; + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_JOIN); + } - // initiate WHO do determine username - //if (!strlen(%ident) && %p != $IRCClient::people.getObject(1) && - //getSubStr(%nick,strlen(%nick)-1,1) $= "^") - //IRCClient::whois(%p); + // initiate WHO do determine username + //if (!strlen(%ident) && %p != $IRCClient::people.getObject(1) && + //getSubStr(%nick,strlen(%nick)-1,1) $= "^") + //IRCClient::whois(%p); - return %p; - } - } + return %p; + } + } } //------------------------------------------------------------------------------ @@ -979,7 +979,7 @@ function IRCClient::doEscapes(%string) // escape spaces while ((%i = strpos(%string," ")) != -1) %string = getSubStr(%string,0,%i) @ $ESCAPE_SEQ @ "01" @ - getSubStr(%string,%i+1,strlen(%string)-(%i+1)); + getSubStr(%string,%i+1,strlen(%string)-(%i+1)); return %string; } @@ -992,26 +992,26 @@ function IRCClient::undoEscapes(%string) %search = %string; while ((%i = strpos(%search,$ESCAPE_SEQ)) != -1) { - %code = getSubStr(%search,%i+%esclen,2); - switch$(%code) - { - case "01": - %replace = " "; - } + %code = getSubStr(%search,%i+%esclen,2); + switch$(%code) + { + case "01": + %replace = " "; + } %string = getSubStr(%string,0,%offset+%i) @ %replace @ - getSubStr(%string,%offset+%i+%esclen+2, - strlen(%string)-(%offset+%i+%esclen+2)); - %search = getSubStr(%string,%offset,strlen(%string)-%offset); - } + getSubStr(%string,%offset+%i+%esclen+2, + strlen(%string)-(%offset+%i+%esclen+2)); + %search = getSubStr(%string,%offset,strlen(%string)-%offset); + } - return %string; + return %string; } //------------------------------------------------------------------------------ function IRCClient::setIdentity(%p,%ident) { - %p.identity = %ident; + %p.identity = %ident; %nick = %p.displayName; if (strpos(%nick, "^") != -1) { @@ -1022,20 +1022,20 @@ function IRCClient::setIdentity(%p,%ident) %p.untagged = %name; if (%tag $= "") { - %p.nick = %name; - %p.tagged = "" @ %name @ ""; + %p.nick = %name; + %p.tagged = "" @ %name @ ""; } else - if(%append) - { - %p.nick = %name @ %tag; - %p.tagged = "" @ %name @ "" @ %tag @ ""; - } - else - { - %p.nick = %tag @ %name; - %p.tagged = "" @ %tag @ "" @ %name @ ""; - } + if(%append) + { + %p.nick = %name @ %tag; + %p.tagged = "" @ %name @ "" @ %tag @ ""; + } + else + { + %p.nick = %tag @ %name; + %p.tagged = "" @ %tag @ "" @ %name @ ""; + } } else { @@ -1048,7 +1048,7 @@ function IRCClient::displayNick(%person) { // identity is set and user is WON-authenticated if (strlen(%person.nick)) - return %person.nick; + return %person.nick; else return %person.displayName; } @@ -1060,10 +1060,10 @@ function IRCClient::taggedNick(%person) //error("IRCClient::taggedNick( "@%person@" )"); // identity is set and user is WON-authenticated if (strlen(%person.nick)) - if($pref::IRCClient::hideLinks) - return %person.nick; - else - return %person.tagged; + if($pref::IRCClient::hideLinks) + return %person.nick; + else + return %person.tagged; else return %person.displayName; } @@ -1071,29 +1071,29 @@ function IRCClient::taggedNick(%person) //------------------------------------------------------------------------------ function IRCClient::correctNick(%p) { - for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) - { - %c = $IRCClient::channels.getObject(%i); - if (%c.getName() $= %p.displayName) - { - ChatTabView.setTabText(%c,IRCClient::displayNick(%p)); - %c.topic = "Private chat with" SPC IRCClient::displayNick(%p); - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_TOPIC); - } + for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) + { + %c = $IRCClient::channels.getObject(%i); + if (%c.getName() $= %p.displayName) + { + ChatTabView.setTabText(%c,IRCClient::displayNick(%p)); + %c.topic = "Private chat with" SPC IRCClient::displayNick(%p); + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_TOPIC); + } - %mi = %c.findMember(%p); - if (%mi >= 0) - { - %c.setMemberNick(%mi,IRCClient::taggedNick(%p)); - %c.sort(); - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_SORT); - } - else - if (%c == $IRCClient::banChannel) - IRCClient::notify(IDIRC_BAN_LIST); - } + %mi = %c.findMember(%p); + if (%mi >= 0) + { + %c.setMemberNick(%mi,IRCClient::taggedNick(%p)); + %c.sort(); + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_SORT); + } + else + if (%c == $IRCClient::banChannel) + IRCClient::notify(IDIRC_BAN_LIST); + } } //------------------------------------------------------------------------------ @@ -1105,65 +1105,65 @@ function IRCClient::findChannel(%name,%create) for (%i = 0; %i < $IRCClient::channels.getCount(); %i++) { - %c = $IRCClient::channels.getObject(%i); + %c = $IRCClient::channels.getObject(%i); if (%c.getName() $= %name) return %c; } if (%create) { - %topic = ""; - %flags = $CHANNEL_NEW; - %private = false; - for (%i = 0; %i < $IRCClient::numChannels; %i++) - if (%name $= $IRCClient::channelNames[%i]) - { - %topic = $IRCClient::channelTopics[%i]; + %topic = ""; + %flags = $CHANNEL_NEW; + %private = false; + for (%i = 0; %i < $IRCClient::numChannels; %i++) + if (%name $= $IRCClient::channelNames[%i]) + { + %topic = $IRCClient::channelTopics[%i]; - break; - } + break; + } - if (strcmp(getSubStr(%name,0,1),"#") && strcmp(getSubStr(%name,0,1),"&")) + if (strcmp(getSubStr(%name,0,1),"#") && strcmp(getSubStr(%name,0,1),"&")) { %p = IRCClient::findPerson(%name); %topic = "Private chat with " @ IRCClient::displayNick(%p); %flags = %flags | $CHANNEL_PRIVATE; - %private = true; - } - %l = strlen(%name); - %tribe = (%l > 7 && strcmp(getSubStr(%name,%l-7,7),"_Public") == 0) || - (%l > 8 && strcmp(getSubStr(%name,%l-8,8),"_Private") == 0); + %private = true; + } + %l = strlen(%name); + %tribe = (%l > 7 && strcmp(getSubStr(%name,%l-7,7),"_Public") == 0) || + (%l > 8 && strcmp(getSubStr(%name,%l-8,8),"_Private") == 0); %c = new ChannelVector(%name) - { - topic = %topic; - key = $IRCClient::key; - flags = $CHANNEL_NEW; - personLimit = 0; - private = %private; - tribe = %tribe; - }; - $IRCClient::channels.add(%c); + { + topic = %topic; + key = $IRCClient::key; + flags = $CHANNEL_NEW; + personLimit = 0; + private = %private; + tribe = %tribe; + }; + $IRCClient::channels.add(%c); if (%c.private) { - %me = $IRCClient::people.getObject(0); - %c.addMember(%me,IRCClient::taggedNick(%me)); - %me.ref++; - %c.addMember(%p,IRCClient::taggedNick(%p)); - %p.ref++; + %me = $IRCClient::people.getObject(0); + %c.addMember(%me,IRCClient::taggedNick(%me)); + %me.ref++; + %c.addMember(%p,IRCClient::taggedNick(%p)); + %p.ref++; - $IRCClient::nextChannel = %c; - IRCClient::notify(IDIRC_ADDCHANNEL); - } - else - { - %messages = %name @ "_messages"; - if (isobject(%messages)) - { - for (%i = 0; %i < %messages.getNumLines(); %i++) - %c.pushBackLine(%messages.getLineText(%i)); + $IRCClient::nextChannel = %c; + IRCClient::notify(IDIRC_ADDCHANNEL); + } + else + { + %messages = %name @ "_messages"; + if (isobject(%messages)) + { + for (%i = 0; %i < %messages.getNumLines(); %i++) + %c.pushBackLine(%messages.getLineText(%i)); - %messages.delete(); - } - } + %messages.delete(); + } + } return %c; } @@ -1173,15 +1173,15 @@ function IRCClient::findChannel(%name,%create) function IRCClient::displayChannel(%channel) { if (getSubStr(%channel,0,1) $= "#" || getSubStr(%channel,0,1) $= "&") - return IRCClient::undoEscapes(getSubStr(%channel,1,strlen(%channel)-1)); + return IRCClient::undoEscapes(getSubStr(%channel,1,strlen(%channel)-1)); else - return IRCClient::displayNick(IRCClient::findPerson(%channel)); + return IRCClient::displayNick(IRCClient::findPerson(%channel)); } //------------------------------------------------------------------------------ function IRCClient::channelName(%channel) { - %channel = IRCClient::doEscapes(%channel); // escape spaces + %channel = IRCClient::doEscapes(%channel); // escape spaces if (getSubStr(%channel,0,1) $= "#") return %channel; @@ -1198,18 +1198,18 @@ function IRCClient::reset() $IRCClient::numChannels = 0; while ($IRCClient::channels.getCount() > 1) { - %channel = $IRCClient::channels.getObject(1); - $IRCClient::channels.remove(%channel); - %channel.delete(); + %channel = $IRCClient::channels.getObject(1); + $IRCClient::channels.remove(%channel); + %channel.delete(); } $IRCClient::currentChannel = $IRCClient::channels.getObject(0); // Delete everyone except myself while ($IRCClient::people.getCount() > 1) { - %person = $IRCClient::people.getObject(1); - $IRCClient::people.remove(%person); - %person.delete(); + %person = $IRCClient::people.getObject(1); + $IRCClient::people.remove(%person); + %person.delete(); } } @@ -1217,23 +1217,23 @@ function IRCClient::reset() function IRCClient::connect() { if (strcmp($IRCClient::state,IDIRC_CONNECTING_WAITING)) - { - IRCClient::disconnect(); + { + IRCClient::disconnect(); $IRCClient::serverIndex++; - if ($IRCClient::serverIndex >= $IRCClient::serverCount) - $IRCClient::serverIndex = 0; - $IRCClient::serverAttempt++; - if ($IRCClient::serverAttempt > $IRCClient::serverCount) - { - $IRCClient::serverAttempt = 0; - $IRCClient::retries++; + if ($IRCClient::serverIndex >= $IRCClient::serverCount) + $IRCClient::serverIndex = 0; + $IRCClient::serverAttempt++; + if ($IRCClient::serverAttempt > $IRCClient::serverCount) + { + $IRCClient::serverAttempt = 0; + $IRCClient::retries++; - if ($IRCClient::retries > 5) - { + if ($IRCClient::retries > 5) + { IRCClient::newMessage("","Unable to connect to IRC servers."); IRCClient::notify(IDIRC_ERR_TIMEOUT); $IRCClient::state = IDIRC_DISCONNECTED; - $IRCClient::retries = 0; + $IRCClient::retries = 0; if($IRCClient::serverCount > 1) $IRCClient::serverIndex = getRandom($IRCClient::serverCount-1)-1; else @@ -1241,19 +1241,19 @@ function IRCClient::connect() return; } - } + } if($IRCTestServer !$= "") $IRCClient::server = $IRCTestServer; else $IRCClient::server = getField(getRecord($IRCClient::serverList, $IRCClient::serverIndex), 0); - IRCClient::newMessage("","Connecting to " @ $IRCClient::server); - $IRCClient::state = IDIRC_CONNECTING_SOCKET; - IRCClient::notify(IDIRC_CONNECTING_SOCKET); + IRCClient::newMessage("","Connecting to " @ $IRCClient::server); + $IRCClient::state = IDIRC_CONNECTING_SOCKET; + IRCClient::notify(IDIRC_CONNECTING_SOCKET); $IRCClient::tcp.connect($IRCClient::server); - } + } } //------------------------------------------------------------------------------ @@ -1269,8 +1269,26 @@ function IRCTCP::onConnected(%this) { IRCClient::newMessage("","Established TCP/IP connection"); %me = $IRCClient::people.getObject(0); - IRCClient::send("CERT " @ WONLoginIRC()); - $IRCClient::state = IDIRC_CONNECTING_WAITING; + + $NextDatabaseQueryId++; + %id = $NextDatabaseQueryId; + + %args = WONLoginIRC(); + + // split the cert into chunks + %len = strlen(%args); + %i = 0; + while((%i+400) < %len) + { + %msg = getSubStr(%args, %i, 400); + IRCClient::send("dbqa" SPC %id SPC ":" @ %msg); + %i += 400; + } + %msg = getSubStr(%args, %i, 400); + + IRCClient::send("CERT " @ %msg); + $IRCClient::state = IDIRC_CONNECTING_WAITING; + } //------------------------------------------------------------------------------ @@ -1297,7 +1315,7 @@ function IRCTCP::onConnectFailed(%this) { IRCClient::newMessage("","Connection failed. The server did not respond."); - IRCClient::connect(); + IRCClient::connect(); } } @@ -1306,56 +1324,56 @@ function IRCClient::reconnect() { if (!$pref::IRCClient::autoreconnect) return (false); - - %i = 0; - while ($IRCClient::channels.getCount() > 1) - { - %c = $IRCClient::channels.getObject(1); + + %i = 0; + while ($IRCClient::channels.getCount() > 1) + { + %c = $IRCClient::channels.getObject(1); - if (%c.private) - { - %c.delete(); - $IRCClient::deletedChannel = %c; - if ($IRCClient::currentChannel == %c) - $IRCClient::nextChannel = $IRCClient::channels.getObject(0); - IRCClient::notify(IDIRC_DELCHANNEL); + if (%c.private) + { + %c.delete(); + $IRCClient::deletedChannel = %c; + if ($IRCClient::currentChannel == %c) + $IRCClient::nextChannel = $IRCClient::channels.getObject(0); + IRCClient::notify(IDIRC_DELCHANNEL); - continue; - } + continue; + } - $IRCClient::previousChannel[%i] = %c.getName(); - $IRCClient::previousKey[%i] = %c.key; + $IRCClient::previousChannel[%i] = %c.getName(); + $IRCClient::previousKey[%i] = %c.key; - %messages = $IRCClient::previousChannel[%i] @ "_messages"; - if (isobject(%messages)) - %messages.delete(); - %m = new MessageVector(%messages); + %messages = $IRCClient::previousChannel[%i] @ "_messages"; + if (isobject(%messages)) + %messages.delete(); + %m = new MessageVector(%messages); - for (%j = 0; %j < %c.getNumLines(); %j++) - %m.pushBackLine(%c.getLineText(%j)); + for (%j = 0; %j < %c.getNumLines(); %j++) + %m.pushBackLine(%c.getLineText(%j)); - $IRCClient::channels.remove(%c); - for (%j = 0; %j < %c.numMembers(); %j++) - { - %m = %c.getMemberId(%j); - %m.ref--; - if (%m.ref == 0) - { - $IRCClient::people.remove(%m); - %m.delete(); - } - } - %c.delete(); - $IRCClient::deletedChannel = %c; - if ($IRCClient::currentChannel == %c) - $IRCClient::nextChannel = $IRCClient::channels.getObject(0); - IRCClient::notify(IDIRC_DELCHANNEL); + $IRCClient::channels.remove(%c); + for (%j = 0; %j < %c.numMembers(); %j++) + { + %m = %c.getMemberId(%j); + %m.ref--; + if (%m.ref == 0) + { + $IRCClient::people.remove(%m); + %m.delete(); + } + } + %c.delete(); + $IRCClient::deletedChannel = %c; + if ($IRCClient::currentChannel == %c) + $IRCClient::nextChannel = $IRCClient::channels.getObject(0); + IRCClient::notify(IDIRC_DELCHANNEL); - %i++; - } - $IRCClient::previousChannelCount = %i; + %i++; + } + $IRCClient::previousChannelCount = %i; - IRCClient::newMessage("","Attempting to reconnect."); + IRCClient::newMessage("","Attempting to reconnect."); IRCClient::connect(); @@ -1365,11 +1383,11 @@ function IRCClient::reconnect() //------------------------------------------------------------------------------ function IRCClient::disconnect() { - if ($IRCClient::awaytimeout) - { - cancel($IRCClient::awaytimeout); - $IRCClient::awaytimeout = 0; - } + if ($IRCClient::awaytimeout) + { + cancel($IRCClient::awaytimeout); + $IRCClient::awaytimeout = 0; + } $IRCClient::state = IDIRC_DISCONNECTED; @@ -1382,10 +1400,31 @@ function IRCClient::disconnect() } //------------------------------------------------------------------------------ -function IRCClient::relogin() +function IRCClient::relogin() { - IRCClient::newMessage("","IRCClient: Reauthentication starting"); - IRCClient::send("CERT " @ WONLoginIRC()); + if($IRCClient::state !$= IDIRC_CONNECTED) + IRCClient::connect(); + + IRCClient::newMessage("","IRCClient: Reauthentication starting"); + + $NextDatabaseQueryId++; + %id = $NextDatabaseQueryId; + + %args = WONLoginIRC(); + + // split the cert into chunks + %len = strlen(%args); + %i = 0; + while((%i+400) < %len) + { + %msg = getSubStr(%args, %i, 400); + IRCClient::send("dbqa" SPC %id SPC ":" @ %msg); + %i += 400; + } + %msg = getSubStr(%args, %i, 400); + + IRCClient::send("CERT " @ %msg); + $IRCClient::state = IDIRC_CONNECTING_WAITING; } //------------------------------------------------------------------------------ @@ -1434,17 +1473,17 @@ function IRCClient::processLine(%line) { // check for prefix if (getSubStr(%src,0,1) $= ":") - %src = nextToken(getSubStr(%src,1,strlen(%src)-1),prefix," "); + %src = nextToken(getSubStr(%src,1,strlen(%src)-1),prefix," "); - // this is the command - %src = nextToken(%src,command," :"); + // this is the command + %src = nextToken(%src,command," :"); - // followed by its params - %src = nextToken(%src,params,""); + // followed by its params + %src = nextToken(%src,params,""); - if (!IRCClient::dispatch(%prefix,%command,%params)) + if (!IRCClient::dispatch(%prefix,%command,%params)) { - //echo("IRCClient: " @ %command @ " not handled by dispatch!"); + //echo("IRCClient: " @ %command @ " not handled by dispatch!"); //echo("(cmd:) " @ %prefix @ " " @ %command @ " " @ %params); } } @@ -1456,112 +1495,112 @@ function IRCClient::dispatch(%prefix,%command,%params) switch$(%command) { case "PING": - IRCClient::onPing(%prefix,%params); - case "PONG": - IRCClient::onPong(%prefix,%params); - case "PRIVMSG": - IRCClient::onPrivMsg(%prefix,%params); - case "JOIN": - IRCClient::onJoin(%prefix,%params); - case "NICK": - IRCClient::onNick(%prefix,%params); - case "QUIT": - IRCClient::onQuit(%prefix,%params); - case "ERROR": - IRCClient::onError(%prefix,%params); - case "TOPIC": - IRCClient::onTopic(%prefix,%params); - case "PART": - IRCClient::onPart(%prefix,%params); - case "KICK": - IRCClient::onKick(%prefix,%params); - case "MODE": - IRCClient::onMode(%prefix,%params); - case "AWAY": - IRCClient::onAway(%prefix,%params); - case "NOTICE": - IRCClient::onNotice(%prefix,%params); - case "VERSION": - IRCClient::onVersion(%prefix,%params); - case "ACTION": - IRCClient::onAction(%prefix,%params); - case "INVITE": - IRCClient::onInvite(%prefix,%params); + IRCClient::onPing(%prefix,%params); + case "PONG": + IRCClient::onPong(%prefix,%params); + case "PRIVMSG": + IRCClient::onPrivMsg(%prefix,%params); + case "JOIN": + IRCClient::onJoin(%prefix,%params); + case "NICK": + IRCClient::onNick(%prefix,%params); + case "QUIT": + IRCClient::onQuit(%prefix,%params); + case "ERROR": + IRCClient::onError(%prefix,%params); + case "TOPIC": + IRCClient::onTopic(%prefix,%params); + case "PART": + IRCClient::onPart(%prefix,%params); + case "KICK": + IRCClient::onKick(%prefix,%params); + case "MODE": + IRCClient::onMode(%prefix,%params); + case "AWAY": + IRCClient::onAway(%prefix,%params); + case "NOTICE": + IRCClient::onNotice(%prefix,%params); + case "VERSION": + IRCClient::onVersion(%prefix,%params); + case "ACTION": + IRCClient::onAction(%prefix,%params); + case "INVITE": + IRCClient::onInvite(%prefix,%params); - case "301": - IRCClient::onAwayReply(%prefix,%params); - case "305": - IRCClient::onUnAwayReply(%prefix,%params); - case "306": - IRCClient::onNowAwayReply(%prefix,%params); - case "311": - IRCClient::onWhoisUserReply(%prefix,%params); - case "312": - IRCClient::onWhoisReply(%prefix,%params); - case "318": - IRCClient::onWhoisReply(%prefix,%params); - case "319": - IRCClient::onWhoisReply(%prefix,%params); - case "315": - IRCClient::onEndOfWho(%prefix,%params); - case "317": - IRCClient::onWhoisIdle(%prefix,%params); - - case "322": - IRCClient::onList(%prefix,%params); - case "323": - IRCClient::onListEnd(%prefix,%params); - case "324": - IRCClient::onModeReply(%prefix,%params); - case "331": - IRCClient::onNoTopic(%prefix,%params); - case "332": - IRCClient::onTopic(%prefix,%params); + case "301": + IRCClient::onAwayReply(%prefix,%params); + case "305": + IRCClient::onUnAwayReply(%prefix,%params); + case "306": + IRCClient::onNowAwayReply(%prefix,%params); + case "311": + IRCClient::onWhoisUserReply(%prefix,%params); + case "312": + IRCClient::onWhoisReply(%prefix,%params); + case "318": + IRCClient::onWhoisReply(%prefix,%params); + case "319": + IRCClient::onWhoisReply(%prefix,%params); + case "315": + IRCClient::onEndOfWho(%prefix,%params); + case "317": + IRCClient::onWhoisIdle(%prefix,%params); + + case "322": + IRCClient::onList(%prefix,%params); + case "323": + IRCClient::onListEnd(%prefix,%params); + case "324": + IRCClient::onModeReply(%prefix,%params); + case "331": + IRCClient::onNoTopic(%prefix,%params); + case "332": + IRCClient::onTopic(%prefix,%params); - case "341": - IRCClient::onInviteReply(%prefix,%params); + case "341": + IRCClient::onInviteReply(%prefix,%params); - case "352": - IRCClient::onWhoReply(%prefix,%params); - case "353": - IRCClient::onNameReply(%prefix,%params); - case "367": - IRCClient::onBanList(%prefix,%params); - case "368": - IRCClient::onBanListEnd(%prefix,%params); - case "372": - IRCClient::onMOTD(%prefix,%params); - case "376": - IRCClient::onMOTDEnd(%prefix,%params); - case "401": - IRCClient::onNoSuchNick(%prefix,%params); - case "422": - IRCClient::onMOTDEnd(%prefix,%params); - case "433": - IRCClient::onBadNick(%prefix,%params); - case "444": - IRCClient::onNoLogin(%prefix,%params); - case "465": - IRCClient::onServerBanned(%prefix,%params); - case "468": - IRCClient::onInvalidNick(%prefix,%params); - case "471": - IRCClient::onChannelFull(%prefix,%params); - case "473": - IRCClient::onChannelInviteOnly(%prefix,%params); - case "474": - IRCClient::onChannelBanned(%prefix,%params); - case "475": - IRCClient::onBadChannelKey(%prefix,%params); + case "352": + IRCClient::onWhoReply(%prefix,%params); + case "353": + IRCClient::onNameReply(%prefix,%params); + case "367": + IRCClient::onBanList(%prefix,%params); + case "368": + IRCClient::onBanListEnd(%prefix,%params); + case "372": + IRCClient::onMOTD(%prefix,%params); + case "376": + IRCClient::onMOTDEnd(%prefix,%params); + case "401": + IRCClient::onNoSuchNick(%prefix,%params); + case "422": + IRCClient::onMOTDEnd(%prefix,%params); + case "433": + IRCClient::onBadNick(%prefix,%params); + case "444": + IRCClient::onNoLogin(%prefix,%params); + case "465": + IRCClient::onServerBanned(%prefix,%params); + case "468": + IRCClient::onInvalidNick(%prefix,%params); + case "471": + IRCClient::onChannelFull(%prefix,%params); + case "473": + IRCClient::onChannelInviteOnly(%prefix,%params); + case "474": + IRCClient::onChannelBanned(%prefix,%params); + case "475": + IRCClient::onBadChannelKey(%prefix,%params); - case "CHALLENGE": - IRCClient::onChallenge(%prefix,%params); - case "CHALRESP_REPLY": - IRCClient::onChalRespReply(%prefix,%params); + case "CHALLENGE": + IRCClient::onChallenge(%prefix,%params); + case "CHALRESP_REPLY": + IRCClient::onChalRespReply(%prefix,%params); case "DBMSG": HandleDatabaseProxyResponse(%prefix, %params); - default: - return false; + default: + return false; } return true; @@ -1576,27 +1615,27 @@ function IRCClient::onPing(%prefix,%params) { $IRCClient::lastPinged = %time; - if (strlen(%prefix)) - { - nextToken(%prefix,nick,"!"); - %p = IRCClient::findPerson(%nick); + if (strlen(%prefix)) + { + nextToken(%prefix,nick,"!"); + %p = IRCClient::findPerson(%nick); - if (%p) - if (%p.ping) - { - IRCClient::newMessage($IRCClient::currentChannel, - IRCClient::taggedNick(%p) @ " roundtrip delay: " @ (%time-%p.ping)/1000 @ " seconds."); - %p.ping = 0; - } - else - { - %params = nextToken(%params,nick," :"); - nextToken(%params,key," \x01"); - IRCClient::send("NOTICE " @ %nick @ " :\x01PING " @ %key); - } - } - else - IRCClient::send("PONG " @ %params); + if (%p) + if (%p.ping) + { + IRCClient::newMessage($IRCClient::currentChannel, + IRCClient::taggedNick(%p) @ " roundtrip delay: " @ (%time-%p.ping)/1000 @ " seconds."); + %p.ping = 0; + } + else + { + %params = nextToken(%params,nick," :"); + nextToken(%params,key," \x01"); + IRCClient::send("NOTICE " @ %nick @ " :\x01PING " @ %key); + } + } + else + IRCClient::send("PONG " @ %params); } } @@ -1608,8 +1647,8 @@ function IRCClient::onPong(%prefix,%params) if (%p && %p.ping) { IRCClient::newMessage($IRCClient::currentChannel, - IRCClient::taggedNick(%p) @ " roundtrip delay: " @ (getSimTime()-%p.ping)/1000 @ " seconds."); - %p.ping = 0; + IRCClient::taggedNick(%p) @ " roundtrip delay: " @ (getSimTime()-%p.ping)/1000 @ " seconds."); + %p.ping = 0; } } @@ -1621,8 +1660,8 @@ function IRCClient::onJoin(%prefix,%params) if (%c.addMember(%p,IRCClient::taggedNick(%p))) { - %p.ref++; - IRCClient::notify(IDIRC_JOIN); + %p.ref++; + IRCClient::notify(IDIRC_JOIN); } if ($pref::IRCClient::showJoin && !(%p.flags & $PERSON_IGNORE)) IRCClient::newMessage(%c,"\c4"@IRCClient::taggedNick(%p) @ " has joined the conversation."); @@ -1630,16 +1669,16 @@ function IRCClient::onJoin(%prefix,%params) // if this is me then set this as the current channel if (%p == $IRCClient::people.getObject(0)) { - $IRCClient::nextChannel = %c; - IRCClient::notify(IDIRC_ADDCHANNEL); + $IRCClient::nextChannel = %c; + IRCClient::notify(IDIRC_ADDCHANNEL); - IRCClient::send("MODE " @ %c.getName()); - - // this is a hack, the list isnt being rebuilt right away but it is if you give it a half second - schedule(500, 0, chatRoomMemberList_rebuild); + IRCClient::send("MODE " @ %c.getName()); + + // this is a hack, the list isnt being rebuilt right away but it is if you give it a half second + schedule(500, 0, chatRoomMemberList_rebuild); //error("rebuilt by onJoin"); } - IRCClient::connected(); + IRCClient::connected(); } //------------------------------------------------------------------------------ @@ -1653,10 +1692,10 @@ function IRCClient::onPrivMsg(%prefix,%params) if (getSubStr(%msg,0,1) $= ":") %msg = getSubStr(%msg,1,strlen(%msg)-1); - // should we highlight this message - if($pref::IRCClient::highlightOn) - %msg = IRCClient::nickHighLight(%msg); - + // should we highlight this message + if($pref::IRCClient::highlightOn) + %msg = IRCClient::nickHighLight(%msg); + %nick = %ch; if (getSubStr(%ch,0,1) $= "@" || getSubStr(%ch,0,1) $= "+") %nick = getSubStr(%nick,1,strlen(%nick)-1); @@ -1665,10 +1704,10 @@ function IRCClient::onPrivMsg(%prefix,%params) if (strcmp(getSubStr(%msg,0,1),"\x01")) { - // are we IGNORING this person? - %p = IRCClient::findPerson2(%prefix,true); - if (%p && (%p.flags & $PERSON_IGNORE)) - return; + // are we IGNORING this person? + %p = IRCClient::findPerson2(%prefix,true); + if (%p && (%p.flags & $PERSON_IGNORE)) + return; %c = IRCClient::findChannel(%ch, true); if ( !%c ) @@ -1686,26 +1725,26 @@ function IRCClient::onPrivMsg(%prefix,%params) //------------------------------------------------------------------------------ function IRCClient::findChannelURL(%msg) { - %numWords = getWordCount(%msg); - for(%i = 0; %i < %numWords; %i++) - { - %word = getWord(%msg, %i); - %firstLetter = getSubStr(%word, 0, 1); + %numWords = getWordCount(%msg); + for(%i = 0; %i < %numWords; %i++) + { + %word = getWord(%msg, %i); + %firstLetter = getSubStr(%word, 0, 1); - if(%firstLetter $= "#") - { - // this is a fake server link that will get parsed to an - // IRCClient::join by the urlCallback hack - %newWord = ""@ IRCClient::displayChannel(%word)@""; - %word = %newWord; - } - - if(%newText $= "") - %newText = %word; - else %newText = %newText SPC %word; - } - - return %newText; + if(%firstLetter $= "#") + { + // this is a fake server link that will get parsed to an + // IRCClient::join by the urlCallback hack + %newWord = ""@ IRCClient::displayChannel(%word)@""; + %word = %newWord; + } + + if(%newText $= "") + %newText = %word; + else %newText = %newText SPC %word; + } + + return %newText; } //------------------------------------------------------------------------------ @@ -1721,7 +1760,7 @@ function IRCClient::onNick(%prefix,%params) %channel = IRCClient::findChannel(%person.getName()); if (%channel) - %channel.setName(%params); + %channel.setName(%params); %person.setName(%params); @@ -1740,24 +1779,24 @@ function IRCClient::onQuit(%prefix,%params) { // For every channel for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) - { - %c = $IRCClient::channels.getObject(%i); - if (%c.removeMember(%p)) - { - if (!(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage(%c,"\c4" @ IRCClient::taggedNick(%p) @ " has disconnected from IRC."); - if (%c == $IRCClient::currentChannel) - { - IRCClient::notify(IDIRC_PART); - //IRCClient::part(%c.getName()); - } + { + %c = $IRCClient::channels.getObject(%i); + if (%c.removeMember(%p)) + { + if (!(%p.flags & $PERSON_IGNORE)) + IRCClient::newMessage(%c,"\c4" @ IRCClient::taggedNick(%p) @ " has disconnected from IRC."); + if (%c == $IRCClient::currentChannel) + { + IRCClient::notify(IDIRC_PART); + //IRCClient::part(%c.getName()); + } - } - } + } + } - // clean up the Person - $IRCClient::people.remove(%p); - %p.delete(); + // clean up the Person + $IRCClient::people.remove(%p); + %p.delete(); } } @@ -1766,7 +1805,7 @@ function IRCClient::onError(%prefix,%params) { IRCClient::newMessage($IRCClient::currentChannel,%params); IRCClient::notify(IDIRC_ERROR); - IRCClient::disconnect(); + IRCClient::disconnect(); IRCClient::connect(); } @@ -1797,23 +1836,23 @@ function IRCClient::onMOTDEnd(%prefix, %params) //------------------------------------------------------------------------------ function IRCClient::onNoSuchNick(%prefix,%params) { - %params = nextToken(%params,me," "); - nextToken(%params,nick," :"); + %params = nextToken(%params,me," "); + nextToken(%params,nick," :"); - %c = IRCClient::findChannel(%nick); - if (%c && %c.private) - { - %p = IRCClient::findPerson(%nick); - if (%p) - { - if (!(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has disconnected from IRC."); - %c.removeMember(%p); - %p.delete(); - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_PART); - } - } + %c = IRCClient::findChannel(%nick); + if (%c && %c.private) + { + %p = IRCClient::findPerson(%nick); + if (%p) + { + if (!(%p.flags & $PERSON_IGNORE)) + IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has disconnected from IRC."); + %c.removeMember(%p); + %p.delete(); + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_PART); + } + } } //------------------------------------------------------------------------------ @@ -1826,7 +1865,7 @@ function IRCClient::onNameReply(%prefix,%params) { echo("IRCClient::onNameReply: My nick should have existed."); - return; + return; } // find the end of channel name @@ -1836,7 +1875,7 @@ function IRCClient::onNameReply(%prefix,%params) { echo("IRCClient::onNameReply: This channel should have existed."); - return; + return; } // loop through the nick and add them to the channel @@ -1853,10 +1892,10 @@ function IRCClient::onNameReply(%prefix,%params) // If it's not me, add them to the channel if (%p != %me) - { - %c.addMember(%p,IRCClient::taggedNick(%p),%flags); - %p.ref++; - } + { + %c.addMember(%p,IRCClient::taggedNick(%p),%flags); + %p.ref++; + } // If it is me, just set the flags else { @@ -1887,20 +1926,20 @@ function IRCClient::onWhoReply(%prefix, %params) %p = IRCClient::findPerson(%nick); if (!%p) return; - if (getSubStr(%user,0,1) $= "~") - %user = getSubStr(%user,1,strlen(%user)-1); + if (getSubStr(%user,0,1) $= "~") + %user = getSubStr(%user,1,strlen(%user)-1); // update person in question if (strcmp(%p.identity,%user @ "@" @ %at)) - { - IRCClient::setIdentity(%p,%user @ "@" @ %at); - IRCClient::correctNick(%p); + { + IRCClient::setIdentity(%p,%user @ "@" @ %at); + IRCClient::correctNick(%p); } %p.real = %real; // Send it to the status channel IRCClient::newMessage("","WHO " @ IRCClient::taggedNick(%p) @ ": " @ %user @ "@" @ %at @ " (" @ %real @ ") connected to server " @ %server @ "."); - IRCClient::connected(); + IRCClient::connected(); } //------------------------------------------------------------------------------ @@ -1920,35 +1959,35 @@ function IRCClient::onPart(%prefix,%params) if (%c.removeMember(%p)) { if ($pref::IRCClient::showLeave && !(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage(%c,"\c4"@IRCClient::taggedNick(%p) @ " has left the conversation."); - IRCClient::notify(IDIRC_PART); - %p.ref--; - if (%p.ref == 0) - { - $IRCClient::people.remove(%p); - %p.delete(); - } - } + IRCClient::newMessage(%c,"\c4"@IRCClient::taggedNick(%p) @ " has left the conversation."); + IRCClient::notify(IDIRC_PART); + %p.ref--; + if (%p.ref == 0) + { + $IRCClient::people.remove(%p); + %p.delete(); + } + } - // if this was me parting, clean up the channel + // if this was me parting, clean up the channel if (%p == $IRCClient::people.getObject(0) && %c) { - $IRCClient::channels.remove(%c); - for (%i = 0; %i < %c.numMembers(); %i++) - { - %m = %c.getMemberId(%i); - %m.ref--; - if (%m.ref == 0) - { - $IRCClient::people.remove(%m); - %m.delete(); - } - } - %c.delete(); - $IRCClient::deletedChannel = %c; - if ($IRCClient::currentChannel == %c) - $IRCClient::nextChannel = $IRCClient::channels.getObject(0); - IRCClient::notify(IDIRC_DELCHANNEL); + $IRCClient::channels.remove(%c); + for (%i = 0; %i < %c.numMembers(); %i++) + { + %m = %c.getMemberId(%i); + %m.ref--; + if (%m.ref == 0) + { + $IRCClient::people.remove(%m); + %m.delete(); + } + } + %c.delete(); + $IRCClient::deletedChannel = %c; + if ($IRCClient::currentChannel == %c) + $IRCClient::nextChannel = $IRCClient::channels.getObject(0); + IRCClient::notify(IDIRC_DELCHANNEL); } } @@ -1976,8 +2015,8 @@ function IRCClient::onTopic(%prefix,%params) if (!%c) return; %c.topic = %params; - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_TOPIC); + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_TOPIC); } //------------------------------------------------------------------------------ @@ -1996,22 +2035,22 @@ function IRCClient::onKick(%prefix,%params) if (%p && %c) if (%c.removeMember(%p)) - { + { // was it me? if (%p == $IRCClient::people.getObject(0)) { // Delete the channel for (%i = 0; %i < $IRCClient::channels.getCount(); %i++) - if ($IRCClient::channels.getObject(%i) == %c) - { - $IRCClient::channels.remove(%c); - %c.delete(); - $IRCClient::deletedChannel = %c; - if ($IRCClient::currentChannel == %c) - $IRCClient::nextChannel = $IRCClient::channels.getObject(0); + if ($IRCClient::channels.getObject(%i) == %c) + { + $IRCClient::channels.remove(%c); + %c.delete(); + $IRCClient::deletedChannel = %c; + if ($IRCClient::currentChannel == %c) + $IRCClient::nextChannel = $IRCClient::channels.getObject(0); - break; - } + break; + } IRCClient::statusMessage("Host " @ %host @ " kicks " @ IRCClient::taggedNick(%p) @ " out of the chat room, saying \"" @ %params @ "\""); IRCClient::notify(IDIRC_KICK); @@ -2019,16 +2058,16 @@ function IRCClient::onKick(%prefix,%params) else { IRCClient::newMessage(%c, "Host " @ %host @ " kicks " @ IRCClient::taggedNick(%p) @ " out of the chat room, saying \"" @ %params @ "\""); - IRCClient::notify(IDIRC_PART); - } - - %p.ref--; - if (%p.ref == 0) - { - $IRCClient::people.remove(%p); - %p.delete(); - } - } + IRCClient::notify(IDIRC_PART); + } + + %p.ref--; + if (%p.ref == 0) + { + $IRCClient::people.remove(%p); + %p.delete(); + } + } } //------------------------------------------------------------------------------ @@ -2076,23 +2115,23 @@ function IRCClient::onMode(%prefix,%params) break; %c.setFlags(%i,$PERSON_OPERATOR,%enable); %c.sort(); - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_SORT); + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_SORT); // only display the message if my privilages are modified. if (strcmp(%arg,$IRCClient::people.getObject(0).displayName)) break; nextToken(%prefix,arg,"!"); - %name = IRCClient::findPerson(%arg); - %taggedName = IRCClient::taggedNick(%name); + %name = IRCClient::findPerson(%arg); + %taggedName = IRCClient::taggedNick(%name); if (%c.getFlags(%i) & $PERSON_OPERATOR) - IRCClient::newMessage(%c, %taggedName @ " made you an operator."); - else - if (%c.getFlags(%i) & $PERSON_SPEAKER) - IRCClient::newMessage(%c, %taggedName @ " made you a speaker."); - else - IRCClient::newMessage(%c, %taggedName @ " made you an spectator."); + IRCClient::newMessage(%c, %taggedName @ " made you an operator."); + else + if (%c.getFlags(%i) & $PERSON_SPEAKER) + IRCClient::newMessage(%c, %taggedName @ " made you a speaker."); + else + IRCClient::newMessage(%c, %taggedName @ " made you an spectator."); case "v": // Speaker (voice) %params = nextToken(%params,arg," "); @@ -2100,24 +2139,24 @@ function IRCClient::onMode(%prefix,%params) if (%i == -1) break; %c.setFlags(%i,$PERSON_SPEAKER,%enable); - %c.sort(); - if (%c == $IRCClient::currentChannel) - IRCClient::notify(IDIRC_SORT); + %c.sort(); + if (%c == $IRCClient::currentChannel) + IRCClient::notify(IDIRC_SORT); // only display the message if my privilages are modified. if (strcmp(%arg,$IRCClient::people.getObject(0).displayName)) break; nextToken(%prefix,arg,"!"); - %name = IRCClient::findPerson(%arg); - %taggedName = IRCClient::taggedNick(%name); + %name = IRCClient::findPerson(%arg); + %taggedName = IRCClient::taggedNick(%name); if (%c.getFlags(%i) & $PERSON_OPERATOR) - IRCClient::newMessage(%c, %taggedName @ " made you an operator."); - else - if (%c.getFlags(%i) & $PERSON_SPEAKER) - IRCClient::newMessage(%c, %taggedName @ " made you a speaker."); - else - IRCClient::newMessage(%c, %taggedName @ " made you a spectator."); + IRCClient::newMessage(%c, %taggedName @ " made you an operator."); + else + if (%c.getFlags(%i) & $PERSON_SPEAKER) + IRCClient::newMessage(%c, %taggedName @ " made you a speaker."); + else + IRCClient::newMessage(%c, %taggedName @ " made you a spectator."); // CHANNEL Mode command case "b": // Ban @@ -2125,62 +2164,62 @@ function IRCClient::onMode(%prefix,%params) case "i": // Channel is Invite only if (%enable) - %c.flags = %c.flags | $CHANNEL_INVITE; - else - %c.flags = %c.flags & ~$CHANNEL_INVITE; + %c.flags = %c.flags | $CHANNEL_INVITE; + else + %c.flags = %c.flags & ~$CHANNEL_INVITE; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "l": // Channel has limited members %params = nextToken(%params,arg," "); %c.personLimit = (%enable ? %arg : 0); - if (%enable) - %c.flags = %c.flags | $CHANNEL_LIMITED; - else - %c.flags = %c.flags & ~$CHANNEL_LIMITED; + if (%enable) + %c.flags = %c.flags | $CHANNEL_LIMITED; + else + %c.flags = %c.flags & ~$CHANNEL_LIMITED; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "m": // Channel is moderated if (%enable) - %c.flags = %c.flags | $CHANNEL_MODERATED; - else - %c.flags = %c.flags & ~$CHANNEL_MODERATED; + %c.flags = %c.flags | $CHANNEL_MODERATED; + else + %c.flags = %c.flags & ~$CHANNEL_MODERATED; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "n": // External messages are ignored - if (%enable) - %c.flags = %c.flags | $CHANNEL_IGNORE_EXTERN; - else - %c.flags = %c.flags & ~$CHANNEL_IGNORE_EXTERN; + if (%enable) + %c.flags = %c.flags | $CHANNEL_IGNORE_EXTERN; + else + %c.flags = %c.flags & ~$CHANNEL_IGNORE_EXTERN; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "p": // Channel is Private if (%enable) - %c.flags = %c.flags | $CHANNEL_PRIVATE; - else - %c.flags = %c.flags & ~$CHANNEL_PRIVATE; + %c.flags = %c.flags | $CHANNEL_PRIVATE; + else + %c.flags = %c.flags & ~$CHANNEL_PRIVATE; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "s": // Channel is Secret if (%enable) - %c.flags = %c.flags | $CHANNEL_SECRET; - else - %c.flags = %c.flags & ~$CHANNEL_SECRET; + %c.flags = %c.flags | $CHANNEL_SECRET; + else + %c.flags = %c.flags & ~$CHANNEL_SECRET; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "t": // Channel topic limited to Operators if (%enable) - %c.flags = %c.flags | $CHANNEL_TOPIC_LIMITED; - else - %c.flags = %c.flags & ~$CHANNEL_TOPIC_LIMITED; + %c.flags = %c.flags | $CHANNEL_TOPIC_LIMITED; + else + %c.flags = %c.flags & ~$CHANNEL_TOPIC_LIMITED; IRCClient::notify(IDIRC_CHANNEL_FLAGS); case "k": // Channel has secret key %params = nextToken(%params,arg," "); %c.key = (%enable ? %arg : ""); if (%enable) - %c.flags = %c.flags | $CHANNEL_HAS_KEY; - else - %c.flags = %c.flags & ~$CHANNEL_HAS_KEY; + %c.flags = %c.flags | $CHANNEL_HAS_KEY; + else + %c.flags = %c.flags & ~$CHANNEL_HAS_KEY; IRCClient::notify(IDIRC_CHANNEL_FLAGS); } } @@ -2206,22 +2245,22 @@ function IRCClient::onWhoisUserReply(%prefix,%params) %real = nextToken(%params,chunk,":"); %p = IRCClient::findPerson(%nick); - if (!%p) return; - - if (getSubStr(%user,0,1) $= "~") - %user = getSubStr(%user,1,strlen(%user)-1); + if (!%p) return; + + if (getSubStr(%user,0,1) $= "~") + %user = getSubStr(%user,1,strlen(%user)-1); // update person in question if (strcmp(%p.identity,%user @ "@" @ %at)) - { - IRCClient::setIdentity(%p,%user @ "@" @ %at); - IRCClient::correctNick(%p); + { + IRCClient::setIdentity(%p,%user @ "@" @ %at); + IRCClient::correctNick(%p); } %p.real = %real; - // Send it to the status channel + // Send it to the status channel IRCClient::newMessage("","WHOIS " @ IRCClient::taggedNick(%p) @ ": " @ %user @ "@" @ %at @ " (" @ %real @ ")."); - IRCClient::connected(); + IRCClient::connected(); } //------------------------------------------------------------------------------ @@ -2258,7 +2297,7 @@ function IRCClient::censor(%str) { %p = nextToken(%p,word," ,"); $IRCClient::censorWords[$IRCClient::numCensorWords] = %word; - $IRCClient::numCensorWords++; + $IRCClient::numCensorWords++; } } @@ -2275,26 +2314,26 @@ function IRCClient::censor(%str) //------------------------------------------------------------------------------ function IRCClient::onList(%prefix,%params) { - //error("IRCClient::onList( "@ %prefix @", "@ %params @")"); + //error("IRCClient::onList( "@ %prefix @", "@ %params @")"); //EXAMPLE: :StLouis.MO.US.UnderNet.org 322 homer128 #bmx 9 :BMX Rules! %params = nextToken(%params,nick," "); %params = nextToken(%params,ch," "); %topic = nextToken(%params,users," :"); - %l = strlen(%ch); - if ((%l > 7 && strcmp(getSubStr(%ch,%l-7,7),"_Public") == 0) || - (%l > 8 && strcmp(getSubStr(%ch,%l-8,8),"_Private") == 0)) - return; + %l = strlen(%ch); + if ((%l > 7 && strcmp(getSubStr(%ch,%l-7,7),"_Public") == 0) || + (%l > 8 && strcmp(getSubStr(%ch,%l-8,8),"_Private") == 0)) + return; if (IRCClient::censor(%topic)) return; if ($IRCClient::silentList) { - $IRCClient::channelNames[$IRCClient::numChannels] = %ch; - $IRCClient::channelUsers[$IRCClient::numChannels] = %users; - $IRCClient::channelTopics[$IRCClient::numChannels] = %topic; - $IRCClient::numChannels++; + $IRCClient::channelNames[$IRCClient::numChannels] = %ch; + $IRCClient::channelUsers[$IRCClient::numChannels] = %users; + $IRCClient::channelTopics[$IRCClient::numChannels] = %topic; + $IRCClient::numChannels++; } else IRCClient::newMessage($IRCClient::currentChannel,%users @ " " @ %ch @ " -- " @ %topic); @@ -2306,12 +2345,12 @@ function IRCClient::onBanList(%prefix,%params) %params = nextToken(%params,banned," "); %params = nextToken(%params,banned," "); %params = nextToken(%params,banned," "); - nextToken(%banned,banned,"!*@*"); + nextToken(%banned,banned,"!*@*"); if ($IRCClient::silentBanList) { - // temporarily create person - $IRCClient::banList[$IRCClient::numBanned] = IRCClient::findPerson2(%banned,true); + // temporarily create person + $IRCClient::banList[$IRCClient::numBanned] = IRCClient::findPerson2(%banned,true); $IRCClient::removeBan[$IRCClient::banList[$IRCClient::numBanned]] = false; $IRCClient::numBanned++; } @@ -2324,7 +2363,7 @@ function IRCClient::onListEnd(%prefix,%params) { $IRCClient::silentList = false; IRCClient::notify(IDIRC_CHANNEL_LIST); - IRCClient::connected(); + IRCClient::connected(); } } @@ -2335,14 +2374,14 @@ function IRCClient::onBanListEnd(%prefix,%params) { $IRCClient::silentBanList = false; IRCClient::notify(IDIRC_BAN_LIST); - IRCClient::connected(); + IRCClient::connected(); } } //------------------------------------------------------------------------------ function IRCClient::onBadNick(%prefix,%params) { - //error("IRCClient::onBadNick( "@%prefix@", "@%params@" )"); + //error("IRCClient::onBadNick( "@%prefix@", "@%params@" )"); IRCClient::newMessage("","NOTICE: Nickname (" @ $IRCClient::people.getObject(0).displayName @ ") is already in use."); IRCClient::notify(IDIRC_ERR_NICK_IN_USE); } @@ -2350,9 +2389,9 @@ function IRCClient::onBadNick(%prefix,%params) //------------------------------------------------------------------------------ function IRCClient::onNoLogin(%prefix,%params) { - %msg = nextToken(%params,cmd," :"); - IRCClient::connected(); - IRCClient::newMessage("","Could not log in:" SPC %msg); + %msg = nextToken(%params,cmd," :"); + IRCClient::connected(); + IRCClient::newMessage("","Could not log in:" SPC %msg); } //------------------------------------------------------------------------------ @@ -2362,35 +2401,35 @@ function IRCClient::onAway(%prefix,%params) %p = IRCClient::findPerson(%nick); if (!%p) return; - %c = IRCClient::findChannel(%nick); - if (!%c) - return; + %c = IRCClient::findChannel(%nick); + if (!%c) + return; if (strlen(%msg)) { %p.flags = %p.flags | $PERSON_AWAY; if (!(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%p) @ " is away: " @ %msg); + IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%p) @ " is away: " @ %msg); } else { %p.flags = %p.flags & ~$PERSON_AWAY; if (!(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%p) @ " has returned."); + IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%p) @ " has returned."); } - if ($IRCClient::currentChannel.findMember(%p) >= 0) - IRCClient::notify(IDIRC_SORT); + if ($IRCClient::currentChannel.findMember(%p) >= 0) + IRCClient::notify(IDIRC_SORT); } //------------------------------------------------------------------------------ function IRCClient::onAction(%prefix,%params) { - //error("IRCClient::onAction( "@ %prefix @", "@ %params @")"); + //error("IRCClient::onAction( "@ %prefix @", "@ %params @")"); %msg = nextToken(%params,ch," :"); %c = IRCClient::findChannel(%ch,true); - %person = IRCClient::findPerson2(%prefix,true); - %name = IRCClient::taggedNick(%person); + %person = IRCClient::findPerson2(%prefix,true); + %name = IRCClient::taggedNick(%person); IRCClient::newMessage(%c, %name @ "\c9 " @ %msg); } @@ -2401,22 +2440,22 @@ function IRCClient::onAwayReply(%prefix,%params) //EXAMPLE :rick-266.dynamix.com 301 homer128 RickO :Gone fishing. %params = nextToken(%params,me," "); %msg = nextToken(%params,nick," :"); - %p = IRCClient::findPerson(%nick); + %p = IRCClient::findPerson(%nick); - if (%p) - { - %p.flags = %p.flags | $PERSON_AWAY; - IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%p) SPC "is away:" SPC %msg); - IRCClient::notify(IDIRC_SORT); - } + if (%p) + { + %p.flags = %p.flags | $PERSON_AWAY; + IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%p) SPC "is away:" SPC %msg); + IRCClient::notify(IDIRC_SORT); + } } //------------------------------------------------------------------------------ function IRCClient::onUnAwayReply(%prefix,%params) { - if ($IRCClient::awaytimeout) - cancel($IRCClient::awaytimeout); - $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); + if ($IRCClient::awaytimeout) + cancel($IRCClient::awaytimeout); + $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); IRCClient::newMessage("","You are no longer marked as being away."); } @@ -2499,9 +2538,9 @@ function IRCClient::onInvite(%prefix,%params) function IRCClient::onInviteReply(%prefix,%params) { %params = nextToken(%params,me," "); - %params = nextToken(%params,person," "); + %params = nextToken(%params,person," "); %params = nextToken(%params,channel," "); - %p = IRCClient::findPerson(%person); + %p = IRCClient::findPerson(%person); IRCClient::newMessage($IRCClient::currentChannel,"You have invited" SPC IRCClient::taggedNick(%p) SPC "to channel" SPC IRCClient::displayChannel(%channel) @ "."); } @@ -2542,9 +2581,9 @@ function IRCClient::onBadChannelKey(%prefix,%params) %channel = nextToken(%params,channel," "); nextToken(%channel,channel," "); - IRCClient::connected(); + IRCClient::connected(); IRCClient::statusMessage("Cannot join " @ IRCClient::displayChannel(%channel) @ ": invalid password."); - $IRCClient::keyChannel = %channel; + $IRCClient::keyChannel = %channel; IRCClient::notify(IDIRC_CHANNEL_HAS_KEY); } @@ -2588,41 +2627,41 @@ function IRCClient::onChalRespReply(%prefix,%params) %params = nextToken(%params,ident," "); %params = nextToken(%params,reply," "); %me = $IRCClient::people.getObject(0); - %me.displayName = %nick; - IRCClient::setIdentity(%me,%ident @ "@localhost"); + %me.displayName = %nick; + IRCClient::setIdentity(%me,%ident @ "@localhost"); if (WONLoginIRC(%reply) $= "OK") { - if ($IRCClient::state !$= IDIRC_CONNECTED) - { - IRCClient::newMessage("","Successfully connected to " @ $IRCClient::server); - $IRCClient::state = IDIRC_CONNECTED; - IRCClient::notify(IDIRC_CONNECTED); + if ($IRCClient::state !$= IDIRC_CONNECTED) + { + IRCClient::newMessage("","Successfully connected to " @ $IRCClient::server); + $IRCClient::state = IDIRC_CONNECTED; + IRCClient::notify(IDIRC_CONNECTED); - if ($IRCClient::awaytimeout) - cancel($IRCClient::awaytimeout); - $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); - // auto join a room if requested - if (strlen($IRCClient::room)) - IRCClient::send("JOIN " @ $IRCClient::room); + if ($IRCClient::awaytimeout) + cancel($IRCClient::awaytimeout); + $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); + // auto join a room if requested + if (strlen($IRCClient::room)) + IRCClient::send("JOIN " @ $IRCClient::room); - if ($IRCClient::previousChannelCount > 0) - { - for (%i = 0; %i < $IRCClient::previousChannelCount; %i++) - IRCClient::join($IRCClient::previousChannel[%i] @ " " @ $IRCClient::previousKey[%i]); - $IRCClient::previousChannelCount = 0; - } - } - else - { - IRCClient::newMessage("","Successfully reauthenticated with " @ $IRCClient::server); - IRCClient::correctNick($IRCClient::people.getObject(0)); - } + if ($IRCClient::previousChannelCount > 0) + { + for (%i = 0; %i < $IRCClient::previousChannelCount; %i++) + IRCClient::join($IRCClient::previousChannel[%i] @ " " @ $IRCClient::previousKey[%i]); + $IRCClient::previousChannelCount = 0; + } + } + else + { + IRCClient::newMessage("","Successfully reauthenticated with " @ $IRCClient::server); + IRCClient::correctNick($IRCClient::people.getObject(0)); + } } else - { - IRCClient::disconnect(); + { + IRCClient::disconnect(); IRCClient::notify(IDIRC_ERR_BADCHALRESP_REPLY); - } + } } //------------------------------------------------------------------------------ @@ -2638,28 +2677,28 @@ function IRCClient::send2(%message,%to) %params = nextToken(%buffer,command," "); // dispatch the command to a handler -- if one exists - // we don't need to handle all outgoing commands just a few - switch$(%command) - { - case "PING": - IRCClient::ping(%params); - case "PART": - IRCClient::part(%params); - case "AWAY": - IRCClient::away(%params); - case "ME": - IRCClient::sendAction(%params); - case "ACTION": - IRCClient::sendAction(%params); - case "JOIN": - IRCClient::join(%params); - case "QUIT": - IRCClient::quit(%params); + // we don't need to handle all outgoing commands just a few + switch$(%command) + { + case "PING": + IRCClient::ping(%params); + case "PART": + IRCClient::part(%params); + case "AWAY": + IRCClient::away(%params); + case "ME": + IRCClient::sendAction(%params); + case "ACTION": + IRCClient::sendAction(%params); + case "JOIN": + IRCClient::join(%params); + case "QUIT": + IRCClient::quit(%params); - default: - // otherwise ship it to the server, RAW - IRCClient::send(getSubStr(%message,1,strlen(%message)-1)); - } + default: + // otherwise ship it to the server, RAW + IRCClient::send(getSubStr(%message,1,strlen(%message)-1)); + } } else if (strlen(%to)) @@ -2716,12 +2755,12 @@ function IRCClient::join(%params) IRCClient::notify(IDIRC_ADDCHANNEL); } else - { - $IRCClient::key = %key; + { + $IRCClient::key = %key; IRCClient::send("JOIN " @ %channel @ " " @ %key); - IRCClient::connecting(); - } + IRCClient::connecting(); + } } //------------------------------------------------------------------------------ @@ -2736,14 +2775,14 @@ function IRCClient::quit(%params) function IRCClient::nick(%nick) { if (($IRCClient::state $= IDIRC_CONNECTED || $IRCClient::state $= IDIRC_CONNECTING_IRC) && - strlen(nick)) + strlen(nick)) { if (stricmp(%nick, $IRCClient::people.getObject(0).getName())) IRCClient::send("NICK " @ %nick); } else { - $IRCClient::people.getObject(0).setName(%nick); + $IRCClient::people.getObject(0).setName(%nick); $IRCClient::NickName = %nick; } } @@ -2757,225 +2796,225 @@ function IRCClient::name(%name) //-------------------------------------------------------------------------------- function ChatMessageEntry::onTabComplete(%this) { - // the word that the cursor is on or just behind - // and exchange it for a matching nick from this channel - - //%channel = $IRCClient::channels.getObject(0); - %me = $IRCClient::people.getObject(0); + // the word that the cursor is on or just behind + // and exchange it for a matching nick from this channel + + //%channel = $IRCClient::channels.getObject(0); + %me = $IRCClient::people.getObject(0); - // if there is no text just iterate through the channel members + // if there is no text just iterate through the channel members - %text = %this.getValue(); + %text = %this.getValue(); - if(%text $= "") - { - error("null string completion not implemented yet."); - return; - } - - %cursorPos = %this.getCursorPos(); - %textLen = strLen(%text); - - // find the first space behind the cursor - for(%a = %cursorPos; %a >= 0; %a--) - { - %letter = getSubStr(%text, %a, 1); - if(%letter $= " ") - { - %space = %a + 1; // add 1 so we dont INCLUDE the space - %begining = %space; - //echo("first space is at pos" SPC %begining); - break; - } - if(%a == 0) - { - //echo("there are no prev spaces."); - %begining = 0; - } - } - - // find the first space in front of the cursor - for(%b = %cursorPos; %b <= %textLen; %b++) - { - %letter = getSubStr(%text, %b, 1); - if(%letter $= " ") - { - %end = %b; - //echo("end space is at pos" SPC %end); - - break; - } - if(%b == %textLen) - { - //echo("there are no end spaces."); - %end = %textLen; - } + if(%text $= "") + { + error("null string completion not implemented yet."); + return; + } + + %cursorPos = %this.getCursorPos(); + %textLen = strLen(%text); + + // find the first space behind the cursor + for(%a = %cursorPos; %a >= 0; %a--) + { + %letter = getSubStr(%text, %a, 1); + if(%letter $= " ") + { + %space = %a + 1; // add 1 so we dont INCLUDE the space + %begining = %space; + //echo("first space is at pos" SPC %begining); + break; + } + if(%a == 0) + { + //echo("there are no prev spaces."); + %begining = 0; + } + } + + // find the first space in front of the cursor + for(%b = %cursorPos; %b <= %textLen; %b++) + { + %letter = getSubStr(%text, %b, 1); + if(%letter $= " ") + { + %end = %b; + //echo("end space is at pos" SPC %end); + + break; + } + if(%b == %textLen) + { + //echo("there are no end spaces."); + %end = %textLen; + } - } + } - //why dont we move the cursor to the end of the word if they try and tab complete - //successfull or not - %this.setCursorPos(%b); - - // this forms a word - %wordLen = %end - %begining; - %word = getSubStr(%text, %begining, %wordLen); - //error("Word to tabComplete: "@%word@"."); + //why dont we move the cursor to the end of the word if they try and tab complete + //successfull or not + %this.setCursorPos(%b); + + // this forms a word + %wordLen = %end - %begining; + %word = getSubStr(%text, %begining, %wordLen); + //error("Word to tabComplete: "@%word@"."); - //we interupt here - // if we have the last word we tab completed then we are trying to cycle - // we want to cycle with the stem of the last word we completed from - // so we use the stem instead of the word - if(%word $= %me.lastCompletion) - { - %word = %me.lastCompletionStub; - %wordLen = strLen(%word); - } + //we interupt here + // if we have the last word we tab completed then we are trying to cycle + // we want to cycle with the stem of the last word we completed from + // so we use the stem instead of the word + if(%word $= %me.lastCompletion) + { + %word = %me.lastCompletionStub; + %wordLen = strLen(%word); + } - // is it a tab-completable word? - for (%i = 0; %i < $IRCClient::people.getCount(); %i++) - { - %person = $IRCClient::people.getObject(%i); - if(%person.untagged !$= "") - %personName = %person.untagged; - else %personName = %person; + // is it a tab-completable word? + for (%i = 0; %i < $IRCClient::people.getCount(); %i++) + { + %person = $IRCClient::people.getObject(%i); + if(%person.untagged !$= "") + %personName = %person.untagged; + else %personName = %person; - %personSnip = getSubStr(%personName, 0, %wordLen); + %personSnip = getSubStr(%personName, 0, %wordLen); - if(%personSnip $= %word) - { - %nickPossiblity[%numMatches++] = %personName; - } - } - - if(!%numMatches) - { - //error("no matches...sorry."); - return; - } - - // we have ALL the possible tab completes for the word - // if we have just tab completed on of them give us the next one instead - // cycle through the possiblities + if(%personSnip $= %word) + { + %nickPossiblity[%numMatches++] = %personName; + } + } + + if(!%numMatches) + { + //error("no matches...sorry."); + return; + } + + // we have ALL the possible tab completes for the word + // if we have just tab completed on of them give us the next one instead + // cycle through the possiblities - for(%i = 1; %i <= %numMatches; %i++) - { - if(%nickPossiblity[%i] $= %me.lastCompletion) - { - %newWord = %nickPossiblity[%i+1]; - break; - } - } - if(%newWord $= "" ) - %newWord = %nickPossiblity1; + for(%i = 1; %i <= %numMatches; %i++) + { + if(%nickPossiblity[%i] $= %me.lastCompletion) + { + %newWord = %nickPossiblity[%i+1]; + break; + } + } + if(%newWord $= "" ) + %newWord = %nickPossiblity1; - %newWordLenDif = strLen(%newWord) - strLen(%word); + %newWordLenDif = strLen(%newWord) - strLen(%word); - if(%newWord $= "") - { - //error("There is no word to tab complete"); - return -1; - } + if(%newWord $= "") + { + //error("There is no word to tab complete"); + return -1; + } - // there is a word (%newWord) find out which word it is - for(%i = 0; %i < getWordCount(%text); %i++) - { - %wordCheck = getWord(%text, %i); - //echo("is this word our candidate? "@%wordCheck); - if(%wordCheck $= %word) - { - %wordNum = %i; - } - //what if there are multiple instances of this word? - } + // there is a word (%newWord) find out which word it is + for(%i = 0; %i < getWordCount(%text); %i++) + { + %wordCheck = getWord(%text, %i); + //echo("is this word our candidate? "@%wordCheck); + if(%wordCheck $= %word) + { + %wordNum = %i; + } + //what if there are multiple instances of this word? + } - // replace the word with the new word and move the cursor - - for(%x = 0; %x < getWordCount(%text); %x++) - { - %thisWord = getWord(%text, %x); - - if(%wordNum == %x) - { - %thisWord = %newWord; - } - - if(%newText $= "") - %newText = %thisWord; - else %newText = %newText SPC %thisWord; - } - - %this.setCursorPos( %this.getCursorPos() + %newWordLenDif -1 ); - - // replace what the current text is, with new text + // replace the word with the new word and move the cursor + + for(%x = 0; %x < getWordCount(%text); %x++) + { + %thisWord = getWord(%text, %x); + + if(%wordNum == %x) + { + %thisWord = %newWord; + } + + if(%newText $= "") + %newText = %thisWord; + else %newText = %newText SPC %thisWord; + } + + %this.setCursorPos( %this.getCursorPos() + %newWordLenDif -1 ); + + // replace what the current text is, with new text %this.setValue(%newText); - %me.lastCompletion = %newWord; - %me.lastCompletionStub = %word; + %me.lastCompletion = %newWord; + %me.lastCompletionStub = %word; } //---------------------------------------------------------------------- function IRCClient::nickHighLight(%message) { - //error("IRCClient::nickHighLight( "@%message@" )"); - %nick = $IRCClient::people.getObject(0).untagged; - - //%nickLen = strLen(%nick); - // swap in for multiple nick options here - - %wordCount = getWordCount(%message); - for(%i = 0; %i < %wordCount; %i++) - { - %word = getWord(%message, %i); - if(%word $= %nick) - { - %message = "\c2" @ %message; - } - } - return %message; + //error("IRCClient::nickHighLight( "@%message@" )"); + %nick = $IRCClient::people.getObject(0).untagged; + + //%nickLen = strLen(%nick); + // swap in for multiple nick options here + + %wordCount = getWordCount(%message); + for(%i = 0; %i < %wordCount; %i++) + { + %word = getWord(%message, %i); + if(%word $= %nick) + { + %message = "\c2" @ %message; + } + } + return %message; } //------------------------------------------------------------------------------ function IRCClient::part(%params) { - nextToken(%params,ch," "); - if (%ch $= $CHANNEL_STATUS) - return; + nextToken(%params,ch," "); + if (%ch $= $CHANNEL_STATUS) + return; - %c = IRCClient::findChannel(%ch); - if (%c) - for (%i = 0; %i < $IRCClient::channels.getCount(); %i++) - if ($IRCClient::channels.getObject(%i) == %c) - { - if (getSubStr(%ch,0,1) $= "#" || getSubStr(%ch,0,1) $= "&") - IRCClient::send("PART " @ %params); - else - { - $IRCClient::channels.remove(%c); - for (%i = 0; %i < %c.numMembers(); %i++) - { - %m = %c.getMemberId(%i); - %m.ref--; - if (%m.ref == 0) - { - $IRCClient::people.remove(%m); - %m.delete(); - } - else - if (%m != $IRCClient::people.getObject(0) && - (%m.flags & $PERSON_AWAY)) - %m.flags = %m.flags & ~$PERSON_AWAY; - } - %c.delete(); - $IRCClient::deletedChannel = %c; - if ($IRCClient::currentChannel == %c) - $IRCClient::nextChannel = $IRCClient::channels.getObject(0); - - IRCClient::notify(IDIRC_DELCHANNEL); - } + %c = IRCClient::findChannel(%ch); + if (%c) + for (%i = 0; %i < $IRCClient::channels.getCount(); %i++) + if ($IRCClient::channels.getObject(%i) == %c) + { + if (getSubStr(%ch,0,1) $= "#" || getSubStr(%ch,0,1) $= "&") + IRCClient::send("PART " @ %params); + else + { + $IRCClient::channels.remove(%c); + for (%i = 0; %i < %c.numMembers(); %i++) + { + %m = %c.getMemberId(%i); + %m.ref--; + if (%m.ref == 0) + { + $IRCClient::people.remove(%m); + %m.delete(); + } + else + if (%m != $IRCClient::people.getObject(0) && + (%m.flags & $PERSON_AWAY)) + %m.flags = %m.flags & ~$PERSON_AWAY; + } + %c.delete(); + $IRCClient::deletedChannel = %c; + if ($IRCClient::currentChannel == %c) + $IRCClient::nextChannel = $IRCClient::channels.getObject(0); + + IRCClient::notify(IDIRC_DELCHANNEL); + } - break; - } + break; + } } //------------------------------------------------------------------------------ @@ -2985,32 +3024,32 @@ function IRCClient::away(%params) if (strlen(%params)) { if ($IRCClient::awaytimeout) - { - cancel($IRCClient::awaytimeout); - $IRCClient::awaytimeout = 0; - } + { + cancel($IRCClient::awaytimeout); + $IRCClient::awaytimeout = 0; + } %me.flags = %me.flags | $PERSON_AWAY; IRCClient::send("AWAY :" @ %params); for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) - { - %c = $IRCClient::channels.getObject(%i); - if (%c.private) - IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01AWAY :" @ %params @ "\x01"); - } + { + %c = $IRCClient::channels.getObject(%i); + if (%c.private) + IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01AWAY :" @ %params @ "\x01"); + } } else { %me.flags = %me.flags & ~$PERSON_AWAY; IRCClient::send("AWAY"); for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) - { - %c = $IRCClient::channels.getObject(%i); - if (%c.private) - IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01AWAY \x01"); - } + { + %c = $IRCClient::channels.getObject(%i); + if (%c.private) + IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01AWAY \x01"); + } } - IRCClient::notify(IDIRC_SORT); + IRCClient::notify(IDIRC_SORT); } //------------------------------------------------------------------------------ @@ -3072,17 +3111,17 @@ function IRCClient::setSpectator(%nick) //------------------------------------------------------------------------------ function IRCClient::kick(%p,%msg) { - //error("IRCClient::kick( "@ %p @", "@ %msg@" )"); + //error("IRCClient::kick( "@ %p @", "@ %msg@" )"); IRCClient::send("KICK" SPC $IRCClient::currentChannel.getName() SPC %p.displayName @ " :" @ %msg); } //------------------------------------------------------------------------------ function IRCClient::ban(%p,%add) { - if (%add) - IRCClient::send("MODE " @ $IRCClient::currentChannel.getName() @ " +b " @ %p.displayName); - else - IRCClient::send("MODE " @ $IRCClient::currentChannel.getName() @ " -b " @ %p.displayName); + if (%add) + IRCClient::send("MODE " @ $IRCClient::currentChannel.getName() @ " +b " @ %p.displayName); + else + IRCClient::send("MODE " @ $IRCClient::currentChannel.getName() @ " -b " @ %p.displayName); } //------------------------------------------------------------------------------ @@ -3092,7 +3131,7 @@ function IRCClient::ignore(%p,%tf) { echo("IRCClient::ignore: no current channel."); - return; + return; } if (%p) @@ -3107,70 +3146,70 @@ function IRCClient::ignore(%p,%tf) %p.flags = %p.flags & ~$PERSON_IGNORE; IRCClient::newMessage("","You are no longer ignoring " @ IRCClient::taggedNick(%p) @ "."); } - IRCClient::notify(IDIRC_SORT); - } + IRCClient::notify(IDIRC_SORT); + } } //------------------------------------------------------------------------------ function IRCClient::invite(%p,%c) { - IRCClient::send("INVITE" SPC %p.displayName SPC %c.getName()); + IRCClient::send("INVITE" SPC %p.displayName SPC %c.getName()); } //------------------------------------------------------------------------------ function IRCClient::who(%p) { - IRCClient::connecting(); - IRCClient::send("WHO" SPC %p.displayName); + IRCClient::connecting(); + IRCClient::send("WHO" SPC %p.displayName); } //------------------------------------------------------------------------------ function IRCClient::whois(%p) { - IRCClient::connecting(); - IRCClient::send("WHOIS" SPC %p.displayName); + IRCClient::connecting(); + IRCClient::send("WHOIS" SPC %p.displayName); } //------------------------------------------------------------------------------ function IRCClient::topic(%c,%t) { - IRCClient::send("TOPIC" SPC %c.getName() SPC ":" @ %t); + IRCClient::send("TOPIC" SPC %c.getName() SPC ":" @ %t); } //------------------------------------------------------------------------------ function IRCClient::setInvite(%c,%i) { - if (%i) - IRCClient::send("MODE" SPC %c.getName() SPC "+i"); - else - IRCClient::send("MODE" SPC %c.getName() SPC "-i"); + if (%i) + IRCClient::send("MODE" SPC %c.getName() SPC "+i"); + else + IRCClient::send("MODE" SPC %c.getName() SPC "-i"); } //------------------------------------------------------------------------------ function IRCClient::setModerate(%c,%m) { - if (%m) - IRCClient::send("MODE" SPC %c.getName() SPC "+m"); - else - IRCClient::send("MODE" SPC %c.getName() SPC "-m"); + if (%m) + IRCClient::send("MODE" SPC %c.getName() SPC "+m"); + else + IRCClient::send("MODE" SPC %c.getName() SPC "-m"); } //------------------------------------------------------------------------------ function IRCClient::setLimit(%c,%l,%m) { - if (%l) - IRCClient::send("MODE" SPC %c.getName() SPC "+l" SPC %m); - else - IRCClient::send("MODE" SPC %c.getName() SPC "-l"); + if (%l) + IRCClient::send("MODE" SPC %c.getName() SPC "+l" SPC %m); + else + IRCClient::send("MODE" SPC %c.getName() SPC "-l"); } //------------------------------------------------------------------------------ function IRCClient::setKey(%c,%k,%p) { - if (%k) - IRCClient::send("MODE" SPC %c.getName() SPC "+k" SPC %p); - else - IRCClient::send("MODE" SPC %c.getName() SPC "-k"); + if (%k) + IRCClient::send("MODE" SPC %c.getName() SPC "+k" SPC %p); + else + IRCClient::send("MODE" SPC %c.getName() SPC "-k"); } //------------------------------------------------------------------------------ @@ -3181,19 +3220,19 @@ function IRCClient::requestChannelList() $IRCClient::silentList = true; IRCClient::send("LIST"); - IRCClient::connecting(); + IRCClient::connecting(); } //------------------------------------------------------------------------------ function IRCClient::requestBanList(%c) { // clear the global banned list - $IRCClient::banChannel = %c; + $IRCClient::banChannel = %c; $IRCClient::numBanned = 0; $IRCClient::silentBanList = true; IRCClient::send("MODE " @ %c.getName() @ " +b"); - IRCClient::connecting(); + IRCClient::connecting(); } //------------------------------------------------------------------------------ @@ -3206,52 +3245,52 @@ function IRCClient::onJoinServer(%mission,%server,%address,%mayprequire,%prequir IRCClient::send("PRIVMSG " @ $IRCClient::currentChannel.getName() @ ":\x01ACTION " @ %buf @ "\x01"); IRCClient::newMessage($IRCClient::currentChannel, - IRCClient::taggedNick($IRCClient::people.getObject(0)) @ " " @ %buf); + IRCClient::taggedNick($IRCClient::people.getObject(0)) @ " " @ %buf); } } //------------------------------------------------------------------------------ function IRCClient::onJoinGame(%address, %desc) { - //error("IRCClient::onJoinGame( "@ %address @", "@ %desc @" )"); - //IRCClient::away("joined a game."); + //error("IRCClient::onJoinGame( "@ %address @", "@ %desc @" )"); + //IRCClient::away("joined a game."); - %me = $IRCClient::people.getObject(0); - if(%address $= %me.lastAddress) - { - return; - } + %me = $IRCClient::people.getObject(0); + if(%address $= %me.lastAddress) + { + return; + } - %me.lastAddress = %address; + %me.lastAddress = %address; - %joinLink = "Click here to follow."; + %joinLink = "Click here to follow."; - if(%address $= "") - %msg = %desc; - else - %msg = %desc SPC %joinLink; + if(%address $= "") + %msg = %desc; + else + %msg = %desc SPC %joinLink; - //IRCClient::sendAction(%msg); + //IRCClient::sendAction(%msg); - for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) - { - %c = $IRCClient::channels.getObject(%i); - if (!%c.private) - { - IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01ACTION " @ %msg @ "\x01"); - IRCClient::newMessage($IRCClient::currentChannel, IRCClient::taggedNick($IRCClient::people.getObject(0)) @ "\c9 " @ %msg); - } - } + for (%i = 1; %i < $IRCClient::channels.getCount(); %i++) + { + %c = $IRCClient::channels.getObject(%i); + if (!%c.private) + { + IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01ACTION " @ %msg @ "\x01"); + IRCClient::newMessage($IRCClient::currentChannel, IRCClient::taggedNick($IRCClient::people.getObject(0)) @ "\c9 " @ %msg); + } + } } //------------------------------------------------------------------------------ function IRCClient::onLeaveGame() { - IRCClient::away(""); + IRCClient::away(""); } if ($LaunchMode $= "Normal") { - IRCClient::init(); - IRCClient::connect(); + IRCClient::init(); + IRCClient::connect(); } diff --git a/base/scripts/GameGui.cs b/base/scripts/GameGui.cs index b4bb683..bef632f 100644 --- a/base/scripts/GameGui.cs +++ b/base/scripts/GameGui.cs @@ -348,7 +348,19 @@ function GMJ_Browser::onDatabaseRow( %this, %row, %isLastRow, %key ) if ( %isLastRow ) { GMJ_StatusText.setValue( "Querying the master server..." ); - queryMasterServer( $JoinGamePort, 0, "Any", "Any", 0, 255, 16, 0xFFFFFFFF, 0, 0, %this.buddyList ); + queryMasterServer( + $JoinGamePort, // Port + 0, // Flags + "Any", // Rules Set + "Any", // Mission Type + 0, // Min Players + 255, // Max Players + 16, // Max Bots + 0xFFFFFFFF, // Region Mask + 0, // Max Ping + 0, // Min CPU Speed + 0, // Filter flags + %this.buddyList ); GMJ_StopBtn.setActive( true ); %this.buddyList = ""; } diff --git a/base/scripts/HuntersGame.cs b/base/scripts/HuntersGame.cs index b0c49c6..a7e03a2 100644 --- a/base/scripts/HuntersGame.cs +++ b/base/scripts/HuntersGame.cs @@ -508,7 +508,7 @@ function HuntersYardSaleTimeOut(%waypoint) %waypoint.delete(); } -function HuntersGame::updateFlagHoarder(%game) +function HuntersGame::updateFlagHoarder(%game, %eventClient) { %hoarder = -1; %maxFlags = -1; @@ -526,30 +526,36 @@ function HuntersGame::updateFlagHoarder(%game) //if we found our hoarder, set the waypoint, otherwise, delete it if (%hoarder > 0) { - if (!isObject(%game.hoarderWaypoint)) + //only update if the event (capping, picking up flag, etc...) was the actual hoarder + if (!isObject(%game.flagHoarder) || %game.flagHoarder == %eventClient) { - //create a waypoint at player's location... - %game.hoarderWaypoint = new WayPoint() + if (!isObject(%game.hoarderWaypoint)) { - position = %hoarder.player.position; - rotation = "1 0 0 0"; - scale = "1 1 1"; - name = "Flag Hoarder Was Here"; - dataBlock = "WayPointMarker"; - lockCount = "0"; - homingCount = "0"; - team = 0; - }; + //create a waypoint at player's location... + %game.hoarderWaypoint = new WayPoint() + { + position = %hoarder.player.position; + rotation = "1 0 0 0"; + scale = "1 1 1"; + name = "Flag Hoarder Was Here"; + dataBlock = "WayPointMarker"; + lockCount = "0"; + homingCount = "0"; + team = 0; + }; - //add the waypoint to the cleanup group - MissionCleanup.add(%game.hoarderWaypoint); + //add the waypoint to the cleanup group + MissionCleanup.add(%game.hoarderWaypoint); + } + + //set the position + %game.flagHoarder = %hoarder; + %game.hoarderWaypoint.setTransform(%hoarder.player.getWorldBoxCenter() SPC "0 0 1 0"); } - - //set the position - %game.hoarderWaypoint.setTransform(%hoarder.player.getWorldBoxCenter() SPC "0 0 1 0"); } else if (isObject(%game.hoarderWaypoint)) { + %game.flaghoarder = ""; %game.hoarderWaypoint.delete(); } } @@ -634,7 +640,7 @@ function HuntersGame::playerTouchFlag(%game, %player, %flag) } //new tracking - *everyone* automatically tracks the "flag hoarder" if they have at least 15 flags - %game.updateFlagHoarder(); + %game.updateFlagHoarder(%client); } } @@ -875,7 +881,7 @@ function Nexus::onCollision(%data, %obj, %colObj) messageAllExcept(%client, -1, 'MsgHuntPlayerScored', '\c2%1 returned 1 flag for 1 point.~wfx/misc/nexus_cap.wav', %client.name, 1); //new tracking - *everyone* automatically tracks the "flag hoarder" if they have at least 15 flags - Game.updateFlagHoarder(); + Game.updateFlagHoarder(%client); } //add the nexus effect @@ -892,7 +898,7 @@ function Nexus::onCollision(%data, %obj, %colObj) messageAllExcept(%client, -1, 'MsgHuntPlayerScored', '\c2%1 returned %2 flags for %3 points.~wfx/misc/nexus_cap.wav', %client.name, %numToScore, %totalScore); //new tracking - *everyone* automatically tracks the "flag hoarder" if they have at least 15 flags - Game.updateFlagHoarder(); + Game.updateFlagHoarder(%client); } //add the nexus effect @@ -909,7 +915,7 @@ function Nexus::onCollision(%data, %obj, %colObj) messageAllExcept(%client, -1, 'MsgHuntPlayerScored', '\c2%1 returned %2 flags for %3 points.~wfx/misc/nexus_cap.wav', %client.name, %numToScore, %totalScore); //new tracking - *everyone* automatically tracks the "flag hoarder" if they have at least 15 flags - Game.updateFlagHoarder(); + Game.updateFlagHoarder(%client); } //add the nexus effect @@ -1391,7 +1397,7 @@ function HuntersGame::throwFlags(%game, %player) messageClient(%client, 'MsgHuntYouHaveFlags', "", 0); //new tracking - *everyone* automatically tracks the "flag hoarder" if they have at least 15 flags - %game.updateFlagHoarder(); + %game.updateFlagHoarder(%client); } function HuntersGame::dropFlag(%game, %player) diff --git a/base/scripts/LaunchLanGui.cs b/base/scripts/LaunchLanGui.cs index b0ca3bd..7c713c1 100644 --- a/base/scripts/LaunchLanGui.cs +++ b/base/scripts/LaunchLanGui.cs @@ -60,6 +60,7 @@ function LaunchToolbarMenu::onSelect(%this, %id, %text) //case 8: // Play Recording // Canvas.pushDialog(RecordingsDlg); case 9: // Quit + IRCClient::quit(); LaunchTabView.closeAllTabs(); quit(); //case 10: // Log Off diff --git a/base/scripts/LobbyGui.cs b/base/scripts/LobbyGui.cs index 858fd58..c13cbe3 100644 --- a/base/scripts/LobbyGui.cs +++ b/base/scripts/LobbyGui.cs @@ -280,7 +280,7 @@ function LobbyPlayerPopup::onSelect( %this, %id, %text ) case 4: // Ban MessageBoxYesNo( "CONFIRM", "Are you sure you want to ban " @ %this.player.name @ "?", - "lobbyPlayerVote( VoteBanPlayer, \"BAN player\", " @ %this.player.clientId @ " );" ); + "lobbyPlayerVote( BanPlayer, \"BAN player\", " @ %this.player.clientId @ " );" ); case 5: // force observer forceToObserver(%this.player.clientId); @@ -466,7 +466,7 @@ function handleSuperAdminPlayerMessage( %msgType, %msgString, %client ) %player.isSuperAdmin = true; %player.isAdmin = true; } - alxPlay(VotePassSound, 0, 0, 0); + alxPlay(AdminForceSound, 0, 0, 0); } //------------------------------------------------------------------------------ @@ -537,7 +537,7 @@ function lobbyVote() return; case "VoteMatchStart": - startNewVote( "VoteMatchStart", "Started the Match" ); + startNewVote( "VoteMatchStart" ); schedule( 100, 0, lobbyReturnToGame ); return; @@ -572,7 +572,6 @@ function lobbyVote() if( !LobbyVoteMenu.tourneyChoose ) { startNewVote( "VoteChangeMission", - "change the mission to", %text, // Mission display name LobbyVoteMenu.typeName, // Mission type display name $clVoteCmd[%id], // Mission id @@ -581,7 +580,6 @@ function lobbyVote() else { startNewVote( "VoteTournamentMode", - "change the server to", %text, // Mission display name LobbyVoteMenu.typeName, // Mission type display name $clVoteCmd[%id], // Mission id @@ -592,7 +590,7 @@ function lobbyVote() return; case "timeLimit": - startNewVote( "VoteChangeTimeLimit", "change the time limit to", $clVoteCmd[%id] ); + startNewVote( "VoteChangeTimeLimit", $clVoteCmd[%id] ); LobbyVoteMenu.reset(); return; } @@ -613,6 +611,6 @@ function LobbyVoteMenu::reset( %this ) //------------------------------------------------------------------------------ function lobbyPlayerVote(%voteType, %actionMsg, %playerId) { - startNewVote(%voteType, %actionMsg, %playerId, 0, 0, 0, true); + startNewVote(%voteType, %playerId, 0, 0, 0, true); fillLobbyVoteMenu(); } diff --git a/base/scripts/OptionsDlg.cs b/base/scripts/OptionsDlg.cs index 9a1c8ad..c3edde5 100644 --- a/base/scripts/OptionsDlg.cs +++ b/base/scripts/OptionsDlg.cs @@ -2205,6 +2205,7 @@ function JoystickConfigDlg::setPane( %this, %pane ) else DeadZoneSlider.setValue( abs( firstWord( %deadZone ) ) / %scale ); InvertJoyAxisTgl.setValue( moveMap.isInverted( "joystick", %axisType ) ); + JoyAxisRelativeTgl.setValue( moveMap.isRelativeAxis( "joystick", %axisType ) ); } else { @@ -2213,6 +2214,7 @@ function JoystickConfigDlg::setPane( %this, %pane ) JoyAxisSlider.setValue( 0.5 ); DeadZoneSlider.setValue( 0.0 ); InvertJoyAxisTgl.setValue( false ); + JoyAxisRelativeTgl.setValue( %axisType $= "slider" ); } } @@ -2225,6 +2227,7 @@ function JoyAxisActionMenu::onSelect( %this, %id, %text ) DeadZoneSlider.setActive( %on ); DeadZoneText.setVisible( %on ); InvertJoyAxisTgl.setActive( %on ); + JoyAxisRelativeTgl.setActive( %on ); } //------------------------------------------------------------------------------ @@ -2259,21 +2262,18 @@ function bindJoystickAxis( %axisIndex, %cmdIndex ) %sens = JoyAxisSlider.getValue() * 100; %delta = DeadZoneSlider.getValue() * %sens; + %flags = "S"; + if ( InvertJoyAxisTgl.getValue() ) + %flags = %flags @ "I"; + if ( JoyAxisRelativeTgl.getValue() ) + %flags = %flags @ "L"; if ( %delta > 0 ) { %deadZone = "-" @ %delta SPC %delta; - if ( InvertJoyAxisTgl.getValue() ) - moveMap.bind( "joystick", %axis, "SDI", %deadZone, %sens, %cmd ); - else - moveMap.bind( "joystick", %axis, "SD", %deadZone, %sens, %cmd ); + moveMap.bind( "joystick", %axis, %flags @ "D", %deadZone, %sens, %cmd ); } else - { - if ( InvertJoyAxisTgl.getValue() ) - moveMap.bind( "joystick", %axis, "SI", %sens, %cmd ); - else - moveMap.bind( "joystick", %axis, "S", %sens, %cmd ); - } + moveMap.bind( "joystick", %axis, %flags, %sens, %cmd ); } //------------------------------------------------------------------------------ diff --git a/base/scripts/admin.cs b/base/scripts/admin.cs index 4ca3282..d22f503 100644 --- a/base/scripts/admin.cs +++ b/base/scripts/admin.cs @@ -1,5 +1,57 @@ -function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %arg3, %arg4, %playerVote) +// These have been secured against all those wanna-be-hackers. +$VoteMessage["VoteAdminPlayer"] = "Admin Player"; +$VoteMessage["VoteKickPlayer"] = "Kick Player"; +$VoteMessage["BanPlayer"] = "Ban Player"; +$VoteMessage["VoteChangeMission"] = "change the mission to"; +$VoteMessage["VoteTeamDamage", 0] = "enable team damage"; +$VoteMessage["VoteTeamDamage", 1] = "disable team damage"; +$VoteMessage["VoteTournamentMode"] = "change the server to"; +$VoteMessage["VoteChangeTimeLimit"] = "change the time limit to"; +$VoteMessage["VoteMatchStart"] = "start the match"; +$VoteMessage["VoteGreedMode", 0] = "enable Hoard Mode"; +$VoteMessage["VoteGreedMode", 1] = "disable Hoard Mode"; +$VoteMessage["VoteHoardMode", 0] = "enable Greed Mode"; +$VoteMessage["VoteHoardMode", 1] = "disable Greed Mode"; + +function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %playerVote) { + // haha - who gets the last laugh... No admin for you! + if( %typeName $= "VoteAdminPlayer" && !$Host::allowAdminPlayerVotes ) + return; + + %typePass = true; + + // if not a valid vote, turn back. + if( $VoteMessage[ %typeName ] $= "" && %typeName !$= "VoteTeamDamage" ) + if( $VoteMessage[ %typeName ] $= "" && %typeName !$= "VoteHoardMode" ) + if( $VoteMessage[ %typeName ] $= "" && %typeName !$= "VoteGreedMode" ) + %typePass = false; + + if(( $VoteMessage[ %typeName, $TeamDamage ] $= "" && %typeName $= "VoteTeamDamage" )) + %typePass = false; + + if( !%typePass ) + return; // -> bye ;) + + if( %typeName $= "BanPlayer" ) + if( !%client.isSuperAdmin ) + return; // -> bye ;) + + %isAdmin = ( %client.isAdmin || %client.isSuperAdmin ); + + // keep these under the server's control. I win. + if( !%playerVote ) + %actionMsg = $VoteMessage[ %typeName ]; + else if( %typeName $= "VoteTeamDamage" || %typeName $= "VoteGreedMode" || %typeName $= "VoteHoardMode" ) + %actionMsg = $VoteMessage[ %typeName, $TeamDamage ]; + else + %actionMsg = $VoteMessage[ %typeName ]; + + if( !%client.canVote && !%isAdmin ) + { + return; + } + if ( !%client.isAdmin || ( ( %arg1.isAdmin && ( %client != %arg1 ) ) ) ) { %teamSpecific = false; @@ -9,9 +61,9 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar %clientsVoting = 0; //send a message to everyone about the vote... - if (%playerVote) + if ( %playerVote ) { - %teamSpecific = Game.numTeams > 1; + %teamSpecific = ( %typeName $= "VoteKickPlayer" ); %kickerIsObs = %client.team == 0; %kickeeIsObs = %arg1.team == 0; %sameTeam = %client.team == %arg1.team; @@ -27,9 +79,9 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar messageClient(%client, '', "\c2Player votes must be team based."); return; } - - // kicking and banning are team specific - if(%typeName $= "VoteKickPlayer" || %typeName $= "VoteBanPlayer") + + // kicking is team specific + if( %typeName $= "VoteKickPlayer" ) { if(%arg1.isSuperAdmin) { @@ -38,6 +90,8 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar } Game.kickClient = %arg1; + Game.kickGuid = %arg1.guid; + Game.kickTeam = %arg1.team; if(%teamSpecific) { for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) @@ -204,19 +258,29 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar messageClient(%client, '', '\c2You can not %1 %2, %3 is a Super Admin!', %actionMsg, %arg1.name, %gender); } } + + %client.canVote = false; + %client.rescheduleVote = schedule( ($Host::voteSpread * 1000) + ($Host::voteTime * 1000) , 0, "resetVotePrivs", %client ); +} + +function resetVotePrivs( %client ) +{ + //messageClient( %client, '', 'You may now start a new vote.'); + %client.canVote = true; + %client.rescheduleVote = ""; } function serverCmdSetPlayerVote(%client, %vote) { // players can only vote once - if(%client.vote $= "") + if( %client.vote $= "" ) { %client.vote = %vote; if(%client.vote == 1) messageAll('addYesVote', ""); else messageAll('addNoVote', ""); - + commandToClient(%client, 'voteSubmitted', %vote); } } @@ -254,6 +318,7 @@ function calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4) eval( "Game." @ %typeName @ "(false,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" ); Game.scheduleVote = ""; Game.kickClient = ""; + clearVotes(); } function clearVotes() @@ -282,7 +347,6 @@ function setModeFFA( %mission, %missionType ) { if( $Host::TournamentMode ) { - $TeamDamage = 1; $Host::TournamentMode = false; if( isObject( Game ) ) @@ -298,7 +362,6 @@ function setModeTournament( %mission, %missionType ) { if( !$Host::TournamentMode ) { - $TeamDamage = 1; $Host::TournamentMode = true; if( isObject( Game ) ) diff --git a/base/scripts/aiBotProfiles.cs b/base/scripts/aiBotProfiles.cs index 9698212..e02e939 100644 --- a/base/scripts/aiBotProfiles.cs +++ b/base/scripts/aiBotProfiles.cs @@ -269,7 +269,7 @@ $BotProfile[9, skill] = 0.99; $BotProfile[9, offense] = false; $BotProfile[9, voicePitch] = 1.12; $BotProfile[10, name] = "HexaBOTic"; -$BotProfile[10, skill] = 1.99; +$BotProfile[10, skill] = 0.99; $BotProfile[10, offense] = true; $BotProfile[10, voicePitch] = 0.895; $BotProfile[11, name] = "Sne/\kBOT"; diff --git a/base/scripts/aiDebug.cs b/base/scripts/aiDebug.cs index f4bf9b1..291d6a1 100644 --- a/base/scripts/aiDebug.cs +++ b/base/scripts/aiDebug.cs @@ -204,6 +204,7 @@ function createAIDebugDlg() visible = "True"; setFirstResponder = "True"; helpTag = "0"; + bypassHideCursor = "1"; new DebugView(aiDebug) { @@ -235,6 +236,13 @@ function ToggleAIDebug(%make) createAIDebugDlg(); Canvas.pushDialog(aiDebugDlg, 70); $AIDebugActive = true; + + //make sure we're debuging the correct client + if (LocalClientConnection.getControlObject() == LocalClientConnection.camera) + { + if (isObject(LocalClientConnection.observeClient)) + aidebug(LocalClientConnection.observeClient); + } } } } diff --git a/base/scripts/aiDefaultTasks.cs b/base/scripts/aiDefaultTasks.cs index 659e28d..6224ffa 100644 --- a/base/scripts/aiDefaultTasks.cs +++ b/base/scripts/aiDefaultTasks.cs @@ -18,6 +18,7 @@ $AIWeightPatrolling = 2000; //Hunters weights... $AIHuntersWeightMustCap = 4690; +$AIHuntersWeightNeedHealth = 4625; $AIHuntersWeightShouldCap = 4425; $AIHuntersWeightMustEngage = 4450; $AIHuntersWeightShouldEngage = 4325; diff --git a/base/scripts/aiHunters.cs b/base/scripts/aiHunters.cs index ba9d038..9726643 100644 --- a/base/scripts/aiHunters.cs +++ b/base/scripts/aiHunters.cs @@ -53,6 +53,7 @@ function AIHuntersTask::assume(%task, %client) %task.setMonitorFreq(10); %task.pickupFlag = -1; %task.engageTarget = -1; + %task.getHealth = -1; %task.capFlags = false; } @@ -60,6 +61,7 @@ function AIHuntersTask::retire(%task, %client) { %task.pickupFlag = -1; %task.engageTarget = -1; + %task.getHealth = -1; %task.capFlags = false; } @@ -88,30 +90,66 @@ function AIHuntersTask::weight(%task, %client) if (%nexusDist < 0) %nexusDist = 32767; + //validate the health item + if (isObject(%task.getHealth)) + { + if (%task.getHealth.isHidden()) + %task.getHealth = -1; + else if ((%task.getHealth.getDataBlock().getName() $= "DeployedStationInventory") || + (%task.getHealth.getDataBlock().getName() $= "StationInventory")) + { + if (%task.getHealth.isDisabled() && !%task.getHealth.isPowered()) + %task.getHealth = -1; + } + } + //find the dist to the closest health %healthDist = 32767; %damage = %client.player.getDamagePercent(); - if (%damage > 0.7) + if (%client.flagCount < 5) + %damageTolerance = 0.7; + else + %damageTolerance = 0.25 + ((%client.getSkillLevel() * %client.getSkillLevel()) * 0.35); + if (%damage > %damageTolerance) { - //search for a health kit - %closestHealth = AIFindSafeItem(%client, "Health"); - if (%closestHealth > 0) - { - %healthDist = %client.getPathDistance(%closestHealth); - if (%healthDist < 0) - %healthDist = 32767; - } + if (!isObject(%task.getHealth)) + { + //search for a health kit + %closestHealth = AIFindSafeItem(%client, "Health"); + if (isObject(%closestHealth)) + { + %healthDist = %client.getPathDistance(%closestHealth.getWorldBoxCenter()); + if (%healthDist < 0) + %healthDist = 32767; + else + %healthItem = %closestHealth; + } - //else search for an inventory station - else - { - %result = AIFindClosestInventory(%client, false); - %closestInv = getWord(%result, 0); - %closestDist = getWord(%result, 1); - if (%closestInv > 0) - %healthDist = %closestDist; - } - } + //else search for an inventory station + else + { + %result = AIFindClosestInventory(%client, false); + %closestInv = getWord(%result, 0); + %closestDist = getWord(%result, 1); + if (isObject(%closestInv)) + { + %healthDist = %closestDist; + %healthItem = %closestInv; + } + } + } + else + { + %healthDist = %client.getPathDistance(%task.getHealth.getWorldBoxCenter()); + if (%healthDist < 0) + { + %healthDist = 32767; + %task.getHealth = -1; + } + } + } + else + %task.getHealth = -1; //see if we need to cap - make sure we're actually able first %mustCap = false; @@ -199,16 +237,15 @@ function AIHuntersTask::weight(%task, %client) //If there's a tough or equal enemy nearby, or no flags, think about capping //ie. never cap if there are flags nearby and no enemies... - if ((AIClientIsAlive(%closestEnemy) && AIEngageWhoWillWin(%closestEnemy, %client) != %client) || + if ((AICheckEnemyDanger(%client, 35) >= 3 && %damage > %damageTolerance) || (!isObject(%closestFlag) || %closestFlagDist > $AIHuntersCloseFlagDist)) { //if we've got enough to take the lead, and there are no flags in the vicinity if ((!%clientIsInLead && %needFlagsForLead == 0) || %highestScore == 0) %mustCap = true; - //else if we're about to get our butt kicked and we're much closer to the nexus than to health... - else if ((AIClientIsAlive(%closestEnemy) && AIEngageWhoWillWin(%closestEnemy, %client) == %closestEnemy) && - (%healthDist - %nexusDist > 100)) + //else if we're about to get our butt kicked... + else if (AIClientIsAlive(%closestEnemy) && AIEngageWhoWillWin(%closestEnemy, %client) == %closestEnemy) { %mustCap = true; } @@ -238,7 +275,9 @@ function AIHuntersTask::weight(%task, %client) if (%needFlagsForLead == 0 || %numEnemyFlags < %needFlagsForLead || Game.teamMode) { if (%numToScore >= $AIHuntersMinFlagsToCap + (%client.getSkillLevel() * %client.getSkillLevel() * 15)) + { %shouldCap = true; + } } } } @@ -257,15 +296,19 @@ function AIHuntersTask::weight(%task, %client) } } - //if we've made it this far, we either can't cap, or there's no need to cap... + //////////////////////////////////////////////////////////////////////////////////// + // if we've made it this far, we either can't cap, or there's no need to cap... // + //////////////////////////////////////////////////////////////////////////////////// - //if we're engaging someone that's going to kill us, return 0 and let the patrol take over... - %currentTarget = %client.getEngageTarget(); - if ((AIClientIsAlive(%currentTarget) && AIEngageWhoWillWin(%currentTarget, %client) == %currentTarget) && %healthDist < 300) - { - %task.setWeight(0); - return; - } + //see if we need health + if (%damage > %damageTolerance && (isObject(%healthItem) || isObject(%task.getHealth))) + { + if (!isObject(%task.getHealth)) + %task.getHealth = %healthItem; + + %task.setWeight($AIHuntersWeightNeedHealth); + return; + } //find the closest player with the most flags (that we have los to) %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); @@ -348,6 +391,15 @@ function AIHuntersTask::monitor(%task, %client) %client.setEngageTarget(%task.engageTarget); } + //see if we've should go for health... + else if (isObject(%task.getHealth)) + { + %client.stepMove(%task.getHealth.getWorldBoxCenter(), 1); + + if (AIClientIsAlive(%task.engageTarget)) + %client.setEngageTarget(%task.engageTarget); + } + //else see if there's just someone to engage else if (AIClientIsAlive(%task.engageTarget)) %client.stepEngage(%task.engageTarget); @@ -361,6 +413,31 @@ function AIHuntersTask::monitor(%task, %client) // AIHunters utility functions //--------------------------------------------------------------------------- +//this function checks to make sure a bot isn't in a mosh pit of enemies +//notice it cheats by not using LOS... ) +function AICheckEnemyDanger(%client, %radius) +{ + %numEnemies = 0; + for (%i = 0; %i < ClientGroup.getCount(); %i++) + { + %cl = ClientGroup.getObject(%i); + if (AIClientIsAlive(%cl) && %cl.team != %client.team) + { + %dist = %client.getPathDistance(%cl.player.position); + if (%dist < %radius) + { + %winner = AIEngageWhoWillWin(%cl, %client); + if (%winner == %cl) + %numEnemies += 3; + else if (%winner != %client) + %numEnemies++; + } + } + } + + return %numEnemies; +} + function AIFindClosestFlag(%client, %radius) { %closestFlag = -1; @@ -436,7 +513,6 @@ function aih() function aiHlist() { - $timescale = 0.01; %count = ClientGroup.getCount(); for (%i = 0; %i < %count; %i++) { diff --git a/base/scripts/aiInventory.cs b/base/scripts/aiInventory.cs index 2daf551..010e76c 100644 --- a/base/scripts/aiInventory.cs +++ b/base/scripts/aiInventory.cs @@ -119,6 +119,7 @@ function AIBuyInventory(%client, %requiredEquipment, %equipmentSets, %buyInvTime %client.invBuyList = %inventorySet; //the list/set of items we're going to buy... %client.buyingSet = %buyingSet; //whether it's a list or a set... %client.isSeekingInv = false; + %client.seekingInv = ""; //now process the state machine return AIProcessBuyInventory(%client); diff --git a/base/scripts/client.cs b/base/scripts/client.cs index 37845bb..eb1bfe1 100644 --- a/base/scripts/client.cs +++ b/base/scripts/client.cs @@ -318,7 +318,7 @@ function onConnectionToServerLost( %msg ) } // Client voting functions: -function startNewVote(%name, %actionMsg, %arg1, %arg2, %arg3, %arg4, %playerVote) +function startNewVote(%name, %arg1, %arg2, %arg3, %arg4, %playerVote) { if ( %arg1 $= "" ) %arg1 = 0; @@ -331,7 +331,7 @@ function startNewVote(%name, %actionMsg, %arg1, %arg2, %arg3, %arg4, %playerVote if ( %playerVote $= "" ) %playerVote = 0; - commandToServer('startNewVote', %name, %actionMsg, %arg1, %arg2, %arg3, %arg4, %playerVote); + commandToServer('startNewVote', %name, %arg1, %arg2, %arg3, %arg4, %playerVote); } function setPlayerVote(%vote) diff --git a/base/scripts/controlDefaults.cs b/base/scripts/controlDefaults.cs index 619de32..14c0d84 100644 --- a/base/scripts/controlDefaults.cs +++ b/base/scripts/controlDefaults.cs @@ -378,7 +378,7 @@ function throwGrenade( %val ) commandToServer( 'startThrowCount' ); else commandToServer( 'endThrowCount' ); - $mvTriggerCount4++; + $mvTriggerCount4 += $mvTriggerCount4 & 1 == %val ? 2 : 1; } function placeMine( %val ) @@ -387,7 +387,7 @@ function placeMine( %val ) commandToServer( 'startThrowCount' ); else commandToServer( 'endThrowCount' ); - $mvTriggerCount5++; + $mvTriggerCount5 += $mvTriggerCount5 & 1 == %val ? 2 : 1; } function placeBeacon( %val ) @@ -842,7 +842,8 @@ function togglePlayerArmor(%val) function jump(%val) { - $mvTriggerCount2++; + //$mvTriggerCount2++; + $mvTriggerCount2 += $mvTriggerCount2 & 1 == %val ? 2 : 1; } // moveMap.bind(keyboard, "alt c", playCel); @@ -863,17 +864,17 @@ function jump(%val) function mouseFire(%val) { - $mvTriggerCount0++; + $mvTriggerCount0 += $mvTriggerCount0 & 1 == %val ? 2 : 1; } function mouseJet(%val) { - $mvTriggerCount3++; // Fire + $mvTriggerCount3 += $mvTriggerCount3 & 1 == %val ? 2 : 1; } function altTrigger(%val) { - $mvTriggerCount1++; // Alt Trigger + $mvTriggerCount1 += $mvTriggerCount1 & 1 == %val ? 2 : 1; } function testLOSTarget() diff --git a/base/scripts/defaultGame.cs b/base/scripts/defaultGame.cs index 443f439..84f4552 100644 --- a/base/scripts/defaultGame.cs +++ b/base/scripts/defaultGame.cs @@ -2338,7 +2338,11 @@ function DefaultGame::onAIKilledClient(%game, %clVictim, %clAttacker, %damageTyp //------------------------------------------------------------------------------ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %key ) { + if( !%targetClient.matchStartReady ) + return; + %isAdmin = ( %client.isAdmin || %client.isSuperAdmin ); + %isTargetSelf = ( %client == %targetClient ); %isTargetAdmin = ( %targetClient.isAdmin || %targetClient.isSuperAdmin ); %isTargetBot = %targetClient.isAIControlled(); @@ -2349,10 +2353,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k else if ( %client.isAdmin ) %outrankTarget = !%targetClient.isAdmin; - if( ! %targetClient.matchStartReady ) - return; - - if( %client.isSuperAdmin ) + if( %client.isSuperAdmin && %targetClient.guid != 0 ) { messageClient( %client, 'MsgPlayerPopupItem', "", %key, "addAdmin", "", 'Add to Server Admin List', 10); messageClient( %client, 'MsgPlayerPopupItem', "", %key, "addSuperAdmin", "", 'Add to Server SuperAdmin List', 11); @@ -2366,7 +2367,6 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k else messageClient( %client, 'MsgPlayerPopupItem', "", %key, "MutePlayer", "", 'Mute', 1); - //if ( !%isTargetBot ) if ( !%isTargetBot && %client.canListenTo( %targetClient ) ) { if ( %client.getListenState( %targetClient ) ) @@ -2375,6 +2375,9 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k messageClient( %client, 'MsgPlayerPopupItem', "", %key, "ListenPlayer", "", 'Enable Voice Com', 9 ); } } + + if( !%client.canVote && !%isAdmin ) + return; // regular vote options on players if ( %game.scheduleVote $= "" && !%isAdmin && !%isTargetAdmin ) @@ -2442,6 +2445,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k //------------------------------------------------------------------------------ function DefaultGame::sendGameVoteMenu( %game, %client, %key ) { + %isAdmin = ( %client.isAdmin || %client.isSuperAdmin ); %multipleTeams = %game.numTeams > 1; // no one is going anywhere until this thing starts @@ -2465,6 +2469,9 @@ function DefaultGame::sendGameVoteMenu( %game, %client, %key ) // if( $HostGameBotCount > 0 && %totalSlots > 0 && %client.isAdmin) //messageClient( %client, 'MsgVoteItem', "", %key, 'Addbot', "", 'Add a Bot' ); } + + if( !%client.canVote && !%isAdmin ) + return; if ( %game.scheduleVote $= "" ) { @@ -2604,16 +2611,16 @@ function DefaultGame::voteTeamDamage(%game, %admin) %cause = ""; if(%admin) { - if($teamDamage) + if($teamDamage) { - messageAll('MsgAdminForce', '\c2The Admin has disabled team damage.'); - $teamDamage = 0; + messageAll('MsgAdminForce', '\c2The Admin has disabled team damage.'); + $Host::TeamDamageOn = $TeamDamage = 0; %setto = "disabled"; } else { messageAll('MsgAdminForce', '\c2The Admin has enabled team damage.'); - $teamDamage = 1; + $Host::TeamDamageOn = $TeamDamage = 1; %setto = "enabled"; } %cause = "(admin)"; @@ -2626,13 +2633,13 @@ function DefaultGame::voteTeamDamage(%game, %admin) if($teamDamage) { messageAll('MsgVotePassed', '\c2Team damage was disabled by vote.'); - $teamDamage = 0; + $Host::TeamDamageOn = $TeamDamage = 0; %setto = "disabled"; } else { messageAll('MsgVotePassed', '\c2Team damage was enabled by vote.'); - $teamDamage = 1; + $Host::TeamDamageOn = $TeamDamage = 1; %setto = "enabled"; } %cause = "(vote)"; @@ -2698,12 +2705,12 @@ function DefaultGame::voteMatchStart( %game, %admin) { if(!%ready) { - messageClient( %client, 'msgClient', "\c2No players are ready yet."); + messageClient( %client, 'msgClient', '\c2No players are ready yet.'); return; } else { - messageAll('msgMissionStart', 'The admin has forced the match to start.'); + messageAll('msgMissionStart', '\c2The admin has forced the match to start.'); %cause = "(admin)"; startTourneyCountdown(); } @@ -2712,7 +2719,7 @@ function DefaultGame::voteMatchStart( %game, %admin) { if(!%ready) { - messageAll( 'msgClient', "\c2Vote passed to start Match, but no players are ready yet."); + messageAll( 'msgClient', '\c2Vote passed to start match, but no players are ready yet.'); return; } else @@ -2740,7 +2747,7 @@ function DefaultGame::voteFFAMode( %game, %admin, %client ) if (%admin) { - messageAll('MsgAdminForce', "\c2The Admin has switched the server to Free For All mode.", %client); + messageAll('MsgAdminForce', '\c2The Admin has switched the server to Free For All mode.', %client); setModeFFA($CurrentMission, $CurrentMissionType); %cause = "(admin)"; } @@ -2749,7 +2756,7 @@ function DefaultGame::voteFFAMode( %game, %admin, %client ) %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100)) { - messageAll('MsgVotePassed', "\c2Server switched to Free For All mode by vote.", %client); + messageAll('MsgVotePassed', '\c2Server switched to Free For All mode by vote.', %client); setModeFFA($CurrentMission, $CurrentMissionType); %cause = "(vote)"; } @@ -2834,49 +2841,43 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client) { %cause = ""; %name = %client.nameBase; + if(%admin) { - kick(%client, %admin); + kick(%client, %admin, %client.guid ); %cause = "(admin)"; } else { - %team = %client.team; - %totalVotes = %game.votesFor[%team] + %game.votesAgainst[%team]; - if(%totalVotes > 0 && (%game.votesFor[%team] / %totalVotes) > ($Host::VotePasspercent / 100)) + //%team = %client.team; + %totalVotes = %game.votesFor[%game.kickTeam] + %game.votesAgainst[%game.kickTeam]; + if(%totalVotes > 0 && (%game.votesFor[%game.kickTeam] / %totalVotes) > ($Host::VotePasspercent / 100)) { - kick(%client, %admin); + kick(%client, %admin, Game.kickGuid); %cause = "(vote)"; } else messageAll('MsgVoteFailed', '\c2Kick player vote did not pass'); } + + %game.kickTeam = ""; + %game.kickGuid = ""; + if(%cause !$= "") logEcho(%name@" (cl "@%client@") kicked "@%cause); } //------------------------------------------------------------------------------ -function DefaultGame::voteBanPlayer(%game, %admin, %client) +function DefaultGame::banPlayer(%game, %admin, %client) { %cause = ""; %name = %client.nameBase; - if(%admin) + if( %admin ) { - ban(%client, %admin); + ban( %client, %admin ); %cause = "(admin)"; } - else - { - %team = %client.team; - %totalVotes = %game.votesFor[%team] + %game.votesAgainst[%team]; - if((%totalVotes > 0) && (%game.votesFor[%team] / %totalVotes) > ($Host::VotePasspercent / 100)) - { - ban(%client, %admin); - %cause = "(vote)"; - } - else - messageAll('MsgVoteFailed', '\c2Ban player vote did not pass.'); - } + if(%cause !$= "") logEcho(%name@" (cl "@%client@") banned "@%cause); } @@ -2885,11 +2886,10 @@ function DefaultGame::voteBanPlayer(%game, %admin, %client) function DefaultGame::voteAdminPlayer(%game, %admin, %client) { %cause = ""; - %name = getTaggedString(%client.name); if (%admin) { - messageAll('MsgAdminAdminPlayer', "\c2The Admin made " @ %name @ " an admin.", %client); + messageAll('MsgAdminAdminPlayer', '\c2The Admin made %2 an admin.', %client, %client.name); %client.isAdmin = 1; %cause = "(admin)"; } @@ -2898,12 +2898,12 @@ function DefaultGame::voteAdminPlayer(%game, %admin, %client) %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst; if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100)) { - messageAll('MsgAdminPlayer', "\c2" @ %name @ " was made an admin by vote."); + messageAll('MsgAdminPlayer', '\c2%2 was made an admin by vote.', %client, %client.name); %client.isAdmin = 1; %cause = "(vote)"; } else - messageAll('MsgVoteFailed', '\c2Admin vote did not pass.'); + messageAll('MsgVoteFailed', '\c2Vote to make %1 an admin did not pass.', %client.name); } if(%cause !$= "") logEcho(%client.nameBase@" (cl "@%client@") made admin "@%cause); diff --git a/base/scripts/deployables.cs b/base/scripts/deployables.cs index 84e3dad..c365cc4 100644 --- a/base/scripts/deployables.cs +++ b/base/scripts/deployables.cs @@ -5,6 +5,7 @@ // Note: cameras are treated as grenades, not "regular" deployables $TurretIndoorSpaceRadius = 20; // deployed turrets must be this many meters apart +$InventorySpaceRadius = 20; // deployed inventory must be this many meters apart $TurretIndoorSphereRadius = 50; // radius for turret frequency check $TurretIndoorMaxPerSphere = 4; // # of turrets allowed in above radius @@ -32,6 +33,7 @@ $NotDeployableReason::NoInteriorFound = 7; $NotDeployableReason::TurretTooClose = 8; $NotDeployableReason::TurretSaturation = 9; $NotDeployableReason::SurfaceTooNarrow = 10; +$NotDeployableReason::InventoryTooClose = 11; $MinDeployableDistance = 0.5; $MaxDeployableDistance = 4.0; //meters from body @@ -269,7 +271,7 @@ datablock SensorData(DeployPulseSensorObj) detectsPassiveJammed = false; detectsCloaked = false; detectionPings = true; - detectRadius = 120; + detectRadius = 150; }; datablock StaticShapeData(DeployedPulseSensor) : StaticShapeDamageProfile @@ -583,11 +585,16 @@ function ShapeBaseImageData::testHavePurchase(%item, %xform) //don't check this for non-Clasping turret deployables return true; } - + //------------------------------------------------- -function TurretIndoorDeployableImage::testTurretTooClose(%item, %plyr) +function ShapeBaseImageData::testInventoryTooClose(%item, %plyr) { - InitContainerRadiusSearch(%item.surfacePt, $TurretIndoorSpaceRadius, $TypeMasks::StaticShapeObjectType); + return false; +} + +function InventoryDeployableImage::testInventoryTooClose(%item, %plyr) +{ + InitContainerRadiusSearch(%item.surfacePt, $InventorySpaceRadius, $TypeMasks::StaticShapeObjectType); // old function was only checking whether the first object found was a turret -- also wasn't checking // which team the object was on @@ -595,7 +602,7 @@ function TurretIndoorDeployableImage::testTurretTooClose(%item, %plyr) while((%found = containerSearchNext()) != 0) { %foundName = %found.getDataBlock().getName(); - if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor)) + if( (%foundName $= DeployedStationInventory) ) if (%found.team == %plyr.team) { %turretInRange = true; @@ -615,7 +622,27 @@ function TurretOutdoorDeployableImage::testTurretTooClose(%item, %plyr) while((%found = containerSearchNext()) != 0) { %foundName = %found.getDataBlock().getName(); - if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor)) + if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory)) + if (%found.team == %plyr.team) + { + %turretInRange = true; + break; + } + } + return %turretInRange; +} + +function TurretOutdoorDeployableImage::testTurretTooClose(%item, %plyr) +{ + InitContainerRadiusSearch(%item.surfacePt, $TurretOutdoorSpaceRadius, $TypeMasks::StaticShapeObjectType); + + // old function was only checking whether the first object found was a turret -- also wasn't checking + // which team the object was on + %turretInRange = false; + while((%found = containerSearchNext()) != 0) + { + %foundName = %found.getDataBlock().getName(); + if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory)) if (%found.team == %plyr.team) { %turretInRange = true; @@ -639,7 +666,7 @@ function TurretIndoorDeployableImage::testTurretSaturation(%item) while(%found) { %foundName = %found.getDataBlock().getName(); - if ((%foundName $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor)) + if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory)) { //found one %numTurretsNearby++; @@ -664,7 +691,7 @@ function TurretOutdoorDeployableImage::testTurretSaturation(%item) while(%found) { %foundName = %found.getDataBlock().getName(); - if ((%foundName $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor)) + if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory)) { //found one %numTurretsNearby++; @@ -697,7 +724,7 @@ function testNearbyDensity(%item, %radius) while(%found) { %foundName = %found.getDataBlock().getName(); - if ((%foundName $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor)) + if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory)) %turretCount++; %found = containerSearchNext(); } @@ -762,9 +789,15 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) else if (%item.testSelfTooClose(%plyr, %surfacePt)) %disqualified = $NotDeployableReason::SelfTooClose; else if (%item.testObjectTooClose(%surfacePt)) + { %disqualified = $NotDeployableReason::ObjectTooClose; + } else if (%item.testTurretTooClose(%plyr)) %disqualified = $NotDeployableReason::TurretTooClose; + else if (%item.testInventoryTooClose(%plyr)) + { + %disqualified = $NotDeployableReason::InventoryTooClose; + } else if (%item.testTurretSaturation()) %disqualified = $NotDeployableReason::TurretSaturation; else if (%disqualified == $NotDeployableReason::None) @@ -787,7 +820,7 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) %disqualified = $NotDeployableReason::SurfaceTooNarrow; } } - + if (%plyr.getMountedImage($BackpackSlot) == %item) //player still have the item? { if (%disqualified) @@ -879,6 +912,9 @@ function Deployables::displayErrorMsg(%item, %plyr, %slot, %error) case $NotDeployableReason::SurfaceTooNarrow: %msg = '\c2There is not adequate surface to clamp to here.%1'; + case $NotDeployableReason::InventoryTooClose: + %msg = '\c2Interference from a nearby inventory prevents placement here.%1'; + default: %msg = '\c2Deploy failed.'; } diff --git a/base/scripts/inventory.cs b/base/scripts/inventory.cs index 7396056..596b3e3 100644 --- a/base/scripts/inventory.cs +++ b/base/scripts/inventory.cs @@ -304,7 +304,10 @@ function ShapeBase::setInventory(%this,%data,%value,%force) function ShapeBase::getInventory(%this,%data) { - return %this.inv[%data.getName()]; + if ( isObject( %data ) ) + return( %this.inv[%data.getName()] ); + else + return( 0 ); } function ShapeBase::hasAmmo( %this, %weapon ) diff --git a/base/scripts/player.cs b/base/scripts/player.cs index b4919d0..0645b25 100644 --- a/base/scripts/player.cs +++ b/base/scripts/player.cs @@ -946,7 +946,8 @@ datablock SplashData(PlayerSplash) }; //---------------------------------------------------------------------------- - +// Jet data +//---------------------------------------------------------------------------- datablock ParticleData(HumanArmorJetParticle) { dragCoefficient = 0.0; @@ -977,6 +978,62 @@ datablock ParticleEmitterData(HumanArmorJetEmitter) particles = "HumanArmorJetParticle"; }; +datablock JetEffectData(HumanArmorJetEffect) +{ + texture = "special/jetExhaust02"; + coolColor = "0.0 0.0 1.0 1.0"; + hotColor = "0.2 0.4 0.7 1.0"; + activateTime = 0.2; + deactivateTime = 0.05; + length = 0.75; + width = 0.2; + speed = -15; + stretch = 2.0; + yOffset = 0.2; +}; + +datablock JetEffectData(HumanMediumArmorJetEffect) +{ + texture = "special/jetExhaust02"; + coolColor = "0.0 0.0 1.0 1.0"; + hotColor = "0.2 0.4 0.7 1.0"; + activateTime = 0.2; + deactivateTime = 0.05; + length = 0.75; + width = 0.2; + speed = -15; + stretch = 2.0; + yOffset = 0.4; +}; + +datablock JetEffectData(HumanLightFemaleArmorJetEffect) +{ + texture = "special/jetExhaust02"; + coolColor = "0.0 0.0 1.0 1.0"; + hotColor = "0.2 0.4 0.7 1.0"; + activateTime = 0.2; + deactivateTime = 0.05; + length = 0.75; + width = 0.2; + speed = -15; + stretch = 2.0; + yOffset = 0.2; +}; + +datablock JetEffectData(BiodermArmorJetEffect) +{ + texture = "special/jetExhaust02"; + coolColor = "0.0 0.0 1.0 1.0"; + hotColor = "0.8 0.6 0.2 1.0"; + activateTime = 0.2; + deactivateTime = 0.05; + length = 0.75; + width = 0.2; + speed = -15; + stretch = 2.0; + yOffset = 0.0; +}; + //---------------------------------------------------------------------------- // Foot puffs //---------------------------------------------------------------------------- @@ -1194,7 +1251,8 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile jetSound = ArmorJetSound; wetJetSound = ArmorJetSound; jetEmitter = HumanArmorJetEmitter; - + jetEffect = HumanArmorJetEffect; + boundingBox = "1.2 1.2 2.3"; pickupRadius = 0.75; @@ -1468,6 +1526,7 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile wetJetSound = ArmorWetJetSound; jetEmitter = HumanArmorJetEmitter; + jetEffect = HumanMediumArmorJetEffect; boundingBox = "1.45 1.45 2.4"; pickupRadius = 0.75; @@ -1561,7 +1620,7 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile max[DiscAmmo] = 15; max[SniperRifle] = 0; max[GrenadeLauncher] = 1; - max[GrenadeLauncherAmmo]= 10; + max[GrenadeLauncherAmmo]= 12; max[Mortar] = 0; max[MortarAmmo] = 0; max[MissileLauncher] = 1; @@ -1863,6 +1922,7 @@ datablock PlayerData(LightFemaleHumanArmor) : LightMaleHumanArmor { shapeFile = "light_female.dts"; waterBreathSound = WaterBreathFemaleSound; + jetEffect = HumanMediumArmorJetEffect; }; //---------------------------------------------------------------------------- @@ -1870,6 +1930,7 @@ datablock PlayerData(MediumFemaleHumanArmor) : MediumMaleHumanArmor { shapeFile = "medium_female.dts"; waterBreathSound = WaterBreathFemaleSound; + jetEffect = HumanArmorJetEffect; }; //---------------------------------------------------------------------------- @@ -1891,9 +1952,11 @@ datablock PlayerData(LightMaleBiodermArmor) : LightMaleHumanArmor { shapeFile = "bioderm_light.dts"; jetEmitter = BiodermArmorJetEmitter; + jetEffect = BiodermArmorJetEffect; + debrisShapeName = "bio_player_debris.dts"; - + //Foot Prints decalData = LightBiodermFootprint; decalOffset = 0.3; @@ -1913,6 +1976,7 @@ datablock PlayerData(MediumMaleBiodermArmor) : MediumMaleHumanArmor { shapeFile = "bioderm_medium.dts"; jetEmitter = BiodermArmorJetEmitter; + jetEffect = BiodermArmorJetEffect; debrisShapeName = "bio_player_debris.dts"; @@ -2423,7 +2487,7 @@ function Armor::doDismount(%this, %obj, %forced) // Position above dismount point %obj.setTransform(%pos); %obj.playAudio(0, UnmountVehicleSound); - %obj.applyImpulse(%pos, VectorScale(%impulseVec, %obj.getDataBlock().mass)); + %obj.applyImpulse(%pos, VectorScale(%impulseVec, %obj.getDataBlock().mass * 3)); %obj.setPilot(false); %obj.vehicleTurret = ""; } @@ -2440,6 +2504,7 @@ function Player::scriptKill(%player, %damageType) function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec) { +//error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )"); if(%targetObject.invincible || %targetObject.getState() $= "Dead") return; @@ -2476,12 +2541,16 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am //if the source object is a player object, player's don't have sensor groups // if it's a turret, get the sensor group of the target + // if its a vehicle (of any type) use the sensor group if (%sourceClient) %sourceTeam = %sourceClient.getSensorGroup(); else if(%damageType == $DamageType::Suicide) %sourceTeam = 0; else if(isObject(%sourceObject) && %sourceObject.getClassName() $= "Turret") %sourceTeam = getTargetSensorGroup(%sourceObject.getTarget()); + else if( isObject(%sourceObject) && + ( %sourceObject.getClassName() $= "FlyingVehicle" || %sourceObject.getClassName() $= "WheeledVehicle" ) || %sourceObject.getClassName() $= "HoverVehicle") + %sourceTeam = getTargetSensorGroup(%sourceObject.getTarget()); else { if (%sourceObject && %sourceObject.getTarget() >= 0 ) @@ -2534,7 +2603,8 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am %damageType == $DamageType::Mortar || %damageType == $DamageType::MortarTurret || %damageType == $DamageType::BomberBombs || - %damageType == $DamageType::SatchelCharge ) + %damageType == $DamageType::SatchelCharge || + %damageType == $DamageType::Missile ) { if( %previousDamage >= 0.35 ) // only if <= 35 percent damage remaining { diff --git a/base/scripts/projectiles.cs b/base/scripts/projectiles.cs index d4013c1..4a583e7 100644 --- a/base/scripts/projectiles.cs +++ b/base/scripts/projectiles.cs @@ -387,23 +387,32 @@ $ELFFireSound = 3; function ELFProjectileData::zapTarget(%data, %projectile, %target, %targeter) { - %oldERate = %target.getRechargeRate(); - %target.setRechargeRate(%oldERate - %data.drainEnergy); - %projectile.checkELFStatus(%data, %target, %targeter); + %oldERate = %target.getRechargeRate(); + %target.teamDamageStateOnZap = $teamDamage; + + if(!%target.teamDamageStateOnZap && %target.team == %targeter.team) + %target.setRechargeRate(%oldERate); + else + %target.setRechargeRate(%oldERate - %data.drainEnergy); + %projectile.checkELFStatus(%data, %target, %targeter); } function ELFProjectileData::unzapTarget(%data, %projectile, %target, %targeter) { - cancel(%projectile.ELFrecur); + cancel(%projectile.ELFrecur); %target.stopAudio($ELFZapSound); - %targeter.stopAudio($ELFFireSound); + %targeter.stopAudio($ELFFireSound); %target.zapSound = false; %targeter.zappingSound = false; - if(!%target.isDisabled()) - { - %oldERate = %target.getRechargeRate(); - %target.setRechargeRate(%oldERate + %data.drainEnergy); - } + + if(!%target.isDisabled()) + { + %oldERate = %target.getRechargeRate(); + if(!%target.teamDamageStateOnZap && %target.team == %targeter.team) + %target.setRechargeRate(%oldERate); + else + %target.setRechargeRate(%oldERate + %data.drainEnergy); + } } function ELFProjectileData::targetDestroyedCancel(%data, %projectile, %target, %targeter) @@ -549,7 +558,14 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse if(%amount > 0) %data.damageObject(%targetObject, %sourceObject, %position, %amount, %damageType, %momVec); else if( %explosionSource.getDataBlock().getName() $= "ConcussionGrenadeThrown" && %data.getClassName() $= "PlayerData" ) - %data.applyConcussion( %dist, %radius, %sourceObject, %targetObject ); + { + %data.applyConcussion( %dist, %radius, %sourceObject, %targetObject ); + + if(!$teamDamage && %sourceObject != %targetObject && %sourceObject.client.team == %targetObject.client.team) + { + messageClient(%targetObject.client, 'msgTeamConcussionGrenade', '\c1You were hit by %1\'s concussion grenade.', getTaggedString(%sourceObject.client.name)); + } + } if( %doImpulse ) %targetObject.applyImpulse(%position, %impulseVec); diff --git a/base/scripts/server.cs b/base/scripts/server.cs index 0360310..598b434 100644 --- a/base/scripts/server.cs +++ b/base/scripts/server.cs @@ -1,7 +1,6 @@ if($Host::TimeLimit $= "") $Host::TimeLimit = 20; -$teamDamage = 1; $SB::WODec = 0.004; // whiteout $SB::DFDec = 0.02; // damageFlash @@ -35,7 +34,7 @@ function CreateServer(%mission, %missionType) exec("scripts/turret.cs"); exec("scripts/weapTurretCode.cs"); exec("scripts/pack.cs"); - exec("scripts/vehicles/vehicle_spec_fx.cs"); // Must exist before other vehicle files or CRASH BOOM + exec("scripts/vehicles/vehicle_spec_fx.cs"); // Must exist before other vehicle files or CRASH BOOM exec("scripts/vehicles/serverVehicleHud.cs"); exec("scripts/vehicles/vehicle_shrike.cs"); exec("scripts/vehicles/vehicle_bomber.cs"); @@ -43,7 +42,7 @@ function CreateServer(%mission, %missionType) exec("scripts/vehicles/vehicle_wildcat.cs"); exec("scripts/vehicles/vehicle_tank.cs"); exec("scripts/vehicles/vehicle_mpb.cs"); - exec("scripts/vehicles/vehicle.cs"); // Must be added after all other vehicle files or EVIL BAD THINGS + exec("scripts/vehicles/vehicle.cs"); // Must be added after all other vehicle files or EVIL BAD THINGS exec("scripts/ai.cs"); exec("scripts/item.cs"); exec("scripts/station.cs"); @@ -69,7 +68,7 @@ function CreateServer(%mission, %missionType) for(%file = findFirstFile(%search); %file !$= ""; %file = findNextFile(%search)) { %type = fileBase(%file); // get the name of the script - exec("scripts/" @ %type @ ".cs"); + exec("scripts/" @ %type @ ".cs"); } $missionSequence = 0; @@ -88,8 +87,19 @@ function CreateServer(%mission, %missionType) schedule(0,0,startHeartbeat); // setup the bots for this server + if( $Host::BotsEnabled ) + initGameBots( %mission, %missionType ); + + // load the mission... + loadMission(%mission, %missionType, true); +} + +function initGameBots( %mission, %mType ) +{ + echo( "adding bots..." ); + AISystemEnabled( false ); - if ( $HostGameBotCount > 0 && %missionType !$= "SinglePlayer" ) + if ( $Host::BotCount > 0 && %mType !$= "SinglePlayer" ) { // Make sure this mission is bot enabled: for ( %idx = 0; %idx < $HostMissionCount; %idx++ ) @@ -100,20 +110,23 @@ function CreateServer(%mission, %missionType) if ( $BotEnabled[%idx] ) { - if ( $HostGameBotCount > 16 ) + if ( $Host::BotCount > 16 ) $HostGameBotCount = 16; - if ( $HostGameBotCount > $Host::MaxPlayers - 1 ) + else + $HostGameBotCount = $Host::BotCount; + + if ( $Host::BotCount > $Host::MaxPlayers - 1 ) $HostGameBotCount = $Host::MaxPlayers - 1; - //set the objective reassessment timeslice var - $AITimeSliceReassess = 0; + //set the objective reassessment timeslice var + $AITimeSliceReassess = 0; aiConnectMultiple( $HostGameBotCount, $Host::MinBotDifficulty, $Host::MaxBotDifficulty, -1 ); } else + { $HostGameBotCount = 0; + } } - - loadMission(%mission, %missionType, true); } function findNextCycleMission() @@ -165,27 +178,25 @@ function DestroyServer() $missionRunning = false; allowConnections(false); stopHeartbeat(); - MissionGroup.delete(); - MissionCleanup.delete(); - if(isObject(game)) - { - game.deactivatePackages(); - game.delete(); - } + MissionGroup.delete(); + MissionCleanup.delete(); + if(isObject(game)) + { + game.deactivatePackages(); + game.delete(); + } if(isObject($ServerGroup)) $ServerGroup.delete(); // delete all the connections: while(ClientGroup.getCount()) - { - %client = ClientGroup.getObject(0); - if (%client.isAIControlled()) - %client.drop(); - else - %client.delete(); - } - - %HostGuidList = ""; + { + %client = ClientGroup.getObject(0); + if (%client.isAIControlled()) + %client.drop(); + else + %client.delete(); + } // delete all the data blocks... // this will cause problems if there are any connections @@ -209,7 +220,7 @@ function Disconnect() function DisconnectedCleanup() { - // clear the chat hud message vector + // clear the chat hud message vector HudMessageVector.clear(); if ( isObject( PlayerListGroup ) ) PlayerListGroup.delete(); @@ -225,9 +236,9 @@ function DisconnectedCleanup() clientCmdclearBottomPrint(); clientCmdClearCenterPrint(); - // clear the inventory and weapons hud - weaponsHud.clearAll(); - inventoryHud.clearAll(); + // clear the inventory and weapons hud + weaponsHud.clearAll(); + inventoryHud.clearAll(); // back to the launch screen Canvas.setContent(LaunchGui); @@ -240,10 +251,11 @@ function DisconnectedCleanup() if ( !EmailGui.checkingEmail && EmailGui.checkSchedule $= "" ) CheckEmail( true ); - IRCClient::onLeaveGame(); + IRCClient::onLeaveGame(); } -function kick(%client, %admin) +// we pass the guid as well, in case this guy leaves the server. +function kick( %client, %admin, %guid ) { if(%admin) messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.name ); @@ -252,21 +264,30 @@ function kick(%client, %admin) messageClient(%client, 'onClientKicked', ""); messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client ); - - if (%client.isAIControlled()) + + if( %client.isAIControlled() ) { $HostGameBotCount--; %client.drop(); } else { - // kill and delete this client - if( isObject(%client.player) ) - %client.player.scriptKill(0); - - %client.schedule(700, "delete"); - - BanList::add( %client.guid, %client.getAddress(), $Host::KickBanTime ); + %count = ClientGroup.getCount(); + for( %i = 0; %i < %count; %i++ ) + { + %cl = ClientGroup.getObject( %i ); + if( %cl.guid == %guid ) + { + // kill and delete this client + if( isObject( %cl.player ) ) + %cl.player.scriptKill(0); + + %cl.schedule(700, "delete"); + + BanList::add( %guid, "0", $Host::KickBanTime ); + Game.kickGuid = ""; + } + } } } @@ -342,18 +363,18 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, } // Sex/Race defaults - switch$ ( %raceGender ) - { - case "Human Male": - %client.sex = "Male"; - %client.race = "Human"; - case "Human Female": - %client.sex = "Female"; - %client.race = "Human"; - case "Bioderm": - %client.sex = "Male"; - %client.race = "Bioderm"; - } + switch$ ( %raceGender ) + { + case "Human Male": + %client.sex = "Male"; + %client.race = "Human"; + case "Human Female": + %client.sex = "Female"; + %client.race = "Human"; + case "Bioderm": + %client.sex = "Male"; + %client.race = "Bioderm"; + } %client.armor = "Light"; // Override the connect name if this server does not allow smurfs: @@ -373,7 +394,6 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, else %name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co"; - addToServerGuidList( %client.guid ); %client.sendGuid = %client.guid; } else @@ -426,16 +446,16 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %name = %nameTry; } - %smurfName = %name; + %smurfName = %name; // Tag the name with the "smurf" color: %name = "\cp\c8" @ %name @ "\co"; } %client.name = addTaggedString(%name); - if(%client.isSmurf) - %client.nameBase = %smurfName; - else - %client.nameBase = %realName; + if(%client.isSmurf) + %client.nameBase = %smurfName; + else + %client.nameBase = %realName; %client.justConnected = true; %client.isReady = false; @@ -449,8 +469,8 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, // full reset of client target manager clientResetTargets(%client, false); - %client.voice = %voice; - %client.voiceTag = addtaggedString(%voice); + %client.voice = %voice; + %client.voiceTag = addtaggedString(%voice); //set the voice pitch based on a lookup table from their chosen voice %client.voicePitch = getValidVoicePitch(%voice, %voicePitch); @@ -468,18 +488,18 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, for(%cl = 0; %cl < %count; %cl++) { %recipient = ClientGroup.getObject(%cl); - if((%recipient != %client)) + if((%recipient != %client)) { // These should be "silent" versions of these messages... - messageClient(%client, 'MsgClientJoin', "", - %recipient.name, - %recipient, - %recipient.target, - %recipient.isAIControlled(), - %recipient.isAdmin, - %recipient.isSuperAdmin, - %recipient.isSmurf, - %recipient.sendGuid); + messageClient(%client, 'MsgClientJoin', "", + %recipient.name, + %recipient, + %recipient.target, + %recipient.isAIControlled(), + %recipient.isAdmin, + %recipient.isSuperAdmin, + %recipient.isSmurf, + %recipient.sendGuid); messageClient(%client, 'MsgClientJoinTeam', "", %recipient.name, $teamName[%recipient.team], %recipient, %recipient.team ); } @@ -535,8 +555,6 @@ function GameConnection::onDrop(%client, %reason) if(isObject(Game)) Game.onClientLeaveGame(%client); - if ( !%client.isSmurf ) - removeFromServerGuidList( %client.guid ); if ( $CurrentMissionType $= "SinglePlayer" ) messageAllExcept(%client, -1, 'MsgClientDrop', "", %client.name, %client); else @@ -551,27 +569,28 @@ function GameConnection::onDrop(%client, %reason) $HostGamePlayerCount--; // reset the server if everyone has left the game - if( $HostGamePlayerCount == 0 && $Host::Dedicated) + if( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated) schedule(0, 0, "resetServerDefaults"); } function dismountPlayers() { - // make sure all palyers are dismounted from vehicles and have normal huds + // make sure all palyers are dismounted from vehicles and have normal huds %count = ClientGroup.getCount(); for(%cl = 0; %cl < %count; %cl++) { %client = ClientGroup.getObject(%cl); - %player = %client.player; - if(%player.isMounted()) { - %player.unmount(); - commandToClient(%client, 'setHudMode', 'Standard', "", 0); - } + %player = %client.player; + if(%player.isMounted()) { + %player.unmount(); + commandToClient(%client, 'setHudMode', 'Standard', "", 0); + } } } function loadMission( %missionName, %missionType, %firstMission ) { + cls(); buildLoadInfo( %missionName, %missionType ); // reset all of these @@ -624,7 +643,7 @@ function loadMissionStage1(%missionName, %missionType, %firstMission) $CurrentMission = %missionName; $CurrentMissionType = %missionType; - + createInvBanCount(); echo("LOADING MISSION: " @ %missionName); @@ -708,6 +727,12 @@ function loadMissionStage2() $CountdownStarted = false; AISystemEnabled( false ); + // Set the team damage here so that the game type can override it: + if ( $Host::TournamentMode ) + $TeamDamage = 1; + else + $TeamDamage = $Host::TeamDamageOn; + Game.missionLoadDone(); // start all the clients in the mission @@ -807,11 +832,12 @@ function GameConnection::dataBlocksDone( %client, %missionSequence ) return; %client.currentPhase = 2; - // targets require ShapeBase datablocks (only needed on first connection) - if(!%client.receivedTargets) + // only want to set this once... (targets will not be updated/sent until a + // client has this flag set) + if(!%client.getReceivedDataBlocks()) { + %client.setReceivedDataBlocks(true); sendTargetsToClient(%client); - %client.receivedTargets = true; } commandToClient(%client, 'MissionStartPhase2', $missionSequence); @@ -863,6 +889,11 @@ function serverSetClientTeamState( %client ) { dataBlock = Observer; }; + + if( isObject( %client.rescheduleVote ) ) + Cancel( %client.rescheduleVote ); + %client.canVote = true; + %client.rescheduleVote = ""; MissionCleanup.add( %client.camera ); // we get automatic cleanup this way. @@ -954,16 +985,16 @@ function serverSetClientTeamState( %client ) function HideHudHACK(%visible) { //compassHud.setVisible(%visible); - //enerDamgHud.setVisible(%visible); + //enerDamgHud.setVisible(%visible); retCenterHud.setVisible(%visible); reticleFrameHud.setVisible(%visible); //invPackHud.setVisible(%visible); weaponsHud.setVisible(%visible); - outerChatHud.setVisible(%visible); - objectiveHud.setVisible(%visible); + outerChatHud.setVisible(%visible); + objectiveHud.setVisible(%visible); chatHud.setVisible(%visible); navHud.setVisible(%visible); - //watermarkHud.setVisible(%visible); + //watermarkHud.setVisible(%visible); hudClusterBack.setVisible(%visible); inventoryHud.setVisible(%visible); clockHUD.setVisible(%visible); @@ -985,10 +1016,10 @@ function ServerPlay3D(%profile,%transform) function clientCmdSetFirstPerson(%value) { $firstPerson = %value; - if(%value) - ammoHud.setVisible(true); - else - ammoHud.setVisible(false); + if(%value) + ammoHud.setVisible(true); + else + ammoHud.setVisible(false); } function clientCmdVehicleMount() @@ -1013,7 +1044,7 @@ function serverCmdSAD( %client, %password ) %client.isAdmin = true; %client.isSuperAdmin = true; %name = getTaggedString( %client.name ); - MessageAll( 'MsgAdminForce', "\c2" @ %name @ " has become Admin by force.", %client ); + MessageAll( 'MsgSuperAdminPlayer', '\c2%2 has become a Super Admin by force.', %client, %client.name ); } } @@ -1284,7 +1315,7 @@ function serverCmdChangePlayersTeam( %clientRequesting, %client, %team) } } else - commandToClient(%client, 'setHudMode', 'Standard', "", 0); + commandToClient(%client, 'setHudMode', 'Standard', "", 0); %multiTeam = (Game.numTeams > 1); if(%multiTeam) @@ -1310,16 +1341,16 @@ function serverCmdForcePlayerToObserver( %clientRequesting, %client ) function serverCmdTogglePlayerMute(%client, %who) { - if (%client.muted[%who]) - { - %client.muted[%who] = false; - messageClient(%client, 'MsgPlayerUnmuted', '%1 has been unmuted.', %who.name); - } - else - { - %client.muted[%who] = true; - messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name); - } + if (%client.muted[%who]) + { + %client.muted[%who] = false; + messageClient(%client, 'MsgPlayerUnmuted', '%1 has been unmuted.', %who.name); + } + else + { + %client.muted[%who] = true; + messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name); + } } //-------------------------------------------------------------------------- @@ -1400,7 +1431,7 @@ function serverCmdClientPickedTeam( %client, %option ) %client.observerMode = "pregame"; %client.notReady = true; %client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player ); - commandToClient(%client, 'setHudMode', 'Observer'); + commandToClient(%client, 'setHudMode', 'Observer'); %client.setControlObject( %client.camera ); @@ -1448,7 +1479,7 @@ function dumpGameString() function isOnAdminList(%client) { - if( !%totalRecords = getRecordCount( $Host::AdminList ) ) + if( !%totalRecords = getFieldCount( $Host::AdminList ) ) { return false; } @@ -1456,7 +1487,6 @@ function isOnAdminList(%client) for(%i = 0; %i < %totalRecords; %i++) { %record = getField( getRecord( $Host::AdminList, 0 ), %i); - echo( "record: " @ %record @ "guid: " @ %client.guid ); if(%record == %client.guid) return true; } @@ -1466,7 +1496,7 @@ function isOnAdminList(%client) function isOnSuperAdminList(%client) { - if( !%totalRecords = getRecordCount( $Host::superAdminList ) ) + if( !%totalRecords = getFieldCount( $Host::superAdminList ) ) { return false; } @@ -1474,7 +1504,6 @@ function isOnSuperAdminList(%client) for(%i = 0; %i < %totalRecords; %i++) { %record = getField( getRecord( $Host::superAdminList, 0 ), %i); - echo( "record: " @ %record @ "guid: " @ %client.guid ); if(%record == %client.guid) return true; } @@ -1487,13 +1516,15 @@ function ServerCmdAddToAdminList( %admin, %client ) if( !%admin.isSuperAdmin ) return; - %count = getRecordCount( $Host::AdminList ); + %count = getFieldCount( $Host::AdminList ); for ( %i = 0; %i < %count; %i++ ) { - %id = getRecord( $Host::AdminList, %i ); + %id = getField( $Host::AdminList, %i ); if ( %id == %client.guid ) + { return; // They're already there! + } } if( %count == 0 ) @@ -1507,11 +1538,11 @@ function ServerCmdAddToSuperAdminList( %admin, %client ) if( !%admin.isSuperAdmin ) return; - %count = getRecordCount( $Host::SuperAdminList ); + %count = getFieldCount( $Host::SuperAdminList ); for ( %i = 0; %i < %count; %i++ ) { - %id = getRecord( $Host::SuperAdminList, %i ); + %id = getField( $Host::SuperAdminList, %i ); if ( %id == %client.guid ) return; // They're already there! } @@ -1699,8 +1730,8 @@ function Countdown(%timeMS) $countdownStarted = true; Game.matchStart = Game.schedule( %timeMS, "StartMatch" ); - if (%timeMS > 30000) - notifyMatchStart(%timeMS); + if (%timeMS > 30000) + notifyMatchStart(%timeMS); if(%timeMS >= 30000) Game.thirtyCount = schedule(%timeMS - 30000, Game, "notifyMatchStart", 30000); @@ -1785,7 +1816,7 @@ function CancelCountdown() function CancelEndCountdown() { - //cancel the mission end countdown... + //cancel the mission end countdown... if(Game.endsixtyCount !$= "") cancel(Game.endsixtyCount); if(Game.endthirtyCount !$= "") @@ -1824,38 +1855,53 @@ function resetServerDefaults() exec( "scripts/ServerDefaults.cs" ); exec( "prefs/ServerPrefs.cs" ); - loadMission( $CurrentMission, $CurrentMissionType ); + // kick all bots... + removeAllBots(); + + // add bots back if they were there before.. + if( $Host::botsEnabled ) + initGameBots( $Host::Map, $Host::MissionType ); + + // load the missions + loadMission( $Host::Map, $Host::MissionType ); +} + +function removeAllBots() +{ + while( ClientGroup.getCount() ) + { + %client = ClientGroup.getObject(0); + if(%client.isAIControlled()) + %client.drop(); + else + %client.delete(); + } } //------------------------------------------------------------------------------ -// Guid list maintenance functions: -function addToServerGuidList( %guid ) +function getServerGUIDList() { - %count = getFieldCount( $HostGuidList ); + %count = ClientGroup.getCount(); for ( %i = 0; %i < %count; %i++ ) { - if ( getField( $HostGuidList, %i ) == %guid ) - return; - } - - $HostGuidList = $HostGuidList $= "" ? %guid : $HostGuidList TAB %guid; -} - -function removeFromServerGuidList( %guid ) -{ - %count = getFieldCount( $HostGuidList ); - for ( %i = 0; %i < %count; %i++ ) - { - if ( getField( $HostGuidList, %i ) == %guid ) + %cl = ClientGroup.getObject( %i ); + if ( isObject( %cl ) && !%cl.isSmurf && !%cl.isAIControlled() ) { - $HostGuidList = removeField( $HostGuidList, %i ); - return; + %guid = getField( %cl.getAuthInfo(), 3 ); + if ( %guid != 0 ) + { + if ( %list $= "" ) + %list = %guid; + else + %list = %list TAB %guid; + } } } - // Huh, didn't find it. + return( %list ); } +//------------------------------------------------------------------------------ // will return the first admin found on the server function getAdmin() { @@ -1874,20 +1920,20 @@ function getAdmin() function serverCmdSetPDAPose(%client, %val) { - // if client is in a vehicle, return - if(%client.player.isMounted()) - return; + // if client is in a vehicle, return + if(%client.player.isMounted()) + return; - if(%val) - { - // play "PDA" animation thread on player - %client.player.setActionThread("PDA", false); - } - else - { - // cancel PDA animation thread - %client.player.setActionThread("root", true); - } + if(%val) + { + // play "PDA" animation thread on player + %client.player.setActionThread("PDA", false); + } + else + { + // cancel PDA animation thread + %client.player.setActionThread("root", true); + } } function serverCmdProcessGameLink(%client, %arg1, %arg2, %arg3, %arg4, %arg5) diff --git a/base/scripts/serverDefaults.cs b/base/scripts/serverDefaults.cs index ee1dfb7..eb6c771 100644 --- a/base/scripts/serverDefaults.cs +++ b/base/scripts/serverDefaults.cs @@ -33,7 +33,7 @@ $Host::Dedicated = 0; $Host::MissionType = "CTF"; $Host::Map = "Katabatic"; $Host::MaxPlayers = 64; -$Host::TimeLimit = 20; +$Host::TimeLimit = 30; $Host::BotCount = 2; $Host::BotsEnabled = 0; $Host::MinBotDifficulty = 0.5; @@ -50,6 +50,8 @@ $Host::TournamentMode = 0; $Host::allowAdminPlayerVotes = 1; $Host::FloodProtectionEnabled = 1; $Host::MaxMessageLen = 120; +$Host::VoteSpread = 20; +$Host::TeamDamageOn = 0; $MasterServerAddress = "IP:198.74.40.152:28000"; diff --git a/base/scripts/staticShape.cs b/base/scripts/staticShape.cs index 6510120..a8c6c95 100644 --- a/base/scripts/staticShape.cs +++ b/base/scripts/staticShape.cs @@ -782,24 +782,24 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos if(%damageScale !$= "") %amount *= %damageScale; - //if team damage is off, cap the amount of damage so as not to disable the object... - if (!$TeamDamage) - { - //see if the object is being shot by a friendly - %srcClient = %sourceObject.client; - if (isObject(%srcClient)) - { - if (isTargetFriendly(%targetObject.getTarget(), %srcClient.getSensorGroup())) - { - %curDamage = %targetObject.getDamageLevel(); - %availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05; - if (%amount > %availableDamage) - %amount = %availableDamage; - } - } - } + //if team damage is off, cap the amount of damage so as not to disable the object... + if (!$TeamDamage && !%targetObject.getDataBlock().deployedObject && %targetObject.getDataBlock.getName $= "DeployedBeacon") + { + //see if the object is being shot by a friendly + %srcClient = %sourceObject.client; + if (isObject(%srcClient)) + { + if (isTargetFriendly(%targetObject.getTarget() , %srcClient.getSensorGroup())) + { + %curDamage = %targetObject.getDamageLevel(); + %availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05; + if (%amount > %availableDamage) + %amount = %availableDamage; + } + } + } - //if there's still damage to apply + // if there's still damage to apply if (%amount > 0) %targetObject.applyDamage(%amount); } diff --git a/base/scripts/vehicles/clientVehicleHud.cs b/base/scripts/vehicles/clientVehicleHud.cs index e0d8f74..795d23d 100644 --- a/base/scripts/vehicles/clientVehicleHud.cs +++ b/base/scripts/vehicles/clientVehicleHud.cs @@ -14,6 +14,12 @@ function VehicleHud::onWake( %this ) hudMap.blockBind( moveMap, toggleScoreScreen ); hudMap.blockBind( moveMap, toggleCommanderMap ); hudMap.bindCmd( keyboard, escape, "", "VehicleHud.onCancel();" ); + hudMap.bindCmd( keyboard, "1", "", "VehicleHud.quickBuy( 0 );" ); + hudMap.bindCmd( keyboard, "2", "", "VehicleHud.quickBuy( 1 );" ); + hudMap.bindCmd( keyboard, "3", "", "VehicleHud.quickBuy( 2 );" ); + hudMap.bindCmd( keyboard, "4", "", "VehicleHud.quickBuy( 3 );" ); + hudMap.bindCmd( keyboard, "5", "", "VehicleHud.quickBuy( 4 );" ); + hudMap.bindCmd( keyboard, "6", "", "VehicleHud.quickBuy( 5 );" ); hudMap.push(); } @@ -54,6 +60,17 @@ function VehicleHud::loadHud( %obj, %tag ) $Hud[%tag].parent = VIN_Root; } +//------------------------------------------------------------------------------ +function VehicleHud::quickBuy( %this, %id ) +{ + if ( isObject( $Hud['vehicleHud'].data[%id, 0] ) ) + { + if ( %this.selId != %id ) + eval( $Hud['vehicleHud'].data[%id, 0].command ); + %this.onBuy(); + } +} + //------------------------------------------------------------------------------ function VehicleHud::onBuy( %this ) { diff --git a/base/scripts/vehicles/vehicle.cs b/base/scripts/vehicles/vehicle.cs index f3bf68e..47cedea 100644 --- a/base/scripts/vehicles/vehicle.cs +++ b/base/scripts/vehicles/vehicle.cs @@ -236,7 +236,7 @@ function VehicleData::onDestroyed(%data, %obj, %prevState) %flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Explosion); } } - %obj.schedule(300, "delete"); + %obj.schedule(600, "delete"); } function radiusVehicleExplosion(%data, %vehicle) @@ -1087,7 +1087,7 @@ function VehicleData::damageObject(%data, %targetObject, %sourceObject, %positio else %sourceTeam = %sourceObject ? getTargetSensorGroup(%sourceObject.getTarget()) : -1; - if(!$teamDamage && (%targetTeam == %sourceTeam)) + if(!$teamDamage && (%targetTeam == %sourceTeam) && %targetObject.getDamagePercent() > 0.5) return; // Scale damage type & include shield calculations... diff --git a/base/scripts/weapTurretCode.cs b/base/scripts/weapTurretCode.cs index bb15f16..e16c79f 100644 --- a/base/scripts/weapTurretCode.cs +++ b/base/scripts/weapTurretCode.cs @@ -672,6 +672,7 @@ function FlashGrenadeThrown::onThrow(%this, %gren) function detonateFlashGrenade(%hg) { + %thrower = %hg.sourceObject.client; %hg.setDamageState(Destroyed); %hgt = %hg.getTransform(); %plX = firstword(%hgt); @@ -720,7 +721,17 @@ function detonateFlashGrenade(%hg) %dotFactor = ((1.0 - ((%difAcos - 45.0) / 15.0)) * 0.5) + 0.5; %totalFactor = %dotFactor * %distFactor; - %damage.setWhiteOut(%damage.getWhiteOut() + %totalFactor); + %prevWhiteOut = %damage.getWhiteOut(); + + if(!%prevWhiteOut) + if(!$teamDamage) + { + error("checking for message"); + if(%damage.client != %thrower && %damage.client.team == %thrower.team) + messageClient(%damage.client, 'teamWhiteOut', '\c1You were hit by %1\'s whiteout grenade.', getTaggedString(%thrower.name)); + } + + %damage.setWhiteOut( %prevWhiteOut + %totalFactor); } %hg.schedule(500, "delete"); } diff --git a/base/scripts/weapons/mine.cs b/base/scripts/weapons/mine.cs index 0080a6a..5c03721 100644 --- a/base/scripts/weapons/mine.cs +++ b/base/scripts/weapons/mine.cs @@ -2,7 +2,7 @@ // mine script // ---------------------------------------------- -$TeamDeployableMax[MineDeployed] = 15; +$TeamDeployableMax[MineDeployed] = 20; // ---------------------------------------------- // force-feedback datablocks @@ -339,87 +339,3 @@ datablock ItemData(Mine) }; -//-------------------------------------- -//datablock ItemData(MineAirDeployed) -//{ -// className = Weapon; -// shapeFile = "mine_anti_air.dts"; -// mass = 1; -// elasticity = 0.2; -// friction = 0.9; -// pickupRadius = 3; -// maxDamage = 0.1; -// explosion = MineExplosion; -// indirectDamage = 1.3; -// damageRadius = 15.0; -// radiusDamageType = $DamageType::Mine; -// kickBackStrength = 3000; -//}; -// -//datablock ItemData(MineAir) -//{ -// className = HandInventory; -// catagory = "Handheld"; -// shapeFile = "mine_anti_air.dts"; -// mass = 1; -// elasticity = 0.2; -// friction = 0.8; -// pickupRadius = 1; -//}; - -//-------------------------------------- -//datablock ItemData(MineLandDeployed) -//{ -// className = Weapon; -// shapeFile = "mine_anti_land.dts"; -// mass = 7; -// elasticity = 0.2; -// friction = 0.8; -// pickupRadius = 3; -// maxDamage = 0.1; -// explosion = MineExplosion; -// indirectDamage = 1.3; -// damageRadius = 15.0; -// radiusDamageType = $DamageType::Mine; -// kickBackStrength = 3000; -//}; -// -//datablock ItemData(MineLand) -//{ -// className = HandInventory; -// catagory = "Handheld"; -// shapeFile = "mine_anti_land.dts"; -// mass = 3; -// elasticity = 0.2; -// friction = 0.7; -// pickupRadius = 1; -//}; - -//-------------------------------------- -//datablock ItemData(MineStickyDeployed) -//{ -// className = Weapon; -// shapeFile = "mine_sticky.dts"; -// mass = 7; -// elasticity = 0.2; -// friction = 0.8; -// pickupRadius = 3; -// maxDamage = 0.1; -// explosion = MineExplosion; -// indirectDamage = 1.3; -// damageRadius = 15.0; -// radiusDamageType = $DamageType::Mine; -// kickBackStrength = 3000; -//}; -// -//datablock ItemData(MineSticky) -//{ -// className = HandInventory; -// catagory = "Handheld"; -// shapeFile = "mine_sticky.dts"; -// mass = 3; -// elasticity = 0.2; -// friction = 0.7; -// pickupRadius = 1; -//}; - diff --git a/base/scripts/webbrowser.cs b/base/scripts/webbrowser.cs index 97d5db6..37c90b6 100644 --- a/base/scripts/webbrowser.cs +++ b/base/scripts/webbrowser.cs @@ -211,27 +211,28 @@ function GetProfileHdr(%type, %line) TProfileHdr.appending = getField(%line,3); TProfileHdr.recruiting = getField(%line,4); TProfileHdr.tribegfx = getField(%line,5); + TProfileHdr.twa = 0; TProfileHdr.Desc = ""; + TL_Profile.setVisible(1); TL_Roster.setVisible(1); - TProfileHdr.twa = getField(%line,6); + + for(%checkID=0;%checkID 1) + TW_Admin.setVisible(1); + else + TW_Admin.setVisible(0); } else { @@ -249,18 +250,23 @@ function GetProfileHdr(%type, %line) if(getField(getRecord(WonGetAuthInfo(),0),3)==getField(%line,3)) TProfileHdr.twa = 1; - for(%i=0;%i= 2) - TProfileHdr.twa = 1; - } + for(%checkID=0;%checkID= 2) + TProfileHdr.twa = 1; + } W_Profile.setVisible(1); W_History.setVisible(1); W_Tribes.setVisible(1); + %isMe = getField(getRecord(wonGetAuthInfo(),0),0)$=twbTitle.name; TProfileHdr.isMe = %isMe; - if(%isMe) + +// if(!TProfileHdr.twa) + TProfileHdr.twa = TProfileHdr.isMe; + + if(TProfileHdr.twa) { W_BuddyList.setText("BUDDYLIST"); W_BuddyList.setVisible(1); @@ -361,6 +367,7 @@ function LinkEditWarriorDesc(%player, %handler) //----------------------------------------------------------------------------- function LinkEditMember(%player, %tribe, %pv, %title,%owner) { +// initialize buttons tb_onProbation.setVisible(true); tb_tribeMember.setVisible(false); tb_tribeAdmin.setVisible(false); @@ -372,6 +379,7 @@ function LinkEditMember(%player, %tribe, %pv, %title,%owner) tb_tribeAdmin.setValue(false); tb_tribeController.setValue(false); tb_sysAdmin.setValue(false); + %owner.vTribe = %tribe; %owner.vPlayer = %player; t_whois.setValue(%player); @@ -382,7 +390,7 @@ function LinkEditMember(%player, %tribe, %pv, %title,%owner) // Get callers rank in members tribe for(%i=0;%i1)) + if( getField(getRecord(%ai,2+%i),0) $= %tribe || (getField(getRecord(%ai,2+%i),3)==1401 && getField(getRecord(%ai,2+%i),4)>1)) { %callerPv = getField(getRecord(%ai,2+%i),4); break; @@ -573,9 +581,10 @@ function SetMemberProfile() TribeAdminMemberDlg.key = LaunchGui.key++; TribeAdminMemberDlg.state = "setMemberProfile"; canvas.SetCursor(ArrowWaitCursor); + %title = E_Title.getValue(); DatabaseQuery(21,TribeAdminMemberDlg.vTribe TAB TribeAdminMemberDlg.vPlayer TAB - E_Title.getValue() TAB + %title TAB TribeAdminMemberDlg.vPerm, TribeAdminMemberDlg, TribeAdminMemberDlg.key); @@ -1038,6 +1047,74 @@ function GuiMLTextCtrl::onURL(%this, %url) case "gamelink": commandToServer('ProcessGameLink', %fld[1], %fld[2], %fld[3], %fld[4], %fld[5]); +// THESE ARE EMAIL RELATED MODERATOR LINKS + case "moderatorTopicKill": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopic"; + databaseQuery(62, 0 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicWarn": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + error("MTW: " @ %url); + databaseQuery(62, 1 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicBan24": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + error("MTB24: " @ %url); + databaseQuery(62, 2 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicBan48": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + databaseQuery(62, 3 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicBan72": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + databaseQuery(62, 4 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicBan7Days": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + databaseQuery(62, 5 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicBan30Days": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + databaseQuery(62, 6 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + case "moderatorTopicBanForever": + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopicPlus"; + databaseQuery(62, 7 TAB getField(%url,1) TAB getField(%url,2), TopicsPopupDlg, TopicsPopupDlg.key); + + case "moderatorPostKill": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePost"; + databaseQuery(63, 0 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostWarn": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 1 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostBan24": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 2 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostBan48": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 3 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostBan72": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 4 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostBan7Days": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 5 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostBan30Days": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 6 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); + case "moderatorPostBanForever": + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePostPlus"; + databaseQuery(63, 7 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key); //if there is an unknown URL type, treat it as a weblink.. default: @@ -1195,7 +1272,10 @@ function TribePane::onDatabaseQueryResult(%this, %status, %resultString , %key) %this.linecount--; %this.MList = ""; if(getField(%resultString,0)>0) + { %this.state = "tribeRoster"; + %this.rosterRowcount = getField(%resultString,0); + } else { %this.state="done"; @@ -1279,7 +1359,7 @@ function TribePane::onDatabaseRow(%this, %row, %isLastRow, %key) { MemberList.AddMember(%wid,%name,%adminLevel,%editkick,%row); MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel); - MemberList.setRowStylebyID( %wid, !%onLine ); +// MemberList.setRowStylebyID( %wid, !%onLine ); } if(%this.linecount <= 0) @@ -1293,6 +1373,16 @@ function TribePane::onDatabaseRow(%this, %row, %isLastRow, %key) if(%name !$= "") %this.MList = %this.MList @ %name @ ","; %this.linecount++; + + if(%isLastRow) + { + MemberList.GetOnlineStatus(); + if(%this.needRefresh) + { + %this.needRefresh = 0; + TL_ROSTER.setValue(1); + } + } case "tribeNews": %this.articleID = getField(%row,0); @@ -1316,11 +1406,8 @@ function TribePane::onDatabaseRow(%this, %row, %isLastRow, %key) MemberList.AddInvite(%inviteID,%invitedQuad,%invitorQuad,%isOwned,%row); MemberList.AddRow(%inviteID, getField(%invitedQuad,0) TAB %inviteDate); MemberList.setRowStylebyID( %inviteId, !%onLine ); - } - if(%isLastRow && %this.needRefresh) - { - %this.needRefresh = 0; - TL_ROSTER.setValue(1); + if(%isLastRow) + MemberList.GetOnlineStatus(); } } //----------------------------------------------------------------------------- @@ -1464,7 +1551,7 @@ function PlayerPane::onDatabaseQueryResult(%this,%status,%resultString,%key) PlayerPix.setBitmap($PlayerGfx); %profileText = " \n"; %profileText = %profileText @ "Registered:" SPC TProfileHdr.registered @ "\n"; - %profileText = %profileText @ "Online: " SPC (TProfileHdr.onLine ? "YES":"NO") @ "\n"; +// %profileText = %profileText @ "Online: " SPC (TProfileHdr.onLine ? "YES":"NO") @ "\n"; if(trim(TProfileHdr.playerURL) !$= "") %profileText = %profileText @ "WebSite: " SPC ""@TProfileHdr.playerURL@"\n\n"; @@ -1569,7 +1656,8 @@ function PlayerPane::onDatabaseQueryResult(%this,%status,%resultString,%key) MessageBoxOK("CONFIRMED",getField(%status,1)); case "changePlayerName": %this.state = "done"; -// echo("wus:"@WonUpdateCertificate()); + IRCClient::quit(); + WonUpdateCertificate(); TProfileHdr.playername = NewNameEdit.getValue(); wp_currentname.setText(NewNameEdit.getValue()); twbTabView.setTabText(twbTabView.getSelectedId(),NewNameEdit.getValue()); @@ -1623,7 +1711,9 @@ function PlayerPane::onDatabaseRow(%this,%row,%isLastRow,%key) case "warriorBuddyList": W_MemberList.AddInvite(getField(%row,3),getFields(%row,0,3),getFields(%row,0,3),4,%row); W_MemberList.AddRow(getField(%row,3),getField(%row,0) TAB getField(%row,4)); - W_MemberList.setRowStyleByID(getField(%row,3),!getField(%row,5)); + if(%isLastRow) + W_MemberList.getOnlineStatus(); +// W_MemberList.setRowStyleByID(getField(%row,3),!getField(%row,5)); } } //----------------------------------------------------------------------------- @@ -1693,10 +1783,10 @@ function PlayerPane::ButtonClick( %this, %senderid ) %row = getRecord(%ai,2+%ix); %wid = getField(%row,2); %name = getField(%row,0); - %title = getField(%row,4); + %title = getField(%row,5); if(%title $= "") %title = "Not Shown"; - %adminLevel = getField(%row,3); + %adminLevel = getField(%row,4); %editkick = %adminLevel >= 2; W_MemberList.AddMember(%wid,%name,%adminLevel,%editkick,%row); W_MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel); @@ -1793,10 +1883,39 @@ function W_MemberList::onRightMouseDown( %this, %column, %row, %mousePos ) error( "Member/Invite Locate Error!" ); } } +//----------------------------------------------------------------------------- function w_MemberList::onAdd(%this) { W_MemberList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" ); } +//----------------------------------------------------------------------------- +function W_MemberList::GetOnlineStatus(%this) +{ + %this.key = LaunchGui.key++; + %this.status = "getOnline"; + for(%oStat=0;%oStat<%this.RowCount();%oStat++) + { + if(%oStat == 0) + %roster = %this.getRowID(%oStat); + else + %roster = %roster TAB %this.getRowID(%oStat); + } + databaseQuery(69,%roster, %this,%this.key); +} +//----------------------------------------------------------------------------- +function W_MemberList::onDatabaseQueryResult(%this,%status,%resultString,%key) +{ + if(%key != %this.key) + return; + switch$(%this.status) + { + case "getOnline": if(getField(%status,0) == 0) + for(%str=0;%str 1) + %vCanAdmin = 1; + } + + if(%selectedID == 1402) + FO_AcceptBtn.setVisible(%vCanAdmin); + } + else + { + for(%checkID=0;%checkID 1) + %vCanAdmin = 1; + } + } + + FO_EditBtn.setVisible(%vCanAdmin); + FO_RejectBtn.setVisible(%vCanAdmin); + canvas.repaint(); } //----------------------------------------------------------------------------- function DateStrCompare(%date1,%date2) @@ -169,7 +252,6 @@ function CacheForumTopic() %newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow()); ForumsMessageList.lastID = %newGroup.updateid; %latest = GetField(ForumsTopicsList.getRowTextbyID(ForumsTopicsList.getSelectedID()),3); - ForumsMessageVector.dump( $ForumCachePath @ "tpc" @ ForumsMessageVector.tid , ForumsMessageList.lastID TAB $ForumCacheVersion TAB %allRead TAB %latest); } //----------------------------------------------------------------------------- @@ -177,6 +259,7 @@ function ForumsAcceptPost() { %parentId = ForumsMessageList.getSelectedId(); %text = ForumsMessageVector.getLineTextByTag(%parentId); + %index = ForumsMessageVector.getLineIndexByTag( %parentId ); %author = getRecord( %text, 4 ); %dev = getLinkName(%author); %date = getRecord(%text, 5); @@ -195,6 +278,8 @@ function ForumsAcceptPost() NewsPostBodyText.setValue("submitted by " @ %dev @ "\n\n" @ ForumsGetTextDisplay(%body)); NewsPostDlg.postID = -1; NewsPostDlg.action = "News"; + NewsPostDlg.Findex = %index; + NewsPostDlg.FromForums = true; } //----------------------------------------------------------------------------- function ForumsEditPost() @@ -260,7 +345,7 @@ function ForumsMessageAddRow(%text) %ref = getRecord(%text, 6); %oldRow = ForumsMessageList.getRowNumById(%id); %selId = ForumsMessageList.getSelectedId(); - + if(!%selID) { %selID = ForumsGui.lastSelected; @@ -315,9 +400,13 @@ function ForumsMessageAddRow(%text) break; } if(%i <= %rc) + { ForumsMessageList.addRow(%id, %rowText, %i); + } else + { ForumsMessageList.addRow(%id, %rowText); + } } ForumsMessageList.setRowStyleById( %id, !%isRead ); @@ -445,7 +534,6 @@ function ForumsRejectPost() //forumsDeletePost() ForumsMessageList.key = LaunchGui.key++; ForumsMessageList.state = "deletePost"; canvas.SetCursor(ArrowWaitCursor); -// error("REJECT: " @ ForumsComposeDlg.parentPost); MessageBoxYesNo("CONFIRM", "Are you sure you wish to remove the selected post?", "DatabaseQuery(14," @ ForumsComposeDlg.parentPost @ "," @ ForumsMessagelist @ "," @ ForumsMessagelist.key @ ");", "canvas.SetCursor(defaultCursor);"); } @@ -468,7 +556,8 @@ function GetQuotedText() { if(ForumsComposeDlg.parentPost == 0) { - ForumsBodyText.setValue("ALL YOUR BASE ARE BELONG TO US\n\n"); + ForumsBodyText.setValue(""); +// ForumsBodyText.setValue("ALL YOUR BASE ARE BELONG TO US\n\n"); ForumsBodyText.MakeFirstResponder(1); ForumsBodyText.setCursorPosition(3600); } @@ -504,32 +593,33 @@ function GetForumsList() //----------------------------------------------------------------------------- function GetTopicsList() { - ForumsGui.key = LaunchGui.key++; ForumShell.setTitle($ForumsGetTopics); - ForumsGui.state = "getTopicList"; - ForumsTopicsList.clear(); canvas.SetCursor(ArrowWaitCursor); + ForumsTopicsList.clear(); ForumsTopicsList.clearList(); - DatabaseQueryArray(8,$currentForumPage,ForumsComposeDlg.forum,ForumsGui,ForumsGui.key,true); ForumsTopicsList.refreshFlag = 0; + ForumsGui.key = LaunchGui.key++; + ForumsGui.state = "getTopicList"; + DatabaseQueryArray(8,$currentForumPage,ForumsComposeDlg.forum,ForumsGui,ForumsGui.key,true); } //----------------------------------------------------------------------------- function GetTopicPosts() { - ForumsGui.key = LaunchGui.key++; - ForumShell.setTitle($ForumsGetPosts); - ForumsGui.state = "getPostList"; - canvas.SetCursor(ArrowWaitCursor); - ForumsThreadPane.setVisible(true); ForumsTopicsPane.setVisible(false); - ForumsText.setValue(""); - - FO_TopicText.setValue(strupr(getField(ForumsTopicsList.getRowTextByID(ForumsComposeDlg.Topic),0))); + ForumShell.setTitle($ForumsGetPosts); + canvas.SetCursor(ArrowWaitCursor); + ForumsGui.key = LaunchGui.key++; + ForumsGui.state = "getPostList"; + ForumsText.setValue(""); + FO_TopicText.setValue(strupr(getField(ForumsTopicsList.getRowTextByID(ForumsComposeDlg.Topic),0))); + if(!ForumsComposeDlg.Topic) ForumsComposeDlg.topic = ForumsTopicsList.getSelectedID(); + ForumsMessageList.clearList(); ForumsMessageList.loadCache(getField(ForumsList.getRowTextByID(ForumsList.getSelectedID()),1)); + if(ForumsMessageList.lastID == 0) { ForumsMessageVector.clear(); @@ -653,57 +743,6 @@ function ForumsGui::onDatabaseQueryResult(%this,%status,%resultString,%key) %this.bflag = %statFlag; - switch$ ( %this.bflag ) - { - case 0: - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - case 1: - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - case 2: - switch(%forumID) - { - case 1402: - FO_AcceptBtn.visible = true; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - FO_AcceptBtn.text = "ACCEPT"; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - case 3: - switch(%forumID) - { - case 1402: - FO_AcceptBtn.visible = true; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - FO_AcceptBtn.text = "ACCEPT"; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - case 4: - switch(%forumID) - { - case 1402: - FO_AcceptBtn.visible = true; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - FO_AcceptBtn.text = "ACCEPT"; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - } if(getField(%resultString,0)>0) { ForumShell.setTitle($ForumsGetPosts @ ": " @ getField(%resultString,0)); @@ -714,6 +753,7 @@ function ForumsGui::onDatabaseQueryResult(%this,%status,%resultString,%key) else { %this.state = "done"; + ForumsMessageList.clearList(); ForumsMessageList.loadCache(%forumID); } case "postNews": @@ -829,6 +869,8 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key) if(%isLastRow) { ForumsMessageVector.tid = ForumsTopicsList.getSelectedID(); + ForumsTopicsList.thread = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow()); + ForumsTopicsList.thread.updateID = %high; CacheForumTopic(); ForumsMessageList.loadCache(ForumsTopicsList.getSelectedID()); } @@ -943,6 +985,8 @@ function ForumsTopicsList::onAdd( %this ) %this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "80 220 200", "30 255 225", "10 60 40" ); // Add the "Ignored" style: %this.addStyle( 2, $ShellFont, $ShellFontSize, "100 100 100", "100 100 000", "100 100 100" ); + // Add the "LOCKED" style: + %this.addStyle( 3, $ShellFont, $ShellFontSize, "200 50 50", "200 100 100", "200 50 50" ); } //----------------------------------------------------------------------------- function ForumsTopicsList::AddTopic(%this, %id, %topicname, %date, %mid, %slevel, %vline) @@ -987,9 +1031,26 @@ function TopicsPopupDlg::onWake( %this ) { ForumsGui.TDialogOpen = true; TopicsPopupMenu.clear(); - TopicsPopupMenu.add( TopicsPopupMenu.topic.name SPC ": RESET CACHE", 0 ); - TopicsPopupMenu.add( TopicsPopupMenu.topic.name SPC ": IGNORE THIS TOPIC",1); - TopicsPopupMenu.add( TopicsPopupMenu.topic.name SPC ": FLAG ALL READ",2); + + TopicsPopupMenu.add( getSubstr(strupr(TopicsPopupMenu.topic.name),0,30) , -1); + + for (%i = 0; %i < strlen(TopicsPopupMenu.topic.name)*2 && %i < 30; %i++) + %line = %line @ "-"; + + TopicsPopupMenu.add(%line,-1); + TopicsPopupMenu.add("Reset Cache", 0); + TopicsPopupMenu.add("Flag Ignore", 1); + TopicsPopupMenu.add("Flag All Read", 2); + if(isModerator()) + TopicsPopupMenu.add(%line,-1); + TopicsPopupMenu.add("Request Admin Review", 3); +// TopicsPopupMenu.add("Unlock Topic", 5); + if(isT2Admin()) + { + TopicsPopupMenu.add("Lock Topic", 4); + TopicsPopupMenu.add("Remove Topic", 10); + } + Canvas.rePaint(); } //----------------------------------------------------------------------------- @@ -1091,6 +1152,34 @@ function TopicsPopupMenu::onSelect( %this, %id, %text ) ForumsTopicsList.UpdateReadStatus(); // ForumsRefreshTopics(); } + case 3: //Request Admin Review + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "requestReview"; + %fieldData = ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB getField(TopicsPopupMenu.topic.rcvrec,11); + error("RR: " @ 60 TAB %fieldData); + databaseQuery(60, %fieldData, TopicsPopupDlg, TopicsPopupDlg.key); + + case 4: //Lock Thread + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "lockTopic"; + %fieldData = TopicsPopupMenu.topic.id TAB "Locked at Admin Request"; + DatabaseQuery(66,%fieldData,topicsPopupDlg,topicsPopupDlg.key); + case 5: //Unlock Thread + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 6: //Not Implemented + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 7: //Not Implemented + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 8: //Not Implemented + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 9: //Not Implemented + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 10: //Remove Topic + TopicsPopupDlg.key = LaunchGui.key++; + TopicsPopupDlg.state = "adminRemoveTopic"; + %fieldData = 0 TAB TopicsPopupMenu.topic.id TAB getField(TopicsPopupMenu.topic.rcvrec,11); + error("RT: " @ 62 TAB %fieldData); + databaseQuery(62, %fieldData, TopicsPopupDlg, TopicsPopupDlg.key); } canvas.popDialog(TopicsPopupDlg); } @@ -1100,6 +1189,42 @@ function TopicsPopupDlg::onSleep(%this) ForumsGui.TDialogOpen = false; } //----------------------------------------------------------------------------- +function TopicsPopupDlg::onDatabaseQueryResult(%this,%status,%recordCount,%key) +{ + if(%this.key != %key) + return; + if(getField(%status,0)==0) + if (%this.state $= "adminRemoveTopicPlus") + { + $EmailToAddress = getField(%status,3); + $EmailCCAddress = ""; + switch(getField(%status,2)) + { + case 1: $EmailSubject = "Policy Violation Warning"; + case 2: $EmailSubject = "Policy Violation Ban Notice : 24 hours"; + case 3: $EmailSubject = "Policy Violation Ban Notice : 48 hours"; + case 4: $EmailSubject = "Policy Violation Ban Notice : 72 hours"; + case 5: $EmailSubject = "Policy Violation Ban Notice : 7 Days"; + case 6: $EmailSubject = "Policy Violation Ban Notice : 30 Days"; + case 7: $EmailSubject = "Policy Violation Ban Notice : Indefinite"; + } + EMailComposeDlg.state = "sendMail"; + Canvas.pushDialog(EmailComposeDlg); + EmailBodyText.setValue(""); + Email_ToEdit.makeFirstResponder(1); + } + else + { + if(%this.state $= "lockTopic") + { + ForumsTopicsList.setRowStyle( getField(%recordCount,0), 3 ); + } + MessageBoxOK("NOTICE",getField(%status,1)); + } + else + messageBoxOK("ERROR",getField(%status,1)); +} +//----------------------------------------------------------------------------- function ForumsTopicsList::onSetSortKey( %this, %sortKey, %isIncreasing ) { $pref::Topics::SortColumnKey = %sortKey; @@ -1167,6 +1292,28 @@ function ForumsTopicsList::updateReadStatus( %this ) //----------------------------------------------------------------------------- function ForumsMessageList::onAdd( %this ) { + new GuiControl(PostsPopupDlg) { + profile = "GuiModelessDialogProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + setFirstResponder = "0"; + modal = "1"; + + new ShellPopupMenu( PostsPopupMenu ) { + profile = "ShellPopupProfile"; + position = "0 0"; + extent = "0 0"; + minExtent = "0 0"; + visible = "1"; + maxPopupHeight = "200"; + noButtonStyle = "1"; + }; + }; + // Add columns from the prefs: for ( %i = 0; %i < $ForumColumnCount; %i++ ) %this.addColumn( %i, @@ -1179,6 +1326,154 @@ function ForumsMessageList::onAdd( %this ) %this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "80 220 200", "30 255 225", "0 0 0" ); } //----------------------------------------------------------------------------- +function ForumsMessageList::AddPost(%this, %id, %postname, %authorID, %authorName, %date, %mid, %slevel, %vline) +{ + if(!isObject(PostsListGroup)) + new SimGroup(PostsListGroup); + %post = new scriptObject() + { + className = "TPost"; + Id = %id; + name = %postname; + author = %authorName; + authorID = %authorID; + date = %date; + updateid = %mid; + slevel = %slevel; + rcvrec = %vline; + }; + PostsListGroup.Add(%post); +} +//----------------------------------------------------------------------------- +function ForumsMessageList::ClearList() +{ + if(isObject(PostsListGroup)) + PostsListGroup.Delete(); +} +//----------------------------------------------------------------------------- +function ForumsMessageList::onRightMouseDown( %this, %column, %row, %mousePos ) +{ + ForumsMessageList.setSelectedRow(%row); + PostsPopupMenu.post = PostsListGroup.getObject(%row); + if ( trim(PostsPopupMenu.post.name) !$= "") + { + Canvas.pushDialog(PostsPopupDlg); + PostsPopupMenu.position = %mousePos; + PostsPopupDlg.onWake(); + PostsPopupMenu.forceOnAction(); + } + else + error( "Locate Error!" ); +} +//----------------------------------------------------------------------------- +function PostsPopupDlg::onWake( %this ) +{ + ForumsGui.TDialogOpen = true; + PostsPopupMenu.clear(); + PostsPopupMenu.add( strUpr(PostsPopupMenu.post.author),0); + %line = "------------------------------------------------"; + %line2 = "................................................"; + PostsPopupMenu.add(%line,-1); + PostsPopupMenu.add( "EMAIL", 1 ); + PostsPopupMenu.add( "ADD To BUDDYLIST",2); +// PostsPopupMenu.add( "INVITE TO CHAT",3); +// PostsPopupMenu.add( "INSTANT MESSAGE",4); +// PostsPopupMenu.add( "FOLLOW TO GAME (if playing)",5); + if(isModerator()) + { + PostsPopupMenu.add(%line2,-1); + PostsPopupMenu.add( getsubstr(PostsPopupMenu.post.name,0,20) SPC ": REQUEST ADMIN REVIEW",9); + if(isT2Admin()) + PostsPopupMenu.add( getsubstr(PostsPopupMenu.post.name,0,20) SPC ": REMOVE POST",10); + } + Canvas.rePaint(); +} +//----------------------------------------------------------------------------- +function PostsPopupMenu::onSelect( %this, %id, %text ) +{ +// echo("TPM RECV: " @ %id TAB %text); + switch( %id ) + { + case 0: LinkBrowser( PostsPopupMenu.post.author , "Warrior"); + case 1: // 0 EMAIL Post Author + LinkEMail(PostsPopupMenu.post.author); +// MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 2: // 1 ADD Post Author to your BuddyList + MessageBoxYesNo("CONFIRM","Add " @ PostsPopupMenu.post.author @ " to Buddy List?", + "LinkAddBuddy(\"" @ PostsPopupMenu.post.author @ "\",TWBText,\"addBuddy\");",""); +// MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 3: // 2 INVITE Post Author To CHAT + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 4: // 3 IMSG Post Author + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 5: // 4 FOLLOW Post Author to game if is playing + MessageBoxOK("NOTICE","Feature Not Yet Implemented"); + case 9: //Request Admin Review + // FORUMID.TOPICID.POSTID.AUTHORID + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "requestPostReview"; + %fieldData = ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB ForumsMessageList.getSelectedID() TAB PostsPopupMenu.post.authorID; + databaseQuery(61, %fieldData, PostsPopupDlg, PostsPopupDlg.key); + case 10: //Remove Post + PostsPopupDlg.key = LaunchGui.key++; + PostsPopupDlg.state = "adminRemovePost"; + %fieldData = 0 TAB ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB ForumsMessageList.getSelectedID() TAB PostsPopupMenu.post.authorID; + databaseQuery(63, %fieldData, PostsPopupDlg, PostsPopupDlg.key); + } + canvas.popDialog(PostsPopupDlg); +} +//----------------------------------------------------------------------------- +function PostsPopupDlg::onSleep(%this) +{ + ForumsGui.TDialogOpen = false; +} +//----------------------------------------------------------------------------- +function PostsPopupDlg::onDatabaseQueryResult(%this,%status,%recordCount,%key) +{ + if(%this.key != %key) + return; + if(getField(%status,0)==0) + { + %selRow = ForumsMessageList.getRowNumByID(PostsPopupMenu.post.id); + if (%this.state $= "adminRemovePostPlus") + { + ForumsMessageVector.deleteLine( %selRow ); + ForumsMessageList.removeRow( %selRow ); + ForumsMessageList.setSelectedRow( %selRow ); + CacheForumTopic(); + $EmailToAddress = getField(%status,3); + $EmailCCAddress = ""; + switch(getField(%status,2)) + { + case 1: $EmailSubject = "Policy Violation Warning"; + case 2: $EmailSubject = "Policy Violation Ban Notice : 24 hours"; + case 3: $EmailSubject = "Policy Violation Ban Notice : 48 hours"; + case 4: $EmailSubject = "Policy Violation Ban Notice : 72 hours"; + case 5: $EmailSubject = "Policy Violation Ban Notice : 7 Days"; + case 6: $EmailSubject = "Policy Violation Ban Notice : 30 Days"; + case 7: $EmailSubject = "Policy Violation Ban Notice : Indefinite"; + } + EMailComposeDlg.state = "sendMail"; + Canvas.pushDialog(EmailComposeDlg); + EmailBodyText.setValue(""); + Email_ToEdit.makeFirstResponder(1); + } + else if (%this.state $= "requestPostReview") + { + MessageBoxOK("NOTICE",getField(%status,1)); + } + else + { + ForumsMessageVector.deleteLine( %selRow ); + ForumsMessageList.removeRow( %selRow ); + ForumsMessageList.setSelectedRow( %selRow ); + CacheForumTopic(); + MessageBoxOK("NOTICE",getField(%status,1)); + } + } + else + messageBoxOK("ERROR",getField(%status,1)); +} //----------------------------------------------------------------------------- function ForumsMessageList::connectionTerminated(%this, %key) { @@ -1189,66 +1484,13 @@ function ForumsMessageList::loadCache( %this, %forumTID) { ForumsMessageVector.clear(); ForumsMessageList.clear(); - ForumsMessageVector.tid = %forumTID; - switch( ForumsGui.bflag ) - { - case 0: - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - case 1: - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - case 2: - switch(%forumTID) - { - case 1402: - FO_AcceptBtn.visible = true; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - FO_AcceptBtn.visible = true; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - case 3: - switch(%forumTID) - { - case 1402: - FO_AcceptBtn.visible = true; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - FO_AcceptBtn.visible = true; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - case 4: - switch(%forumTID) - { - case 1402: - FO_AcceptBtn.visible = true; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - FO_AcceptBtn.visible = true; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - } - + ForumsMessageVector.tid = %forumTID; %this.lastId = 0; %this.highestUpdate = %this.lastID; %cacheFile = $ForumCachePath @ "tpc" @ ForumsComposeDlg.topic; %file = new FileObject(); if ( %file.openForRead( %cacheFile ) ) { -// %newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow()); if ( !%file.isEOF() ) { // First line is the update id: @@ -1276,22 +1518,6 @@ function ForumsMessageList::loadCache( %this, %forumTID) // RESET THE FIELDS IF THE POST IS BEING VISITED BY THE AUTHOR. %ref = getRecord(%text,6); - if(%ref > 1) - { - switch(%forumTID) - { - case 1402: - FO_AcceptBtn.visible = false; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - FO_AcceptBtn.visible = false; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - } if(%this.allRead && DateStrCompare(%this.lastDate,%date)) %text = setRecord( %text, 0, "1" ); @@ -1312,6 +1538,24 @@ function ForumsMessageList::loadCache( %this, %forumTID) } if(ForumsMessageList.getSelectedId() == -1) ForumsMessageList.setSelectedRow(0); + + for(%x=0;%x<%numLines;%x++) + { + %lineText = ForumsMessageVector.getLineTextbyTag( ForumsMessageList.getRowID(%x) ); + %ltID = getField(getRecord(%lineText,1),0); + %ltSubject = getField(getRecord(%lineText,3),0); + %ltAuthorID = getField(getRecord(%lineText,4),3); + %ltAuthorName = getField(getRecord(%lineText,4),0); + %ltDate = getField(getRecord(%lineText,5),0); + %ltParentID = getField(getRecord(%lineText,2),0); + + if(%ltParentID == 0) + %ltParentID = %ltID; + + %ltIsRead = getField(getRecord(%lineText,0),0); + ForumsMessageList.addPost(%ltID, %ltSubject, %ltAuthorID, %ltAuthorName, %ltDate, %ltParentID, %ltIsRead, %lineText); + } + } //----------------------------------------------------------------------------- function ForumsMessageList::onColumnResize( %this, %column, %newSize ) @@ -1346,39 +1590,7 @@ function ForumsMessageList::onSelect(%this, %id, %text) FO_NextBtn.setActive( true ); FO_PreviousBtn.setActive( true ); %ref = getRecord(%rawText,6); - if(%ref > 0 && %ref > ForumsGui.bflag) //if this is the author - { - switch(getField(ForumsList.getRowTextbyID(ForumsList.getSelectedID()),2)) - { - case 1402: - FO_AcceptBtn.visible = false; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - FO_AcceptBtn.visible = false; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = true; - FO_EditBtn.visible = true; - } - } - else if(ForumsGui.bflag == 0) - { - switch(getField(ForumsList.getRowTextbyID(ForumsList.getSelectedID()),2)) - { - case 1402: - FO_AcceptBtn.visible = false; - FO_RejectBtn.text = "REJECT"; - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - FO_AcceptBtn.visible = false; - default: - FO_RejectBtn.text = "DELETE"; - FO_RejectBtn.visible = false; - FO_EditBtn.visible = false; - } - } - + updatePostBtn(ForumsList.getSelectedID(),getField(getRecord(ForumsMessageVector.getLineTextbyTag(ForumsMessageList.getSelectedID()),4),3)); } //----------------------------------------------------------------------------- function ForumsMessagelist::onDatabaseQueryResult(%this,%status,%resultString,%key) @@ -1413,8 +1625,6 @@ function ForumsMessagelist::onDatabaseQueryResult(%this,%status,%resultString,%k ForumsTopicsList.refreshFlag = true; ForumsMessageVector.deleteLine( %index ); CacheForumTopic(); -// ForumsMessageList.clear(); -// ForumsMessageList.loadCache(); if ( %parent != 0 ) { %row = ForumsMessageList.getRowNumById( %postId ); diff --git a/base/scripts/weblinks.cs b/base/scripts/weblinks.cs index 431a808..b6b2fd1 100644 --- a/base/scripts/weblinks.cs +++ b/base/scripts/weblinks.cs @@ -4,14 +4,19 @@ addWebLink( "5 Assed Monkey", "www.5assedmonkey.com" ); addWebLink( "Arc 2055", "www.arc2055.com" ); addWebLink( "Atari Secret Society", "www.atarisecretsociety.org" ); addWebLink( "BarrysWorld", "www.barrysworld.com" ); +addWebLink( "Bomb", "www.bomb.net" ); addWebLink( "Clan Happytyme", "www.happytyme.com" ); addWebLink( "ClanBase", "www.clanbase.com" ); addWebLink( "ClanServ", "www.clanserv.com" ); addWebLink( "Dopplegangers", "www.dopplegangers.com" ); addWebLink( "Dutchbat Homeworld", "www.dutchbat-homeworld.com" ); +addWebLink( "EDome", "www.edome.net" ); addWebLink( "Euro Tribesplayers", "www.euro-tribesplayers.com" ); addWebLink( "eXtreme-Players", "www.eXtreme-players.de" ); +addWebLink( "Grave Diggers Union", "www.gravediggersunion.com" ); addWebLink( "IanStorm", "www.ianstorm.com" ); +addWebLink( "IMGaming", "www.imgaming.com" ); +addWebLink( "Inquest Entertainment", "www.inguestentertainment.com" ); addWebLink( "Long Dongles", "www.longdongles.com" ); addWebLink( "MaxBaud.Net", "www.maxbaud.net" ); addWebLink( "MoreGaming", "www.moregaming.com" ); @@ -20,14 +25,19 @@ addWebLink( "NGI", "www.ngi.it" ); addWebLink( "PlanetTribes", "www.planettribes.com" ); addWebLink( "Raging Angels", "www.ragingangels.org" ); addWebLink( "Rogue Disciples", "www.roguedisciples.com" ); +addWebLink( "Supreme Tribes", "www.supremetribes.com" ); addWebLink( "StrikeForce", "www.strikeforcecenter.com" ); addWebLink( "TeamSound", "www.teamsound.com" ); addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" ); +addWebLink( "Temple of Blood", "www.templeofblood.com" ); addWebLink( "The Ghostbear Tribe", "www.ghostbear.net" ); -addWebLink( "TribalWar", "www.tribalwar.com" ); -addWebLink( "Tribes2 Database", "www.tribes2database.com" ); +addWebLink( "ToKrZ", "www.tokrz.com" ); +addWebLink( "Tribes Attack", "www.tribesattack.com" ); +addWebLink( "Tribes Center", "www.tribescenter.com" ); +addWebLink( "Tribes 2 Database", "www.tribes2database.com" ); addWebLink( "Tribes Gamers", "www.tribesgamers.com" ); addWebLink( "TribesMaps", "www.tribesmaps.com" ); +addWebLink( "TribalWar", "www.tribalwar.com" ); addWebLink( "Tribes Worlds", "www.tribesworlds.com" ); addWebLink( "Tribes-Universe", "www.tribes-universe.com" ); addWebLink( "WirePlay", "www.wireplay.com.au" ); diff --git a/base/scripts/webnews.cs b/base/scripts/webnews.cs index d618d14..46d78d8 100644 --- a/base/scripts/webnews.cs +++ b/base/scripts/webnews.cs @@ -7,8 +7,10 @@ function LaunchNews() //----------------------------------------------------------------------------- function updatePageBtn(%prev,%next) { - NewsPrevBtn.setActive( %prev ); - NewsNextBtn.setActive( %next ); + NewsPrevBtn.setVisible( 0 ); + NewsNextBtn.setVisible( 0 ); +// NewsPrevBtn.setActive( %prev ); +// NewsNextBtn.setActive( %next ); } //----------------------------------------------------------------------------- function NewsGui::onWake(%this) @@ -228,8 +230,17 @@ function NewsPostDlg::onDatabaseQueryResult(%this, %status, %RowCount_Result, %k switch$(%this.state) { case "post": + if(%this.FromForums) + { + %this.FromForums = false; + ForumsMessageVector.deleteLine( %this.FIndex ); + ForumsTopicsList.refreshFlag = true; + CacheForumTopic(); + ForumsGoTopics(0); + } %this.state = "OK"; - MessageBoxOK("NOTICE","Your article has been submitted. You may need to refresh your Browser."); + MessageBoxOK("NOTICE","Your article has been submitted. You may need to refresh your Browser."); + case "edit": %this.state = "OK"; MessageBoxOK("NOTICE","Article Updated. You may need to refresh your Browser."); diff --git a/base/version.cs b/base/version.cs index abefa49..b3cd165 100644 --- a/base/version.cs +++ b/base/version.cs @@ -1 +1 @@ -buildVersion.setValue( "APR 23, 2001, 6:48 PM (dmoore)" ); +buildVersion.setValue( "MAY 4, 2001, 6:55 PM (dmoore)" );