Skip to content

Instantly share code, notes, and snippets.

View palikhov's full-sized avatar
🐉
E5E / SRD 5.1 rus / Excel GM Tools

Anton Palikhov palikhov

🐉
E5E / SRD 5.1 rus / Excel GM Tools
View GitHub Profile
@palikhov
palikhov / word-to-worldanvil-bbcode.vba
Created July 30, 2019 23:45
word-to-worldanvil-bbcode.vba
'Word2BBCode-Converter v0.1, June 2, 2006
'Matthew Kruer
'Some parts adapted from
'Word2Wiki-Converter V0.4, May 28, 2006
'http://de.wikipedia.org/wiki/Wikipedia:Helferlein/Word2MediaWikiPlus
'Original Version by InfPro: http://www.infpro.com/downloads/downloads/wordmedia.htm
'Major improvements by Gunter Schmidt, Mail me: [email protected]
'Works only with Word 2000 and above
'License: GPL: Feel free to use and modify. Keep the credits and do not sell.
@palikhov
palikhov / hideRowsBetweenListObjects.vba
Created August 7, 2019 13:37
VBA script to hide empty rows between two pivot tables
Private Sub hideRowsBetweenListObjects(sheetName As String)
Dim tblRowPosition1 As Integer
Dim tblNrOfRows1 As Integer
Dim tblRowPosition2 As Integer
Dim tblNrOfRows2 As Integer
'Initialize
Application.ScreenUpdating = False
With Worksheets(sheetName).ListObjects(1)
@palikhov
palikhov / HideRowsBtwnPivots.vba
Created August 7, 2019 13:37
Another vb code to hide rows between pivot tables
Sub HideRowsBtwnPivots()
'--Hides all rows between two PivotTables.
Dim lPivot1LastRow As Long, lPivot2FirstRow As Long
'---Get last row of top PivotTable
With ActiveSheet.PivotTables("PivotTable1").TableRange2
lPivot1LastRow = .Row + .Rows.Count - 1
End With
@palikhov
palikhov / basic-word-to-bbcode-converter.vba
Last active September 4, 2019 10:41
Basic macros for transforming Microsoft Word styling to BBcode for Worlld Anvil.
'Word2BBCode-Converter v0.1, September 4, 2019
'Palant edition
'Some parts adapted from
'Word2Wiki-Converter V0.4, May 28, 2006 and Matthew Kruer project
'http://de.wikipedia.org/wiki/Wikipedia:Helferlein/Word2MediaWikiPlus
'Original Version by InfPro: http://www.infpro.com/downloads/downloads/wordmedia.htm
'Major improvements by Gunter Schmidt, Mail me: [email protected]
'Works only with Word 2000 and above
'License: GPL: Feel free to use and modify. Keep the credits and do not sell.
@palikhov
palikhov / macro01world-anvil.vba
Created September 12, 2019 07:06
Macro to clear invisible symbols before bbacode
Sub ClearingNonVisibleSymbols()
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
@palikhov
palikhov / macro02world-anvil.vba
Created September 12, 2019 07:07
Macro to replace ^p with ^p^p
Sub ReplacePwith2P()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = "^p^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
@palikhov
palikhov / macro03-worldanvil.vba
Created September 12, 2019 07:30
macro to clear wiki formatting
Sub wikiformattingclearing()
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Font.Reset
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[edit]"
.Replacement.Text = ""
.Forward = True
@palikhov
palikhov / DruidShift
Created January 8, 2020 12:15 — forked from Bastlifa/DruidShift
Druid Shift Script for Roll20 D&D 5E OGL Sheet
/**************************************** Druid Shift ****************************************
This is for the 5E OGL sheet in Roll20. It will probably not work with any others without
some modification. Also, I didn't do much in the way of error checking.
The GM must make character named Druid X, where X is the creature being shifted into.
It is suggested that the GM duplicate existing creatures, rename them, and assign to the druid
player. The images for the characters must be uploaded and assigned to the avatar of the druid
form characters. The easiest way I've found it to open the character sheet, edit, right click
the picture in the avatar, copy, paste into your image program, save, upload and put it back in.
Maybe you could just upload it back into the avatar directly. Anyways, this won't work if you
@palikhov
palikhov / TemplateGenMacro
Created January 8, 2020 12:18 — forked from Bastlifa/TemplateGenMacro
Roll20 API Script to create aoe templates at tokens.
&{template:npcaction} {{name=Size and Shape}} {{rname=Shape Maker}} {{description=**Circle Radius**
[5 ft](!TemplateGenerator Circle 5) | [10 ft](!TemplateGenerator Circle 10) | [20 ft](!TemplateGenerator Circle 20) | [30 ft](!TemplateGenerator Circle 30) | [40 ft](!TemplateGenerator Circle 40)
________________________
**Square Side**
[10 ft](!TemplateGenerator Square 10) | [15 ft](!TemplateGenerator Square 15) | [20 ft](!TemplateGenerator Square 20) | [40 ft](!TemplateGenerator Square 40)
________________________
**Cones**
[60](!TemplateGenerator Cone 60 135) -------- [60](!TemplateGenerator Cone 60 90) -------- [60](!TemplateGenerator Cone 60 45)
----[30](!TemplateGenerator Cone 30 135) ---- [30](!TemplateGenerator Cone 30 90) ---- [30](!TemplateGenerator Cone 30 45)----
--------[15](!TemplateGenerator Cone 15 135) [15](!TemplateGenerator Cone 15 90) [15](!TemplateGenerator Cone 15 45)---------
@palikhov
palikhov / DiceSetup.js
Created January 8, 2020 12:18 — forked from Bastlifa/DiceSetup.js
Dice Macro Setup for roll20: buttons make for faster rolling.
on("ready", function()
{
on("chat:message", function (msg)
{
if (msg.type === "api" && msg.content === "!DiceMacroSetup")
{
if (playerIsGM(msg.playerid))
{
if (!findObjs({_type: 'macro', _playerid: msg.playerid, name: 'd2'})[0])
{