Difference between revisions of "GetSpellId"

From NWN Lexicon
Jump to: navigation, search
(chenyingying20171010)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
chenyingying20171010
+
{{DISPLAYTITLE:GetSpellId()}}__NOTOC__
http://www.mulberrybagsuk.me.uk
+
Determines the spell identifier for a spell which a script is currently processing.
http://www.coachoutlet-online.eu.com
+
<nwscript>
http://www.coach-canadaoutlet.ca
+
int GetSpellId();
http://www.katespadeoutletsale.us.com
+
</nwscript>
http://www.ralphlaurenoutletofficial.us.com
+
 
http://www.longchampsacsoldes.fr
+
====Description====
http://www.katespadehandbagssale.us.com
+
 
http://www.uggfed.com
+
Returns the ID (SPELL_*) of the spell that the [[Spell Script]] is processing.
http://www.jordanshoes.us.org
+
 
http://www.poloralph--lauren.us.com
+
Multiple spells share the same script that is used to resolve the effect of the spell for code reuse but the scrip is altered slightly by the specific spell that it is working processing.
http://www.michael--korshandbags.us.com
+
 
http://www.usboots.us.com
+
For example the Polymorph Self script (script name NW_S0_POLYSELF) is called by different spells determined by what monster they are polymorphing into.
http://www.burberryoutlet-canada.ca
+
 
http://www.katespadeoutletstore.us.org
+
 
http://www.canadagoose.com.co
+
====Remarks====
http://www.northfaceoutlet70off.us.com
+
 
http://www.louisvuittonoutlet.nom.co
+
Strictly used in scripts that resolve a spells or spell abilities effects, this function is used to check for what line in spells.2da called the given script. "Feat" spells, as run from feat.2da, also have a spells.2da line and the "spell ID" can help identify these.
http://www.air-jordanpascher.fr
+
 
http://www.thenorthfaceoutletjackets.us.com
+
On a side note to change the scripting of a spell one could modify the BioWare scripts for a spell or spell ability (eg. NW_S0_FLMSTRIKE for Flame Strike) and save that script within the module (or Hakpak).
http://www.nikehuarache.net
+
 
http://www.nikeairforce1.net
+
This should only be used inside spell scripts. If you want to learn how to use the new spellhooking system, check the advanced scripting tutorials in the Lexicon's Lyceum.
http://www.adidasstansmith.co.uk
+
 
