Skip to content

Instantly share code, notes, and snippets.

Avatar

Lucian H symposion

  • Symposion
  • Spain
View GitHub Profile
View testscript.js
//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() {
@symposion
symposion / roll20.js
Created Apr 6, 2016
Simple attribute removal code
View roll20.js
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));
@symposion
symposion / README
Created Oct 15, 2011 — forked from cyberfox/keychain.rb
Convert OS X Keychain exported entries into logins for 1Password import
View README
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
You can’t perform that action at this time.