Elanthipedia Renown Scrolls (script)

From elanthipedia
Jump to: navigation, search
Elanthipedia Renown Scrolls (script)
Category information
Front-end Genie
Author Isharon


This script creates Elanthipedia forms for renown scrolls. The results are logged to the RenownScroll-Guild.txt file in Genie's Logs folder.

This script is intended for experienced Elanthipedia contributors only. The forms that are created by this script require some manual editing. (See below for details.) Please check for errors before posting them to Elanthipedia.

Instructions

Syntax

.RENOWN [SCROLL NOUN] (YES): Type yes if you want the script to create a room description. Otherwise, just type the scroll noun. For example, if you would read the scroll by typing LOOK SCROLL, run the script by typing .RENOWN SCROLL.


A menu will prompt you to select the guild that is listed on the renown scroll:

  1. Barbarian
  2. Bard
  3. Cleric
  4. Empath
  5. Moon Mage
  6. Necromancer
  7. Paladin
  8. Ranger
  9. Thief
  10. Trader
  11. Warrior Mage


A second menu will prompt you to select the format of the renown scroll:

  1. Rank/Name
  2. Rank/Name/Race
  3. Rank/Name/Circle
  4. Rank/Name/Race/Circle
  5. Rank/Name/Circle/Race
  6. Rank/Name/Circle/Race/Guild
  7. Rank/Name/Race/Deity
  8. Rank/Name/Race/Deity/Circle

Sample Usage (Walkthrough)

Running the Script

You want to update the Empath renown scroll, so you go to that room. The scroll looks like this:

    ______________________________________________________________________
   /                                                                    /_\
   |                                o                                   |
   |                                                                    |
   |     Let it be known, the following have displayed excellence       |
   |     in empathic acumen.                                            |
   |                                                                    |
   | #   Name                            Race                           |
   | ------------------------------------------------------------------ |
   | 1   Frediwyn                        Dwarf                          |
   | 2   Quazzarz Starz'yarz             Dwarf                          |
   | 3   Asrea Mela                      Human                          |
   | 4   Sophrona Sicknomore             Elf                            |
   | 5   Kalyndara Kendryn               Prydaen                        |
   | 6   Hanafae Leadhorin               Elf                            |
   | 7   Nausikaa Edgestrider            Elf                            |
   | 8   Kathlen Montreve                Elothean                       |
   | 9   Marmic McIves                   Elothean                       |
   | 10  Katjia Oirwen                   Elothean                       |
   | 11  Fernwren                        Dwarf                          |
   | 12  Rozze McIves                    Prydaen                        |
   | 13  Purehand Woundedlife            Human                          |
   | 14  Yasminna Kel'Dorack             Rakash                         |
   | 15  Rollannd Ahwannaleia            Elothean                       |
   | 16  Sonjaa Honeydew                 Human                          |
   | 17  Sarkranis Murhhthi              S'Kra Mur                      |
   | 18  Fizzickle Slowmend              Dwarf                          |
   | 19  Cayra Cartian                   Human                          |
   | 20  Karthor Ashanfel                Dwarf                          |
   | 21  Elezra                          Elothean                       |
   | 22  Sophieann Love                  Human                          |
   | 23  Kindelwyn Zerstorung            Elf                            |
   | 24  Acerbity                        Rakash                         |
   | 25  Kaelie Rudeone                  Elf                            |
   |                                                                    |
   |     To REMOVE your name from this list, RUB the scroll.            |
   |     To ADD your name, or update your name, TAP the scroll.         |
  _|__________________________________________________________________  |
 /                                                                  /_\ |
|                                                                  |    |
 \__________________________________________________________________\__/

Type .RENOWN SCROLL to run the script. Select 4 for Empath from the guild menu. Select 2 for Rank/Name/Race from the format menu.

Editing the Form

After the script runs, your log folder should contain a file called RenownScroll-Empath.txt. It should look like this:

The Crossing: room 325
'''Last updated:''' 29 Lirisa 411 (12/31/2013)<br />
<br />
{|class="wikitable sortable"
|-
!Rank!!Name!!Race
|-|1||[[Frediwyn]]||Dwarf
|-|2||[[Quazzarz]]||Dwarf
|-|3||[[Asrea]]||Human
|-|4||[[Sophrona]]||Elf
|-|5||[[Kalyndara]]||Prydaen
|-|6||[[Hanafae]]||Elf
|-|7||[[Nausikaa]]||Elf
|-|8||[[Kathlen]]||Elothean
|-|9||[[Marmic]]||Elothean
|-|10||[[Katjia]]||Elothean
|-|11||[[Fernwren]]||Dwarf
|-|12||[[Rozze]]||Prydaen
|-|13||[[Purehand]]||Human
|-|14||[[Yasminna]]||Rakash
|-|15||[[Rollannd]]||Elothean
|-|16||[[Sonjaa]]||Human
|-|17||[[Sarkranis]]||S'Kra Mur
|-|18||[[Fizzickle]]||Dwarf
|-|19||[[Cayra]]||Human
|-|20||[[Karthor]]||Dwarf
|-|21||[[Elezra]]||Elothean
|-|22||[[Sophieann]]||Human
|-|23||[[Kindelwyn]]||Elf
|-|24||[[Acerbity]]||Rakash
|-|25||[[Kaelie]]||Elf
|}

If you are editing a preexisting scroll (on Elanthipedia), you will only need to edit the date and the table itself.

The map and room name information are not intended for Elanthipedia' it's just for your records, so don't copy those.

The |-| in the list needs to be broken up into table format. Use Word's find and replace feature to replace |-| with |-^l|

The resulting list should look like this:

'''Last updated:''' 29 Lirisa 411 (12/31/2013)<br />
<br />
{|class="wikitable sortable"
|-
!Rank!!Name!!Race
|-
|1||[[Frediwyn]]||Dwarf
|-
|2||[[Quazzarz]]||Dwarf
|-
|3||[[Asrea]]||Human
|-
|4||[[Sophrona]]||Elf
|-
|5||[[Kalyndara]]||Prydaen
|-
|6||[[Hanafae]]||Elf
|-
|7||[[Nausikaa]]||Elf
|-
|8||[[Kathlen]]||Elothean
|-
|9||[[Marmic]]||Elothean
|-
|10||[[Katjia]]||Elothean
|-
|11||[[Fernwren]]||Dwarf
|-
|12||[[Rozze]]||Prydaen
|-
|13||[[Purehand]]||Human
|-
|14||[[Yasminna]]||Rakash
|-
|15||[[Rollannd]]||Elothean
|-
|16||[[Sonjaa]]||Human
|-
|17||[[Sarkranis]]||S'Kra Mur
|-
|18||[[Fizzickle]]||Dwarf
|-
|19||[[Cayra]]||Human
|-
|20||[[Karthor]]||Dwarf
|-
|21||[[Elezra]]||Elothean
|-
|22||[[Sophieann]]||Human
|-
|23||[[Kindelwyn]]||Elf
|-
|24||[[Acerbity]]||Rakash
|-
|25||[[Kaelie]]||Elf
|}

Simply copy and paste this into the appropriate place in the Elanthipedia article.

Required Triggers

#trigger {^It has been (\d+) years, (\d+) days since the Victory of Lanival the Redeemer\.$} {#var year $1;#var yearday $2}
#trigger {^It is the (\d+)\w\w month of (\S+) the (.+) in the year of the (.+)\.$} {#var month $1;#var monthname $2;#var yearname $4}

Changelog

6/24/2018

2/26/2016

12/6/2014

  • Fixed GameTime triggers.

12/31/2013

  • Added automated setting of "GameDate" used in Elanthipedia renown scrolls.

11/15/2013

  • Fixed alignment of guild selection table.

Scripts

GameTime

This is the script that, with the above triggers, sets the current $GameDate variable, which is used in the renown scroll listings on Elanthipedia. It must be named gametime.cmd to work. (The other scripts run gametime when needed.)

send time
waitforre ^It is currently
pause .5