http://www.jordans-fusion.com
+
Custom spells and spell-effects can be added; see [https://nwn.wiki/display/NWN1/spells.2da spells.2da] and [https://nwn.wiki/display/NWN1/Spells+and+Abilities spells and abilities] pages.
http://www.underarmouroutletclearance.com
+
 
http://www.adidasyeezy350boost.org.uk
+
 
http://www.nike-factoryoutlet.us.com
+
====Known Bugs====
http://www.northfaceoutletstore.us.org
+
 
http://www.tory-burchoutletonline.us.com
+
Returns -1 if called inside of AOE script, however it could return a proper ID since a workaround is to use [[GetEffectSpellId]]([[EffectDazed]]()).
http://www.uggboots-onsale.us
+
 
http://www.monclerjacketsuk.uk
+
 
http://www.mlbjerseys.org
+
====Version====
http://www.tommyhilfigercanada.ca
+
 
http://www.ray-bansunglassesoutlet.com.co
+
1.61
http://www.oakleysungalsses.nom.co
+
 
http://www.uggsaustraliaboots.us.com
+
====Example====
http://www.uggbootsoutletclearance.us.com
+
 
http://www.officialcoachfactoryoutletonline.us.com
+
<nwscript>
http://www.christianlouboutindown.com
+
//::///////////////////////////////////////////////
http://www.cheapmlbjerseysshop.us.com
+
//:: Polymorph Self
http://www.pandora-jewelry.me.uk
+
//:: NW_S0_PolySelf.nss
http://www.coachoutletfactoryon.com
+
//:: Copyright (c) 2001 Bioware Corp.
http://www.vibramfivefingers.in.net
+
//:://////////////////////////////////////////////
http://www.northfaceclearance.us.com
+
/*
http://www.vibramfivefingerssale.com
+
    The PC is able to changed their form to one of
http://www.truereligion-outletjeans.us.com
+
    several forms.
http://www.coachfactoryoutletonlinesale.us.com
+
*/
http://www.ugg-boots.name
+
//:://////////////////////////////////////////////
http://www.canadagoosesale.com.co
+
//:: Created By: Preston Watamaniuk
http://www.pandora-jewelry.name
+
//:: Created On: Jan 21, 2002
http://www.michaelkorsukoutlet.me.uk
+
//:://////////////////////////////////////////////
http://www.uggbootsaustralia.com.co
+
 
http://www.canadagoosecanada.name
+
void main()
http://www.uggoutlets.com.co
+
{
http://www.adidastore.co.uk
+
    //Declare major variables
http://www.oakleyssunglassescheap.com
+
    int nSpell = GetSpellId();
http://www.hollisterclothing.us.org
+
    object oTarget = GetSpellTargetObject();
http://www.calvinkleinstore.in.net
+
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
http://www.uggsboots.com.co
+
    effect ePoly;
http://www.michaelkors--outlet.us.org
+
    int nPoly;
http://www.uggaustraliastore.ca
+
    int nMetaMagic = GetMetaMagicFeat();
http://www.wholesale-nfljerseys.us.com
+
    int nDuration = GetCasterLevel(OBJECT_SELF);
http://www.outletcanadagoose.ca
+
    //Enter Metamagic conditions
http://www.clearancemichaelkorsoutlet.us.com
+
    if (nMetaMagic == METAMAGIC_EXTEND)
http://www.uggbootsoutletcanada.ca
+
    {
http://www.rayban-sunglassesonsale.us.com
+
    nDuration = nDuration *2; //Duration is +100%
http://www.uggoutlet70off.com.co
+
    }
http://www.airjordan-14.us
+
 
http://www.ray-banaviatorsunglasses.org.uk
+
    //Determine Polymorph subradial type
http://www.supremeclothing.us.com
+
    if(nSpell == 387)
http://www.cheap-uggboots.com.co
+
    {
http://www.uggslipperssale.us.com
+
        nPoly = POLYMORPH_TYPE_GIANT_SPIDER;
http://www.uggbootsforwomen.com.co
+
    }
http://www.mbt.us.com
+
    else if (nSpell == 388)
http://www.michaelkors-handbags.us
+
    {
http://www.timberlandoutlet.name
+
        nPoly = POLYMORPH_TYPE_TROLL;
http://www.ugg.org.uk
+
    }
http://www.michael-kors-outlet.eu.com
+
    else if (nSpell == 389)
http://www.uggbootsoutlets.org
+
    {
http://www.katespadehandbagsoutlet.us.org
+
        nPoly = POLYMORPH_TYPE_UMBER_HULK;
http://www.raybansunglassesoutlet.net.co
+
    }
http://www.canadagoosecanada.com.co
+
    else if (nSpell == 390)
http://www.poloralphlaurenoutletoff.us.com
+
    {
http://www.michaelkorsoutletoff.us.com
+
        nPoly = POLYMORPH_TYPE_PIXIE;
http://www.nikerosherunsale.co.uk
+
    }
http://www.nikenfljerseysfreeshipping.us
+
    else if (nSpell == 391)
http://www.adidasfootballboots.org.uk
+
    {
http://www.nikefactoryoutletstores.us.com
+
        nPoly = POLYMORPH_TYPE_ZOMBIE;
http://www.nike.me.uk
+
    }
http://www.pradabags.in.net
+
    ePoly = EffectPolymorph(nPoly);
http://www.wwwuggaustralia.co.uk
+
    //Fire cast spell at event for the specified target
http://www.giuseppe-zanotti.us.com
+
    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_POLYMORPH_SELF, FALSE));
http://www.christianlouboutin.name
+
 
http://www.cheapraybansunglasses.net.co
+
    //Apply the VFX impact and effects
http://www.uggslippers.us.org
+
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
http://www.coachwallets.us.com
+
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, oTarget, TurnsToSeconds(nDuration));
http://www.louisvuitonnoutlet.com
+
}
http://www.coachoutletonlineshopping.us.org
+
 
http://www.uggbootssale70off.org
+
 
http://armani.sunglassescheap.us.com
+
</nwscript>
http://www.burberryscarfsale.in.net
+
 
http://www.ukuggboots.co.uk
+
====See Also====
http://www.christianlouboutinoutletclearance.us.com
+
 
