The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

> Protagonist Spell Only
Rabain
post Mar 8 2007, 04:56 PM
Post #1


GOD


Retired team member
Posts: 1728
Joined: 14-July 04
From: Ireland




I want to create a spell that only the protagonist can cast. If anyone else tries to cast it they will get a message.

So far I have tried casting a spell that sets a global. In a script if have the following:

CODE
IF
    Global("PConly","GLOBAL",1)
    Class(Player1,MAGE_ALL)
    IsActive(Player1)
THEN
    RESPONSE #100
        ActionOverride(Player1,ForceSpellRES("MyPConlyspell",Myself))         ActionOverride(Player1,DisplayStringHead(Myself,8538))
        SetGlobal("PConly","GLOBAL",2)
END


Ignore the DisplayStringHead..thats just for testing.

What is happening is that even if someone else in the party casts the first spell my Player1 starts casting "MyPConlySpell"

I can't seem to find a valid script command that specifies PC only.

I will also need a command that will work if someone not the PC casts the spell. I can use this in a second script block.
Go to the top of the page
 
Quote Post
 
Start new topic
Replies
Sikret
post Mar 8 2007, 08:35 PM
Post #2


The Tactician
Group Icon

Distinguished Developer
Posts: 7794
Joined: 1-December 05




You are welcome.

With ForceSpellRES you will have the spell casting animations two times: Once for spell1 (which does nothing) and once for Spell2 (if you set the casting time of spell1 to zero, you will not have casting animation for it but you will still read the message of a spell being cast once for spell1 and once for spell2). So, I recommend to set the casting time of the spell for spell1 and use ApplyspellRes for spell2 if its effects don't depend on the caster's level of experience. (One of the differences between ApplySpell and ReallyForceSpell which is not known to many is that ApplySpell doesn't respect the caster's level of experience and always applies the spell with the minimum duration and damage amount as if it is cast by a first level caster; the other differences which are relevant in this case are that with ApplyspellRES you will not see any casting animation, any casting finishing sound and any message on the screen saying that a spell is cast).

This post has been edited by Sikret: Mar 8 2007, 08:46 PM


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post

Posts in this topic


Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 2nd November 2025 - 07:02 PM