IF
SpellCast(Player1,WIZARD_PROTECTION_FROM_EVIL)
Class(Player1,MAGE_ALL)
THEN
RESPONSE #100
ActionOverride(Player1,ApplySpellRES("P5#TEST",Myself))
END
IF
SpellCast([ANYONE],WIZARD_PROTECTION_FROM_EVIL)
!SpellCast(Player1,WIZARD_PROTECTION_FROM_EVIL)
THEN
RESPONSE #100
DisplayStringNoName(Player1,8538)
ENDIF
Global("WTPFAMA1","GLOBAL",0)
Class(Player1,LONG_BOW)
SpellCast(Player1,WIZARD_FIND_FAMILAR)
THEN
RESPONSE #100
SetGlobal("WTPFAMA1","GLOBAL",1)
END
IF
Global("WTPFAMA1","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("WTPFAMA1","GLOBAL",2)
ActionOverride(Player1,ApplySpellRES("WTPFAMA1",Myself)) ENDQuote from: Rabain on March 09, 2007, 10:55:28 AMI have 2 problems now...not too big thanks to your recommendations:
1. If I don't include the global in MY_SPELL nothing happens when Player1 casts MY_SPELL which is strange considering the script block I used from your post above should set it to 1 if it is 0.
IF
Global("WTPFAMA1","GLOBAL",0)
Class(Player1,LONG_BOW)
SpellCast(Player1,MY_SPELL)
THEN
RESPONSE #100
SetGlobal("WTPFAMA1","GLOBAL",1)
END
IF
Global("WTPFAMA1","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("WTPFAMA1","GLOBAL",2)
ActionOverride(Player1,ApplySpellRES("WTPFAMA1",Myself))
END
IF
Global("WTPFAMA1","GLOBAL",1)
Class(Player1,LONG_BOW)
SpellCast(Player1,MY_SPELL)
THEN
RESPONSE #100
ActionOverride(Player1,ApplySpellRES("WTPFAMA1",Myself))
SetGlobal("WTPFAMA1","GLOBAL",2)
END
IF
Class(Player1,MAGE_ALL)
SpellCast(Player1,Spell1) // You need to have spell1 in your spell.ids
RESPONSE #100
ActionOverride(Player1,ReallyForceSpellRES("MyPConlyspell",Myself)) //
END
IF
SpellCast(Player2,Spell1)
RESPONSE #100
ActionOverride(Player2,DisplayeString(Myself,~Only the protagonist can cast this spell~)) //
END
IF
SpellCast(Player3,Spell1)
RESPONSE #100
ActionOverride(Player2,DisplayeString(Myself,~Only the protagonist can cast this spell~)) //
END
IF
SpellCast(Player4,Spell1)
RESPONSE #100
ActionOverride(Player2,DisplayeString(Myself,~Only the protagonist can cast this spell~)) //
END
IF
SpellCast(Player5,Spell1)
RESPONSE #100
ActionOverride(Player2,DisplayeString(Myself,~Only the protagonist can cast this spell~)) //
END
IF
SpellCast(Player6,Spell1)
RESPONSE #100
ActionOverride(Player2,DisplayeString(Myself,~Only the protagonist can cast this spell~)) //
END
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