http://www.coachcom.us.com
+
{| class="seealso"
http://www.uggsaustralia.net.co
+
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
http://www.nikefootballbootsuk.org.uk
+
|
http://www.cheapralphlaurensale.co.uk
+
[[ GetLastSpell | GetLastSpell ]]
http://www.swarovski-jewelry.name
+
|-
http://www.montblancpenofficials.us.com
+
|-
http://www.salomon-shoes.in.net
+
| width="1px" align="right" valign="top" | <font color="gray">constants: </font>
http://www.coach-outlet.nom.co
+
|
http://www.burberry-outlet-stores.us.com
+
[[ Spell_(constant_group) | SPELL_* Constants  ]]
http://www.ralphlaurenoutlet-poloshirts.us.com
+
|}
http://cartier.sunglassescheap.us.com
+
 
http://www.uggaustraliaboots.in.net
+
<br />
http://www.michaelkorsuk.com.co
+
----
http://www.cheap-jordan-shoes.us.com
+
<font color="gray">  author: Tom Cassiotis, editor: Lilac Soul, additional contributor(s): Martin Sarrazac</font><br />  <br />
http://oakley.sunglassescheap.us.com
+
[[Category:Functions]]
http://www.michaelkors--outlet.us.com
+
[[Category:Spells_Functions]]
http://www.ralphlauren.eu.com
 
http://www.adidastrainersuk.uk
 
http://www.truereligionuk.org.uk
 
http://www.hollistercooutlet.us.com
 
http://www.usuggbootsoutlet.com
 
http://www.outletcoachfactoryonline.us.com
 
http://www.louis-vuitton.nom.co
 
http://www.converseshoesoutlet.us.com
 
http://www.nmdadidas.co.uk
 
http://www.ugg.com.co
 
http://www.coachonline.us.org
 
http://www.outletuggs.com.co
 
http://www.uggonsale.in.net
 
http://www.jordans.in.net
 
http://www.wholesale-nfl-jerseys.us
 
http://www.outletuggboots.com.co
 
http://www.soccerjersey.us.com
 
http://www.nikeairmax90s.co.uk
 
http://www.nfljerseysfromchina.us.com
 
http://www.coachhandbagsfactoryoutletonline.us.com
 
http://dolceandgabbana.sunglassescheap.us.com
 
http://www.uggsoutlet.org
 
http://www.thenorthfacecanada.ca
 
http://www.ugg.ind.in
 
http://www.katespadestoreoutlet.us.com
 
http://www.uggfactoryoutlet.com.co
 
http://www.uggbootsclearanceoutlet.com.co
 
http://www.uggbootsonsale70off.us.org
 
http://www.uggbootsonsale70off.net.co
 
http://www.snapbackshatswholesale.us.com
 
http://www.blackhawksjersey.com
 
http://www.replica-watches.us.com
 
http://www.cheapnhljerseysshop.us.com
 
http://www.thenorthfaceclearance.us.com
 
http://www.cheap-ugg-boots.us.org
 
http://www.uggsonclearance.com.co
 
http://www.truereligion-jeans.com.co
 
http://www.cheaprolexwatches.us.com
 
http://www.cheapnfljerseyswholesale.us.com
 
http://www.doudounecanada-goose.fr
 
http://www.adidastrainersuk.me.uk
 
http://www.poloshirt.in.net
 
http://www.uggbootsclearances.com.co
 
http://www.uggbootsclearance.net.co
 
http://www.michaelkorsuk.me.uk
 
http://www.northface-clearance.us
 
http://www.cheap-uggs.com.co
 
http://www.rayban--sunglassess.us.com
 
http://www.pradaoutletonlinestore.us.com
 
http://www.monclerjacketsoutlet.us.com
 
http://www.outletthenorthface.us.com
 
http://www.ugg-australia.com.co
 
http://www.fitflops.org
 
http://www.poloralphlaurenoutletstores.us.com
 
http://www.uggboots70off.in.net
 
http://www.uggoutlet.nom.co
 
http://www.cheapjordansshoes.in.net
 
http://www.uggsoutlet.nom.co
 
http://www.north-face-outlet.in.net
 
http://www.manoloblahnik.us
 
http://www.outletlongchamp.us.org
 
