|
@@ -1515,76 +1515,72 @@ $cheatmenu['month'] = {
|
|
|
'<a href="exec:temp_month = 12 & $temp_month = ''December'' & dynamic $cheatmenu[''time'']">December</a>'
|
|
|
}
|
|
|
|
|
|
-$cheatmenu['magic'] = {
|
|
|
- gs'stat'
|
|
|
- *clr & cla
|
|
|
- gs 'obj_din', 'cheattabs'
|
|
|
- '<center><h1>Cheat Menu - Magic</h1></center>'
|
|
|
- '<center>Is magical: <a href="exec:pcs_magik += 1 & dynamic $cheatmenu[''magic'']">+1<<pcs_magik>></a></center>'
|
|
|
- if succubusflag = 1:
|
|
|
- '<center><a href="exec:dynamic $cheatmenu[''succubreset'']"><b>Remove & Reset Succubus status</b></a></center>'
|
|
|
- *nl
|
|
|
- end
|
|
|
+$cheatmenu['magicTable'] = {
|
|
|
+ !Build a cheat table for spells with a given Array of spell names.
|
|
|
+ ! ARGS[0] = Friendly name for table
|
|
|
+ ! ARGS[1] = the name of the arraay to use
|
|
|
|
|
|
+ $SpellTabName = $ARGS[0]
|
|
|
+ $ThisArrName = $ARGS[1]
|
|
|
+ maxArrSizeC = dyneval("result=arrsize('<<$ThisArrName>>')")
|
|
|
+
|
|
|
+ ! make the header for the table
|
|
|
$SpellListStr = "<center>
|
|
|
- <table width='90%' cellspacing='0' cellpadding='0' valign='top'>
|
|
|
+ <table width='90%' cellspacing='0' cellpadding='5' valign='top' border='1'>
|
|
|
+ <tr><th colspan='4'><b><<$SpellTabName>></b></th></tr>
|
|
|
<tr>
|
|
|
- <th>X</th>
|
|
|
+ <th></th>
|
|
|
<th>Spell</th>
|
|
|
<th>Mana</th>
|
|
|
<th>Description</th>
|
|
|
</tr>"
|
|
|
i = 0
|
|
|
- :CheatDinSpell
|
|
|
- $ThisSpellName = $combatSpells[i]
|
|
|
- if i < arrsize('$combatSpells'):
|
|
|
- if spellKnown[$ThisSpellName] = 1:
|
|
|
- $spellFlipper = "<a href=""EXEC: spellKnown['<<$ThisSpellName>>'] = 0"">[Unlearn]</a>"
|
|
|
- else
|
|
|
- $spellFlipper = "<a href=""EXEC: spellKnown['<<$ThisSpellName>>'] = 1"">[Learn]</a>"
|
|
|
- end
|
|
|
- $SpellListStr = $SpellListStr + "
|
|
|
- <tr>
|
|
|
- <td><<$spellFlipper>></td>
|
|
|
- <td><<$spellName[$ThisSpellName]>></td>
|
|
|
- <td><<spellMana[$ThisSpellName]>></td>
|
|
|
- <td><<$spellDesc[$ThisSpellName]>></td>
|
|
|
- </tr>"
|
|
|
- i += 1
|
|
|
- jump 'CheatDinSpell'
|
|
|
- end
|
|
|
- i = 0
|
|
|
- :CheatDinSpell2
|
|
|
- $ThisSpellName = $nonComSpells[i]
|
|
|
- if i < arrsize('$nonComSpells'):
|
|
|
+ :CheatDinSpell1
|
|
|
+ $ThisSpellName = dyneval("$result=<<$ThisArrName>>[<<i>>]")
|
|
|
+ if i < maxArrSizeC:
|
|
|
if spellKnown[$ThisSpellName] = 1:
|
|
|
- $spellFlipper = "<a href=""EXEC: spellKnown['<<$ThisSpellName>>'] = 0"">[Unlearn]</a>"
|
|
|
+ $spellFlipper = "<a href=""EXEC: spellKnown['<<$ThisSpellName>>'] = 0 & dynamic $cheatmenu['magic']"">[Unlearn]</a>"
|
|
|
else
|
|
|
- $spellFlipper = "<a href=""EXEC: spellKnown['<<$ThisSpellName>>'] = 1"">[Learn]</a>"
|
|
|
- end
|
|
|
- $SpellListStr = $SpellListStr + "
|
|
|
- <tr>
|
|
|
- <td><<$spellFlipper>></td>
|
|
|
- <td><<$spellName[$ThisSpellName]>></td>
|
|
|
- <td><<spellMana[$ThisSpellName]>></td>
|
|
|
- <td><<$spellDesc[$ThisSpellName]>></td>
|
|
|
- </tr>"
|
|
|
+ $spellFlipper = "<a href=""EXEC: spellKnown['<<$ThisSpellName>>'] = 1 & dynamic $cheatmenu['magic']"">[Learn]</a>"
|
|
|
+ end
|
|
|
+ $SpellListStr = $SpellListStr + " <tr><td><<$spellFlipper>></td><td><<$spellName[$ThisSpellName]>></td><td><<spellMana[$ThisSpellName]>></td><td><<$spellDesc[$ThisSpellName]>></td></tr>"
|
|
|
i += 1
|
|
|
- jump 'CheatDinSpell2'
|
|
|
+ jump 'CheatDinSpell1'
|
|
|
end
|
|
|
|
|
|
$SpellListStr = $SpellListStr + "
|
|
|
</table>
|
|
|
</center>"
|
|
|
|
|
|
- $SpellListStr
|
|
|
+ *p $SpellListStr
|
|
|
|
|
|
killvar 'i'
|
|
|
killvar '$ThisSpellName'
|
|
|
+ killvar '$ThisArrName'
|
|
|
+ killvar 'maxArrSizeC'
|
|
|
+ killvar '$SpellTabName'
|
|
|
killvar '$spellFlipper'
|
|
|
killvar '$SpellListStr'
|
|
|
}
|
|
|
|
|
|
+$cheatmenu['magic'] = {
|
|
|
+ gs'stat'
|
|
|
+ *clr & cla
|
|
|
+ gs 'obj_din', 'cheattabs'
|
|
|
+ '<center><h1>Cheat Menu - Magic</h1></center>'
|
|
|
+ '<center>Is magical: <a href="exec:pcs_magik += 1 & dynamic $cheatmenu[''magic'']">+1<<pcs_magik>></a></center>'
|
|
|
+ if succubusflag = 1:
|
|
|
+ '<center><a href="exec:dynamic $cheatmenu[''succubreset'']"><b>Remove & Reset Succubus status</b></a></center>'
|
|
|
+ *nl
|
|
|
+ end
|
|
|
+
|
|
|
+ !Make sure spell list is initialized
|
|
|
+ if spellMana['fog'] = 0:gs 'spellList'
|
|
|
+
|
|
|
+ dynamic $cheatmenu['magicTable'], 'Combat Spells', '$combatSpells'
|
|
|
+ dynamic $cheatmenu['magicTable'], 'Non-Combat Spells', '$nonComSpells'
|
|
|
+}
|
|
|
+
|
|
|
$cheatmenu['dynamic'] = {
|
|
|
$dynamicCommand = input("Enter command to execute.")
|
|
|
if $dynamicCommand = '':exit
|