but i found it so messed up (record every things) to make it almost useness to me (i just want keep guild and word chat)
and i cant find the writer..so ..after few 1 or 2 weeks trying (i am new to script)
i make this script and it has 2 windows: 1 for guild chat 2 for world chat
https://gyazo.com/03b3543168948579bd752c59766416cc <<this is how it looks
try it and pm me if u have problem (if i have time to answer)
or can give me some good idea or advice ty a lot !
Code: Select all
set %My_Guild_Name <HG> ;input ur guild name
set %Guild_Chat 0
set #lpc 300 ;set this number how fast the script doing
;-------------------------below for the chat where u enter words-----------------------------------------------
set %Menu_Edit_Txt 50 ;it's for world chat lenth(when u input words)
set %Y_Coord 800
set %Menu_Edit_Txt2 50 ;it's for guild chat lenth(when u input words)
set %ycoord 200
;---------------------------ablove for the chat where u enter words---------------------------------------------
set %Window_Width 800 ;for the window what size u wanna it to be in the Width
set %Window_Height 600 ;for the window what size u wanna it to be in the Height
;00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
set %Menu_Button_World_Pos 0 ;for world button's postion
set %Menu_Button_Guild_Pos 0 ;for guild button's postion
;----------------------------------------------------------------------------------------------------------
set %listIndex3 0
gosub Checkmate
set %char `
set %speech 1
menu edit txt %Menu_Edit_Txt %ycoord %Y_Coord [World MSG Press ' To Send]
menu edit txt2 %Menu_Edit_Txt2 200 %Y_Coord [Guild MSG Press ' To Send]
while #true
{
gosub scan
gosub sendtxt
gosub sendtxt2
}
sub sendtxt
menu get txt
str pos #menures %char
if #strres = 0
return
set %a #strres
str len #menures
set %b #strres
if %a = %b
{
set %b %b - 1
str left #menures %b
msg [c #strres $
menu set txt
}
return
sub sendtxt2
menu get txt2
str pos #menures %char
if #strres = 0
return
set %a #strres
str len #menures
set %b #strres
if %a = %b
{
set %get_words #menures
set %b %b - 1
str left #menures %b
set %get_words #strres
msg [g #strres $
menu set txt2
}
return
sub checkmate
gosub menuBody
set %jEntry #jIndex
set %listIndex 0
return
sub scan
mainLoop:
if ( %jEntry < #jIndex || %jEntry = N/A )
{
set %scanLine #jIndex - %jEntry
scanJournal %scanLine
set %journal #journal
menu get filter_spam
set *filterSpam #menuRes
menu get filter_spells
set *filterSpells #menuRes
menu get chat_only
set *chatOnly #menuRes
menu get filter_spotting
set *filterSpotting #menuRes
if *filterSpells = #true
{
str pos %journal : 2
str del %journal 1 #strRes
set %spellCheckStr #strRes
}
;---------------------------------------------------------------------------------------------------------------------------
if shouts in %journal || chat in %journal || impurities in %journal || %My_Guild_Name in %journal || [ in %journal && you_see notin %journal
{
if %My_Guild_Name in %journal
{
set %Guild_Chat 1
set %jornal_number 1
}
else
{
set %Guild_Chat 2
set %jornal_number 2
}
set %lastEntry %journal
str count %journal _
while #strRes > 0
{
str pos %journal _
set %underscorePos #strRes
str del %journal #strRes 1
str ins #strRes #spc %underscorePos
set %journal #strRes
str count %journal _
}
str len %journal
set %Words_Lenth #strres ;測量該字長總字元長度
set %String_Lenth ( ( %Window_Width * 10 ) / 85 )
if %Guild_Chat = 1
{
gosub time
;msg 訊息行數: , %listIndex $
set %line_ . %listIndex %time , #spc , %journal
;----------------------------------------------------------------------
if %Words_Lenth >= %String_Lenth
{
gosub Check_If_Need_Cutted_And_Post
}
else
{
set %listIndex %listIndex + 1
menu list add journal , %jornal_number %journal
menu list select journal , %jornal_number %listIndex
}
}
else
{
if %Words_Lenth >= %String_Lenth
{
set %listIndex2 %listIndex2 + 1
gosub time
set %line_ . %listIndex %time , #spc , %journal
set %Check_talking %line_ . %listIndex
str pos %Check_talking : 4
set %Chck_result #strres
if %Chck_result > 4
{
gosub Check_If_Need_Cutted_And_Post
}
}
else
{
set %listIndex2 %listIndex2 + 1
gosub time
set %line_ . %listIndex %time , #spc , %journal
set %Check_talking %line_ . %listIndex
str pos %Check_talking : 4
set %Chck_result #strres
if %Chck_result > 4
{
set %listIndex3 %listIndex3 + 1
menu list add journal , %jornal_number %line_ . %listIndex
menu list select journal , %jornal_number %listIndex3
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
}
}
set %jEntry %jEntry + 1
}
if #menuButton <> NONE
{
gosub #menuButton
set #menuButton NONE
}
return
;--------------------------------------------------------------------------------------------------------------
}
gosub time
set %listIndex %listIndex + 1
set %line_ . %listIndex %time , #spc , SAVING , #SPC , DONE
menu list add journal %line_ . %listIndex
menu list select journal %listIndex
set %jEntry %jEntry + 1
return
sub left
if %width > 300
{
gosub menuBody -100 0
}
gosub rewriteList
return
sub right
if %width < 1200
{
gosub menuBody 100 0
}
gosub rewriteList
return
sub rewriteList
menu list clear journal , %jornal_number
for %restoreList_i 1 %listIndex
{
menu list add journal , %jornal_number %line_ . %restoreList_i
}
menu list select journal , %jornal_number %listIndex
return
sub closed
stop
return
sub time
set %time #time
str ins %time : 5
str ins #strRes : 3
set %time [ , #strRes , ]
return
sub menuBody
menu Clear
menu Font Name Times New Roman
menu Window title Bird's Excelsior Journal
menu Window color black
menu Font Name Verdana
menu Font color red
menu Font bgcolor black
menu Font size 12
if %width = N/A
{
set %width %Window_Width
}
if %height = N/A
{
set %height %Window_Height
}
set %yCoordinate 2
if %0 > 0
{
set %width %width + %1
}
menu list create journal1 0 0 810 200
; menu list create journal1 0 0 800 400
menu Font Name Times New Roman
set %yCoordinate %yCoordinate + %height
set %yCoordinate %yCoordinate + 5
menu Font Align right
menu button WORLD %Menu_Button_World_Pos 634 50 20 WORLD
menu button guild %Menu_Button_Guild_Pos 200 50 30 GUILD
menu Font color yellow
set %yCoordinate %yCoordinate + 20
set %ycoord %yCoordinate
set %yCoordinate %yCoordinate + 25
set %windowSize %width + 10
menu Window Size %windowSize %yCoordinate
menu Show
set #menuButton NONE
;------------------------------------------------------------------------------------------------------
menu list create journal2 0 230 810 400
; menu Font color green
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sub Check_If_Need_Cutted_And_Post %journal 94字元;;;;;
str len %journal
set %Words_Lenth #strres
if %Words_Lenth >= %String_Lenth
{
gosub Get_Char_ID %journal
set %The_Times_To_Cutted %Words_Lenth / ( ( %Window_Width / 85 ) * 10 )
gosub Get_First_String
gosub Get_Sec_String %Get_ID
if %Guild_Chat = 1
{
set %listIndex %listIndex + 1
menu list add journal , %jornal_number %Frist_String
menu list select journal , %jornal_number %listIndex
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
set %listIndex %listIndex + 1
menu list add journal , %jornal_number %Combid_String_With_ID
menu list select journal , %jornal_number %listIndex
}
else ;
{
set %listIndex3 %listIndex3 + 1
menu list add journal , %jornal_number %Frist_String
menu list select journal , %jornal_number %listIndex3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
set %listIndex3 %listIndex3 + 1
menu list add journal , %jornal_number %Combid_String_With_ID
menu list select journal , %jornal_number %listIndex3
}
}
return %listIndex
;-----------------------------------------------------------------------------------------------
sub Get_Char_ID
str pos %journal : %Guild_Chat
set %Char_ID_And_Time #strres
str left %journal %Char_ID_And_Time
set %Get_ID #strres
return
;---------------------------------------------------------------------------------------------------
sub Get_First_String
str left %journal %String_Lenth
set %Frist_String #strres
return
;-----------------------------------------------------------------------------------------------
sub Get_Sec_String
; msg %journal $
; msg %Words_Lenth $
set %Sec_string_lenth ( %Words_Lenth - %String_Lenth )
; msg %Sec_string_lenth $
str mid %journal %String_Lenth %Sec_string_lenth
set %Sec_string #strres
;-----------------------------------------------------
; %Frist_String
set %Combid_String_With_ID %Get_ID , %Sec_string
;msg %Get_ID $
; msg %Sec_string $
; msg %Combid_String_With_ID $
return
;--------------------------------------------------------------------------------------------------
sub Get_Third_String
set %Third_string_lenth ( %Words_Lenth - ( 94 * 2 ) )
set %Where_To_Beggin ( 94 * 2 )
str mid %journal %Where_To_Beggin %Third_string_lenth
set %Third_string #strres
;-----------------------------------------------------
; %Frist_String
set %Combid__Third_String_With_ID %Get_ID , %Third_string
return