Author Topic: Polymorph questions/concerns.  (Read 327 times)

Legacy_Loathesome Pickle

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Polymorph questions/concerns.
« on: April 18, 2011, 02:17:40 pm »


               Hey everyone,

 I've been a long time lurker around here picking up the art of scripting however in working on my persistent world, I've come into something I can't really find an answer for or if I have maybe I've missed it among many 3 am searches >.>;

 I want to make it so that when a PC enters a certain area in my module he's polymorphed into a different form with stats that reflect an item he has on him (this would be done by variables and is fairly straight forward) however my major concern is that if the PC crashes, logs out or the host crashes they'll be stuck that way. The stats of the polymorphed form would be significantly lower than their normal stats, obviously.

 My first thought is to set up another script as an onclient enter that checks the PC for a variable (say Polymorphed) and if its true resets their stats, but how would I do this? I was thinking maybe give the PC an item that keeps track of their stats and would just set it back to their values on enter but that seems kind of cheesy if there's a simpler way to do it.

 Also, I've read a few places that variables on a PC don't carry over between logins/resets. Is this true? if so, to keep a log of variables I'd need to give the PC a character token of some sort, wouldn't I?

Any help would be greatly appriciated, thanks!
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Polymorph questions/concerns.
« Reply #1 on: April 18, 2011, 02:53:48 pm »


               

Loathesome Pickle wrote...

Also, I've read a few places that variables on a PC don't carry over between logins/resets. Is this true? if so, to keep a log of variables I'd need to give the PC a character token of some sort, wouldn't I?

Any help would be greatly appriciated, thanks!

Of course it is true, we dont mystify there '<img'>.

And yes you must add a undroppable item to your PC and then you can store variables on this item as variables on items in PC inventory carry over resets.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Polymorph questions/concerns.
« Reply #2 on: April 18, 2011, 03:14:28 pm »


               If it's actually a polymorph effect, I think it would be removed if there was a server crash/reset (like local variables on the PC, I've yet to see any effects carry over through a server reset).

As far as gettting variations on stats through polymorphing you have a couple options:

a) use EffectLinkEffects() to link the EffectPolymorph and EffectAbilityIncrease effects

'B)' add multiple versions of the intended form to polymorph.2da, with the different stats, then have the script read the variables and pick the right one (you can just use the line numbers from the 2da without having to worry about making POLYMORPH_TYPE_* constants)..
               
               

               


                     Modifié par The Amethyst Dragon, 18 avril 2011 - 02:15 .
                     
                  


            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Polymorph questions/concerns.
« Reply #3 on: April 18, 2011, 08:23:36 pm »


               The X3_SKIN_ (inc?)  script will allow you to store variables on the PC's skin...

I forget the name of the script but they made that script specifically for people on PWs. =D

I'd use that to store variables which would be persistent I believe...
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Polymorph questions/concerns.
« Reply #4 on: April 18, 2011, 09:44:04 pm »


               Well skin is good as its not visible however if the server has ILR/ELC on it will delete any skin that character got in his creature armor slot when he join the server...