Objects casting personal only spells on players.

For builders to discuss and ask building questions.
Post Reply
User avatar
Duranamir
Sword Grand Master
Sword Grand Master
Posts: 740
Joined: Thu Nov 27, 2003 11:58 am
Location: Skull port

Objects casting personal only spells on players.

Post by Duranamir » Mon Mar 16, 2009 1:17 pm

I may be being stupid here, but how does an object cast a non targetted personal spell on its wielder. ?

For example Bulls strength is currently personal only, how would an item cast it on someone when an appropriate prog is triggered ?

Duranamir
User avatar
Moloch
Sword Grand Master
Sword Grand Master
Posts: 799
Joined: Thu Jan 04, 2007 12:17 am
Location: Westgate
Contact:

Re: Objects casting personal only spells on players.

Post by Moloch » Mon Mar 16, 2009 3:16 pm

I don't believe that bull's strength is a personal affecting spell..
"My pain is constant and sharp, and I do not hope for a better world. In fact, I want my pain to be inflicted on others. I want no one to survive."
User avatar
Duranamir
Sword Grand Master
Sword Grand Master
Posts: 740
Joined: Thu Nov 27, 2003 11:58 am
Location: Skull port

Re: Objects casting personal only spells on players.

Post by Duranamir » Mon Mar 16, 2009 8:47 pm

Ok, as pointed out bad example.... example is now Shield :)

Duranamir
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Re: Objects casting personal only spells on players.

Post by Japcil » Tue Mar 17, 2009 7:44 am

Code: Select all

if objisworn($o)
cast shield $n
endif
Now just decide if you want an intercept prog on a command like protect or perhaps you want it in a time prog to go off at a certain time of day.
Image
User avatar
Duranamir
Sword Grand Master
Sword Grand Master
Posts: 740
Joined: Thu Nov 27, 2003 11:58 am
Location: Skull port

Re: Objects casting personal only spells on players.

Post by Duranamir » Tue Mar 17, 2009 1:58 pm

I have now got the code working with shield, however i have encoutered what i think is a bug when using 'Arcane eye' in the same way. The intention is to have a crystal ball type object, however when the object trys to cast 'arcane eye' it appears to crash the test port, at least for a little bit.

Any ideas ?

Duranamir
User avatar
Moloch
Sword Grand Master
Sword Grand Master
Posts: 799
Joined: Thu Jan 04, 2007 12:17 am
Location: Westgate
Contact:

Re: Objects casting personal only spells on players.

Post by Moloch » Tue Mar 17, 2009 3:04 pm

It may be impossible to have an item cast that spell, but perhaps you could have it grant a skill in the spell temporarily, while the ball is held? I'm certain one of the builders will come up with something, though.
"My pain is constant and sharp, and I do not hope for a better world. In fact, I want my pain to be inflicted on others. I want no one to survive."
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

Re: Objects casting personal only spells on players.

Post by Kelemvor » Tue Mar 17, 2009 4:29 pm

Spells which require a location target other than $n or which employ code that creates an effect other than modifying stats don't work well on objects.

Generally, you would code an object to apply an effect rather than cast a spell - or have it only cast a spell which is personal or non-target based.
...never send to know for whom the bell tolls,
it tolls for thee.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Re: Objects casting personal only spells on players.

Post by Dalvyn » Thu Mar 26, 2009 8:16 am

I doubt you could make an object that can cast "arcane eye", since it's actually a very special spell that creates a mob and lets the PC "go into" that mob.

For most spells with personnal range, the supermob (the special mobs that runs all object programs) can cast them on other people. That's why you can have an object "(mp)cast shield $n" for example. But I'd guess it doesn't work for arcane eye.

That being said, I'm not sure that arcane eye is a spell we want to put on an object. I'd rather keep it as a perk for wizards who know it.
Image
User avatar
Duranamir
Sword Grand Master
Sword Grand Master
Posts: 740
Joined: Thu Nov 27, 2003 11:58 am
Location: Skull port

Re: Objects casting personal only spells on players.

Post by Duranamir » Thu Mar 26, 2009 9:14 am

Changed the spell, no longer using "arcane eye" as it was getting to complicated to try anf work out how to use it.

For future reference is granting the spell to a character (Moloch's suggestion) even possible ?

Duranamir
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Re: Objects casting personal only spells on players.

Post by Dalvyn » Thu Mar 26, 2009 4:39 pm

I don't think it is.

We used to be able to do so, but this was made impossible through a hard-code change because people would get an item that would give them an out-of-guild skill then proceed to train it up and thus keep it (the skill) when they get rid of the object.
Image
Post Reply