evalmath MONTHFACTOR $month-1
evalmath DAYFACTOR %MONTHFACTOR*40
evalmath MONTHDAY $yearday-%DAYFACTOR
math MONTHDAY add 1
put #var GameDate %MONTHDAY $monthname $year

AnduSet:
if %MONTHDAY >= 1 && %MONTHDAY <= 4 then
{
put #var andu 1
put #var anduname Kertandu
}
if %MONTHDAY >= 5 && %MONTHDAY <= 8 then
{
put #var andu 2
put #var anduname Hodandu
}
if %MONTHDAY >= 9 && %MONTHDAY <= 12 then
{
put #var andu 3
put #var anduname Evandu
}
if %MONTHDAY >= 13 && %MONTHDAY <= 16 then
{
put #var andu 4
put #var anduname Truffandu
}
if %MONTHDAY >= 17 && %MONTHDAY <= 20 then
{
put #var andu 5
put #var anduname Havrandu
}
if %MONTHDAY >= 21 && %MONTHDAY <= 24 then
{
put #var andu 6
put #var anduname Elandu
}
if %MONTHDAY >= 25 && %MONTHDAY <= 28 then
{
put #var andu 7
put #var anduname Chandu
}
if %MONTHDAY >= 29 && %MONTHDAY <= 32 then
{
put #var andu 8
put #var anduname Glythandu
}
if %MONTHDAY >= 33 && %MONTHDAY <= 36 then
{
put #var andu 9
put #var anduname Faeandu
}
if %MONTHDAY >= 37 && %MONTHDAY <= 40 then
{
put #var andu 10
put #var anduname Tamsandu
}

Output:
echo
echo year:		$year ($yearname)
echo season:		$Time.season
echo month:		$month ($monthname)
echo andu/week:	$andu ($anduname)
echo day of month:	%MONTHDAY ($Time.timeOfDay)
echo day of year:	$yearday
echo
echo calendar date:	$anduname, $GameDate ($date)
echo
put #var save
put #parse GAMETIME SCRIPT DONE

Renown Scroll

put .gametime
waitfor GAMETIME SCRIPT DONE

Start:
echo
echo Guild:
echo
echo 1. Barbarian		7. Paladin
echo 2. Bard			8. Ranger
echo 3. Cleric			9. Thief
echo 4. Empath		10. Trader
echo 5. Moon Mage		11. Warrior Mage
echo 6. Necromancer
echo
echo Enter Guild Number:

matchre Barbarian ^1$
matchre Bard ^2$
matchre Cleric ^3$
matchre Empath ^4$
matchre MoonMage ^5$
matchre Necromancer ^6$
matchre Paladin ^7$
matchre Ranger ^8$
matchre Thief ^9$
matchre Trader ^10$
matchre WarriorMage ^11$
matchwait

Barbarian:
var guild Barbarian
var file Barbarian
goto RoomDescCheck
Bard:
var guild Bard
var file Bard
goto RoomDescCheck
Cleric:
var guild Cleric
var file Cleric
goto RoomDescCheck
Empath:
var guild Empath
var file Empath
goto RoomDescCheck
MoonMage:
var guild Moon Mage
var file MoonMage
goto RoomDescCheck
Necromancer:
var guild Necromancer
var file Necromancer
goto RoomDescCheck
Paladin:
var guild Paladin
var file Paladin
goto RoomDescCheck
Ranger:
var guild Ranger
var file Ranger
goto RoomDescCheck
Thief:
var guild Thief
var file Thief
goto RoomDescCheck
Trader:
var guild Trader
var file Trader
goto RoomDescCheck
WarriorMage:
var guild Warrior Mage
var file WarriorMage
goto RoomDescCheck

RoomDescCheck:
if_2 goto RoomDesc
goto Format

RoomDesc:
put #log >RenownScroll-%file.txt {{ShopDescription
put #log >RenownScroll-%file.txt |roomname=$roomname
put #log >RenownScroll-%file.txt |desc=$roomdesc<br />
put #log >RenownScroll-%file.txt $roomobjs<br />
put #log >RenownScroll-%file.txt $roomexits
put #log >RenownScroll-%file.txt }}

