This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To test, just add the script and the sheet to any blank game, then create a new blank Character in the game, then do any chat message. | |
//Expected behavior: | |
// "Found webworker script" | |
// "API Ready." | |
// "Hello from sheetworker" | |
// "Creating baseattribute..." | |
// "Base attribute heard change" | |
// "Created attribute heard change" | |
on("chat:message", function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var monsterData = { name:'Lich', AC:'20', HP:'99', alignment:'lawful evil', type:'undead', size:'Medium', challenge: '20' }; | |
on('chat:message', function(msg) { | |
if(msg.content === '!api-test') { | |
var characterId = getObj('graphic', msg.selected[0]._id).get('represents'); | |
var character = getObj('character', characterId); | |
var oldAttrs = findObjs({type: 'attribute', characterid: characterId}); | |
_.invoke(oldAttrs, 'remove'); | |
character.set('name', monsterData.name); | |
setAttrByName(characterId, 'import_data', JSON.stringify(monsterData)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |