Author Topic: Help with Removing Modify Attacks..  (Read 1017 times)

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Help with Removing Modify Attacks..
« on: August 09, 2010, 05:53:35 pm »


               I need to know if anyone knows how to remove the Effect...

eEffect = EffectModifyAttacks(1);

From the PC once it has been applied...

The only solution I could find was to set it like so...

eEffect = SupernaturalEffect(eEffect);

And then to remove it by checking the subtype of the effect, and if it was Supernatural Remove it...

However, I need to know if there is a more effective way to remove the effect (Modify Attacks) from the PC.. properly..

Anyone?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #1 on: August 09, 2010, 07:30:33 pm »


               Two ways, first is to make new spell and tell some system creature to cast it, that way the effect will have spellID set and you will be able to remove it via that.



Second way using system creature too - effect creator, give it tag like EC_MODIFYATTACK. Tell this creture to apply the modify effect and then check of tag of effect creator == "EC_MODIFYATTACK"
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #2 on: August 10, 2010, 12:42:36 pm »


               I just applied it as a supernatural effect, then removed all supernatural effects upon unequip, works fine, but it will cause problems with other supernatural effects not applied via this script.  :/
               
               

               
            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #3 on: August 10, 2010, 06:42:45 pm »


               The best method, as ShaDoOoW suggested, is to have an object apply the effect then just use GetEffectCreator() to check for the specific effect. I use a series of invisible objects to apply various effects on my server so I only remove the effect(s) I want.



-420
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #4 on: August 11, 2010, 05:58:58 pm »


               Anyway you guys can give me a template script for this?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #5 on: August 11, 2010, 06:23:57 pm »


               example to add the effect:

if(GetHasFeat(FEAT_NINJA_GHOST_SIGHT,oPC))
 {
 AssignCommand(GetObjectByTag("EC_NINJA"),ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectSeeInvisible()),oPC));
 }

example to remove the effect:

effect e = GetFirstEffect(oPC);
string sTag;
 while(GetIsEffectValid(e))
 {
 sTag = GetTag(GetEffectCreator(e)) ;
  if(sTag  == "EC_NINJA")
  {
  RemoveEffect(oPC,e);
  }
 e = GetNextEffect(oPC);
 }


               
               

               


                     Modifié par ShaDoOoW, 11 août 2010 - 05:24 .
                     
                  


            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #6 on: August 11, 2010, 11:24:14 pm »


               That's a bizarre concept for me, I'll assume I need to create this ninja some how, and probably use a waypoint as a reference point, eg.



oWay = GetWaypointByTag("ninja_way");

oNinja = GetNearestObjectByTag("EC_NINJA", oWay);



I'll assume it's best to create and destroy this ninja, and not just leave him laying around?

Does the ninja have to be a creature?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #7 on: August 12, 2010, 12:17:40 am »


               I don't know, I think that waypoint can't cast spells, but placeable can.

You don't need waypoint just creature or placeable (but if it won't work don't blame me) in special system area. For example my EC_NINJA is actually lvl 1 immortal/plot chicken without any scripts.
               
               

               


                     Modifié par ShaDoOoW, 11 août 2010 - 11:18 .
                     
                  


            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #8 on: August 12, 2010, 12:37:49 am »


               

I'll assume it's best to create and destroy this ninja, and not just leave him laying around?

No reason not to. Just put it in a 2x2 microset area with no area transitions.

Does the ninja have to be a creature?

Like I said, I use Invisible Object placeables.

-420
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #9 on: August 12, 2010, 02:56:21 am »


               

420 wrote...

Like I said, I use Invisible Object placeables.

kk now when its clear, using placeable is much better than creature
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #10 on: August 12, 2010, 03:29:03 pm »


               Ok, thanks for the response guys, I'll use a placeable object then.. (invisbile seems good)



The waypoint is so I don't have to use the GetObjectByTag Function, which cycles through the whole module to find the object, (not good).



thanks a lot for the help guys...  I'll test this today. '<img'>
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #11 on: August 12, 2010, 04:24:47 pm »


               If you care about GetObjectByTag, save the invisible placeable to module when OnModuleLoad and you are fine:

object EC_MODIFYATTACK = GetObjecByTag("EC_MODIFYATTACK");

SetLocalObject(OBJECT_SELF,"EC_MODIFYATTACK",EC_MODIFYATTACK);


               
               

               
            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #12 on: August 12, 2010, 06:09:03 pm »


               Invisible Objects are also good for applying "environmental" damage effects. Just rename the placeable "Lightning" or "Falling Rocks" or "Swinging Blades" and then have it do damage to the PC. The feedback will look something like: "Lightning does 6 electrical damage to you." or "Falling Rocks does 10 bludgeoning damage to you."



-420
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #13 on: August 13, 2010, 04:36:47 pm »


               Thanks for the Tip Guys XD
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Help with Removing Modify Attacks..
« Reply #14 on: April 29, 2013, 11:23:12 pm »


               After so long, I actually tested this today....

It DOES NOT Remove the effect, also I've quadruple checked my scripts and items....

In the next post is the script I used...  (Any Help?)
               
               

               


                     Modifié par _Guile, 29 avril 2013 - 10:26 .