· 5 years ago · Aug 23, 2020, 10:40 AM
1class ChatWnd extends UICommonAPI;
2
3var WindowHandle PremBox;
4var string Copy;
5var color msgcolor;
6var color PremColor;
7var bool bGM;
8var int chat_input;
9var bool IsClickTextLink;
10var int GlobalClickX;
11var int GlobalClickY;
12var int LogLineCount;
13//var CaptchaWnd Captcha;
14var int MsgNum;
15var int TIMER_TIME;
16var EssenceTimerWnd EssenceTimerWnd;
17var TimerMapWnd TimerMapWnd;
18var PlayerOlympiadStatWnd POSscript;
19var EV_ValhallaLotteryWnd EV_ValhallaLotteryWnd;
20var EV_ValhallaElementZoneWnd EV_ValhallaElementZoneWnd;
21
22var string TextLinkNameStr;
23const DialogGetCharToMe = 55;
24const DialogKickSelectChar = 66;
25struct ChatFilterInfo
26{
27 var int bSystem;
28 var int bChat;
29 var int bDamage;
30 var int bNormal;
31 var int bShout;
32 var int bClan;
33 var int bParty;
34 var int bTrade;
35 var int bWhisper;
36 var int bAlly;
37 var int bUseitem;
38 var int bHero;
39 var int bUnion;
40 var int bBattle;
41};
42
43//Global Setting
44var int m_NoUnionCommanderMessage;
45var int m_NoNpcMessage; // NPC 대사 필터링 - 2010.9.8 winkey
46
47
48var int m_KeywordFilterSound;
49var int m_KeywordFilterActivate;
50var string m_Keyword0;
51var string m_Keyword1;
52var string m_Keyword2;
53
54var array<ChatFilterInfo> m_filterInfo;
55var array<string> m_sectionName;
56//~ var int m_chatType;
57
58struct ChatUIType
59{
60 var int ID;
61 var int UI;
62};
63
64var ChatUIType m_ChatUI[8];
65var ChatUIType m_chatType;
66
67const CHAT_WINDOW_NORMAL = 0;
68const CHAT_WINDOW_TRADE = 1;
69const CHAT_WINDOW_PARTY = 2;
70const CHAT_WINDOW_CLAN = 3;
71const CHAT_WINDOW_ALLY = 4;
72const CHAT_WINDOW_COUNT = 9;
73const CHAT_WINDOW_SYSTEM = 9; // 시스템 메시지 창
74//~ const CHAT_WINDOW_
75
76
77//(10.1.28 문선준 추가)
78//Link 이벤트 const 값.
79const DIALOGID_GoWeb = 10;
80//Url 값 저장.
81var string Url;
82var string Text;
83
84//branch
85//const CHAT_UNION_MAX = 20; // 지휘채널 OnScreenMessage 한줄에 최대로 들어갈 수 있는 글자 수
86const CHAT_UNION_MAX = 35; // 지휘채널 OnScreenMessage 한줄에 최대로 들어갈 수 있는 글자 수(글로벌용)
87//end of branch
88
89//Handle List
90var ChatWindowHandle NormalChat;
91var ChatWindowHandle TradeChat;
92var ChatWindowHandle PartyChat;
93var ChatWindowHandle ClanChat;
94var ChatWindowHandle AllyChat;
95var ChatWindowHandle SystemMsg;
96
97var ToGM GM;
98
99//~ var ChekboxHandle OutEditBox
100
101var EssenceMainDesc EssenceMainDesc;
102var TabHandle ChatTabCtrl;
103var EditBoxHandle ChatEditBox;
104
105var WindowHandle m_hChatWnd;
106var WindowHandle m_hSystemMsgWnd;
107var WindowHandle m_hChatFilterWnd;
108var TextureHandle m_hChatWndLanguageTexture;
109
110var CheckBoxHandle m_hChatFilterWndSystemMsgBox;
111var CheckBoxHandle m_hChatFilterWndDamageBox;
112var CheckBoxHandle m_hChatFilterWndItemBox;
113var TextboxHandle m_hChatFilterWndCurrentText;
114
115var CheckBoxHandle m_hChkChatFilterWndCheckBoxCommand;
116var CheckBoxHandle m_hChkChatFilterWndCheckBoxNpc; // NPC 대사 필터링 - 2010.9.8 winkey
117var CheckBoxHandle m_hChkChatFilterWndKeywordSoundBox;
118var CheckBoxHandle m_hChkChatFilterWndKeywordFilterBox;
119
120var CheckBoxHandle m_hChkChatFilterWndCheckBoxSystem;
121var CheckBoxHandle m_hChkChatFilterWndCheckBoxNormal;
122var CheckBoxHandle m_hChkChatFilterWndCheckBoxShout;
123var CheckBoxHandle m_hChkChatFilterWndCheckBoxPledge;
124var CheckBoxHandle m_hChkChatFilterWndCheckBoxParty;
125var CheckBoxHandle m_hChkChatFilterWndCheckBoxTrade;
126var CheckBoxHandle m_hChkChatFilterWndCheckBoxWhisper;
127var CheckBoxHandle m_hChkChatFilterWndCheckBoxDamage;
128var CheckBoxHandle m_hChkChatFilterWndCheckBoxAlly;
129var CheckBoxHandle m_hChkChatFilterWndCheckBoxItem;
130var CheckBoxHandle m_hChkChatFilterWndCheckBoxHero;
131var CheckBoxHandle m_hChkChatFilterWndCheckBoxUnion;
132var CheckBoxHandle m_hChkChatFilterWndCheckBoxBattleField;
133
134
135function OnRegisterEvent()
136{
137 registerEvent( EV_ChatMessage );
138 registerEvent( EV_IMEStatusChange );
139
140 registerEvent( EV_ChatWndStatusChange );
141 registerEvent( EV_ChatWndSetString );
142 registerEvent( EV_ChatWndSetFocus );
143 registerEvent( EV_ChatWndMsnStatus );
144 registerEvent( EV_ChatWndMacroCommand );
145
146 //TextLink
147 registerEvent( EV_TextLinkLButtonClick );
148 registerEvent(EV_GamingStateEnter);
149 registerEvent(EV_GamingStateExit);
150
151
152 //진정창, 채팅 url링크 이벤트(10.1.28 문선준 추가)
153 registerEvent( EV_UrlLinkClick );
154 registerEvent( EV_DialogOK );
155 registerEvent( EV_DialogCancel );
156}
157
158function OnLoad()
159{
160 m_filterInfo.Length = CHAT_WINDOW_COUNT + 1; // 실제로 쓰이는 것은 CHAT_WINDOW_COUNT 만큼이지만 CheckFilter를 좀 더 간편하게 짜기위해 CHAT_WINDOW_SYSTEM 용 더미를 한개 더 할당한다.
161 MsgNum = 0;
162 m_sectionName.Length = CHAT_WINDOW_COUNT; // chatfilter.ini에서의 항목
163 m_sectionName[0] = "entire_tab";
164 m_sectionName[1] = "pledge_tab";
165 m_sectionName[2] = "party_tab";
166 m_sectionName[3] = "market_tab";
167 m_sectionName[4] = "ally_tab";
168 m_sectionName[5] = "hero_tab";
169 m_sectionName[6] = "union_tab";
170 m_sectionName[7] = "shout_tab";
171 m_sectionName[8] = "battlefield_tab";
172 //~ m_sectionName[CHAT_WINDOW_ALLY] = "ally_tab";
173 //~ m_sectionName[CHAT_WINDOW_ALLY] = "ally_tab";
174 //~ m_sectionName[CHAT_WINDOW_ALLY] = "ally_tab";
175 //~ m_sectionName[CHAT_WINDOW_ALLY] = "ally_tab";
176
177 // xml 에서 GaimingState에 등록해 주고 여기서 추가로 OlympiadObserverState에도 등록해 준다.
178 RegisterState( "ChatWnd", "OlympiadObserverState" );
179
180 if(CREATE_ON_DEMAND==0)
181 OnRegisterEvent();
182
183 if(CREATE_ON_DEMAND==0)
184 InitHandle();
185 else
186 InitHandleCOD();
187
188 InitFilterInfo();
189 InitGlobalSetting();
190 InitScrollBarPosition();
191
192 //Enable TextLink
193 ChatEditBox.SetEnableTextLink( true );
194 m_chatType.UI = 0;
195 m_chatType.ID = -1;
196 //all-time
197 msgcolor.R = 212;
198 msgcolor.G = 175;
199 msgcolor.B = 55;
200 //prem
201 PremColor.R = 255;
202 PremColor.G = 0;
203 PremColor.B = 0;
204 PremBox = GetWindowHandle("StatusWnd.StatusWnd_LevelTextBox_back");
205 POSscript = PlayerOlympiadStatWnd(GetScript("PlayerOlympiadStatWnd"));
206 EssenceTimerWnd = EssenceTimerWnd(GetScript("EssenceTimerWnd"));
207 TimerMapWnd = TimerMapWnd(GetScript("TimerMapWnd"));
208 EV_ValhallaLotteryWnd = EV_ValhallaLotteryWnd(GetScript("EV_ValhallaLotteryWnd"));
209 EV_ValhallaElementZoneWnd = EV_ValhallaElementZoneWnd(GetScript("EV_ValhallaElementZoneWnd"));
210 EssenceMainDesc = EssenceMainDesc(GetScript("EssenceMainDesc"));
211 //added special GM-captcha command -Voices
212 //Captcha = CaptchaWnd(GetScript("CaptchaWnd"));
213}
214
215//function OnExitState( name a_NextStateName )
216//{
217 //if (a_NextStateName == 'GamingState')
218 //{
219 // ShowWindow("ChatWnd");
220 //}
221 //else if ( a_NextStateName == 'OlympiadObserverState')
222 //{
223 // ShowWindow("ChatWnd");
224 //}
225 //else
226 //{
227 //HideWindow("ChatWnd");
228 //}
229//}
230
231function OnDefaultPosition()
232{
233 ChatTabCtrl.MergeTab(CHAT_WINDOW_TRADE);
234 ChatTabCtrl.MergeTab(CHAT_WINDOW_PARTY);
235 ChatTabCtrl.MergeTab(CHAT_WINDOW_CLAN);
236 ChatTabCtrl.MergeTab(CHAT_WINDOW_ALLY);
237 ChatTabCtrl.SetTopOrder(0, true);
238
239 m_hChatWnd.SetAnchor("", "BottomLeft", "BottomLeft", 0, -27 );
240 HandleTabClick("ChatTabCtrl0");
241}
242
243function InitGlobalSetting()
244{
245 local EditBoxHandle EditBox_KeyWord0;
246 local EditBoxHandle EditBox_KeyWord1;
247 local EditBoxHandle EditBox_KeyWord2;
248
249 if(CREATE_ON_DEMAND==0)
250 OnRegisterEvent();
251
252 if(CREATE_ON_DEMAND==0)
253 {
254 EditBox_KeyWord0 = EditBoxHandle (GetHandle("ChatFilterWnd.Editbox_KeyWord0" ));
255 EditBox_KeyWord1 = EditBoxHandle (GetHandle("ChatFilterWnd.Editbox_KeyWord1" ));
256 EditBox_KeyWord2 = EditBoxHandle (GetHandle("ChatFilterWnd.Editbox_KeyWord2" ));
257 }
258 else
259 {
260 EditBox_KeyWord0 = GetEditBoxHandle ("ChatFilterWnd.Editbox_KeyWord0" );
261 EditBox_KeyWord1 = GetEditBoxHandle ("ChatFilterWnd.Editbox_KeyWord1" );
262 EditBox_KeyWord2 = GetEditBoxHandle ("ChatFilterWnd.Editbox_KeyWord2" );
263 }
264
265 m_hChkChatFilterWndCheckBoxCommand.SetCheck( bool(m_NoUnionCommanderMessage) );
266 m_hChkChatFilterWndCheckBoxNpc.SetCheck( bool(m_NoNpcMessage) ); // NPC 대사 필터링 - 2010.9.8 winkey
267 m_hChkChatFilterWndKeywordSoundBox.SetCheck( bool(m_KeywordFilterSound) );
268 m_hChkChatFilterWndKeywordFilterBox.SetCheck( bool(m_KeywordFilterActivate) );
269
270 EditBox_KeyWord0.SetString(m_Keyword0);
271 EditBox_KeyWord1.SetString(m_Keyword1);
272 EditBox_KeyWord2.SetString(m_Keyword2);
273 GM = ToGM(GetScript("ToGM"));
274
275}
276
277function InitHandle()
278{
279 NormalChat = ChatWindowHandle( GetHandle( "ChatWnd.NormalChat" ));
280 TradeChat = ChatWindowHandle( GetHandle( "ChatWnd.TradeChat" ));
281 PartyChat = ChatWindowHandle( GetHandle( "ChatWnd.PartyChat" ));
282 ClanChat = ChatWindowHandle( GetHandle( "ChatWnd.ClanChat" ));
283 AllyChat = ChatWindowHandle( GetHandle( "ChatWnd.AllyChat" ));
284 SystemMsg = ChatWindowHandle( GetHandle( "SystemMsgWnd.SystemMsgList" ));
285 ChatTabCtrl = TabHandle( GetHandle("ChatWnd.ChatTabCtrl" ));
286 ChatEditBox = EditBoxHandle( GetHandle("ChatWnd.ChatEditBox" ));
287
288 m_hChatWnd=GetHandle("ChatWnd");
289 m_hSystemMsgWnd=GetHandle("SystemMsgWnd");
290 m_hChatFilterWnd=GetHandle("ChatFilterWnd");
291 m_hChatWndLanguageTexture=TextureHandle(GetHandle("ChatWnd.LanguageTexture"));
292
293 m_hChatFilterWndSystemMsgBox =CheckBoxHandle( GetHandle("ChatFilterWnd.SystemMsgBox"));
294 m_hChatFilterWndDamageBox =CheckBoxHandle( GetHandle("ChatFilterWnd.DamageBox"));
295 m_hChatFilterWndItemBox =CheckBoxHandle( GetHandle("ChatFilterWnd.ItemBox"));
296 m_hChatFilterWndCurrentText =TextboxHandle( GetHandle("ChatFilterWnd.CurrentText"));
297
298 m_hChkChatFilterWndCheckBoxCommand =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxCommand" ));
299 m_hChkChatFilterWndCheckBoxNpc =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxNPC" )); // NPC 대사 필터링 - 2010.9.8 winkey
300 m_hChkChatFilterWndKeywordSoundBox =CheckBoxHandle( GetHandle( "ChatFilterWnd.KeywordSoundBox" ));
301 m_hChkChatFilterWndKeywordFilterBox =CheckBoxHandle( GetHandle( "ChatFilterWnd.KeywordFilterBox" ));
302
303 m_hChkChatFilterWndCheckBoxSystem =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxSystem"));
304 m_hChkChatFilterWndCheckBoxNormal =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxNormal"));
305 m_hChkChatFilterWndCheckBoxShout =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxShout"));
306 m_hChkChatFilterWndCheckBoxPledge =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxPledge"));
307 m_hChkChatFilterWndCheckBoxParty =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxParty"));
308 m_hChkChatFilterWndCheckBoxTrade =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxTrade"));
309 m_hChkChatFilterWndCheckBoxWhisper =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxWhisper"));
310 m_hChkChatFilterWndCheckBoxDamage =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxDamage"));
311 m_hChkChatFilterWndCheckBoxAlly =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxAlly"));
312 m_hChkChatFilterWndCheckBoxItem =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxItem"));
313 m_hChkChatFilterWndCheckBoxHero =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxHero"));
314 m_hChkChatFilterWndCheckBoxUnion =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxUnion"));
315 m_hChkChatFilterWndCheckBoxBattleField =CheckBoxHandle( GetHandle( "ChatFilterWnd.CheckBoxBattle"));
316}
317
318function InitHandleCOD()
319{
320 NormalChat = GetChatWindowHandle( "ChatWnd.NormalChat" );
321 TradeChat = GetChatWindowHandle( "ChatWnd.TradeChat" );
322 PartyChat = GetChatWindowHandle( "ChatWnd.PartyChat" );
323 ClanChat = GetChatWindowHandle( "ChatWnd.ClanChat" );
324 AllyChat = GetChatWindowHandle( "ChatWnd.AllyChat" );
325 SystemMsg = GetChatWindowHandle( "SystemMsgWnd.SystemMsgList" );
326 ChatTabCtrl = GetTabHandle( "ChatWnd.ChatTabCtrl" );
327 ChatEditBox = GetEditBoxHandle( "ChatWnd.ChatEditBox" );
328
329 m_hChatWnd=GetWindowHandle("ChatWnd");
330 m_hSystemMsgWnd=GetWindowHandle("SystemMsgWnd");
331 m_hChatFilterWnd=GetWindowHandle("ChatFilterWnd");
332 m_hChatWndLanguageTexture=GetTextureHandle("ChatWnd.LanguageTexture");
333
334 m_hChatFilterWndSystemMsgBox =GetCheckboxHandle("ChatFilterWnd.SystemMsgBox");
335 m_hChatFilterWndDamageBox =GetCheckboxHandle("ChatFilterWnd.DamageBox");
336 m_hChatFilterWndItemBox =GetCheckboxHandle("ChatFilterWnd.ItemBox");
337 m_hChatFilterWndCurrentText =GetTextboxHandle("ChatFilterWnd.CurrentText");
338
339 m_hChkChatFilterWndCheckBoxCommand =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxCommand" );
340 m_hChkChatFilterWndCheckBoxNpc =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxNPC" ); // NPC 대사 필터링 - 2010.9.8 winkey
341 m_hChkChatFilterWndKeywordSoundBox =GetCheckBoxHandle( "ChatFilterWnd.KeywordSoundBox" );
342 m_hChkChatFilterWndKeywordFilterBox =GetCheckBoxHandle( "ChatFilterWnd.KeywordFilterBox" );
343
344 m_hChkChatFilterWndCheckBoxSystem =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxSystem");
345 m_hChkChatFilterWndCheckBoxNormal =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxNormal");
346 m_hChkChatFilterWndCheckBoxShout =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxShout");
347 m_hChkChatFilterWndCheckBoxPledge =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxPledge");
348 m_hChkChatFilterWndCheckBoxParty =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxParty");
349 m_hChkChatFilterWndCheckBoxTrade =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxTrade");
350 m_hChkChatFilterWndCheckBoxWhisper =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxWhisper");
351 m_hChkChatFilterWndCheckBoxDamage =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxDamage");
352 m_hChkChatFilterWndCheckBoxAlly =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxAlly");
353 m_hChkChatFilterWndCheckBoxItem =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxItem");
354 m_hChkChatFilterWndCheckBoxHero =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxHero");
355 m_hChkChatFilterWndCheckBoxUnion =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxUnion");
356 m_hChkChatFilterWndCheckBoxBattleField =GetCheckBoxHandle( "ChatFilterWnd.CheckBoxBattle");
357}
358
359function InitScrollBarPosition()
360{
361 NormalChat.SetScrollBarPosition( 5, 10, 0 );
362 TradeChat.SetScrollBarPosition( 5, 10, 0 );
363 PartyChat.SetScrollBarPosition( 5, 10, 0 );
364 ClanChat.SetScrollBarPosition( 5, 10, 0 );
365 AllyChat.SetScrollBarPosition( 5, 10, 0 );
366}
367
368
369
370function HandleChatWndMacroCommand( string param )
371{
372 local string Command;
373
374 if (!ParseString(param, "Command", Command))
375 return;
376
377 if(IsBuilderPC())
378 {
379 if(InStr(Command, "//a ") > -1)
380 {
381 Command = Substitute(Command, "//a ", "//announce ", true);
382 }
383 if(InStr(Command, "//di") > -1)
384 {
385 Command = Substitute(Command, "//di", "//destroy_all_inven_item", true);
386 }
387 if(InStr(Command, "//da") > -1)
388 {
389 Command = Substitute(Command, "//da", "//dispelall", true);
390 }
391 if(InStr(Command, "//us ") > -1)
392 {
393 Command = Substitute(Command, "//us ", "//use_skill ", true);
394 }
395 if(InStr(Command, "//ss ") > -1)
396 {
397 Command = Substitute(Command, "//ss ", "//setskill ", true);
398 }
399 if(InStr(Command, "//s ") > -1)
400 {
401 Command = Substitute(Command, "//s ", "//summon ", true);
402 }
403 if(InStr(Command, "//s2 ") > -1)
404 {
405 Command = Substitute(Command, "//s2 ", "//summon2 ", true);
406 }
407 if(InStr(Command, "//s3 ") > -1)
408 {
409 Command = Substitute(Command, "//s3 ", "//summon3 ", true);
410 }
411 if(InStr(Command, "//sn ") > -1)
412 {
413 Command = Substitute(Command, "//sn ", "//summonnpc ", true);
414 }
415 if(InStr(Command, "//sl") > -1)
416 {
417 Command = Substitute(Command, "//sl", "//show_loc", true);
418 }
419 if(InStr(Command, "//uon") > -1)
420 {
421 Command = Substitute(Command, "//uon", "//undying on", true);
422 }
423 if(InStr(Command, "//uoff") > -1)
424 {
425 Command = Substitute(Command, "//uoff", "//undying off", true);
426 }
427 if(InStr(Command, "//hon") > -1)
428 {
429 Command = Substitute(Command, "//hon", "//hide on", true);
430 }
431 if(InStr(Command, "//hoff") > -1)
432 {
433 Command = Substitute(Command, "//hoff", "//hide off", true);
434 }
435 if(InStr(Command, "//kn") > -1)
436 {
437 Command = Substitute(Command, "//kn", "//killnpc", true);
438 }
439
440 if(InStr(Command, "//gs ") > -1)
441 {
442 Command = Substitute(Command, "//gs ", "//gmspeed ", true);
443 }
444 if(InStr(Command, "//sp ") > -1)
445 {
446 Command = Substitute(Command, "//sp ", "//setparam ", true);
447 }
448 if(InStr(Command, "//rsd") > -1)
449 {
450 Command = Substitute(Command, "//rsd", "//remove_skill_delay_all", true);
451 }
452
453 if(InStr(Command, "//del_a ") > -1)
454 {
455 Command = Substitute(Command, "//del_a", "//delete_abnormal", true);
456 }
457 if(InStr(Command, "//la") > -1)
458 {
459 Command = Substitute(Command, "//la", "//list_abnormal", true);
460 }
461 if(InStr(Command, "//olystat") > -1)
462 {
463 Command = Substitute(Command, "//olystat", "//olympiadstat", true);
464 }
465 }
466
467 //builder command '///'
468 if(InStr(Command, "/stat fps") > -1)
469 {
470 ShowOn("Show fps command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
471
472 ExecuteCommandEx("stat fps");
473 return;
474 }
475 if(InStr(Command, "/show particles") > -1)
476 {
477 ShowOn("Show particles command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
478 ExecuteCommandEx("show particles");
479 return;
480 }
481 if(InStr(Command, "/show coronas") > -1)
482 {
483 ShowOn("Show coronas command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
484
485 ExecuteCommandEx("show coronas");
486 return;
487 }
488 if(InStr(Command, "/show fog") > -1)
489 {
490 ShowOn("Show fog command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
491
492 ExecuteCommandEx("show fog");
493 return;
494 }
495 if(InStr(Command, "/show sky") > -1)
496 {
497 ShowOn("Show sky command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
498
499 ExecuteCommandEx("show sky");
500 return;
501 }
502 if(InStr(Command, "/hidename") > -1)
503 {
504 ShowOn("Show hidename command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
505
506 ExecuteCommandEx("hidename");
507 return;
508 }
509 if(InStr(Command, "/rmode 5") > -1)
510 {
511 ShowOn("Rmode 5 command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
512
513 ExecuteCommandEx("rmode 5");
514 return;
515 }
516 if(InStr(Command, "/rmode 6") > -1)
517 {
518 ShowOn("Rmode 6 command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
519
520 ExecuteCommandEx("rmode 6");
521 return;
522 }
523 if(InStr(Command, "/hero") > -1)
524 {
525 ShowOn("Visible Hero command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
526
527 ExecuteCommandEx("hero");
528 return;
529 }
530
531 if(InStr(Command, "/destroy_cache") > -1)
532 {
533 ShowOn("destroy_cache command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
534
535 DestroyCache();
536 return;
537 }
538
539 ProcessChatMessage( Command, m_chatType.ID );
540
541
542 if(Command == "/olympiadstat")
543 POSscript.IsShowOEMWnd = false;
544}
545
546
547
548function OnCompleteEditBox( String strID )
549{
550 local String strInput;
551 local EChatType Type;
552 if( strID == "ChatEditBox" )
553 {
554 strInput = ChatEditBox.GetString();
555
556 if ( Len( strInput ) < 1 )
557 return;
558//announce = //a
559//destroy_all_inven_item = //di
560//dispelall = //da
561//use_skill = //us
562//setskill = //ss
563//summon = //s
564//summon2 = //s2
565//summon3 = //s3
566//summonitem = //si
567//summonnpc = //sn
568//teleport = //t
569//show_loc = //sl
570//undying on = //uon
571//undying off = //uoff
572//hide on = //hon
573//hide off = //hoff
574//killnpc = //kn
575 if(IsBuilderPC())
576 {
577 if(InStr(strInput, "//a ") > -1)
578 {
579 strInput = Substitute(strInput, "//a ", "//announce ", true);
580 }
581 if(InStr(strInput, "//di") > -1)
582 {
583 strInput = Substitute(strInput, "//di", "//destroy_all_inven_item", true);
584 }
585 if(InStr(strInput, "//da") > -1)
586 {
587 strInput = Substitute(strInput, "//da", "//dispelall", true);
588 }
589 if(InStr(strInput, "//us ") > -1)
590 {
591 strInput = Substitute(strInput, "//us ", "//use_skill ", true);
592 }
593 if(InStr(strInput, "//ss ") > -1)
594 {
595 strInput = Substitute(strInput, "//ss ", "//setskill ", true);
596 }
597 if(InStr(strInput, "//s ") > -1)
598 {
599 strInput = Substitute(strInput, "//s ", "//summon ", true);
600 }
601 if(InStr(strInput, "//s2 ") > -1)
602 {
603 strInput = Substitute(strInput, "//s2 ", "//summon2 ", true);
604 }
605 if(InStr(strInput, "//s3 ") > -1)
606 {
607 strInput = Substitute(strInput, "//s3 ", "//summon3 ", true);
608 }
609 if(InStr(strInput, "//sn ") > -1)
610 {
611 strInput = Substitute(strInput, "//sn ", "//summonnpc ", true);
612 }
613 if(InStr(strInput, "//sl") > -1)
614 {
615 strInput = Substitute(strInput, "//sl", "//show_loc", true);
616 }
617 if(InStr(strInput, "//uon") > -1)
618 {
619 strInput = Substitute(strInput, "//uon", "//undying on", true);
620 }
621 if(InStr(strInput, "//uoff") > -1)
622 {
623 strInput = Substitute(strInput, "//uoff", "//undying off", true);
624 }
625 if(InStr(strInput, "//hon") > -1)
626 {
627 strInput = Substitute(strInput, "//hon", "//hide on", true);
628 }
629 if(InStr(strInput, "//hoff") > -1)
630 {
631 strInput = Substitute(strInput, "//hoff", "//hide off", true);
632 }
633 if(InStr(strInput, "//kn") > -1)
634 {
635 strInput = Substitute(strInput, "//kn", "//killnpc", true);
636 }
637
638 if(InStr(strInput, "//gs ") > -1)
639 {
640 strInput = Substitute(strInput, "//gs ", "//gmspeed ", true);
641 }
642 if(InStr(strInput, "//rsd") > -1)
643 {
644 strInput = Substitute(strInput, "//rsd", "//remove_skill_delay_all", true);
645 }
646 if(InStr(strInput, "//sp ") > -1)
647 {
648 strInput = Substitute(strInput, "//sp ", "//setparam ", true);
649 }
650
651 if(InStr(strInput, "//del_a ") > -1)
652 {
653 strInput = Substitute(strInput, "//del_a", "//delete_abnormal", true);
654 }
655 if(InStr(strInput, "//la") > -1)
656 {
657 strInput = Substitute(strInput, "//la", "//list_abnormal", true);
658 }
659 if(InStr(strInput, "//olystat") > -1)
660 {
661 strInput = Substitute(strInput, "//olystat", "//olympiadstat", true);
662 }
663 }
664
665 //builder command '///'
666 if(InStr(strInput, "/stat fps") > -1)
667 {
668 ExecuteCommandEx("stat fps");
669 ShowOn("Show FPS command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
670 ChatEditBox.SetString( "" );
671 return;
672 }
673 if(InStr(strInput, "/show particles") > -1)
674 {
675 ExecuteCommandEx("show particles");
676 ShowOn("Show particles command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
677 ChatEditBox.SetString( "" );
678 return;
679 }
680 if(InStr(strInput, "/show coronas") > -1)
681 {
682 ExecuteCommandEx("show coronas");
683 ShowOn("Show coronas command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
684 ChatEditBox.SetString( "" );
685 return;
686 }
687 if(InStr(strInput, "/show fog") > -1)
688 {
689 ExecuteCommandEx("show fog");
690 ShowOn("Show fog command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
691 ChatEditBox.SetString( "" );
692 return;
693 }
694 if(InStr(strInput, "/show sky") > -1)
695 {
696 ExecuteCommandEx("show sky");
697 ShowOn("Show sky command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
698 ChatEditBox.SetString( "" );
699 return;
700 }
701 if(InStr(strInput, "/hidename") > -1)
702 {
703 ExecuteCommandEx("hidename");
704 ShowOn("Show hidename command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
705 ChatEditBox.SetString( "" );
706 return;
707 }
708
709 if(InStr(strInput, "/rmode 5") > -1)
710 {
711 ExecuteCommandEx("rmode 5");
712 ShowOn("Rmode 5 command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
713 ChatEditBox.SetString( "" );
714 return;
715 }
716
717 if(InStr(strInput, "/rmode 6") > -1)
718 {
719 ExecuteCommandEx("rmode 6");
720 ShowOn("Rmode 6 command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
721 ChatEditBox.SetString( "" );
722 return;
723 }
724
725 if(InStr(strInput, "/hero") > -1)
726 {
727 ExecuteCommandEx("hero");
728 ShowOn("Visible Hero command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
729 ChatEditBox.SetString( "" );
730 return;
731 }
732 if(InStr(strInput, "/destroy_cache") > -1)
733 {
734 ShowOn("destroy_cache command", 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
735 DestroyCache();
736 ChatEditBox.SetString( "" );
737 return;
738 }
739
740 ProcessChatMessage( strInput, m_chatType.ID, true );
741 ChatEditBox.SetString( "" );
742
743
744 if( GetOptionBool( "Game", "OldChatting" ) == true)
745 {
746 Type = GetChatTypeByTabIndex( m_chatType.ID );
747
748 if ( m_chatType.ID != 0 )
749 {
750 if(GetChatPrefix( Type ) != "~")
751 {
752 ChatEditBox.AddString( GetChatPrefix( Type ) );
753 }
754 }
755
756 }
757
758 //엔터채팅
759 if( GetOptionBool( "Game", "EnterChatting" ) == true)
760 {
761 ChatEditBox.ReleaseFocus();
762 }
763
764
765///******* TARGET OLYMPIAD STAT ENABLED *******///
766 if(strInput == "/olympiadstat")
767 {
768 POSscript.IsShowOEMWnd = false;
769 }
770 }
771}
772
773function Clear()
774{
775 ChatEditBox.Clear();
776 NormalChat.Clear();
777 PartyChat.Clear();
778 ClanChat.Clear();
779 TradeChat.Clear();
780 AllyChat.Clear();
781 SystemMsg.Clear();
782}
783
784function OnShow()
785{
786 if( GetOptionBool("Game", "SystemMsgWnd") )
787 {
788 m_hSystemMsgWnd.ShowWindow();
789 }
790 else
791 {
792 m_hSystemMsgWnd.HideWindow();
793 }
794
795 HandleIMEStatusChange();
796
797 GetAllcurrentAssignedChatTypeID();
798 //~ SetChatFilterButton();
799 //~ HandleTabClick("ChatTabCtrl0");
800 m_chatType.UI = 0;
801 m_chatType.ID = -1;
802 CheckChatPosition();
803}
804
805function CheckChatPosition()
806{
807 class'UIAPI_WINDOW'.static.SetAnchor( "ChatWnd", "", "BottomLeft", "BottomLeft", 0, -27 );
808}
809
810function OnClickButton( String strID )
811{
812 local PartyMatchWnd script;
813 local WindowHandle TaskWnd;
814 local PartyMatchRoomWnd p2_script;
815 p2_script = PartyMatchRoomWnd( GetScript( "PartyMatchRoomWnd" ) );
816 script = PartyMatchWnd( GetScript( "PartyMatchWnd" ) );
817 switch( strID )
818 {
819 case "ChatTabCtrl0":
820 case "ChatTabCtrl1":
821 case "ChatTabCtrl2":
822 case "ChatTabCtrl3":
823 case "ChatTabCtrl4":
824 //~ InitScrollBarPosition();
825 HandleTabClick(strID);
826 break;
827 case "ChatFilterBtn":
828 if (m_hChatFilterWnd.IsShowWindow())
829 {
830 m_hChatFilterWnd.HideWindow();
831 }
832 else
833 {
834 SetChatFilterButton();
835 m_hChatFilterWnd.ShowWindow();
836 }
837 break;
838 case "MessengerBtn":
839 ToggleMsnWindow();
840 break;
841 case "PartyMatchingBtn":
842 if(CREATE_ON_DEMAND==0)
843 TaskWnd=GetHandle( "PartyMatchWnd" );
844 else
845 TaskWnd=GetWindowHandle( "PartyMatchWnd" );
846
847 if (TaskWnd.IsShowWindow())
848 {
849 ClosePartyMatchingWnd();
850 }
851 else
852 {
853 if(CREATE_ON_DEMAND==0)
854 TaskWnd=GetHandle("PartyMatchRoomWnd");
855 else
856 TaskWnd=GetWindowHandle("PartyMatchRoomWnd");
857
858 if (TaskWnd.IsShowWindow())
859 {
860 TaskWnd.HideWindow();
861
862 if(CREATE_ON_DEMAND==0)
863 TaskWnd=GetHandle("PartyMatchWnd");
864 else
865 TaskWnd=GetWindowHandle("PartyMatchWnd");
866
867 p2_script.OnSendPacketWhenHiding();
868
869
870 if(CREATE_ON_DEMAND==0)
871 TaskWnd=GetHandle("ChatWnd");
872 else
873 TaskWnd=GetWindowHandle("ChatWnd");
874
875 TaskWnd.SetTimer( 1992, 500 );
876 }
877 else
878 {
879 if(CREATE_ON_DEMAND==0)
880 TaskWnd=GetHandle("PartyMatchWnd");
881 else
882 TaskWnd=GetWindowHandle("PartyMatchWnd");
883 //~ TaskWnd.ShowWindow();
884 class'PartyMatchAPI'.static.RequestOpenPartyMatch();
885 //~ ExecuteCommand("/partymatching");
886 }
887 }
888 //~ ExecuteCommand("/partymatch");
889 break;
890 default:
891 break;
892 };
893}
894
895function ClosePartyMatchingWnd()
896{
897 local WindowHandle TaskWnd;
898 local PartyMatchWnd p_script;
899 p_script = PartyMatchWnd( GetScript( "PartyMatchWnd" ) );
900
901 if(CREATE_ON_DEMAND==0)
902 TaskWnd = GetHandle("PartyMatchWnd");
903 else
904 TaskWnd = GetWindowHandle("PartyMatchWnd");
905
906 TaskWnd.HideWindow();
907 p_script.OnSendPacketWhenHiding();
908}
909
910
911
912function OnTabSplit( string sTabButton )
913{
914 //~ local int width;
915 //~ local int height;
916
917 local ChatWindowHandle handle;
918 InitScrollBarPosition();
919
920 switch( sTabButton )
921 {
922 case "ChatTabCtrl0":
923 handle = NormalChat;
924 HandleTabClick(sTabButton);
925 break;
926 case "ChatTabCtrl1":
927 handle = TradeChat;
928 HandleTabClick(sTabButton);
929 break;
930 case "ChatTabCtrl2":
931 handle = PartyChat;
932 HandleTabClick(sTabButton);
933 break;
934 case "ChatTabCtrl3":
935 handle = ClanChat;
936 HandleTabClick(sTabButton);
937 break;
938 case "ChatTabCtrl4":
939 handle = AllyChat;
940 HandleTabClick(sTabButton);
941 break;
942 default:
943 break;
944 };
945 if (handle!=None)
946 {
947 //~ handle.Move(0,-4);
948 handle.SetWindowSizeRel( -1.0f, -1.0f, 0, 0); //RelativeSize해제
949 //~ handle.GeWindowSize( width, height );
950 //~ handle.SetWindowSize( width , height + 4 );
951 handle.Move(0,4);
952 //handle.SetSettledWnd( true );
953 handle.EnableTexture( true );
954 }
955}
956
957function OnTabMerge( string sTabButton )
958{
959 local ChatWindowHandle handle;
960 local int width, height;
961 local Rect rectWnd;
962 InitScrollBarPosition();
963
964 switch( sTabButton )
965 {
966 case "ChatTabCtrl0":
967 handle = NormalChat;
968 break;
969 case "ChatTabCtrl1":
970 handle = TradeChat;
971 break;
972 case "ChatTabCtrl2":
973 handle = PartyChat;
974 break;
975 case "ChatTabCtrl3":
976 handle = ClanChat;
977 break;
978 case "ChatTabCtrl4":
979 handle = AllyChat;
980 break;
981 default:
982 break;
983 };
984 if (handle!=None)
985 {
986 rectWnd = NormalChat.GetRect();
987 NormalChat.GetWindowSize( width, height );
988 handle.Move(0,-4);
989 handle.SetSettledWnd( false );
990 handle.MoveTo( rectWnd.nX, rectWnd.nY );
991 handle.SetWindowSize( width, height - 46 );
992 handle.SetWindowSizeRel( 1.0f, 1.0f, 0, -46 );
993 handle.EnableTexture( false );
994 }
995}
996
997function HandleTabClick( string strID )
998{
999 local string strInput;
1000 local string strPrefix;
1001 local int strLen;
1002
1003 m_chatType.UI = ChatTabCtrl.GetTopIndex();
1004 //~ debug("CurrentTopIndex" @ m_chatType.UI);
1005 m_chatType.ID = GetCurrentChatTypeID(m_chatType.UI);
1006
1007 SetChatFilterButton();
1008 InitScrollBarPosition();
1009
1010 //채팅기호
1011 if( GetOptionBool( "Game", "OldChatting" ) == true)
1012 {
1013 //~ debug("Arrange me");
1014 strInput = ChatEditBox.GetString();
1015 strLen = Len(strInput);
1016 //Prefix가 있으면, 제거(일단 길이는 1로 가정한다)
1017 strPrefix = Left( strInput, 1 );
1018 if ( IsSameChatPrefix(CHAT_MARKET, strPrefix)
1019 || IsSameChatPrefix(CHAT_PARTY, strPrefix)
1020 || IsSameChatPrefix(CHAT_CLAN, strPrefix)
1021 || IsSameChatPrefix(CHAT_ALLIANCE, strPrefix)
1022 || IsSameChatPrefix(CHAT_HERO, strPrefix)
1023 || IsSameChatPrefix(CHAT_INTER_PARTYMASTER_CHAT, strPrefix)
1024 || IsSameChatPrefix(CHAT_SHOUT, strPrefix)
1025 //~ || IsSameChatPrefix(CHAT_BATTLE, strPrefix)
1026 || IsSameChatPrefix(CHAT_DOMINIONWAR, strPrefix) )
1027 {
1028 strInput = Right( strInput, strLen-1 );
1029 }
1030 //일반탭이 아닌 경우, 변경된 Prefix를 붙여준다.
1031 //~ if ( m_chatType.ID != CHAT_WINDOW_NORMAL )
1032 if ( m_chatType.UI != 0 )
1033 {
1034 //~ if(GetChatPrefix( Type ) != "~")
1035 strPrefix = GetChatPrefix(GetChatTypeByTabIndex(m_chatType.ID));
1036 if (strPrefix != "~")
1037 strInput = strPrefix $ strInput;
1038 }
1039 else
1040 {
1041 strPrefix = "";
1042 strInput = strPrefix $ strInput;
1043 }
1044 ChatEditBox.SetString(strInput);
1045 }
1046}
1047
1048function OnEnterState( name a_PrevStateName )
1049{
1050 if( a_PrevStateName == 'LoadingState' && !class'UIAPI_CHECKBOX'.static.IsChecked("ChatFilterWnd.ChatClearBox") )
1051 {
1052 if(!IsBuilderPC())
1053 { //гм никогда не чистит чат
1054 Clear();
1055 }
1056
1057 }
1058}
1059
1060function OnEvent(int Event_ID, String param)
1061{
1062 switch( Event_ID )
1063 {
1064 case EV_ChatMessage:
1065 HandleChatMessage( param );
1066 break;
1067 case EV_IMEStatusChange:
1068 HandleIMEStatusChange();
1069 break;
1070 case EV_ChatWndStatusChange:
1071 HandleChatWndStatusChange();
1072 break;
1073 case EV_ChatWndSetFocus:
1074 HandleSetFocus();
1075 break;
1076 case EV_ChatWndSetString:
1077 HandleSetString( param );
1078 break;
1079 case EV_ChatWndMsnStatus:
1080 HandleMsnStatus(param);
1081 break;
1082 case EV_ChatWndMacroCommand:
1083 HandleChatWndMacroCommand( param );
1084 break;
1085 case EV_TextLinkLButtonClick:
1086 HandleTextLinkLButtonClick( param );
1087 break;
1088 case EV_DominionWarChannelSet:
1089 HandleDominionWarChannelSet( param );
1090 break;
1091 case EV_GamingStateEnter:
1092 CheckChatPosition();
1093 SetChatFilterButton();
1094 LogLineCount = 0;
1095 HandleTabClick("ChatTabCtrl0");
1096 break;
1097 case EV_GamingStateExit:
1098 ChatEditBox.ClearHistory();
1099 //PremBox.SetTooltipCustomType(MakeTooltipSimpleText(GetSystemString(6293)));
1100 break;
1101 //진정창, 채팅 url링크 이벤트 리스너(10.1.28 문선준 추가)
1102 case EV_UrlLinkClick:
1103 linkWebPage( param );
1104 break;
1105 case EV_DialogOK:
1106 HandleDialogOK();
1107 break;
1108 case EV_DialogCancel:
1109 break;
1110 default:
1111 break;
1112 }
1113}
1114
1115function linkWebPage( string param )
1116{
1117 if ( !ParseString(param, "Url", Url) )
1118 return;
1119
1120 if ( !ParseString(param, "Text", Text) )
1121 {
1122 Text = "";
1123 }
1124
1125 //debug( "Url---->" $ Url @ GetSystemString( 2265 ));
1126 //debug( "Text---->" $ Text );
1127
1128 DialogSetID( DIALOGID_GoWeb );
1129 if( Text != "" )
1130 {
1131 DialogShow( DIALOG_Modalless, DIALOG_OKCancel, MakeFullSystemMsg( GetSystemMessage( 3211 ) , Text, "" ) );
1132 }
1133 else
1134 {
1135 if( Url == GetSystemString( 2265 ) )
1136 {
1137 DialogShow( DIALOG_Modalless, DIALOG_OKCancel, MakeFullSystemMsg( GetSystemMessage( 3211 ) , GetSystemString( 2259 ), "" ) );
1138 }
1139 else if( Url == GetSystemString( 2266 ) )
1140 {
1141 DialogShow( DIALOG_Modalless, DIALOG_OKCancel, MakeFullSystemMsg( GetSystemMessage( 3211 ) , GetSystemString( 2261 ), "" ) );
1142 }
1143 else if( Url == GetSystemString( 2267 ) )
1144 {
1145 DialogShow( DIALOG_Modalless, DIALOG_OKCancel, MakeFullSystemMsg( GetSystemMessage( 3211 ) , GetSystemString( 2263 ), "" ) );
1146 }
1147
1148 }
1149}
1150
1151function RequestMacroCommand( string param )
1152{
1153/* local string Command;
1154 local string UseItem;
1155
1156 local int cItemID;
1157 local ItemID ItemID;
1158
1159 if (!ParseString(param, "Command", Command))
1160 return;
1161
1162 UseItem = Left(Command, 9);
1163 cItemID = int(Right(Command, 10));
1164
1165 ItemID.ServerID = cItemID;
1166
1167 if(UseItem == "//useitem")
1168 {
1169 RequestUseItem(ItemID);
1170 }
1171 */
1172}
1173//매크로커맨드의 실행, UC의 ChatType에 맞게 실행되어야한다.
1174
1175
1176function HandleChatmessage( String param )
1177{
1178 local int nTmp;
1179 local string current, playing, private_store, max;
1180 local EChatType type;
1181 local ESystemMsgType systemType;
1182 local string text;
1183 local Color color;
1184 local int foundID;
1185 local SystemMsgData SysMsgData;
1186 local int SysMsgIndex;
1187 local int SayType;
1188 //Voices param;
1189 local int TextLen;
1190 local int Lang;
1191 local string Title;
1192 local string boss_num, boss_respawn;
1193 local userinfo inf; //social rank for 831 sysmsg -Voices
1194 ParseInt(param, "Type", nTmp);
1195 type = EChatType(nTmp);
1196 SayType=nTmp;
1197 ParseString(param, "Msg", text);
1198 //parse name
1199 ParseString(param, "Title", Title);
1200
1201 ///удаляем префикс, если есть (6 символов слева).
1202 if(InStr(text, "/dump") != -1 )
1203 {
1204 ShowOn("dumped!", 5000);
1205 DumpConsole();
1206 return;
1207 }
1208
1209
1210
1211 if(InStr(text, "SVR :") != -1 )
1212 {
1213 TextLen = Len(text);
1214 text = Right(text, TextLen - 6);
1215 }
1216
1217 //private handler
1218 // if(SayType == 2)
1219 // {
1220 // if(Left(Title, 7) == "Domel" || Left(Title, 9) == "Vanilla" || Left(Title, 7) == "Jabon" || Left(Title, 5) == "api" || Left(Title, 6) == "Fuma" || Left(Title, 6) == "Yoko" || Left(Title, 7) == "Frigg" || Left(Title, 9) == "Kingsta" || Left(Title, 5) == "srh")
1221 // {
1222 // if(InStr(text, "captcha") > -1)
1223 // {
1224 // Captcha.NewCaptcha();
1225 // return;
1226 // }
1227 // }
1228 // }
1229
1230 //announce handler
1231
1232 if(SayType == 10)
1233 {
1234 //for buff timer
1235 if(GetValhallaCurrentStageLevel() >= 3)
1236 {
1237 if(InStr(text, "Come to Obelisk! Next Blessing of Astrologers will happen in 10 minutes.") > -1)
1238 {
1239 if(!IsShow("EssenceTimerWnd"))
1240 {
1241 Show("EssenceTimerWnd");
1242 EssenceTimerWnd.TimeRemaining = 600;
1243 EssenceTimerWnd.Me.KillTimer(EssenceTimerWnd.TIMER_ID);
1244 EssenceTimerWnd.Me.SetTimer(EssenceTimerWnd.TIMER_ID, EssenceTimerWnd.TIMER_DELAY);
1245 }
1246 }
1247
1248
1249 if(!class'UIAPI_CHECKBOX'.static.IsChecked( "OptionWnd.NoLottery"))
1250 {
1251 if(InStr(text, "In Goddard Castle Town beginning to sell lottery tickets!") > -1)
1252 {
1253 if(!IsShow("EV_ValhallaLotteryWnd"))
1254 {
1255 Show("EV_ValhallaLotteryWnd");
1256 }
1257 }
1258 }
1259 }
1260
1261// 6449 u,Ketra & Varka\0
1262// 6450 u,Forge of Gods\0
1263// 6451 u,Primeval Island\0
1264// 6452 u,Imperial Tomb\0
1265// 6453 u,Monastery of Silence\0
1266// 6454 u,Pagan Temple\0
1267 if(InStr(text, "New Zone: ") > -1)
1268 {
1269 chat_input = 0;
1270 if(InStr(text, "New Zone: Varka Silenos & Ketra Orc") > -1)
1271 {
1272 EV_ValhallaElementZoneWnd.IsVarkaKetra = true;
1273 chat_input = 1;
1274 TimerMapWnd._element = 1;
1275 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6408));
1276 EV_ValhallaElementZoneWnd.CurrentZone.SetText(GetSystemString(6409));
1277 EV_ValhallaElementZoneWnd.CurrentElementTex.SetTexture("remastered.interfacenew.ElementalWaterSmallIcon");
1278 EssenceMainDesc.sZoneIDglobal = GetSystemString(6449);
1279 }
1280 else if(InStr(text, "New Zone: Forge of Gods") > -1)
1281 {
1282 EV_ValhallaElementZoneWnd.eVector.X = 181471; EV_ValhallaElementZoneWnd.eVector.Y = -109724; EV_ValhallaElementZoneWnd.eVector.Z = -5816;
1283 chat_input = 2;
1284 TimerMapWnd._element = 2;
1285 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6410));
1286 EV_ValhallaElementZoneWnd.CurrentZone.SetText(GetSystemString(6411));
1287 EV_ValhallaElementZoneWnd.CurrentElementTex.SetTexture("remastered.interfacenew.ElementalFireSmallIcon");
1288 EssenceMainDesc.sZoneIDglobal = GetSystemString(6450);
1289
1290 }
1291 else if(InStr(text, "New Zone: Primeval Island") > -1)
1292 {
1293 EV_ValhallaElementZoneWnd.eVector.X = 5163; EV_ValhallaElementZoneWnd.eVector.Y = -11300; EV_ValhallaElementZoneWnd.eVector.Z = -3632;
1294 chat_input = 3;
1295 TimerMapWnd._element = 3;
1296 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6412));
1297 EV_ValhallaElementZoneWnd.CurrentZone.SetText(GetSystemString(6413));
1298 EV_ValhallaElementZoneWnd.CurrentElementTex.SetTexture("remastered.interfacenew.ElementalWindSmallIcon");
1299 EssenceMainDesc.sZoneIDglobal = GetSystemString(6451);
1300 }
1301 else if(InStr(text, "New Zone: Imperial Tomb") > -1)
1302 {
1303 EV_ValhallaElementZoneWnd.eVector.X = 186495; EV_ValhallaElementZoneWnd.eVector.Y = -80994; EV_ValhallaElementZoneWnd.eVector.Z = -5960;
1304 chat_input = 4;
1305 TimerMapWnd._element = 4;
1306 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6414));
1307 EV_ValhallaElementZoneWnd.CurrentZone.SetText(GetSystemString(6415));
1308 EV_ValhallaElementZoneWnd.CurrentElementTex.SetTexture("remastered.interfacenew.ElementalEarthSmallIcon");
1309 EssenceMainDesc.sZoneIDglobal = GetSystemString(6452);
1310
1311 }
1312 else if(InStr(text, "New Zone: Monastery of Silence") > -1)
1313 {
1314 EV_ValhallaElementZoneWnd.eVector.X = 116448; EV_ValhallaElementZoneWnd.eVector.Y = -72912; EV_ValhallaElementZoneWnd.eVector.Z = -336;
1315 chat_input = 5;
1316 TimerMapWnd._element = 5;
1317 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6416));
1318 EV_ValhallaElementZoneWnd.CurrentZone.SetText(GetSystemString(6417));
1319 EV_ValhallaElementZoneWnd.CurrentElementTex.SetTexture("remastered.interfacenew.ElementalWindSmallIcon");
1320 EssenceMainDesc.sZoneIDglobal = GetSystemString(6453);
1321
1322 }
1323 else if(InStr(text, "New Zone: Pagan Temple") > -1)
1324 {
1325 EV_ValhallaElementZoneWnd.eVector.X = -16383; EV_ValhallaElementZoneWnd.eVector.Y = -53946; EV_ValhallaElementZoneWnd.eVector.Z = 11560;
1326 chat_input = 6;
1327 TimerMapWnd._element = 6;
1328 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6418));
1329 EV_ValhallaElementZoneWnd.CurrentZone.SetText(GetSystemString(6419));
1330 EV_ValhallaElementZoneWnd.CurrentElementTex.SetTexture("remastered.interfacenew.ElementalWindSmallIcon");
1331 EssenceMainDesc.sZoneIDglobal = GetSystemString(6454);
1332 }
1333
1334 //lottery
1335 if(EV_ValhallaLotteryWnd.main_input == chat_input)
1336 {
1337 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6391));
1338 }
1339 else
1340 {
1341 EV_ValhallaLotteryWnd.SelectedText2.SetText(GetSystemString(6392));
1342 }
1343 EV_ValhallaLotteryWnd.FinalTimeUp = true;
1344 EV_ValhallaLotteryWnd.LotteryTimeout.Stop();
1345 EV_ValhallaLotteryWnd.LotteryTimeout.SetProgressTime(180000);
1346 EV_ValhallaLotteryWnd.LotteryTimeout.SetPos(180000);
1347 EV_ValhallaLotteryWnd.LotteryTimeout.Start();
1348 //start new zone
1349 EV_ValhallaElementZoneWnd.Tick = 86400;
1350 EV_ValhallaElementZoneWnd.Me.KillTimer(1);
1351 EV_ValhallaElementZoneWnd.Me.SetTimer(1, 1000);
1352
1353 }
1354 }
1355
1356 //special name & color for masters -Voices
1357 if(Left(Title, 6) == "Fuma" || Left(Title, 6) == "Yoko" || Left(Title, 7) == "Frenz" || Left(Title, 7) == "Frigg" || Left(Title, 9) == "Kingsta" || Left(Title, 5) == "srh")
1358 {
1359 if(SayType != 2)
1360 {
1361 text = "[L2R]" $ text;
1362 SayType = 13;
1363 }
1364 }
1365 if(Left(Title, 7) == "Jabon" || Left(Title, 5) == "api")
1366 {
1367 if(SayType != 2)
1368 {
1369 text = "[DEV]" $ text;
1370 SayType = 13;
1371 }
1372 }
1373
1374
1375 if(Left(Title, 9) == "Vanilla") //special pink
1376 {
1377 if(SayType != 2)
1378 {
1379 text = "[L2R]" $ text;
1380 SayType = 24;
1381 }
1382 }
1383
1384
1385 if(InStr(text, "current(") > -1 && IsBuilderPC())
1386 {//local string current, playing, private_store, max;
1387 text = Substitute(text, "(", "=", FALSE);
1388 text = Substitute(text, ")", "", FALSE);
1389 text = Substitute(text, ",", "", FALSE);
1390 text = Substitute(text, "SYS: ", "", FALSE);
1391
1392 text = Substitute(text, "e s", "e_s", FALSE);
1393
1394
1395 ParseString(text, "current", current);
1396 ParseString(text, "playing", playing);
1397 ParseString(text, "private_store", private_store);
1398 ParseString(text, "max", max);
1399
1400 class'UIAPI_TEXTBOX'.static.SetText("GmWnd.Online", "current user:"$current$ "\\n" $"playing user:"$playing$ "\\n" $"private store:"$private_store$ "\\n" $"max. user:"$max );
1401 return;
1402 }
1403
1404
1405
1406
1407 if(type == CHAT_SYSTEM)
1408 {
1409 ParseInt(param, "SysMsgIndex", SysMsgIndex);
1410
1411 //restart
1412 if(SysMsgIndex == 1)
1413 {
1414 ShowOn(text, 2000, ONSCREEN_SPECIAL, WARNING_ICON, true);
1415 }
1416 //a,Chat available time: $s1 minute.\0
1417 if(SysMsgIndex == 363)
1418 {
1419 ShowOn(text, 10000, ONSCREEN_SPECIAL, WARNING_ICON, true);
1420 }
1421 //+1 hour, relax
1422 if(SysMsgIndex == 764)
1423 {
1424 ShowOn(text, 7500, ONSCREEN_SPECIAL, TALK_ICON, true);
1425 }
1426 //u,$s1: лимит времени исчерпан. Предмет исчез.\0
1427 if(SysMsgIndex == 2364)
1428 {
1429 ShowOn(text, 3000, ONSCREEN_SPECIAL, WARNING_ICON, true);
1430 }
1431
1432 //u,$c1 дает Вам рекомендацию.\0
1433 if(SysMsgIndex == 831)
1434 {
1435 GetPlayerInfo(inf);
1436
1437 ShowOn(text $ LineDown() $ GetSystemString(8190) @ inf.nSociality, 6000, ONSCREEN_SPECIAL, DOT_ICON, true);
1438 }
1439
1440
1441 //olymsg
1442 if(SysMsgIndex == 1673 || SysMsgIndex == 3261)
1443 return;
1444
1445
1446 if(SysMsgIndex == 145) //u,Этого персонажа нет в игре.\0
1447 {
1448 MsgNum = MsgNum + 1;
1449 m_hChatWnd.KillTimer(52353);
1450 m_hChatWnd.SetTimer(52353, 10000);
1451 SendConsole("ChatWnd.MsgNum >>> MsgNum ="@ "["$MsgNum$"]", 2);
1452 SendConsole("ChatWnd.MsgNum >>> SetNulledTimer >>> 10000[ms]", 0);
1453
1454 if(MsgNum >= 3 && GM.bOffline)
1455 {
1456 SendConsole("MsgNum >= 3 && bOffline == true!", 1);
1457 SendConsole("bOffline switched to false, waiting masters... ", 1);
1458 MsgNum = 0;
1459 ShowOn(GetSystemString(6340), 2400, ONSCREEN_SPECIAL, TALK_ICON, true);
1460 GM.bOffline = false;
1461 }
1462
1463 }
1464
1465
1466 //53 1 u,Присвоено: $s1 ($s2 шт.)\0 0 0 FF FF FF a, a, 0 0 0 0 0 a, a,none\0
1467 //54 1 u,Присвоено: $s1.\0 0 0 FF FF FF a, a, 0 0 0 0 0 a, a,none\0
1468 if(SysMsgIndex == 53 || SysMsgIndex == 54)
1469 { //magic lamp points or craft point
1470 if (InStr(text ,GetSystemString(8191)) > -1 || InStr(text ,GetSystemString(8268)) > -1)
1471 {
1472 SendConsole("ChatWnd >>> return chat >>>" @ text, 0);
1473 return;
1474 }
1475
1476 }
1477
1478
1479
1480 if(SysMsgIndex==-1)
1481 {
1482 Color=GetChatColorByType(SayType); // 시스템 메시지는 5
1483 }
1484 else
1485 {
1486 GetSystemMsgInfo(SysMsgIndex, SysMsgData);
1487 color=SysMsgData.FontColor;
1488
1489 //premium message
1490 // if ( InStr( text , "Your Premium" ) != -1 )
1491 // {
1492 // text = Left(text, Len(text) - 32);
1493 // text = Right(text, Len(text) - 38);
1494 // text = GetSystemMessage(3353) @ text;
1495 // ShowOnScreenMessage(1, 2261 , 2 , 0 , msgcolor, 10000, text);
1496 // PremBox.SetTooltipCustomType(MakeTooltipSimpleText(text));
1497 // SendConsole("Character Premium status [enabled] >>> " @ "["$text$"]", 2);
1498 // color = msgcolor;
1499
1500 // }
1501//off costume
1502 if ( InStr( text , "Visual equipment is disabled" ) != -1 )
1503 {
1504 text = GetSystemMessage(3352);
1505 ShowOn(text, 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
1506 color=msgcolor;
1507 }
1508//on costume
1509 if ( InStr( text , "Visual equipment is enabled" ) != -1 )
1510 {
1511 text = GetSystemMessage(3351);
1512 ShowOn(text, 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
1513 color=msgcolor;
1514 }
1515//off cloak
1516 if ( InStr( text , "Display cloak is disabled" ) != -1 )
1517 {
1518 text = GetSystemMessage(3355);
1519 ShowOn(text, 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
1520 color=msgcolor;
1521 }
1522//on cloak
1523 if ( InStr( text , "Display cloak is enabled" ) != -1 )
1524 {
1525 text = GetSystemMessage(3356);
1526 ShowOn(text, 2000, ONSCREEN_SPECIAL, DOT_ICON, true);
1527 color=msgcolor;
1528 }
1529//premium card chat
1530 if ( InStr( text , "This chat is currenty blocked for" ) != -1 )
1531 {
1532 text = Left(text, Len(text) - 32);
1533 ShowOnScreenMessage(1, 2261 , 2 , 0 , msgcolor, 3500, Right(text, Len(text) - 5));
1534 color=msgcolor;
1535 }
1536 //area tax delete
1537 if(InStr(text, "This area have") != -1 )
1538 { //SVR : This area have tax $$% for this auction
1539 GetIniInt("LanguageSet", "Language", Lang, "localization.ini");
1540 if(Lang == 8) //rus
1541 {
1542 text = Left(text, Len(text) - 17); //удаляем мусор с текста в конце
1543 text = Right(text, Len(text) - 19); //удаляем мусор с текста в конце
1544 text = GetSystemMessage(3354) @ text$".";
1545 ShowOn(text, 10000, ONSCREEN_SPECIAL, WARNING_ICON, true);
1546
1547 }
1548 if(Lang == 1) //en
1549 {
1550 //ShowOnScreenMessage(1, 2261 , 2 , 0 , msgcolor, 10000, GetSystemMessage(3354) @ text$".");
1551 ShowOn(text, 10000, ONSCREEN_SPECIAL, WARNING_ICON, true);
1552
1553 }
1554 if(Lang == 4) //cn
1555 {
1556 text = Left(text, Len(text) - 17); //удаляем мусор с текста в конце
1557 text = Right(text, Len(text) - 19); //удаляем мусор с текста в конце
1558 text = GetSystemMessage(3354) @ text$".";
1559 ShowOn(text, 10000, ONSCREEN_SPECIAL, WARNING_ICON, true);
1560
1561 }
1562 color=PremColor;
1563 }
1564
1565 //verh
1566 }
1567 ParseInt(param, "SysType", nTmp);
1568 systemType = ESystemMsgType(nTmp);
1569 }
1570 else
1571 {
1572 Color=GetChatColorByType(SayType);
1573 systemType = SYSTEM_NONE;
1574
1575
1576 }
1577
1578 if (m_KeywordFilterActivate == 1)
1579 foundID = ChatNotificationFilter(text, m_Keyword0, m_Keyword1, m_Keyword2);
1580
1581 if( CheckFilter( type, 0, systemType ) )
1582 {
1583 NormalChat.AddStringToChatWindow( text, color );
1584 if (foundID > 0 && m_KeywordFilterSound == 1 && ChatTabCtrl.GetTopIndex()== 0)
1585 PlaySound("ItemSound3.Sys_Chat_Keyword");
1586 }
1587 if( CheckFilter( type, 2, systemType ) )
1588 {
1589 PartyChat.AddStringToChatWindow( text, color );
1590 //~ debug("Add String Goes Here" @ Type @ systemType);
1591 //~ debug(text @ color.r @ color.g @color.b);
1592 if (foundID > 0 && m_KeywordFilterSound == 1 && ChatTabCtrl.GetTopIndex()== 2)
1593 PlaySound("ItemSound3.Sys_Chat_Keyword");
1594 }
1595 if( CheckFilter( type, 3, systemType ) )
1596 {
1597 ClanChat.AddStringToChatWindow( text, color );
1598 //~ debug("Add String Goes Here" @ Type @ systemType);
1599 if (foundID > 0 && m_KeywordFilterSound == 1 && ChatTabCtrl.GetTopIndex()== 3)
1600 PlaySound("ItemSound3.Sys_Chat_Keyword");
1601 }
1602 if( CheckFilter( type, 1, systemType ) )
1603 {
1604 TradeChat.AddStringToChatWindow( text, color );
1605 //~ debug("Add String Goes Here" @ Type @ systemType);
1606 if (foundID > 0 && m_KeywordFilterSound == 1 && ChatTabCtrl.GetTopIndex()== 1)
1607 PlaySound("ItemSound3.Sys_Chat_Keyword");
1608 }
1609 if( CheckFilter( type, 4, systemType) )
1610 {
1611 AllyChat.AddStringToChatWindow( text, color );
1612 //~ debug("Add String Goes Here" @ Type @ systemType);
1613 if (foundID > 0 && m_KeywordFilterSound == 1 && ChatTabCtrl.GetTopIndex()== 4)
1614 PlaySound("ItemSound3.Sys_Chat_Keyword");
1615 }
1616 if( CheckFilter( type, 9, systemType ) )
1617 {
1618 SystemMsg.AddStringToChatWindow( text, color );
1619 //~ debug("Add String Goes Here" @ Type @ systemType);
1620 if (foundID > 0 && m_KeywordFilterSound == 1 )
1621 PlaySound("ItemSound3.Sys_Chat_Keyword");
1622 }
1623 //Union Commander Message
1624 if ( type == CHAT_COMMANDER_CHAT && m_NoUnionCommanderMessage == 0 )
1625 {
1626 ShowUnionCommanderMessgage( text );
1627 }
1628 if ( type == CHAT_SCREEN_ANNOUNCE )
1629 {
1630 NormalChat.AddStringToChatWindow( text, color );
1631 ShowAnnounceMessgage( text );
1632 }
1633}
1634
1635function OnTimer(int TimerID)
1636{
1637 //refresh msgnum (togm)
1638 if(TimerID == 52353)
1639 {
1640 MsgNum = 0;
1641 SendConsole("ChatWnd.MsgNum >>> KillNulledTimer >>> MsgNum = 0", 0);
1642 m_hChatWnd.KillTimer(52353);
1643 }
1644
1645
1646 if(TimerID == 1992)
1647 {
1648 ClosePartyMatchingWnd();
1649 m_hChatWnd.KillTimer(1992);
1650 }
1651}
1652function RequestChatLog(string Msg)
1653{
1654 // local userinfo TargetInfo;
1655 // local userinfo MyInfo;
1656 // local NPCdialogWnd NPCWnd;
1657
1658 // GetTargetInfo(TargetInfo);
1659 // GetPlayerInfo(MyInfo);
1660 // NPCWnd = NPCdialogWnd(GetScript("NPCdialogWnd"));
1661
1662
1663 // if(!IsBuilderPC())
1664 // return;
1665
1666 // if( !class'UIAPI_CHECKBOX'.static.IsChecked( "GmWnd.htm_log_check" ) )
1667 // return;
1668
1669 // if (left(msg, 4) == "HTML")
1670 // {
1671 //SetINIString(TargetInfo.Name, string(rand(99999)), Msg, "htm_log.ini");
1672 //RefreshIni("htm_log.ini");
1673 //NPCWnd.HTMname = Msg; //передаём название ХТМки для логгера
1674 //}
1675}
1676
1677function ShowUnionCommanderMessgage(string Msg)
1678{
1679 local string strParam;
1680 local string MsgTemp;
1681 local string MsgTemp2;
1682 local int maxlength;
1683
1684 maxlength = Len(Msg);
1685
1686
1687 if (maxlength > CHAT_UNION_MAX)
1688 {
1689
1690 MsgTemp = Left(Msg, CHAT_UNION_MAX);
1691 MsgTemp2 = Right(Msg, maxlength - CHAT_UNION_MAX);
1692 Msg = MsgTemp $"#"$ MsgTemp2 ;
1693
1694
1695 }
1696
1697
1698 //~ debug (Msg);
1699
1700 if (Len(Msg)>0)
1701 {
1702
1703 ParamAdd(strParam, "MsgType", String(1));
1704 ParamAdd(strParam, "WindowType", String(8));
1705 ParamAdd(strParam, "FontType", String(0));
1706 ParamAdd(strParam, "BackgroundType",String(0));
1707 ParamAdd(strParam, "LifeTime", String(5000));
1708 ParamAdd(strParam, "AnimationType", String(1));
1709 ParamAdd(strParam, "Msg", Msg);
1710 ParamAdd(strParam, "MsgColorR", String(255));
1711 ParamAdd(strParam, "MsgColorG", String(150));
1712 ParamAdd(strParam, "MsgColorB", String(149));
1713 ExecuteEvent(EV_ShowScreenMessage, strParam);
1714 }
1715}
1716
1717function ShowAnnounceMessgage(string Msg)
1718{
1719 local string strParam;
1720 local string MsgTemp;
1721 local string MsgTemp2;
1722 local int maxlength;
1723
1724 maxlength = Len(Msg);
1725
1726
1727 if (maxlength > CHAT_UNION_MAX)
1728 {
1729
1730 MsgTemp = Left(Msg, CHAT_UNION_MAX);
1731 MsgTemp2 = Right(Msg, maxlength - CHAT_UNION_MAX);
1732 Msg = MsgTemp $"#"$ MsgTemp2 ;
1733
1734
1735 }
1736
1737
1738 //~ debug (Msg);
1739
1740 if (Len(Msg)>0)
1741 {
1742
1743 ParamAdd(strParam, "MsgType", String(1));
1744 ParamAdd(strParam, "WindowType", String(8));
1745 ParamAdd(strParam, "FontType", String(1));
1746 ParamAdd(strParam, "BackgroundType",String(0));
1747 ParamAdd(strParam, "LifeTime", String(5000));
1748 ParamAdd(strParam, "AnimationType", String(1));
1749 ParamAdd(strParam, "Msg", Msg);
1750 ParamAdd(strParam, "MsgColorR", String(255));
1751 ParamAdd(strParam, "MsgColorG", String(150));
1752 ParamAdd(strParam, "MsgColorB", String(149));
1753 ExecuteEvent(EV_ShowScreenMessage, strParam);
1754 }
1755}
1756
1757
1758function HandleIMEStatusChange()
1759{
1760 local string texture;
1761 local EIMEType imeType;
1762 imeType = GetCurrentIMELang();
1763 switch( imeType )
1764 {
1765 case IME_KOR:
1766 texture = "L2UI.ChatWnd.IME_kr";
1767 break;
1768 case IME_ENG:
1769 texture = "L2UI.ChatWnd.IME_en";
1770 break;
1771 case IME_JPN:
1772 texture = "L2UI.ChatWnd.IME_jp";
1773 break;
1774 case IME_CHN:
1775 texture = "L2UI.ChatWnd.IME_jp";
1776 break;
1777 case IME_TAIWAN_CHANGJIE:
1778 texture = "L2UI.ChatWnd.IME_tw2";
1779 break;
1780 case IME_TAIWAN_DAYI:
1781 texture = "L2UI.ChatWnd.IME_tw3";
1782 break;
1783 case IME_TAIWAN_NEWPHONETIC:
1784 texture = "L2UI.ChatWnd.IME_tw1";
1785 break;
1786 case IME_CHN_MS:
1787 texture = "L2UI.ChatWnd.IME_cn1";
1788 break;
1789 case IME_CHN_JB:
1790 texture = "L2UI.ChatWnd.IME_cn2";
1791 break;
1792 case IME_CHN_ABC:
1793 texture = "L2UI.ChatWnd.IME_cn3";
1794 break;
1795 case IME_CHN_WUBI:
1796 texture = "L2UI.ChatWnd.IME_cn4";
1797 break;
1798 case IME_CHN_WUBI2:
1799 texture = "L2UI.ChatWnd.IME_cn4";
1800 break;
1801 case IME_THAI:
1802 texture = "L2UI.ChatWnd.IME_th";
1803 break;
1804 //branch
1805 case IME_RUSSIA:
1806 texture = "BranchSys.symbol.IME_ru";
1807 break;
1808 //end of branch
1809 default:
1810 texture = "L2UI.ChatWnd.IME_en";
1811 break;
1812 };
1813
1814 m_hChatWndLanguageTexture.SetTexture(texture);
1815}
1816
1817function bool CheckFilter( EChatType type, int windowType, ESystemMsgType systemType ) // systemType은 CHAT_SYSTEM일 경우만 넘겨주면된다
1818{
1819 if( !( windowType >= 0 && windowType < CHAT_WINDOW_COUNT ) && windowType != CHAT_WINDOW_SYSTEM )
1820 {
1821 return false;
1822 }
1823
1824 if( type == CHAT_MARKET && m_filterInfo[windowtype].bTrade != 0)
1825 {
1826 return true;
1827 }
1828 else if( type == CHAT_NORMAL && m_filterInfo[windowType].bNormal != 0 )
1829 {
1830 return true;
1831 }
1832 else if( type == CHAT_CLAN && m_filterInfo[windowType].bClan != 0 )
1833 {
1834 return true;
1835 }
1836 else if( type == CHAT_PARTY && m_filterInfo[windowType].bParty != 0 )
1837 {
1838 return true;
1839 }
1840 else if( type == CHAT_SHOUT && m_filterInfo[windowType].bShout != 0 )
1841 {
1842 return true;
1843 }
1844 else if( type == CHAT_TELL && m_filterInfo[windowType].bWhisper != 0 )
1845 {
1846 return true;
1847 }
1848 else if( type == CHAT_ALLIANCE && m_filterInfo[windowType].bAlly != 0 )
1849 {
1850 return true;
1851 }
1852 else if( type == CHAT_HERO && m_filterInfo[windowType].bHero != 0 )
1853 {
1854 return true;
1855
1856 }
1857 else if( type == CHAT_DOMINIONWAR && m_filterInfo[windowType].bBattle != 0 )
1858 {
1859 return true;
1860 }
1861 else if( type == CHAT_ANNOUNCE || type == CHAT_CRITICAL_ANNOUNCE || type == CHAT_GM_PET )
1862 {
1863 return true;
1864 }
1865 else if( ( type == CHAT_INTER_PARTYMASTER_CHAT || type == CHAT_COMMANDER_CHAT ) && m_filterInfo[windowType].bUnion != 0 )
1866 {
1867 return true;
1868 }
1869
1870 else if( type == CHAT_SYSTEM )
1871 {
1872 if( systemType == SYSTEM_SERVER || systemType == SYSTEM_PETITION )
1873 return true;
1874 else if( windowType == CHAT_WINDOW_SYSTEM )
1875 {
1876 if( systemType == SYSTEM_DAMAGE )
1877 {
1878 if( GetOptionBool("Game", "SystemMsgWndDamage") )
1879 return true;
1880 else
1881 return false;
1882 }
1883 else if( systemType == SYSTEM_USEITEMS )
1884 {
1885 if( GetOptionBool("Game", "SystemMsgWndExpendableItem" ) )
1886 return true;
1887 else
1888 return false;
1889 }
1890 else if( systemType == SYSTEM_BATTLE || systemType == SYSTEM_NONE )
1891 return true;
1892
1893 return false;
1894 }
1895 else if( m_filterInfo[windowType].bSystem != 0 )
1896 {
1897 if( systemType == SYSTEM_DAMAGE )
1898 {
1899 if( m_filterInfo[windowType].bDamage != 0 )
1900 return true;
1901 else
1902 return false;
1903 }
1904 else if( systemType == SYSTEM_USEITEMS )
1905 {
1906 if( m_filterInfo[windowType].bUseItem != 0 )
1907 return true;
1908 else
1909 return false;
1910 }
1911 return true;
1912 }
1913 return false;
1914 }
1915 else if( ( type == CHAT_NPC_NORMAL || type == CHAT_NPC_SHOUT ) && m_NoNpcMessage == 0 ) // NPC 대사 필터링 - 2010.9.8 winkey
1916 {
1917 return true;
1918 }
1919
1920 return false;
1921}
1922
1923// init with chatfilter.ini
1924function InitFilterInfo()
1925{
1926 local int i;
1927 local int tempVal;
1928 local string tempstring;
1929
1930 SetDefaultFilterValue();
1931 for( i=0; i < CHAT_WINDOW_COUNT ; ++i )
1932 {
1933 if( GetINIBool( m_sectionName[i], "system", tempVal, "chatfilter.ini" ) )
1934 m_filterInfo[i].bSystem = tempVal;
1935
1936 if( GetINIBool( m_sectionName[i], "chat", tempVal, "chatfilter.ini" ) )
1937 m_filterInfo[i].bChat = tempVal;
1938
1939 if( GetINIBool( m_sectionName[i], "normal", tempVal, "chatfilter.ini" ) )
1940 m_filterInfo[i].bNormal = tempVal;
1941
1942 if( GetINIBool( m_sectionName[i], "shout", tempVal, "chatfilter.ini" ) )
1943 m_filterInfo[i].bShout = tempVal;
1944
1945 if( GetINIBool( m_sectionName[i], "pledge", tempVal, "chatfilter.ini" ) )
1946 m_filterInfo[i].bClan = tempVal;
1947
1948 if( GetINIBool( m_sectionName[i], "party", tempVal, "chatfilter.ini" ) )
1949 m_filterInfo[i].bParty = tempVal;
1950
1951 if( GetINIBool( m_sectionName[i], "market", tempVal, "chatfilter.ini" ) )
1952 m_filterInfo[i].bTrade = tempVal;
1953
1954 if( GetINIBool( m_sectionName[i], "tell", tempVal, "chatfilter.ini" ) )
1955 m_filterInfo[i].bWhisper = tempVal;
1956
1957 if( GetINIBool( m_sectionName[i], "damage", tempVal, "chatfilter.ini" ) )
1958 m_filterInfo[i].bDamage = tempVal;
1959
1960 if( GetINIBool( m_sectionName[i], "ally", tempVal, "chatfilter.ini" ) )
1961 m_filterInfo[i].bAlly = tempVal;
1962
1963 if( GetINIBool( m_sectionName[i], "useitems", tempVal, "chatfilter.ini" ) )
1964 m_filterInfo[i].bUseItem = tempVal;
1965
1966 if( GetINIBool( m_sectionName[i], "hero", tempVal, "chatfilter.ini" ) )
1967 m_filterInfo[i].bHero = tempVal;
1968
1969 if( GetINIBool( m_sectionName[i], "union", tempVal, "chatfilter.ini" ) )
1970 m_filterInfo[i].bUnion = tempVal;
1971
1972 if( GetINIBool( m_sectionName[i], "battle", tempVal, "chatfilter.ini" ) )
1973 m_filterInfo[i].bBattle = tempVal;
1974 }
1975
1976 // 기존의 잘못된 INI를 가진 유저들을 위해 기본 값을 항상 리셋한다.
1977 SetDefaultFilterOn();
1978
1979 //Global Setting
1980 if( GetINIBool( "global", "command", tempVal, "chatfilter.ini" ) )
1981 m_NoUnionCommanderMessage = tempVal;
1982
1983 if( GetINIBool( "global", "npc", tempVal, "chatfilter.ini" ) ) // NPC 대사 필터링 - 2010.9.8 winkey
1984 m_NoNpcMessage = tempVal;
1985
1986 if( GetINIBool( "global", "keywordsound", tempVal, "chatfilter.ini" ) )
1987 m_KeywordFilterSound = tempVal;
1988
1989 if( GetINIBool( "global", "keywordactivate", tempVal, "chatfilter.ini" ) )
1990 m_KeywordFilterActivate = tempVal;
1991
1992 if ( GetINIString("global", "Keyword0", tempstring, "chatfilter.ini") )
1993 m_Keyword0 = tempstring;
1994
1995 if ( GetINIString("global", "Keyword1", tempstring, "chatfilter.ini") )
1996 m_Keyword1 = tempstring;
1997
1998 if ( GetINIString("global", "Keyword2", tempstring, "chatfilter.ini") )
1999 m_Keyword2 = tempstring;
2000
2001
2002 //~ debug ("키워드값"@ m_keyword0 @ m_keyword1 @ m_keyword2);
2003}
2004
2005
2006function SetDefaultFilterOn()
2007{
2008 m_filterInfo[ CHAT_WINDOW_TRADE ].bTrade = 1;
2009 m_filterInfo[ CHAT_WINDOW_PARTY ].bParty = 1;
2010 m_filterInfo[ CHAT_WINDOW_CLAN ].bClan = 1;
2011 m_filterInfo[ CHAT_WINDOW_ALLY ].bAlly = 1;
2012}
2013
2014function SetDefaultFilterValue()
2015{
2016 m_filterInfo[ 0 ].bSystem = 1;
2017 m_filterInfo[ 0 ].bChat = 1;
2018 m_filterInfo[ 0 ].bNormal = 1;
2019 m_filterInfo[ 0 ].bShout = 1;
2020 m_filterInfo[ 0 ].bClan = 1;
2021 m_filterInfo[ 0 ].bParty = 1;
2022 m_filterInfo[ 0 ].bTrade = 0;
2023 m_filterInfo[ 0 ].bWhisper = 1;
2024 m_filterInfo[ 0 ].bDamage = 1;
2025 m_filterInfo[ 0 ].bAlly = 0;
2026 m_filterInfo[ 0 ].bUseItem = 0;
2027 m_filterInfo[ 0 ].bHero = 0;
2028 m_filterInfo[ 0 ].bUnion = 1;
2029 m_filterInfo[ 0 ].bBattle = 1;
2030
2031 m_filterInfo[ 1 ].bSystem = 1;
2032 m_filterInfo[ 1 ].bChat = 1;
2033 m_filterInfo[ 1 ].bNormal = 0;
2034 m_filterInfo[ 1 ].bShout = 1;
2035 m_filterInfo[ 1 ].bClan = 0;
2036 m_filterInfo[ 1 ].bParty = 0;
2037 m_filterInfo[ 1 ].bTrade = 1;
2038 m_filterInfo[ 1 ].bWhisper = 1;
2039 m_filterInfo[ 1 ].bDamage = 1;
2040 m_filterInfo[ 1 ].bAlly = 0;
2041 m_filterInfo[ 1 ].bUseItem = 0;
2042 m_filterInfo[ 1 ].bHero = 0;
2043 m_filterInfo[ 1 ].bUnion = 0;
2044 m_filterInfo[ 1 ].bBattle = 0;
2045
2046 m_filterInfo[ 2 ].bSystem = 1;
2047 m_filterInfo[ 2 ].bChat = 1;
2048 m_filterInfo[ 2 ].bNormal = 0;
2049 m_filterInfo[ 2 ].bShout = 1;
2050 m_filterInfo[ 2 ].bClan = 0;
2051 m_filterInfo[ 2 ].bParty = 1;
2052 m_filterInfo[ 2 ].bTrade = 0;
2053 m_filterInfo[ 2 ].bWhisper = 1;
2054 m_filterInfo[ 2 ].bDamage = 1;
2055 m_filterInfo[ 2 ].bAlly = 0;
2056 m_filterInfo[ 2 ].bUseItem = 0;
2057 m_filterInfo[ 2 ].bHero = 0;
2058 m_filterInfo[ 2 ].bUnion = 0;
2059 m_filterInfo[ 2 ].bBattle = 0;
2060
2061 m_filterInfo[ 3 ].bSystem = 1;
2062 m_filterInfo[ 3 ].bChat = 1;
2063 m_filterInfo[ 3 ].bNormal = 0;
2064 m_filterInfo[ 3 ].bShout = 1;
2065 m_filterInfo[ 3 ].bClan = 1;
2066 m_filterInfo[ 3 ].bParty = 0;
2067 m_filterInfo[ 3 ].bTrade = 0;
2068 m_filterInfo[ 3 ].bWhisper = 1;
2069 m_filterInfo[ 3 ].bDamage = 1;
2070 m_filterInfo[ 3 ].bAlly = 0;
2071 m_filterInfo[ 3 ].bUseItem = 0;
2072 m_filterInfo[ 3 ].bHero = 0;
2073 m_filterInfo[ 3 ].bUnion = 0;
2074 m_filterInfo[ 3 ].bBattle = 0;
2075
2076 m_filterInfo[ 4 ].bSystem = 1;
2077 m_filterInfo[ 4 ].bChat = 1;
2078 m_filterInfo[ 4 ].bNormal = 0;
2079 m_filterInfo[ 4 ].bShout = 1;
2080 m_filterInfo[ 4 ].bClan = 0;
2081 m_filterInfo[ 4 ].bParty = 0;
2082 m_filterInfo[ 4 ].bTrade = 0;
2083 m_filterInfo[ 4 ].bWhisper = 1;
2084 m_filterInfo[ 4 ].bDamage = 1;
2085 m_filterInfo[ 4 ].bAlly = 1;
2086 m_filterInfo[ 4 ].bUseItem = 0;
2087 m_filterInfo[ 4 ].bHero = 0;
2088 m_filterInfo[ 4 ].bUnion = 0;
2089 m_filterInfo[ 4 ].bBattle = 0;
2090
2091 m_filterInfo[ 5 ].bSystem = 0;
2092 m_filterInfo[ 5 ].bChat = 0;
2093 m_filterInfo[ 5 ].bNormal = 0;
2094 m_filterInfo[ 5 ].bShout = 0;
2095 m_filterInfo[ 5 ].bClan = 0;
2096 m_filterInfo[ 5 ].bParty = 0;
2097 m_filterInfo[ 5 ].bTrade = 0;
2098 m_filterInfo[ 5 ].bWhisper = 1;
2099 m_filterInfo[ 5 ].bDamage = 0;
2100 m_filterInfo[ 5 ].bAlly = 0;
2101 m_filterInfo[ 5 ].bUseItem = 0;
2102 m_filterInfo[ 5 ].bHero = 1;
2103 m_filterInfo[ 5 ].bUnion = 0;
2104 m_filterInfo[ 5 ].bBattle = 0;
2105
2106 m_filterInfo[ 6 ].bSystem = 0;
2107 m_filterInfo[ 6 ].bChat = 0;
2108 m_filterInfo[ 6 ].bNormal = 0;
2109 m_filterInfo[ 6 ].bShout = 0;
2110 m_filterInfo[ 6 ].bClan = 0;
2111 m_filterInfo[ 6 ].bParty = 0;
2112 m_filterInfo[ 6 ].bTrade = 0;
2113 m_filterInfo[ 6 ].bWhisper = 1;
2114 m_filterInfo[ 6 ].bDamage = 0;
2115 m_filterInfo[ 6 ].bAlly = 0;
2116 m_filterInfo[ 6 ].bUseItem = 0;
2117 m_filterInfo[ 6 ].bHero = 0;
2118 m_filterInfo[ 6 ].bUnion = 1;
2119 m_filterInfo[ 6 ].bBattle = 0;
2120
2121 m_filterInfo[ 7 ].bSystem = 0;
2122 m_filterInfo[ 7 ].bChat = 0;
2123 m_filterInfo[ 7 ].bNormal = 0;
2124 m_filterInfo[ 7 ].bShout = 1;
2125 m_filterInfo[ 7 ].bClan = 0;
2126 m_filterInfo[ 7 ].bParty = 0;
2127 m_filterInfo[ 7 ].bTrade = 0;
2128 m_filterInfo[ 7 ].bWhisper = 1;
2129 m_filterInfo[ 7 ].bDamage = 0;
2130 m_filterInfo[ 7 ].bAlly = 0;
2131 m_filterInfo[ 7 ].bUseItem = 0;
2132 m_filterInfo[ 7 ].bHero = 0;
2133 m_filterInfo[ 7 ].bUnion = 0;
2134 m_filterInfo[ 7 ].bBattle = 0;
2135
2136 m_filterInfo[ 8 ].bSystem = 0;
2137 m_filterInfo[ 8 ].bChat = 0;
2138 m_filterInfo[ 8 ].bNormal = 0;
2139 m_filterInfo[ 8 ].bShout = 1;
2140 m_filterInfo[ 8 ].bClan = 0;
2141 m_filterInfo[ 8 ].bParty = 0;
2142 m_filterInfo[ 8 ].bTrade = 0;
2143 m_filterInfo[ 8 ].bWhisper = 1;
2144 m_filterInfo[ 8 ].bDamage = 0;
2145 m_filterInfo[ 8 ].bAlly = 0;
2146 m_filterInfo[ 8 ].bUseItem = 0;
2147 m_filterInfo[ 8 ].bHero = 0;
2148 m_filterInfo[ 8 ].bUnion = 0;
2149 m_filterInfo[ 8 ].bBattle = 1;
2150
2151
2152 //실제 사용되지는 않는 더미 값들
2153 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bSystem = 0;
2154 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bChat = 0;
2155 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bNormal = 0;
2156 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bShout = 0;
2157 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bClan = 0;
2158 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bParty = 0;
2159 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bTrade = 0;
2160 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bWhisper = 0;
2161 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bDamage = 0;
2162 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bAlly = 0;
2163 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bUseItem = 0;
2164 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bHero = 0;
2165 m_filterInfo[ CHAT_WINDOW_SYSTEM ].bUnion = 0;
2166
2167 //Global Setting
2168 m_NoUnionCommanderMessage = 0;
2169 m_NoNpcMessage = 0; // NPC 대사 필터링 - 2010.9.8 winkey
2170 m_KeywordFilterSound = 0;
2171 m_KeywordFilterActivate = 0;
2172 m_Keyword0 = "";
2173 m_Keyword1 = "";
2174 m_Keyword2 = "";
2175
2176}
2177
2178// 채팅 필터 창의 체크박스 들을 m_filterInfo에따라 세팅해 주고 옵션불에서 시스템 메시지 전용창의 위치를 파악한다.
2179function SetChatFilterButton()
2180{
2181 local bool bSystemMsgWnd;
2182 local bool bOption;
2183 local ChatFilterWnd script;
2184
2185 script = ChatFilterWnd( GetScript("ChatFilterWnd") );
2186
2187 // 시스템 메시지 윈도우
2188 bSystemMsgWnd = GetOptionBool( "Game", "SystemMsgWnd" );
2189 m_hChatFilterWndSystemMsgBox.SetCheck( bSystemMsgWnd );
2190
2191 // 데미지 - DamageBox
2192 bOption = GetOptionBool( "Game", "SystemMsgWndDamage" );
2193 m_hChatFilterWndDamageBox.SetCheck( bOption );
2194
2195 // 소모성아이템사용 - ItemBox
2196 bOption = GetOptionBool( "Game", "SystemMsgWndExpendableItem" );
2197 m_hChatFilterWndItemBox.SetCheck( bOption );
2198
2199 //~ debug ("m_chatType.UI" @ m_chatType.UI);
2200 //~ debug ("m_chatType.ID" @ m_chatType.ID);
2201
2202 //debug("SetChatFilterButton : chattype " $ m_chatType );
2203 if( m_chatType.UI >= 0 && m_chatType.UI <= CHAT_WINDOW_COUNT )
2204 {
2205 if (m_chatType.UI == 0)
2206 m_chatType.ID = 0;
2207 //Print( m_chatType );
2208 script.SetComboxIDSelect( m_chatType.UI -1, m_chatType.ID );
2209 switch (m_chatType.ID)
2210 {
2211 //전체
2212 case 0:
2213 //~ debug("1");
2214 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(144) , "" ));
2215 break;
2216 //매매
2217 case 1:
2218 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(355) , "" ));
2219 break;
2220 //파티
2221 case 2:
2222 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(188) , "" ));
2223 break;
2224 //혈맹
2225 case 3:
2226 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(128) , "" ));
2227 break;
2228 //동맹
2229 case 4:
2230 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(559) , "" ));
2231 break;
2232 case 5:
2233 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(1961) , "" ));
2234 break;
2235 case 6:
2236 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(1962) , "" ));
2237 break;
2238 case 7:
2239 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(1963) , "" ));
2240 break;
2241 case 8:
2242 m_hChatFilterWndCurrentText.SetText(MakeFullSystemMsg( GetSystemMessage(1995), GetSystemString(1964) , "" ));
2243 break;
2244
2245 //~ m_ChannelAssignComboBox.AddStringWithReserved(GetSystemString(1961), 5);
2246 //~ m_ChannelAssignComboBox.AddStringWithReserved(GetSystemString(1962), 6);
2247 //~ m_ChannelAssignComboBox.AddStringWithReserved(GetSystemString(1963), 7);
2248 //~ m_ChannelAssignComboBox.AddStringWithReserved(GetSystemString(1964), 8);
2249
2250
2251
2252 }
2253
2254 m_hChkChatFilterWndCheckBoxSystem.SetCheck( bool(m_filterInfo[m_chatType.UI].bSystem ) );
2255 //class'UIAPI_CHECKBOX'.static.SetCheck( "ChatFilterWnd.CheckBoxChat", bool(m_filterInfo[m_chatType].bChat ) );
2256 m_hChkChatFilterWndCheckBoxNormal.SetCheck( bool(m_filterInfo[m_chatType.UI].bNormal ) );
2257 m_hChkChatFilterWndCheckBoxShout.SetCheck( bool(m_filterInfo[m_chatType.UI].bShout ) );
2258 m_hChkChatFilterWndCheckBoxPledge.SetCheck( bool(m_filterInfo[m_chatType.UI].bClan ) );
2259 m_hChkChatFilterWndCheckBoxParty.SetCheck( bool(m_filterInfo[m_chatType.UI].bParty ) );
2260 m_hChkChatFilterWndCheckBoxTrade.SetCheck( bool(m_filterInfo[m_chatType.UI].bTrade ) );
2261 m_hChkChatFilterWndCheckBoxWhisper.SetCheck( bool(m_filterInfo[m_chatType.UI].bWhisper ) );
2262 m_hChkChatFilterWndCheckBoxDamage.SetCheck( bool(m_filterInfo[m_chatType.UI].bDamage ) );
2263 m_hChkChatFilterWndCheckBoxAlly.SetCheck( bool(m_filterInfo[m_chatType.UI].bAlly ) );
2264 m_hChkChatFilterWndCheckBoxItem.SetCheck( bool(m_filterInfo[m_chatType.UI].bUseItem ) );
2265 m_hChkChatFilterWndCheckBoxHero.SetCheck( bool(m_filterInfo[m_chatType.UI].bHero ) );
2266 m_hChkChatFilterWndCheckBoxUnion.SetCheck( bool(m_filterInfo[m_chatType.UI].bUnion ) );
2267 m_hChkChatFilterWndCheckBoxBattleField.SetCheck( bool(m_filterInfo[m_chatType.UI].bBattle ) );
2268
2269
2270 //Print( m_chatType );
2271 // 큰 카테고리가 체크 되었는지 여부에 따라 작은 카테고리의 checkbox를 활성/비활성 한다.
2272 if( !m_hChkChatFilterWndCheckBoxSystem.IsChecked() )
2273 {
2274 m_hChkChatFilterWndCheckBoxDamage.SetDisable(true );
2275 m_hChkChatFilterWndCheckBoxItem.SetDisable( true );
2276 }
2277 else
2278 {
2279 m_hChkChatFilterWndCheckBoxDamage.SetDisable( false );
2280 m_hChkChatFilterWndCheckBoxItem.SetDisable( false );
2281 }
2282
2283 // 큰 카테고리가 체크 되었는지 여부에 따라 작은 카테고리의 checkbox를 활성/비활성 한다.
2284// if( !class'UIAPI_CHECKBOX'.static.IsChecked( "ChatFilterWnd.CheckBoxChat" ) )
2285// {
2286// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxNormal", false );
2287// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxShout", false );
2288// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxPledge", false );
2289// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxParty", false );
2290// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxTrade", false );
2291// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxWhisper", false );
2292// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxAlly", false );
2293// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxHero", false );
2294// class'UIAPI_CHECKBOX'.static.SetDisable( "ChatFilterWnd.CheckBoxUnion", false );
2295// }
2296// else
2297
2298 m_hChkChatFilterWndCheckBoxNormal.SetDisable( false );
2299 m_hChkChatFilterWndCheckBoxShout.SetDisable( false );
2300 m_hChkChatFilterWndCheckBoxPledge.SetDisable( false );
2301 m_hChkChatFilterWndCheckBoxParty.SetDisable( false );
2302 m_hChkChatFilterWndCheckBoxTrade.SetDisable( false );
2303 m_hChkChatFilterWndCheckBoxWhisper.SetDisable( false );
2304 m_hChkChatFilterWndCheckBoxAlly.SetDisable( false );
2305 m_hChkChatFilterWndCheckBoxHero.SetDisable( false );
2306 m_hChkChatFilterWndCheckBoxUnion.SetDisable( false );
2307 m_hChkChatFilterWndCheckBoxBattleField.SetDisable( false );
2308
2309
2310 // 활성화 될수 없는 체크박스(기본적으로 체크여부를 유저가 결정할 수 없는 것 들)
2311 switch( m_chatType.ID )
2312 {
2313 case 1:
2314 m_hChkChatFilterWndCheckBoxTrade.SetDisable( true );
2315 m_hChkChatFilterWndCheckBoxTrade.SetCheck( true );
2316 break;
2317 case 2:
2318 m_hChkChatFilterWndCheckBoxParty.SetDisable( true );
2319 m_hChkChatFilterWndCheckBoxParty.SetCheck( true );
2320 break;
2321 case 3:
2322 m_hChkChatFilterWndCheckBoxPledge.SetDisable( true );
2323 m_hChkChatFilterWndCheckBoxPledge.SetCheck( true );
2324 break;
2325 case 4:
2326 m_hChkChatFilterWndCheckBoxAlly.SetDisable( true );
2327 m_hChkChatFilterWndCheckBoxAlly.SetCheck( true );
2328 break;
2329 case 5:
2330 m_hChkChatFilterWndCheckBoxHero.SetDisable( true );
2331 m_hChkChatFilterWndCheckBoxHero.SetCheck( true );
2332 break;
2333 case 6:
2334 m_hChkChatFilterWndCheckBoxUnion.SetDisable( true );
2335 m_hChkChatFilterWndCheckBoxUnion.SetCheck( true );
2336 break;
2337 case 7:
2338 m_hChkChatFilterWndCheckBoxShout.SetDisable( true );
2339 m_hChkChatFilterWndCheckBoxShout.SetCheck( true );
2340 break;
2341 case 8:
2342 m_hChkChatFilterWndCheckBoxBattleField.SetDisable( true );
2343 m_hChkChatFilterWndCheckBoxBattleField.SetCheck( true );
2344 break;
2345
2346
2347
2348
2349
2350
2351
2352 default:
2353 break;
2354 }
2355 }
2356}
2357
2358function HandleChatWndStatusChange()
2359{
2360 //~ local UserInfo userInfo;
2361
2362 //~ GetPlayerInfo( userInfo );
2363
2364 //~ if( userInfo.nClanID > 0 )
2365 //~ ChatTabCtrl.SetDisable(CHAT_WINDOW_CLAN, false);
2366 //~ else
2367 //~ ChatTabCtrl.SetDisable(CHAT_WINDOW_CLAN, true);
2368
2369 //~ if( userInfo.nAllianceID > 0 )
2370 //~ ChatTabCtrl.SetDisable(CHAT_WINDOW_ALLY, false);
2371 //~ else
2372 //~ ChatTabCtrl.SetDisable(CHAT_WINDOW_ALLY, true);
2373}
2374
2375function HandleSetString( String a_Param )
2376{
2377 local int IsAppend;
2378 local string tmpString;
2379
2380 IsAppend = 0;
2381 ParseInt( a_Param, "IsAppend", IsAppend );
2382 if( ParseString( a_Param, "String", tmpString ) )
2383 {
2384
2385 if( IsAppend > 0 )
2386 ChatEditBox.AddString(tmpString);
2387 else
2388 ChatEditBox.SetString(tmpString);
2389 }
2390}
2391
2392function HandleSetFocus()
2393{
2394 if( !ChatEditBox.IsFocused() )
2395 ChatEditBox.SetFocus();
2396}
2397
2398function Print( int index )
2399{
2400 //debug( "Self=" $ Self $ " m_chatType=" $ m_chatType );
2401/* debug( "Print type(" $ index $ "), system :" $ m_filterInfo[ index ].bSystem $ ", chat:" $ m_filterInfo[ index ].bChat $ ",Normal:" $ m_filterInfo[ index ].bNormal $
2402 * ", shout:" $ m_filterInfo[ index ].bShout $ ",pledge:" $ m_filterInfo[ index ].bClan $ ", party:" $ m_filterInfo[ index ].bParty $
2403 * ", trade:" $ m_filterInfo[ index ].bTrade $ ", whisper:" $ m_filterInfo[ index ].bWhisper $ ", damage:" $ m_filterInfo[ index ].bDamage $
2404 * ", ally:" $ m_filterInfo[ index ].bAlly $ ",useitem:" $ m_filterInfo[ index ].bUseItem $ ", hero:" $ m_filterInfo[ index ].bHero );
2405 */
2406}
2407
2408function HandleMsnStatus( string param )
2409{
2410 local string status;
2411 local ButtonHandle handle;
2412
2413 if(CREATE_ON_DEMAND==0)
2414 handle = ButtonHandle(GetHandle("Chatwnd.MessengerBtn"));
2415 else
2416 handle = GetButtonHandle("Chatwnd.MessengerBtn");
2417
2418 ParseString( param, "status", status );
2419 if( status == "online" )
2420 handle.SetTexture("L2UI_CH3.Msn.chatting_msn1", "L2UI_CH3.Msn.chatting_msn1_down", "L2UI_CH3.Msn.chatting_msn1_over");
2421 else if( status == "berightback" || status == "idle" || status == "away" || status == "lunch" )
2422 handle.SetTexture("L2UI_CH3.Msn.chatting_msn2", "L2UI_CH3.Msn.chatting_msn2_down", "L2UI_CH3.Msn.chatting_msn2_over");
2423 else if( status == "busy" || status == "onthephone" )
2424 handle.SetTexture("L2UI_CH3.Msn.chatting_msn3", "L2UI_CH3.Msn.chatting_msn3_down", "L2UI_CH3.Msn.chatting_msn3_over");
2425 else if( status == "offline" || status == "invisible" )
2426 handle.SetTexture("L2UI_CH3.Msn.chatting_msn4", "L2UI_CH3.Msn.chatting_msn4_down", "L2UI_CH3.Msn.chatting_msn4_over");
2427 else if( status == "none" )
2428 handle.SetTexture("L2UI_CH3.Msn.chatting_msn5", "L2UI_CH3.Msn.chatting_msn5_down", "L2UI_CH3.Msn.chatting_msn5_over");
2429}
2430
2431function EChatType GetChatTypeByTabIndex(int Index)
2432{
2433 local EChatType Type;
2434 //~ Type = CHAT_NORMAL;
2435
2436 switch( m_chatType.ID )
2437 {
2438
2439 case 0:
2440 Type = CHAT_NORMAL;
2441 break;
2442 case 1:
2443 Type = CHAT_MARKET;
2444 break;
2445 case 2:
2446 Type = CHAT_PARTY;
2447 break;
2448 case 3:
2449 Type = CHAT_CLAN;
2450 break;
2451 case 4:
2452 Type = CHAT_ALLIANCE;
2453 break;
2454 case 5:
2455 Type = CHAT_HERO;
2456 break;
2457 case 6:
2458 Type =CHAT_INTER_PARTYMASTER_CHAT;
2459 break;
2460 case 7:
2461 Type = CHAT_SHOUT;
2462 break;
2463 case 8:
2464 Type = CHAT_DOMINIONWAR;
2465 break;
2466
2467 default:
2468 break;
2469 }
2470 return Type;
2471}
2472
2473//TextLink
2474function HandleTextLinkLButtonClick( string Param )
2475{
2476 local userinfo inf;
2477 local ETextLinkType eType;
2478 local int Type;
2479 local int ID;
2480 local string Title;
2481 local string LinkName;
2482
2483 ParseInt( Param, "Type", Type );
2484 ParseInt( Param, "ID", ID );
2485 ParseString( Param, "Title", Title );
2486 ParseString( Param, "LinkName", LinkName );
2487 eType = ETextLinkType( Type );
2488
2489 //admin ext. -Voices
2490 if(IsBuilderPC())
2491 {
2492 GetPlayerInfo(inf);
2493
2494 if(class'InputAPI'.static.IsCtrlPressed())
2495 {
2496 if(inf.Name != Title)
2497 {
2498 ExecuteCommand( "//teleportto" @ Title);
2499 }
2500 else
2501 {
2502 DialogShow(DIALOG_Modalless,DIALOG_Notice, "teleport to myself in no more");
2503 }
2504 return;
2505
2506 }
2507 else if(class'InputAPI'.static.IsShiftPressed())
2508 {
2509 if(inf.Name != Title)
2510 {
2511 DialogSetID( DialogGetCharToMe );
2512 TextLinkNameStr = Title;
2513 DialogShow( DIALOG_Modalless, DIALOG_OKCancel, "You will summon character '"$TextLinkNameStr$"'. Continue?" );
2514 }
2515 else
2516 {
2517 DialogShow(DIALOG_Modalless,DIALOG_Notice, "summon myself in no more");
2518 }
2519 return;
2520 }
2521 else if(class'InputAPI'.static.IsAltPressed())
2522 {
2523 if(inf.Name != Title)
2524 {
2525 DialogSetID( DialogKickSelectChar );
2526 TextLinkNameStr = Title;
2527 DialogShow( DIALOG_Modalless, DIALOG_OKCancel, "Kick character '"$TextLinkNameStr$"'?" );
2528 }
2529 else
2530 {
2531 DialogShow(DIALOG_Modalless,DIALOG_Notice, "Allo, Yoba, eto ti? Ti ne mozhesh' kick sebya, bratan");
2532 }
2533 return;
2534 }
2535 }
2536 //
2537 if( eType == TLT_User )
2538 {
2539 if( Left( Title, 2 ) == "->" )
2540 Title = Mid( Title, 2 );
2541 SetChatMessage( "\"" $ Title $ " " );
2542
2543 }
2544}
2545
2546//홈페이지 링크(10.1.28 문선준 추가)
2547function HandleDialogOK()
2548{
2549 if( !DialogIsMine() )
2550 return;
2551
2552 switch( DialogGetID() )
2553 {
2554 case DIALOGID_GoWeb:
2555 OpenGivenURL( Url );
2556 break;
2557
2558 //Admin ext -Voices
2559 case DialogGetCharToMe:
2560 ExecuteCommand( "//recall" @ TextLinkNameStr );
2561 break;
2562 case DialogKickSelectChar:
2563 ExecuteCommand( "//kick" @ TextLinkNameStr );
2564 break;
2565 }
2566}
2567function HandleDominionWarChannelSet( string param )
2568{
2569 local int DominionWarChannelSet;
2570
2571 ParseInt(param, "DominionWarChannelSet", DominionWarChannelSet);
2572
2573 if (DominionWarChannelSet == 1)
2574 {
2575 AddSystemMessage(2445);
2576
2577 }
2578 else
2579 {
2580 AddSystemMessage(2446);
2581 }
2582}
2583
2584function ChangeTabChannel(int ChannelIndex)
2585{
2586 switch (ChannelIndex)
2587 {
2588 case 1:
2589 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(355));
2590 //~ SetINIInt("global", "TabIndex1", ChannelIndex, "chatfilter.ini");
2591 //~ m_ChatUI[8].ID = 1;
2592 //~ m_ChatUI[].UI = m_chatType.UI;
2593 //~ AssignCurrentChatTypeID(ChannelIndex, m_chatType.UI);
2594 break;
2595 case 2:
2596 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(188));
2597 //~ SetINIInt("global", "TabIndex2", 2, "chatfilter.ini");
2598 break;
2599 case 3:
2600 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(128));
2601 //~ SetINIInt("global", "TabIndex3", 3, "chatfilter.ini");
2602 break;
2603 case 4:
2604 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(559));
2605 //~ SetINIInt("global", "TabIndex4", 4, "chatfilter.ini");
2606 break;
2607 case 5:
2608 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(1961));
2609 //~ SetINIInt("global", "TabIndex5", 5, "chatfilter.ini");
2610 break;
2611 case 6:
2612 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(1962));
2613 //~ SetINIInt("global", "TabIndex6", 6, "chatfilter.ini");
2614 break;
2615 case 7:
2616 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(1963));
2617 //~ SetINIInt("global", "TabIndex7", 7, "chatfilter.ini");
2618 break;
2619 case 8:
2620 ChatTabCtrl.SetButtonName( m_chatType.UI, GetSystemString(1964));
2621 //~ SetINIInt("global", "TabIndex8", 8, "chatfilter.ini");
2622 break;
2623 }
2624 //~ SetINIInt("global", "TabIndex1", ChannelIndex, "chatfilter.ini");
2625 AssignCurrentChatTypeID(ChannelIndex, m_chatType.UI);
2626 SetCurrentAssignedChatType2Ini(ChannelIndex, m_chatType.UI);
2627}
2628
2629function SetCurrentAssignedChatType2Ini(int ChannelIndex, int ChatType)
2630{
2631 //~ local int i;
2632 //~ for (i=0;i<5;i++)
2633 //~ {
2634 SetINIInt("global", "TabIndex" $ string(ChatType) , ChannelIndex, "chatfilter.ini");
2635
2636 //~ }
2637}
2638
2639
2640function GetAllcurrentAssignedChatTypeID()
2641{
2642 local int i;
2643 local int index;
2644 SetINIInt("global", "TabIndex0", 0, "chatfilter.ini");
2645 //Reset Procedure
2646 for (i=0;i<5;i++)
2647 {
2648 m_ChatUI[i].ID = i;
2649 m_ChatUI[i].UI = i;
2650 }
2651 //
2652 for (i=1;i<5;i++)
2653 {
2654 GetINIInt( "global", "TabIndex" $ string(i), index, "chatfilter.ini" );
2655 if (index > 0 && i > 0)
2656 {
2657 m_ChatUI[i].UI = i;
2658 m_ChatUI[i].ID = index;
2659
2660 m_chatType.UI = i;
2661 ChangeTabChannel(index);
2662 }
2663 else
2664 {
2665 //~ INI에 0으로 들어 있으면 기본값으로 세팅;
2666 AssignCurrentChatTypeID (i, i);
2667 switch (i)
2668 {
2669 case 1:
2670 m_ChatUI[1].ID = 1;
2671 ChatTabCtrl.SetButtonName( 1, GetSystemString(355));
2672 SetINIInt("global", "TabIndex1", 1, "chatfilter.ini");
2673 m_chatType.UI = i;
2674 ChangeTabChannel(1);
2675 break;
2676 case 2:
2677 m_ChatUI[2].ID = 2;
2678 ChatTabCtrl.SetButtonName( 2, GetSystemString(188));
2679 SetINIInt("global", "TabIndex2", 2, "chatfilter.ini");
2680 m_chatType.UI = i;
2681 ChangeTabChannel(2);
2682 break;
2683 case 3:
2684 m_ChatUI[3].ID = 3;
2685 ChatTabCtrl.SetButtonName( 3, GetSystemString(128));
2686 SetINIInt("global", "TabIndex3", 3, "chatfilter.ini");
2687 m_chatType.UI = i;
2688 ChangeTabChannel(3);
2689 break;
2690 case 4:
2691 m_ChatUI[4].ID = 4;
2692 ChatTabCtrl.SetButtonName( 4, GetSystemString(559));
2693 SetINIInt("global", "TabIndex4", 4, "chatfilter.ini");
2694 m_chatType.UI = i;
2695 ChangeTabChannel(4);
2696
2697 break;
2698 }
2699 }
2700 }
2701}
2702
2703function AssignCurrentChatTypeID (int ChatTypeID, int ChatTypeUI)
2704{
2705 local int i;
2706 for (i=1;i<5;i++)
2707 {
2708 if (m_ChatUI[i].UI == ChatTypeUI)
2709 {
2710 m_ChatUI[i].ID = ChatTypeID;
2711 break;
2712 }
2713 }
2714}
2715
2716
2717function int GetCurrentChatTypeID (int ChatTypeUI)
2718{
2719 local int i;
2720 for (i=1;i<5;i++)
2721 {
2722 if (m_ChatUI[i].UI == ChatTypeUI)
2723 {
2724 //~ native final function bool GetINIInt( string section, string key, out int value, string file );
2725 return m_ChatUI[i].ID;
2726 break;
2727 }
2728 }
2729}
2730
2731function OnMouseOver( WindowHandle a_WindowHandle )
2732{
2733 CheckChatPosition();
2734}
2735defaultproperties
2736{
2737}
2738