Player Resource Consortium

 

Author Topic: Shifter PNP and item spells  (Read 295 times)

0 Members and 1 Guest are viewing this topic.

March 23, 2017, 02:38:00 AM
  • Adept
  • *
  • Posts: 24
  • Karma: +0/-0
  • New Member
    • View Profile

OK, If i have an item that casts a spell on use and I am in a shifted form that does not allow vocal spells w/o natural spell then the the spell fails.  I can KIND of understand this. 

But, I wanted an item i could use even when shifted.  So i created my MK II trap finder and instead of on use cast spell find traps i have it call this THIS script  <snip>
    object me=GetItemActivated();
    int sp=SPELL_FIND_TRAPS;
    DelayCommand(1.0f,ActionCastSpellAtObject(sp,me, METAMAGIC_NONE,TRUE,PROJECTILE_PATH_TYPE_DEFAULT,0,TRUE));

Note that the object casting the spell is the item, NOT the player. And it has both flags set for allowing spell even if not known, and instant cast.  Yet it STILL generates the message that spell can be cast because of the form I am in  :( 

Any ideas?  Am I going to have to make a script that actually summons something that can talk and have THAT cast the spell?  Would be kinda cute, but a little more work than I want.

Thanks in advance,
Cozmo


EDIT:I was kinda being sarcastic above about summoning in a NPC to cast the spell... it DOES work.. Still, this is NOT what I want to have to use:
    object pc=GetFirstPC();
    location loc=GetLocation(pc);
    object foobar;
    foobar=CreateObject(OBJECT_TYPE_CREATURE,"NW_HALFLING001",loc,FALSE,"");
    int sp=SPELL_FIND_TRAPS;
    AssignCommand(foobar,ActionCastSpellAtObject(sp,foobar, METAMAGIC_NONE,TRUE,PROJECTILE_PATH_TYPE_DEFAULT,0,TRUE));
    DestroyObject(foobar,5.0f);
« Last Edit: March 23, 2017, 03:25:32 AM by cozmo »


March 23, 2017, 12:21:04 PM
Reply #1
  • Developer
  • *****
  • Posts: 1437
  • Karma: +27/-0
  • Gender: Male
    • View Profile

The code responsible for this is located in spellhook (as you can see potions and 'on hit cast spell' are not restricted). I am no PnP expert. That's how it has been coded. If there are rules in PnP saying that magical items can be used without verbal or somatic component I will change that.
       
Code: [Select]
if(GetIsObjectValid(oSpellCastItem))
        {
            // Potion drinking is not restricted
            if(GetBaseItemType(oSpellCastItem) == BASE_ITEM_ENCHANTED_POTION
            || GetBaseItemType(oSpellCastItem) == BASE_ITEM_POTIONS)
                return TRUE;

            //OnHit properties on equipped items not restricted
            int nSlot;
            for(nSlot = 0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
            {
                if(GetItemInSlot(nSlot, oCaster) == oSpellCastItem)
                    return TRUE;
            }
        }


March 23, 2017, 01:31:10 PM
Reply #2
  • Adept
  • *
  • Posts: 24
  • Karma: +0/-0
  • New Member
    • View Profile

I'm not familiar with the pnp rules that the class is based on.  So not sure if it is a valid 'complaint' or not  ;) Just seems odd.  I also noticed that being a pixie I cant use any of her racial natural spells don't work either, such as her invisibiity or tangle or such when she is shape shifted.


March 23, 2017, 03:44:49 PM
Reply #3
  • Adept
  • *
  • Posts: 24
  • Karma: +0/-0
  • New Member
    • View Profile

Oh and BTW, nice to know somebody actually reads and responds to these forums  :D

And yeah, I found that code , I'm just not sure if it is actually a part of the rules or something that was overlooked.  I haven't played PnP in AGES.  FFS, I gave away my old D&D books to a friend's kids years ago.  And IIRC it was the 2nd edition.  Was no Shifter or Warlock classes.  Heck, I don't even think it had druid. Think all there was was Fighter,Wizard,Cleric and Rogue. 

But damn, the monster Manual (hardcover) was soo cool.  Loved some of the illustrations.