http://www.uggbootsonsale65off.in.net
 
http://www.cheap-mlb-jerseys.us.com
 
http://www.uggs-outlet-online.us
 
http://www.fitflops.us.org
 
http://www.oakleysunglasses2017.us.com
 
http://www.uggsoutletstores.us.com
 
http://www.originalsadidas.co.uk
 
http://www.cheapraybans.ca
 
http://dior.sunglassescheap.us.com
 
http://www.chaussureschristianlouboutin.fr
 
http://www.outletuggs.net.co
 
http://www.pandorajewelryoutlet.us.org
 
http://www.discountnike.us.com
 
http://www.northfacejackets.us.org
 
http://www.nike-airmaxuk.me.uk
 
http://www.coachfactory-outletonline.org
 
http://www.uggsslippers.com.co
 
http://www.longchamp-outletstore.us.com
 
http://www.coachfactoryoutlet-onlinestore.us.com
 
http://www.coachoutletonline70off.us.com
 
http://www.outlet-moncler.us
 
http://www.uggsclearance.com.co
 
http://www.nikerunningshoes.co.uk
 
http://www.coachfactoryoutlet.nom.co
 
http://www.raybans-sunglassesoutlet.us.com
 
http://www.oakleysunglassesoutletstore.us.org
 
http://www.nikeairmaxshoes.us.com
 
http://www.ralphlaurenpolo.in.net
 
http://www.coach-bags.us.org
 
http://www.outletpolo-ralphlauren.us.com
 
http://www.ray-bansunglassesoutlets.us.com
 
http://rayban.sunglassescheap.us.com
 
http://www.fitflops.us.com
 
http://www.adidasshoessale.in.net
 
http://www.manchesterunitedjersey.org.uk
 
http://www.oakley-sunglassesonsale.us.com
 
http://www.nhlhockey-jerseys.us.com
 
http://www.uggsaustralia.it
 
http://www.saleuggboots.co.uk
 
http://www.vansshoesoutlet-store.com
 
http://www.thenorthface-outlet.in.net
 
http://www.pololaurenralphlauren.us.com
 
http://www.raybansunglassesforwomen.us.com
 
http://www.outletugg.ca
 
http://www.supremeuk.co.uk
 
http://www.adidasoutletclearance.com
 
http://www.prada.us.org
 
http://www.michaelkorsoutlet70off.us.com
 
http://www.coachoutletstoreonlineofficial.us.com
 
http://www.nbajerseysshop.us.com
 
http://www.coachoutlet70off.us.com
 
http://www.oakleysunglassescanada.ca
 
http://www.coach-factoryoutletonlines.com
 
http://www.moncler.eu.com
 
http://prada.sunglassescheap.us.com
 
http://www.pradahandbagsoutlet.us.com
 
http://www.coach-factoryonline.us.org
 
http://www.uggbootscheaponline.in.net
 
http://www.ugg-italia.it
 
http://www.cheapnikenfljerseyswholesale.us
 
http://www.toryburchhandbagsoutlet.us.com
 
http://www.nikestores.me.uk
 
http://www.michaelkorsoutletsonlinesale.us.com
 
http://www.newcoachoutlet.us.com
 
http://www.michaeljordan-shoes.com
 
http://www.uggsoutletstore.org
 
http://www.uggsclassicboots.us.com
 
http://www.uggbootsonsale75off.us.org
 
http://www.uggoutletsonline.us.com
 
http://www.uggclearancesale.us.com
 
http://www.pandora-rings.net
 
http://www.redbottomsshoes.me.uk
 
http://www.nikeoutletstoreonline.us.com
 
http://www.redbottoms.org.uk
 
http://www.burberryscarf.com.co
 
http://www.converse-outletstore.com
 
http://www.canadagoosecanada.ca
 
http://www.uggbootsoutlets.in.net
 
http://www.nikefactory-outlet.us.com
 
http://www.uggboots.com.co
 
http://www.raybanpascher.fr
 
http://www.michaelkorstotehandbags.us.com
 
http://www.pololaurenshirts.com
 
http://www.pandoracharms.us.org
 
http://www.hermesbirkinhandbags.us.com
 
http://www.coachfactoryoutlet-online.eu.com
 
http://www.jordanretro.us
 
http://www.uggsonsale.net.in
 
http://www.ray-ban-sunglasses.com.au
 
http://www.burberryoutletoff.us.com
 
http://www.coachoutletsclearance.us.com
 
http://www.christianlouboutinoutletuk.org.uk
 
http://www.michaelkorshandbags.nom.co
 
http://www.hermesbags.me.uk
 
http://www.suprashoesclearance.us.com
 
http://www.cheaplouboutinshoesuk.org.uk
 
http://www.uggsadd.com
 
http://www.truereligionsale.com.co
 
http://www.adidaswings.name
 
http://www.uggoutletstore.net.co
 
http://www.nikeairjordans.co.uk
 
http://www.truereligionoutletjeans.us
 
http://www.baseballjerseys.us.com
 
http://www.outletugg.com.co
 
http://www.coachoutlet-factory.us.com
 
http://www.uggfactoryoutlet.in.net
 
http://www.monclerdownjackets.co.uk
 
http://www.michael--kors.us.org
 
http://www.canadagooseclearance.us.com
 
http://www.louboutinoutlets.us.com
 
http://www.christianlouboutinoutletusa.us.com
 
http://www.fitflopsoutlet.us.com
 
http://www.ralphlauren-poloshirts.co.uk
 
http://www.oakleysunglassesofficialsite.us.com
 
http://www.ferragamooutlet.us.com
 
http://www.adidasshoesforsale.in.net
 
http://www.truereligionjeans-outlet.us.com
 
http://www.uggbootsclearance.net.co
 
http://www.ferragamoshoesoutlet.us.com
 
http://www.uggsale.com.co
 
http://www.canadagoosesale.name
 
http://www.uggclearancesale.in.net
 
http://www.oakleysunglasses-vault.us.com
 
http://www.adidasjeremyscott.in.net
 
http://www.uggbootsaustralia.in.net
 
http://www.birkenstockshoes.org.uk
 
http://versace.sunglassescheap.us.com
 
http://www.burberry.us.org
 
http://www.basketballshoesstore.us.com
 
http://www.nike-air-huarache.org.uk
 
http://www.uknorthface.org.uk
 
http://www.cheapmichaelkorshandbags.us.org
 
http://www.uggboots70off.com.co
 
http://www.coach-factoryoutletusa.com
 
http://www.nikeblazers.us
 
http://www.longchamp-handbags.us.org
 
http://www.hermesoutlets.us.com
 
http://www.cheapraybansunglass.co.uk
 
http://www.cheapnfljerseysshop.us.com
 
http://www.coachoutletonline-sale.us.com
 
http://www.montblanc-pens.name
 
http://www.cheapjerseysnflwholesale.us
 
http://www.salvatoreferragamo.in.net
 
http://www.ugg-australia.ca
 
http://www.uggbootsonsale75off.in.net
 
http://www.adidasyeezy-boost.us.com
 
http://www.pandoracharmjewelry.us.com
 
http://www.ugg-outlets.com.co
 
http://www.ugg.me.uk
 
http://www.birkenstocksandals.us.org
 
http://www.uggbootsclassic.ca
 
http://www.katespade-outlet.in.net
 
http://www.longchampoutlet-online.com
 
http://www.poloralphlauren-outletonline.us.com
 
http://www.adidasshoesoutletstore.us.com
 
http://www.fitflopssaleclearance.us.org
 
http://www.moncleroutlet.us.org
 
http://www.canada-goose-jackets.co.uk
 
http://www.uggbootsonsale70off.com.co
 
http://www.michaelkorsoutlet75off.us.com
 
http://www.birkenstockoutlet.us.com
 
http://www.uggsonline.in.net
 
http://www.michaelkors-outletonline.eu.com
 
http://www.ray-bansunglasses2017.us.com
 
http://www.toryburchoutletoff.us.com
 
http://www.truereligion-jeans.us
 
http://www.polo-ralphlaurenoutlet.in.net
 
http://www.sunglassesoakleycheap.us.com
 
http://www.montblanc.com.co
 
http://www.uggsoutletstores.in.net
 
http://www.longchamp-outlet.us.org
 
http://www.louisvuittonhandbags.nom.co
 
http://www.christianlouboutinoff.us
 
http://www.ralphlaurenpolooutlet.us.org
 
http://www.northfacejacket.us.com
 
http://www.uggs-outlet.name
 
