|
@@ -43,7 +43,7 @@ $questsDisplay
|
|
|
!! Pavlovsk - pavlovsk quests filter
|
|
|
!! Gadukino - gadukino quests filter
|
|
|
|
|
|
-journalBuilder['trackedQuests'] = 0
|
|
|
+!!journalBuilder['trackedQuests'] = 0
|
|
|
!!journalBuilder['hideHeader'] toggle header on/off
|
|
|
!!journalBuilder['questsMenu'] shows what menu item is currently active
|
|
|
|
|
@@ -53,7 +53,7 @@ $journalQuestsMenuOptions[2] = "St.Petersburg"
|
|
|
$journalQuestsMenuOptions[3] = "Pavlovsk"
|
|
|
$journalQuestsMenuOptions[4] = "Gadukino"
|
|
|
|
|
|
-pinnedQuests[0] = 0
|
|
|
+!!pinnedQuests[0] = 0
|
|
|
|
|
|
|
|
|
if $args[0] = "pinned":
|
|
@@ -70,8 +70,8 @@ if $args[0] = "pinned":
|
|
|
end
|
|
|
end
|
|
|
if $args[1] = "unpin":
|
|
|
- gs $this, 'pinned', 'remove', args[2]
|
|
|
- gs $this, 'active', 'add', args[2]
|
|
|
+ gs 'journal_quests_build', 'pinned', 'remove', args[2]
|
|
|
+ gs 'journal_quests_build', 'active', 'add', args[2]
|
|
|
end
|
|
|
if $args[1] = "sort":
|
|
|
tempCheckArray = arrpos('pinnedQuests', args[2])
|
|
@@ -86,6 +86,9 @@ if $args[0] = "pinned":
|
|
|
tempValue = pinnedQuests[tempFirstIndex]
|
|
|
pinnedQuests[tempSecondIndex] = pinnedQuests[tempFirstIndex]
|
|
|
pinnedQuests[tempFirstIndex] = tempValue
|
|
|
+ killvar 'tempValue'
|
|
|
+ killvar 'tempCheckArray'
|
|
|
+ killvar 'tempFirstIndex'
|
|
|
end
|
|
|
end
|
|
|
if $args[0] = "active":
|
|
@@ -101,34 +104,38 @@ if $args[0] = "active":
|
|
|
|
|
|
end
|
|
|
if $args[1] = "pin":
|
|
|
- gs $this, 'active', 'remove', args[2]
|
|
|
- gs $this, 'pinned', 'add', args[2]
|
|
|
+ gs 'journal_quests_build', 'active', 'remove', args[2]
|
|
|
+ gs 'journal_quests_build', 'pinned', 'add', args[2]
|
|
|
end
|
|
|
if $args[1] = "sort":
|
|
|
- tempCheckArray = arrpos('activeQuests', args[2])
|
|
|
+ tempCheckArray = arrpos('activeQuests', args[2])
|
|
|
+ *pl "Moving index <<args[2]>> " + iif(args[3], "Down", "Up")
|
|
|
tempFirstIndex = tempCheckArray
|
|
|
size = arrsize('activeQuests')
|
|
|
- !!depending on if we move quest up or down the list
|
|
|
+ !!depending on argument 0 or 1 we move quest up or down the list
|
|
|
if args[3] = 0:
|
|
|
tempSecondIndex = tempCheckArray - 1
|
|
|
else
|
|
|
tempSecondIndex = tempCheckArray + 1
|
|
|
end
|
|
|
tempValue = activeQuests[tempFirstIndex]
|
|
|
- activeQuests[tempSecondIndex] = activeQuests[tempFirstIndex]
|
|
|
- activeQuests[tempFirstIndex] = tempValue
|
|
|
+ activeQuests[tempFirstIndex] = activeQuests[tempSecondIndex]
|
|
|
+ activeQuests[tempSecondIndex] = tempValue
|
|
|
+ killvar 'tempValue'
|
|
|
+ killvar 'tempCheckArray'
|
|
|
+ killvar 'tempFirstIndex'
|
|
|
end
|
|
|
end
|
|
|
|
|
|
if $args[0] = "track":
|
|
|
if (arrpos('pinnedQuests', args[1]) = -1) and (arrpos('activeQuests', args[1]) = -1):
|
|
|
- gs $this, 'active', 'add', args[1]
|
|
|
+ gs 'journal_quests_build', 'active', 'add', args[1]
|
|
|
end
|
|
|
end
|
|
|
|
|
|
if $args[0] = "untrack":
|
|
|
- gs $this, 'pinned', 'remove', args[1]
|
|
|
- gs $this, 'active', 'remove', args[1]
|
|
|
+ gs 'journal_quests_build', 'pinned', 'remove', args[1]
|
|
|
+ gs 'journal_quests_build', 'active', 'remove', args[1]
|
|
|
end
|
|
|
|
|
|
if $args[0] = "locationFiltered":
|
|
@@ -155,12 +162,11 @@ if journalBuilder['hideHeader'] = 0:
|
|
|
end
|
|
|
|
|
|
"Args"
|
|
|
-"0: <<args[0]>>"
|
|
|
-"1: <<args[1]>>"
|
|
|
-"2: <<args[2]>>"
|
|
|
-"3: <<args[3]>>"
|
|
|
+"0: <<$args[0]>>"
|
|
|
+if isnum(args[1]): "1: <<args[1]>>" else "1: <<$args[1]>>"
|
|
|
+if isnum(args[2]): "2: <<args[2]>>" else "2: <<$args[2]>>"
|
|
|
+if isnum(args[3]): "3: <<args[3]>>" else "3: <<$args[3]>>"
|
|
|
|
|
|
-$this = 'journal_quests_build'
|
|
|
|
|
|
!!*p '<table width="90%" align="center" width="90%" cellspacing="0" cellpadding="0" valign="top"><tr>'
|
|
|
*p '<table width="90%" align="center" cellspacing="10" cellpadding="0" valign="top"><tr>'
|
|
@@ -184,10 +190,10 @@ if journalBuilder['questsMenu'] = 0:
|
|
|
:loopPinnedArr
|
|
|
if i < size:
|
|
|
*p $questsArr[pinnedQuests[i]]
|
|
|
- if i > 0 and (i + 1) < size : *p '<a href="exec:gs $this, ''pinned'', ''sort'', <<i>>, 0">Up</a> | '
|
|
|
- if i < (size - 2): *p '<a href="exec:gs $this, ''pinned'', ''sort'', <<i>>, 1">Down</a> | '
|
|
|
- *p '<a href="exec:gs $this, ''pinned'', ''unpin'', <<i>>">Unpin</a> | '
|
|
|
- *p '<a href="exec:gs $this, ''untrack'', <<i>>">Untrack</a>'
|
|
|
+ if i > 0 and (i + 1) < size : *p '<a href="exec:gs ''journal_quests_build'', ''pinned'', ''sort'', <<i>>, 0">Up</a> | '
|
|
|
+ if i < (size - 2): *p '<a href="exec:gs ''journal_quests_build'', ''pinned'', ''sort'', <<i>>, 1">Down</a> | '
|
|
|
+ *p '<a href="exec:gs ''journal_quests_build'', ''pinned'', ''unpin'', <<i>>">Unpin</a> | '
|
|
|
+ *p '<a href="exec:gs ''journal_quests_build'', ''untrack'', <<i>>">Untrack</a>'
|
|
|
*nl
|
|
|
i += 1 & jump 'loopPinnedArr'
|
|
|
end
|
|
@@ -201,11 +207,11 @@ if journalBuilder['questsMenu'] = 0:
|
|
|
i = 0
|
|
|
:loopActiveArr
|
|
|
if i < size:
|
|
|
- *p $questsArr[activeQuests[i]]
|
|
|
- if i > 0 and (i + 1) < size : *p '<a href="exec:gs $this, ''active'', ''sort'', <<i>>, 0">Up</a> | '
|
|
|
- if i < (size - 2): *p '<a href="exec:gs $this, ''active'', ''sort'', <<i>>, 1">Down</a> | '
|
|
|
- *p '<a href="exec:gs $this, ''active'', ''unpin'', <<i>>">Unpin</a> | '
|
|
|
- *p '<a href="exec:gs $this, ''untrack'', <<i>>">Untrack</a>'
|
|
|
+ *p $questsArr[activeQuests[i]] + ""
|
|
|
+ if i > 0 : *p '<a href="exec:gs ''journal_quests_build'', ''active'', ''sort'', <<i>>, 0">Up</a> | '
|
|
|
+ if i < (size - 1): *p '<a href="exec:gs ''journal_quests_build'', ''active'', ''sort'', <<i>>, 1">Down</a> | '
|
|
|
+ *p ' <a href="exec:gs ''journal_quests_build'', ''active'', ''pin'', <<i>>">Pin</a> | '
|
|
|
+ *p '<a href="exec:gs ''journal_quests_build'', ''untrack'', <<i>>">Untrack</a>'
|
|
|
*nl
|
|
|
i += 1 & jump 'loopActiveArr'
|
|
|
end
|
|
@@ -216,18 +222,26 @@ if journalBuilder['questsMenu'] = 1:
|
|
|
*pl "All available quests"
|
|
|
i = 0
|
|
|
size = arrsize('$questsArr')
|
|
|
- :loopAllQuests
|
|
|
- if arrsize('activeQuests', i) = 0 and arrsize('pinnedQuests', i)
|
|
|
+ :loopAllQuests
|
|
|
+ tempIsNonActive = (arrsize('activeQuests') > 0) and (arrpos('activeQuests', i) <> -1) and (arrpos('activeQuests', i) <> arrsize('activeQuests'))
|
|
|
+ tempIsNonPinned = (arrsize('pinnedQuests') > 0) and (arrpos('pinnedQuests', i) <> -1) and (arrpos('pinnedQuests', i) <> arrsize('pinnedQuests'))
|
|
|
if i < size:
|
|
|
*p $questsArr[i]
|
|
|
- *p "; isActive = " + tempIsActive + "; is Pinned ="+ tempIsPinned +"; "
|
|
|
- if tempIsActive = -1 and tempIsPinned = -1:
|
|
|
- *p '<a href="exec:gs $this, ''pinned'', ''add'', <<i>>">Pin</a> | '
|
|
|
- *p '<a href="exec:gs $this, ''track'', <<i>>">Track</a>'
|
|
|
+ *p " activeQuests: " + (arrsize('activeQuests') > 0) + " and " + (arrpos('activeQuests', i) <> -1)
|
|
|
+ *p " | pinnedQuests: " + (arrsize('pinnedQuests') > 0) + " and " + (arrpos('pinnedQuests', i) <> -1) + " "
|
|
|
+ if (no tempIsNonPinned) and (no tempIsNonActive):
|
|
|
+ *p '<a href="exec:gs ''journal_quests_build'', ''pinned'', ''add'', <<i>>">Pin</a> | '
|
|
|
+ *p '<a href="exec:gs ''journal_quests_build'', ''track'', <<i>>">Track</a>'
|
|
|
+ else
|
|
|
+ *p '<a href="exec:gs ''journal_quests_build'', ''untrack'', <<i>>">Untrack</a>'
|
|
|
end
|
|
|
*nl
|
|
|
i += 1 & jump 'loopAllQuests'
|
|
|
end
|
|
|
+ killvar 'tempIsNonActive'
|
|
|
+ killvar 'tempIsNonPinned'
|
|
|
+ killvar 'size'
|
|
|
+ killvar 'i'
|
|
|
end
|
|
|
if journalBuilder['questsMenu'] = 2:
|
|
|
*pl "Display City quests"
|