• The added line is THIS COLOR.
  • The deleted line is THIS COLOR.
#contents

*Install [#l473fa81]

**Can't Find ES Folder [#u3baec02]
:Questiion|I cannot install the new patch from a fresh install of D2, I get "Can't find ES folder."
:Answer|Please follow the instruction of the first pop-up reminder, which says "If this is the first time install, please click CANCEL in the next screen."

*Compatibility [#sa406bfb]
**Can I use pre R6 characters in R6? [#i731c260]
:Question|Can I use the characters created in the older versions than R6?
:Answer|Yes, you can. R6 can load the old characters. The old characters have less skill points and different stat points, but you can update those stats by Nameless' D2S Utility.

:|Please also make sure to ''update your Damage Augmenter charm''. If your character is a pure caster and have no Damage Augmenter, please get one from a dummy character, or by cubing Wirt's Leg and a Tome of Identify.

:|''Even pure casters need Damage Augmenter in R6'' to receive the spell damage bonus from Energy, and to make Kill/Death Counter work. 
**How can I update pre R6 characters? [#cb53c646]
**I can't load my Necromancer after the character update. [#z16fbfb7]
:Question|How can I update pre R6 characters?
:Question|I can't load my Necromancer after the character update.
:Answer|Nameless' D2S Utility is bundled with the Windows version. You can run the batch to convert all old characters at once, or update each old characters by the GUI utility. You can find the latest version of Nameless' D2S Utility [[here>CharacterUtility]].

:|''Caution'': When you convert a Necromancer, please make sure to unsummon any Metal Golem first, or the converted characer cannot be loaded in R6.

:|The Mac version utility is currently under development and will be available soon.


'------------------------------------------------------------------------------
'FILE DESCRIPTION: This macro is for coloring of TrigML code
'------------------------------------------------------------------------------
' Revise using stacks, prior token, next token (look ahead method)

Class Token
	Dim strExp 
	Dim strColor 
	Dim bBold
	Dim strRep
'   as String
'	as String
'	 as Boolean
    Sub Copy( srcToken )
	End Sub
	
	Dim CheckPrior

End Class

Sub CheckPrior( strLine )

End Sub
Sub colorTrigML()
	Dim DebugObj
	Set DebugObj = New Debug


    DebugObj.Print "Show Me The Money!"

	ActiveDocument.Selection.SelectAll
	
	strToParse = ActiveDocument.Selection

	'Copy from selection and add ~ every end of the line
'    strToParse = replaceString( ActiveDocument.Selection, "(\r\n|\n)", "~$1" )
	'  
'	"(<\?)(xml)(\s)|", _
'x	"((<)(\S*)(>)(?!\?))|((<\?)(xml)(\s))", _
'x	"(<)(?!\?)|(\S*)(>|\s)", _
'x	"(<)(?!\?)(\S)(>|\s)", _
'temp  (\S)(>|\s)
'ok	"(<)(?!\?)(\S*)(>)", _

	'form::'<?xml
	strToParse = replaceString( strToParse, _
	"(<\?)xml(.*>)", _
	"$1&color(blue){''xml''};$2" )

	'form::<trigml>
'    strToParse = replaceString( strToParse, _
'	"(<)(?!\?)(\S*)>", _
'	"&color(blue){$1''$2''>};" )

	'form::<trigml>
	'form::<layer id="layer1"> (blue)
	'"(<)(?!\?)(\S*)(.*[^/])>", _
	szPattern = "(<)(?!\?)(\w+)([^/]*)>(\s*$)"

	MsgBox RegExpTest( szPattern, strToParse )

    strToParse = replaceString( strToParse, szPattern, _
	"&color(blue){$1''$2''};$3&color(blue){>};$4" )

	'form::<image res="banner/logo"/> (blue)
'    strToParse = replaceString( strToParse, _
'	"(<)(?!\?)(\S*)(.*/>)", _
'	"&color(blue){$1''$2''};$3" )


'	szTokenPart = "trigml"
'	szPattern = "^(.*)" & szTokenPart  & "(.*$)"
'	szReplace = "$1&color(" & currToken.strColor &"){" & szBold & "$2" & szBold & "};$3"

'	strToParse = replaceString( strToParse, szPattern, szReplace )  


	ExecuteCommand "Cancel"
	Documents.Add "Text"
	ActiveDocument.Selection = strToParse
	ActiveDocument.Selection.SelectAll
	ActiveDocument.Selection.Copy

	szWindow = "D:\...\myTestCompare.pukiwiki" 

	If ( FindWindow(szWindow) ) Then
		Windows(szWindow).Close dsSaveChangesPrompt
	End If

	ActiveDocument.Save "D:\MyProjects\PukiWiki\myTestCompare.pukiwiki"

End Sub

Sub colorTrigMLv01()
'DESCRIPTION: Create a new document with pukiwiki codes based on current TrigML
	Dim aTokens, currToken


'	ActiveDocument.Save "D:\MyProjects\PukiWiki\myTestPuki.pukiwiki"
	ActiveDocument.Selection.SelectAll
	
	strToParse = ActiveDocument.Selection
	'Copy from selection and add ~ every end of the line
    strToParse = replaceString( ActiveDocument.Selection, "(\r\n|\n)", "~$1" )  

	iNumToken = 0
	aTokens = initTokens( iNumToken )


	For Each currToken in aTokens
		'currToken.strExp & " " & currToken.strColor & " " & currToken.bBold
		'[^\""]
		'&"(\"")"
		'szPattern = "^(.*)"  & "("  & currToken.strExp & ")" & "(.*$)"
		szPattern = "^(.*)"   & currToken.strExp  & "(.*$)"

		If ( currToken.bBold ) Then
			szBold = "''"
		Else
			szBold = ""
		End If

		szReplace = "$1&color(" & currToken.strColor &"){" & szBold & "$2" & szBold & "};$3"
		strToParse = replaceString( strToParse, szPattern, szReplace )  
	Next

	'MsgBox strToParse

	ExecuteCommand "Cancel"
	Documents.Add "Text"
	ActiveDocument.Selection = strToParse
	ActiveDocument.Selection.SelectAll
	ActiveDocument.Selection.Copy
'	Windows("D:\...\myTestCompare.pukiwiki").Active = True
	szWindow = "D:\...\myTestCompare.pukiwiki" 

	If ( FindWindow(szWindow) ) Then
		Windows(szWindow).Close dsSaveChangesPrompt
	End If

'	ActiveWindow.Close dsSaveChangesPrompt
	ActiveDocument.Save "D:\MyProjects\PukiWiki\myTestCompare.pukiwiki"


End Sub

'Private 

Private Function initTokens( byRef iNumToken )
'DESCRIPTION: Initializez tokens
    Dim tokenTable, newTokens(), srcCurrToken, destCurrToken

'		Array("(\n)"), black, false ),			_

'temps
		'Array("(?=[^/])>",	"blue", false ),        _

		'Array("<",  "blue", false ),            _
		'Array("layer",  "blue", true ),           _
		'Array("\/>",  "black", false ),           _
		'Array(">",	"blue", false ),        _

		'Array("(?=<)\/",  "blue", true ),            _
		
	'this worked ->	Array("<(?=\/)",  "blue", true ),            _
	tokenTable =                                _
	Array(                                      _
		Array("<(/)",  "blue", true ),            _
		Array("trigml",  "blue", true )           _
	)
'		Array("\/trigml",  "blue", true ),           _
'		Array("\/layer",  "blue", true )           _

	iNumToken = UBound( tokenTable, 1 ) 'Last 0-based index 
	
'	MsgBox iNumToken
	ReDim newTokens( iNumToken )

	iCtr = 0
	For Each srcCurrToken In tokenTable
		Set destCurrToken = new Token

		destCurrToken.strExp = srcCurrToken( 0 )
		destCurrToken.strColor   = srcCurrToken( 1 )
		destCurrToken.bBold      = srcCurrToken( 2 )

		Set newTokens( iCtr ) = destCurrToken
		iCtr = iCtr + 1
		'MsgBox currToken(0) & " " & currToken(1) & " " & currToken(2)   
	Next
'	MsgBox UBound( tokenTable(0), 1)
	 
'	tokenTable = Array( ~
'					Array( "<",		 "blue", false ), 
'					Array( ">",		 "blue", false ),
'					Array( "/",		 "blue", false ),
'					Array( "trigml", "blue", true  )
'				 )
	
	iNumToken = iNumToken + 1 'Add 1 for the actual number of tokens
	initTokens = newTokens    'Return
End Function

Function FindWindow( szWinName )
	
	For Each objWin In Windows
		IF ( objWin.Caption = szWinName ) Then
			FindWindow = True
			Exit Function
		End If
	Next

	FindWindow = False
End Function

Sub tester

	MsgBox Windows.Item(3).Caption
'	If ( Windows("D:\...\myTestCompare.pukiwiki") <> Empty ) Then
'		MsgBox "Existing"
'	Else
'		MsgBox "Not Found"
'	End If
End sub

Sub xtester()
'DESCRIPTION: 説明はありません。
	Dim aTokens, currToken

	iNumToken = 0
	aTokens = initTokens( iNumToken )

'	Set myToken = New Token
'	myToken.strExp = "Hello!"
'	Set myToken = New Token

'	iNumToken = UBound( aTokens, 1 ) 
'	MsgBox "iNumToken: " & iNumToken


'	For iCtr = 0 to iNumToken
	For Each currToken in aTokens
'		MsgBox "iCtr: " & iCtr 
'	    Set currToken = aTokens(iCtr)
		MsgBox currToken.strExp & " " & currToken.strColor & " " & currToken.bBold   
	Next

	'MsgBox aTokens(0).strExp & " " & aTokens(0).strColor & " " & aTokens(0).bBold   
	'MsgBox UBound( myTokens, 1 )
End Sub

Private Sub test1()
'DESCRIPTION: 説明はありません。


'Begin Recording
	ActiveDocument.Save "D:\MyProjects\PukiWiki\myTestPuki.pukiwiki"
'End Recording
End Sub

Private Sub test2()
'DESCRIPTION: 説明はありません。


'Begin Recording
	ActiveDocument.Selection.SelectAll
'End Recording
End Sub



Private Function matchString(byVal strToManage, strPattern )
	Dim regEx
	Set regEx = New RegExp

	regEx.IgnoreCase = True
	regEx.Global = True
	regEx.Multiline  = True
	regEx.Pattern = strPattern

'	replaceString = regEx.Replace( strToManage, strToReplace ) 
'	replaceString = regEx.Test( strToManage )
    

'	replaceString = strToManage
End Function


'&color(blue){<''trigml''>};~
'&color(blue){  <''/layer''>};~
'&color(blue){    <''group''>};~
'&color(blue){    <''/group''>};~
'&color(blue){    <''group''>};~
'&color(blue){    <''/group''>};~
'&color(blue){  <''/layer''>};~
'&color(blue){<''/trigml''>};~




Sub test()
'DESCRIPTION: 説明はありません。


'Begin Recording
	ActiveDocument.Selection.SelectAll
	ActiveDocument.Selection.Copy
	Documents.Add "Text"
	ActiveDocument.Selection.Paste
'End Recording
End Sub


Sub test1()
'DESCRIPTION: 説明はありません。


'Begin Recording
	Windows("D:\...\myTestCompare.pukiwiki").Active = True
	ActiveWindow.Close dsSaveChangesPrompt
'End Recording
End Sub

Sub tester2()
'DESCRIPTION: 説明はありません。


'Begin Recording
	Documents.Open "D:\MyProjects\PukiWiki\myTestCompare.pukiwiki", "Text"
'End Recording
End Sub

Private Function replaceString(byVal strToManage, strPattern, strToReplace )
	Dim regEx
	Set regEx = New RegExp

	regEx.IgnoreCase = True
	regEx.Global = True
	regEx.Multiline  = True
	regEx.Pattern = strPattern

	replaceString = regEx.Replace( strToManage, strToReplace ) 
'	replaceString = regEx.Test( strToManage )
'	replaceString = strToManage
End Function

Function RegExpTest(patrn, strng)

   Dim regEx, Match, Matches   ' Create variable.

   Set regEx = New RegExp   ' Create a regular expression.

   regEx.IgnoreCase = True   ' Set case insensitivity.
   regEx.Global = True   ' Set global applicability.
   regEx.Multiline  = True ' Set to multiline
   regEx.Pattern = patrn   ' Set pattern.

   Set Matches = regEx.Execute(strng)   ' Execute search.

   For Each Match in Matches   ' Iterate Matches collection.

      RetStr = RetStr & "Match found at position "

      RetStr = RetStr & Match.FirstIndex & ". Match Value is '"

      RetStr = RetStr & Match.Value & "'." & vbCRLF

   Next

   RegExpTest = RetStr

End Function

同等 【どうとう】 (adj-na,n,adj-no) equality; equal; same rights; same rank; 
裁断 【さいだん】 (n,vs) (1) judgement; judgment; decision; (2) cutting (cloth); shredding (in a paper shredder)


Front Page   New All Pages Search Recent Changes   Help   RSS of recent changes