Format:
put #log >RenownScroll-%file.txt $zonename: room $roomid
put #log >RenownScroll-%file.txt '''Last updated:''' $GameDate ($date)<br />
put #log >RenownScroll-%file.txt <br />
put #log >RenownScroll-%file.txt {|class="wikitable sortable"
put #log >RenownScroll-%file.txt |-
echo
echo List Format:
echo
echo 1. Rank/Name
echo 2. Rank/Name/Race
echo 3. Rank/Name/Circle
echo 4. Rank/Name/Race/Circle
echo 5. Rank/Name/Circle/Race
echo 6. Rank/Name/Circle/Race/Guild
echo 7. Rank/Name/Race/Deity
echo 8. Rank/Name/Race/Deity/Circle
echo
echo Enter Format Number:

matchre Format1 ^1$
matchre Format2 ^2$
matchre Format3 ^3$
matchre Format4 ^4$
matchre Format5 ^5$
matchre Format6 ^6$
matchre Format7 ^7$
matchre Format8 ^8$
matchwait

Format1:
put #log >RenownScroll-%file.txt !Rank!!firstname
action setvariable rank $1;setvariable firstname $2 when (\d+)\s+(\S+)\D+
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]] when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format2:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Race
action setvariable rank $1;setvariable firstname $2;setvariable race $3 when (\d+)\s+(\S+).+(Dwarf|Elf|Elothean|Gnome|Gor'Tog|Halfling|Human|Kaldar|Prydaen|Rakash|S'Kra Mur)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%race when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format3:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Circle
action setvariable rank $1;setvariable firstname $2;setvariable circle $3 when (\d+)\s+(\S+)\D+(\d+)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%circle when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format4:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Race!!Circle
action setvariable rank $1;setvariable firstname $2;setvariable race $3;setvariable circle $4 when (\d+)\s+(\S+).+(Dwarf|Elf|Elothean|Gnome|Gor'Tog|Halfling|Human|Kaldar|Prydaen|Rakash|S'Kra Mur)\D+(\d+)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%race||%circle when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format5:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Circle!!Race
action setvariable rank $1;setvariable firstname $2;setvariable circle $3;setvariable race $4 when (\d+)\s+(\S+)\D+(\d+)\s+(Dwarf|Elf|Elothean|Gnome|Gor'Tog|Halfling|Human|Kaldar|Prydaen|Rakash|S'Kra Mur)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%circle||%race when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format6:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Circle!!Race!!Guild
action setvariable rank $1;setvariable firstname $2;setvariable circle $3;setvariable race $4 when (\d+)\s+(\S+)\D+(\d+)\s+(Dwarf|Elf|Elothean|Gnome|Gor'Tog|Halfling|Human|Kaldar|Prydaen|Rakash|S'Kra Mur)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%circle||%race||%guild when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format7:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Race!!Deity
action setvariable rank $1;setvariable firstname $2;setvariable race $3;setvariable deity $4 when (\d+)\s+(\S+).+(Dwarf|Elf|Elothean|Gnome|Gor'Tog|Halfling|Human|Kaldar|Prydaen|Rakash|S'Kra Mur)\s+(\S+)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%race||%deity when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Format8:
put #log >RenownScroll-%file.txt !Rank!!firstname!!Race!!Deity!!Circle
action setvariable rank $1;setvariable firstname $2;setvariable race $3;setvariable deity $4;setvariable circle $5 when (\d+)\s+(\S+).+(Dwarf|Elf|Elothean|Gnome|Gor'Tog|Halfling|Human|Kaldar|Prydaen|Rakash|S'Kra Mur)\s+(\S+)\D+(\d+)
action put #log >RenownScroll-%file.txt |-|%rank||[[%firstname]]||%race||%deity||%circle when ^(\s+)?(\|)?(\s+)?\d+
send look %1
pause 3
goto Exit

Exit:
put #log >RenownScroll-%file.txt |}
put #log >RenownScroll-%file.txt
exit