Jump to content

On Identifiers


kreso

Recommended Posts

0x8014202D STATE_OUT_OF_ACTION
Feeblemind & Charmed & Helpless & Stunned & Sleeping & Blind & Confused & Panic

 

 

Does this state return true if a creature has either of these effects on themselves or it returns true only if they all affect the creature?

Link to comment

This won't be neccecary. Apperantly, SCS already uses APPEND:

APPEND ~STATE.IDS~ ~0x8010202D STATE_DISABLED~
UNLESS ~0x8010202D STATE_DISABLED~ /// includes Helpless, Stunned, Panic, Sleeping, Charmed, Feebleminded, Confused
This should work great I think...
IESDP has no info on DISABLED state however.
Link to comment

 

IESDP has no info on DISABLED state however.

 

Because it's a custom value. You look at the basic states you want to be checked and add values together. Say, you want to detect if target's movement rate has been affected by a spell:

 

0x00008000 STATE_HASTED
0x00010000 STATE_SLOWED
Which translates to:
OR(2)
StateCheck(Myself,STATE_HASTED)
StateCheck(Myself,STATE_SLOWED)

But you can't be bothered with that double OR(), so you go to state.ids, add together both states' values and give it a custom name:

0x00018000 KRESO_STATE_SPEED_CHANGE
And now you can simplify your script to:
StateCheck(Myself,KRESO_STATE_SPEED_CHANGE)

Which will work fine even if somebody already added the 0x00018000 value under different name.

 

 

One more question - does CHARM effect change Allegiance? I.e. is ENEMY turned into ALLY and viceversa if charmed?

 

 

Use GOODCUTOFF / EVILCUTOFF if you want to match both ALLY / ENEMY and corresponding charm.

Link to comment

Aha, so these custom states are nothing but several states' value sumed up. Great. This means I can make my own (with whatever I want) and APPEND it to .ids table! Fantastic, thanks.

 

 

 

 

One more question - does CHARM effect change Allegiance? I.e. is ENEMY turned into ALLY and viceversa if charmed?

 

 

Use GOODCUTOFF / EVILCUTOFF if you want to match both ALLY / ENEMY and corresponding charm.

 

I'm not sure I understand.

Here's an example:

 

StateCheck(LastSeenBy(Myself),STATE_CHARMED)
Allegiance(LastSeenBy(Myself),ENEMY)
THEN
RESPONSE #100
SetGlobalTimer("castspell","LOCALS",ONE_ROUND)
Spell(LastSeenBy(Myself),CLERIC_REMOVE_CURSE) // SPPR307.SPL (Break Enchantment)

 

From your post above

Allegiance(LastSeenBy(Myself),ENEMY) should be changed?

Link to comment
Use
StateCheck(LastSeenBy(Myself),STATE_CHARMED)
Allegiance(LastSeenBy(Myself),EVILCUTOFF)
THEN
RESPONSE #100
SetGlobalTimer("castspell","LOCALS",ONE_ROUND)
Spell(LastSeenBy(Myself),CLERIC_REMOVE_CURSE) // SPPR307.SPL (Break Enchantment)

 

Note that NearestEnemyOf() automatically return the script owner's relative enemy (EVILCUTOFF for allied, GOODCUTOFF for hostile).

Link to comment

I ran into an issue with this; and I wonder if it can be fixed. Now, the above works fine in combat and is very cute when you see it.

The problem is in what happens when a member of your party gets charmed (red-circled). Clerics will cast Break Enchantment on him, curing him of charm which is a *very* stupid thing to do. Is it possible to exclude casting this (or anything else like Heal) on charmed party members?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...