Jump to content


Photo

Script Won't Work

script spell

  • Please log in to reply
4 replies to this topic

#1 rapsam2003

rapsam2003
  • Member
  • 15 posts

Posted 03 April 2016 - 10:03 PM

I am trying to use a script to fire off a spell that changes humans to tieflings. The spell itself is working, I think. But it's almost as if the script isn't even firing.

IF
  AreaCheck("AR2600")
  XPLT(Player1,2000)
  Race(Player1,Human)
THEN
  RESPONSE #100
    ReallyForceSpellRES("spinzr01",LastSummonerOf(Player1))
    DestroySelf()
END

 

 

Basically, when the character is level 1 and is a human and is in Candlekeep, I want the script to fire. And I want the character to be "remade" as a tiefling by firing off that spell.


Edited by rapsam2003, 03 April 2016 - 10:24 PM.


#2 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 03 April 2016 - 10:38 PM

I am trying to use a script to fire off a spell that changes humans to tieflings. The spell itself is working, I think. But it's almost as if the script isn't even firing.
IF
  AreaCheck("AR2600")
  XPLT(Player1,2000)
  Race(Player1,Human)
THEN
  RESPONSE #100
    ReallyForceSpellRES("spinzr01",LastSummonerOf(Player1))
    DestroySelf()
END

 

 

Basically, when the character is level 1 and is a human and is in Candlekeep, I want the script to fire. And I want the character to be "remade" as a tiefling by firing off that spell.

Who is executing the script? Invisible creature? Area script? Who checks he is in ar2600 and who destroys self?

To do it in ar2600.bcs you can

IF
  Global("checktief","ar2600",0)
  XPLT(Player1,2000)
  Race(Player1,Human)
THEN
  RESPONSE #100
    SetGlobal("checktief","ar2600",1)    
    ActionOverride(Player1,ReallyForceSpellRES("spinzr01",Myself))
    Continue()
END
   

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#3 rapsam2003

rapsam2003
  • Member
  • 15 posts

Posted 04 April 2016 - 06:57 AM

I guess I wasn't quite sure how to activate it. The Scripting Guide I used wasn't very clear on that. It told me a lot about how to write scripts, but not how to get them running.

 

Anyway, when I get home tonight, I will try what you suggest. Thanks!


Edited by rapsam2003, 04 April 2016 - 10:22 AM.


#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 04 April 2016 - 08:27 AM

ActionOverride(Player1,AddSpecialAbility("spinzr01"))
 
Would that work? 

Should yeah. Of course you need to remember to set the spell to be placed in innate abilities, in both the spells: header spelltype(offset 0x1c) and all the extended headers location(0x2)s.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 rapsam2003

rapsam2003
  • Member
  • 15 posts

Posted 04 April 2016 - 10:24 AM

ActionOverride(Player1,AddSpecialAbility("spinzr01"))
 
Would that work? 

Should yeah. Of course you need to remember to set the spell to be placed in innate abilities, in both the spells: header spelltype(offset 0x1c) and all the extended headers location(0x2)s.

Oops, you got me before my edit. Anyway, thanks for confirming that. I think it is marked innate in both headers. Will verify tonight.


Edited by rapsam2003, 04 April 2016 - 10:24 AM.






Also tagged with one or more of these keywords: script, spell