http://www.michaelkorsoutletonline80off.us.com
 
http://www.supreme-newyork.com
 
http://www.uggbootsaustralia.us.org
 
http://www.fitflopssale.org.uk
 
http://www.cheapreplicawatches.us.com
 
http://www.cheap-jordans.us.com
 
http://www.nikeoff.com
 
http://www.uggoutlet70off.in.net
 
http://www.cheapjordansshoes.us.com
 
http://www.niketrainers.org.uk
 
http://www.newmichaelkorsoutlet.us.com
 
http://www.pandorajewelrycanada.ca
 
http://carrera.sunglassescheap.us.com
 
http://www.christianlouboutinshoes.me.uk
 
http://www.ugg-bootscheap.com.co
 
http://www.coachoutletonline.nom.co
 
http://www.outletcanadagoose.com.co
 
http://www.stansmithadidas.us.com
 
http://www.moncler-jackets.us.org
 
http://www.oakleysunglassessport.us.com
 
http://www.cheapairjordans.us.com
 
http://www.uggbootsclearances.com.co
 
http://www.newbalance-shoes.us.com
 
http://www.hermesbeltoutlet.com
 
http://www.superdry.me.uk
 
chenyingying20171010
 

Latest revision as of 13:01, 15 January 2021

Determines the spell identifier for a spell which a script is currently processing.

Description

Returns the ID (SPELL_*) of the spell that the Spell Script is processing.

Multiple spells share the same script that is used to resolve the effect of the spell for code reuse but the scrip is altered slightly by the specific spell that it is working processing.

For example the Polymorph Self script (script name NW_S0_POLYSELF) is called by different spells determined by what monster they are polymorphing into.


Remarks

Strictly used in scripts that resolve a spells or spell abilities effects, this function is used to check for what line in spells.2da called the given script. "Feat" spells, as run from feat.2da, also have a spells.2da line and the "spell ID" can help identify these.

On a side note to change the scripting of a spell one could modify the BioWare scripts for a spell or spell ability (eg. NW_S0_FLMSTRIKE for Flame Strike) and save that script within the module (or Hakpak).

This should only be used inside spell scripts. If you want to learn how to use the new spellhooking system, check the advanced scripting tutorials in the Lexicon's Lyceum.

Custom spells and spell-effects can be added; see spells.2da and spells and abilities pages.


Known Bugs

Returns -1 if called inside of AOE script, however it could return a proper ID since a workaround is to use GetEffectSpellId(EffectDazed()).


Version

1.61

Example

//::///////////////////////////////////////////////
//:: Polymorph Self
//:: NW_S0_PolySelf.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    The PC is able to changed their form to one of
    several forms.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 21, 2002
//:://////////////////////////////////////////////
 
void main()
{
    //Declare major variables
    int nSpell = GetSpellId();
    object oTarget = GetSpellTargetObject();
	effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
    effect ePoly;
    int nPoly;
    int nMetaMagic = GetMetaMagicFeat();
    int nDuration = GetCasterLevel(OBJECT_SELF);
    //Enter Metamagic conditions
    if (nMetaMagic == METAMAGIC_EXTEND)
    {
    	nDuration = nDuration *2; //Duration is +100%
    }
 
    //Determine Polymorph subradial type
    if(nSpell == 387)
    {
        nPoly = POLYMORPH_TYPE_GIANT_SPIDER;
    }
    else if (nSpell == 388)
    {
        nPoly = POLYMORPH_TYPE_TROLL;
    }
    else if (nSpell == 389)
    {
        nPoly = POLYMORPH_TYPE_UMBER_HULK;
    }
    else if (nSpell == 390)
    {
        nPoly = POLYMORPH_TYPE_PIXIE;
    }
    else if (nSpell == 391)
    {
        nPoly = POLYMORPH_TYPE_ZOMBIE;
    }
    ePoly = EffectPolymorph(nPoly);
    //Fire cast spell at event for the specified target
    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_POLYMORPH_SELF, FALSE));
 
    //Apply the VFX impact and effects
	ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, oTarget, TurnsToSeconds(nDuration));
}

See Also

functions: 

GetLastSpell

constants: 

SPELL_* Constants



 author: Tom Cassiotis, editor: Lilac Soul, additional contributor(s): Martin Sarrazac