#how do i DM you, disc wont open a chat

1 messages · Page 1 of 1 (latest)

runic arrow
#

I'm just gonna start a thread here, in case this ends up being non-trivial

runic arrow
#

Run that script with "Xvart Warlock (Nezzmir)" as the name, in case you didn't already

slim wadi
#

i did

runic arrow
#

Full name, not just "Nezzmir"?

slim wadi
#

yup

runic arrow
#

Weird - it works for me when I do that

slim wadi
#

Xvart Warlock (Nezzmir)

runic arrow
#
const actor = game.actors.getName("Xvart Warlock (Nezzmir)");
for (const item of actor.items) {
  const casts = item.system.activities?.getByType("cast") ?? [];
  for (const cast of casts) {
    const spell = cast.cachedSpell ?? fromUuidSync(cast.spell.uuid);
    if (!spell) await cast.delete();
  }
}
slim wadi
#

it lets you open the sheet?

runic arrow
#

Yeah

slim wadi
#

hm

#

lemme try again

#

shit, i gotta get ready for work. I'll give this a go later and let you know

#

thanks for the help

slim wadi
runic arrow
#

Hm alright, last ditch, I'll export the version I have that seems to be working and send it over

slim wadi
#

what version of 5e are you running

runic arrow
#

4.3.4

slim wadi
#

aright, I'll give it a whirl after work

#

thanks again

#

if that doesn't work, I'm just going to chalk it up to mysterious migration issues. the NPC is dead anyway, i was just trying to look at what loot i left on it

runic arrow
#

Yeah I think it should work