SphereCommunity
Polymorph - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Polymorph (/Thread-Polymorph)



Polymorph - Kapa - 11-01-2014 05:24 PM

Hi,
Do i need a custom polymorph scp to enable players keep their armor and get bigger stats after polymorphing in to daemon?


RE: Polymorph - Coruja - 11-05-2014 09:39 AM

polymorph doesn't change the char status anymore because that's the correct behavior for this spell
but if you want back the status chance behavior, you can play with @Success on polymorph spell to create a fully scripted behavior

Code:
[Spell 56]
DEFNAME=s_polymorph
...

ON=@Success
IF (<ACTARG2> == c_daemon)
  TIMERF 1,PolymorphChangeStatus 100,50,30  //if polymorph into a daemon, add +100 str / +50 dex / +30 int
ELIF (<ACTARG2> == c_gorilla)
  TIMERF 1,PolymorphChangeStatus 20,0,0  //or just add +20 str if polymorph into a gorilla
ENDIF

[FUNCTION PolymorphChangeStatus]
REF1=<FINDID.<SERV.SPELL.s_polymorph.RUNE_ITEM>>
IF (<REF1>)
  REF1.TAG.ModStr=<ARGV0>
  REF1.TAG.ModDex=<ARGV1>
  REF1.TAG.ModInt=<ARGV2>
  REF1.EVENTS +e_polymorph_effect
  REF1.TRIGGER @Equip
ENDIF

[EVENTS e_polymorph_effect]
ON=@Equip
SRC.MODSTR += <TAG0.ModStr>
SRC.MODDEX += <TAG0.ModDex>
SRC.MODINT += <TAG0.ModInt>

ON=@Unequip
SRC.MODSTR -= <TAG0.ModStr>
SRC.MODDEX -= <TAG0.ModDex>
SRC.MODINT -= <TAG0.ModInt>
I made this script in just a minute and doesn't tested it, but maybe it works

this code will store a tag on the polymortp memory item to track STR / DEX / INT changes, so it will rise these values, and decrease it when the memory item got removed


RE: Polymorph - Kapa - 11-05-2014 11:42 PM

thanks Smile


RE: Polymorph - Van Glan Bloom - 07-01-2016 10:38 PM

Hi guys,

I was thinking about making some changes in my spell of polymorph, such as user Kapa. I want the player gain some stats according to the transformation the player choose.

I have tested the script make by Coruja, but dont work. I have make some changes, but i fail all the time.
Some one can help me?!


RE: Polymorph - XuN - 07-16-2016 08:01 PM

(11-01-2014 05:24 PM)Kapa Wrote:  Hi,
Do i need a custom polymorph scp to enable players keep their armor and get bigger stats after polymorphing in to daemon?

// MAGICF_POLYMORPHSTATS 00800 // Polymorph spells give out stats based on base chars (old behaviour backwards).


(07-01-2016 10:38 PM)Van Glan Bloom Wrote:  Hi guys,

I was thinking about making some changes in my spell of polymorph, such as user Kapa. I want the player gain some stats according to the transformation the player choose.

I have tested the script make by Coruja, but dont work. I have make some changes, but i fail all the time.
Some one can help me?!

Code:
Added character trigger @EffectAdd: This will be called when any type of effect memory is being added, like stat changes for s_bless, s_cunning... s_weaken ...
    Argo = memory item
    argn1 = spellid
returns:
    return 0: Let default checks to happen.
    return 1: Blocks any action and stops everything, also deletes the memory (Blocking any changes, this will cause also the effect to do not have duration)
    return 2: Let the memory exist but block default checks, perfect to override default effects and do some custom stuff.
To simulate something like '@EffectEnd' just apply an event with @Timer to the memory since the 'default changes' are happening after @UnEquip and, at this point, the item must be removed in any case... so preventing this must be done before (@Timer fits perfectly).

[code]
ON=@EffectAdd
more1l = str bonus
more1h = dex bonus
[code]
This will make sphere handle these stats automatically, if you want other ones you will have to script it.


RE: Polymorph - Russian - 02-15-2018 04:56 AM

I was trying code of Coruja.
But in does not help me.
Sphere 0.56.2.0

I need for, polymorph does not changed stats of player.
Does not knowhow to use this:
MORE1L = The polymorph effect on STR
MORE1H = The polymorph effect on DEX

Not help:
ON=@EffectAdd
more1l = str bonus
more1h = dex bonus