From 151d0748806066813acb316ab7c54d33154dda90 Mon Sep 17 00:00:00 2001 From: Jaysyn904 <68194417+Jaysyn904@users.noreply.github.com> Date: Mon, 10 Oct 2022 10:39:34 -0400 Subject: [PATCH] Added "Removed Files" folder Added "Removed Files" folder in case we needed to review any of them. --- _module/_removed files/evercliententer.nss | 363 + _module/_removed files/everclientexit.nss | 358 + _module/_removed files/everheartbeat.nss | 77 + _module/_removed files/evermodload.nss | 167 + _module/_removed files/everpcdeath.nss | 702 ++ _module/_removed files/everpcdying.nss | 104 + _module/_removed files/everpcequip.nss | 85 + _module/_removed files/everpclevelup.nss | 162 + _module/_removed files/everpcrespawn.nss | 143 + _module/_removed files/everpcrest.nss | 130 + _module/_removed files/everpcunequip.nss | 96 + _module/_removed files/everunaquire.nss | 108 + _module/_removed files/hgll_classft_inc.nss | 7473 +++++++++++++++++++ _module/_removed files/hgll_const_inc.nss | 39 + _module/_removed files/hgll_featreq_inc.nss | 4202 +++++++++++ _module/_removed files/hgll_func_inc.nss | 1405 ++++ _module/_removed files/hgll_leto_inc.nss | 284 + _module/_removed files/hgll_spells_inc.nss | 808 ++ _module/_removed files/hgll_struct_stat.nss | 39 + _module/_removed files/nw_s0_acidfoga.nss | 64 + _module/_removed files/nw_s0_acidfogc.nss | 79 + _module/_removed files/nw_s0_bescurse.nss | 64 + _module/_removed files/nw_s0_bladebara.nss | 66 + _module/_removed files/nw_s0_bladebarc.nss | 82 + _module/_removed files/nw_s0_calllghtn.nss | 98 + _module/_removed files/nw_s0_chlightn.nss | 186 + _module/_removed files/nw_s0_conecold.nss | 105 + _module/_removed files/nw_s0_crgrund.nss | 70 + _module/_removed files/nw_s0_crpdooma.nss | 51 + _module/_removed files/nw_s0_crpdoomc.nss | 85 + _module/_removed files/nw_s0_crundead.nss | 71 + _module/_removed files/nw_s0_delfirea.nss | 98 + _module/_removed files/nw_s0_delfirebal.nss | 59 + _module/_removed files/nw_s0_destruc.nss | 82 + _module/_removed files/nw_s0_eleswarm.nss | 59 + _module/_removed files/nw_s0_enedrain.nss | 68 + _module/_removed files/nw_s0_enervat.nss | 79 + _module/_removed files/nw_s0_findtrap.nss | 36 + _module/_removed files/nw_s0_fingdeath.nss | 97 + _module/_removed files/nw_s0_fireball.nss | 109 + _module/_removed files/nw_s0_firestrm.nss | 104 + _module/_removed files/nw_s0_flmarrow.nss | 99 + _module/_removed files/nw_s0_flmstrike.nss | 108 + _module/_removed files/nw_s0_gate.nss | 70 + _module/_removed files/nw_s0_grplanar.nss | 102 + _module/_removed files/nw_s0_hammgods.nss | 110 + _module/_removed files/nw_s0_horrwilt.nss | 105 + _module/_removed files/nw_s0_icestorm.nss | 97 + _module/_removed files/nw_s0_implosion.nss | 80 + _module/_removed files/nw_s0_imprinvis.nss | 66 + _module/_removed files/nw_s0_incclouda.nss | 67 + _module/_removed files/nw_s0_inccloudc.nss | 80 + _module/_removed files/nw_s0_knock.nss | 35 + _module/_removed files/nw_s0_lghtnbolt.nss | 112 + _module/_removed files/nw_s0_lsplanar.nss | 114 + _module/_removed files/nw_s0_metswarm.nss | 94 + _module/_removed files/nw_s0_mordswrd.nss | 50 + _module/_removed files/nw_s0_negray.nss | 96 + _module/_removed files/nw_s0_planar.nss | 107 + _module/_removed files/nw_s0_pwkill.nss | 136 + _module/_removed files/nw_s0_raisdead.nss | 47 + _module/_removed files/nw_s0_regen.nss | 59 + _module/_removed files/nw_s0_resserec.nss | 52 + _module/_removed files/nw_s0_shadconj.nss | 105 + _module/_removed files/nw_s0_shades.nss | 105 + _module/_removed files/nw_s0_slaylive.nss | 85 + _module/_removed files/nw_s0_slow.nss | 84 + _module/_removed files/nw_s0_splresis.nss | 76 + _module/_removed files/nw_s0_stormvenc.nss | 74 + _module/_removed files/nw_s0_summon.nss | 260 + _module/_removed files/nw_s0_summon4.nss | 54 + _module/_removed files/nw_s0_summon5.nss | 52 + _module/_removed files/nw_s0_summon6.nss | 70 + _module/_removed files/nw_s0_summon7.nss | 90 + _module/_removed files/nw_s0_summon8.nss | 92 + _module/_removed files/nw_s0_summon9.nss | 66 + _module/_removed files/nw_s0_summshad.nss | 70 + _module/_removed files/nw_s0_summshad02.nss | 64 + _module/_removed files/nw_s0_timestop.nss | 158 + _module/_removed files/nw_s0_timestop1.nss | 56 + _module/_removed files/nw_s0_timestop3.nss | 76 + _module/_removed files/nw_s0_vamptch.nss | 125 + _module/_removed files/nw_s0_wallfirea.nss | 60 + _module/_removed files/nw_s0_wallfirec.nss | 78 + _module/_removed files/nwnx_admin_t.nss | 26 + _module/_removed files/nwnx_area_t.nss | 73 + _module/_removed files/nwnx_chat_t.nss | 20 + _module/_removed files/nwnx_creature_t.nss | 256 + _module/_removed files/nwnx_dialog_t.nss | 37 + _module/_removed files/nwnx_dialog_t1.nss | 7 + _module/_removed files/nwnx_dialog_t2.nss | 7 + _module/_removed files/nwnx_dialog_t3.nss | 6 + _module/_removed files/nwnx_effect_t.nss | 80 + _module/_removed files/nwnx_feedback_t.nss | 34 + _module/_removed files/nwnx_itemprop_t.nss | 42 + _module/_removed files/nwnx_object_t.nss | 121 + _module/_removed files/nwnx_player_t.nss | 16 + _module/_removed files/nwnx_race_t.nss | 33 + _module/_removed files/nwnx_sql_t.nss | 249 + _module/_removed files/old_thunderclap.nss | 107 + _module/_removed files/vat_stripdmfi.nss | 28 + _module/_removed files/vat_stripflags.nss | 60 + _module/_removed files/vat_stripnondrop.nss | 51 + _module/_removed files/x0_s0_bombard.nss | 107 + _module/_removed files/x0_s0_enten.nss | 24 + _module/_removed files/x0_s0_entrshield.nss | 65 + _module/_removed files/x0_s0_ether.nss | 48 + _module/_removed files/x0_s0_firebrand.nss | 50 + _module/_removed files/x0_s0_fleshsto.nss | 57 + _module/_removed files/x0_s0_missstorm1.nss | 65 + _module/_removed files/x0_s0_missstorm2.nss | 62 + _module/_removed files/x0_s0_truestrike.nss | 62 + _module/_removed files/x0_s0_woundwhis.nss | 69 + _module/_removed files/x2_m1_mindblast.nss | 118 + _module/_removed files/x2_p_craftskills.dlg | Bin 0 -> 12806 bytes _module/_removed files/x2_s0_balllghtng.nss | 39 + _module/_removed files/x2_s0_blckblde.nss | 109 + _module/_removed files/x2_s0_blckstff.nss | 89 + _module/_removed files/x2_s0_combust.nss | 214 + _module/_removed files/x2_s0_crshadow.nss | 63 + _module/_removed files/x2_s0_dtharm.nss | 70 + _module/_removed files/x2_s0_elecloop.nss | 157 + _module/_removed files/x2_s0_glphwardx.nss | 117 + _module/_removed files/x2_s0_grmagweap.nss | 89 + _module/_removed files/x2_s0_horiboom.nss | 90 + _module/_removed files/x2_s0_monregen.nss | 64 + _module/_removed files/x2_s0_scntsphere.nss | 105 + _module/_removed files/x2_s0_stneholda.nss | 55 + _module/_removed files/x2_s0_stneholdc.nss | 67 + _module/_removed files/x2_s0_undeath.nss | 155 + _module/_removed files/x2_s1_chaosspit.nss | 90 + _module/_removed files/x2_s1_petrgaze.nss | 92 + _module/_removed files/x2_s1_wyrmbreath.nss | 153 + _module/_removed files/x2_s2_blindspd.nss | 107 + _module/_removed files/x2_s2_cursesong.nss | 417 ++ _module/_removed files/x2_s2_dragknght.nss | 46 + _module/_removed files/x2_s2_dthmsttch.nss | 85 + _module/_removed files/x2_s2_gwburn.nss | 66 + _module/_removed files/x2_s2_gwildshp.nss | 458 ++ _module/_removed files/x2_s2_hellball.nss | 144 + _module/_removed files/x2_s2_mghtyrage.nss | 62 + _module/_removed files/x2_s2_mumdust.nss | 46 + _module/_removed files/x2_s2_ruin.nss | 66 + _module/_removed files/x2_s2_sumundead.nss | 72 + _module/_removed files/x2_s3_demitouch.nss | 96 + _removed files/evercliententer.nss | 363 + _removed files/everclientexit.nss | 358 + _removed files/everheartbeat.nss | 77 + _removed files/evermodload.nss | 167 + _removed files/everpcdeath.nss | 702 ++ _removed files/everpcdying.nss | 104 + _removed files/everpcequip.nss | 85 + _removed files/everpclevelup.nss | 162 + _removed files/everpcrespawn.nss | 143 + _removed files/everpcrest.nss | 130 + _removed files/everpcunequip.nss | 96 + _removed files/everunaquire.nss | 108 + _removed files/hgll_classft_inc.nss | 7473 +++++++++++++++++++ _removed files/hgll_const_inc.nss | 39 + _removed files/hgll_featreq_inc.nss | 4202 +++++++++++ _removed files/hgll_func_inc.nss | 1405 ++++ _removed files/hgll_leto_inc.nss | 284 + _removed files/hgll_spells_inc.nss | 808 ++ _removed files/hgll_struct_stat.nss | 39 + _removed files/nw_s0_acidfoga.nss | 64 + _removed files/nw_s0_acidfogc.nss | 79 + _removed files/nw_s0_bescurse.nss | 64 + _removed files/nw_s0_bladebara.nss | 66 + _removed files/nw_s0_bladebarc.nss | 82 + _removed files/nw_s0_calllghtn.nss | 98 + _removed files/nw_s0_chlightn.nss | 186 + _removed files/nw_s0_conecold.nss | 105 + _removed files/nw_s0_crgrund.nss | 70 + _removed files/nw_s0_crpdooma.nss | 51 + _removed files/nw_s0_crpdoomc.nss | 85 + _removed files/nw_s0_crundead.nss | 71 + _removed files/nw_s0_delfirea.nss | 98 + _removed files/nw_s0_delfirebal.nss | 59 + _removed files/nw_s0_destruc.nss | 82 + _removed files/nw_s0_eleswarm.nss | 59 + _removed files/nw_s0_enedrain.nss | 68 + _removed files/nw_s0_enervat.nss | 79 + _removed files/nw_s0_findtrap.nss | 36 + _removed files/nw_s0_fingdeath.nss | 97 + _removed files/nw_s0_fireball.nss | 109 + _removed files/nw_s0_firestrm.nss | 104 + _removed files/nw_s0_flmarrow.nss | 99 + _removed files/nw_s0_flmstrike.nss | 108 + _removed files/nw_s0_gate.nss | 70 + _removed files/nw_s0_grplanar.nss | 102 + _removed files/nw_s0_hammgods.nss | 110 + _removed files/nw_s0_horrwilt.nss | 105 + _removed files/nw_s0_icestorm.nss | 97 + _removed files/nw_s0_implosion.nss | 80 + _removed files/nw_s0_imprinvis.nss | 66 + _removed files/nw_s0_incclouda.nss | 67 + _removed files/nw_s0_inccloudc.nss | 80 + _removed files/nw_s0_knock.nss | 35 + _removed files/nw_s0_lghtnbolt.nss | 112 + _removed files/nw_s0_lsplanar.nss | 114 + _removed files/nw_s0_metswarm.nss | 94 + _removed files/nw_s0_mordswrd.nss | 50 + _removed files/nw_s0_negray.nss | 96 + _removed files/nw_s0_planar.nss | 107 + _removed files/nw_s0_pwkill.nss | 136 + _removed files/nw_s0_raisdead.nss | 47 + _removed files/nw_s0_regen.nss | 59 + _removed files/nw_s0_resserec.nss | 52 + _removed files/nw_s0_shadconj.nss | 105 + _removed files/nw_s0_shades.nss | 105 + _removed files/nw_s0_slaylive.nss | 85 + _removed files/nw_s0_slow.nss | 84 + _removed files/nw_s0_splresis.nss | 76 + _removed files/nw_s0_stormvenc.nss | 74 + _removed files/nw_s0_summon.nss | 260 + _removed files/nw_s0_summon4.nss | 54 + _removed files/nw_s0_summon5.nss | 52 + _removed files/nw_s0_summon6.nss | 70 + _removed files/nw_s0_summon7.nss | 90 + _removed files/nw_s0_summon8.nss | 92 + _removed files/nw_s0_summon9.nss | 66 + _removed files/nw_s0_summshad.nss | 70 + _removed files/nw_s0_summshad02.nss | 64 + _removed files/nw_s0_timestop.nss | 158 + _removed files/nw_s0_timestop1.nss | 56 + _removed files/nw_s0_timestop3.nss | 76 + _removed files/nw_s0_vamptch.nss | 125 + _removed files/nw_s0_wallfirea.nss | 60 + _removed files/nw_s0_wallfirec.nss | 78 + _removed files/nwnx_admin_t.nss | 26 + _removed files/nwnx_area_t.nss | 73 + _removed files/nwnx_chat_t.nss | 20 + _removed files/nwnx_creature_t.nss | 256 + _removed files/nwnx_dialog_t.nss | 37 + _removed files/nwnx_dialog_t1.nss | 7 + _removed files/nwnx_dialog_t2.nss | 7 + _removed files/nwnx_dialog_t3.nss | 6 + _removed files/nwnx_effect_t.nss | 80 + _removed files/nwnx_feedback_t.nss | 34 + _removed files/nwnx_itemprop_t.nss | 42 + _removed files/nwnx_object_t.nss | 121 + _removed files/nwnx_player_t.nss | 16 + _removed files/nwnx_race_t.nss | 33 + _removed files/nwnx_sql_t.nss | 249 + _removed files/old_thunderclap.nss | 107 + _removed files/vat_stripdmfi.nss | 28 + _removed files/vat_stripflags.nss | 60 + _removed files/vat_stripnondrop.nss | 51 + _removed files/x0_s0_bombard.nss | 107 + _removed files/x0_s0_enten.nss | 24 + _removed files/x0_s0_entrshield.nss | 65 + _removed files/x0_s0_ether.nss | 48 + _removed files/x0_s0_firebrand.nss | 50 + _removed files/x0_s0_fleshsto.nss | 57 + _removed files/x0_s0_missstorm1.nss | 65 + _removed files/x0_s0_missstorm2.nss | 62 + _removed files/x0_s0_truestrike.nss | 62 + _removed files/x0_s0_woundwhis.nss | 69 + _removed files/x2_m1_mindblast.nss | 118 + _removed files/x2_p_craftskills.dlg | Bin 0 -> 12806 bytes _removed files/x2_s0_balllghtng.nss | 39 + _removed files/x2_s0_blckblde.nss | 109 + _removed files/x2_s0_blckstff.nss | 89 + _removed files/x2_s0_combust.nss | 214 + _removed files/x2_s0_crshadow.nss | 63 + _removed files/x2_s0_dtharm.nss | 70 + _removed files/x2_s0_elecloop.nss | 157 + _removed files/x2_s0_glphwardx.nss | 117 + _removed files/x2_s0_grmagweap.nss | 89 + _removed files/x2_s0_horiboom.nss | 90 + _removed files/x2_s0_monregen.nss | 64 + _removed files/x2_s0_scntsphere.nss | 105 + _removed files/x2_s0_stneholda.nss | 55 + _removed files/x2_s0_stneholdc.nss | 67 + _removed files/x2_s0_undeath.nss | 155 + _removed files/x2_s1_chaosspit.nss | 90 + _removed files/x2_s1_petrgaze.nss | 92 + _removed files/x2_s1_wyrmbreath.nss | 153 + _removed files/x2_s2_blindspd.nss | 107 + _removed files/x2_s2_cursesong.nss | 417 ++ _removed files/x2_s2_dragknght.nss | 46 + _removed files/x2_s2_dthmsttch.nss | 85 + _removed files/x2_s2_gwburn.nss | 66 + _removed files/x2_s2_gwildshp.nss | 458 ++ _removed files/x2_s2_hellball.nss | 144 + _removed files/x2_s2_mghtyrage.nss | 62 + _removed files/x2_s2_mumdust.nss | 46 + _removed files/x2_s2_ruin.nss | 66 + _removed files/x2_s2_sumundead.nss | 72 + _removed files/x2_s3_demitouch.nss | 96 + 290 files changed, 55612 insertions(+) create mode 100644 _module/_removed files/evercliententer.nss create mode 100644 _module/_removed files/everclientexit.nss create mode 100644 _module/_removed files/everheartbeat.nss create mode 100644 _module/_removed files/evermodload.nss create mode 100644 _module/_removed files/everpcdeath.nss create mode 100644 _module/_removed files/everpcdying.nss create mode 100644 _module/_removed files/everpcequip.nss create mode 100644 _module/_removed files/everpclevelup.nss create mode 100644 _module/_removed files/everpcrespawn.nss create mode 100644 _module/_removed files/everpcrest.nss create mode 100644 _module/_removed files/everpcunequip.nss create mode 100644 _module/_removed files/everunaquire.nss create mode 100644 _module/_removed files/hgll_classft_inc.nss create mode 100644 _module/_removed files/hgll_const_inc.nss create mode 100644 _module/_removed files/hgll_featreq_inc.nss create mode 100644 _module/_removed files/hgll_func_inc.nss create mode 100644 _module/_removed files/hgll_leto_inc.nss create mode 100644 _module/_removed files/hgll_spells_inc.nss create mode 100644 _module/_removed files/hgll_struct_stat.nss create mode 100644 _module/_removed files/nw_s0_acidfoga.nss create mode 100644 _module/_removed files/nw_s0_acidfogc.nss create mode 100644 _module/_removed files/nw_s0_bescurse.nss create mode 100644 _module/_removed files/nw_s0_bladebara.nss create mode 100644 _module/_removed files/nw_s0_bladebarc.nss create mode 100644 _module/_removed files/nw_s0_calllghtn.nss create mode 100644 _module/_removed files/nw_s0_chlightn.nss create mode 100644 _module/_removed files/nw_s0_conecold.nss create mode 100644 _module/_removed files/nw_s0_crgrund.nss create mode 100644 _module/_removed files/nw_s0_crpdooma.nss create mode 100644 _module/_removed files/nw_s0_crpdoomc.nss create mode 100644 _module/_removed files/nw_s0_crundead.nss create mode 100644 _module/_removed files/nw_s0_delfirea.nss create mode 100644 _module/_removed files/nw_s0_delfirebal.nss create mode 100644 _module/_removed files/nw_s0_destruc.nss create mode 100644 _module/_removed files/nw_s0_eleswarm.nss create mode 100644 _module/_removed files/nw_s0_enedrain.nss create mode 100644 _module/_removed files/nw_s0_enervat.nss create mode 100644 _module/_removed files/nw_s0_findtrap.nss create mode 100644 _module/_removed files/nw_s0_fingdeath.nss create mode 100644 _module/_removed files/nw_s0_fireball.nss create mode 100644 _module/_removed files/nw_s0_firestrm.nss create mode 100644 _module/_removed files/nw_s0_flmarrow.nss create mode 100644 _module/_removed files/nw_s0_flmstrike.nss create mode 100644 _module/_removed files/nw_s0_gate.nss create mode 100644 _module/_removed files/nw_s0_grplanar.nss create mode 100644 _module/_removed files/nw_s0_hammgods.nss create mode 100644 _module/_removed files/nw_s0_horrwilt.nss create mode 100644 _module/_removed files/nw_s0_icestorm.nss create mode 100644 _module/_removed files/nw_s0_implosion.nss create mode 100644 _module/_removed files/nw_s0_imprinvis.nss create mode 100644 _module/_removed files/nw_s0_incclouda.nss create mode 100644 _module/_removed files/nw_s0_inccloudc.nss create mode 100644 _module/_removed files/nw_s0_knock.nss create mode 100644 _module/_removed files/nw_s0_lghtnbolt.nss create mode 100644 _module/_removed files/nw_s0_lsplanar.nss create mode 100644 _module/_removed files/nw_s0_metswarm.nss create mode 100644 _module/_removed files/nw_s0_mordswrd.nss create mode 100644 _module/_removed files/nw_s0_negray.nss create mode 100644 _module/_removed files/nw_s0_planar.nss create mode 100644 _module/_removed files/nw_s0_pwkill.nss create mode 100644 _module/_removed files/nw_s0_raisdead.nss create mode 100644 _module/_removed files/nw_s0_regen.nss create mode 100644 _module/_removed files/nw_s0_resserec.nss create mode 100644 _module/_removed files/nw_s0_shadconj.nss create mode 100644 _module/_removed files/nw_s0_shades.nss create mode 100644 _module/_removed files/nw_s0_slaylive.nss create mode 100644 _module/_removed files/nw_s0_slow.nss create mode 100644 _module/_removed files/nw_s0_splresis.nss create mode 100644 _module/_removed files/nw_s0_stormvenc.nss create mode 100644 _module/_removed files/nw_s0_summon.nss create mode 100644 _module/_removed files/nw_s0_summon4.nss create mode 100644 _module/_removed files/nw_s0_summon5.nss create mode 100644 _module/_removed files/nw_s0_summon6.nss create mode 100644 _module/_removed files/nw_s0_summon7.nss create mode 100644 _module/_removed files/nw_s0_summon8.nss create mode 100644 _module/_removed files/nw_s0_summon9.nss create mode 100644 _module/_removed files/nw_s0_summshad.nss create mode 100644 _module/_removed files/nw_s0_summshad02.nss create mode 100644 _module/_removed files/nw_s0_timestop.nss create mode 100644 _module/_removed files/nw_s0_timestop1.nss create mode 100644 _module/_removed files/nw_s0_timestop3.nss create mode 100644 _module/_removed files/nw_s0_vamptch.nss create mode 100644 _module/_removed files/nw_s0_wallfirea.nss create mode 100644 _module/_removed files/nw_s0_wallfirec.nss create mode 100644 _module/_removed files/nwnx_admin_t.nss create mode 100644 _module/_removed files/nwnx_area_t.nss create mode 100644 _module/_removed files/nwnx_chat_t.nss create mode 100644 _module/_removed files/nwnx_creature_t.nss create mode 100644 _module/_removed files/nwnx_dialog_t.nss create mode 100644 _module/_removed files/nwnx_dialog_t1.nss create mode 100644 _module/_removed files/nwnx_dialog_t2.nss create mode 100644 _module/_removed files/nwnx_dialog_t3.nss create mode 100644 _module/_removed files/nwnx_effect_t.nss create mode 100644 _module/_removed files/nwnx_feedback_t.nss create mode 100644 _module/_removed files/nwnx_itemprop_t.nss create mode 100644 _module/_removed files/nwnx_object_t.nss create mode 100644 _module/_removed files/nwnx_player_t.nss create mode 100644 _module/_removed files/nwnx_race_t.nss create mode 100644 _module/_removed files/nwnx_sql_t.nss create mode 100644 _module/_removed files/old_thunderclap.nss create mode 100644 _module/_removed files/vat_stripdmfi.nss create mode 100644 _module/_removed files/vat_stripflags.nss create mode 100644 _module/_removed files/vat_stripnondrop.nss create mode 100644 _module/_removed files/x0_s0_bombard.nss create mode 100644 _module/_removed files/x0_s0_enten.nss create mode 100644 _module/_removed files/x0_s0_entrshield.nss create mode 100644 _module/_removed files/x0_s0_ether.nss create mode 100644 _module/_removed files/x0_s0_firebrand.nss create mode 100644 _module/_removed files/x0_s0_fleshsto.nss create mode 100644 _module/_removed files/x0_s0_missstorm1.nss create mode 100644 _module/_removed files/x0_s0_missstorm2.nss create mode 100644 _module/_removed files/x0_s0_truestrike.nss create mode 100644 _module/_removed files/x0_s0_woundwhis.nss create mode 100644 _module/_removed files/x2_m1_mindblast.nss create mode 100644 _module/_removed files/x2_p_craftskills.dlg create mode 100644 _module/_removed files/x2_s0_balllghtng.nss create mode 100644 _module/_removed files/x2_s0_blckblde.nss create mode 100644 _module/_removed files/x2_s0_blckstff.nss create mode 100644 _module/_removed files/x2_s0_combust.nss create mode 100644 _module/_removed files/x2_s0_crshadow.nss create mode 100644 _module/_removed files/x2_s0_dtharm.nss create mode 100644 _module/_removed files/x2_s0_elecloop.nss create mode 100644 _module/_removed files/x2_s0_glphwardx.nss create mode 100644 _module/_removed files/x2_s0_grmagweap.nss create mode 100644 _module/_removed files/x2_s0_horiboom.nss create mode 100644 _module/_removed files/x2_s0_monregen.nss create mode 100644 _module/_removed files/x2_s0_scntsphere.nss create mode 100644 _module/_removed files/x2_s0_stneholda.nss create mode 100644 _module/_removed files/x2_s0_stneholdc.nss create mode 100644 _module/_removed files/x2_s0_undeath.nss create mode 100644 _module/_removed files/x2_s1_chaosspit.nss create mode 100644 _module/_removed files/x2_s1_petrgaze.nss create mode 100644 _module/_removed files/x2_s1_wyrmbreath.nss create mode 100644 _module/_removed files/x2_s2_blindspd.nss create mode 100644 _module/_removed files/x2_s2_cursesong.nss create mode 100644 _module/_removed files/x2_s2_dragknght.nss create mode 100644 _module/_removed files/x2_s2_dthmsttch.nss create mode 100644 _module/_removed files/x2_s2_gwburn.nss create mode 100644 _module/_removed files/x2_s2_gwildshp.nss create mode 100644 _module/_removed files/x2_s2_hellball.nss create mode 100644 _module/_removed files/x2_s2_mghtyrage.nss create mode 100644 _module/_removed files/x2_s2_mumdust.nss create mode 100644 _module/_removed files/x2_s2_ruin.nss create mode 100644 _module/_removed files/x2_s2_sumundead.nss create mode 100644 _module/_removed files/x2_s3_demitouch.nss create mode 100644 _removed files/evercliententer.nss create mode 100644 _removed files/everclientexit.nss create mode 100644 _removed files/everheartbeat.nss create mode 100644 _removed files/evermodload.nss create mode 100644 _removed files/everpcdeath.nss create mode 100644 _removed files/everpcdying.nss create mode 100644 _removed files/everpcequip.nss create mode 100644 _removed files/everpclevelup.nss create mode 100644 _removed files/everpcrespawn.nss create mode 100644 _removed files/everpcrest.nss create mode 100644 _removed files/everpcunequip.nss create mode 100644 _removed files/everunaquire.nss create mode 100644 _removed files/hgll_classft_inc.nss create mode 100644 _removed files/hgll_const_inc.nss create mode 100644 _removed files/hgll_featreq_inc.nss create mode 100644 _removed files/hgll_func_inc.nss create mode 100644 _removed files/hgll_leto_inc.nss create mode 100644 _removed files/hgll_spells_inc.nss create mode 100644 _removed files/hgll_struct_stat.nss create mode 100644 _removed files/nw_s0_acidfoga.nss create mode 100644 _removed files/nw_s0_acidfogc.nss create mode 100644 _removed files/nw_s0_bescurse.nss create mode 100644 _removed files/nw_s0_bladebara.nss create mode 100644 _removed files/nw_s0_bladebarc.nss create mode 100644 _removed files/nw_s0_calllghtn.nss create mode 100644 _removed files/nw_s0_chlightn.nss create mode 100644 _removed files/nw_s0_conecold.nss create mode 100644 _removed files/nw_s0_crgrund.nss create mode 100644 _removed files/nw_s0_crpdooma.nss create mode 100644 _removed files/nw_s0_crpdoomc.nss create mode 100644 _removed files/nw_s0_crundead.nss create mode 100644 _removed files/nw_s0_delfirea.nss create mode 100644 _removed files/nw_s0_delfirebal.nss create mode 100644 _removed files/nw_s0_destruc.nss create mode 100644 _removed files/nw_s0_eleswarm.nss create mode 100644 _removed files/nw_s0_enedrain.nss create mode 100644 _removed files/nw_s0_enervat.nss create mode 100644 _removed files/nw_s0_findtrap.nss create mode 100644 _removed files/nw_s0_fingdeath.nss create mode 100644 _removed files/nw_s0_fireball.nss create mode 100644 _removed files/nw_s0_firestrm.nss create mode 100644 _removed files/nw_s0_flmarrow.nss create mode 100644 _removed files/nw_s0_flmstrike.nss create mode 100644 _removed files/nw_s0_gate.nss create mode 100644 _removed files/nw_s0_grplanar.nss create mode 100644 _removed files/nw_s0_hammgods.nss create mode 100644 _removed files/nw_s0_horrwilt.nss create mode 100644 _removed files/nw_s0_icestorm.nss create mode 100644 _removed files/nw_s0_implosion.nss create mode 100644 _removed files/nw_s0_imprinvis.nss create mode 100644 _removed files/nw_s0_incclouda.nss create mode 100644 _removed files/nw_s0_inccloudc.nss create mode 100644 _removed files/nw_s0_knock.nss create mode 100644 _removed files/nw_s0_lghtnbolt.nss create mode 100644 _removed files/nw_s0_lsplanar.nss create mode 100644 _removed files/nw_s0_metswarm.nss create mode 100644 _removed files/nw_s0_mordswrd.nss create mode 100644 _removed files/nw_s0_negray.nss create mode 100644 _removed files/nw_s0_planar.nss create mode 100644 _removed files/nw_s0_pwkill.nss create mode 100644 _removed files/nw_s0_raisdead.nss create mode 100644 _removed files/nw_s0_regen.nss create mode 100644 _removed files/nw_s0_resserec.nss create mode 100644 _removed files/nw_s0_shadconj.nss create mode 100644 _removed files/nw_s0_shades.nss create mode 100644 _removed files/nw_s0_slaylive.nss create mode 100644 _removed files/nw_s0_slow.nss create mode 100644 _removed files/nw_s0_splresis.nss create mode 100644 _removed files/nw_s0_stormvenc.nss create mode 100644 _removed files/nw_s0_summon.nss create mode 100644 _removed files/nw_s0_summon4.nss create mode 100644 _removed files/nw_s0_summon5.nss create mode 100644 _removed files/nw_s0_summon6.nss create mode 100644 _removed files/nw_s0_summon7.nss create mode 100644 _removed files/nw_s0_summon8.nss create mode 100644 _removed files/nw_s0_summon9.nss create mode 100644 _removed files/nw_s0_summshad.nss create mode 100644 _removed files/nw_s0_summshad02.nss create mode 100644 _removed files/nw_s0_timestop.nss create mode 100644 _removed files/nw_s0_timestop1.nss create mode 100644 _removed files/nw_s0_timestop3.nss create mode 100644 _removed files/nw_s0_vamptch.nss create mode 100644 _removed files/nw_s0_wallfirea.nss create mode 100644 _removed files/nw_s0_wallfirec.nss create mode 100644 _removed files/nwnx_admin_t.nss create mode 100644 _removed files/nwnx_area_t.nss create mode 100644 _removed files/nwnx_chat_t.nss create mode 100644 _removed files/nwnx_creature_t.nss create mode 100644 _removed files/nwnx_dialog_t.nss create mode 100644 _removed files/nwnx_dialog_t1.nss create mode 100644 _removed files/nwnx_dialog_t2.nss create mode 100644 _removed files/nwnx_dialog_t3.nss create mode 100644 _removed files/nwnx_effect_t.nss create mode 100644 _removed files/nwnx_feedback_t.nss create mode 100644 _removed files/nwnx_itemprop_t.nss create mode 100644 _removed files/nwnx_object_t.nss create mode 100644 _removed files/nwnx_player_t.nss create mode 100644 _removed files/nwnx_race_t.nss create mode 100644 _removed files/nwnx_sql_t.nss create mode 100644 _removed files/old_thunderclap.nss create mode 100644 _removed files/vat_stripdmfi.nss create mode 100644 _removed files/vat_stripflags.nss create mode 100644 _removed files/vat_stripnondrop.nss create mode 100644 _removed files/x0_s0_bombard.nss create mode 100644 _removed files/x0_s0_enten.nss create mode 100644 _removed files/x0_s0_entrshield.nss create mode 100644 _removed files/x0_s0_ether.nss create mode 100644 _removed files/x0_s0_firebrand.nss create mode 100644 _removed files/x0_s0_fleshsto.nss create mode 100644 _removed files/x0_s0_missstorm1.nss create mode 100644 _removed files/x0_s0_missstorm2.nss create mode 100644 _removed files/x0_s0_truestrike.nss create mode 100644 _removed files/x0_s0_woundwhis.nss create mode 100644 _removed files/x2_m1_mindblast.nss create mode 100644 _removed files/x2_p_craftskills.dlg create mode 100644 _removed files/x2_s0_balllghtng.nss create mode 100644 _removed files/x2_s0_blckblde.nss create mode 100644 _removed files/x2_s0_blckstff.nss create mode 100644 _removed files/x2_s0_combust.nss create mode 100644 _removed files/x2_s0_crshadow.nss create mode 100644 _removed files/x2_s0_dtharm.nss create mode 100644 _removed files/x2_s0_elecloop.nss create mode 100644 _removed files/x2_s0_glphwardx.nss create mode 100644 _removed files/x2_s0_grmagweap.nss create mode 100644 _removed files/x2_s0_horiboom.nss create mode 100644 _removed files/x2_s0_monregen.nss create mode 100644 _removed files/x2_s0_scntsphere.nss create mode 100644 _removed files/x2_s0_stneholda.nss create mode 100644 _removed files/x2_s0_stneholdc.nss create mode 100644 _removed files/x2_s0_undeath.nss create mode 100644 _removed files/x2_s1_chaosspit.nss create mode 100644 _removed files/x2_s1_petrgaze.nss create mode 100644 _removed files/x2_s1_wyrmbreath.nss create mode 100644 _removed files/x2_s2_blindspd.nss create mode 100644 _removed files/x2_s2_cursesong.nss create mode 100644 _removed files/x2_s2_dragknght.nss create mode 100644 _removed files/x2_s2_dthmsttch.nss create mode 100644 _removed files/x2_s2_gwburn.nss create mode 100644 _removed files/x2_s2_gwildshp.nss create mode 100644 _removed files/x2_s2_hellball.nss create mode 100644 _removed files/x2_s2_mghtyrage.nss create mode 100644 _removed files/x2_s2_mumdust.nss create mode 100644 _removed files/x2_s2_ruin.nss create mode 100644 _removed files/x2_s2_sumundead.nss create mode 100644 _removed files/x2_s3_demitouch.nss diff --git a/_module/_removed files/evercliententer.nss b/_module/_removed files/evercliententer.nss new file mode 100644 index 00000000..e933c0b2 --- /dev/null +++ b/_module/_removed files/evercliententer.nss @@ -0,0 +1,363 @@ +//Script Name: evercliententer +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 6/14/08 (Updated_8/10/08) +///////////////////////////////////////// +/* +This my premier OnClientEnter Module Event Script +for all my modules NWNX2 / Leto Modules + +This script goes in the OnClient Enter Event +if you are using the nwnx2 system & leto! +*/ +///////////////////////////////////////////////////////////////// +//This script does multiple things, it checks to see if... +//If the PC is immortal or level 40 (apply special effects) +//If the character they have has been banned. (not a total bann) +//If they logged out while dead, if so make them dead instantly!!! ;) +//If the player is playing a legal character or not...read below... +//And if the Player themself have been banned from the module or not.. +/////////////////////////////////////////////////////////////////////// + +//Required Includes (Don't touch!) +#include "nw_i0_tool" +#include "gen_inc_color" +#include "fky_chat_inc" + +/////////////////////////// +//Repetitive Variables.. +effect eEffect; +int nInt; +object oItem; +object aTarget; +location bTarget; + +void main() +{ +//Declare Major Variables.. +object oPC; +oPC = GetEnteringObject(); +object oTarget; +oTarget = oPC; +object oPlayer = oPC; +object oPP = oPC; + +if(GetIsDM(oPC)) +{return; } + +//object oInfo = GetItemPossessedBy(oPP, "pcidname"); +//string sID = GetStringRight(GetName(oInfo), 14); + +//Tell us if the entering CHARACTER has been banned or not +int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); + +object oTag; +location lTag; + + +//This part is about verifying the Player's name.. +//A player must have at least a 2 character name or they are going to +//return with an error! If they have spaces in their name it will return +//with an error as well, including alt code! +string sPCNM = GetName(oPP); +string sPCNMR = GetStringRight(sPCNM, 2); +string sNC1; string sNC2; string sRNC1; string sRNC2; +int nBad; + +//Find the second character of the players name.. +sNC1 = GetSubString(sPCNM, 0, 1); +//Find the second character of the players name.. +sNC2 = GetSubString(sPCNM, 0, 2); +//Find the last letter in the player's name. +sRNC1 = GetSubString(sPCNMR, 0, 1); +//Find the next to the last letter in the player's name. +sRNC2 = GetSubString(sPCNMR, 0, 2); + +///////////////////////////////////////////////////////////////////////////// +//Please leave the credits to the module within the message. + +//Colorful Server Message sent to all PCs when they enter the module.. +string sMessage; +sMessage = GetRGB(1,7,7); //The color (See above) +sMessage += "Welcome "; //The text to be colorized by the above color. +sMessage += GetRGB(15,15,1);//The next color. +sMessage += "to a "; //The next text to be colorized by the above color. +sMessage += GetRGB(15,1,1);//etc.. +sMessage += "Revised Edition "; +sMessage += GetRGB(7,7,15); +sMessage += "of the "; +sMessage += GetRGB(1,15,1); +sMessage += "Classic Module"; +sMessage += GetRGB(13,9,13); +sMessage += "Paths of Ascension "; +sMessage += GetRGB(12,10,7); +sMessage += "Created By: AW_Olorin "; +sMessage += GetRGB(); +sMessage += "Revised By "; +sMessage += GetRGB(15,5,1); +sMessage += "Genisys (Guile) "; +sMessage += GetRGB(12,10,7); +sMessage += "on 7/21/08"; + +//Float welcome message by.. +DelayCommand(13.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE)); + +/////////////////////////IMPORTANT////////////////////////////////// +//You must make all the "" below into " " to check for legal names +//I turned it off because a lot of my characters have bad names! +//Simply put the cursor between "" and hit the space bar for "" to " " +if(sNC1 =="") +{ nBad =1; } +else if(sNC2 =="") +{ nBad =1; } +else if(sRNC1 =="") +{ nBad =1; } +else if(sRNC2 =="") +{ nBad =1; } +else { nBad = 0; } + +///////////////////////////////////////////////////////////////////// + +//If it's a DM entering the module... +if(GetIsDM(oPC)) +{ + //If the DM has never logged on before.. + if(GetItemPossessedBy(oPC, "dmtoolz")==OBJECT_INVALID) + { + //Change "dmtoolz" to the tag name of any items you want given to DMs + //the first time they enter only...(copy / paste for more items) + //simply type // at the start of a line to deactivate it.. + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + //CreateItemOnObject("dmtoolz", oPC, 1); + + //This message is here for a reason! + DelayCommand(10.0, SendMessageToPC(oPC, + "You have been given DM Items and your DM Character was saved," + + " please login with the updated version of your DM Character and" + + " delete the original, thank you.")); + + //You may want to create a journal tagnamed "dmrules" and define + //what your DMs are not allowed to do here.. + //simply delete the // on the line below to activate the jounral entry + //AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); + } +} + +///////////////////////////////////////////////////////////////////////////// +//SimTools & Higher Ground's Legendary Leveler Functions +//////////////////////////////////////////////////////// + string sCDKey = GetPCPublicCDKey(oPC); + + Speech_OnClientEnter(oPC); + int nPerm, nPerm2; + if (USING_NWNX_DB) + { + nPerm = GetPersistentInt(GetModule(), "FKY_CHT_BANSHOUT" + sCDKey); + nPerm2 = GetPersistentInt(GetModule(), "FKY_CHT_BANPLAYER" + sCDKey);; + if (ENABLE_LANGUAGES) DoLanguageSetupNWNX(oPC); + } + else //using Bioware db + { + nPerm = GetCampaignInt("FKY_CHT", "FKY_CHT_BANSHOUT" + sCDKey); + nPerm2 = GetCampaignInt("FKY_CHT", "FKY_CHT_BANPLAYER" + sCDKey); + if (ENABLE_LANGUAGES) DoLanguageSetupBio(oPC); + } + if (nPerm) SetLocalInt(oPC, "FKY_CHT_BANSHOUT", TRUE); + if (nPerm2 || GetLocalInt(oPC, "FKY_CHT_BANPLAYER")) DoBoot(oPC);//Boot them if Valid Object + + + //below removes the Letoscript string so the changes won't be applied again on the next logout + string Script = GetLocalString(oPC, "LetoScript"); + if( Script != "" ) + { + SetLocalString(oPC, "LetoScript", ""); + } + +/////////////////////////////////////////////// + +//Let's make sure that the following code is only executed +//on Players and not DMs.. + +if(!GetIsPC(oPC))return; +if(GetIsDMPossessed(oPC))return; +if(GetIsDM(oPC))return; + +//////////////////////////////////////////////////////////////////////// +////////JOURNAL ENTRIES//////// +/////////////////////////////// +//These function add journal entries by the tag names below +//If you do not have these journal entries you can create them +//I only included the 1st entry (1). +AddJournalQuestEntry("severrules", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); + + +//////////////////IMPORTANT////////////////IMPORTANT//////////////////////// + +//This function scans the Entering PC to see if they have a legal character. +//Delete the // Below to activate the anti-cheat script +//DelayCommand(9.0, ExecuteScript("cheatercheck2", oPC)); + +///////////////////////////////////////////////////////////////////////////// +//If level 40 lets do some cool stuff to them :) (optional of course) +//Simply type // before any effect you do not wish to apply... + if(GetHitDice(oPC) == 40) + { + //Lets make the concealed 40% + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Lets make the look like a ghost.. :) + ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); + + } + +////////////////////////////////////////////////////////////////////////////// + +//This is the immortal option, you must utilize the makeimmortal script +//to make players immortal (please read that script.) +if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) +{ +//Run this script on the player (See script to configure settings) +ExecuteScript("powerimmortal", oPC); +} + +////////////////////////////////////////////////////////////////////////////// + +//If a player has been found with an illegal character they will have this item. +//It will prevent them from logging onto your server with that character. +if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) + { + AssignCommand(oPC, ClearAllActions()); + + SetCutsceneMode(oPC, TRUE); + + SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA); + + DelayCommand(4.0, FloatingTextStringOnCreature("You have an illegal character which is not allowed on this server.", oPC)); + + DelayCommand(5.0, SetCutsceneMode(oPC, FALSE)); + + DelayCommand(6.0, BootPC(oPC)); + + } + +//Since the player was dead when they logged, kill them! +if (GetItemPossessedBy(oPC, "death")!= OBJECT_INVALID) + { + effect eEffect; + eEffect = EffectDeath(); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); + SendMessageToPC(oPC, "You died because you were dead when you logged out."); + } + +////////////////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////// +//Let's see if the player's character has been banned from the module.. +//Not the save as a player being banned altogether.. +if(nBann ==1) +{ +//Boot the PC fast! +DelayCommand(3.9, BootPC(oPP)); +return; +} +//Let's see if the player playing the character has been banned altogether! +if(GetCampaignInt(GetName(GetModule()), "BANN", oPP)==TRUE) +{ +//If so boot them fast! +DelayCommand(3.5, BootPC(oPP)); + +//In Case They Can't be Booted..(Allow them to enter the module first..) +//Then lock thier game down! (Note; You cannot have a script in OnCutscenAbort!) +DelayCommand(9.0, SetCutsceneMode(oPP, TRUE, FALSE)); +//They can't see nothing! +DelayCommand(9.1, FadeToBlack(oPP, FADE_SPEED_FAST)); +//Turn them into a chiken :) +DelayCommand(9.2, ApplyEffectToObject +(DURATION_TYPE_PERMANENT, EffectPolymorph(113, TRUE), oPP)); +DelayCommand(9.3, ExportSingleCharacter(oPP)); //Make the polymorph permanent! +return; +} + +////////////////////////////////////////////////////////////////////////////// +//Let's prevent badly named characters from logging onto the server.. + +// /*(Delete the // at the start of this line to deactivate this section) + +//Let's verify they have a legal name! + +//NOTE This function works in conjunction with another script +//in which an NPC at the start verifies if the PC is playing a legal name. + +//If the first 2 or last 2 letters of their name are bad.. +if(nBad==1) +{ +//Delay the following to allow the PC to enter the module.. +DelayCommand(10.0, +FloatingTextStringOnCreature("You character name is not allowed!", oPP)); + + +return; +} + +else // (do not touch this line!) */ +{ +//Welcome to them to the server.. +DelayCommand(5.0, SendMessageToPC(oPP, +"Welcome to this CEP2 Persistent Module Created by Genisys")); +} + +/////////////////////////////////////////////////////////////// + +//If the player has been inside of a party room, but logged out, then +//teleport them to the start and take the token! +if (GetItemPossessedBy(oPC, "partyroom")!= OBJECT_INVALID) + { + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="partyroom") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + + aTarget = GetWaypointByTag("home"); + bTarget = GetLocation(aTarget); + + if (GetAreaFromLocation(bTarget)==OBJECT_INVALID) return; + + //Allow them to fully enter the module.. + DelayCommand(8.0, AssignCommand(oPC, ClearAllActions())); + DelayCommand(8.1, AssignCommand(oPC, ActionJumpToLocation(bTarget))); + + } + +////////////////////////////////////////////////////////////////////////////// + +//Remove all Arena Tokens on enter.. + +if (GetItemPossessedBy(oPC, "arenatoken")!= OBJECT_INVALID) + { + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="arenatoken") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + } + +//End Script +} diff --git a/_module/_removed files/everclientexit.nss b/_module/_removed files/everclientexit.nss new file mode 100644 index 00000000..bade40a1 --- /dev/null +++ b/_module/_removed files/everclientexit.nss @@ -0,0 +1,358 @@ +//Script Name: everclientexit +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 7/05/08 (Updated_8/10/08) +///////////////////////////////////////// +/* +This is my premier CEP2 - NWNX2 / Leto +OnClientExit Event Script. +*/ +///////////////////////////////////////////////////////////////// +/* +This script does multiple things, it checks to see if... +If the PC is immortal or level 40 (apply special effects) +If the character they have has been banned. (not a total bann) +If they logged out while dead, if so make them dead instantly!!! ;) +If the player is playing a legal character or not...read below.. +And if the Player themself have been banned from the module or not.. +*/ +////////////////////////////////////////////////////////////////////// + +//Redundant Variables Declared +effect eEffect; +int nInt; +object oItem; +object aTarget; +location bTarget; + + +//////////////////////////////////////// +//Required Includes +//#include "hgll_func_inc" +#include "fky_chat_inc" +///////////////////////////////////////// + +//PROTOTYPE DECLARED +void SendMessageToAllPC(string sMessage); + +///////////////////////////////////////// + +//Main Script +void main() +{ + +//Declare Major Variables.. +object oPC; +oPC = GetEnteringObject(); +object oTarget; +oTarget = oPC; +object oPlayer = oPC; +object oPP = oPC; + +object oInfo = GetItemPossessedBy(oPP, "pcidname"); +string sID = GetStringRight(GetName(oInfo), 14); + +//This means the entering Character has been banned. +int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); + +object oTag; +location lTag; + +//This part is about verifying the Player's name.. +//A player must have at least a 2 character name or they are going to +//return with an error! If they have spaces in their name it will return +//with an error as well, including alt code! +string sPCNM = GetName(oPP); +string sPCNMR = GetStringRight(sPCNM, 2); +string sNC1; string sNC2; string sRNC1; string sRNC2; +int nBad; + +//Find the second character of the players name.. +sNC1 = GetSubString(sPCNM, 0, 1); +//Find the second character of the players name.. +sNC2 = GetSubString(sPCNM, 0, 2); +//Find the last letter in the player's name. +sRNC1 = GetSubString(sPCNMR, 0, 1); +//Find the next to the last letter in the player's name. +sRNC2 = GetSubString(sPCNMR, 0, 2); + +//////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////// +//Sim Tools & Legendary Level Functions.. +////////////////////////////////////////////////////// + object M = GetModule(); + + string Script = GetLocalString(oPC, "LetoScript"); + + if( Script != "" ) + { + SetLocalString(oPC, "LetoScript", ""); + LetoScript(Script); + } + +Speech_OnClientExit(GetExitingObject()); + +//////////////////////////////////////////////////////////////////// + +//Your Code Goes here.. + +/////////////////////////IMPORTANT////////////////////////////////// +//You must make all the "" below into " " to check for legal names +//I turned it off because a lot of my characters have bad names! +//Simply put the cursor between "" and hit the space bar for "" to " " +if(sNC1 =="") +{ nBad =1; } +else if(sNC2 =="") +{ nBad =1; } +else if(sRNC1 =="") +{ nBad =1; } +else if(sRNC2 =="") +{ nBad =1; } +else { nBad = 0; } + +//See below to activate this system.. + +//////////////////////////////////////////////////////////////////////// +//If it's a DM entering the module... +if(GetIsDM(oPC)) +{ + //If the DM has never logged on before.. + if(GetItemPossessedBy(oPC, "dmtoolz")==OBJECT_INVALID) + { + //Change "dmtoolz" to the tag name of any items you want given to DMs + //the first time they enter only...(copy / paste for more items) + //simply type // at the start of a line to deactivate it.. + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + //CreateItemOnObject("dmtoolz", oPC, 1); + + //This message is here for a reason! + DelayCommand(10.0, FloatingTextStringOnCreature( + "You have been given DM Items and your DM Character was saved," + + " please login with the updated version of your DM Character and" + + " delete the original, thank you.", oPC, FALSE)); + + //You may want to create a journal tagnamed "dmrules" and define + //what your DMs are not allowed to do here.. + //simply delete the // on the line below to activate the jounral entry + //AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); + } +} + + +//This is for the rest of the script, if it's not a PC stop here! +if(!GetIsPC(oPC))return; + + +///////////////////////////////////////////////////////////////////////////// + +//These function add journal entries by the tag names below +//If you wish to create more, just copy / paste and change +//The tagname which is in "here", and the entry # remains 1 only! +AddJournalQuestEntry("rules", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("pcinfo", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); + +//////////////////IMPORTANT////////////////IMPORTANT//////////////////////// + +//This function scans the Entering PC to see if they have a legal character. +//Delete the // Below to activate the anti-cheat script +//DelayCommand(9.0, ExecuteScript("cheatercheck2", oPC)); + +///////////////////////////////////////////////////////////////////////////// +//If level 40 lets do some cool stuff to them :) (optional of course) +//If you do not wish to use this options you will need to delete the // below + // /* <<(don't touch this part) + + if(GetHitDice(oPC) == 40) + { + //Lets make the concealed 40% + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Lets make the look like a ghost.. :) + ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); + + } + +// don't touch this line */ +////////////////////////////////////////////////////////////////////////////// + +//This is the immortal option, you must utilize the "makeimmortal" script +//to make players immortal (please read that script.) +if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) +{ +//Run this script on the player (See script to configure settings) +ExecuteScript("powerimmortal", oPC); +} + +////////////////////////////////////////////////////////////////////////////// + +//If a player has been found with an illegal character they will have this item. +//It will prevent them from logging onto your server with that character. +//Note this will only work if you have activated the Anti-Cheat option above! +if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) + { + AssignCommand(oPC, ClearAllActions()); + + SetCutsceneMode(oPC, TRUE); + + SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA); + + DelayCommand(4.0, FloatingTextStringOnCreature("You have an illegal character which is not allowed on this server.", oPC)); + + DelayCommand(5.0, SetCutsceneMode(oPC, FALSE)); + + DelayCommand(6.0, BootPC(oPC)); + + } + +//////////////////////////////////////////////////////////////////////////// + +//Since the player was dead when they logged, kill them! +if (GetItemPossessedBy(oPC, "death")!= OBJECT_INVALID) + { + effect eEffect; + eEffect = EffectDeath(); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); + SendMessageToPC(oPC, "You died because you were dead when you logged out."); + } + +////////////////////////////////////////////////////////////////////////////// +//This function is currently disabled (Not in use, may be used later on) + +/* +//Let's make sure All players have a valid PC Name ID Item.. +if(oInfo==OBJECT_INVALID) +{ + //Open the "eq_pcidname" script to learn more + CreateItemOnObject("pcidname", oPP, 1); +} // */ + + +//////////////////////////////////////////////////////////////////////// +//Let's see if the entering CHARACTER has been banned from the module.. +//Not the save as a player being banned altogether.. +if(nBann ==1) +{ +//Boot the PC fast! +DelayCommand(3.9, BootPC(oPP)); +return; +} +//Let's see if the player has been banned altogether! +//Note the TRUE after oPP = Single Player / FALSE = Multiplayer Mode +if(GetCampaignInt(GetName(GetModule()), "BANN", oPP)==TRUE) +{ +//If so boot them fast! +DelayCommand(3.5, BootPC(oPP)); + +//In Case They Can't be Booted..(Allow them to enter the module first..) +//Then lock thier game down! (Note; You cannot have a script in OnCutscenAbort!) +DelayCommand(9.0, SetCutsceneMode(oPP, TRUE, FALSE)); +//They can't see nothing! +DelayCommand(9.1, FadeToBlack(oPP, FADE_SPEED_FAST)); +//Turn the PC into a punk chicken :) +DelayCommand(9.2, ApplyEffectToObject +(DURATION_TYPE_PERMANENT, EffectPolymorph(113, TRUE), oPP)); +DelayCommand(9.3, ExportSingleCharacter(oPP)); //Make it permanent! +return; +} + +////////////////////////////////////////////////////////////////////////////// +//Let's prevent badly named characters from logging onto the server.. + +//Delete the /* below this line to activate the name checking system. +/* + +//Let's verify the Entering PC has a legal name! + +//NOTE This function works in conjunction with another script +//in which an NPC at the start verifies if the PC is playing a legal name. + +//If the first 2 or last 2 letters of their name are bad.. +if(nBad==1) +{ +//Delay the following to allow the PC to enter the module.. +DelayCommand(10.0, +FloatingTextStringOnCreature("You character name is not allowed!", oPP)); + +//Tell the database the player character is banned +DelayCommand(11.0, SetCampaignInt(GetName(GetModule()), "BANN", 1, oPP)); + +//Boot the PC +DelayCommand(14.0, BootPC(oPP)); + +return; +} + +else +{ +//do nothing.. +} + +// (do not touch this line!) */ +/////////////////////////////////////////////////////////////// + +//If the player has been inside of a party room, but logged out, then +//teleport them to the start and take the token! +if (GetItemPossessedBy(oPC, "partyroom")!= OBJECT_INVALID) + { + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="partyroom") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + + aTarget = GetWaypointByTag("home"); + bTarget = GetLocation(aTarget); + + if (GetAreaFromLocation(bTarget)==OBJECT_INVALID) return; + + //Allow them to fully enter the module.. + DelayCommand(8.0, AssignCommand(oPC, ClearAllActions())); + DelayCommand(8.1, AssignCommand(oPC, ActionJumpToLocation(bTarget))); + + } + +//Finally! Send this message to the PC.. + +//(Please change to match your module name) +//(I would appreciate credit to my work in your start message thanks.) + +//Welcome them PC to the server with a colorful message +DelayCommand(5.0, SendMessageToPC(oPP, + +//Enter your module name below +"Welcome to (ENTER MODULE NAME)" + //Make sure you use one space! +" a 1.68 Persistent Module " + +"Created by Genisys " + + +//Enter your name below +"Designed By: (YOUR NAME HERE)")); + + +//Main Script End +} + +//PROTOTYPE DEFINED +void SendMessageToAllPC(string sMessage) +{ + object PC = GetFirstPC(); + + while(GetIsObjectValid(PC)) + { + FloatingTextStringOnCreature(sMessage, PC); + PC = GetNextPC(); + } +} diff --git a/_module/_removed files/everheartbeat.nss b/_module/_removed files/everheartbeat.nss new file mode 100644 index 00000000..ca9bcb74 --- /dev/null +++ b/_module/_removed files/everheartbeat.nss @@ -0,0 +1,77 @@ +//Script Name: everheartbeat +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 4/20/08 (Updated 8/10/08) +///////////////////////////////////////// +/* +Some parts of this script were taken from +AW_Olorin's Paths of Ascension Module +This script goes in the OnHeartbeat +Event of the Module Properties +*/ +//////////////////////////////////////// + +//Required Include +#include "nw_i0_tool" + +//Main Script +void main() +{ + +object oPC = GetFirstPC(); + +///////////////////////////////////////////////////////////////////////////// +//Prevent Trap Setting in any area where the placeable object "No Crown" +//is located (Which is found on the custom paletted) +//I recommend you place this object anywhere you don't want traps set! + + while(GetIsObjectValid(oPC)) + { + object detector = GetNearestObjectByTag("nocrown", oPC, 0); + if (GetIsObjectValid(detector)) + { + object trap = GetNearestTrapToObject(detector, FALSE); + if ( GetTrapCreator(trap) == oPC && !GetIsDM(oPC) && GetIsPC(oPC)) + if (GetArea(oPC) != GetArea(GetObjectByTag("throneofdeath"))) + { + AssignCommand(oPC, ClearAllActions()); + AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("prison")))); + SendMessageToPC(oPC, "You have been sent to jail for setting a trap in a restricted area."); + } + } + + oPC = GetNextPC(); + } + +//////////////////////////////////////////////////////////////////////// +//GLOBAL MESSAGING SYSTEM By: AW_OLORIN (Paths of Ascension) + +// Server Time Keeper + int timekeeper = GetLocalInt(GetModule(), "loadtimer"); + SetLocalInt(GetModule(), "loadtimer", (timekeeper +1)); + + +// DM announcement check +//This feature isn't currently in Use, but DO NOT REMOVE IT!!! + int iAnnounceTimer = GetLocalInt(GetModule(),"iAnnounceTimer"); + SetLocalInt(GetModule(), "iAnnounceTimer", (iAnnounceTimer +1) ); + + + if(iAnnounceTimer >= GetLocalInt(GetModule(),"iAnnounce_Period")) + { + string sAnnouncement = GetLocalString(GetModule(),"Announcement"); + string sAuthor = GetLocalString(GetModule(),"Announcement_Author"); + SetLocalInt(GetModule(),"iAnnounceTimer",0); + if(sAnnouncement == "") return; + oPC = GetFirstPC(); + while(GetIsObjectValid(oPC)) + { + if(GetIsDM(oPC)) + SendMessageToPC(oPC,"Module wide announcement being sent, created by DM " + sAuthor + "."); + SendMessageToPC(oPC,sAnnouncement); + oPC = GetNextPC(); + } + } + +//Main Script End +} diff --git a/_module/_removed files/evermodload.nss b/_module/_removed files/evermodload.nss new file mode 100644 index 00000000..d4857865 --- /dev/null +++ b/_module/_removed files/evermodload.nss @@ -0,0 +1,167 @@ +//////////////////////////////////// +//Created by Genisys / Guile 7/05/08 +//////////////////////////////////// +/* +script name: evermodload + +This is my premier NWNX2 / Leto +CEP2 OnModuleLoad Event Script + +*/ +//////////////////////////////////// + +#include "fky_chat_inc" +#include "x2_inc_switches" +#include "x2_inc_restsys" +#include "aps_include" +#include "x2_inc_restsys" +#include "se_inc_reset" + + +///SCRIPT MAIN//////// +void main() +{ + +//The NWNX2 Reset Plugin Function +//the first # must be 1 month Higher than the current module month! +//see the script "se_inc_reset" to see how it works.. +SE_NWNX_ResetModuleCheck(7, 30.0, 120.0); + +//////////////////////////////////////////////////////////////////////// + +//This sets color in Tokens in conversatoins, it requires that +//you use the #s below for tokens, ie, where +//you want the text to be colorized. +string sColor = GetName(GetObjectByTag("COLORS")); + +SetCustomToken(1001, GetSubString(sColor, 0, 6)); //white +SetCustomToken(1002, GetSubString(sColor, 6, 6)); //yellow +SetCustomToken(1003, GetSubString(sColor, 12, 6)); //magenta +SetCustomToken(1004, GetSubString(sColor, 18, 6)); //cyan +SetCustomToken(1005, GetSubString(sColor, 24, 6)); //red +SetCustomToken(1006, GetSubString(sColor, 30, 6)); //green +SetCustomToken(1007, GetSubString(sColor, 36, 6)); //blue + +//More Custom Tokens for Conversations +//By GENISYS (Guile) + + SetCustomToken(100, ""); // CLOSE tag + SetCustomToken(101, ""); // red + SetCustomToken(102, ""); // green + SetCustomToken(103, ""); // blue + SetCustomToken(104, ""); // cyan + SetCustomToken(105, ""); // magenta + SetCustomToken(106, ""); // yellow + SetCustomToken(107, ""); // black + SetCustomToken(108, ""); // dark red + SetCustomToken(109, ""); // dark green + SetCustomToken(110, ""); // dark blue + SetCustomToken(111, ""); // dark cyan + SetCustomToken(112, ""); // dark magenta + SetCustomToken(113, ""); // dark yellow + SetCustomToken(114, ""); // grey + SetCustomToken(117, ""); // dark grey + SetCustomToken(115, ""); // orange + SetCustomToken(116, ""); // dark orange + SetCustomToken(117, ""); // brown + SetCustomToken(118, ""); // dark brown + SetCustomToken(119, ""); // Light Purple + SetCustomToken(120, ""); // Neon Green + SetCustomToken(121, ""); // Light Blue + SetCustomToken(122, ""); // Purple + SetCustomToken(123, ""); //Neon Green + +/////////////////AUTOMATIC CHARACTER SAVING FUCTION//////////////////////// +//Note this function is Polymorphing Friendly (Designed for that purpose!) + +//This feature stores All PC's location on the module ever 3 minutes... +//To deactivate this feature, simply type // at the start of the line below. + +//DelayCommand(60.0, ExecuteScript("savepcinfo", OBJECT_SELF)); + +////////////////////////////////////////////////////////////////////////// + +//This is part of the SimTools by Funkyswerve... + // Init placeholders for ODBC gateway + SQLInit(); + // Init placeholders for chat gateway + InitSpeech(); + +/////////////MAIN BIOWARE X2 FUNCTIONS (DO NOT REMOVE!)///////////// + + if (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT) + { + // * Setting the switch below will enable a seperate Use Magic Device Skillcheck for + // * rogues when playing on Hardcore+ difficulty. This only applies to scrolls + SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE); + + // * Activating the switch below will make AOE spells hurt neutral NPCS by default + // SetModuleSwitch (MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE); + } + + // * AI: Activating the switch below will make the creaures using the WalkWaypoint function + // * able to walk across areas + // SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE); + + // * Spells: Activating the switch below will make the Glyph of Warding spell behave differently: + // * The visual glyph will disappear after 6 seconds, making them impossible to spot + SetModuleSwitch (MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING, TRUE); + + // * Craft Feats: Want 50 charges on a newly created wand? We found this unbalancing, + // * but since it is described this way in the book, here is the switch to get it back... + SetModuleSwitch (MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES, TRUE); + + // * Craft Feats: Use this to disable Item Creation Feats if you do not want + // * them in your module + // SetModuleSwitch (MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS, TRUE); + + // * Palemaster: Deathless master touch in PnP only affects creatures up to a certain size. + // * We do not support this check for balancing reasons, but you can still activate it... + // SetModuleSwitch (MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH, TRUE); + + // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this + // * did not fit into NWNs spell system and was confusing, so we took it out... + // SetModuleSwitch (MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE); + + // * Spellcasting: Some people don't like caster's abusing expertise to raise their AC + // * Uncommenting this line will drop expertise mode whenever a spell is cast by a player + // SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE); + + + // * Item Event Scripts: The game's default event scripts allow routing of all item related events + // * into a single file, based on the tag of that item. If an item's tag is "test", it will fire a + // * script called "test" when an item based event (equip, unequip, acquire, unacquire, activate,...) + // * is triggered. Check "x2_it_example.nss" for an example. + // * This feature is disabled by default. + SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE); + + if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) + { + // * If Tagbased scripts are enabled, and you are running a Local Vault Server + // * you should use the line below to add a layer of security to your server, preventing + // * people to execute script you don't want them to. If you use the feature below, + // * all called item scrips will be the prefix + the Tag of the item you want to execute, up to a + // * maximum of 16 chars, instead of the pure tag of the object. + // * i.e. without the line below a user activating an item with the tag "test", + // * will result in the execution of a script called "test". If you uncomment the line below + // * the script called will be "1_test.nss" + // SetUserDefinedItemEventPrefix("1_"); + + } + + // * This initializes Bioware's wandering monster system as used in Hordes of the Underdark + // * You can deactivate it, making your module load faster if you do not use it. + // * If you want to use it, make sure you set "x2_mod_def_rest" as your module's OnRest Script + // SetModuleSwitch (MODULE_SWITCH_USE_XP2_RESTSYSTEM, TRUE); + + if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE) + { + + // * This allows you to specify a different 2da for the wandering monster system. + // SetWanderingMonster2DAFile("des_restsystem"); + + //* Do not change this line. + WMBuild2DACache(); + } + +} diff --git a/_module/_removed files/everpcdeath.nss b/_module/_removed files/everpcdeath.nss new file mode 100644 index 00000000..07482c0f --- /dev/null +++ b/_module/_removed files/everpcdeath.nss @@ -0,0 +1,702 @@ +//Script Name: everpcdeath +///////////////////////////////////////// +//Created By: Genisys / Guile +//Created On: 1/11/08 (Updated_8/10/08) +///////////////////////////////////////// +/* + +This is my premier OnPlayerDeath Module Event Script which I designed +specifically for all my modules, it's rather nice and is part of +multiple systems, so do not edit ANYTHING you do not know what it's for! + +*/ +//////////////////////////////////////////////////////////////////////// + +//Rquired Includes.. (Don't touch!) +#include "nw_i0_plot" +#include "x2_inc_compon" +#include "setxp_inc" + +/////////////////////////////////////////////////////////////////////////// +/////////////////IMPORTANT OPTIONAL SETTINGS/////////////////////////////// +//The constant intergal below allows you to choose where or not to utilize +//the PVP Death System I have scripted, please read below to learn more.. +//FALSE = Disabled / TRUE = Enabled +const int nPVP = TRUE; + +//This constant will decide whether or not you want to send a PVP message +//to all players when PVP transpires (This is for PVP Servers) +//FALSE = Disabled / TRUE = Enabled +const int nPVPMessage = TRUE; + +//If you wish to restrict PVP to the arena only, then.. +//Set the below setting to TRUE / FALSE = Deactivated (Default) +const int nArenaOnly = FALSE; + +//This determines the level difference allowed in PVP (default 5) +//If set to 5 players within 4 levels of each other will not be +//Penalized for Killing one another. (Works both ways!) +//Add +1 for the level you want so if you want 8 level difference make it 9! +//(Set this whether you allow PVP or not!) +const int nDif = 5; //(Between 5 - 40) / (40 = Disabled) + +//This is how you set the reward for XP given to the player for +//fair PVP Kills, this # is multiplied by the level difference! +const int nReward1 = 80; //(ie. if 3 Levels difference / 80 X 3) + +//This is how ytou set the reward for Gold given to the player for +//fair PVP Kills, this # is multiplied by the level difference! +const int nReward2 = 800; + +/////////OPTIONS END////////////////////////////////////////////////// + +////DO NOT TOUCH ANYTHING BELOW UNLESS IT SAYS - ///OPTION//// + +////////////////////////////////////////////////////////////////////// +///// This Part was Created by: bushido +///// Developed by: Wouter Dhondt +///// Modified by: Genisys / Guile For Persistency.. +//////////////////////////////////////////////////////// +//This is the PVP Stats (Used to keep track of PVP Activity) +//This allows DMs and Players to see PVP Activity. +void AdjustPlayerStats() +{ + +//Delare Variables +object oDied = GetLastPlayerDied(); +object oAttacker = GetLastHostileActor(oDied); +object oKiller; + +//Only if the player who died is a PC +if(GetIsPC(GetLastPlayerDied())) +{ + //Let's make sure we properly identify who the Attacker is... + if (GetIsPC(GetMaster(oAttacker))) + { + oKiller = GetMaster(oAttacker); + } + + else + { + //Let's make sure the Killer is a PC + if(GetIsPC(oAttacker)) + { + oKiller = oAttacker; + } + } + + // Increment or set the death variable + int iDied = GetCampaignInt("PVP_SCORE", "iDied", oDied); + int nCount = iDied + 1; + SetCampaignInt("PVP_SCORE", "iDied", nCount, oDied); + // Is this object a PC? + if (GetIsPC(oKiller) == TRUE) + { + // Increment or set the killer var + int iKilled = GetCampaignInt("PVP_SCORE", "iKilled", oKiller); + int nDeaths = iKilled + 1; + SetCampaignInt("PVP_SCORE", "iKilled", nDeaths, oKiller); + } + } + +//AdjustPlayerStats End.. +} +/////////////////////////////////////////////////////////////// +// Raise OnDeath function (Standard Bioware Function) +void Raise(object oPlayer) +{ + effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); + + effect eBad = GetFirstEffect(oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); + + //Search for negative effects + while(GetIsEffectValid(eBad)) + { + if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || + GetEffectType(eBad) == EFFECT_TYPE_DEAF || + GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || + GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) + { + //Remove effect if it is negative. + RemoveEffect(oPlayer, eBad); + } + eBad = GetNextEffect(oPlayer); + } + //Fire cast spell at event for the specified target + SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); +} + +// Respawn/Teleporter OnDeath function (By Bushido / Modified By Genisys) +// Optionally you can create the waypoints described to send the dead player +// to that location. You must create an item named arenatoken (tag & resref name) +//Then you must use give it to them & take it away from them on enter/exit of +//an area by a script, this will deem that area as the arena. +void Respawn(object oPlayer) +{ + + string waiting = "The gods show you favor, your life is restored."; + + if (GetIsDead(oPlayer)) + { + object oPC = GetLastPlayerDied(); + + if (GetItemPossessedBy(oPC, "arenatoken")!= OBJECT_INVALID) + { + //Create a way point and tagname it "arenawp" + object oTarget = GetWaypointByTag("arenawp"); + effect eTeleport = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oPlayer); + + //Tell the player why they are being restored. + FloatingTextStringOnCreature(waiting, oPC); + + //Resurrect the player + Raise(oPlayer); + + //Teleport the raised player to the arena spawn point. + DelayCommand(0.1, AssignCommand(oPlayer, ClearAllActions())); + DelayCommand(0.2, AssignCommand(oPlayer, JumpToObject(oTarget))); + } + else + { + CreateItemOnObject("death", oPC); + } + + } +} + +//////////////////////////////////////////////////////////////////////// +////////////////////////Main Script///////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +void main() +{ + + //Declare Major Variables... + object oPlayer = GetLastPlayerDied(); + object oPC = GetLastPlayerDied(); + object oTarget = oPlayer; + object oToken = GetItemPossessedBy(oPlayer, "death"); + object oItem; + object oPP = oPlayer; + string sArea = GetTag(GetArea(oPlayer)); + string sName = GetName(GetModule()); + location lDead = GetLocation(oPlayer); + + //If the player is being tortured, ressurect them... + object hell = GetArea(oPlayer); + object helltest = GetArea(GetObjectByTag("satan1")); + if (hell == helltest) + { + DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPlayer)); + return; + } + + object oInfo = GetItemPossessedBy(oPP, "pcidname"); + string sID = GetStringRight(GetName(oInfo), 14); + + //PVP Variables.. + object oDead = GetLastPlayerDied(); + object oKiller = GetLastHostileActor(oDead); + object oVictor; + object oDied; + int nInt; + int kLvl = GetHitDice(oKiller); + int pLvl = GetHitDice(oDead); + int dLvl = kLvl - pLvl; + int aLvl = pLvl - kLvl; + + effect eKill = EffectDeath(TRUE); + effect eVis = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); + + +//Define who oKiller is.. +//Define the attacker& dead guy +object oAttacker = GetLastHostileActor(oDied); +oDied = oPlayer; + + //Let's make sure we properly identify who the Attacker is... + if (GetIsPC(GetMaster(oAttacker))) + { + oKiller = GetMaster(oAttacker); + } + + else + { + //Let's make sure the Killer is a PC + if(GetIsPC(oAttacker)) + { + oKiller = oAttacker; + } + } + + //Count up & Store in Database the kills and deaths + AdjustPlayerStats(); + +///////////LOCATION SAVING OPTION///////////////////////////////// + +//Type: // Below this line to activate location saving on death + /*(Before this!) + + //Store the PC's location, because if they are ressurected they can + //come back to this place when they logg back on..(unless location changed) + SetCampaignLocation(sName, "SAVED_LOC", lDead, oPlayer); + //Tell the PC thier location was saved.. + SendMessageToPC(oPC, "Location Saved."); + + +//(leave this alone) */ +////////////////////////////////////////////////////////////// + + //Lets auto ressurect anyone in the arena and give death tokens to the others. + Respawn(oPlayer); + + // * make friendly to Each of the 3 common factions + AssignCommand(oPlayer, ClearAllActions()); + + // * Note: waiting for Sophia to make SetStandardFactionReptuation to clear all personal reputation + if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10) + { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad + SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer); + } + if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10) + { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad + SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer); + } + if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10) + { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad + SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer); + } + +////////////////////////////////////////////////////////////////////////// + + //Fancy death visual effect when they die. + location lSelf = GetLocation(oPC); + effect eVis2 = EffectVisualEffect(234); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis2, lSelf); + +///////////////////////////////////////////////////////////////////////////// + +//Have the player tell everyone around them he is dying (actually dead) + AssignCommand(oPlayer, ActionSpeakString("I'm dying, help!", + TALKVOLUME_TALK)); + +//////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////// + //Pop up the Death GUI Panel only if they don't meet the following.. + + //If the player is not immortal + if(GetItemPossessedBy(oPC, "immotoken") == OBJECT_INVALID) + { + //If the player does not have an arena token + if(GetItemPossessedBy(oPC, "arenatoken") == OBJECT_INVALID) + { + //Show the player the Death Panel + DelayCommand(2.0, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH)); + } + } + +////////////////////////PVP MESSAGE////////////////////////////////////// +///////See the const int nPVPMessage above to turn on/off)/////////////// + +if(nPVPMessage == TRUE) +{ + + + ////Send PVP Stats Messages to all PCs.///////// + //This shouts whever a player has died, who killed them and also + //alerts DMs of any pvp action going on! (Though done below as well.) + //This can also alert DM's not playing as a DM as well too! + oPC = GetFirstPC(); + int count = 0; + int nVictims = GetCampaignInt("PVP_SCORE", "iKilled", oKiller); + int vLvl = GetHitDice(oVictor); + int dLvl = GetHitDice(oPlayer); + string sKilled; + //Send Message to all PC's + sKilled = ""; + sKilled += GetName(oPlayer); + sKilled += " "; + sKilled += "Lvl "; + sKilled += IntToString(dLvl); + sKilled += " Was slain by - "; + sKilled += ""; + sKilled += GetName(oVictor); + sKilled += " "; + sKilled += "Lvl - "; + sKilled += IntToString(vLvl); + sKilled += " "; + sKilled += GetName(oVictor); + sKilled += " has "; + sKilled += IntToString(nVictims); + sKilled += " kills. "; + + //Lets make sure the killer is a PC + if(GetIsPC(oVictor)) + { + + //Write the PVP Information in the log file. (For those not allowing PVP) + WriteTimestampedLogEntry("**The Following Player: "); + WriteTimestampedLogEntry(GetPCPlayerName(oVictor)); + WriteTimestampedLogEntry(" - "); + WriteTimestampedLogEntry(GetPCPublicCDKey(oVictor)); + WriteTimestampedLogEntry(" - "); + WriteTimestampedLogEntry(GetPCIPAddress(oVictor)); + WriteTimestampedLogEntry(" ** Has Killed This Player: "); + WriteTimestampedLogEntry(GetName(oPlayer)); + WriteTimestampedLogEntry(" - "); + WriteTimestampedLogEntry(GetPCPlayerName(oPlayer)); + + while (GetIsPC(oPC) == TRUE) + { + SendMessageToPC(oPC, sKilled); + oPC = GetNextPC(); + } + + } + +//end PVP message function + } + +////////////NO PVP ON SERVER ALLOWED!/////////// + +//IF PVP IS NOT ALLOWED! +if(nPVP == FALSE) +{ +object oDumbo; +//If it's not a PC let's make sure an associate of a PC has not killed the PC +if(!GetIsPC(oKiller)) +{ + //Let's get the master of the asscoiate.. + if(GetIsPC(GetMaster(oKiller))) + { + oDumbo = GetMaster(oKiller); + } +} +//Otherwise let's make sure the Attacker is a PC.. +else +{ + if(GetIsPC(oKiller)) + { + oDumbo = oKiller; + } +} + + //Let's Double Check to make sure it's a PC who killed the PC. + if(GetIsPC(oDumbo)) + { + + //Apply the respawn penalty to the Killer instead!! + ApplyRespawnPenalty(oDumbo); + + //Raise the Player Who Died without a penalty + //Note these must be delayed because of GUI Panel! + DelayCommand(2.1, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.2, Raise(oDead)); + + //Remove the death token from the dead guy + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + + string sBadPC = GetName(oDumbo); + sBadPC += " / "; + sBadPC += GetPCPlayerName(oDumbo); + sBadPC += " / "; + sBadPC += GetPCPublicCDKey(oDumbo); + sBadPC += " Has killed - "; + sBadPC += GetName(oPC); + sBadPC += " In the "; + sBadPC += GetName(GetArea(oPC)); + sBadPC += " Area."; + + //Send Message to All DMs about the Attack.. + SendMessageToAllDMs(sBadPC); + } + +//End No PVP Check.. +} + +//////////IF PVP IS RESTRICTED TO THE ARENA////////////// + +if(nArenaOnly == TRUE) +{ + //If a PC kills a PC outside of the arena.. + if(GetItemPossessedBy(oDead, "arenatoken")==OBJECT_INVALID) + { + + //Raise the Player Who Died + DelayCommand(2.3, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.4, Raise(oDead)); + + //Remove the death token from the dead guy + oItem = GetFirstItemInInventory(oDead); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oDead); + } + + //Kill the offender and alert the DMs! + //Type // below at the start of the line to deactivate! + ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); + + //Apply the respawn penalty to the Killer instead!! + ApplyRespawnPenalty(oKiller); + + //Send Message to All DMs about the Attack.. + string sArena; + sArena = GetName(oKiller); + sArena += " / "; + sArena += GetPCPlayerName(oKiller); + sArena += " "; + sArena += "Has killed - "; + sArena += GetName(oDead); + sArena += "Outside of the Arena!"; + + SendMessageToAllDMs(sArena); + } + +} +/////////////////////////////////////////////////////////////////////////// +//////////////////PVP SCRIPT FUNCTIONS///////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +///////PVP Option (See the const int nPVP above to turn on/off)/////// +if (nPVP == TRUE) +{ + +//////Start PVP Reward/Penalty Function////// + + +//Only continue if the killer is a PC! +if(GetIsPC(oKiller) == TRUE) +{ + + //More PVP Variables + + //Get the Killer's HD + nDif + 1 + int nAdj = GetHitDice(oKiller) + 1; + int nCheck = nAdj + nDif; + //Will return 1 or less if they are more than nDif levels + //lower than the person they killed + int nDeed = nCheck - pLvl; + + //Ok, this part rewards players for killing players who kill low + //level players, if they are flagged for killing low level players, + //and anyone can easially recognized them by the flag on thier back. + if(GetLocalInt(oDead, "effer") >=1) + { + //Lower their effy score by one. + nInt = GetLocalInt(oDead, "effer"); + nInt -= 1; + //Decrement thier effer status (because they got killed) + SetLocalInt(oDead, "effer", nInt); + +//If they are at 0 Effy Kills, Remove the flag from them +//Otherwise they can be killed again!!! (After it's been lowered!) + if (GetLocalInt(oDead, "effer") <=0) + { + effect eEffect; + eEffect = GetFirstEffect(oDead); + while (GetIsEffectValid(eEffect)) + { + if (GetEffectType(eEffect)==EFFECT_TYPE_VISUALEFFECT) + { + //Note sure about this one! + if (EFFECT_TYPE_VISUALEFFECT == VFX_DUR_FLAG_RED) + { + RemoveEffect(oDead, eEffect); + eEffect = GetNextEffect(oDead); + } + } + + } + + //Now reward the Killer of the bad player with the flag. + //Adjust to your likings. + GiveGoldToCreature(oKiller, 5000); + GiveXPToCreature(oKiller, 500); + + } + } + + //If the player is too low of a level + //Punish them for killing a much high level player. + //This is to prevent lower level players from killing higher + //level players (which allows the higher levels to ignore them!) + if (nDeed <=1) + { + //Flag them as an Effy Killer (Because they are picking fights!) + nInt = GetLocalInt(oKiller, "effer"); + nInt += 1; + + int nKind; + nKind = GetObjectType(oKiller); + + if (nKind != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), oKiller); + else ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), GetLocation(oKiller)); + + SetLocalInt(oKiller, "effer", nInt); + + //Raise the Player Who Died without a penalty + //Note these must be delayed because of GUI Panel! + DelayCommand(2.1, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.2, Raise(oDead)); + + //Remove the death token from the dead guy + oItem = GetFirstItemInInventory(oDead); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oDead); + } + + //Kill the offender & take xp/gold + //Type // below at the start of the line to deactivate! + ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); + + //Penalize the killer Gold / XP + ApplyRespawnPenalty(oKiller); + + AssignCommand(oKiller, ClearAllActions()); + AssignCommand(oKiller, ActionSpeakString("I have offended the Gods and must be punished!!!", TALKVOLUME_SHOUT)); + + //Notify the DMs + SendMessageToAllDMs("We have an effy kill in progress, please investigate" + + GetName(oKiller) + ". Has Killed Player " + GetName(oDead)); + //end low level check. + } + + //If the killer is 5 levels higher than the player they kill + int aCheck = dLvl; + if(aCheck >= nDif) + { + //Flag them as an Effy Killer + int nInt; + nInt = GetLocalInt(oKiller, "effer"); + nInt += 1; + + int nKind; + nKind = GetObjectType(oKiller); + + if (nKind != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), oKiller); + else ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), GetLocation(oKiller)); + + SetLocalInt(oDead, "effer", nInt); + + //Raise the Player Who Died + //This must be delayed due to the GUI Panel that pops up. + DelayCommand(2.1, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.2, Raise(oDead)); + + //Remove the death token from the dead guy + object oItem; + oItem = GetFirstItemInInventory(oDead); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oDead); + } + + //Kill the offender & take xp/gold + //Type // below at the start of the line to deactivate! + ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); + + //Take XP & Gold from the Offending Killer + if (GetHitDice(oKiller)<40)//Only if less than level 40 + { + SetXP(oKiller,GetXP(oKiller)-1000);//NOTE: They can Lose a Level! + } + + //Remove Gold / XP from the Offender + ApplyRespawnPenalty(oKiller); + + //Make them shout that they have been bad... + AssignCommand(oKiller, ClearAllActions()); + AssignCommand(oKiller, ActionSpeakString + ("I have offended the Gods and must be punished!!!", TALKVOLUME_SHOUT)); + + //Notify the DMs + SendMessageToAllDMs("We have a low level bashing in progress, please investigate" + + GetName(oKiller) + ". Has Killed Player " + GetName(oPlayer)); + +//End Effy Check.. + } + +//This is the reward of fair PVP + + //Lets make sure the killer is at least 1 level + //lower than the player they kill + else if(aLvl >= 1) + { + //award xp/gold by level difference, + //If the player is 1 to nDif levels lower than the player they kill + if (aLvl <=nDif) + { + //Adjust this to your likings.. + int nXP = aLvl * nReward1; + int nGold = aLvl * nReward2; + + GiveXPToCreature(oKiller,nXP); + GiveGoldToCreature(oKiller,nGold); + //The dead guy shouts how he lost badly. :) + AssignCommand(oDead, ActionSpeakString("I got pwned!!", TALKVOLUME_SHOUT)); + } + + } + + //If the killer is at least 1 level higher than the player they kill + else if (dLvl <=nDif) + { + //Lets make sure the killer is within 1-4 Level difference + if (dLvl >=1) + { + int nXP = dLvl * nReward1; + int nGold = dLvl * nReward2; + + GiveXPToCreature(oKiller,nXP); + GiveGoldToCreature(oKiller,nGold); + //The dead guy shouts how he lost badly. :) + AssignCommand(oDead, ActionSpeakString("I got pwned!!", TALKVOLUME_SHOUT)); + } + } + //end pc check + } + //end pvp function + } + +///////////////////////////////////////////////////////////////////////// + +//Script End WOOSH!! +} diff --git a/_module/_removed files/everpcdying.nss b/_module/_removed files/everpcdying.nss new file mode 100644 index 00000000..97f4d38f --- /dev/null +++ b/_module/_removed files/everpcdying.nss @@ -0,0 +1,104 @@ +//:://///////////////////////////////////////////// +//:: Script Name: everpcdying +//::////////////////////////////////////////////// +/* + This script handles the default behavior + that occurs when a character is dying. Dying + is when the character is between 0 and -9 hit + points; -10 and below is death. To use, redirect + the OnDying event script of the module to this script. +*/ +//::////////////////////////////////////////////// +//:: Author : Scott Thorne +//:: Updated: July 25, 2002 +//::////////////////////////////////////////////// +//::Modified by Genisys (Guile) +//::Modified On: 4/23/08 (Updated 8/10/08) +////////////////////////////////////////////////// + +//Required Include +#include "nw_i0_tool" + +//PROTOTYPE DECLARED +void bleed(int iBleedAmt); + +//Main Script +void main() +{ + //Declare Major Variables + object oDying = GetLastPlayerDying(); + object oPlayer = GetLastPlayerDying(); + object oPC = GetLastPlayerDying(); + string ddVarName = "dd"+GetName(oPC); + object oModule = GetModule(); + SetLocalInt (oModule, ddVarName, 1); + + //If the player is being tortured in Hell, ressurect them... + object hell = GetArea(oPlayer); + object helltest = GetArea(GetObjectByTag("satan1")); + if (hell == helltest) + { + DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPlayer)); + return; + } + + AssignCommand(oDying, ClearAllActions()); + AssignCommand(oDying, bleed(1)); + +//Main Script End +} + +//PROTOTYPE DEFINED +void bleed(int iBleedAmt) +{ + + object oPC = GetLastPlayerDying(); + if (!GetIsPC(oPC)){ +return; +} + string ddVarName = "dd"+GetName(oPC); + object oModule = GetModule(); + effect eBleedEff; + + /* keep executing recursively until character is dead or at +1 hit points */ + if (GetCurrentHitPoints() <= 0) { + + /* a positive bleeding amount means damage, otherwise heal the character */ + if (iBleedAmt > 0) { + eBleedEff = EffectDamage(iBleedAmt); + } else { + eBleedEff = EffectHeal(-iBleedAmt); /* note the negative sign */ + } + + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBleedEff, OBJECT_SELF); + + /* -10 hit points is the death threshold, at or beyond it the character dies */ + if (GetCurrentHitPoints() <= -10) { + SetLocalInt (oModule, ddVarName, 1); + PlayVoiceChat(VOICE_CHAT_DEATH); /* scream one last time */ + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), OBJECT_SELF); /* make death dramatic */ + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF); /* now kill them */ + return; + } + + if (iBleedAmt > 0) { /* only check if character has not stablized */ + if (d10(1) == 1) { + /* 10% chance to stablize */ + iBleedAmt = -iBleedAmt; /* reverse the bleeding process */ + PlayVoiceChat(VOICE_CHAT_LAUGH); + /* laugh at death -- this time */ + } else { + switch (d6()) { + case 1: PlayVoiceChat(VOICE_CHAT_PAIN1); break; + case 2: PlayVoiceChat(VOICE_CHAT_PAIN2); break; + case 3: PlayVoiceChat(VOICE_CHAT_PAIN3); break; + case 4: PlayVoiceChat(VOICE_CHAT_HEALME); break; + case 5: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break; + case 6: PlayVoiceChat(VOICE_CHAT_HELP); + } + } + } + DelayCommand(6.0,bleed(iBleedAmt)); /* do this again next round */ + } +} diff --git a/_module/_removed files/everpcequip.nss b/_module/_removed files/everpcequip.nss new file mode 100644 index 00000000..7801a67a --- /dev/null +++ b/_module/_removed files/everpcequip.nss @@ -0,0 +1,85 @@ +//Script Name: everpcequip +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 5/10/08 (updated 8/10/08) +///////////////////////////////////////// +/* +This script handles the equipping of all items tagged "arena" +Players cannot equip items in the arena unless it's tagnamed "arena" +Likewise players cannot equipt items tagnamed "arena" outside of the arena. +*/ +//////////////////////////////////////// +//Required Include +#include "x2_inc_switches" + +//Main Script +void main() +{ + //Declare Major Variables + object oItem = GetPCItemLastEquipped(); + object oPC = GetPCItemLastEquippedBy(); + int nSlot; + object nItem; + + +//You need to assign the tagname "TheArena" to any areas you deem as an Arena +//All items tagnamed "Arena" are unequipped if the person is NOT in the Arena. +//All Non-Arena items are unequipped if the player is IN the Arena + +//If the player is in the arena and eqiupping a non-arena item + if(GetTag(GetArea(oPC)) == "TheArena") + { + for (nSlot=0; nSlot=40) +{ + //Lets make the concealed 40% + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Lets make the look like a ghost.. :) + ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); + +} + +//Send them to Fugue +oTarget = GetWaypointByTag("respawnpt"); +lTarget = GetLocation(oTarget); + +//Apply a respawn penalty (See the setxp_inc script) +ApplyRespawnPenalty(oPC); + +//If the location is valid, send them there.. +if (GetArea(GetAreaFromLocation(lTarget))!=OBJECT_INVALID) +{ + +//Send the PC to the waypoint tagnamed "deathway" +AssignCommand(oPC, ClearAllActions()); +AssignCommand(oPC, ActionJumpToLocation(lTarget)); +} + +//Otherwise if the area is not valid.. +else +{ +//Otherwise they respawn where they died. +} + +//Main Script End +} + +//////BIOWARE STANDARD Raise OnDeath FUNCTION/////////// + +//PROTOTYPE DEFINED +// Raise OnDeath function +void Raise(object oPlayer) +{ + effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); + + effect eBad = GetFirstEffect(oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); + + //Search for negative effects + while(GetIsEffectValid(eBad)) + { + if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || + GetEffectType(eBad) == EFFECT_TYPE_DEAF || + GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || + GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) + { + //Remove effect if it is negative. + RemoveEffect(oPlayer, eBad); + } + eBad = GetNextEffect(oPlayer); + } + //Fire cast spell at event for the specified target + SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); +} diff --git a/_module/_removed files/everpcrest.nss b/_module/_removed files/everpcrest.nss new file mode 100644 index 00000000..35ebcbef --- /dev/null +++ b/_module/_removed files/everpcrest.nss @@ -0,0 +1,130 @@ +//Script Name: everpcrest +/////////////////////////////////////// +//Created by Genisys / Guile +//Created on: 3/11/08 (Updated 8/10/08 +////////////////////////////////////// +/* +This is my premier OnPlayerRest +Module Properties Event script +to handle rest within all of my +module.. +*/ +////////////////////////////////////// + +//Redundant Variable +effect eEffect; + +//Main Script +void main() +{ + +//Declare Major Variables +object oPC=GetLastPCRested(); +object oPP = oPC; + +location lSaved = GetLocation(oPP); + +int nRestType=GetLastRestEventType(); +int nHD = GetHitDice(oPC); + +//Determine which Event has happened and run the script for that event. +switch (nRestType) + { + +///////////////////////////////////////////////////////////////////////////// + case REST_EVENTTYPE_REST_STARTED: + { + //Dark the screen out on the PC.. + FadeToBlack(oPC, FADE_SPEED_FAST); + + + //Your code goes here. + + + } + + break; +//////////////////////////////////////////////////////////////////////////// + case REST_EVENTTYPE_REST_FINISHED: + { + + //remove the black out from thier screen.. + FadeFromBlack(oPC, FADE_SPEED_SLOW); + + //Store the PC's location, so they can come back here after relogging + SetCampaignLocation(GetName(GetModule()), "SAVED_LOC", lSaved, oPP); + //Tell the PC their location was saved.. + SendMessageToPC(oPP, "Location Saved!"); + + FloatingTextStringOnCreature("Your character was saved.", oPC); + //Delete the // below to activate autosave when pc's finish resting. + // DelayCommand(1.0, ExportSingleCharacter(oPC)); + + if(nHD == 40) + { + //If the player is Legendary Level 60 give them a cool power! + if(GetXP(oPC) >5000000) + { + //The legendary character is immune to death! + eEffect = EffectImmunity(IMMUNITY_TYPE_ABILITY_DECREASE); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //The legendary character is immune to poison! + eEffect = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + } + + //Make ALL level 40s have 40% concealment + + //Make them harder to hit 40% miss chance... + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Apply the Ghost Like Visual to all Level 40 PCs + DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, + SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC)); + } + + //if the PC is immortal (has the immotoken) + if (GetItemPossessedBy(oPC, "immotoken")!= OBJECT_INVALID) + { + //See this script to adjust the immortal options.. + ExecuteScript("powerimmortal", oPC); + } + + + //Your code goes here. + + + } + break; + + +//////////////////////////////////////////////////////////////////////// + case REST_EVENTTYPE_REST_CANCELLED: + { + FloatingTextStringOnCreature("Your character was not saved!", oPC); + + FadeFromBlack(oPC, FADE_SPEED_MEDIUM); + + + //Your code goes here. + + } + + break; + +///////////////////////////////////////////////////////////////////////// + default: //You will probably never see this message.. + SendMessageToPC(oPC, + "If you see this message tell the DMs there is an error in the rest event script."); + + + //Switch Statement end.. + } + +//Main Script end +} diff --git a/_module/_removed files/everpcunequip.nss b/_module/_removed files/everpcunequip.nss new file mode 100644 index 00000000..e6dcf3c1 --- /dev/null +++ b/_module/_removed files/everpcunequip.nss @@ -0,0 +1,96 @@ +//:: Script Name: everpcunequip +//:://///////////////////////////////////////////// +//:: Example XP2 OnItemEquipped +//:: x2_mod_def_unequ +//:: (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +// Put into the: OnUnEquip Module Event +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-07-16 +//::////////////////////////////////////////////// +//Modified By Guile 3/24/08 (Updated 8/10/08) +//This modifcation stops a weapon switching exploit +//Which gives the makes the PC never miss!!! +/////////////////////////////////////////////////// + +//Required Includes +#include "x2_inc_switches" +#include "x2_inc_intweapon" + +//Main Script +void main() +{ + + object oItem = GetPCItemLastUnequipped(); + object oPC = GetPCItemLastUnequippedBy(); + + if (!GetIsPC(oPC)) return; + + +//This is my weapon swap pvp exploit fix +//Lets make sure they are actually fighting someone +if(GetIsInCombat(oPC)) +{ +//Lets make sure it's a weapon or shield they are unequipping +if(GetBaseItemType(oItem) != BASE_ITEM_AMULET) +{if(GetBaseItemType(oItem) != BASE_ITEM_ARROW) +{if(GetBaseItemType(oItem) != BASE_ITEM_BELT) +{if(GetBaseItemType(oItem) != BASE_ITEM_BOLT) +{if(GetBaseItemType(oItem) != BASE_ITEM_BOOTS) +{if(GetBaseItemType(oItem) != BASE_ITEM_BRACER) +{if(GetBaseItemType(oItem) != BASE_ITEM_CLOAK) +{if(GetBaseItemType(oItem) != BASE_ITEM_HELMET) +{if(GetBaseItemType(oItem) != BASE_ITEM_BULLET) +{if(GetBaseItemType(oItem) != BASE_ITEM_RING) +{ +DelayCommand(0.5, AssignCommand(oPC, ClearAllActions())); +}}}}}}}}}} +//Exploit Fix END +} + +/////////////////////////////////////////////////////////////////////////// + + +//Your Code Goes here.. + + +/////////////////////////////////////////////////////////////////////////// + +///////////////////BIOWARE XP2 FUNCTIONS/////////////////////////////////// + //Commented out because I am not using it... + /* Delete this line to activate + // ------------------------------------------------------------------------- + // Intelligent Weapon System + // ------------------------------------------------------------------------- + if (IPGetIsIntelligentWeapon(oItem)) + { + IWSetIntelligentWeaponEquipped(oPC,OBJECT_INVALID); + IWPlayRandomUnequipComment(oPC,oItem); + } + + // DO NOT TOUCH THIS LINE! */ + + +///////////////////////XP2 TAGBASED SCRIPTING CODE/////////////////////////// + + // ------------------------------------------------------------------------- + // Generic Item Script Execution Code + // If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module, + // it will execute a script that has the same name as the item's tag + // inside this script you can manage scripts for all events by checking against + // GetUserDefinedItemEventNumber(). See x2_it_example.nss + // ------------------------------------------------------------------------- + if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) + { + SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNEQUIP); + int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); + if (nRet == X2_EXECUTE_SCRIPT_END) + { + return; + } + + } + +//Main Script End +} diff --git a/_module/_removed files/everunaquire.nss b/_module/_removed files/everunaquire.nss new file mode 100644 index 00000000..2351c36a --- /dev/null +++ b/_module/_removed files/everunaquire.nss @@ -0,0 +1,108 @@ +//Script Name: onunaquireitem +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 3/05/08 (Update 8/10/08) +///////////////////////////////////////// +/* +This script goes in the OnUnAquireItem +Module Event in the Module Properties + +This script accurately nails a player +for pick pocketing another player. +It doesn't fire if they are pick +pocketing anything but a player. + +The Tag Standard Bioware Tag-Based +Scripting will still fire reguardless. +*/ +//////////////////////////////////////// + +//Required Include +#include "x2_inc_switches" +void main() +{ + +//IMPORTANT THIS MUST BE IN YOUR OnUnAcquireItem Module Event Script + //This is a fix for the Inventory Organizing System! + object oPC = GetModuleItemLostBy(); + if(GetLocalInt(oPC, "ORGANIZING")==1) + { return; } + +object oItem = GetModuleItemLost(); + +object oRobbed; +oRobbed = GetModuleItemLostBy(); +object oThief; +oThief = GetModuleItemAcquiredBy(); +object oLost; +oLost = GetModuleItemLost(); +object oFound; +oFound = GetModuleItemAcquired(); + +string sMsg; +sMsg = "You can't pick player's pockets, it's not permitted!"; + + //Let's make sure the thief is a PC, or continue on to the tag based scripting + if (GetIsPC(oThief)) + { + + //Lets see if they have Pick Pocket Skills + if(GetSkillRank(SKILL_PICK_POCKET, oThief, TRUE)>0) + { + //Lets make sure they took it from a PC and not an NPC or Monster. + if(GetIsPC(oRobbed)) + { + //Let's make sure the thief isn't crafting. + if(oRobbed != oThief) + { + //Lets make sure the the thief is the one who disturbed the inventory + //of the person who lost the item. (This needs to be tested thoroughly) + // if(GetLastDisturbed()== oThief) + //Delete the // Below and the // where } appears below as well to activate. + // { + + //Give the item back, destroy the one they took, and kill the thief. + ActionTakeItem(oFound, oThief); + ActionGiveItem(oFound, oRobbed); + SendMessageToPC(oThief, sMsg); + effect eEffect; + eEffect = EffectDeath(); + eEffect = SupernaturalEffect(eEffect); + DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oThief)); + AssignCommand(oThief, SpeakString("I'm a thief!!", TALKVOLUME_SHOUT)); + + //} + } + } + } + } + +//This script destroys all items dropped if not in combat (disarmed) +//or if the item is put into a container in the module. +//Simply place // before Execute to turn off. +ExecuteScript("trashem",OBJECT_SELF); + +/////////////////////////////////////////////////////////////////////////// + + +//Your Code Goes here... + + +/////////////////////////////////////////////////////////////////////////// + +///////////STANDARD XP2 TAG BASED SCRIPTING CODE/////////////////////////// + + //Tag Based Scripting Check + if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) + { + SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNACQUIRE); + int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); + if (nRet == X2_EXECUTE_SCRIPT_END) + { + return; + } + + } + +//Main Script End +} diff --git a/_module/_removed files/hgll_classft_inc.nss b/_module/_removed files/hgll_classft_inc.nss new file mode 100644 index 00000000..6e947dd3 --- /dev/null +++ b/_module/_removed files/hgll_classft_inc.nss @@ -0,0 +1,7473 @@ +//--------------------------------DECLARATIONS--------------------------------// + +// This function returns the level at which the specified class gets the specified feat. +// If the feat is epic only, it will return -1 in most cases, though it will also return +// 21 on occasion, as with Epic Spoells, which actually require 21 levels of the class rather +// than just epic character status. It replicates EXACTLY the cls_feat 2da for each of the +// respective classes, though the order of feats has been shuffled to accomodate the switch +// statements, and a few duplicate cases in the 2das were removed. If the feat input is not +// a class feat (and therefore not found in the 2da), this function will return -2. If the +// class input is not a valid class int, the function returns -3. Although Harper Scout could +// not possibly be a character's control class for legendary levels, it is included at the end +// of the switch so that the function can be of broader use to the community. Several feats were +// added as class feats for Palemasters, including Spell Focuses and Greater Spell Focuses +// (since they get Epic Focuses). They are marked in the function. The class switches are +// in aphabetical order by 2da file (which is slightly different than class name). +int GetClassLevelReqForFeat(int nFeat, int nClass); +// This function returns TRUE if the feat specified is a general feat, avalable to all classes. +int GetIsGeneralFeat(int nFeat); + +//----------------------------------FUNCTIONS---------------------------------// + +int GetClassLevelReqForFeat(int nFeat, int nClass) +{ +int nInt; +switch(nClass) +{ + case CLASS_TYPE_ARCANE_ARCHER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +case 445 : nInt = 1 ; break; +case 446 : nInt = 3 ; break; +case 447 : nInt = 5 ; break; +case 448 : nInt = 7 ; break; +case 449 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +case 450 : nInt = 2 ; break; +case 451 : nInt = 4 ; break; +case 452 : nInt = 6 ; break; +case 453 : nInt = 8 ; break; +case 454 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 585 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 977 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1045 : nInt = 11 ; break; +case 1046 : nInt = 13 ; break; +case 1047 : nInt = 15 ; break; +case 1048 : nInt = 17 ; break; +case 1049 : nInt = 19 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1050 : nInt = 21 ; break; +case 1051 : nInt = 23 ; break; +case 1052 : nInt = 25 ; break; +case 1053 : nInt = 27 ; break; +case 1054 : nInt = 29 ; break; +case 1055 : nInt = 31 ; break; +case 1056 : nInt = 33 ; break; +case 1057 : nInt = 35 ; break; +case 1058 : nInt = 37 ; break; +case 1059 : nInt = 39 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_ASSASSIN: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 195 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 251 : nInt = 5 ; break; +case 252 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +case 455 : nInt = 1 ; break; +case 456 : nInt = 3 ; break; +case 457 : nInt = 5 ; break; +case 458 : nInt = 7 ; break; +case 459 : nInt = 9 ; break; +case 463 : nInt = 2 ; break; +case 464 : nInt = 4 ; break; +case 465 : nInt = 6 ; break; +case 466 : nInt = 8 ; break; +case 467 : nInt = 10 ; break; +case 468 : nInt = 2 ; break; +case 469 : nInt = 5 ; break; +case 470 : nInt = 7 ; break; +case 471 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 585 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 753 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 834 : nInt = -1 ; break; +case 835 : nInt = -1 ; break; +case 836 : nInt = -1 ; break; +case 837 : nInt = -1 ; break; +case 838 : nInt = -1 ; break; +case 839 : nInt = -1 ; break; +case 840 : nInt = -1 ; break; +case 841 : nInt = -1 ; break; +case 842 : nInt = -1 ; break; +case 843 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 960 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 978 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1004 : nInt = 11 ; break; +case 1005 : nInt = 13 ; break; +case 1006 : nInt = 15 ; break; +case 1019 : nInt = 17 ; break; +case 1020 : nInt = 19 ; break; +case 1021 : nInt = 21 ; break; +case 1022 : nInt = 23 ; break; +case 1023 : nInt = 25 ; break; +case 1024 : nInt = 27 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1025 : nInt = 29 ; break; +case 1026 : nInt = 31 ; break; +case 1027 : nInt = 33 ; break; +case 1028 : nInt = 35 ; break; +case 1029 : nInt = 37 ; break; +case 1030 : nInt = 39 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1070 : nInt = 12 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_BARBARIAN: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 194 : nInt = 1 ; break; +case 195 : nInt = 2 ; break; +case 196 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 251 : nInt = 5 ; break; +case 252 : nInt = 10 ; break; +case 253 : nInt = 13 ; break; +case 254 : nInt = 16 ; break; +case 255 : nInt = 19 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 293 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 326 : nInt = 4 ; break; +case 327 : nInt = 8 ; break; +case 328 : nInt = 12 ; break; +case 329 : nInt = 15 ; break; +case 330 : nInt = 16 ; break; +case 331 : nInt = 20 ; break; +case 332 : nInt = 14 ; break; +case 333 : nInt = 17 ; break; +case 334 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 869 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 967 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 988 : nInt = -1 ; break; +case 989 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1067 : nInt = 23 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_BARD: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 193 : nInt = -1 ; break; +case 197 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 257 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +case 355 : nInt = 2 ; break; +case 356 : nInt = 3 ; break; +case 357 : nInt = 4 ; break; +case 358 : nInt = 5 ; break; +case 359 : nInt = 6 ; break; +case 360 : nInt = 7 ; break; +case 361 : nInt = 8 ; break; +case 362 : nInt = 9 ; break; +case 363 : nInt = 10 ; break; +case 364 : nInt = 11 ; break; +case 365 : nInt = 12 ; break; +case 366 : nInt = 13 ; break; +case 367 : nInt = 14 ; break; +case 368 : nInt = 15 ; break; +case 369 : nInt = 16 ; break; +case 370 : nInt = 17 ; break; +case 371 : nInt = 18 ; break; +case 372 : nInt = 19 ; break; +case 373 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 401 : nInt = -1 ; break; +case 415 : nInt = -1 ; break; +case 416 : nInt = -1 ; break; +case 417 : nInt = -1 ; break; +case 418 : nInt = -1 ; break; +case 419 : nInt = -1 ; break; +case 420 : nInt = -1 ; break; +case 421 : nInt = -1 ; break; +case 422 : nInt = -1 ; break; +case 423 : nInt = -1 ; break; +case 424 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +case 600 : nInt = -1 ; break; +case 609 : nInt = -1 ; break; +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 695 : nInt = -1 ; break; +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 764 : nInt = -1 ; break; +case 765 : nInt = -1 ; break; +case 766 : nInt = -1 ; break; +case 767 : nInt = -1 ; break; +case 768 : nInt = -1 ; break; +case 769 : nInt = -1 ; break; +case 770 : nInt = -1 ; break; +case 771 : nInt = -1 ; break; +case 772 : nInt = -1 ; break; +case 773 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 870 : nInt = -1 ; break; +case 871 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 968 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_BLACKGUARD: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 294 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 413 : nInt = -1 ; break; +case 414 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +case 460 : nInt = 4 ; break; +case 461 : nInt = 7 ; break; +case 462 : nInt = 10 ; break; +case 472 : nInt = 2 ; break; +case 473 : nInt = 2 ; break; +case 474 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 475 : nInt = 5 ; break; +case 476 : nInt = 6 ; break; +case 477 : nInt = 8 ; break; +case 478 : nInt = 2 ; break; +case 479 : nInt = 7 ; break; +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 586 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 824 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 825 : nInt = -1 ; break; +case 826 : nInt = -1 ; break; +case 827 : nInt = -1 ; break; +case 828 : nInt = -1 ; break; +case 829 : nInt = -1 ; break; +case 830 : nInt = -1 ; break; +case 831 : nInt = -1 ; break; +case 832 : nInt = -1 ; break; +case 833 : nInt = -1 ; break; +case 834 : nInt = -1 ; break; +case 835 : nInt = -1 ; break; +case 836 : nInt = -1 ; break; +case 837 : nInt = -1 ; break; +case 838 : nInt = -1 ; break; +case 839 : nInt = -1 ; break; +case 840 : nInt = -1 ; break; +case 841 : nInt = -1 ; break; +case 842 : nInt = -1 ; break; +case 843 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 960 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 979 : nInt = 11 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1003 : nInt = 15 ; break; +case 1007 : nInt = 13 ; break; +case 1008 : nInt = 16 ; break; +case 1009 : nInt = 19 ; break; +case 1010 : nInt = 22 ; break; +case 1011 : nInt = 25 ; break; +case 1012 : nInt = 28 ; break; +case 1013 : nInt = 31 ; break; +case 1014 : nInt = 34 ; break; +case 1015 : nInt = 37 ; break; +case 1016 : nInt = 40 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_CLERIC: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +case 13 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 294 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 413 : nInt = -1 ; break; +case 414 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 969 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DIVINECHAMPION: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 5 : nInt = -1 ; break; +case 6 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 9 : nInt = -1 ; break; +case 10 : nInt = -1 ; break; +case 15 : nInt = -1 ; break; +case 16 : nInt = -1 ; break; +case 17 : nInt = -1 ; break; +case 18 : nInt = -1 ; break; +case 19 : nInt = -1 ; break; +case 20 : nInt = -1 ; break; +case 21 : nInt = -1 ; break; +case 23 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 26 : nInt = -1 ; break; +case 27 : nInt = -1 ; break; +case 28 : nInt = -1 ; break; +case 30 : nInt = -1 ; break; +case 31 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 39 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 42 : nInt = -1 ; break; +case 43 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 52 : nInt = -1 ; break; +case 53 : nInt = -1 ; break; +case 54 : nInt = -1 ; break; +case 55 : nInt = -1 ; break; +case 56 : nInt = -1 ; break; +case 57 : nInt = -1 ; break; +case 58 : nInt = -1 ; break; +case 59 : nInt = -1 ; break; +case 60 : nInt = -1 ; break; +case 61 : nInt = -1 ; break; +case 62 : nInt = -1 ; break; +case 63 : nInt = -1 ; break; +case 64 : nInt = -1 ; break; +case 65 : nInt = -1 ; break; +case 66 : nInt = -1 ; break; +case 67 : nInt = -1 ; break; +case 68 : nInt = -1 ; break; +case 69 : nInt = -1 ; break; +case 70 : nInt = -1 ; break; +case 71 : nInt = -1 ; break; +case 72 : nInt = -1 ; break; +case 73 : nInt = -1 ; break; +case 74 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +case 75 : nInt = -1 ; break; +case 76 : nInt = -1 ; break; +case 77 : nInt = -1 ; break; +case 78 : nInt = -1 ; break; +case 79 : nInt = -1 ; break; +case 80 : nInt = -1 ; break; +case 82 : nInt = -1 ; break; +case 83 : nInt = -1 ; break; +case 84 : nInt = -1 ; break; +case 85 : nInt = -1 ; break; +case 87 : nInt = -1 ; break; +case 88 : nInt = -1 ; break; +case 89 : nInt = -1 ; break; +case 90 : nInt = -1 ; break; +case 91 : nInt = -1 ; break; +case 92 : nInt = -1 ; break; +case 93 : nInt = -1 ; break; +case 94 : nInt = -1 ; break; +case 95 : nInt = -1 ; break; +case 96 : nInt = -1 ; break; +case 97 : nInt = -1 ; break; +case 98 : nInt = -1 ; break; +case 99 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +case 100 : nInt = -1 ; break; +case 101 : nInt = -1 ; break; +case 102 : nInt = -1 ; break; +case 103 : nInt = -1 ; break; +case 104 : nInt = -1 ; break; +case 105 : nInt = -1 ; break; +case 106 : nInt = -1 ; break; +case 107 : nInt = -1 ; break; +case 108 : nInt = -1 ; break; +case 109 : nInt = -1 ; break; +case 110 : nInt = -1 ; break; +case 111 : nInt = -1 ; break; +case 112 : nInt = -1 ; break; +case 113 : nInt = -1 ; break; +case 114 : nInt = -1 ; break; +case 115 : nInt = -1 ; break; +case 116 : nInt = -1 ; break; +case 117 : nInt = -1 ; break; +case 118 : nInt = -1 ; break; +case 120 : nInt = -1 ; break; +case 121 : nInt = -1 ; break; +case 122 : nInt = -1 ; break; +case 123 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +case 125 : nInt = -1 ; break; +case 126 : nInt = -1 ; break; +case 127 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 299 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 301 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 389 : nInt = -1 ; break; +case 390 : nInt = -1 ; break; +case 391 : nInt = -1 ; break; +case 392 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 408 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +case 657 : nInt = -1 ; break; +case 658 : nInt = -1 ; break; +case 659 : nInt = -1 ; break; +case 660 : nInt = -1 ; break; +case 661 : nInt = -1 ; break; +case 662 : nInt = -1 ; break; +case 663 : nInt = -1 ; break; +case 664 : nInt = -1 ; break; +case 665 : nInt = -1 ; break; +case 666 : nInt = -1 ; break; +case 667 : nInt = -1 ; break; +case 668 : nInt = -1 ; break; +case 669 : nInt = -1 ; break; +case 670 : nInt = -1 ; break; +case 671 : nInt = -1 ; break; +case 672 : nInt = -1 ; break; +case 673 : nInt = -1 ; break; +case 674 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 675 : nInt = -1 ; break; +case 676 : nInt = -1 ; break; +case 677 : nInt = -1 ; break; +case 678 : nInt = -1 ; break; +case 679 : nInt = -1 ; break; +case 680 : nInt = -1 ; break; +case 681 : nInt = -1 ; break; +case 682 : nInt = -1 ; break; +case 683 : nInt = -1 ; break; +case 684 : nInt = -1 ; break; +case 685 : nInt = -1 ; break; +case 686 : nInt = -1 ; break; +case 687 : nInt = -1 ; break; +case 688 : nInt = -1 ; break; +case 689 : nInt = -1 ; break; +case 690 : nInt = -1 ; break; +case 691 : nInt = -1 ; break; +case 692 : nInt = -1 ; break; +case 693 : nInt = -1 ; break; +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +case 824 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 825 : nInt = -1 ; break; +case 826 : nInt = -1 ; break; +case 827 : nInt = -1 ; break; +case 828 : nInt = -1 ; break; +case 829 : nInt = -1 ; break; +case 830 : nInt = -1 ; break; +case 831 : nInt = -1 ; break; +case 832 : nInt = -1 ; break; +case 833 : nInt = -1 ; break; +case 844 : nInt = -1 ; break; +case 845 : nInt = -1 ; break; +case 846 : nInt = -1 ; break; +case 847 : nInt = -1 ; break; +case 848 : nInt = -1 ; break; +case 849 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 850 : nInt = -1 ; break; +case 851 : nInt = -1 ; break; +case 852 : nInt = -1 ; break; +case 853 : nInt = -1 ; break; +case 854 : nInt = -1 ; break; +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 867 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 904 : nInt = 2 ; break; +case 909 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 952 : nInt = -1 ; break; +case 954 : nInt = -1 ; break; +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 982 : nInt = 11 ; break; +case 993 : nInt = -1 ; break; +case 995 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 998 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DRAGONDISCIPLE: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 228 : nInt = 10 ; break; +case 235 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 586 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 961 : nInt = 1 ; break; +case 962 : nInt = 2 ; break; +case 963 : nInt = 10 ; break; +case 964 : nInt = 10 ; break; +case 965 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 987 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1042 : nInt = 1 ; break; +case 1043 : nInt = 4 ; break; +case 1044 : nInt = 6 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DRUID: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 34 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 48 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 198 : nInt = 1 ; break; +case 199 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 200 : nInt = 2 ; break; +case 201 : nInt = 3 ; break; +case 202 : nInt = 4 ; break; +case 203 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 304 : nInt = 16 ; break; +case 305 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 335 : nInt = 6 ; break; +case 336 : nInt = 7 ; break; +case 337 : nInt = 10 ; break; +case 338 : nInt = 14 ; break; +case 339 : nInt = 18 ; break; +case 340 : nInt = 17 ; break; +case 341 : nInt = 19 ; break; +case 342 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +case 587 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 873 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 970 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1068 : nInt = 22 ; break; +case 1069 : nInt = 26 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DWARVENDEFENDER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 947 : nInt = 1 ; break; +case 948 : nInt = 6 ; break; +case 949 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 950 : nInt = 5 ; break; +case 951 : nInt = 10 ; break; +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 985 : nInt = 11 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_FIGHTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 5 : nInt = -1 ; break; +case 6 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 9 : nInt = -1 ; break; +case 10 : nInt = -1 ; break; +case 15 : nInt = -1 ; break; +case 16 : nInt = -1 ; break; +case 17 : nInt = -1 ; break; +case 18 : nInt = -1 ; break; +case 19 : nInt = -1 ; break; +case 20 : nInt = -1 ; break; +case 21 : nInt = -1 ; break; +case 23 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 26 : nInt = -1 ; break; +case 27 : nInt = -1 ; break; +case 28 : nInt = -1 ; break; +case 30 : nInt = -1 ; break; +case 31 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 39 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 42 : nInt = -1 ; break; +case 43 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +case 47 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 52 : nInt = -1 ; break; +case 53 : nInt = -1 ; break; +case 54 : nInt = -1 ; break; +case 55 : nInt = -1 ; break; +case 56 : nInt = -1 ; break; +case 57 : nInt = -1 ; break; +case 58 : nInt = -1 ; break; +case 59 : nInt = -1 ; break; +case 60 : nInt = -1 ; break; +case 61 : nInt = -1 ; break; +case 62 : nInt = -1 ; break; +case 63 : nInt = -1 ; break; +case 64 : nInt = -1 ; break; +case 65 : nInt = -1 ; break; +case 66 : nInt = -1 ; break; +case 67 : nInt = -1 ; break; +case 68 : nInt = -1 ; break; +case 69 : nInt = -1 ; break; +case 70 : nInt = -1 ; break; +case 71 : nInt = -1 ; break; +case 72 : nInt = -1 ; break; +case 73 : nInt = -1 ; break; +case 74 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +case 75 : nInt = -1 ; break; +case 76 : nInt = -1 ; break; +case 77 : nInt = -1 ; break; +case 78 : nInt = -1 ; break; +case 79 : nInt = -1 ; break; +case 80 : nInt = -1 ; break; +case 82 : nInt = -1 ; break; +case 83 : nInt = -1 ; break; +case 84 : nInt = -1 ; break; +case 85 : nInt = -1 ; break; +case 87 : nInt = -1 ; break; +case 88 : nInt = -1 ; break; +case 89 : nInt = -1 ; break; +case 90 : nInt = -1 ; break; +case 91 : nInt = -1 ; break; +case 92 : nInt = -1 ; break; +case 93 : nInt = -1 ; break; +case 94 : nInt = -1 ; break; +case 95 : nInt = -1 ; break; +case 96 : nInt = -1 ; break; +case 97 : nInt = -1 ; break; +case 98 : nInt = -1 ; break; +case 99 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +case 100 : nInt = -1 ; break; +case 101 : nInt = -1 ; break; +case 102 : nInt = -1 ; break; +case 103 : nInt = -1 ; break; +case 104 : nInt = -1 ; break; +case 105 : nInt = -1 ; break; +case 106 : nInt = -1 ; break; +case 107 : nInt = -1 ; break; +case 108 : nInt = -1 ; break; +case 109 : nInt = -1 ; break; +case 110 : nInt = -1 ; break; +case 111 : nInt = -1 ; break; +case 112 : nInt = -1 ; break; +case 113 : nInt = -1 ; break; +case 114 : nInt = -1 ; break; +case 115 : nInt = -1 ; break; +case 116 : nInt = -1 ; break; +case 117 : nInt = -1 ; break; +case 118 : nInt = -1 ; break; +case 120 : nInt = -1 ; break; +case 121 : nInt = -1 ; break; +case 122 : nInt = -1 ; break; +case 123 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +case 125 : nInt = -1 ; break; +case 126 : nInt = -1 ; break; +case 127 : nInt = -1 ; break; +case 128 : nInt = -1 ; break; +case 129 : nInt = -1 ; break; +case 130 : nInt = -1 ; break; +case 131 : nInt = -1 ; break; +case 132 : nInt = -1 ; break; +case 133 : nInt = -1 ; break; +case 134 : nInt = -1 ; break; +case 135 : nInt = -1 ; break; +case 136 : nInt = -1 ; break; +case 137 : nInt = -1 ; break; +case 138 : nInt = -1 ; break; +case 139 : nInt = -1 ; break; +case 140 : nInt = -1 ; break; +case 141 : nInt = -1 ; break; +case 142 : nInt = -1 ; break; +case 143 : nInt = -1 ; break; +case 144 : nInt = -1 ; break; +case 145 : nInt = -1 ; break; +case 146 : nInt = -1 ; break; +case 147 : nInt = -1 ; break; +case 148 : nInt = -1 ; break; +case 149 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 150 : nInt = -1 ; break; +case 151 : nInt = -1 ; break; +case 152 : nInt = -1 ; break; +case 153 : nInt = -1 ; break; +case 154 : nInt = -1 ; break; +case 155 : nInt = -1 ; break; +case 156 : nInt = -1 ; break; +case 158 : nInt = -1 ; break; +case 159 : nInt = -1 ; break; +case 160 : nInt = -1 ; break; +case 161 : nInt = -1 ; break; +case 163 : nInt = -1 ; break; +case 164 : nInt = -1 ; break; +case 165 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 389 : nInt = -1 ; break; +case 390 : nInt = -1 ; break; +case 391 : nInt = -1 ; break; +case 392 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 408 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +case 657 : nInt = -1 ; break; +case 658 : nInt = -1 ; break; +case 659 : nInt = -1 ; break; +case 660 : nInt = -1 ; break; +case 661 : nInt = -1 ; break; +case 662 : nInt = -1 ; break; +case 663 : nInt = -1 ; break; +case 664 : nInt = -1 ; break; +case 665 : nInt = -1 ; break; +case 666 : nInt = -1 ; break; +case 667 : nInt = -1 ; break; +case 668 : nInt = -1 ; break; +case 669 : nInt = -1 ; break; +case 670 : nInt = -1 ; break; +case 671 : nInt = -1 ; break; +case 672 : nInt = -1 ; break; +case 673 : nInt = -1 ; break; +case 674 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 675 : nInt = -1 ; break; +case 676 : nInt = -1 ; break; +case 677 : nInt = -1 ; break; +case 678 : nInt = -1 ; break; +case 679 : nInt = -1 ; break; +case 680 : nInt = -1 ; break; +case 681 : nInt = -1 ; break; +case 682 : nInt = -1 ; break; +case 683 : nInt = -1 ; break; +case 684 : nInt = -1 ; break; +case 685 : nInt = -1 ; break; +case 686 : nInt = -1 ; break; +case 687 : nInt = -1 ; break; +case 688 : nInt = -1 ; break; +case 689 : nInt = -1 ; break; +case 690 : nInt = -1 ; break; +case 691 : nInt = -1 ; break; +case 692 : nInt = -1 ; break; +case 693 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 844 : nInt = -1 ; break; +case 845 : nInt = -1 ; break; +case 846 : nInt = -1 ; break; +case 847 : nInt = -1 ; break; +case 848 : nInt = -1 ; break; +case 849 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 850 : nInt = -1 ; break; +case 851 : nInt = -1 ; break; +case 852 : nInt = -1 ; break; +case 853 : nInt = -1 ; break; +case 867 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 952 : nInt = -1 ; break; +case 953 : nInt = -1 ; break; +case 954 : nInt = -1 ; break; +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 957 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 966 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 993 : nInt = -1 ; break; +case 994 : nInt = -1 ; break; +case 995 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 998 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_MONK: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 6 : nInt = 1 ; break; +case 8 : nInt = 2 ; break; +case 17 : nInt = 6 ; break; +case 21 : nInt = 1 ; break; +case 23 : nInt = 6 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 39 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +case 49 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 204 : nInt = 1 ; break; +case 206 : nInt = 1 ; break; +case 207 : nInt = 3 ; break; +case 208 : nInt = 3 ; break; +case 209 : nInt = 5 ; break; +case 211 : nInt = 7 ; break; +case 212 : nInt = 9 ; break; +case 213 : nInt = 10 ; break; +case 214 : nInt = 11 ; break; +case 215 : nInt = 12 ; break; +case 216 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 260 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 296 : nInt = 15 ; break; +case 297 : nInt = 18 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 343 : nInt = 13 ; break; +case 344 : nInt = 16 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 697 : nInt = -1 ; break; +case 698 : nInt = -1 ; break; +case 699 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 700 : nInt = -1 ; break; +case 701 : nInt = -1 ; break; +case 702 : nInt = -1 ; break; +case 703 : nInt = -1 ; break; +case 704 : nInt = -1 ; break; +case 705 : nInt = -1 ; break; +case 706 : nInt = -1 ; break; +case 707 : nInt = -1 ; break; +case 708 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 844 : nInt = -1 ; break; +case 845 : nInt = -1 ; break; +case 846 : nInt = -1 ; break; +case 847 : nInt = -1 ; break; +case 848 : nInt = -1 ; break; +case 849 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 850 : nInt = -1 ; break; +case 851 : nInt = -1 ; break; +case 852 : nInt = -1 ; break; +case 853 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 971 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_PALADIN: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +case 13 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 217 : nInt = 1 ; break; +case 219 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 294 : nInt = 3 ; break; +case 299 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 300 : nInt = 2 ; break; +case 301 : nInt = 2 ; break; +case 302 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 413 : nInt = -1 ; break; +case 414 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 586 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +case 746 : nInt = -1 ; break; +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 824 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 825 : nInt = -1 ; break; +case 826 : nInt = -1 ; break; +case 827 : nInt = -1 ; break; +case 828 : nInt = -1 ; break; +case 829 : nInt = -1 ; break; +case 830 : nInt = -1 ; break; +case 831 : nInt = -1 ; break; +case 832 : nInt = -1 ; break; +case 833 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 972 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 995 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_PALEMASTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 11 : nInt = -1 ; break; //feat Empower Spell added to standard Bioware 2da data +case 12 : nInt = -1 ; break; //feat Extend Spell added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 25 : nInt = -1 ; break; //feat Maximize Spell added to standard Bioware 2da data +case 29 : nInt = -1 ; break; //feat Quicken Spell added to standard Bioware 2da data +case 35 : nInt = -1 ; break; //feat Spell Focus Abjuration added to standard Bioware 2da data +case 36 : nInt = -1 ; break; //feat Spell Penetration added to standard Bioware 2da data +case 37 : nInt = -1 ; break; //feat Still Spell added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; //feat Spell Focus Conjuration added to standard Bioware 2da data +case 167 : nInt = -1 ; break; //feat Spell Focus Divination added to standard Bioware 2da data +case 168 : nInt = -1 ; break; //feat Spell Focus Enchantment added to standard Bioware 2da data +case 169 : nInt = -1 ; break; //feat Spell Focus Evocation added to standard Bioware 2da data +case 170 : nInt = -1 ; break; //feat Spell Focus Illusion added to standard Bioware 2da data +case 171 : nInt = -1 ; break; //feat Spell Focus Necromancy added to standard Bioware 2da data +case 172 : nInt = -1 ; break; //feat Spell Focus Transmutation added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 228 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; //feat Greater Spell Focus Abjuration added to standard Bioware 2da data +case 394 : nInt = -1 ; break; //feat Greater Spell Focus Conjuration added to standard Bioware 2da data +case 395 : nInt = -1 ; break; //feat Greater Spell Focus Divination added to standard Bioware 2da data +case 396 : nInt = -1 ; break; //feat Greater Spell Focus Enchantment added to standard Bioware 2da data +case 397 : nInt = -1 ; break; //feat Greater Spell Focus Evocation added to standard Bioware 2da data +case 398 : nInt = -1 ; break; //feat Greater Spell Focus Illusion added to standard Bioware 2da data +case 399 : nInt = -1 ; break; //feat Greater Spell Focus Necromancy added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; //feat Greater Spell Focus Transmutation added to standard Bioware 2da data +case 401 : nInt = -1 ; break; //feat Greater Spell Penetration added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 15 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 15 ; break; +case 876 : nInt = 15 ; break; +case 877 : nInt = 15 ; break; +case 878 : nInt = 15 ; break; +case 886 : nInt = 1 ; break; +case 889 : nInt = 2 ; break; +case 890 : nInt = 4 ; break; +case 891 : nInt = 5 ; break; +case 892 : nInt = 6 ; break; +case 893 : nInt = 8 ; break; +case 894 : nInt = 7 ; break; +case 895 : nInt = 9 ; break; +case 896 : nInt = 10 ; break; +case 897 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 984 : nInt = 11 ; break; +case 990 : nInt = 15 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_RANGER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +case 20 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 34 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 199 : nInt = 6 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 201 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 261 : nInt = -1 ; break; +case 262 : nInt = -1 ; break; +case 263 : nInt = -1 ; break; +case 264 : nInt = -1 ; break; +case 265 : nInt = -1 ; break; +case 266 : nInt = -1 ; break; +case 267 : nInt = -1 ; break; +case 268 : nInt = -1 ; break; +case 269 : nInt = -1 ; break; +case 270 : nInt = -1 ; break; +case 271 : nInt = -1 ; break; +case 272 : nInt = -1 ; break; +case 273 : nInt = -1 ; break; +case 274 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 275 : nInt = -1 ; break; +case 276 : nInt = -1 ; break; +case 277 : nInt = -1 ; break; +case 278 : nInt = -1 ; break; +case 279 : nInt = -1 ; break; +case 280 : nInt = -1 ; break; +case 281 : nInt = -1 ; break; +case 284 : nInt = -1 ; break; +case 285 : nInt = -1 ; break; +case 286 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +case 374 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 587 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 855 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 956 : nInt = -1 ; break; +case 973 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 997 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_ROGUE: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 50 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 193 : nInt = -1 ; break; +case 195 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 206 : nInt = 2 ; break; +case 212 : nInt = -1 ; break; +case 221 : nInt = 1 ; break; +case 222 : nInt = -1 ; break; +case 223 : nInt = -1 ; break; +case 224 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 225 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 251 : nInt = 6 ; break; +case 252 : nInt = 11 ; break; +case 253 : nInt = 14 ; break; +case 254 : nInt = 17 ; break; +case 255 : nInt = 20 ; break; +case 259 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 345 : nInt = 3 ; break; +case 346 : nInt = 5 ; break; +case 347 : nInt = 7 ; break; +case 348 : nInt = 9 ; break; +case 349 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +case 350 : nInt = 13 ; break; +case 351 : nInt = 15 ; break; +case 352 : nInt = 17 ; break; +case 353 : nInt = 19 ; break; +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 586 : nInt = -1 ; break; +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +case 609 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 753 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 834 : nInt = -1 ; break; +case 835 : nInt = -1 ; break; +case 836 : nInt = -1 ; break; +case 837 : nInt = -1 ; break; +case 838 : nInt = -1 ; break; +case 839 : nInt = -1 ; break; +case 840 : nInt = -1 ; break; +case 841 : nInt = -1 ; break; +case 842 : nInt = -1 ; break; +case 843 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 856 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 974 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1032 : nInt = 21 ; break; +case 1033 : nInt = 23 ; break; +case 1034 : nInt = 25 ; break; +case 1035 : nInt = 27 ; break; +case 1036 : nInt = 29 ; break; +case 1037 : nInt = 31 ; break; +case 1038 : nInt = 33 ; break; +case 1039 : nInt = 35 ; break; +case 1040 : nInt = 37 ; break; +case 1041 : nInt = 39 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_SHADOWDANCER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 195 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 206 : nInt = 2 ; break; +case 212 : nInt = 10 ; break; +case 223 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 228 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 252 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +case 433 : nInt = 1 ; break; +case 434 : nInt = 3 ; break; +case 435 : nInt = 3 ; break; +case 436 : nInt = 4 ; break; +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 585 : nInt = -1 ; break; +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +case 609 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 753 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 856 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 980 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1002 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_SHIFTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +case 587 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 872 : nInt = -1 ; break; +case 873 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 898 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 900 : nInt = 3 ; break; +case 901 : nInt = 5 ; break; +case 902 : nInt = 7 ; break; +case 903 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 986 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1060 : nInt = -1 ; break; +case 1061 : nInt = -1 ; break; +case 1062 : nInt = 4 ; break; +case 1063 : nInt = 7 ; break; +case 1064 : nInt = 10 ; break; +case 1065 : nInt = 16 ; break; +case 1066 : nInt = 13 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_SORCERER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 303 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 764 : nInt = -1 ; break; +case 765 : nInt = -1 ; break; +case 766 : nInt = -1 ; break; +case 767 : nInt = -1 ; break; +case 768 : nInt = -1 ; break; +case 769 : nInt = -1 ; break; +case 770 : nInt = -1 ; break; +case 771 : nInt = -1 ; break; +case 772 : nInt = -1 ; break; +case 773 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 877 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ + default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 975 : nInt = 21 ; break; +case 990 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_WIZARD: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 7 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 11 : nInt = -1 ; break; +case 12 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 25 : nInt = -1 ; break; +case 29 : nInt = -1 ; break; +case 33 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 36 : nInt = -1 ; break; +case 37 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 51 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 303 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 401 : nInt = -1 ; break; +case 415 : nInt = -1 ; break; +case 416 : nInt = -1 ; break; +case 417 : nInt = -1 ; break; +case 418 : nInt = -1 ; break; +case 419 : nInt = -1 ; break; +case 420 : nInt = -1 ; break; +case 421 : nInt = -1 ; break; +case 422 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 794 : nInt = -1 ; break; +case 795 : nInt = -1 ; break; +case 796 : nInt = -1 ; break; +case 797 : nInt = -1 ; break; +case 798 : nInt = -1 ; break; +case 799 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 800 : nInt = -1 ; break; +case 801 : nInt = -1 ; break; +case 802 : nInt = -1 ; break; +case 803 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 877 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 976 : nInt = 21 ; break; +case 990 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_WEAPON_MASTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 879 : nInt = 1 ; break; +case 880 : nInt = 1 ; break; +case 881 : nInt = 1 ; break; +case 882 : nInt = 1 ; break; +case 883 : nInt = 5 ; break; +case 884 : nInt = 5 ; break; +case 885 : nInt = 7 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 919 : nInt = 1 ; break; +case 920 : nInt = 1 ; break; +case 921 : nInt = 1 ; break; +case 922 : nInt = 1 ; break; +case 923 : nInt = 1 ; break; +case 924 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 925 : nInt = 1 ; break; +case 926 : nInt = 1 ; break; +case 927 : nInt = 1 ; break; +case 928 : nInt = 1 ; break; +case 929 : nInt = 1 ; break; +case 930 : nInt = 1 ; break; +case 931 : nInt = 1 ; break; +case 932 : nInt = 1 ; break; +case 933 : nInt = 1 ; break; +case 934 : nInt = 1 ; break; +case 935 : nInt = 1 ; break; +case 936 : nInt = 1 ; break; +case 937 : nInt = 1 ; break; +case 938 : nInt = 1 ; break; +case 939 : nInt = 1 ; break; +case 940 : nInt = 1 ; break; +case 941 : nInt = 1 ; break; +case 942 : nInt = 1 ; break; +case 943 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 959 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 983 : nInt = 11 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1000 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1071 : nInt = 13 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_HARPER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 197 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 261 : nInt = -1 ; break; +case 262 : nInt = -1 ; break; +case 263 : nInt = -1 ; break; +case 264 : nInt = -1 ; break; +case 265 : nInt = -1 ; break; +case 266 : nInt = -1 ; break; +case 267 : nInt = -1 ; break; +case 268 : nInt = -1 ; break; +case 269 : nInt = -1 ; break; +case 270 : nInt = -1 ; break; +case 271 : nInt = -1 ; break; +case 272 : nInt = -1 ; break; +case 273 : nInt = -1 ; break; +case 274 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 275 : nInt = -1 ; break; +case 276 : nInt = -1 ; break; +case 277 : nInt = -1 ; break; +case 278 : nInt = -1 ; break; +case 279 : nInt = -1 ; break; +case 280 : nInt = -1 ; break; +case 281 : nInt = -1 ; break; +case 284 : nInt = -1 ; break; +case 285 : nInt = -1 ; break; +case 286 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +case 437 : nInt = 2 ; break; +case 438 : nInt = 3 ; break; +case 439 : nInt = 4 ; break; +case 440 : nInt = 5 ; break; +case 441 : nInt = 2 ; break; +case 442 : nInt = 3 ; break; +case 443 : nInt = 4 ; break; +case 444 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 695 : nInt = -1 ; break; +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 764 : nInt = -1 ; break; +case 765 : nInt = -1 ; break; +case 766 : nInt = -1 ; break; +case 767 : nInt = -1 ; break; +case 768 : nInt = -1 ; break; +case 769 : nInt = -1 ; break; +case 770 : nInt = -1 ; break; +case 771 : nInt = -1 ; break; +case 772 : nInt = -1 ; break; +case 773 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 870 : nInt = -1 ; break; +case 871 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + default: return -3;//wrong class int was input +} +return -3;//wrong input type +} + +int GetIsGeneralFeat(int nFeat) +{ +int nReturn = FALSE; +if (nFeat < 250) + { + if (nFeat < 50) + { + if (nFeat < 10) + { + switch (nFeat) + { +case 0: nReturn = TRUE; break; +case 2: nReturn = TRUE; break; +case 3: nReturn = TRUE; break; +case 4: nReturn = TRUE; break; +case 5: nReturn = TRUE; break; +case 6: nReturn = TRUE; break; +case 7: nReturn = TRUE; break; +case 9: nReturn = TRUE; break; + } + } + else if (nFeat < 20) + { + switch (nFeat) + { +case 10: nReturn = TRUE; break; +case 11: nReturn = TRUE; break; +case 12: nReturn = TRUE; break; +case 14: nReturn = TRUE; break; +case 15: nReturn = TRUE; break; +case 16: nReturn = TRUE; break; +case 17: nReturn = TRUE; break; +case 18: nReturn = TRUE; break; +case 19: nReturn = TRUE; break; + } + } + else if (nFeat < 30) + { + switch (nFeat) + { +case 20: nReturn = TRUE; break; +case 21: nReturn = TRUE; break; +case 22: nReturn = TRUE; break; +case 23: nReturn = TRUE; break; +case 24: nReturn = TRUE; break; +case 25: nReturn = TRUE; break; +case 26: nReturn = TRUE; break; +case 27: nReturn = TRUE; break; +case 28: nReturn = TRUE; break; + } + } + else if (nFeat < 40) + { + switch (nFeat) + { +case 30: nReturn = TRUE; break; +case 31: nReturn = TRUE; break; +case 32: nReturn = TRUE; break; +case 33: nReturn = TRUE; break; +case 36: nReturn = TRUE; break; +case 37: nReturn = TRUE; break; +case 39: nReturn = TRUE; break; + } + } + else //<50 + { + switch (nFeat) + { +case 40: nReturn = TRUE; break; +case 42: nReturn = TRUE; break; +case 43: nReturn = TRUE; break; + } + } + } + else if (nFeat < 100) + { + if (nFeat < 60) + { + switch (nFeat) + { +case 52: nReturn = TRUE; break; +case 53: nReturn = TRUE; break; +case 54: nReturn = TRUE; break; +case 55: nReturn = TRUE; break; +case 56: nReturn = TRUE; break; +case 57: nReturn = TRUE; break; +case 58: nReturn = TRUE; break; +case 59: nReturn = TRUE; break; + } + } + else if (nFeat < 70) + { + switch (nFeat) + { +case 60: nReturn = TRUE; break; +case 61: nReturn = TRUE; break; +case 62: nReturn = TRUE; break; +case 63: nReturn = TRUE; break; +case 64: nReturn = TRUE; break; +case 65: nReturn = TRUE; break; +case 66: nReturn = TRUE; break; +case 67: nReturn = TRUE; break; +case 68: nReturn = TRUE; break; +case 69: nReturn = TRUE; break; + } + } + else if (nFeat < 80) + { + switch (nFeat) + { +case 70: nReturn = TRUE; break; +case 71: nReturn = TRUE; break; +case 72: nReturn = TRUE; break; +case 73: nReturn = TRUE; break; +case 74: nReturn = TRUE; break; +case 75: nReturn = TRUE; break; +case 76: nReturn = TRUE; break; +case 77: nReturn = TRUE; break; +case 78: nReturn = TRUE; break; +case 79: nReturn = TRUE; break; + } + } + else if (nFeat < 90) + { + switch (nFeat) + { +case 80: nReturn = TRUE; break; +case 82: nReturn = TRUE; break; +case 83: nReturn = TRUE; break; +case 84: nReturn = TRUE; break; +case 85: nReturn = TRUE; break; +case 87: nReturn = TRUE; break; +case 88: nReturn = TRUE; break; +case 89: nReturn = TRUE; break; + } + } + else //<100 + { + switch (nFeat) + { +case 90: nReturn = TRUE; break; +case 91: nReturn = TRUE; break; +case 92: nReturn = TRUE; break; +case 93: nReturn = TRUE; break; +case 94: nReturn = TRUE; break; +case 95: nReturn = TRUE; break; +case 96: nReturn = TRUE; break; +case 97: nReturn = TRUE; break; +case 98: nReturn = TRUE; break; +case 99: nReturn = TRUE; break; + } + } + } + else if (nFeat < 150) + { + if (nFeat < 110) + { + switch (nFeat) + { +case 100: nReturn = TRUE; break; +case 101: nReturn = TRUE; break; +case 102: nReturn = TRUE; break; +case 103: nReturn = TRUE; break; +case 104: nReturn = TRUE; break; +case 105: nReturn = TRUE; break; +case 106: nReturn = TRUE; break; +case 107: nReturn = TRUE; break; +case 108: nReturn = TRUE; break; +case 109: nReturn = TRUE; break; + } + } + else if (nFeat < 120) + { + switch (nFeat) + { +case 110: nReturn = TRUE; break; +case 111: nReturn = TRUE; break; +case 112: nReturn = TRUE; break; +case 113: nReturn = TRUE; break; +case 114: nReturn = TRUE; break; +case 115: nReturn = TRUE; break; +case 116: nReturn = TRUE; break; +case 117: nReturn = TRUE; break; +case 118: nReturn = TRUE; break; + } + } + else + { + switch (nFeat) + { +case 120: nReturn = TRUE; break; +case 121: nReturn = TRUE; break; +case 122: nReturn = TRUE; break; +case 123: nReturn = TRUE; break; +case 125: nReturn = TRUE; break; +case 126: nReturn = TRUE; break; +case 127: nReturn = TRUE; break; + } + } + } + else + { + if (nFeat < 180) + { + switch (nFeat) + { +case 173: nReturn = TRUE; break; +case 174: nReturn = TRUE; break; +case 175: nReturn = TRUE; break; +case 177: nReturn = TRUE; break; +case 178: nReturn = TRUE; break; +case 179: nReturn = TRUE; break; + } + } + else if (nFeat < 190) + { + switch (nFeat) + { +case 180: nReturn = TRUE; break; +case 181: nReturn = TRUE; break; +case 182: nReturn = TRUE; break; +case 183: nReturn = TRUE; break; +case 184: nReturn = TRUE; break; +case 185: nReturn = TRUE; break; +case 186: nReturn = TRUE; break; +case 187: nReturn = TRUE; break; +case 188: nReturn = TRUE; break; +case 189: nReturn = TRUE; break; + } + } + else //<200 + { + switch (nFeat) + { +case 190: nReturn = TRUE; break; +case 192: nReturn = TRUE; break; + + } + } + } + } +else if (nFeat < 500) + { + if (nFeat < 400) + { + if (nFeat < 380) + { + switch (nFeat) + { +case 377: nReturn = TRUE; break; +case 378: nReturn = TRUE; break; +case 379: nReturn = TRUE; break; + } + } + else if (nFeat < 390) + { + switch (nFeat) + { +case 380: nReturn = TRUE; break; +case 381: nReturn = TRUE; break; +case 382: nReturn = TRUE; break; +case 383: nReturn = TRUE; break; +case 384: nReturn = TRUE; break; +//case 385: nReturn = TRUE; break;//this is feat "Small Talk", deleted in NWN +case 386: nReturn = TRUE; break; +case 387: nReturn = TRUE; break; +case 388: nReturn = TRUE; break; +case 389: nReturn = TRUE; break; + } + } + else //<400 + { + switch (nFeat) + { +case 390: nReturn = TRUE; break; +case 391: nReturn = TRUE; break; +case 392: nReturn = TRUE; break; +case 393: nReturn = TRUE; break; +case 394: nReturn = TRUE; break; +case 395: nReturn = TRUE; break; +case 396: nReturn = TRUE; break; +case 397: nReturn = TRUE; break; +case 398: nReturn = TRUE; break; +case 399: nReturn = TRUE; break; + } + } + } + else if (nFeat < 450) + { + if (nFeat < 410) + { + switch (nFeat) + { +case 400: nReturn = TRUE; break; +case 401: nReturn = TRUE; break; +case 402: nReturn = TRUE; break; +//case 403: nReturn = TRUE; break;//this is feat "Mercantile Background", deleted in NWN +case 404: nReturn = TRUE; break; +case 406: nReturn = TRUE; break; +case 407: nReturn = TRUE; break; +case 408: nReturn = TRUE; break; +case 409: nReturn = TRUE; break; + } + } + else if (nFeat < 420) + { + switch (nFeat) + { +case 410: nReturn = TRUE; break; +case 411: nReturn = TRUE; break; +case 412: nReturn = TRUE; break; +case 415: nReturn = TRUE; break; +case 416: nReturn = TRUE; break; +case 417: nReturn = TRUE; break; +case 418: nReturn = TRUE; break; +case 419: nReturn = TRUE; break; + } + } + else if (nFeat < 430) + { + switch (nFeat) + { +case 420: nReturn = TRUE; break; +case 421: nReturn = TRUE; break; +case 422: nReturn = TRUE; break; +case 425: nReturn = TRUE; break; +case 426: nReturn = TRUE; break; +case 427: nReturn = TRUE; break; +case 428: nReturn = TRUE; break; +case 429: nReturn = TRUE; break; + } + } + else if (nFeat < 440) + { + switch (nFeat) + { +case 430: nReturn = TRUE; break; +case 431: nReturn = TRUE; break; + } + } + } + else //<500 + { + switch (nFeat) + { +case 490: nReturn = TRUE; break; +case 492: nReturn = TRUE; break; +case 493: nReturn = TRUE; break; +case 494: nReturn = TRUE; break; +case 495: nReturn = TRUE; break; +case 496: nReturn = TRUE; break; +case 497: nReturn = TRUE; break; +case 498: nReturn = TRUE; break; +case 499: nReturn = TRUE; break; + } + } + } +else if (nFeat < 750) + { + if (nFeat < 550) + { + if (nFeat < 510) + { + switch (nFeat) + { +case 500: nReturn = TRUE; break; +case 501: nReturn = TRUE; break; +case 502: nReturn = TRUE; break; +case 503: nReturn = TRUE; break; +case 504: nReturn = TRUE; break; +case 505: nReturn = TRUE; break; +case 506: nReturn = TRUE; break; +case 507: nReturn = TRUE; break; +case 508: nReturn = TRUE; break; +case 509: nReturn = TRUE; break; + } + } + else if (nFeat < 520) + { + switch (nFeat) + { +case 510: nReturn = TRUE; break; +case 511: nReturn = TRUE; break; +case 512: nReturn = TRUE; break; +case 513: nReturn = TRUE; break; +case 514: nReturn = TRUE; break; +case 515: nReturn = TRUE; break; +case 516: nReturn = TRUE; break; +case 517: nReturn = TRUE; break; +case 518: nReturn = TRUE; break; +case 519: nReturn = TRUE; break; + } + } + else if (nFeat < 530) + { + switch (nFeat) + { +case 520: nReturn = TRUE; break; +case 521: nReturn = TRUE; break; +case 522: nReturn = TRUE; break; +case 523: nReturn = TRUE; break; +case 524: nReturn = TRUE; break; +case 525: nReturn = TRUE; break; +case 526: nReturn = TRUE; break; +case 527: nReturn = TRUE; break; +case 528: nReturn = TRUE; break; +case 529: nReturn = TRUE; break; + } + } + else if (nFeat < 540) + { + switch (nFeat) + { +case 530: nReturn = TRUE; break; +case 531: nReturn = TRUE; break; +case 533: nReturn = TRUE; break; +case 534: nReturn = TRUE; break; +case 535: nReturn = TRUE; break; +case 536: nReturn = TRUE; break; +case 537: nReturn = TRUE; break; +case 538: nReturn = TRUE; break; +case 539: nReturn = TRUE; break; + } + } + else //<550 + { + switch (nFeat) + { +case 540: nReturn = TRUE; break; +case 541: nReturn = TRUE; break; +case 542: nReturn = TRUE; break; +case 543: nReturn = TRUE; break; +case 544: nReturn = TRUE; break; +case 545: nReturn = TRUE; break; +case 546: nReturn = TRUE; break; +case 547: nReturn = TRUE; break; +case 548: nReturn = TRUE; break; +case 549: nReturn = TRUE; break; + } + } + } + else if (nFeat < 600) + { + if (nFeat < 560) + { + switch (nFeat) + { +case 550: nReturn = TRUE; break; +case 551: nReturn = TRUE; break; +case 552: nReturn = TRUE; break; +case 553: nReturn = TRUE; break; +case 554: nReturn = TRUE; break; +case 555: nReturn = TRUE; break; +case 556: nReturn = TRUE; break; +case 557: nReturn = TRUE; break; +case 558: nReturn = TRUE; break; +case 559: nReturn = TRUE; break; + } + } + else if (nFeat < 570) + { + switch (nFeat) + { +case 560: nReturn = TRUE; break; +case 561: nReturn = TRUE; break; +case 562: nReturn = TRUE; break; +case 563: nReturn = TRUE; break; +case 564: nReturn = TRUE; break; +case 565: nReturn = TRUE; break; +case 566: nReturn = TRUE; break; +case 567: nReturn = TRUE; break; +case 568: nReturn = TRUE; break; +case 569: nReturn = TRUE; break; + } + } + else if (nFeat < 580) + { + switch (nFeat) + { +case 570: nReturn = TRUE; break; +case 571: nReturn = TRUE; break; +case 572: nReturn = TRUE; break; +case 573: nReturn = TRUE; break; +case 574: nReturn = TRUE; break; +case 575: nReturn = TRUE; break; +case 576: nReturn = TRUE; break; +case 577: nReturn = TRUE; break; +case 578: nReturn = TRUE; break; +case 579: nReturn = TRUE; break; + } + } + else if (nFeat < 590) + { + switch (nFeat) + { +case 580: nReturn = TRUE; break; +case 581: nReturn = TRUE; break; +case 582: nReturn = TRUE; break; +case 583: nReturn = TRUE; break; +case 584: nReturn = TRUE; break; +case 585: nReturn = TRUE; break; +case 586: nReturn = TRUE; break; +case 588: nReturn = TRUE; break; +case 589: nReturn = TRUE; break; + } + } + else //<600 + { + switch (nFeat) + { +case 590: nReturn = TRUE; break; +case 591: nReturn = TRUE; break; +case 592: nReturn = TRUE; break; +case 593: nReturn = TRUE; break; +case 594: nReturn = TRUE; break; +case 595: nReturn = TRUE; break; +case 596: nReturn = TRUE; break; +case 597: nReturn = TRUE; break; +case 598: nReturn = TRUE; break; +case 599: nReturn = TRUE; break; + } + } + } + else if (nFeat < 650) + { + if (nFeat < 610) + { + switch (nFeat) + { +case 601: nReturn = TRUE; break; +case 602: nReturn = TRUE; break; +case 603: nReturn = TRUE; break; +case 604: nReturn = TRUE; break; +case 605: nReturn = TRUE; break; +case 606: nReturn = TRUE; break; +case 607: nReturn = TRUE; break; +case 608: nReturn = TRUE; break; + } + } + else if (nFeat < 620) + { + switch (nFeat) + { +case 610: nReturn = TRUE; break; +case 611: nReturn = TRUE; break; +case 612: nReturn = TRUE; break; +case 613: nReturn = TRUE; break; +case 614: nReturn = TRUE; break; +case 615: nReturn = TRUE; break; +case 616: nReturn = TRUE; break; +case 617: nReturn = TRUE; break; +case 619: nReturn = TRUE; break; + } + } + else if (nFeat < 630) + { + switch (nFeat) + { +case 620: nReturn = TRUE; break; +case 621: nReturn = TRUE; break; +case 622: nReturn = TRUE; break; +case 623: nReturn = TRUE; break; +case 624: nReturn = TRUE; break; +case 625: nReturn = TRUE; break; +case 626: nReturn = TRUE; break; +case 627: nReturn = TRUE; break; +case 628: nReturn = TRUE; break; +case 629: nReturn = TRUE; break; + } + } + else if (nFeat < 640) + { + switch (nFeat) + { +case 630: nReturn = TRUE; break; +case 631: nReturn = TRUE; break; +case 632: nReturn = TRUE; break; +case 633: nReturn = TRUE; break; +case 634: nReturn = TRUE; break; +case 635: nReturn = TRUE; break; +case 636: nReturn = TRUE; break; +case 637: nReturn = TRUE; break; +case 638: nReturn = TRUE; break; +case 639: nReturn = TRUE; break; + } + } + else //<650 + { + switch (nFeat) + { +case 640: nReturn = TRUE; break; +case 641: nReturn = TRUE; break; +case 642: nReturn = TRUE; break; +case 643: nReturn = TRUE; break; +case 644: nReturn = TRUE; break; +case 645: nReturn = TRUE; break; +case 646: nReturn = TRUE; break; +case 647: nReturn = TRUE; break; +case 648: nReturn = TRUE; break; +case 649: nReturn = TRUE; break; + } + } + } + else if (nFeat < 700) + { + if (nFeat < 660) + { + switch (nFeat) + { +case 650: nReturn = TRUE; break; +case 651: nReturn = TRUE; break; +case 652: nReturn = TRUE; break; +case 653: nReturn = TRUE; break; +case 654: nReturn = TRUE; break; +case 655: nReturn = TRUE; break; + } + } + else //<700 + { + switch (nFeat) + { +case 695: nReturn = TRUE; break; +case 696: nReturn = TRUE; break; + } + } + } + else //<750 + { + if (nFeat < 710) + { + switch (nFeat) + { +case 709: nReturn = TRUE; break; + } + } + else if (nFeat < 720) + { + switch (nFeat) + { +case 710: nReturn = TRUE; break; +case 711: nReturn = TRUE; break; +case 712: nReturn = TRUE; break; +case 713: nReturn = TRUE; break; +case 714: nReturn = TRUE; break; +case 715: nReturn = TRUE; break; +case 716: nReturn = TRUE; break; +case 717: nReturn = TRUE; break; +case 718: nReturn = TRUE; break; +case 719: nReturn = TRUE; break; + } + } + else if (nFeat < 730) + { + switch (nFeat) + { +case 720: nReturn = TRUE; break; +case 721: nReturn = TRUE; break; +case 722: nReturn = TRUE; break; +case 723: nReturn = TRUE; break; +case 724: nReturn = TRUE; break; +case 725: nReturn = TRUE; break; +case 726: nReturn = TRUE; break; +case 727: nReturn = TRUE; break; +case 728: nReturn = TRUE; break; +case 729: nReturn = TRUE; break; + } + } + else if (nFeat < 740) + { + switch (nFeat) + { +case 730: nReturn = TRUE; break; +case 731: nReturn = TRUE; break; +case 732: nReturn = TRUE; break; +case 733: nReturn = TRUE; break; +case 734: nReturn = TRUE; break; +case 735: nReturn = TRUE; break; +case 736: nReturn = TRUE; break; +case 737: nReturn = TRUE; break; +case 738: nReturn = TRUE; break; +case 739: nReturn = TRUE; break; + } + } + else //750 + { + switch (nFeat) + { +case 740: nReturn = TRUE; break; +case 741: nReturn = TRUE; break; +case 742: nReturn = TRUE; break; +case 743: nReturn = TRUE; break; +case 744: nReturn = TRUE; break; +case 745: nReturn = TRUE; break; +case 747: nReturn = TRUE; break; +case 748: nReturn = TRUE; break; +case 749: nReturn = TRUE; break; + } + } + } + } +else + { + if (nFeat < 800) + { + if (nFeat < 760) + { + switch (nFeat) + { +case 750: nReturn = TRUE; break; +case 751: nReturn = TRUE; break; +case 752: nReturn = TRUE; break; +case 753: nReturn = TRUE; break; +case 754: nReturn = TRUE; break; +case 755: nReturn = TRUE; break; +case 756: nReturn = TRUE; break; +case 757: nReturn = TRUE; break; +case 758: nReturn = TRUE; break; +case 759: nReturn = TRUE; break; + } + } + else if (nFeat < 770) + { + switch (nFeat) + { +case 760: nReturn = TRUE; break; +case 761: nReturn = TRUE; break; +case 762: nReturn = TRUE; break; +case 763: nReturn = TRUE; break; +case 764: nReturn = TRUE; break; +case 765: nReturn = TRUE; break; +case 766: nReturn = TRUE; break; +case 767: nReturn = TRUE; break; +case 768: nReturn = TRUE; break; +case 769: nReturn = TRUE; break; + } + } + else if (nFeat < 780) + { + switch (nFeat) + { +case 770: nReturn = TRUE; break; +case 771: nReturn = TRUE; break; +case 772: nReturn = TRUE; break; +case 773: nReturn = TRUE; break; +case 774: nReturn = TRUE; break; +case 775: nReturn = TRUE; break; +case 776: nReturn = TRUE; break; +case 777: nReturn = TRUE; break; +case 778: nReturn = TRUE; break; +case 779: nReturn = TRUE; break; + } + } + else if (nFeat < 790) + { + switch (nFeat) + { +case 780: nReturn = TRUE; break; +case 781: nReturn = TRUE; break; +case 782: nReturn = TRUE; break; +case 783: nReturn = TRUE; break; +case 784: nReturn = TRUE; break; +case 785: nReturn = TRUE; break; +case 786: nReturn = TRUE; break; +case 787: nReturn = TRUE; break; +case 788: nReturn = TRUE; break; +case 789: nReturn = TRUE; break; + } + } + else //<800 + { + switch (nFeat) + { +case 790: nReturn = TRUE; break; +case 791: nReturn = TRUE; break; +case 792: nReturn = TRUE; break; +case 793: nReturn = TRUE; break; +case 794: nReturn = TRUE; break; +case 795: nReturn = TRUE; break; +case 796: nReturn = TRUE; break; +case 797: nReturn = TRUE; break; +case 798: nReturn = TRUE; break; +case 799: nReturn = TRUE; break; + } + } + } + else if (nFeat < 850) + { + if (nFeat < 810) + { + switch (nFeat) + { +case 800: nReturn = TRUE; break; +case 801: nReturn = TRUE; break; +case 802: nReturn = TRUE; break; +case 803: nReturn = TRUE; break; +case 804: nReturn = TRUE; break; +case 805: nReturn = TRUE; break; +case 806: nReturn = TRUE; break; +case 807: nReturn = TRUE; break; +case 808: nReturn = TRUE; break; +case 809: nReturn = TRUE; break; + } + } + else if (nFeat < 820) + { + switch (nFeat) + { +case 810: nReturn = TRUE; break; +case 811: nReturn = TRUE; break; +case 812: nReturn = TRUE; break; +case 813: nReturn = TRUE; break; +case 814: nReturn = TRUE; break; +case 815: nReturn = TRUE; break; +case 816: nReturn = TRUE; break; +case 817: nReturn = TRUE; break; +case 818: nReturn = TRUE; break; +case 819: nReturn = TRUE; break; + } + } + else if (nFeat < 830) + { + switch (nFeat) + { +case 820: nReturn = TRUE; break; +case 821: nReturn = TRUE; break; +case 822: nReturn = TRUE; break; +case 823: nReturn = TRUE; break; + } + } + else //<850 + { + switch (nFeat) + { +case 844: nReturn = TRUE; break; + } + } + } + else if (nFeat < 900) + { + if (nFeat < 860) + { + switch (nFeat) + { +case 856: nReturn = TRUE; break; + } + } + else + { + switch (nFeat) + { +case 867: nReturn = TRUE; break; +case 868: nReturn = TRUE; break; + } + } + } + else if (nFeat < 950) + { + if (nFeat < 920) + { + switch (nFeat) + { +case 910: nReturn = TRUE; break; +case 911: nReturn = TRUE; break; +case 912: nReturn = TRUE; break; +case 913: nReturn = TRUE; break; +case 914: nReturn = TRUE; break; +case 915: nReturn = TRUE; break; +case 916: nReturn = TRUE; break; +case 917: nReturn = TRUE; break; +case 918: nReturn = TRUE; break; + } + } + } + else + { + if (nFeat < 960) + { + switch (nFeat) + { +case 952: nReturn = TRUE; break; +case 954: nReturn = TRUE; break; +case 955: nReturn = TRUE; break; +case 956: nReturn = TRUE; break; +case 958: nReturn = TRUE; break; + } + } + else //<1000 + { + switch (nFeat) + { +case 993: nReturn = TRUE; break; +case 995: nReturn = TRUE; break; +case 996: nReturn = TRUE; break; +case 997: nReturn = TRUE; break; +case 999: nReturn = TRUE; break; + } + } + } + } +return nReturn; +} + +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_module/_removed files/hgll_const_inc.nss b/_module/_removed files/hgll_const_inc.nss new file mode 100644 index 00000000..d6e9f563 --- /dev/null +++ b/_module/_removed files/hgll_const_inc.nss @@ -0,0 +1,39 @@ +// This lists all of the constant ints that are to be used for LL + +// This is the path to your servervault. It must be set correctly for Letoscript to work. +const string NWNPATH = "C:/NeverwinterNights/NWN/servervault/";//windows sample +// const string NWNPATH = "/home/funkyswerve/nwn/servervault/";//linux sample + +const int PHOENIX = FALSE;//set this to true if you are using the older version of Letoscript, 3-18, rather than the newer 3-24 (other versions are 'bridge' versions with bugs) + +const int DEBUG = FALSE;//set this to TRUE to enable debugging + +const int DEV_CRIT_DISABLED = FALSE;//set this to TRUE to disable devastating critical feat selection on levelup + +// Experience Requirements for Legendary Levels +// Adjust as desired. These were set by increasing the additional amount required for the +// previous level by 25%. Level 40 required 39000 experience points, so Level 41 was set +// to require 39000 x 1.25 = 48800 experience points. This will be ALOT on some worlds, +// and not enough on others, so adjust to suit your needs + +const int BASE_XP_LVL_40 = 780000; +const int XP_REQ_LVL41 = 821000; +const int XP_REQ_LVL42 = 863000; +const int XP_REQ_LVL43 = 900000; +const int XP_REQ_LVL44 = 100000; +const int XP_REQ_LVL45 = 1100000; +const int XP_REQ_LVL46 = 1200000; +const int XP_REQ_LVL47 = 1300000; +const int XP_REQ_LVL48 = 1400000; +const int XP_REQ_LVL49 = 1600000; +const int XP_REQ_LVL50 = 1800000; +const int XP_REQ_LVL51 = 2200000; +const int XP_REQ_LVL52 = 2400000; +const int XP_REQ_LVL53 = 2600000; +const int XP_REQ_LVL54 = 2800000; +const int XP_REQ_LVL55 = 3000000; +const int XP_REQ_LVL56 = 3400000; +const int XP_REQ_LVL57 = 3800000; +const int XP_REQ_LVL58 = 4200000; +const int XP_REQ_LVL59 = 4600000; +const int XP_REQ_LVL60 = 5000000; diff --git a/_module/_removed files/hgll_featreq_inc.nss b/_module/_removed files/hgll_featreq_inc.nss new file mode 100644 index 00000000..bc104321 --- /dev/null +++ b/_module/_removed files/hgll_featreq_inc.nss @@ -0,0 +1,4202 @@ +//--------------------------------DECLARATIONS--------------------------------// + +// This function determines what class controls the character's advancement during legendary +// levels. First it checks the character's It returns the class type with the most levels. +// If the character has two classes that tie for most number of levels, it will return the +// class the character took first. It returns -1 on an error. +int GetControlClass(object oPC); +// This function returns the cost of taking a certain skill based on the class. Return +// values are: 1 for class skill, 2 for cross-class skill, -1 for class forbidden skill (default), +// and -2 for CLASS_TYPE input error. The switches essentially reconstruct the 2da. They also +// conveniently mirror the skill chart order in the HotU book. This allows users to alter skill +// costs and availabilities, and is faster than a 2da or int cache lookup. +int GetCostOfSkill(int nClass, int nSkill); +// This function returns TRUE if the PC has the stat or stats required to take nFeat, +// or if nFeat has no required stats. +int GetAreFeatStatReqsMet(int nFeat, object oPC); +// This function returns TRUE if the PC has the skill or skills required to take nFeat, +// or if nFeat has no required skills. +int GetAreFeatSkillReqsMet(int nFeat, object oPC); +// This function returns TRUE if the PC has the feat or feats required to take nFeat, +// or if nFeat has no required feats. +int GetAreFeatFeatReqsMet(int nFeat, object oPC); +// This function returns TRUE if the feat is only available at first level. Returns -3 on error. +int GetIsFeatFirstLevelOnly(int nFeat); +// This function returns true if a feat is of the devastating critical type. +int GetIsFeatDevCrit(int nFeat); +// This function returns TRUE if the PC has the ability to cast spells of the level required +// by the feat specified. It returns TRUE if the feat has no spell level requirement, and +// always returns FALSE for Sap. +int GetHasRequiredSpellLevelForFeat(object oPC, int nFeat); +// This function returns the name of the designated feat. +string GetNameOfFeat(int nFeat); +// This function returns TRUE if the feat is restricted to a limited number of uses per day. +int GetIsFeatLimitedUses(int nFeat); + +//----------------------------------FUNCTIONS---------------------------------// + +int GetControlClass(object oPC) +{ +int nL1 = GetLevelByPosition(1, oPC); +int nL2 = GetLevelByPosition(2, oPC); +int nL3 = GetLevelByPosition(3, oPC); +//class 1 highest +if ((nL1 > nL2) && (nL1 > nL3)) return GetClassByPosition(1, oPC); +//class 2 highest +else if ((nL2 > nL1) && (nL2 > nL3)) return GetClassByPosition(2, oPC); +//class 3 highest +else if ((nL3 > nL1) && (nL3 > nL2)) return GetClassByPosition(3, oPC); +//class 1 and 2 tied for highest +else if (nL1 == nL2) return GetClassByPosition(1, oPC); +//class 1 and 3 tied for highest +else if (nL1 == nL3) return GetClassByPosition(1, oPC); +//class 2 and 3 tied for highest +else if (nL2 == nL3) return GetClassByPosition(2, oPC); +//return -1 on error +else return -1; +} + +int GetCostOfSkill(int nClass, int nSkill) +{ +switch(nClass) //These switches essentially reconstruct the 2da. They also conveniently mirror + { //the skill chart order in the HotU book. This allows users to alter skill costs + //and availabilities as well, and is faster than a 2da or int cache lookup. + case 0://barbarian + switch(nSkill){ + case 0: return -1; break;//animal empathy + case 1: return 2; break;//concentration + case 2: return 2; break;//disable trap + case 3: return 1; break;//discipline + case 4: return 1; break;//heal + case 5: return 2; break;//hide + case 6: return 1; break;//listen + case 7: return 1; break;//lore + case 8: return 2; break;//move silently + case 9: return 2; break;//open lock + case 10: return 1; break;//parry + case 11: return -1; break;//perform + case 12: return 2; break;//persuade + case 13: return 2; break;//pick pocket + case 14: return 2; break;//search + case 15: return 2; break;//set trap + case 16: return 2; break;//spellcraft + case 17: return 2; break;//spot + case 18: return 1; break;//taunt + case 19: return -1; break;//UMD + case 20: return 2; break;//appraise + case 21: return 2; break;//tumble + case 22: return 1; break;//craft trap + case 23: return 2; break;//bluff + case 24: return 1; break;//intimidate + case 25: return 1; break;//craft armor + case 26: return 1; break;//craft weapon + default: return -1; + } + case 1://bard + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return 1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 1; break; + case 19: return 1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 2://cleric + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 3://druid + switch(nSkill){ + case 0: return 1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 4://fighter + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 5://monk + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 6://paladin + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 1; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 7://ranger + switch(nSkill){ + case 0: return 1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 1; break; + case 15: return 1; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 8://rogue + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 1; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 1; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 1; break; + case 15: return 1; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return 1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 1; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 9://sorceror + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 10://wizard + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 27://shadowdancer + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 1; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 1; break; + case 22: return 2; break; + case 23: return 1; break; + case 24: return 2; break; + case 25: return 2; break; + case 26: return 2; break; + default: return -1; + } + case 28://harper scout + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 29://arcane archer + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 30://assassin + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 1; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 1; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 1; break; + case 14: return 1; break; + case 15: return 1; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return 1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 1; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 31://blackguard + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 1; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 1; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 32://CoT + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 33://weaponmaster + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 2; break; + case 23: return 2; break; + case 24: return 1; break; + case 25: return 2; break; + case 26: return 2; break; + default: return -1; + } + case 34://palemaster + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 35://shifter + switch(nSkill){ + case 0: return 1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 36://dwarven defender + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 37://dragon disciple + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 1; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + default: return -2; + } +return -3; +} + +int GetAreFeatStatReqsMet(int nFeat, object oPC) +{ +int nStr = TRUE; +int nDex = TRUE; +int nCon = TRUE; +int nInt = TRUE; +int nWis = TRUE; +int nCha = TRUE; +if (nFeat < 495) + { + if (nFeat < 35) + { + switch(nFeat) + { +case 1: nDex = (GetLocalInt(oPC, "BASE_DEX") >=15); break; +case 6: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 8: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 9: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 10: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 16: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 17: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 18: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 19: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 26: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 28: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 30: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; + } + } + else + { + switch(nFeat) + { +case 38: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 39: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); nWis = (GetLocalInt(oPC, "BASE_WIS") >=13); break; +case 389: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 390: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 391: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 392: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 409: nDex = (GetLocalInt(oPC, "BASE_DEX") >=15); break; +case 412: nWis = (GetLocalInt(oPC, "BASE_WIS") >=13); break; +case 413: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); nCha = (GetLocalInt(oPC, "BASE_CHA") >=13); break; +case 414: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); nCha = (GetLocalInt(oPC, "BASE_CHA") >=13); break; +case 491: nDex = (GetLocalInt(oPC, "BASE_DEX") >=25); break; +case 492: nCon = (GetLocalInt(oPC, "BASE_CON") >=21); break; + } + } + } +else if (nFeat < 532) + { + if (nFeat < 513) + { + switch(nFeat) + { +case 495: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 496: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 497: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 498: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 499: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 500: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 501: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 502: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 503: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 504: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 505: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 506: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 507: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 508: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 509: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 510: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 511: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 512: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; + } + } + else + { + switch(nFeat) + { +case 513: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 514: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 515: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 516: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 517: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 518: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 519: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 520: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 521: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 522: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 523: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 524: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 525: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 526: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 527: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 528: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 529: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 530: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 531: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; + } + } + } +else if (nFeat < 746) + { + if (nFeat < 727) + { + switch(nFeat) + { +case 697: nWis = (GetLocalInt(oPC, "BASE_WIS") >=21); break; +case 709: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 710: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 711: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 712: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 713: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 714: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 715: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 716: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 717: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 718: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 719: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 720: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 721: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 722: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 723: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 724: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 725: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 726: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; + } + } + else + { + switch(nFeat) + { +case 727: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 728: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 729: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 730: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 731: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 732: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 733: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 734: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 735: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 736: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 737: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 738: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 739: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 740: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 741: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 742: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 743: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 744: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 745: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; + } + } + } +else + { + if (nFeat < 840) + { + switch(nFeat) + { +case 747: nCon = (GetLocalInt(oPC, "BASE_CON") >=25); break; +case 748: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 749: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 750: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 751: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 752: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 824: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 825: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 826: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 827: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 828: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 829: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 830: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 831: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 832: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 833: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; + } + } + else + { + switch(nFeat) + { +case 844: nDex = (GetLocalInt(oPC, "BASE_DEX") >=19); nWis = (GetLocalInt(oPC, "BASE_WIS") >=19); break; +case 854: nWis = (GetLocalInt(oPC, "BASE_WIS") >=25); nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 856: nDex = (GetLocalInt(oPC, "BASE_DEX") >=25); break; +case 867: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 868: nDex = (GetLocalInt(oPC, "BASE_DEX") >=23); break; +case 869: nStr = (GetLocalInt(oPC, "BASE_STR") >=21); nCon = (GetLocalInt(oPC, "BASE_CON") >=21); break; +case 873: nWis = (GetLocalInt(oPC, "BASE_WIS") >=30); break; +case 955: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 958: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 988: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 996: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 999: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 1060: nWis = (GetLocalInt(oPC, "BASE_WIS") >=25); break; +case 1061: nWis = (GetLocalInt(oPC, "BASE_WIS") >=27); break; + } + } + } +return (nStr && nDex && nCon && nInt && nWis && nCha); +} + +int GetAreFeatSkillReqsMet(int nFeat, object oPC) +{ +int nReturn = TRUE; +if (nFeat < 200) + { + if (nFeat < 180) + { + switch(nFeat) + { +case 34: nReturn = (GetCostOfSkill(GetControlClass(oPC), 0) > 0); break; +case 173: nReturn = (GetCostOfSkill(GetControlClass(oPC), 1) > 0); break; +case 174: nReturn = (GetCostOfSkill(GetControlClass(oPC), 2) > 0); break; +case 175: nReturn = (GetCostOfSkill(GetControlClass(oPC), 3) > 0); break; +case 177: nReturn = (GetCostOfSkill(GetControlClass(oPC), 4) > 0); break; +case 178: nReturn = (GetCostOfSkill(GetControlClass(oPC), 5) > 0); break; +case 179: nReturn = (GetCostOfSkill(GetControlClass(oPC), 6) > 0); break; + } + } + else + { + switch(nFeat) + { +case 180: nReturn = (GetCostOfSkill(GetControlClass(oPC), 7) > 0); break; +case 181: nReturn = (GetCostOfSkill(GetControlClass(oPC), 8) > 0); break; +case 182: nReturn = (GetCostOfSkill(GetControlClass(oPC), 9) > 0); break; +case 183: nReturn = (GetCostOfSkill(GetControlClass(oPC), 10) > 0); break; +case 184: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 185: nReturn = (GetCostOfSkill(GetControlClass(oPC), 12) > 0); break; +case 186: nReturn = (GetCostOfSkill(GetControlClass(oPC), 13) > 0); break; +case 187: nReturn = (GetCostOfSkill(GetControlClass(oPC), 14) > 0); break; +case 188: nReturn = (GetCostOfSkill(GetControlClass(oPC), 15) > 0); break; +case 189: nReturn = (GetCostOfSkill(GetControlClass(oPC), 16) > 0); break; +case 190: nReturn = (GetCostOfSkill(GetControlClass(oPC), 17) > 0); break; +case 192: nReturn = (GetCostOfSkill(GetControlClass(oPC), 18) > 0); break; +case 193: nReturn = (GetCostOfSkill(GetControlClass(oPC), 19) > 0); break; + } + } + } +else if (nFeat < 600) + { + if (nFeat < 590) + { + switch(nFeat) + { +case 378: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 404: nReturn = (GetCostOfSkill(GetControlClass(oPC), 20) > 0); break; +case 406: nReturn = (GetCostOfSkill(GetControlClass(oPC), 21) > 0); break; +case 407: nReturn = (GetCostOfSkill(GetControlClass(oPC), 22) > 0); break; +case 423: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 424: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 587: nReturn = (GetLocalInt(oPC, "BASE_ANIMAL") > 19); break; +case 588: nReturn = (GetLocalInt(oPC, "BASE_APPRAI") > 19); break; +case 589: nReturn = (GetLocalInt(oPC, "BASE_CONCEN") > 19); break; + } + } + else + { + switch(nFeat) + { +case 590: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_T") > 19); break; +case 591: nReturn = (GetLocalInt(oPC, "BASE_DISABL") > 19); break; +case 592: nReturn = (GetLocalInt(oPC, "BASE_DISCIP") > 19); break; +case 593: nReturn = (GetLocalInt(oPC, "BASE_HEAL") > 19); break; +case 594: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 19); break; +case 595: nReturn = (GetLocalInt(oPC, "BASE_LISTEN") > 19); break; +case 596: nReturn = (GetLocalInt(oPC, "BASE_LORE") > 19); break; +case 597: nReturn = (GetLocalInt(oPC, "BASE_MOVE_S") > 19); break; +case 598: nReturn = (GetLocalInt(oPC, "BASE_OPEN_L") > 19); break; +case 599: nReturn = (GetLocalInt(oPC, "BASE_PARRY") > 19); break; + } + } + } +else if (nFeat < 860) + { + if (nFeat < 610) + { + switch(nFeat) + { +case 600: nReturn = (GetLocalInt(oPC, "BASE_PERFOR") > 19); break; +case 601: nReturn = (GetLocalInt(oPC, "BASE_PERSUA") > 19); break; +case 602: nReturn = (GetLocalInt(oPC, "BASE_PICK_P") > 19); break; +case 603: nReturn = (GetLocalInt(oPC, "BASE_SEARCH") > 19); break; +case 604: nReturn = (GetLocalInt(oPC, "BASE_SET_TR") > 19); break; +case 605: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 19); break; +case 606: nReturn = (GetLocalInt(oPC, "BASE_SPOT") > 19); break; +case 607: nReturn = (GetLocalInt(oPC, "BASE_TAUNT") > 19); break; +case 608: nReturn = (GetLocalInt(oPC, "BASE_TUMBLE") > 19); break; +case 609: nReturn = (GetLocalInt(oPC, "BASE_USE_MA") > 19); break; + } + } + else + { + switch(nFeat) + { +case 696: nReturn = (GetLocalInt(oPC, "BASE_CONCEN") > 24); break; +case 748: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 749: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 750: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 751: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 752: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 856: nReturn = (GetLocalInt(oPC, "BASE_TUMBLE") > 29); break; +case 857: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; +case 858: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; +case 859: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; + } + } + } +else + { + if (nFeat < 900) + { + switch(nFeat) + { +case 860: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; +case 861: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; +case 862: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; +case 863: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; +case 864: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; +case 865: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; +case 870: nReturn = (GetLocalInt(oPC, "BASE_PERFOR") > 24); break; +case 874: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 14); break; +case 875: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 21); break; +case 876: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 31); break; +case 877: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 25); break; +case 878: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 24); break; + } + } + else + { + switch(nFeat) + { +case 911: nReturn = (GetCostOfSkill(GetControlClass(oPC), 25) > 0); break; +case 912: nReturn = (GetCostOfSkill(GetControlClass(oPC), 26) > 0); break; +case 913: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_A") > 19); break; +case 914: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_W") > 19); break; +case 915: nReturn = (GetCostOfSkill(GetControlClass(oPC), 23) > 0); break; +case 916: nReturn = (GetCostOfSkill(GetControlClass(oPC), 24) > 0); break; +case 917: nReturn = (GetLocalInt(oPC, "BASE_BLUFF") > 19); break; +case 918: nReturn = (GetLocalInt(oPC, "BASE_INTIMI") > 19); break; +case 989: nReturn = (GetLocalInt(oPC, "BASE_INTIMI") > 24); break; +case 990: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 33); break; + } + } + } +return nReturn; +} + +int GetAreFeatFeatReqsMet(int nFeat, object oPC) +{ +int nPRF1 = 1, nPRF2 = 1, nORF1 = 1, nORF2 = 0, nORF3 = 0, nORF4 = 0, nORF5 = 0;//these match columns from the 2da +if (nFeat < 250)//nORF1 defaults to true so that feats without "Or Feat" Requirements will return for them + { //Likewise nPRF1 & 2 default to true for feats that have no prerequisite feats + if (nFeat < 50) + { + if (nFeat < 10) + { + switch (nFeat) + { +case 2: nPRF1 = GetHasFeat(3, oPC); nPRF2 = GetHasFeat(4, oPC); break; +case 4: nPRF1 = GetHasFeat(3, oPC); break; +case 6: nPRF1 = GetHasFeat(28, oPC); break; +case 8: nPRF1 = GetHasFeat(21, oPC); break; + } + } + else if (nFeat < 20) + { + switch (nFeat) + { +case 13: nPRF1 = GetHasFeat(294, oPC); break; +case 15: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 16: nPRF1 = GetHasFeat(9, oPC); break; +case 17: nPRF1 = GetHasFeat(23, oPC); break; +case 19: nPRF1 = GetHasFeat(28, oPC); break; + + } + } + else if (nFeat < 30) + { + switch (nFeat) + { +case 20: nPRF1 = GetHasFeat(41, oPC); nPRF2 = GetHasFeat(1, oPC); break; +case 26: nPRF1 = GetHasFeat(10, oPC); break; + } + } + else if (nFeat < 40) + { + switch (nFeat) + { +case 30: nPRF1 = GetHasFeat(27, oPC); break; +case 31: nPRF1 = GetHasFeat(5, oPC); break; +case 38: nPRF1 = GetHasFeat(31, oPC); break; +case 39: nPRF1 = GetHasFeat(21, oPC); break; + } + } + else //<50 + { + switch (nFeat) + { +case 43: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 47: nPRF1 = GetHasFeat(43, oPC); break; + } + } + } + else if (nFeat < 100) + { + if (nFeat < 60) + { + switch (nFeat) + { +case 52: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 53: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 54: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 55: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 56: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 57: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 58: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 59: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; + } + } + else if (nFeat < 70) + { + switch (nFeat) + { +case 60: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 61: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); break; +case 63: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 64: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 65: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 66: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 67: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 68: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 69: nPRF1 = GetHasFeat(45, oPC); break; + } + } + else if (nFeat < 80) + { + switch (nFeat) + { +case 70: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); break; +case 71: nPRF1 = GetHasFeat(45, oPC); break; +case 72: nPRF1 = GetHasFeat(45, oPC); break; +case 73: nPRF1 = GetHasFeat(45, oPC); break; +case 74: nPRF1 = GetHasFeat(45, oPC); break; +case 75: nPRF1 = GetHasFeat(45, oPC); break; +case 76: nPRF1 = GetHasFeat(45, oPC); break; +case 77: nPRF1 = GetHasFeat(45, oPC); break; +case 78: nPRF1 = GetHasFeat(45, oPC); break; +case 79: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; + } + } + else if (nFeat < 90) + { + switch (nFeat) + { +case 80: nPRF1 = GetHasFeat(44, oPC); break; +case 81: nPRF1 = GetHasFeat(44, oPC); break; +case 82: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; +case 83: nPRF1 = GetHasFeat(44, oPC); break; +case 84: nPRF1 = GetHasFeat(44, oPC); break; +case 85: nORF1 = GetHasFeat(44, oPC); break; +case 86: nPRF1 = GetHasFeat(44, oPC); break; +case 87: nPRF1 = GetHasFeat(44, oPC); break; +case 88: nPRF1 = GetHasFeat(44, oPC); break; +case 89: nPRF1 = GetHasFeat(44, oPC); break; + } + } + else //<100 + { + switch (nFeat) + { +case 90: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 91: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 92: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 93: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 94: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 95: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 96: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 97: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 98: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 99: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); break; + } + } + } + else if (nFeat < 150) + { + if (nFeat < 110) + { + switch (nFeat) + { +case 101: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 102: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 103: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 104: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 105: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 106: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 107: nPRF1 = GetHasFeat(45, oPC); break; +case 108: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); break; +case 109: nPRF1 = GetHasFeat(45, oPC); break; + } + } + else if (nFeat < 120) + { + switch (nFeat) + { +case 110: nPRF1 = GetHasFeat(45, oPC); break; +case 111: nPRF1 = GetHasFeat(45, oPC); break; +case 112: nPRF1 = GetHasFeat(45, oPC); break; +case 113: nPRF1 = GetHasFeat(45, oPC); break; +case 114: nPRF1 = GetHasFeat(45, oPC); break; +case 115: nPRF1 = GetHasFeat(45, oPC); break; +case 116: nPRF1 = GetHasFeat(45, oPC); break; +case 117: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; +case 118: nPRF1 = GetHasFeat(44, oPC); break; +case 119: nPRF1 = GetHasFeat(44, oPC); break; + } + } + else if (nFeat < 130) + { + switch (nFeat) + { +case 120: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; +case 121: nPRF1 = GetHasFeat(44, oPC); break; +case 122: nPRF1 = GetHasFeat(44, oPC); break; +case 123: nPRF1 = GetHasFeat(44, oPC); break; +case 124: nPRF1 = GetHasFeat(44, oPC); break; +case 125: nPRF1 = GetHasFeat(44, oPC); break; +case 126: nPRF1 = GetHasFeat(44, oPC); break; +case 127: nPRF1 = GetHasFeat(44, oPC); break; +case 128: nPRF1 = GetHasFeat(90, oPC); break; +case 129: nPRF1 = GetHasFeat(91, oPC); break; + } + } + else if (nFeat < 140) + { + switch (nFeat) + { +case 130: nPRF1 = GetHasFeat(92, oPC); break; +case 131: nPRF1 = GetHasFeat(93, oPC); break; +case 132: nPRF1 = GetHasFeat(94, oPC); break; +case 133: nPRF1 = GetHasFeat(95, oPC); break; +case 134: nPRF1 = GetHasFeat(96, oPC); break; +case 135: nPRF1 = GetHasFeat(97, oPC); break; +case 136: nPRF1 = GetHasFeat(98, oPC); break; +case 137: nPRF1 = GetHasFeat(99, oPC); break; +case 138: nPRF1 = GetHasFeat(100, oPC); break; +case 139: nPRF1 = GetHasFeat(101, oPC); break; + } + } + else //<150 + { + switch (nFeat) + { +case 140: nPRF1 = GetHasFeat(102, oPC); break; +case 141: nPRF1 = GetHasFeat(103, oPC); break; +case 142: nPRF1 = GetHasFeat(104, oPC); break; +case 143: nPRF1 = GetHasFeat(105, oPC); break; +case 144: nPRF1 = GetHasFeat(106, oPC); break; +case 145: nPRF1 = GetHasFeat(107, oPC); break; +case 146: nPRF1 = GetHasFeat(108, oPC); break; +case 147: nPRF1 = GetHasFeat(109, oPC); break; +case 148: nPRF1 = GetHasFeat(110, oPC); break; +case 149: nPRF1 = GetHasFeat(111, oPC); break; + } + } + } + else + { + if (nFeat < 160) + { + switch (nFeat) + { +case 150: nPRF1 = GetHasFeat(112, oPC); break; +case 151: nPRF1 = GetHasFeat(113, oPC); break; +case 152: nPRF1 = GetHasFeat(114, oPC); break; +case 153: nPRF1 = GetHasFeat(115, oPC); break; +case 154: nPRF1 = GetHasFeat(116, oPC); break; +case 155: nPRF1 = GetHasFeat(117, oPC); break; +case 156: nPRF1 = GetHasFeat(118, oPC); break; +case 157: nPRF1 = GetHasFeat(119, oPC); break; +case 158: nPRF1 = GetHasFeat(120, oPC); break; +case 159: nPRF1 = GetHasFeat(121, oPC); break; + } + } + else + { + switch (nFeat) + { +case 160: nPRF1 = GetHasFeat(122, oPC); break; +case 161: nPRF1 = GetHasFeat(123, oPC); break; +case 162: nPRF1 = GetHasFeat(124, oPC); break; +case 163: nPRF1 = GetHasFeat(125, oPC); break; +case 164: nPRF1 = GetHasFeat(126, oPC); break; +case 165: nPRF1 = GetHasFeat(127, oPC); break; + } + } + } + } +else if (nFeat < 500) + { + if (nFeat < 400) + { + switch (nFeat) + { +case 390: nPRF1 = GetHasFeat(389, oPC); break; +case 391: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(6, oPC); break; +case 392: nPRF1 = GetHasFeat(26, oPC); nPRF2 = GetHasFeat(10, oPC); break; +case 393: nPRF1 = GetHasFeat(35, oPC); break; +case 394: nPRF1 = GetHasFeat(166, oPC); break; +case 395: nPRF1 = GetHasFeat(167, oPC); break; +case 396: nPRF1 = GetHasFeat(168, oPC); break; +case 397: nPRF1 = GetHasFeat(169, oPC); break; +case 398: nPRF1 = GetHasFeat(170, oPC); break; +case 399: nPRF1 = GetHasFeat(171, oPC); break; + } + } + else if (nFeat < 450) + { + if (nFeat < 410) + { + switch (nFeat) + { +case 400: nPRF1 = GetHasFeat(172, oPC); break; +case 401: nPRF1 = GetHasFeat(36, oPC); break; +case 409: nPRF1 = GetHasFeat(21, oPC); break; + } + } + else if (nFeat < 420) + { + switch (nFeat) + { +case 410: nPRF1 = GetHasFeat(39, oPC); break; +case 413: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(294, oPC); break; +case 414: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(294, oPC); break; +case 415: nPRF1 = GetHasFeat(35, oPC); break; +case 416: nPRF1 = GetHasFeat(166, oPC); break; +case 417: nPRF1 = GetHasFeat(167, oPC); break; +case 418: nPRF1 = GetHasFeat(168, oPC); break; +case 419: nPRF1 = GetHasFeat(169, oPC); break; + } + } + else if (nFeat < 430) + { + switch (nFeat) + { +case 420: nPRF1 = GetHasFeat(170, oPC); break; +case 421: nPRF1 = GetHasFeat(171, oPC); break; +case 422: nPRF1 = GetHasFeat(172, oPC); break; + } + } + else //<450 + { + switch (nFeat) + { +case 446: nPRF1 = GetHasFeat(445, oPC); break; +case 447: nPRF1 = GetHasFeat(446, oPC); break; +case 448: nPRF1 = GetHasFeat(447, oPC); break; +case 449: nPRF1 = GetHasFeat(448, oPC); break; + } + } + } + else //<500 + { + if (nFeat < 460) + { + switch (nFeat) + { +case 452: nPRF1 = GetHasFeat(451, oPC); break; +case 456: nPRF1 = GetHasFeat(455, oPC); break; +case 457: nPRF1 = GetHasFeat(456, oPC); break; +case 458: nPRF1 = GetHasFeat(457, oPC); break; +case 459: nPRF1 = GetHasFeat(458, oPC); break; + } + } + else if (nFeat < 470) + { + switch (nFeat) + { +case 461: nPRF1 = GetHasFeat(460, oPC); break; +case 462: nPRF1 = GetHasFeat(461, oPC); break; +case 464: nPRF1 = GetHasFeat(463, oPC); break; +case 465: nPRF1 = GetHasFeat(464, oPC); break; +case 466: nPRF1 = GetHasFeat(465, oPC); break; +case 467: nPRF1 = GetHasFeat(466, oPC); break; + } + } + else //<500 + { + switch (nFeat) + { +case 493: nPRF1 = GetHasFeat(492, oPC); break; +case 494: nPRF1 = GetHasFeat(493, oPC); break; +case 495: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(709, oPC); break; +case 496: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(710, oPC); break; +case 497: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(711, oPC); break; +case 498: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(712, oPC); break; +case 499: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(713, oPC); break; + } + } + } + } +else if (nFeat < 750) + { + if (nFeat < 550) + { + if (nFeat < 510) + { + switch (nFeat) + { +case 500: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(714, oPC); break; +case 501: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(715, oPC); break; +case 502: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(716, oPC); break; +case 503: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(717, oPC); break; +case 504: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(718, oPC); break; +case 505: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(719, oPC); break; +case 506: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(720, oPC); break; +case 507: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(721, oPC); break; +case 508: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(722, oPC); break; +case 509: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(723, oPC); break; + } + } + else if (nFeat < 520) + { + switch (nFeat) + { +case 510: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(724, oPC); break; +case 511: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(725, oPC); break; +case 512: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(726, oPC); break; +case 513: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(727, oPC); break; +case 514: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(728, oPC); break; +case 515: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(729, oPC); break; +case 516: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(730, oPC); break; +case 517: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(731, oPC); break; +case 518: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(732, oPC); break; +case 519: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(733, oPC); break; + } + } + else if (nFeat < 530) + { + switch (nFeat) + { +case 520: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(734, oPC); break; +case 521: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(735, oPC); break; +case 522: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(736, oPC); break; +case 523: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(737, oPC); break; +case 524: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(738, oPC); break; +case 525: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(739, oPC); break; +case 526: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(740, oPC); break; +case 527: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(741, oPC); break; +case 528: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(742, oPC); break; +case 529: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(743, oPC); break; + } + } + else if (nFeat < 540) + { + switch (nFeat) + { +case 530: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(744, oPC); break; +case 531: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(745, oPC); break; +case 534: nPRF1 = GetHasFeat(533, oPC); break; +case 535: nPRF1 = GetHasFeat(534, oPC); break; +case 536: nPRF1 = GetHasFeat(535, oPC); break; +case 537: nPRF1 = GetHasFeat(536, oPC); break; +case 538: nPRF1 = GetHasFeat(537, oPC); break; +case 539: nPRF1 = GetHasFeat(538, oPC); break; + } + } + else //<550 + { + switch (nFeat) + { +case 540: nPRF1 = GetHasFeat(539, oPC); break; +case 541: nPRF1 = GetHasFeat(540, oPC); break; +case 542: nPRF1 = GetHasFeat(541, oPC); break; +case 544: nPRF1 = GetHasFeat(543, oPC); break; +case 545: nPRF1 = GetHasFeat(544, oPC); break; +case 546: nPRF1 = GetHasFeat(545, oPC); break; +case 547: nPRF1 = GetHasFeat(546, oPC); break; +case 548: nPRF1 = GetHasFeat(547, oPC); break; +case 549: nPRF1 = GetHasFeat(548, oPC); break; + } + } + } + else if (nFeat < 600) + { + if (nFeat < 560) + { + switch (nFeat) + { +case 550: nPRF1 = GetHasFeat(549, oPC); break; +case 551: nPRF1 = GetHasFeat(550, oPC); break; +case 552: nPRF1 = GetHasFeat(551, oPC); break; +case 554: nPRF1 = GetHasFeat(553, oPC); break; +case 555: nPRF1 = GetHasFeat(554, oPC); break; +case 556: nPRF1 = GetHasFeat(555, oPC); break; +case 557: nPRF1 = GetHasFeat(556, oPC); break; +case 558: nPRF1 = GetHasFeat(557, oPC); break; +case 559: nPRF1 = GetHasFeat(558, oPC); break; + } + } + else if (nFeat < 570) + { + switch (nFeat) + { +case 560: nPRF1 = GetHasFeat(559, oPC); break; +case 561: nPRF1 = GetHasFeat(560, oPC); break; +case 562: nPRF1 = GetHasFeat(561, oPC); break; +case 564: nPRF1 = GetHasFeat(563, oPC); break; +case 565: nPRF1 = GetHasFeat(564, oPC); break; +case 566: nPRF1 = GetHasFeat(565, oPC); break; +case 567: nPRF1 = GetHasFeat(566, oPC); break; +case 568: nPRF1 = GetHasFeat(567, oPC); break; +case 569: nPRF1 = GetHasFeat(568, oPC); break; + } + } + else if (nFeat < 580) + { + switch (nFeat) + { +case 570: nPRF1 = GetHasFeat(569, oPC); break; +case 571: nPRF1 = GetHasFeat(570, oPC); break; +case 572: nPRF1 = GetHasFeat(571, oPC); break; +case 574: nPRF1 = GetHasFeat(573, oPC); break; +case 575: nPRF1 = GetHasFeat(574, oPC); break; +case 576: nPRF1 = GetHasFeat(575, oPC); break; +case 577: nPRF1 = GetHasFeat(576, oPC); break; +case 578: nPRF1 = GetHasFeat(577, oPC); break; +case 579: nPRF1 = GetHasFeat(578, oPC); break; + } + } + else + { + switch (nFeat) + { +case 580: nPRF1 = GetHasFeat(579, oPC); break; +case 581: nPRF1 = GetHasFeat(580, oPC); break; +case 582: nPRF1 = GetHasFeat(581, oPC); break; + } + } + } + else if (nFeat < 650) + { + if (nFeat < 620) + { + switch (nFeat) + { +case 610: nPRF1 = GetHasFeat(393, oPC); break; +case 611: nPRF1 = GetHasFeat(394, oPC); break; +case 612: nPRF1 = GetHasFeat(395, oPC); break; +case 613: nPRF1 = GetHasFeat(396, oPC); break; +case 614: nPRF1 = GetHasFeat(397, oPC); break; +case 615: nPRF1 = GetHasFeat(398, oPC); break; +case 616: nPRF1 = GetHasFeat(399, oPC); break; +case 617: nPRF1 = GetHasFeat(400, oPC); break; +case 618: nPRF1 = GetHasFeat(401, oPC); break; +case 619: nPRF1 = GetHasFeat(15, oPC); break; + } + } + else if (nFeat < 630) + { + switch (nFeat) + { +case 620: nPRF1 = GetHasFeat(90, oPC); break; +case 621: nPRF1 = GetHasFeat(91, oPC); break; +case 622: nPRF1 = GetHasFeat(92, oPC); break; +case 623: nPRF1 = GetHasFeat(93, oPC); break; +case 624: nPRF1 = GetHasFeat(94, oPC); break; +case 625: nPRF1 = GetHasFeat(95, oPC); break; +case 626: nPRF1 = GetHasFeat(96, oPC); break; +case 627: nPRF1 = GetHasFeat(97, oPC); break; +case 628: nPRF1 = GetHasFeat(98, oPC); break; +case 629: nPRF1 = GetHasFeat(99, oPC); break; + } + } + else if (nFeat < 640) + { + switch (nFeat) + { +case 630: nPRF1 = GetHasFeat(100, oPC); break; +case 631: nPRF1 = GetHasFeat(101, oPC); break; +case 632: nPRF1 = GetHasFeat(102, oPC); break; +case 633: nPRF1 = GetHasFeat(103, oPC); break; +case 634: nPRF1 = GetHasFeat(104, oPC); break; +case 635: nPRF1 = GetHasFeat(105, oPC); break; +case 636: nPRF1 = GetHasFeat(106, oPC); break; +case 637: nPRF1 = GetHasFeat(107, oPC); break; +case 638: nPRF1 = GetHasFeat(108, oPC); break; +case 639: nPRF1 = GetHasFeat(109, oPC); break; + } + } + else //<650 + { + switch (nFeat) + { +case 640: nPRF1 = GetHasFeat(110, oPC); break; +case 641: nPRF1 = GetHasFeat(111, oPC); break; +case 642: nPRF1 = GetHasFeat(112, oPC); break; +case 643: nPRF1 = GetHasFeat(113, oPC); break; +case 644: nPRF1 = GetHasFeat(114, oPC); break; +case 645: nPRF1 = GetHasFeat(115, oPC); break; +case 646: nPRF1 = GetHasFeat(116, oPC); break; +case 647: nPRF1 = GetHasFeat(117, oPC); break; +case 648: nPRF1 = GetHasFeat(118, oPC); break; +case 649: nPRF1 = GetHasFeat(120, oPC); break; + } + } + } + else if (nFeat < 700) + { + if (nFeat < 660) + { + switch (nFeat) + { +case 650: nPRF1 = GetHasFeat(121, oPC); break; +case 651: nPRF1 = GetHasFeat(122, oPC); break; +case 652: nPRF1 = GetHasFeat(123, oPC); break; +case 653: nPRF1 = GetHasFeat(125, oPC); break; +case 654: nPRF1 = GetHasFeat(126, oPC); break; +case 655: nPRF1 = GetHasFeat(127, oPC); break; +case 657: nPRF1 = GetHasFeat(47, oPC); nPRF2 = GetHasFeat(619, oPC); break; +case 658: nPRF1 = GetHasFeat(128, oPC); nPRF2 = GetHasFeat(620, oPC); break; +case 659: nPRF1 = GetHasFeat(129, oPC); nPRF2 = GetHasFeat(621, oPC); break; + } + } + else if (nFeat < 670) + { + switch (nFeat) + { +case 660: nPRF1 = GetHasFeat(130, oPC); nPRF2 = GetHasFeat(622, oPC); break; +case 661: nPRF1 = GetHasFeat(131, oPC); nPRF2 = GetHasFeat(623, oPC); break; +case 662: nPRF1 = GetHasFeat(132, oPC); nPRF2 = GetHasFeat(624, oPC); break; +case 663: nPRF1 = GetHasFeat(133, oPC); nPRF2 = GetHasFeat(625, oPC); break; +case 664: nPRF1 = GetHasFeat(134, oPC); nPRF2 = GetHasFeat(626, oPC); break; +case 665: nPRF1 = GetHasFeat(135, oPC); nPRF2 = GetHasFeat(627, oPC); break; +case 666: nPRF1 = GetHasFeat(136, oPC); nPRF2 = GetHasFeat(628, oPC); break; +case 667: nPRF1 = GetHasFeat(137, oPC); nPRF2 = GetHasFeat(629, oPC); break; +case 668: nPRF1 = GetHasFeat(138, oPC); nPRF2 = GetHasFeat(630, oPC); break; +case 669: nPRF1 = GetHasFeat(139, oPC); nPRF2 = GetHasFeat(631, oPC); break; + } + } + else if (nFeat < 680) + { + switch (nFeat) + { +case 670: nPRF1 = GetHasFeat(140, oPC); nPRF2 = GetHasFeat(632, oPC); break; +case 671: nPRF1 = GetHasFeat(141, oPC); nPRF2 = GetHasFeat(633, oPC); break; +case 672: nPRF1 = GetHasFeat(142, oPC); nPRF2 = GetHasFeat(634, oPC); break; +case 673: nPRF1 = GetHasFeat(143, oPC); nPRF2 = GetHasFeat(635, oPC); break; +case 674: nPRF1 = GetHasFeat(144, oPC); nPRF2 = GetHasFeat(636, oPC); break; +case 675: nPRF1 = GetHasFeat(145, oPC); nPRF2 = GetHasFeat(637, oPC); break; +case 676: nPRF1 = GetHasFeat(146, oPC); nPRF2 = GetHasFeat(638, oPC); break; +case 677: nPRF1 = GetHasFeat(147, oPC); nPRF2 = GetHasFeat(639, oPC); break; +case 678: nPRF1 = GetHasFeat(148, oPC); nPRF2 = GetHasFeat(640, oPC); break; +case 679: nPRF1 = GetHasFeat(149, oPC); nPRF2 = GetHasFeat(641, oPC); break; + } + } + else if (nFeat < 690) + { + switch (nFeat) + { +case 680: nPRF1 = GetHasFeat(150, oPC); nPRF2 = GetHasFeat(642, oPC); break; +case 681: nPRF1 = GetHasFeat(151, oPC); nPRF2 = GetHasFeat(643, oPC); break; +case 682: nPRF1 = GetHasFeat(152, oPC); nPRF2 = GetHasFeat(644, oPC); break; +case 683: nPRF1 = GetHasFeat(153, oPC); nPRF2 = GetHasFeat(645, oPC); break; +case 684: nPRF1 = GetHasFeat(154, oPC); nPRF2 = GetHasFeat(646, oPC); break; +case 685: nPRF1 = GetHasFeat(155, oPC); nPRF2 = GetHasFeat(647, oPC); break; +case 686: nPRF1 = GetHasFeat(156, oPC); nPRF2 = GetHasFeat(648, oPC); break; +case 687: nPRF1 = GetHasFeat(158, oPC); nPRF2 = GetHasFeat(649, oPC); break; +case 688: nPRF1 = GetHasFeat(159, oPC); nPRF2 = GetHasFeat(650, oPC); break; +case 689: nPRF1 = GetHasFeat(160, oPC); nPRF2 = GetHasFeat(651, oPC); break; + } + } + else //<700 + { + switch (nFeat) + { +case 690: nPRF1 = GetHasFeat(161, oPC); nPRF2 = GetHasFeat(652, oPC); break; +case 691: nPRF1 = GetHasFeat(163, oPC); nPRF2 = GetHasFeat(653, oPC); break; +case 692: nPRF1 = GetHasFeat(164, oPC); nPRF2 = GetHasFeat(654, oPC); break; +case 693: nPRF1 = GetHasFeat(165, oPC); nPRF2 = GetHasFeat(655, oPC); break; +case 696: nPRF1 = GetHasFeat(7, oPC); break; +case 697: nPRF1 = GetHasFeat(344, oPC); break; +case 698: nPRF1 = GetHasFeat(697, oPC); break; +case 699: nPRF1 = GetHasFeat(215, oPC); break; + } + } + } + else //<750 + { + if (nFeat < 710) + { + switch (nFeat) + { +case 700: nPRF1 = GetHasFeat(699, oPC); break; +case 701: nPRF1 = GetHasFeat(700, oPC); break; +case 702: nPRF1 = GetHasFeat(701, oPC); break; +case 703: nPRF1 = GetHasFeat(702, oPC); break; +case 704: nPRF1 = GetHasFeat(703, oPC); break; +case 705: nPRF1 = GetHasFeat(704, oPC); break; +case 706: nPRF1 = GetHasFeat(705, oPC); break; +case 707: nPRF1 = GetHasFeat(706, oPC); break; +case 708: nPRF1 = GetHasFeat(707, oPC); break; +case 709: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(15, oPC); break; + } + } + else if (nFeat < 720) + { + switch (nFeat) + { +case 710: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(52, oPC); break; +case 711: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(53, oPC); break; +case 712: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(54, oPC); break; +case 713: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(55, oPC); break; +case 714: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(56, oPC); break; +case 715: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(57, oPC); break; +case 716: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(58, oPC); break; +case 717: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(59, oPC); break; +case 718: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(60, oPC); break; +case 719: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(61, oPC); break; + } + } + else if (nFeat < 730) + { + switch (nFeat) + { +case 720: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(62, oPC); break; +case 721: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(63, oPC); break; +case 722: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(64, oPC); break; +case 723: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(65, oPC); break; +case 724: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(66, oPC); break; +case 725: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(67, oPC); break; +case 726: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(68, oPC); break; +case 727: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(69, oPC); break; +case 728: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(70, oPC); break; +case 729: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(71, oPC); break; + } + } + else if (nFeat < 740) + { + switch (nFeat) + { +case 730: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(72, oPC); break; +case 731: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(73, oPC); break; +case 732: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(74, oPC); break; +case 733: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(75, oPC); break; +case 734: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(76, oPC); break; +case 735: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(77, oPC); break; +case 736: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(78, oPC); break; +case 737: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(79, oPC); break; +case 738: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(80, oPC); break; +case 739: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(82, oPC); break; + } + } + else //750 + { + switch (nFeat) + { +case 740: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(83, oPC); break; +case 741: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(84, oPC); break; +case 742: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(85, oPC); break; +case 743: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(87, oPC); break; +case 744: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(88, oPC); break; +case 745: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(89, oPC); break; +case 746: nPRF1 = GetHasFeat(292, oPC); break; +case 747: nPRF1 = GetHasFeat(14, oPC); break; +case 748: nPRF1 = GetHasFeat(212, oPC); break; +case 749: nPRF1 = GetHasFeat(748, oPC); break; + } + } + } + } +else + { + if (nFeat < 800) + { + if (nFeat < 760) + { + switch (nFeat) + { +case 750: nPRF1 = GetHasFeat(749, oPC); break; +case 751: nPRF1 = GetHasFeat(750, oPC); break; +case 752: nPRF1 = GetHasFeat(751, oPC); break; +case 753: nPRF1 = GetHasFeat(377, oPC); break; +case 755: nPRF1 = GetHasFeat(754, oPC); break; +case 756: nPRF1 = GetHasFeat(755, oPC); break; +case 757: nPRF1 = GetHasFeat(756, oPC); break; +case 758: nPRF1 = GetHasFeat(757, oPC); break; +case 759: nPRF1 = GetHasFeat(758, oPC); break; + } + } + else if (nFeat < 770) + { + switch (nFeat) + { +case 760: nPRF1 = GetHasFeat(759, oPC); break; +case 761: nPRF1 = GetHasFeat(760, oPC); break; +case 762: nPRF1 = GetHasFeat(761, oPC); break; +case 763: nPRF1 = GetHasFeat(762, oPC); break; +case 765: nPRF1 = GetHasFeat(764, oPC); break; +case 766: nPRF1 = GetHasFeat(765, oPC); break; +case 767: nPRF1 = GetHasFeat(766, oPC); break; +case 768: nPRF1 = GetHasFeat(767, oPC); break; +case 769: nPRF1 = GetHasFeat(768, oPC); break; + } + } + else if (nFeat < 780) + { + switch (nFeat) + { +case 770: nPRF1 = GetHasFeat(769, oPC); break; +case 771: nPRF1 = GetHasFeat(770, oPC); break; +case 772: nPRF1 = GetHasFeat(771, oPC); break; +case 773: nPRF1 = GetHasFeat(772, oPC); break; +case 775: nPRF1 = GetHasFeat(774, oPC); break; +case 776: nPRF1 = GetHasFeat(775, oPC); break; +case 777: nPRF1 = GetHasFeat(776, oPC); break; +case 778: nPRF1 = GetHasFeat(777, oPC); break; +case 779: nPRF1 = GetHasFeat(778, oPC); break; + } + } + else if (nFeat < 790) + { + switch (nFeat) + { +case 780: nPRF1 = GetHasFeat(779, oPC); break; +case 781: nPRF1 = GetHasFeat(780, oPC); break; +case 782: nPRF1 = GetHasFeat(781, oPC); break; +case 783: nPRF1 = GetHasFeat(782, oPC); break; +case 785: nPRF1 = GetHasFeat(784, oPC); break; +case 786: nPRF1 = GetHasFeat(785, oPC); break; +case 787: nPRF1 = GetHasFeat(786, oPC); break; +case 788: nPRF1 = GetHasFeat(787, oPC); break; +case 789: nPRF1 = GetHasFeat(788, oPC); break; + } + } + else //<800 + { + switch (nFeat) + { +case 790: nPRF1 = GetHasFeat(789, oPC); break; +case 791: nPRF1 = GetHasFeat(790, oPC); break; +case 792: nPRF1 = GetHasFeat(791, oPC); break; +case 793: nPRF1 = GetHasFeat(792, oPC); break; +case 795: nPRF1 = GetHasFeat(794, oPC); break; +case 796: nPRF1 = GetHasFeat(795, oPC); break; +case 797: nPRF1 = GetHasFeat(796, oPC); break; +case 798: nPRF1 = GetHasFeat(797, oPC); break; +case 799: nPRF1 = GetHasFeat(798, oPC); break; + } + } + } + else if (nFeat < 850) + { + if (nFeat < 810) + { + switch (nFeat) + { +case 800: nPRF1 = GetHasFeat(799, oPC); break; +case 801: nPRF1 = GetHasFeat(800, oPC); break; +case 802: nPRF1 = GetHasFeat(801, oPC); break; +case 803: nPRF1 = GetHasFeat(802, oPC); break; +case 805: nPRF1 = GetHasFeat(804, oPC); break; +case 806: nPRF1 = GetHasFeat(805, oPC); break; +case 807: nPRF1 = GetHasFeat(806, oPC); break; +case 808: nPRF1 = GetHasFeat(807, oPC); break; +case 809: nPRF1 = GetHasFeat(808, oPC); break; + } + } + else if (nFeat < 820) + { + switch (nFeat) + { +case 810: nPRF1 = GetHasFeat(809, oPC); break; +case 811: nPRF1 = GetHasFeat(810, oPC); break; +case 812: nPRF1 = GetHasFeat(811, oPC); break; +case 813: nPRF1 = GetHasFeat(812, oPC); break; +case 815: nPRF1 = GetHasFeat(814, oPC); break; +case 816: nPRF1 = GetHasFeat(815, oPC); break; +case 817: nPRF1 = GetHasFeat(816, oPC); break; +case 818: nPRF1 = GetHasFeat(817, oPC); break; +case 819: nPRF1 = GetHasFeat(818, oPC); break; + } + } + else if (nFeat < 830) + { + switch (nFeat) + { +case 820: nPRF1 = GetHasFeat(819, oPC); break; +case 821: nPRF1 = GetHasFeat(820, oPC); break; +case 822: nPRF1 = GetHasFeat(821, oPC); break; +case 823: nPRF1 = GetHasFeat(822, oPC); break; +case 824: nORF1 = GetHasFeat(472, oPC); nORF2 = GetHasFeat(301, oPC); break; +case 825: nPRF1 = GetHasFeat(824, oPC); break; +case 826: nPRF1 = GetHasFeat(825, oPC); break; +case 827: nPRF1 = GetHasFeat(826, oPC); break; +case 828: nPRF1 = GetHasFeat(827, oPC); break; +case 829: nPRF1 = GetHasFeat(828, oPC); break; + } + } + else if (nFeat < 840) + { + switch (nFeat) + { +case 830: nPRF1 = GetHasFeat(829, oPC); break; +case 831: nPRF1 = GetHasFeat(830, oPC); break; +case 832: nPRF1 = GetHasFeat(831, oPC); break; +case 833: nPRF1 = GetHasFeat(832, oPC); break; +case 834: nORF1 = GetHasFeat(351, oPC); nORF2 = GetHasFeat(1006, oPC); nORF3 = GetHasFeat(1011, oPC); break; +case 835: nPRF1 = GetHasFeat(834, oPC); break; +case 836: nPRF1 = GetHasFeat(835, oPC); break; +case 837: nPRF1 = GetHasFeat(836, oPC); break; +case 838: nPRF1 = GetHasFeat(837, oPC); break; +case 839: nPRF1 = GetHasFeat(838, oPC); break; + } + } + else //<850 + { + switch (nFeat) + { +case 840: nPRF1 = GetHasFeat(839, oPC); break; +case 841: nPRF1 = GetHasFeat(840, oPC); break; +case 842: nPRF1 = GetHasFeat(841, oPC); break; +case 843: nPRF1 = GetHasFeat(842, oPC); break; +case 844: nPRF1 = GetHasFeat(39, oPC); nPRF2 = GetHasFeat(21, oPC); break; +case 845: nPRF1 = GetHasFeat(844, oPC); break; +case 846: nPRF1 = GetHasFeat(845, oPC); break; +case 847: nPRF1 = GetHasFeat(846, oPC); break; +case 848: nPRF1 = GetHasFeat(847, oPC); break; +case 849: nPRF1 = GetHasFeat(848, oPC); break; + } + } + } + else if (nFeat < 900) + { + if (nFeat < 860) + { + switch (nFeat) + { +case 850: nPRF1 = GetHasFeat(849, oPC); break; +case 851: nPRF1 = GetHasFeat(850, oPC); break; +case 852: nPRF1 = GetHasFeat(851, oPC); break; +case 853: nPRF1 = GetHasFeat(852, oPC); break; +case 854: nPRF1 = GetHasFeat(294, oPC); break; +case 856: nPRF1 = GetHasFeat(212, oPC); nPRF2 = GetHasFeat(223, oPC); break; +case 857: nPRF1 = GetHasFeat(29, oPC); break; +case 858: nPRF1 = GetHasFeat(857, oPC); break; +case 859: nPRF1 = GetHasFeat(858, oPC); break; + } + } + else if (nFeat < 870) + { + switch (nFeat) + { +case 860: nPRF1 = GetHasFeat(33, oPC); break; +case 861: nPRF1 = GetHasFeat(860, oPC); break; +case 862: nPRF1 = GetHasFeat(861, oPC); break; +case 863: nPRF1 = GetHasFeat(37, oPC); break; +case 864: nPRF1 = GetHasFeat(863, oPC); break; +case 865: nPRF1 = GetHasFeat(864, oPC); break; +case 867: nPRF1 = GetHasFeat(392, oPC); nPRF2 = GetHasFeat(389, oPC); break; +case 868: nPRF1 = GetHasFeat(867, oPC); break; +case 869: nPRF1 = GetHasFeat(331, oPC); break; + } + } + else if (nFeat < 880) + { + switch (nFeat) + { +case 870: nPRF1 = GetHasFeat(373, oPC); break; +case 872: nPRF1 = GetHasFeat(903, oPC); break; +case 873: nORF1 = GetHasFeat(338, oPC); nORF2 = GetHasFeat(903, oPC); break; +case 879: nPRF1 = GetHasFeat(98, oPC); break; + } + } + else if (nFeat < 890) + { + switch (nFeat) + { +case 880: nPRF1 = GetHasFeat(117, oPC); break; +case 881: nPRF1 = GetHasFeat(118, oPC); break; +case 887: nPRF1 = GetHasFeat(886, oPC); break; +case 888: nPRF1 = GetHasFeat(887, oPC); break; + } + } + else //<900 + { + switch (nFeat) + { +case 893: nPRF1 = GetHasFeat(892, oPC); break; +case 897: nPRF1 = GetHasFeat(893, oPC); break; + } + } + } + else if (nFeat < 950) + { + if (nFeat < 910) + { + switch (nFeat) + { +case 900: nPRF1 = GetHasFeat(898, oPC); break; +case 901: nPRF1 = GetHasFeat(900, oPC); break; +case 903: nPRF1 = GetHasFeat(901, oPC); break; +case 905: nPRF1 = GetHasFeat(904, oPC); break; +case 906: nPRF1 = GetHasFeat(905, oPC); break; +case 907: nPRF1 = GetHasFeat(906, oPC); break; +case 908: nPRF1 = GetHasFeat(907, oPC); break; + } + } + else if (nFeat < 920) + { + switch (nFeat) + { +case 910: nORF1 = GetHasFeat(301, oPC); nORF2 = GetHasFeat(472, oPC); break; +case 919: nPRF1 = GetHasFeat(43, oPC); break; + } + } + else if (nFeat < 930) + { + switch (nFeat) + { +case 920: nPRF1 = GetHasFeat(90, oPC); break; +case 921: nPRF1 = GetHasFeat(94, oPC); break; +case 922: nPRF1 = GetHasFeat(95, oPC); break; +case 923: nPRF1 = GetHasFeat(96, oPC); break; +case 924: nPRF1 = GetHasFeat(97, oPC); break; +case 925: nPRF1 = GetHasFeat(103, oPC); break; +case 926: nPRF1 = GetHasFeat(104, oPC); break; +case 927: nPRF1 = GetHasFeat(105, oPC); break; +case 928: nPRF1 = GetHasFeat(106, oPC); break; +case 929: nPRF1 = GetHasFeat(107, oPC); break; + } + } + else if (nFeat < 940) + { + switch (nFeat) + { +case 930: nPRF1 = GetHasFeat(108, oPC); break; +case 931: nPRF1 = GetHasFeat(110, oPC); break; +case 932: nPRF1 = GetHasFeat(111, oPC); break; +case 933: nPRF1 = GetHasFeat(112, oPC); break; +case 934: nPRF1 = GetHasFeat(113, oPC); break; +case 935: nPRF1 = GetHasFeat(114, oPC); break; +case 936: nPRF1 = GetHasFeat(115, oPC); break; +case 937: nPRF1 = GetHasFeat(116, oPC); break; +case 938: nPRF1 = GetHasFeat(121, oPC); break; +case 939: nPRF1 = GetHasFeat(122, oPC); break; + } + } + else //<950 + { + switch (nFeat) + { +case 940: nPRF1 = GetHasFeat(123, oPC); break; +case 941: nPRF1 = GetHasFeat(125, oPC); break; +case 942: nPRF1 = GetHasFeat(126, oPC); break; +case 943: nPRF1 = GetHasFeat(127, oPC); break; + } + } + } + else if (nFeat < 1000) + { + if (nFeat < 960) + { + switch (nFeat) + { +case 950: nPRF1 = GetHasFeat(949, oPC); break; +case 951: nPRF1 = GetHasFeat(950, oPC); break; +case 952: nPRF1 = GetHasFeat(44, oPC); break; +case 953: nPRF1 = GetHasFeat(952, oPC); break; +case 954: nPRF1 = GetHasFeat(44, oPC); break; +case 955: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(958, oPC); break; +case 956: nPRF1 = GetHasFeat(952, oPC); break; +case 957: nPRF1 = GetHasFeat(953, oPC); nPRF2 = GetHasFeat(956, oPC); break; +case 958: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(954, oPC); break; +case 959: nPRF1 = GetHasFeat(952, oPC); break; + } + } + else if (nFeat < 990) + { + switch (nFeat) + { +case 988: nPRF1 = GetHasFeat(329, oPC); break; +case 989: nPRF1 = GetHasFeat(329, oPC); break; + } + } + else //<1000 + { + switch (nFeat) + { +case 993: nPRF1 = GetHasFeat(44, oPC); break; +case 994: nPRF1 = GetHasFeat(993, oPC); break; +case 995: nPRF1 = GetHasFeat(44, oPC); break; +case 996: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(999, oPC); break; +case 997: nPRF1 = GetHasFeat(993, oPC); break; +case 998: nPRF1 = GetHasFeat(994, oPC); nPRF2 = GetHasFeat(997, oPC); break; +case 999: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(995, oPC); break; + } + } + } + else //through 1071 + { + if (nFeat < 1010) + { + switch (nFeat) + { +case 1000: nPRF1 = GetHasFeat(993, oPC); break; +case 1002: nPRF1 = GetHasFeat(435, oPC); break; +case 1003: nPRF1 = GetHasFeat(475, oPC); break; + } + } + else if (nFeat < 1050) + { + switch (nFeat) + { +case 1045: nPRF1 = GetHasFeat(449, oPC); break; +case 1046: nPRF1 = GetHasFeat(1045, oPC); break; +case 1047: nPRF1 = GetHasFeat(1046, oPC); break; +case 1048: nPRF1 = GetHasFeat(1047, oPC); break; +case 1049: nPRF1 = GetHasFeat(1048, oPC); break; + } + } + else if (nFeat < 1060) + { + switch (nFeat) + { +case 1050: nPRF1 = GetHasFeat(1049, oPC); break; +case 1051: nPRF1 = GetHasFeat(1050, oPC); break; +case 1052: nPRF1 = GetHasFeat(1051, oPC); break; +case 1053: nPRF1 = GetHasFeat(1052, oPC); break; +case 1054: nPRF1 = GetHasFeat(1053, oPC); break; +case 1055: nPRF1 = GetHasFeat(1054, oPC); break; +case 1056: nPRF1 = GetHasFeat(1055, oPC); break; +case 1057: nPRF1 = GetHasFeat(1056, oPC); break; +case 1058: nPRF1 = GetHasFeat(1057, oPC); break; +case 1059: nPRF1 = GetHasFeat(1058, oPC); break; + } + } + else //through 1071 + { + switch (nFeat) + { +case 1060: nPRF1 = GetHasFeat(903, oPC); break; +case 1061: nPRF1 = GetHasFeat(903, oPC); break; +case 1067: nPRF1 = GetHasFeat(334, oPC); break; +case 1070: nPRF1 = GetHasFeat(466, oPC); break; +case 1071: nPRF1 = GetHasFeat(884, oPC); break; + } + } + } + } +return ((nPRF1 && nPRF2) && (nORF1 || nORF2 || nORF3 || nORF4 || nORF5)); +} + +int GetIsFeatFirstLevelOnly(int nFeat) +{ +switch(nFeat) + { + case 378: return TRUE; break; + case 379: return TRUE; break; + case 380: return TRUE; break; + case 381: return TRUE; break; + case 382: return TRUE; break; + case 384: return TRUE; break; + case 386: return TRUE; break; + case 388: return TRUE; break; + default : return FALSE; break; + } +return -3; +} + +int GetIsFeatDevCrit(int nFeat) +{ +if (nFeat > 494 && nFeat <532) return TRUE; +else if (nFeat == 955 || nFeat == 996) return TRUE; +else return FALSE; +} + +int GetHasRequiredSpellLevelForFeat(object oPC, int nFeat) +{ +int nReturn = TRUE; +switch(nFeat) + { + case 7: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 12: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 33: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 35: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 36: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 37: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 166: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 167: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 168: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 169: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 170: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 171: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 172: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 11: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 3) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 4) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 3) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 3) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 8) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 8)); break; + case 25: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 5) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 6) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 5) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 5) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 11) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 11)); break; + case 29: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 8) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 7) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 10) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 14) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 14)); break; + case 31: nReturn = FALSE; break; + case 610: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 611: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 612: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 613: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 614: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 615: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 616: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 617: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 857: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 858: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 859: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 860: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 861: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 862: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 863: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 864: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 865: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + default: nReturn = TRUE; break; + } +return nReturn; +} + +string GetNameOfFeat(int nFeat) +{ +string sName; +if (nFeat < 250) + { + if (nFeat < 50) + { + if (nFeat < 10) + { + switch (nFeat) + { +case 0: sName = "Alertness"; break; +case 1: sName = "Ambidexterity"; break; +case 2: sName = "Armor Proficiency Heavy"; break; +case 3: sName = "Armor Proficiency Light"; break; +case 4: sName = "Armor Proficiency Medium"; break; +case 5: sName = "Called Shot"; break; +case 6: sName = "Cleave"; break; +case 7: sName = "Combat Casting"; break; +case 8: sName = "Deflect Arrows"; break; +case 9: sName = "Disarm"; break; + } + } + else if (nFeat < 20) + { + switch (nFeat) + { +case 10: sName = "Dodge"; break; +case 11: sName = "Empower Spell"; break; +case 12: sName = "Extend Spell"; break; +case 13: sName = "Extra Turning"; break; +case 14: sName = "Great Fortitude"; break; +case 15: sName = "Improved Critical Club"; break; +case 16: sName = "Improved Disarm"; break; +case 17: sName = "Improved Knockdown"; break; +case 18: sName = "Improved Parry"; break; +case 19: sName = "Improved Power Attack"; break; + } + } + else if (nFeat < 30) + { + switch (nFeat) + { +case 20: sName = "Improved Two Weapon Fighting"; break; +case 21: sName = "Improved Unarmed Strike"; break; +case 22: sName = "Iron Will"; break; +case 23: sName = "Knockdown"; break; +case 24: sName = "Lightning Reflexes"; break; +case 25: sName = "Maximize Spell"; break; +case 26: sName = "Mobility"; break; +case 27: sName = "Point Blank Shot"; break; +case 28: sName = "Power Attack"; break; +case 29: sName = "Quicken Spell"; break; + } + } + else if (nFeat < 40) + { + switch (nFeat) + { +case 30: sName = "Rapid Shot"; break; +case 31: sName = "Sap"; break; +case 32: sName = "Shield Proficiency"; break; +case 33: sName = "Silence Spell"; break; +case 34: sName = "Skill Focus Animal Empathy"; break; +case 35: sName = "Spell Focus Abjuration"; break; +case 36: sName = "Spell Penetration"; break; +case 37: sName = "Still Spell"; break; +case 39: sName = "Stunning Fist"; break; + } + } + else //<50 + { + switch (nFeat) + { +case 40: sName = "Toughness"; break; +case 41: sName = "Two Weapon Fighting"; break; +case 42: sName = "Weapon Finesse"; break; +case 43: sName = "Weapon Focus Club"; break; +case 44: sName = "Weapon Proficiency Exotic"; break; +case 45: sName = "Weapon Proficiency Martial"; break; +case 46: sName = "Weapon Proficiency Simple"; break; +case 47: sName = "Weapon Specialization Club"; break; +case 48: sName = "Weapon Proficiency Druid"; break; +case 49: sName = "Weapon Proficiency Monk"; break; + } + } + } + else if (nFeat < 100) + { + if (nFeat < 60) + { + switch (nFeat) + { +case 50: sName = "Weapon Proficiency Rogue"; break; +case 51: sName = "Weapon Proficiency Wizard"; break; +case 52: sName = "Improved Critical Dagger"; break; +case 53: sName = "Improved Critical Dart"; break; +case 54: sName = "Improved Critical Heavy Crossbow"; break; +case 55: sName = "Improved Critical Light Crossbow"; break; +case 56: sName = "Improved Critical Light Mace"; break; +case 57: sName = "Improved Critical Morning Star"; break; +case 58: sName = "Improved Critical Staff"; break; +case 59: sName = "Improved Critical Spear"; break; + } + } + else if (nFeat < 70) + { + switch (nFeat) + { +case 60: sName = "Improved Critical Sickle"; break; +case 61: sName = "Improved Critical Sling"; break; +case 62: sName = "Improved Critical Unarmed Strike"; break; +case 63: sName = "Improved Critical Longbow"; break; +case 64: sName = "Improved Critical Shortbow"; break; +case 65: sName = "Improved Critical Short Sword"; break; +case 66: sName = "Improved Critical Rapier"; break; +case 67: sName = "Improved Critical Scimitar"; break; +case 68: sName = "Improved Critical Long Sword"; break; +case 69: sName = "Improved Critical Great Sword"; break; + } + } + else if (nFeat < 80) + { + switch (nFeat) + { +case 70: sName = "Improved Critical Hand Axe"; break; +case 71: sName = "Improved Critical Throwing Axe"; break; +case 72: sName = "Improved Critical Battle Axe"; break; +case 73: sName = "Improved Critical Great Axe"; break; +case 74: sName = "Improved Critical Halberd"; break; +case 75: sName = "Improved Critical Light Hammer"; break; +case 76: sName = "Improved Critical Light Flail"; break; +case 77: sName = "Improved Critical War Hammer"; break; +case 78: sName = "Improved Critical Heavy Flail"; break; +case 79: sName = "Improved Critical Kama"; break; + } + } + else if (nFeat < 90) + { + switch (nFeat) + { +case 80: sName = "Improved Critical Kukri"; break; +case 82: sName = "Improved Critical Shuriken"; break; +case 83: sName = "Improved Critical Scythe"; break; +case 84: sName = "Improved Critical Katana"; break; +case 85: sName = "Improved Critical Bastard Sword"; break; +case 87: sName = "Improved Critical Dire Mace"; break; +case 88: sName = "Improved Critical Double Axe"; break; +case 89: sName = "Improved Critical Two Bladed Sword"; break; + } + } + else //<100 + { + switch (nFeat) + { +case 90: sName = "Weapon Focus Dagger"; break; +case 91: sName = "Weapon Focus Dart"; break; +case 92: sName = "Weapon Focus Heavy Crossbow"; break; +case 93: sName = "Weapon Focus Light Crossbow"; break; +case 94: sName = "Weapon Focus Light Mace"; break; +case 95: sName = "Weapon Focus Morning Star"; break; +case 96: sName = "Weapon Focus Staff"; break; +case 97: sName = "Weapon Focus Spear"; break; +case 98: sName = "Weapon Focus Sickle"; break; +case 99: sName = "Weapon Focus Sling"; break; + } + } + } + else if (nFeat < 150) + { + if (nFeat < 110) + { + switch (nFeat) + { +case 100: sName = "Weapon Focus Unarmed Strike"; break; +case 101: sName = "Weapon Focus Longbow"; break; +case 102: sName = "Weapon Focus Shortbow"; break; +case 103: sName = "Weapon Focus Short Sword"; break; +case 104: sName = "Weapon Focus Rapier"; break; +case 105: sName = "Weapon Focus Scimitar"; break; +case 106: sName = "Weapon Focus Long Sword"; break; +case 107: sName = "Weapon Focus Great Sword"; break; +case 108: sName = "Weapon Focus Hand Axe"; break; +case 109: sName = "Weapon Focus Throwing Axe"; break; + } + } + else if (nFeat < 120) + { + switch (nFeat) + { +case 110: sName = "Weapon Focus Battle Axe"; break; +case 111: sName = "Weapon Focus Great Axe"; break; +case 112: sName = "Weapon Focus Halberd"; break; +case 113: sName = "Weapon Focus Light Hammer"; break; +case 114: sName = "Weapon Focus Light Flail"; break; +case 115: sName = "Weapon Focus War Hammer"; break; +case 116: sName = "Weapon Focus Heavy Flail"; break; +case 117: sName = "Weapon Focus Kama"; break; +case 118: sName = "Weapon Focus Kukri"; break; + } + } + else if (nFeat < 130) + { + switch (nFeat) + { +case 120: sName = "Weapon Focus Shuriken"; break; +case 121: sName = "Weapon Focus Scythe"; break; +case 122: sName = "Weapon Focus Katana"; break; +case 123: sName = "Weapon Focus Bastard Sword"; break; +case 125: sName = "Weapon Focus Dire Mace"; break; +case 126: sName = "Weapon Focus Double Axe"; break; +case 127: sName = "Weapon Focus Two Bladed Sword"; break; +case 128: sName = "Weapon Specialization Dagger"; break; +case 129: sName = "Weapon Specialization Dart"; break; + } + } + else if (nFeat < 140) + { + switch (nFeat) + { +case 130: sName = "Weapon Specialization Heavy Crossbow"; break; +case 131: sName = "Weapon Specialization Light Crossbow"; break; +case 132: sName = "Weapon Specialization Light Mace"; break; +case 133: sName = "Weapon Specialization Morning Star"; break; +case 134: sName = "Weapon Specialization Staff"; break; +case 135: sName = "Weapon Specialization Spear"; break; +case 136: sName = "Weapon Specialization Sickle"; break; +case 137: sName = "Weapon Specialization Sling"; break; +case 138: sName = "Weapon Specialization Unarmed Strike"; break; +case 139: sName = "Weapon Specialization Longbow"; break; + } + } + else //<150 + { + switch (nFeat) + { +case 140: sName = "Weapon Specialization Shortbow"; break; +case 141: sName = "Weapon Specialization Short Sword"; break; +case 142: sName = "Weapon Specialization Rapier"; break; +case 143: sName = "Weapon Specialization Scimitar"; break; +case 144: sName = "Weapon Specialization Long Sword"; break; +case 145: sName = "Weapon Specialization Great Sword"; break; +case 146: sName = "Weapon Specialization Hand Axe"; break; +case 147: sName = "Weapon Specialization Throwing Axe"; break; +case 148: sName = "Weapon Specialization Battle Axe"; break; +case 149: sName = "Weapon Specialization Great Axe"; break; + } + } + } + else if (nFeat < 200) + { + if (nFeat < 160) + { + switch (nFeat) + { +case 150: sName = "Weapon Specialization Halberd"; break; +case 151: sName = "Weapon Specialization Light Hammer"; break; +case 152: sName = "Weapon Specialization Light Flail"; break; +case 153: sName = "Weapon Specialization War Hammer"; break; +case 154: sName = "Weapon Specialization Heavy Flail"; break; +case 155: sName = "Weapon Specialization Kama"; break; +case 156: sName = "Weapon Specialization Kukri"; break; +case 158: sName = "Weapon Specialization Shuriken"; break; +case 159: sName = "Weapon Specialization Scythe"; break; + } + } + else if (nFeat < 170) + { + switch (nFeat) + { +case 160: sName = "Weapon Specialization Katana"; break; +case 161: sName = "Weapon Specialization Bastard Sword"; break; +case 163: sName = "Weapon Specialization Dire Mace"; break; +case 164: sName = "Weapon Specialization Double Axe"; break; +case 165: sName = "Weapon Specialization Two Bladed Sword"; break; +case 166: sName = "Spell Focus Conjuration"; break; +case 167: sName = "Spell Focus Divination"; break; +case 168: sName = "Spell Focus Enchantment"; break; +case 169: sName = "Spell Focus Evocation"; break; + } + } + else if (nFeat < 180) + { + switch (nFeat) + { +case 170: sName = "Spell Focus Illusion"; break; +case 171: sName = "Spell Focus Necromancy"; break; +case 172: sName = "Spell Focus Transmutation"; break; +case 173: sName = "Skill Focus Concentration"; break; +case 174: sName = "Skill Focus Disable Trap"; break; +case 175: sName = "Skill Focus Discipline"; break; +case 177: sName = "Skill Focus Heal"; break; +case 178: sName = "Skill Focus Hide"; break; +case 179: sName = "Skill Focus Listen"; break; + } + } + else if (nFeat < 190) + { + switch (nFeat) + { +case 180: sName = "Skill Focus Lore"; break; +case 181: sName = "Skill Focus Move Silently"; break; +case 182: sName = "Skill Focus Open Lock"; break; +case 183: sName = "Skill Focus Parry"; break; +case 184: sName = "Skill Focus Perform"; break; +case 185: sName = "Skill Focus Persuade"; break; +case 186: sName = "Skill Focus Pick Pocket"; break; +case 187: sName = "Skill Focus Search"; break; +case 188: sName = "Skill Focus Set Trap"; break; +case 189: sName = "Skill Focus Spellcraft"; break; + } + } + else //<200 + { + switch (nFeat) + { +case 190: sName = "Skill Focus Spot"; break; +case 192: sName = "Skill Focus Taunt"; break; +case 193: sName = "Skill Focus Use Magic Device"; break; +case 194: sName = "Barbarian Endurance"; break; +case 195: sName = "Uncanny Dodge 1"; break; +case 196: sName = "Damage Reduction"; break; +case 197: sName = "Bardic Knowledge"; break; +case 198: sName = "Nature Sense"; break; +case 199: sName = "Animal Companion"; break; + } + } + } + else //<250 + { + if (nFeat < 210) + { + switch (nFeat) + { +case 200: sName = "Woodland Stride"; break; +case 201: sName = "Trackless Step"; break; +case 202: sName = "Resist Natures Lure"; break; +case 203: sName = "Venom Immunity"; break; +case 204: sName = "Flurry Of Blows"; break; +case 206: sName = "Evasion"; break; +case 207: sName = "Monk Endurance"; break; +case 208: sName = "Still Mind"; break; +case 209: sName = "Purity Of Body"; break; + } + } + else if (nFeat < 220) + { + switch (nFeat) + { +case 211: sName = "Wholeness Of Body"; break; +case 212: sName = "Improved Evasion"; break; +case 213: sName = "Ki Strike"; break; +case 214: sName = "Diamond Body"; break; +case 215: sName = "Diamond Soul"; break; +case 216: sName = "Perfect Self"; break; +case 217: sName = "Divine Grace"; break; +case 219: sName = "Divine Health"; break; + } + } + else if (nFeat < 230) + { + switch (nFeat) + { +case 221: sName = "Sneak Attack"; break; +case 222: sName = "Crippling Strike"; break; +case 223: sName = "Defensive Roll"; break; +case 224: sName = "Opportunist"; break; +case 225: sName = "Skill Mastery"; break; +case 226: sName = "Uncanny Reflex"; break; +case 227: sName = "Stonecunning"; break; +case 228: sName = "Darkvision"; break; +case 229: sName = "Hardiness Versus Poisons"; break; + } + } + else if (nFeat < 240) + { + switch (nFeat) + { +case 230: sName = "Hardiness Versus Spells"; break; +case 231: sName = "Battle Training Versus Orcs"; break; +case 232: sName = "Battle Training Versus Goblins"; break; +case 233: sName = "Battle Training Versus Giants"; break; +case 234: sName = "Skill Affinity Lore"; break; +case 235: sName = "Immunity To Sleep"; break; +case 236: sName = "Hardiness Versus Enchantments"; break; +case 237: sName = "Skill Affinity Listen"; break; +case 238: sName = "Skill Affinity Search"; break; +case 239: sName = "Skill Affinity Spot"; break; + } + } + else //<250 + { + switch (nFeat) + { +case 240: sName = "Keen Sense"; break; +case 241: sName = "Hardiness Versus Illusions"; break; +case 242: sName = "Battle Training Versus Reptilians"; break; +case 243: sName = "Skill Affinity Concentration"; break; +case 244: sName = "Partial Skill Affinity Listen"; break; +case 245: sName = "Partial Skill Affinity Search"; break; +case 246: sName = "Partial Skill Affinity Spot"; break; +case 247: sName = "Skill Affinity Move Silently"; break; +case 248: sName = "Lucky"; break; +case 249: sName = "Fearless"; break; + } + } + } + } +else if (nFeat < 500) + { + if (nFeat < 300) + { + if (nFeat < 260) + { + switch (nFeat) + { +case 250: sName = "Good Aim"; break; +case 251: sName = "Uncanny Dodge 2"; break; +case 252: sName = "Uncanny Dodge 3"; break; +case 253: sName = "Uncanny Dodge 4"; break; +case 254: sName = "Uncanny Dodge 5"; break; +case 255: sName = "Uncanny Dodge 6"; break; +case 256: sName = "Weapon Proficiency Elf"; break; +case 257: sName = "Bard Songs"; break; +case 258: sName = "Quick To Master"; break; +case 259: sName = "Slippery Mind"; break; + } + } + else if (nFeat < 270) + { + switch (nFeat) + { +case 260: sName = "Monk Ac Bonus"; break; +case 261: sName = "Favored Enemy Dwarf"; break; +case 262: sName = "Favored Enemy Elf"; break; +case 263: sName = "Favored Enemy Gnome"; break; +case 264: sName = "Favored Enemy Halfling"; break; +case 265: sName = "Favored Enemy Halfelf"; break; +case 266: sName = "Favored Enemy Halforc"; break; +case 267: sName = "Favored Enemy Human"; break; +case 268: sName = "Favored Enemy Aberration"; break; +case 269: sName = "Favored Enemy Animal"; break; + } + } + else if (nFeat < 280) + { + switch (nFeat) + { +case 270: sName = "Favored Enemy Beast"; break; +case 271: sName = "Favored Enemy Construct"; break; +case 272: sName = "Favored Enemy Dragon"; break; +case 273: sName = "Favored Enemy Goblinoid"; break; +case 274: sName = "Favored Enemy Monstrous"; break; +case 275: sName = "Favored Enemy Orc"; break; +case 276: sName = "Favored Enemy Reptilian"; break; +case 277: sName = "Favored Enemy Elemental"; break; +case 278: sName = "Favored Enemy Fey"; break; +case 279: sName = "Favored Enemy Giant"; break; + } + } + else if (nFeat < 290) + { + switch (nFeat) + { +case 280: sName = "Favored Enemy Magical Beast"; break; +case 281: sName = "Favored Enemy Outsider"; break; +case 284: sName = "Favored Enemy Shapechanger"; break; +case 285: sName = "Favored Enemy Undead"; break; +case 286: sName = "Favored Enemy Vermin"; break; +case 289: sName = "Weapon Proficiency Creature"; break; + } + } + else //<300 + { + switch (nFeat) + { +case 290: sName = "Weapon Specialization Creature"; break; +case 291: sName = "Weapon Focus Creature"; break; +case 292: sName = "Improved Critical Creature"; break; +case 293: sName = "Barbarian Rage"; break; +case 294: sName = "Turn Undead"; break; +case 296: sName = "Quivering Palm"; break; +case 297: sName = "Empty Body"; break; +case 299: sName = "Lay On Hands"; break; + } + } + } + else if (nFeat < 350) + { + if (nFeat < 310) + { + switch (nFeat) + { +case 300: sName = "Aura Of Courage"; break; +case 301: sName = "Smite Evil"; break; +case 302: sName = "Remove Disease"; break; +case 303: sName = "Summon Familiar"; break; +case 304: sName = "Elemental Shape"; break; +case 305: sName = "Wild Shape"; break; +case 306: sName = "War Domain Power"; break; +case 307: sName = "Strength Domain Power"; break; +case 308: sName = "Protection Domain Power"; break; +case 309: sName = "Luck Domain Power"; break; + } + } + else if (nFeat < 320) + { + switch (nFeat) + { +case 310: sName = "Death Domain Power"; break; +case 311: sName = "Air Domain Power"; break; +case 312: sName = "Animal Domain Power"; break; +case 313: sName = "Destruction Domain Power"; break; +case 314: sName = "Earth Domain Power"; break; +case 315: sName = "Evil Domain Power"; break; +case 316: sName = "Fire Domain Power"; break; +case 317: sName = "Good Domain Power"; break; +case 318: sName = "Healing Domain Power"; break; +case 319: sName = "Knowledge Domain Power"; break; + } + } + else if (nFeat < 330) + { + switch (nFeat) + { +case 320: sName = "Magic Domain Power"; break; +case 321: sName = "Plant Domain Power"; break; +case 322: sName = "Sun Domain Power"; break; +case 323: sName = "Travel Domain Power"; break; +case 324: sName = "Trickery Domain Power"; break; +case 325: sName = "Water Domain Power"; break; +case 326: sName = "Barbarian Rage"; break; +case 327: sName = "Barbarian Rage"; break; +case 328: sName = "Barbarian Rage"; break; +case 329: sName = "Barbarian Rage"; break; + } + } + else if (nFeat < 340) + { + switch (nFeat) + { +case 330: sName = "Barbarian Rage"; break; +case 331: sName = "Barbarian Rage"; break; +case 332: sName = "Damage Reduction"; break; +case 333: sName = "Damage Reduction"; break; +case 334: sName = "Damage Reduction"; break; +case 335: sName = "Wild Shape"; break; +case 336: sName = "Wild Shape"; break; +case 337: sName = "Wild Shape"; break; +case 338: sName = "Wild Shape"; break; +case 339: sName = "Wild Shape"; break; + } + } + else //<350 + { + switch (nFeat) + { +case 340: sName = "Elemental Shape"; break; +case 341: sName = "Elemental Shape"; break; +case 342: sName = "Elemental Shape"; break; +case 343: sName = "Ki Strike"; break; +case 344: sName = "Ki Strike"; break; +case 345: sName = "Sneak Attack"; break; +case 346: sName = "Sneak Attack"; break; +case 347: sName = "Sneak Attack"; break; +case 348: sName = "Sneak Attack"; break; +case 349: sName = "Sneak Attack"; break; + } + } + } + else if (nFeat < 400) + { + if (nFeat < 360) + { + switch (nFeat) + { +case 350: sName = "Sneak Attack"; break; +case 351: sName = "Sneak Attack"; break; +case 352: sName = "Sneak Attack"; break; +case 353: sName = "Sneak Attack"; break; +case 354: sName = "Lowlightvision"; break; +case 355: sName = "Bard Songs"; break; +case 356: sName = "Bard Songs"; break; +case 357: sName = "Bard Songs"; break; +case 358: sName = "Bard Songs"; break; +case 359: sName = "Bard Songs"; break; + } + } + else if (nFeat < 370) + { + switch (nFeat) + { +case 360: sName = "Bard Songs"; break; +case 361: sName = "Bard Songs"; break; +case 362: sName = "Bard Songs"; break; +case 363: sName = "Bard Songs"; break; +case 364: sName = "Bard Songs"; break; +case 365: sName = "Bard Songs"; break; +case 366: sName = "Bard Songs"; break; +case 367: sName = "Bard Songs"; break; +case 368: sName = "Bard Songs"; break; +case 369: sName = "Bard Songs"; break; + } + } + else if (nFeat < 380) + { + switch (nFeat) + { +case 370: sName = "Bard Songs"; break; +case 371: sName = "Bard Songs"; break; +case 372: sName = "Bard Songs"; break; +case 373: sName = "Bard Songs"; break; +case 374: sName = "Ambidexterity"; break; +case 375: sName = "Ambidexterity"; break; +case 377: sName = "Improved Initiative"; break; +case 378: sName = "Artist"; break; +case 379: sName = "Blooded"; break; + } + } + else if (nFeat < 390) + { + switch (nFeat) + { +case 380: sName = "Bullheaded"; break; +case 381: sName = "Courteous Magocracy"; break; +case 382: sName = "Luck Of Heroes"; break; +case 383: sName = "Resist Poison"; break; +case 384: sName = "Silver Palm"; break; +case 385: sName = "Smooth Talk"; break; +case 386: sName = "Snake Blood"; break; +case 387: sName = "Stealthy"; break; +case 388: sName = "Strong Soul"; break; +case 389: sName = "Expertise"; break; + } + } + else //<400 + { + switch (nFeat) + { +case 390: sName = "Improved Expertise"; break; +case 391: sName = "Great Cleave"; break; +case 392: sName = "Spring Attack"; break; +case 393: sName = "Greater Spell Focus Abjuration"; break; +case 394: sName = "Greater Spell Focus Conjuration"; break; +case 395: sName = "Greater Spell Focus Divination"; break; +case 396: sName = "Greater Spell Focus Enchantment"; break; +case 397: sName = "Greater Spell Focus Evocation"; break; +case 398: sName = "Greater Spell Focus Illusion"; break; +case 399: sName = "Greater Spell Focus Necromancy"; break; + } + } + } + else if (nFeat < 450) + { + if (nFeat < 410) + { + switch (nFeat) + { +case 400: sName = "Greater Spell Focus Transmutation"; break; +case 401: sName = "Greater Spell Penetration"; break; +case 402: sName = "Thug"; break; +case 403: sName = "Mercantile Background"; break; +case 404: sName = "Skill Focus Appraise"; break; +case 406: sName = "Skill Focus Tumble"; break; +case 407: sName = "Skill Focus Craft Trap"; break; +case 408: sName = "Blind Fight"; break; +case 409: sName = "Circle Kick"; break; + } + } + else if (nFeat < 420) + { + switch (nFeat) + { +case 410: sName = "Extra Stunning Attack"; break; +case 411: sName = "Rapid Reload"; break; +case 412: sName = "Zen Archery"; break; +case 413: sName = "Divine Might"; break; +case 414: sName = "Divine Shield"; break; +case 415: sName = "Arcane Defense Abjuration"; break; +case 416: sName = "Arcane Defense Conjuration"; break; +case 417: sName = "Arcane Defense Divination"; break; +case 418: sName = "Arcane Defense Enchatment"; break; +case 419: sName = "Arcane Defense Evocation"; break; + } + } + else if (nFeat < 430) + { + switch (nFeat) + { +case 420: sName = "Arcane Defense Illusion"; break; +case 421: sName = "Arcane Defense Necromancy"; break; +case 422: sName = "Arcane Defense Transmutation"; break; +case 423: sName = "Extra Music"; break; +case 424: sName = "Lingering Song"; break; +case 425: sName = "Dirty Fighting"; break; +case 426: sName = "Resist Disease"; break; +case 427: sName = "Resist Energy Cold"; break; +case 428: sName = "Resist Energy Acid"; break; +case 429: sName = "Resist Energy Fire"; break; + } + } + else if (nFeat < 440) + { + switch (nFeat) + { +case 430: sName = "Resist Energy Electrical"; break; +case 431: sName = "Resist Energy Sonic"; break; +case 433: sName = "Hide In Plain Sight"; break; +case 434: sName = "Shadow Daze"; break; +case 435: sName = "Summon Shadow"; break; +case 436: sName = "Shadow Evade"; break; +case 437: sName = "Deneirs Eye"; break; +case 438: sName = "Tymoras Smile"; break; +case 439: sName = "Lliiras Heart"; break; + } + } + else //<450 + { + switch (nFeat) + { +case 440: sName = "Craft Harper Item"; break; +case 441: sName = "Harper Sleep"; break; +case 442: sName = "Harper Cats Grace"; break; +case 443: sName = "Harper Eagles Splendor"; break; +case 444: sName = "Harper Invisibility"; break; +case 445: sName = "Prestige Enchant Arrow 1"; break; +case 446: sName = "Prestige Enchant Arrow 2"; break; +case 447: sName = "Prestige Enchant Arrow 3"; break; +case 448: sName = "Prestige Enchant Arrow 4"; break; +case 449: sName = "Prestige Enchant Arrow 5"; break; + } + } + } + else //<500 + { + if (nFeat < 460) + { + switch (nFeat) + { +case 450: sName = "Prestige Embue Arrow"; break; +case 451: sName = "Prestige Seeker Arrow 1"; break; +case 452: sName = "Prestige Seeker Arrow 2"; break; +case 453: sName = "Prestige Hail Of Arrows"; break; +case 454: sName = "Prestige Arrow Of Death"; break; +case 455: sName = "Prestige Death Attack 1"; break; +case 456: sName = "Prestige Death Attack 2"; break; +case 457: sName = "Prestige Death Attack 3"; break; +case 458: sName = "Prestige Death Attack 4"; break; +case 459: sName = "Prestige Death Attack 5"; break; + } + } + else if (nFeat < 470) + { + switch (nFeat) + { +case 460: sName = "Blackguard Sneak Attack 1d6"; break; +case 461: sName = "Blackguard Sneak Attack 2d6"; break; +case 462: sName = "Blackguard Sneak Attack 3d6"; break; +case 463: sName = "Prestige Poison Save 1"; break; +case 464: sName = "Prestige Poison Save 2"; break; +case 465: sName = "Prestige Poison Save 3"; break; +case 466: sName = "Prestige Poison Save 4"; break; +case 467: sName = "Prestige Poison Save 5"; break; +case 468: sName = "Prestige Spell Ghostly Visage"; break; +case 469: sName = "Prestige Darkness"; break; + } + } + else if (nFeat < 480) + { + switch (nFeat) + { +case 470: sName = "Prestige Invisibility 1"; break; +case 471: sName = "Prestige Invisibility 2"; break; +case 472: sName = "Smite Good"; break; +case 473: sName = "Prestige Dark Blessing"; break; +case 474: sName = "Inflict Light Wounds"; break; +case 475: sName = "Inflict Moderate Wounds"; break; +case 476: sName = "Inflict Serious Wounds"; break; +case 477: sName = "Inflict Critical Wounds"; break; +case 478: sName = "Bulls Strength"; break; +case 479: sName = "Contagion"; break; + } + } + else //<500 + { + switch (nFeat) + { +case 490: sName = "Epic Armor Skin"; break; +case 491: sName = "Epic Blinding Speed"; break; +case 492: sName = "Epic Damage Reduction 3"; break; +case 493: sName = "Epic Damage Reduction 6"; break; +case 494: sName = "Epic Damage Reduction 9"; break; +case 495: sName = "Epic Devastating Critical Club"; break; +case 496: sName = "Epic Devastating Critical Dagger"; break; +case 497: sName = "Epic Devastating Critical Dart"; break; +case 498: sName = "Epic Devastating Critical Heavycrossbow"; break; +case 499: sName = "Epic Devastating Critical Lightcrossbow"; break; + } + } + } + } +else if (nFeat < 750) + { + if (nFeat < 550) + { + if (nFeat < 510) + { + switch (nFeat) + { +case 500: sName = "Epic Devastating Critical Lightmace"; break; +case 501: sName = "Epic Devastating Critical Morningstar"; break; +case 502: sName = "Epic Devastating Critical Quarterstaff"; break; +case 503: sName = "Epic Devastating Critical Shortspear"; break; +case 504: sName = "Epic Devastating Critical Sickle"; break; +case 505: sName = "Epic Devastating Critical Sling"; break; +case 506: sName = "Epic Devastating Critical Unarmed"; break; +case 507: sName = "Epic Devastating Critical Longbow"; break; +case 508: sName = "Epic Devastating Critical Shortbow"; break; +case 509: sName = "Epic Devastating Critical Shortsword"; break; + } + } + else if (nFeat < 520) + { + switch (nFeat) + { +case 510: sName = "Epic Devastating Critical Rapier"; break; +case 511: sName = "Epic Devastating Critical Scimitar"; break; +case 512: sName = "Epic Devastating Critical Longsword"; break; +case 513: sName = "Epic Devastating Critical Greatsword"; break; +case 514: sName = "Epic Devastating Critical Handaxe"; break; +case 515: sName = "Epic Devastating Critical Throwingaxe"; break; +case 516: sName = "Epic Devastating Critical Battleaxe"; break; +case 517: sName = "Epic Devastating Critical Greataxe"; break; +case 518: sName = "Epic Devastating Critical Halberd"; break; +case 519: sName = "Epic Devastating Critical Lighthammer"; break; + } + } + else if (nFeat < 530) + { + switch (nFeat) + { +case 520: sName = "Epic Devastating Critical Lightflail"; break; +case 521: sName = "Epic Devastating Critical Warhammer"; break; +case 522: sName = "Epic Devastating Critical Heavyflail"; break; +case 523: sName = "Epic Devastating Critical Kama"; break; +case 524: sName = "Epic Devastating Critical Kukri"; break; +case 525: sName = "Epic Devastating Critical Shuriken"; break; +case 526: sName = "Epic Devastating Critical Scythe"; break; +case 527: sName = "Epic Devastating Critical Katana"; break; +case 528: sName = "Epic Devastating Critical Bastardsword"; break; +case 529: sName = "Epic Devastating Critical Diremace"; break; + } + } + else if (nFeat < 540) + { + switch (nFeat) + { +case 530: sName = "Epic Devastating Critical Doubleaxe"; break; +case 531: sName = "Epic Devastating Critical Twobladedsword"; break; +case 532: sName = "Epic Devastating Critical Creature"; break; +case 533: sName = "Epic Energy Resistance Cold 1"; break; +case 534: sName = "Epic Energy Resistance Cold 2"; break; +case 535: sName = "Epic Energy Resistance Cold 3"; break; +case 536: sName = "Epic Energy Resistance Cold 4"; break; +case 537: sName = "Epic Energy Resistance Cold 5"; break; +case 538: sName = "Epic Energy Resistance Cold 6"; break; +case 539: sName = "Epic Energy Resistance Cold 7"; break; + } + } + else //<550 + { + switch (nFeat) + { +case 540: sName = "Epic Energy Resistance Cold 8"; break; +case 541: sName = "Epic Energy Resistance Cold 9"; break; +case 542: sName = "Epic Energy Resistance Cold 10"; break; +case 543: sName = "Epic Energy Resistance Acid 1"; break; +case 544: sName = "Epic Energy Resistance Acid 2"; break; +case 545: sName = "Epic Energy Resistance Acid 3"; break; +case 546: sName = "Epic Energy Resistance Acid 4"; break; +case 547: sName = "Epic Energy Resistance Acid 5"; break; +case 548: sName = "Epic Energy Resistance Acid 6"; break; +case 549: sName = "Epic Energy Resistance Acid 7"; break; + } + } + } + else if (nFeat < 600) + { + if (nFeat < 560) + { + switch (nFeat) + { +case 550: sName = "Epic Energy Resistance Acid 8"; break; +case 551: sName = "Epic Energy Resistance Acid 9"; break; +case 552: sName = "Epic Energy Resistance Acid 10"; break; +case 553: sName = "Epic Energy Resistance Fire 1"; break; +case 554: sName = "Epic Energy Resistance Fire 2"; break; +case 555: sName = "Epic Energy Resistance Fire 3"; break; +case 556: sName = "Epic Energy Resistance Fire 4"; break; +case 557: sName = "Epic Energy Resistance Fire 5"; break; +case 558: sName = "Epic Energy Resistance Fire 6"; break; +case 559: sName = "Epic Energy Resistance Fire 7"; break; + } + } + else if (nFeat < 570) + { + switch (nFeat) + { +case 560: sName = "Epic Energy Resistance Fire 8"; break; +case 561: sName = "Epic Energy Resistance Fire 9"; break; +case 562: sName = "Epic Energy Resistance Fire 10"; break; +case 563: sName = "Epic Energy Resistance Electrical 1"; break; +case 564: sName = "Epic Energy Resistance Electrical 2"; break; +case 565: sName = "Epic Energy Resistance Electrical 3"; break; +case 566: sName = "Epic Energy Resistance Electrical 4"; break; +case 567: sName = "Epic Energy Resistance Electrical 5"; break; +case 568: sName = "Epic Energy Resistance Electrical 6"; break; +case 569: sName = "Epic Energy Resistance Electrical 7"; break; + } + } + else if (nFeat < 580) + { + switch (nFeat) + { +case 570: sName = "Epic Energy Resistance Electrical 8"; break; +case 571: sName = "Epic Energy Resistance Electrical 9"; break; +case 572: sName = "Epic Energy Resistance Electrical 10"; break; +case 573: sName = "Epic Energy Resistance Sonic 1"; break; +case 574: sName = "Epic Energy Resistance Sonic 2"; break; +case 575: sName = "Epic Energy Resistance Sonic 3"; break; +case 576: sName = "Epic Energy Resistance Sonic 4"; break; +case 577: sName = "Epic Energy Resistance Sonic 5"; break; +case 578: sName = "Epic Energy Resistance Sonic 6"; break; +case 579: sName = "Epic Energy Resistance Sonic 7"; break; + } + } + else if (nFeat < 590) + { + switch (nFeat) + { +case 580: sName = "Epic Energy Resistance Sonic 8"; break; +case 581: sName = "Epic Energy Resistance Sonic 9"; break; +case 582: sName = "Epic Energy Resistance Sonic 10"; break; +case 583: sName = "Epic Fortitude"; break; +case 584: sName = "Epic Prowess"; break; +case 585: sName = "Epic Reflexes"; break; +case 586: sName = "Epic Reputation"; break; +case 587: sName = "Epic Skill Focus Animal Empathy"; break; +case 588: sName = "Epic Skill Focus Appraise"; break; +case 589: sName = "Epic Skill Focus Concentration"; break; + } + } + else //<600 + { + switch (nFeat) + { +case 590: sName = "Epic Skill Focus Craft Trap"; break; +case 591: sName = "Epic Skill Focus Disabletrap"; break; +case 592: sName = "Epic Skill Focus Discipline"; break; +case 593: sName = "Epic Skill Focus Heal"; break; +case 594: sName = "Epic Skill Focus Hide"; break; +case 595: sName = "Epic Skill Focus Listen"; break; +case 596: sName = "Epic Skill Focus Lore"; break; +case 597: sName = "Epic Skill Focus Movesilently"; break; +case 598: sName = "Epic Skill Focus Openlock"; break; +case 599: sName = "Epic Skill Focus Parry"; break; + } + } + } + else if (nFeat < 650) + { + if (nFeat < 610) + { + switch (nFeat) + { +case 600: sName = "Epic Skill Focus Perform"; break; +case 601: sName = "Epic Skill Focus Persuade"; break; +case 602: sName = "Epic Skill Focus Pickpocket"; break; +case 603: sName = "Epic Skill Focus Search"; break; +case 604: sName = "Epic Skill Focus Settrap"; break; +case 605: sName = "Epic Skill Focus Spellcraft"; break; +case 606: sName = "Epic Skill Focus Spot"; break; +case 607: sName = "Epic Skill Focus Taunt"; break; +case 608: sName = "Epic Skill Focus Tumble"; break; +case 609: sName = "Epic Skill Focus Usemagicdevice"; break; + } + } + else if (nFeat < 620) + { + switch (nFeat) + { +case 610: sName = "Epic Spell Focus Abjuration"; break; +case 611: sName = "Epic Spell Focus Conjuration"; break; +case 612: sName = "Epic Spell Focus Divination"; break; +case 613: sName = "Epic Spell Focus Enchantment"; break; +case 614: sName = "Epic Spell Focus Evocation"; break; +case 615: sName = "Epic Spell Focus Illusion"; break; +case 616: sName = "Epic Spell Focus Necromancy"; break; +case 617: sName = "Epic Spell Focus Transmutation"; break; +case 618: sName = "Epic Spell Penetration"; break; +case 619: sName = "Epic Weapon Focus Club"; break; + } + } + else if (nFeat < 630) + { + switch (nFeat) + { +case 620: sName = "Epic Weapon Focus Dagger"; break; +case 621: sName = "Epic Weapon Focus Dart"; break; +case 622: sName = "Epic Weapon Focus Heavycrossbow"; break; +case 623: sName = "Epic Weapon Focus Lightcrossbow"; break; +case 624: sName = "Epic Weapon Focus Lightmace"; break; +case 625: sName = "Epic Weapon Focus Morningstar"; break; +case 626: sName = "Epic Weapon Focus Quarterstaff"; break; +case 627: sName = "Epic Weapon Focus Shortspear"; break; +case 628: sName = "Epic Weapon Focus Sickle"; break; +case 629: sName = "Epic Weapon Focus Sling"; break; + } + } + else if (nFeat < 640) + { + switch (nFeat) + { +case 630: sName = "Epic Weapon Focus Unarmed"; break; +case 631: sName = "Epic Weapon Focus Longbow"; break; +case 632: sName = "Epic Weapon Focus Shortbow"; break; +case 633: sName = "Epic Weapon Focus Shortsword"; break; +case 634: sName = "Epic Weapon Focus Rapier"; break; +case 635: sName = "Epic Weapon Focus Scimitar"; break; +case 636: sName = "Epic Weapon Focus Longsword"; break; +case 637: sName = "Epic Weapon Focus Greatsword"; break; +case 638: sName = "Epic Weapon Focus Handaxe"; break; +case 639: sName = "Epic Weapon Focus Throwingaxe"; break; + } + } + else //<650 + { + switch (nFeat) + { +case 640: sName = "Epic Weapon Focus Battleaxe"; break; +case 641: sName = "Epic Weapon Focus Greataxe"; break; +case 642: sName = "Epic Weapon Focus Halberd"; break; +case 643: sName = "Epic Weapon Focus Lighthammer"; break; +case 644: sName = "Epic Weapon Focus Lightflail"; break; +case 645: sName = "Epic Weapon Focus Warhammer"; break; +case 646: sName = "Epic Weapon Focus Heavyflail"; break; +case 647: sName = "Epic Weapon Focus Kama"; break; +case 648: sName = "Epic Weapon Focus Kukri"; break; +case 649: sName = "Epic Weapon Focus Shuriken"; break; + } + } + } + else if (nFeat < 700) + { + if (nFeat < 660) + { + switch (nFeat) + { +case 650: sName = "Epic Weapon Focus Scythe"; break; +case 651: sName = "Epic Weapon Focus Katana"; break; +case 652: sName = "Epic Weapon Focus Bastardsword"; break; +case 653: sName = "Epic Weapon Focus Diremace"; break; +case 654: sName = "Epic Weapon Focus Doubleaxe"; break; +case 655: sName = "Epic Weapon Focus Twobladedsword"; break; +case 656: sName = "Epic Weapon Focus Creature"; break; +case 657: sName = "Epic Weapon Specialization Club"; break; +case 658: sName = "Epic Weapon Specialization Dagger"; break; +case 659: sName = "Epic Weapon Specialization Dart"; break; + } + } + else if (nFeat < 670) + { + switch (nFeat) + { +case 660: sName = "Epic Weapon Specialization Heavycrossbow"; break; +case 661: sName = "Epic Weapon Specialization Lightcrossbow"; break; +case 662: sName = "Epic Weapon Specialization Lightmace"; break; +case 663: sName = "Epic Weapon Specialization Morningstar"; break; +case 664: sName = "Epic Weapon Specialization Quarterstaff"; break; +case 665: sName = "Epic Weapon Specialization Shortspear"; break; +case 666: sName = "Epic Weapon Specialization Sickle"; break; +case 667: sName = "Epic Weapon Specialization Sling"; break; +case 668: sName = "Epic Weapon Specialization Unarmed"; break; +case 669: sName = "Epic Weapon Specialization Longbow"; break; + } + } + else if (nFeat < 680) + { + switch (nFeat) + { +case 670: sName = "Epic Weapon Specialization Shortbow"; break; +case 671: sName = "Epic Weapon Specialization Shortsword"; break; +case 672: sName = "Epic Weapon Specialization Rapier"; break; +case 673: sName = "Epic Weapon Specialization Scimitar"; break; +case 674: sName = "Epic Weapon Specialization Longsword"; break; +case 675: sName = "Epic Weapon Specialization Greatsword"; break; +case 676: sName = "Epic Weapon Specialization Handaxe"; break; +case 677: sName = "Epic Weapon Specialization Throwingaxe"; break; +case 678: sName = "Epic Weapon Specialization Battleaxe"; break; +case 679: sName = "Epic Weapon Specialization Greataxe"; break; + } + } + else if (nFeat < 690) + { + switch (nFeat) + { +case 680: sName = "Epic Weapon Specialization Halberd"; break; +case 681: sName = "Epic Weapon Specialization Lighthammer"; break; +case 682: sName = "Epic Weapon Specialization Lightflail"; break; +case 683: sName = "Epic Weapon Specialization Warhammer"; break; +case 684: sName = "Epic Weapon Specialization Heavyflail"; break; +case 685: sName = "Epic Weapon Specialization Kama"; break; +case 686: sName = "Epic Weapon Specialization Kukri"; break; +case 687: sName = "Epic Weapon Specialization Shuriken"; break; +case 688: sName = "Epic Weapon Specialization Scythe"; break; +case 689: sName = "Epic Weapon Specialization Katana"; break; + } + } + else //<700 + { + switch (nFeat) + { +case 690: sName = "Epic Weapon Specialization Bastardsword"; break; +case 691: sName = "Epic Weapon Specialization Diremace"; break; +case 692: sName = "Epic Weapon Specialization Doubleaxe"; break; +case 693: sName = "Epic Weapon Specialization Twobladedsword"; break; +case 694: sName = "Epic Weapon Specialization Creature"; break; +case 695: sName = "Epic Will"; break; +case 696: sName = "Epic Improved Combat Casting"; break; +case 697: sName = "Epic Improved Ki Strike 4"; break; +case 698: sName = "Epic Improved Ki Strike 5"; break; +case 699: sName = "Epic Improved Spell Resistance 1"; break; + } + } + } + else //<750 + { + if (nFeat < 710) + { + switch (nFeat) + { +case 700: sName = "Epic Improved Spell Resistance 2"; break; +case 701: sName = "Epic Improved Spell Resistance 3"; break; +case 702: sName = "Epic Improved Spell Resistance 4"; break; +case 703: sName = "Epic Improved Spell Resistance 5"; break; +case 704: sName = "Epic Improved Spell Resistance 6"; break; +case 705: sName = "Epic Improved Spell Resistance 7"; break; +case 706: sName = "Epic Improved Spell Resistance 8"; break; +case 707: sName = "Epic Improved Spell Resistance 9"; break; +case 708: sName = "Epic Improved Spell Resistance 10"; break; +case 709: sName = "Epic Overwhelming Critical Club"; break; + } + } + else if (nFeat < 720) + { + switch (nFeat) + { +case 710: sName = "Epic Overwhelming Critical Dagger"; break; +case 711: sName = "Epic Overwhelming Critical Dart"; break; +case 712: sName = "Epic Overwhelming Critical Heavycrossbow"; break; +case 713: sName = "Epic Overwhelming Critical Lightcrossbow"; break; +case 714: sName = "Epic Overwhelming Critical Lightmace"; break; +case 715: sName = "Epic Overwhelming Critical Morningstar"; break; +case 716: sName = "Epic Overwhelming Critical Quarterstaff"; break; +case 717: sName = "Epic Overwhelming Critical Shortspear"; break; +case 718: sName = "Epic Overwhelming Critical Sickle"; break; +case 719: sName = "Epic Overwhelming Critical Sling"; break; + } + } + else if (nFeat < 730) + { + switch (nFeat) + { +case 720: sName = "Epic Overwhelming Critical Unarmed"; break; +case 721: sName = "Epic Overwhelming Critical Longbow"; break; +case 722: sName = "Epic Overwhelming Critical Shortbow"; break; +case 723: sName = "Epic Overwhelming Critical Shortsword"; break; +case 724: sName = "Epic Overwhelming Critical Rapier"; break; +case 725: sName = "Epic Overwhelming Critical Scimitar"; break; +case 726: sName = "Epic Overwhelming Critical Longsword"; break; +case 727: sName = "Epic Overwhelming Critical Greatsword"; break; +case 728: sName = "Epic Overwhelming Critical Handaxe"; break; +case 729: sName = "Epic Overwhelming Critical Throwingaxe"; break; + } + } + else if (nFeat < 740) + { + switch (nFeat) + { +case 730: sName = "Epic Overwhelming Critical Battleaxe"; break; +case 731: sName = "Epic Overwhelming Critical Greataxe"; break; +case 732: sName = "Epic Overwhelming Critical Halberd"; break; +case 733: sName = "Epic Overwhelming Critical Lighthammer"; break; +case 734: sName = "Epic Overwhelming Critical Lightflail"; break; +case 735: sName = "Epic Overwhelming Critical Warhammer"; break; +case 736: sName = "Epic Overwhelming Critical Heavyflail"; break; +case 737: sName = "Epic Overwhelming Critical Kama"; break; +case 738: sName = "Epic Overwhelming Critical Kukri"; break; +case 739: sName = "Epic Overwhelming Critical Shuriken"; break; + } + } + else //750 + { + switch (nFeat) + { +case 740: sName = "Epic Overwhelming Critical Scythe"; break; +case 741: sName = "Epic Overwhelming Critical Katana"; break; +case 742: sName = "Epic Overwhelming Critical Bastardsword"; break; +case 743: sName = "Epic Overwhelming Critical Diremace"; break; +case 744: sName = "Epic Overwhelming Critical Doubleaxe"; break; +case 745: sName = "Epic Overwhelming Critical Twobladedsword"; break; +case 746: sName = "Epic Overwhelming Critical Creature"; break; +case 747: sName = "Epic Perfect Health"; break; +case 748: sName = "Epic Self Concealment 1"; break; +case 749: sName = "Epic Self Concealment 2"; break; + } + } + } + } +else + { + if (nFeat < 800) + { + if (nFeat < 760) + { + switch (nFeat) + { +case 750: sName = "Epic Self Concealment 3"; break; +case 751: sName = "Epic Self Concealment 4"; break; +case 752: sName = "Epic Self Concealment 5"; break; +case 753: sName = "Epic Superior Initiative"; break; +case 754: sName = "Epic Toughness 1"; break; +case 755: sName = "Epic Toughness 2"; break; +case 756: sName = "Epic Toughness 3"; break; +case 757: sName = "Epic Toughness 4"; break; +case 758: sName = "Epic Toughness 5"; break; +case 759: sName = "Epic Toughness 6"; break; + } + } + else if (nFeat < 770) + { + switch (nFeat) + { +case 760: sName = "Epic Toughness 7"; break; +case 761: sName = "Epic Toughness 8"; break; +case 762: sName = "Epic Toughness 9"; break; +case 763: sName = "Epic Toughness 10"; break; +case 764: sName = "Epic Great Charisma 1"; break; +case 765: sName = "Epic Great Charisma 2"; break; +case 766: sName = "Epic Great Charisma 3"; break; +case 767: sName = "Epic Great Charisma 4"; break; +case 768: sName = "Epic Great Charisma 5"; break; +case 769: sName = "Epic Great Charisma 6"; break; + } + } + else if (nFeat < 780) + { + switch (nFeat) + { +case 770: sName = "Epic Great Charisma 7"; break; +case 771: sName = "Epic Great Charisma 8"; break; +case 772: sName = "Epic Great Charisma 9"; break; +case 773: sName = "Epic Great Charisma 10"; break; +case 774: sName = "Epic Great Constitution 1"; break; +case 775: sName = "Epic Great Constitution 2"; break; +case 776: sName = "Epic Great Constitution 3"; break; +case 777: sName = "Epic Great Constitution 4"; break; +case 778: sName = "Epic Great Constitution 5"; break; +case 779: sName = "Epic Great Constitution 6"; break; + } + } + else if (nFeat < 790) + { + switch (nFeat) + { +case 780: sName = "Epic Great Constitution 7"; break; +case 781: sName = "Epic Great Constitution 8"; break; +case 782: sName = "Epic Great Constitution 9"; break; +case 783: sName = "Epic Great Constitution 10"; break; +case 784: sName = "Epic Great Dexterity 1"; break; +case 785: sName = "Epic Great Dexterity 2"; break; +case 786: sName = "Epic Great Dexterity 3"; break; +case 787: sName = "Epic Great Dexterity 4"; break; +case 788: sName = "Epic Great Dexterity 5"; break; +case 789: sName = "Epic Great Dexterity 6"; break; + } + } + else //<800 + { + switch (nFeat) + { +case 790: sName = "Epic Great Dexterity 7"; break; +case 791: sName = "Epic Great Dexterity 8"; break; +case 792: sName = "Epic Great Dexterity 9"; break; +case 793: sName = "Epic Great Dexterity 10"; break; +case 794: sName = "Epic Great Intelligence 1"; break; +case 795: sName = "Epic Great Intelligence 2"; break; +case 796: sName = "Epic Great Intelligence 3"; break; +case 797: sName = "Epic Great Intelligence 4"; break; +case 798: sName = "Epic Great Intelligence 5"; break; +case 799: sName = "Epic Great Intelligence 6"; break; + } + } + } + else if (nFeat < 850) + { + if (nFeat < 810) + { + switch (nFeat) + { +case 800: sName = "Epic Great Intelligence 7"; break; +case 801: sName = "Epic Great Intelligence 8"; break; +case 802: sName = "Epic Great Intelligence 9"; break; +case 803: sName = "Epic Great Intelligence 10"; break; +case 804: sName = "Epic Great Wisdom 1"; break; +case 805: sName = "Epic Great Wisdom 2"; break; +case 806: sName = "Epic Great Wisdom 3"; break; +case 807: sName = "Epic Great Wisdom 4"; break; +case 808: sName = "Epic Great Wisdom 5"; break; +case 809: sName = "Epic Great Wisdom 6"; break; + } + } + else if (nFeat < 820) + { + switch (nFeat) + { +case 810: sName = "Epic Great Wisdom 7"; break; +case 811: sName = "Epic Great Wisdom 8"; break; +case 812: sName = "Epic Great Wisdom 9"; break; +case 813: sName = "Epic Great Wisdom 10"; break; +case 814: sName = "Epic Great Strength 1"; break; +case 815: sName = "Epic Great Strength 2"; break; +case 816: sName = "Epic Great Strength 3"; break; +case 817: sName = "Epic Great Strength 4"; break; +case 818: sName = "Epic Great Strength 5"; break; +case 819: sName = "Epic Great Strength 6"; break; + } + } + else if (nFeat < 830) + { + switch (nFeat) + { +case 820: sName = "Epic Great Strength 7"; break; +case 821: sName = "Epic Great Strength 8"; break; +case 822: sName = "Epic Great Strength 9"; break; +case 823: sName = "Epic Great Strength 10"; break; +case 824: sName = "Epic Great Smiting 1"; break; +case 825: sName = "Epic Great Smiting 2"; break; +case 826: sName = "Epic Great Smiting 3"; break; +case 827: sName = "Epic Great Smiting 4"; break; +case 828: sName = "Epic Great Smiting 5"; break; +case 829: sName = "Epic Great Smiting 6"; break; + } + } + else if (nFeat < 840) + { + switch (nFeat) + { +case 830: sName = "Epic Great Smiting 7"; break; +case 831: sName = "Epic Great Smiting 8"; break; +case 832: sName = "Epic Great Smiting 9"; break; +case 833: sName = "Epic Great Smiting 10"; break; +case 834: sName = "Epic Improved Sneak Attack 1"; break; +case 835: sName = "Epic Improved Sneak Attack 2"; break; +case 836: sName = "Epic Improved Sneak Attack 3"; break; +case 837: sName = "Epic Improved Sneak Attack 4"; break; +case 838: sName = "Epic Improved Sneak Attack 5"; break; +case 839: sName = "Epic Improved Sneak Attack 6"; break; + } + } + else //<850 + { + switch (nFeat) + { +case 840: sName = "Epic Improved Sneak Attack 7"; break; +case 841: sName = "Epic Improved Sneak Attack 8"; break; +case 842: sName = "Epic Improved Sneak Attack 9"; break; +case 843: sName = "Epic Improved Sneak Attack 10"; break; +case 844: sName = "Epic Improved Stunning Fist 1"; break; +case 845: sName = "Epic Improved Stunning Fist 2"; break; +case 846: sName = "Epic Improved Stunning Fist 3"; break; +case 847: sName = "Epic Improved Stunning Fist 4"; break; +case 848: sName = "Epic Improved Stunning Fist 5"; break; +case 849: sName = "Epic Improved Stunning Fist 6"; break; + } + } + } + else if (nFeat < 900) + { + if (nFeat < 860) + { + switch (nFeat) + { +case 850: sName = "Epic Improved Stunning Fist 7"; break; +case 851: sName = "Epic Improved Stunning Fist 8"; break; +case 852: sName = "Epic Improved Stunning Fist 9"; break; +case 853: sName = "Epic Improved Stunning Fist 10"; break; +case 854: sName = "Epic Planar Turning"; break; +case 855: sName = "Epic Bane Of Enemies"; break; +case 856: sName = "Epic Dodge"; break; +case 857: sName = "Epic Automatic Quicken 1"; break; +case 858: sName = "Epic Automatic Quicken 2"; break; +case 859: sName = "Epic Automatic Quicken 3"; break; + } + } + else if (nFeat < 870) + { + switch (nFeat) + { +case 860: sName = "Epic Automatic Silent Spell 1"; break; +case 861: sName = "Epic Automatic Silent Spell 2"; break; +case 862: sName = "Epic Automatic Silent Spell 3"; break; +case 863: sName = "Epic Automatic Still Spell 1"; break; +case 864: sName = "Epic Automatic Still Spell 2"; break; +case 865: sName = "Epic Automatic Still Spell 3"; break; +case 867: sName = "Whirlwind Attack"; break; +case 868: sName = "Improved Whirlwind"; break; +case 869: sName = "Mighty Rage"; break; + } + } + else if (nFeat < 880) + { + switch (nFeat) + { +case 870: sName = "Epic Lasting Inspiration"; break; +case 871: sName = "Curse Song"; break; +case 872: sName = "Wild Shape Undead"; break; +case 873: sName = "Wild Shape Dragon"; break; +case 874: sName = "Epic Spell Mummy Dust"; break; +case 875: sName = "Epic Spell Dragon Knight"; break; +case 876: sName = "Epic Spell Hellball"; break; +case 877: sName = "Epic Spell Mage Armour"; break; +case 878: sName = "Epic Spell Ruin"; break; +case 879: sName = "Weapon Of Choice Sickle"; break; + } + } + else if (nFeat < 890) + { + switch (nFeat) + { +case 880: sName = "Weapon Of Choice Kama"; break; +case 881: sName = "Weapon Of Choice Kukri"; break; +case 882: sName = "Ki Damage"; break; +case 883: sName = "Increase Multiplier"; break; +case 884: sName = "Superior Weapon Focus"; break; +case 885: sName = "Ki Critical"; break; +case 886: sName = "Bone Skin 2"; break; +case 889: sName = "Animate Dead"; break; + } + } + else //<900 + { + switch (nFeat) + { +case 890: sName = "Summon Undead"; break; +case 891: sName = "Deathless Vigor"; break; +case 892: sName = "Undead Graft 1"; break; +case 893: sName = "Undead Graft 2"; break; +case 894: sName = "Tough As Bone"; break; +case 895: sName = "Summon Greater Undead"; break; +case 896: sName = "Deathless Mastery"; break; +case 897: sName = "Deathless Master Touch"; break; +case 898: sName = "Greater Wildshape 1"; break; + } + } + } + else if (nFeat < 950) + { + if (nFeat < 910) + { + switch (nFeat) + { +case 900: sName = "Greater Wildshape 2"; break; +case 901: sName = "Greater Wildshape 3"; break; +case 902: sName = "Humanoid Shape"; break; +case 903: sName = "Greater Wildshape 4"; break; +case 904: sName = "Sacred Defense 1"; break; +case 905: sName = "Sacred Defense 2"; break; +case 906: sName = "Sacred Defense 3"; break; +case 907: sName = "Sacred Defense 4"; break; +case 908: sName = "Sacred Defense 5"; break; +case 909: sName = "Divine Wrath"; break; + } + } + else if (nFeat < 920) + { + switch (nFeat) + { +case 910: sName = "Extra Smiting"; break; +case 911: sName = "Skill Focus Craft Armor"; break; +case 912: sName = "Skill Focus Craft Weapon"; break; +case 913: sName = "Epic Skill Focus Craft Armor"; break; +case 914: sName = "Epic Skill Focus Craft Weapon"; break; +case 915: sName = "Skill Focus Bluff"; break; +case 916: sName = "Skill Focus Intimidate"; break; +case 917: sName = "Epic Skill Focus Bluff"; break; +case 918: sName = "Epic Skill Focus Intimidate"; break; +case 919: sName = "Weapon Of Choice Club"; break; + } + } + else if (nFeat < 930) + { + switch (nFeat) + { +case 920: sName = "Weapon Of Choice Dagger"; break; +case 921: sName = "Weapon Of Choice Lightmace"; break; +case 922: sName = "Weapon Of Choice Morningstar"; break; +case 923: sName = "Weapon Of Choice Quarterstaff"; break; +case 924: sName = "Weapon Of Choice Shortspear"; break; +case 925: sName = "Weapon Of Choice Shortsword"; break; +case 926: sName = "Weapon Of Choice Rapier"; break; +case 927: sName = "Weapon Of Choice Scimitar"; break; +case 928: sName = "Weapon Of Choice Longsword"; break; +case 929: sName = "Weapon Of Choice Greatsword"; break; + } + } + else if (nFeat < 940) + { + switch (nFeat) + { +case 930: sName = "Weapon Of Choice Handaxe"; break; +case 931: sName = "Weapon Of Choice Battleaxe"; break; +case 932: sName = "Weapon Of Choice Greataxe"; break; +case 933: sName = "Weapon Of Choice Halberd"; break; +case 934: sName = "Weapon Of Choice Lighthammer"; break; +case 935: sName = "Weapon Of Choice Lightflail"; break; +case 936: sName = "Weapon Of Choice Warhammer"; break; +case 937: sName = "Weapon Of Choice Heavyflail"; break; +case 938: sName = "Weapon Of Choice Scythe"; break; +case 939: sName = "Weapon Of Choice Katana"; break; + } + } + else //<950 + { + switch (nFeat) + { +case 940: sName = "Weapon Of Choice Bastardsword"; break; +case 941: sName = "Weapon Of Choice Diremace"; break; +case 942: sName = "Weapon Of Choice Doubleaxe"; break; +case 943: sName = "Weapon Of Choice Twobladedsword"; break; +case 944: sName = "Brew Potion"; break; +case 945: sName = "Scribe Scroll"; break; +case 946: sName = "Craft Wand"; break; +case 947: sName = "Dwarven Defender Defensive Stance"; break; +case 948: sName = "Damage Reduction 6"; break; +case 949: sName = "Prestige Defensive Awareness 1"; break; + } + } + } + else if (nFeat < 1000) + { + if (nFeat < 960) + { + switch (nFeat) + { +case 950: sName = "Prestige Defensive Awareness 2"; break; +case 951: sName = "Prestige Defensive Awareness 3"; break; +case 952: sName = "Weapon Focus Dwaxe"; break; +case 953: sName = "Weapon Specialization Dwaxe"; break; +case 954: sName = "Improved Critical Dwaxe"; break; +case 955: sName = "Epic Devastating Critical Dwaxe"; break; +case 956: sName = "Epic Weapon Focus Dwaxe"; break; +case 957: sName = "Epic Weapon Specialization Dwaxe"; break; +case 958: sName = "Epic Overwhelming Critical Dwaxe"; break; +case 959: sName = "Weapon Of Choice Dwaxe"; break; + } + } + else if (nFeat < 970) + { + switch (nFeat) + { +case 960: sName = "Use Poison"; break; +case 961: sName = "Dragon Armor"; break; +case 962: sName = "Dragon Abilities"; break; +case 963: sName = "Dragon Immune Paralysis"; break; +case 964: sName = "Dragon Immune Fire"; break; +case 965: sName = "Dragon Dis Breath"; break; +case 966: sName = "Epic Fighter"; break; +case 967: sName = "Epic Barbarian"; break; +case 968: sName = "Epic Bard"; break; +case 969: sName = "Epic Cleric"; break; + } + } + else if (nFeat < 980) + { + switch (nFeat) + { +case 970: sName = "Epic Druid"; break; +case 971: sName = "Epic Monk"; break; +case 972: sName = "Epic Paladin"; break; +case 973: sName = "Epic Ranger"; break; +case 974: sName = "Epic Rogue"; break; +case 975: sName = "Epic Sorcerer"; break; +case 976: sName = "Epic Wizard"; break; +case 977: sName = "Epic Arcane Archer"; break; +case 978: sName = "Epic Assassin"; break; +case 979: sName = "Epic Blackguard"; break; + } + } + else if (nFeat < 990) + { + switch (nFeat) + { +case 980: sName = "Epic Shadowdancer"; break; +case 981: sName = "Epic Harper Scout"; break; +case 982: sName = "Epic Divine Champion"; break; +case 983: sName = "Epic Weapon Master"; break; +case 984: sName = "Epic Pale Master"; break; +case 985: sName = "Epic Dwarven Defender"; break; +case 986: sName = "Epic Shifter"; break; +case 987: sName = "Epic Red Dragon Disc"; break; +case 988: sName = "Epic Thundering Rage"; break; +case 989: sName = "Epic Terrifying Rage"; break; + } + } + else //<1000 + { + switch (nFeat) + { +case 990: sName = "Epic Spell Epic Warding"; break; +case 991: sName = "Prestige Master Crafter"; break; +case 992: sName = "Prestige Scrounger"; break; +case 993: sName = "Weapon Focus Whip"; break; +case 994: sName = "Weapon Specialization Whip"; break; +case 995: sName = "Improved Critical Whip"; break; +case 996: sName = "Epic Devastating Critical Whip"; break; +case 997: sName = "Epic Weapon Focus Whip"; break; +case 998: sName = "Epic Weapon Specialization Whip"; break; +case 999: sName = "Epic Overwhelming Critical Whip"; break; + } + } + } + else //through 1071 + { + if (nFeat < 1010) + { + switch (nFeat) + { +case 1000: sName = "Weapon Of Choice Whip"; break; +case 1001: sName = "Epic Character"; break; +case 1002: sName = "Epic Epic Shadowlord"; break; +case 1003: sName = "Epic Epic Fiend"; break; +case 1004: sName = "Prestige Death Attack 6"; break; +case 1005: sName = "Prestige Death Attack 7"; break; +case 1006: sName = "Prestige Death Attack 8"; break; +case 1007: sName = "Blackguard Sneak Attack 4d6"; break; +case 1008: sName = "Blackguard Sneak Attack 5d6"; break; +case 1009: sName = "Blackguard Sneak Attack 6d6"; break; + } + } + else if (nFeat < 1020) + { + switch (nFeat) + { +case 1010: sName = "Blackguard Sneak Attack 7d6"; break; +case 1011: sName = "Blackguard Sneak Attack 8d6"; break; +case 1012: sName = "Blackguard Sneak Attack 9d6"; break; +case 1013: sName = "Blackguard Sneak Attack 10d6"; break; +case 1014: sName = "Blackguard Sneak Attack 11d6"; break; +case 1015: sName = "Blackguard Sneak Attack 12d6"; break; +case 1016: sName = "Blackguard Sneak Attack 13d6"; break; +case 1017: sName = "Blackguard Sneak Attack 14d6"; break; +case 1018: sName = "Blackguard Sneak Attack 15d6"; break; +case 1019: sName = "Prestige Death Attack 9"; break; + } + } + else if (nFeat < 1030) + { + switch (nFeat) + { +case 1020: sName = "Prestige Death Attack 10"; break; +case 1021: sName = "Prestige Death Attack 11"; break; +case 1022: sName = "Prestige Death Attack 12"; break; +case 1023: sName = "Prestige Death Attack 13"; break; +case 1024: sName = "Prestige Death Attack 14"; break; +case 1025: sName = "Prestige Death Attack 15"; break; +case 1026: sName = "Prestige Death Attack 16"; break; +case 1027: sName = "Prestige Death Attack 17"; break; +case 1028: sName = "Prestige Death Attack 18"; break; +case 1029: sName = "Prestige Death Attack 19"; break; + } + } + else if (nFeat < 1040) + { + switch (nFeat) + { +case 1030: sName = "Prestige Death Attack 20"; break; +case 1032: sName = "Sneak Attack 11"; break; +case 1033: sName = "Sneak Attack 12"; break; +case 1034: sName = "Sneak Attack 13"; break; +case 1035: sName = "Sneak Attack 14"; break; +case 1036: sName = "Sneak Attack 15"; break; +case 1037: sName = "Sneak Attack 16"; break; +case 1038: sName = "Sneak Attack 17"; break; +case 1039: sName = "Sneak Attack 18"; break; + } + } + else if (nFeat < 1050) + { + switch (nFeat) + { +case 1040: sName = "Sneak Attack 19"; break; +case 1041: sName = "Sneak Attack 20"; break; +case 1042: sName = "Dragon Hdincrease D6"; break; +case 1043: sName = "Dragon Hdincrease D8"; break; +case 1044: sName = "Dragon Hdincrease D10"; break; +case 1045: sName = "Prestige Enchant Arrow 6"; break; +case 1046: sName = "Prestige Enchant Arrow 7"; break; +case 1047: sName = "Prestige Enchant Arrow 8"; break; +case 1048: sName = "Prestige Enchant Arrow 9"; break; +case 1049: sName = "Prestige Enchant Arrow 10"; break; + } + } + else if (nFeat < 1060) + { + switch (nFeat) + { +case 1050: sName = "Prestige Enchant Arrow 11"; break; +case 1051: sName = "Prestige Enchant Arrow 12"; break; +case 1052: sName = "Prestige Enchant Arrow 13"; break; +case 1053: sName = "Prestige Enchant Arrow 14"; break; +case 1054: sName = "Prestige Enchant Arrow 15"; break; +case 1055: sName = "Prestige Enchant Arrow 16"; break; +case 1056: sName = "Prestige Enchant Arrow 17"; break; +case 1057: sName = "Prestige Enchant Arrow 18"; break; +case 1058: sName = "Prestige Enchant Arrow 19"; break; +case 1059: sName = "Prestige Enchant Arrow 20"; break; + } + } + else //through 1071 + { + switch (nFeat) + { +case 1060: sName = "Epic Outsider Shape"; break; +case 1061: sName = "Epic Construct Shape"; break; +case 1062: sName = "Epic Shifter Infinite Wildshape 1"; break; +case 1063: sName = "Epic Shifter Infinite Wildshape 2"; break; +case 1064: sName = "Epic Shifter Infinite Wildshape 3"; break; +case 1065: sName = "Epic Shifter Infinite Wildshape 4"; break; +case 1066: sName = "Epic Shifter Infinite Humanoid Shape"; break; +case 1067: sName = "Epic Barbarian Damage Reduction"; break; +case 1068: sName = "Epic Druid Infinite Wildshape"; break; +case 1069: sName = "Epic Druid Infinite Elemental Shape"; break; +case 1070: sName = "Prestige Poison Save Epic"; break; +case 1071: sName = "Epic Superior Weapon Focus"; break; + } + } + } + } +return sName; +} + +int GetIsFeatLimitedUses(int nFeat) +{ +int nReturn = FALSE; +if (nFeat < 330) + { + if (nFeat < 300) + { + switch(nFeat) + { +case 39: nReturn = TRUE; break; +case 199: nReturn = TRUE; break; +case 211: nReturn = TRUE; break; +case 223: nReturn = TRUE; break; +case 257: nReturn = TRUE; break; +case 293: nReturn = TRUE; break; +case 294: nReturn = TRUE; break; +case 296: nReturn = TRUE; break; +case 297: nReturn = TRUE; break; +case 299: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 301: nReturn = TRUE; break; +case 302: nReturn = TRUE; break; +case 303: nReturn = TRUE; break; +case 304: nReturn = TRUE; break; +case 305: nReturn = TRUE; break; +case 306: nReturn = TRUE; break; +case 307: nReturn = TRUE; break; +case 308: nReturn = TRUE; break; +case 310: nReturn = TRUE; break; +case 324: nReturn = TRUE; break; +case 326: nReturn = TRUE; break; +case 327: nReturn = TRUE; break; +case 328: nReturn = TRUE; break; +case 329: nReturn = TRUE; break; + } + } + } +else if (nFeat < 400) + { + if (nFeat < 360) + { + switch(nFeat) + { +case 330: nReturn = TRUE; break; +case 331: nReturn = TRUE; break; +case 335: nReturn = TRUE; break; +case 336: nReturn = TRUE; break; +case 337: nReturn = TRUE; break; +case 338: nReturn = TRUE; break; +case 339: nReturn = TRUE; break; +case 340: nReturn = TRUE; break; +case 341: nReturn = TRUE; break; +case 342: nReturn = TRUE; break; +case 355: nReturn = TRUE; break; +case 356: nReturn = TRUE; break; +case 357: nReturn = TRUE; break; +case 358: nReturn = TRUE; break; +case 359: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 360: nReturn = TRUE; break; +case 361: nReturn = TRUE; break; +case 362: nReturn = TRUE; break; +case 363: nReturn = TRUE; break; +case 364: nReturn = TRUE; break; +case 365: nReturn = TRUE; break; +case 366: nReturn = TRUE; break; +case 367: nReturn = TRUE; break; +case 368: nReturn = TRUE; break; +case 369: nReturn = TRUE; break; +case 370: nReturn = TRUE; break; +case 371: nReturn = TRUE; break; +case 372: nReturn = TRUE; break; +case 373: nReturn = TRUE; break; + } + } + } +else if (nFeat < 500) + { + if (nFeat < 460) + { + switch(nFeat) + { +case 434: nReturn = TRUE; break; +case 435: nReturn = TRUE; break; +case 436: nReturn = TRUE; break; +case 438: nReturn = TRUE; break; +case 440: nReturn = TRUE; break; +case 441: nReturn = TRUE; break; +case 442: nReturn = TRUE; break; +case 443: nReturn = TRUE; break; +case 444: nReturn = TRUE; break; +case 450: nReturn = TRUE; break; +case 451: nReturn = TRUE; break; +case 452: nReturn = TRUE; break; +case 453: nReturn = TRUE; break; +case 454: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 468: nReturn = TRUE; break; +case 469: nReturn = TRUE; break; +case 470: nReturn = TRUE; break; +case 471: nReturn = TRUE; break; +case 472: nReturn = TRUE; break; +case 474: nReturn = TRUE; break; +case 475: nReturn = TRUE; break; +case 476: nReturn = TRUE; break; +case 477: nReturn = TRUE; break; +case 478: nReturn = TRUE; break; +case 479: nReturn = TRUE; break; +case 491: nReturn = TRUE; break; + } + } + } +else + { + if (nFeat < 900) + { + switch(nFeat) + { +case 869: nReturn = TRUE; break; +case 872: nReturn = TRUE; break; +case 873: nReturn = TRUE; break; +case 874: nReturn = TRUE; break; +case 875: nReturn = TRUE; break; +case 876: nReturn = TRUE; break; +case 877: nReturn = TRUE; break; +case 878: nReturn = TRUE; break; +case 882: nReturn = TRUE; break; +case 889: nReturn = TRUE; break; +case 890: nReturn = TRUE; break; +case 892: nReturn = TRUE; break; +case 893: nReturn = TRUE; break; +case 895: nReturn = TRUE; break; +case 897: nReturn = TRUE; break; +case 898: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 900: nReturn = TRUE; break; +case 901: nReturn = TRUE; break; +case 902: nReturn = TRUE; break; +case 903: nReturn = TRUE; break; +case 909: nReturn = TRUE; break; +case 947: nReturn = TRUE; break; +case 965: nReturn = TRUE; break; +case 990: nReturn = TRUE; break; +case 1060: nReturn = TRUE; break; +case 1061: nReturn = TRUE; break; + } + } + } +return nReturn; +} + + + +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_module/_removed files/hgll_func_inc.nss b/_module/_removed files/hgll_func_inc.nss new file mode 100644 index 00000000..c27bce72 --- /dev/null +++ b/_module/_removed files/hgll_func_inc.nss @@ -0,0 +1,1405 @@ +#include "hgll_const_inc" +#include "hgll_struct_stat" +#include "hgll_featreq_inc" +#include "hgll_classft_inc" +#include "hgll_leto_inc" +#include "hgll_spells_inc" +#include "aps_include" +//--------------------------------DECLARATIONS--------------------------------// + +// This returns the current legendary level ("LL") of the PC. It is designed to +// work hand in hand with DAR subraces by tracking level by entering it in +// the (normally unused on PCs) Lootable field on the character file (".bic file"). +// If you are not using DAR, it will still function correctly, using GetHitDice to +// track non-legendary levels. +int CheckLegendaryLevel(object oPC); +// This function determines whether a PC has enough experience to take the next legendary +// level. Possible return values: 1 for having enough, 0 for not, -1 for having too few +// levels to gain Legendary levels, and -2 for already having the maximum amount of LL. +int GetHasXPForNextLL(object oPC); +// This function was used to remove xp from a character based on what LL they were taking. +// It subtracted XP and then returned the XP that was subtracted. It returns zero if they +// are level 60 and -1 if they aren't level 40 yet. It is not used in the current configuration, +// which just lets the xp keep adding up, rather than subtracting the xp after the level is +// gained. This ensures that the character doesn't lose the experience that accrued if for some +// reason Letoscript misfires and fails to edit the character. +int SubtractXPForNextLL(object oPC); +// This function returns the amount of XP the PC is missing to reach their next LL. It will +// return the amount needed to reach level 41 if they are under level 40. If they already +// have enough, it returns 0. If they are level 60, it returns -1. +int GetXPNeededForNextLL(object oPC); +// This function checks for whether or not the PC gains a feat this level. By default it +// is set to one every three levels, carrying the progression of character feats onward from +// the last standard one received at 39, adding new feats starting at level 42 and ending at +// level 60. It is easily modified so that you can assign feats at whatever levels desired. +int GetGainsFeatOnLevelUp(object oPC); +// This function checks for whether or not the PC gains a stat this level. By default it +// is set to one every two levels, doubling the progression of character stats onward from +// the last standard one received at 40, adding new stats starting at level 42 and ending at +// level 60. It is easily modified so that you can assign stats at whatever levels desired. +int GetGainsStatOnLevelUp(object oPC); +// This function tells the caller whether the PC gains +1 to saving throws this level. By default +// it is set to one every four levels, halving the progression of character saves onward from +// the last standard increase received at 40, increasing saves starting at level 44 and ending at +// level 60. It is easily modified so that you can increase saves at whatever levels desired. +int GetGainsSavesOnLevelUp(object oPC); +// This function permanently tags a PC with the CLASS_TYPE that controls his LLs. +void SetControlClass(object oPC, int nClass); +// This function is where any other requirements besides experence and level +// are added to GetHasXPForNextLL. It returns TRUE by default unless modified. +int GetCanGainLL(object oPC); +// This function outputs debugging info to the player and log, but only if DEBUG is +// set to TRUE in hgll_const_inc. +void DoDebug(object oPC, string sDebug); +// This function calculates the Base Ability Scores and Skills of a character, including +// improvements by level and by feats, but filtering out bonuses from gear and effects. +// Skills need another round of filtering before they arrive at base levels. +// sWP: If you specify a WayPoint Tag in an inaccesible area, the clones will be +// generated there. +struct xAbility GetRoughAbilities(object oPC, string sWP=""); +// This function returns the number of Great Strenth feats the character has. +int GetHasGreatStrenth(object oPC); +// This function returns the number of Great Dexterity feats the character has. +int GetHasGreatDexterity(object oPC); +// This function returns the number of Great Constitution feats the character has. +int GetHasGreatConstitution(object oPC); +// This function returns the number of Great Intelligence feats the character has. +int GetHasGreatIntelligence(object oPC); +// This function returns the number of Great Wisdom feats the character has. +int GetHasGreatWisdom(object oPC); +// This function returns the number of Great Charisma feats the character has. +int GetHasGreatCharisma(object oPC); +// This function filters out the Greater Stat Feats and Red Dragon Disciple ability bonuses +// from the ability scores. +int GetBaseStat(int nStatType, int nStat, object oPC); +// This function returns the Red Dragon Disciple ability bonus the character has for the +// specified ability. +int GetRDDStatMod(int nStatType, object oPC); +// This function returns the point vaule penalty (a positive number) for +// dexterity-based skills of the armor worn by the PC. +int GetArmorPenalty(object oPC); +// This function returns the point vaule penalty (a positive number) for +// dexterity-based skills of the shield worn by the PC. +int GetShieldPenalty(object oPC); +// This function takes a given stat number and calculates the bonus from it. +int GetBaseAbilityModifier(int nAmount); +// This function takes the scores retrieved from the GetRoughAbilities function and +// subtracts feat and ability bonuses from the skill to arrive at final base skill. +int GetBaseSkill(int nSkill, struct xAbility stat, object oPC); +// This function calculates the values of all the characters base skills, +// after adjusting them for stat modifiers and feats via GetBaseSkill. +struct xAbility GetBaseAbilities(struct xAbility stat, object oPC); +// This function sets local ints indicating the base ability for all 6 ability scores and +// all 27 skills. They are called later to help determine dependant characteristics like +// hitpoints, and are used to determine feat availabilities, etc. +void SetBaseAbilityMarkers(struct xAbility stat, object oPC); +//This function deletes all the ints tracking base ability and skill scores. +void DeleteBaseAbilityMarkers(object oPC); +// This function determines and returns the amount of skill points a character will get each +// LL based on their control class, INT modifier, and their main race (humans get +1) +int GetSkillPointsGainedOnLevelUp(object oPC); +// This function determines whether a skill is available to the charcter and should appear on the +// skill list, based on the character's control class, the amount of points they have remaining, +// the cost of the skill for the control class, and their current skill level in the skill. +int GetIsSkillAvailable(object oPC, int nSkill); +// This function returns the name string of the specified skill. +string GetNameOfSkill(int nSkill); +// This function returns the name of the tracking int for the specified skill. +string GetNameOfTrackingInt(int nSkill); +// This function determines the amount of HP that a character gets on levelup based on their +// control class, their CON modifier, and whether or not they've taken the toughness feat. +int GetHitPointsGainedOnLevelUp(object oPC); +// This function restores all limited usage feats so that GetHasFeat will not +// return a false negative. +void ReplenishLimitedUseFeats(object oPC); +// This function determines whether a feat is available to the charcter and should appear on the +// feat list, based on the character's control class, whether they meet the feat's requirements, +// whether they already have the feat, and whether the feat is restricted. +int GetIsFeatAvailable(int nFeat, object oPC); +// This function returns the name of the designated ability score. +string GetNameOfAbility(int nStat); +// This function returns TRUE if the specified feat is a class feat and the character has +// enough levels in the class to take it. Otherwise it returns FALSE. +int GetIsClassFeat(int nFeat, int nClass, object oPC); + +//----------------------------------FUNCTIONS---------------------------------// + +int CheckLegendaryLevel(object oPC) +{ +int nLevel = GetLootable(oPC); +if (nLevel<41) + { + return GetHitDice(oPC); + } +else + { + return nLevel; + } +} + +int GetHasXPForNextLL(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 40: return (XP_REQ_LVL41-GetXP(oPC)<=0); break; + case 41: return (XP_REQ_LVL42-GetXP(oPC)<=0); break; + case 42: return (XP_REQ_LVL43-GetXP(oPC)<=0); break; + case 43: return (XP_REQ_LVL44-GetXP(oPC)<=0); break; + case 44: return (XP_REQ_LVL45-GetXP(oPC)<=0); break; + case 45: return (XP_REQ_LVL46-GetXP(oPC)<=0); break; + case 46: return (XP_REQ_LVL47-GetXP(oPC)<=0); break; + case 47: return (XP_REQ_LVL48-GetXP(oPC)<=0); break; + case 48: return (XP_REQ_LVL49-GetXP(oPC)<=0); break; + case 49: return (XP_REQ_LVL50-GetXP(oPC)<=0); break; + case 50: return (XP_REQ_LVL51-GetXP(oPC)<=0); break; + case 51: return (XP_REQ_LVL52-GetXP(oPC)<=0); break; + case 52: return (XP_REQ_LVL53-GetXP(oPC)<=0); break; + case 53: return (XP_REQ_LVL54-GetXP(oPC)<=0); break; + case 54: return (XP_REQ_LVL55-GetXP(oPC)<=0); break; + case 55: return (XP_REQ_LVL56-GetXP(oPC)<=0); break; + case 56: return (XP_REQ_LVL57-GetXP(oPC)<=0); break; + case 57: return (XP_REQ_LVL58-GetXP(oPC)<=0); break; + case 58: return (XP_REQ_LVL59-GetXP(oPC)<=0); break; + case 59: return (XP_REQ_LVL60-GetXP(oPC)<=0); break; + case 60: return -2; break; + default: return -1; break; + } + return -3; +} + +int SubtractXPForNextLL(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 40: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL41)); return XP_REQ_LVL41; break; + case 41: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL42)); return XP_REQ_LVL42; break; + case 42: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL43)); return XP_REQ_LVL43; break; + case 43: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL44)); return XP_REQ_LVL44; break; + case 44: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL45)); return XP_REQ_LVL45; break; + case 45: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL46)); return XP_REQ_LVL46; break; + case 46: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL47)); return XP_REQ_LVL47; break; + case 47: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL48)); return XP_REQ_LVL48; break; + case 48: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL49)); return XP_REQ_LVL49; break; + case 49: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL50)); return XP_REQ_LVL50; break; + case 50: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL51)); return XP_REQ_LVL51; break; + case 51: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL52)); return XP_REQ_LVL52; break; + case 52: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL53)); return XP_REQ_LVL53; break; + case 53: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL54)); return XP_REQ_LVL54; break; + case 54: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL55)); return XP_REQ_LVL55; break; + case 55: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL56)); return XP_REQ_LVL56; break; + case 56: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL57)); return XP_REQ_LVL57; break; + case 57: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL58)); return XP_REQ_LVL58; break; + case 58: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL59)); return XP_REQ_LVL59; break; + case 59: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL60)); return XP_REQ_LVL60; break; + case 60: return 0; break; + default: return -1; break; + } + return -3; +} + +int GetXPNeededForNextLL(object oPC) +{ +int nXP; +switch(CheckLegendaryLevel(oPC)) + { + case 40: nXP = XP_REQ_LVL41-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 41: nXP = XP_REQ_LVL42-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 42: nXP = XP_REQ_LVL43-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 43: nXP = XP_REQ_LVL44-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 44: nXP = XP_REQ_LVL45-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 45: nXP = XP_REQ_LVL46-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 46: nXP = XP_REQ_LVL47-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 47: nXP = XP_REQ_LVL48-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 48: nXP = XP_REQ_LVL49-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 49: nXP = XP_REQ_LVL50-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 50: nXP = XP_REQ_LVL51-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 51: nXP = XP_REQ_LVL52-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 52: nXP = XP_REQ_LVL53-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 53: nXP = XP_REQ_LVL54-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 54: nXP = XP_REQ_LVL55-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 55: nXP = XP_REQ_LVL56-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 56: nXP = XP_REQ_LVL57-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 57: nXP = XP_REQ_LVL58-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 58: nXP = XP_REQ_LVL59-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 59: nXP = XP_REQ_LVL60-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 60: nXP = -1; + default: nXP = XP_REQ_LVL41-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + } +return nXP; +} + +int GetGainsFeatOnLevelUp(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 41: return 1; break; + case 44: return 1; break; + case 47: return 1; break; + case 50: return 1; break; + case 53: return 1; break; + case 56: return 1; break; + case 59: return 1; break; + default: return 0; break; + } + return -3; +} + +int GetGainsStatOnLevelUp(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 41: return 1; break; + case 43: return 1; break; + case 45: return 1; break; + case 47: return 1; break; + case 49: return 1; break; + case 51: return 1; break; + case 53: return 1; break; + case 55: return 1; break; + case 57: return 1; break; + case 59: return 1; break; + default: return 0; break; + } + return -3; +} + +int GetGainsSavesOnLevelUp(object oPC) +{ + switch(CheckLegendaryLevel(oPC)) + { + case 43: + case 47: + case 51: + case 55: + case 59: return 1; break; + default: return 0; break; + } + return -3; +} + +void SetControlClass(object oPC, int nClass) +{ +SetPersistentInt(oPC, "ControlClass", nClass); +DoDebug(oPC, "Control Class: " + IntToString(nClass)); +} + + + +int GetCanGainLL(object oPC) +{ +string immortalname; +string sName = GetName(oPC); +immortalname = GetStringLeft(sName, 8) + GetStringRight(sName, 8) + GetStringLeft(GetPCPlayerName(oPC), 8) + GetStringRight(GetPCPlayerName(oPC), 8); +int nImmortal = 2;//GetLocalInt(oPC, immortalname); +if (nImmortal == 2) return TRUE; +return FALSE; +} + +void DoDebug(object oPC, string sDebug) +{ +if (DEBUG) + { + WriteTimestampedLogEntry(sDebug); + SendMessageToPC(oPC, sDebug); + } +} + +struct xAbility GetRoughAbilities(object oPC, string sWP="") +{ + effect eEffect; + itemproperty ipPenalty; + int iCount; + int nValue; + int nValue2; + int nClass = GetControlClass(oPC); + object oItem, oWP, oClone; + location lClone; + struct xAbility xAbility; + for(iCount = 0; iCount < NUM_INVENTORY_SLOTS; iCount++) + { + oItem = GetItemInSlot(iCount, oPC); + if(GetIsObjectValid(oItem)) + { + ipPenalty = GetFirstItemProperty(oItem); + while(GetIsItemPropertyValid(ipPenalty)) + { + if(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE)) + { + if(GetItemPropertyType(ipPenalty) == ITEM_PROPERTY_DECREASED_ABILITY_SCORE) + { + nValue = GetItemPropertyCostTableValue(ipPenalty);//will return between -1 and -10, matching the maximum penalty to skills from any given item + switch(GetItemPropertySubType(ipPenalty)) + { + case ABILITY_STRENGTH: xAbility.nSTR += nValue; break; + case ABILITY_DEXTERITY: xAbility.nDEX += nValue; break; + case ABILITY_CONSTITUTION: xAbility.nCON += nValue; break; + case ABILITY_INTELLIGENCE: xAbility.nINT += nValue; break; + case ABILITY_WISDOM: xAbility.nWIS += nValue; break; + case ABILITY_CHARISMA: xAbility.nCHA += nValue; break; + } + } + } + if(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)) + { + if(GetItemPropertyType(ipPenalty) == ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) + { + nValue2 = GetItemPropertyCostTableValue(ipPenalty);//will return between -1 and -10, matching the maximum penalty to skills from any given item + switch(GetItemPropertySubType(ipPenalty)) + { + case SKILL_ANIMAL_EMPATHY: xAbility.nANIMAL_EMPATHY += nValue2; break; + case SKILL_CONCENTRATION: xAbility.nCONCENTRATION += nValue2; break; + case SKILL_DISABLE_TRAP: xAbility.nDISABLE_TRAP += nValue2; break; + case SKILL_DISCIPLINE: xAbility.nDISCIPLINE += nValue2; break; + case SKILL_HEAL: xAbility.nHEAL += nValue2; break; + case SKILL_HIDE: xAbility.nHIDE += nValue2; break; + case SKILL_LISTEN: xAbility.nLISTEN += nValue2; break; + case SKILL_LORE: xAbility.nLORE += nValue2; break; + case SKILL_MOVE_SILENTLY: xAbility.nMOVE_SILENTLY += nValue2; break; + case SKILL_OPEN_LOCK: xAbility.nOPEN_LOCK += nValue2; break; + case SKILL_PARRY: xAbility.nPARRY += nValue2; break; + case SKILL_PERFORM: xAbility.nPERFORM += nValue2; break; + case SKILL_PERSUADE: xAbility.nPERSUADE += nValue2; break; + case SKILL_PICK_POCKET: xAbility.nPICK_POCKET += nValue2; break; + case SKILL_SEARCH: xAbility.nSEARCH += nValue2; break; + case SKILL_SET_TRAP: xAbility.nSET_TRAP += nValue2; break; + case SKILL_SPELLCRAFT: xAbility.nSPELLCRAFT += nValue2; break; + case SKILL_SPOT: xAbility.nSPOT += nValue2; break; + case SKILL_TAUNT: xAbility.nTAUNT += nValue2; break; + case SKILL_USE_MAGIC_DEVICE: xAbility.nUSE_MAGIC_DEVICE += nValue2; break; + case SKILL_APPRAISE: xAbility.nAPPRAISE += nValue2; break; + case SKILL_TUMBLE: xAbility.nTUMBLE += nValue2; break; + case SKILL_CRAFT_TRAP: xAbility.nCRAFT_TRAP += nValue2; break; + case SKILL_BLUFF: xAbility.nBLUFF += nValue2; break; + case SKILL_INTIMIDATE: xAbility.nINTIMIDATE += nValue2; break; + case SKILL_CRAFT_ARMOR: xAbility.nCRAFT_ARMOR += nValue2; break; + case SKILL_CRAFT_WEAPON: xAbility.nCRAFT_WEAPON += nValue2; break; + } + } + } + ipPenalty = GetNextItemProperty(oItem); + } + } + } + //Create Clone + oWP = GetWaypointByTag(sWP); + lClone = GetLocation(oWP); + if(sWP != "" && oWP != OBJECT_INVALID && GetAreaFromLocation(lClone)!= OBJECT_INVALID) + { + lClone = GetLocation(oWP); + } + else + { + lClone = GetLocation(oPC); + } + oClone = CopyObject(oPC,lClone); + //Remove Effects from Clone + eEffect = GetFirstEffect(oClone); + while(GetEffectType(eEffect) != EFFECT_TYPE_INVALIDEFFECT) + { + RemoveEffect(oClone, eEffect); + eEffect = GetNextEffect(oClone); + } + for(iCount = 0; iCount < 6; iCount++) + { + eEffect = EffectAbilityIncrease(iCount, 12); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oClone); + nValue = GetAbilityScore(oClone, iCount); + switch(iCount) + { + case ABILITY_STRENGTH: if(xAbility.nSTR >= -10) xAbility.nSTR += nValue - 12; else xAbility.nSTR = nValue - 2; break; + case ABILITY_DEXTERITY: if(xAbility.nDEX >= -10) xAbility.nDEX += nValue - 12; else xAbility.nDEX = nValue - 2; break; + case ABILITY_CONSTITUTION: if(xAbility.nCON >= -10) xAbility.nCON += nValue - 12; else xAbility.nCON = nValue - 2; break; + case ABILITY_INTELLIGENCE: if(xAbility.nINT >= -10) xAbility.nINT += nValue - 12; else xAbility.nINT = nValue - 2; break; + case ABILITY_WISDOM: if(xAbility.nWIS >= -10) xAbility.nWIS += nValue - 12; else xAbility.nWIS = nValue - 2; break; + case ABILITY_CHARISMA: if(xAbility.nCHA >= -10) xAbility.nCHA += nValue - 12; else xAbility.nCHA = nValue - 2; break; + } + } + for(iCount = 0; iCount < 27; iCount++) + { + //eEffect = EffectSkillIncrease(iCount, 50); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oClone); + nValue = GetSkillRank(iCount, oClone); + switch(iCount)//we subtract and extra 6 here for the stats being at +12, for a total of -56 + { + case SKILL_ANIMAL_EMPATHY: if(xAbility.nANIMAL_EMPATHY >= -10) xAbility.nANIMAL_EMPATHY += nValue - 6; else xAbility.nANIMAL_EMPATHY = nValue - 2; break; + case SKILL_CONCENTRATION: if(xAbility.nCONCENTRATION >= -10) xAbility.nCONCENTRATION += nValue - 6; else xAbility.nCONCENTRATION = nValue - 2; break; + case SKILL_DISABLE_TRAP: if(xAbility.nDISABLE_TRAP >= -10) xAbility.nDISABLE_TRAP += nValue - 6; else xAbility.nDISABLE_TRAP = nValue - 2; break; + case SKILL_DISCIPLINE: if(xAbility.nDISCIPLINE >= -10) xAbility.nDISCIPLINE += nValue - 6; else xAbility.nDISCIPLINE = nValue - 2; break; + case SKILL_HEAL: if(xAbility.nHEAL >= -10) xAbility.nHEAL += nValue - 6; else xAbility.nHEAL = nValue - 2; break; + case SKILL_HIDE: if(xAbility.nHIDE >= -10) xAbility.nHIDE += nValue - 6; else xAbility.nHIDE = nValue - 2; break; + case SKILL_LISTEN: if(xAbility.nLISTEN >= -10) xAbility.nLISTEN += nValue - 6; else xAbility.nLISTEN = nValue - 2; break; + case SKILL_LORE: if(xAbility.nLORE >= -10) xAbility.nLORE += nValue - 6; else xAbility.nLORE = nValue - 2; break; + case SKILL_MOVE_SILENTLY: if(xAbility.nMOVE_SILENTLY >= -10) xAbility.nMOVE_SILENTLY += nValue - 6; else xAbility.nMOVE_SILENTLY = nValue - 2; break; + case SKILL_OPEN_LOCK: if(xAbility.nOPEN_LOCK >= -10) xAbility.nOPEN_LOCK += nValue - 6; else xAbility.nOPEN_LOCK = nValue - 2; break; + case SKILL_PARRY: if(xAbility.nPARRY >= -10) xAbility.nPARRY += nValue - 6; else xAbility.nPARRY = nValue - 2; break; + case SKILL_PERFORM: if(xAbility.nPERFORM >= -10) xAbility.nPERFORM += nValue - 6; else xAbility.nPERFORM = nValue - 2; break; + case SKILL_PERSUADE: if(xAbility.nPERSUADE >= -10) xAbility.nPERSUADE += nValue - 6; else xAbility.nPERSUADE = nValue - 2; break; + case SKILL_PICK_POCKET: if(xAbility.nPICK_POCKET >= -10) xAbility.nPICK_POCKET += nValue - 6; else xAbility.nPICK_POCKET = nValue - 2; break; + case SKILL_SEARCH: if(xAbility.nSEARCH >= -10) xAbility.nSEARCH += nValue - 6; else xAbility.nSEARCH = nValue - 2; break; + case SKILL_SET_TRAP: if(xAbility.nSET_TRAP >= -10) xAbility.nSET_TRAP += nValue - 6; else xAbility.nSET_TRAP = nValue - 2; break; + case SKILL_SPELLCRAFT: if(xAbility.nSPELLCRAFT >= -10) xAbility.nSPELLCRAFT += nValue - 6; else xAbility.nSPELLCRAFT = nValue - 2; break; + case SKILL_SPOT: if(xAbility.nSPOT >= -10) xAbility.nSPOT += nValue - 6; else xAbility.nSPOT = nValue - 2; break; + case SKILL_TAUNT: if(xAbility.nTAUNT >= -10) xAbility.nTAUNT += nValue - 6; else xAbility.nTAUNT = nValue - 2; break; + case SKILL_USE_MAGIC_DEVICE: if(xAbility.nUSE_MAGIC_DEVICE >= -10) xAbility.nUSE_MAGIC_DEVICE += nValue - 6; else xAbility.nUSE_MAGIC_DEVICE = nValue - 2; break; + case SKILL_APPRAISE: if(xAbility.nAPPRAISE >= -10) xAbility.nAPPRAISE += nValue - 6; else xAbility.nAPPRAISE = nValue - 2; break; + case SKILL_TUMBLE: if(xAbility.nTUMBLE >= -10) xAbility.nTUMBLE += nValue - 6; else xAbility.nTUMBLE = nValue - 2; break; + case SKILL_CRAFT_TRAP: if(xAbility.nCRAFT_TRAP >= -10) xAbility.nCRAFT_TRAP += nValue - 6; else xAbility.nCRAFT_TRAP = nValue - 2; break; + case SKILL_BLUFF: if(xAbility.nBLUFF >= -10) xAbility.nBLUFF += nValue - 6; else xAbility.nBLUFF = nValue - 2; break; + case SKILL_INTIMIDATE: if(xAbility.nINTIMIDATE >= -10) xAbility.nINTIMIDATE += nValue - 6; else xAbility.nINTIMIDATE = nValue - 2; break; + case SKILL_CRAFT_ARMOR: if(xAbility.nCRAFT_ARMOR >= -10) xAbility.nCRAFT_ARMOR += nValue - 6; else xAbility.nCRAFT_ARMOR = nValue - 2; break; + case SKILL_CRAFT_WEAPON: if(xAbility.nCRAFT_WEAPON >= -10) xAbility.nCRAFT_WEAPON += nValue - 6; else xAbility.nCRAFT_WEAPON = nValue - 2; break; + } + } +//dont try to destroy or take the clone items, wont work +DestroyObject(oClone); +return xAbility; +} + +int GetBaseAbilityModifier(int nAmount) +{ + if ((nAmount%2)==0) + { + nAmount = (nAmount/2)+(nAmount%2); + nAmount = nAmount-5; + } + else + { + nAmount = (nAmount/2)+(nAmount%2); + nAmount = nAmount-6; + } + return nAmount; +} + +int GetHasGreatStrenth(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatDexterity(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatConstitution(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatIntelligence(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatWisdom(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatCharisma(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_10,oPC)) nFeat++; + return nFeat; +} + +int GetBaseStat(int nStatType, int nStat, object oPC) +{ +int nSubtract = 0; +int nBase; +switch(nStatType) + { + case ABILITY_STRENGTH: + nSubtract = GetHasGreatStrenth(oPC) + GetRDDStatMod(nStatType, oPC); + nBase = nStat; break; + case ABILITY_DEXTERITY: + nSubtract = GetHasGreatDexterity(oPC) + GetRDDStatMod(nStatType, oPC); + nBase = nStat; break ; + case ABILITY_CONSTITUTION: + nSubtract = GetHasGreatConstitution(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + case ABILITY_INTELLIGENCE: + nSubtract = GetHasGreatIntelligence(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + case ABILITY_WISDOM: + nSubtract = GetHasGreatWisdom(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + case ABILITY_CHARISMA: + nSubtract = GetHasGreatCharisma(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + default: return -3; break; + } +return (nBase-nSubtract); +} + +int GetRDDStatMod(int nStatType, object oPC) +{ +int nRDDLevel = GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC); +int nReturn = 0; +if (nRDDLevel < 1) return 0;//if not rdd, return +switch(nStatType) + { + case ABILITY_STRENGTH: + if (nRDDLevel > 9) nReturn = 8; + else if (nRDDLevel > 3) nReturn = 4; + else if (nRDDLevel > 1) nReturn = 2; + else nReturn = 0; + break; + case ABILITY_DEXTERITY: + if (nRDDLevel > 6) nReturn = 2; + else nReturn = 0; + break; + case ABILITY_CONSTITUTION: + + case ABILITY_INTELLIGENCE: + if (nRDDLevel > 8) nReturn = 2; + else nReturn = 0; + break; + case ABILITY_WISDOM: + nReturn = 0; + break; + case ABILITY_CHARISMA: + if (nRDDLevel > 9) nReturn = 2; + else nReturn = 0; + break; + } +return nReturn; +} + +int GetArmorPenalty(object oPC) +{ + object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); + if (!GetIsObjectValid(oItem)) return 0; + if (GetBaseItemType(oItem) != BASE_ITEM_ARMOR) return 0; + SetIdentified(oItem,FALSE); + int nPenalty = 0; + switch (GetGoldPieceValue(oItem)) + { + case 1: nPenalty = 0; break; + case 5: nPenalty = 0; break; + case 10: nPenalty = 0; break; + case 15: nPenalty = 1; break; + case 100: nPenalty = 2; break; + case 150: nPenalty = 5; break; + case 200: nPenalty = 7; break; + case 600: nPenalty = 7; break; + case 1500: nPenalty = 8; break; + } + SetIdentified(oItem,TRUE); + return nPenalty; +} + +int GetShieldPenalty(object oPC) +{ + object oItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC); + if (!GetIsObjectValid(oItem)) return 0; + int nType = GetBaseItemType(oItem); + int nPenalty = 0; + switch(nType) + { + case BASE_ITEM_SMALLSHIELD: nPenalty = 1; break; + case BASE_ITEM_LARGESHIELD: nPenalty = 2; break; + case BASE_ITEM_TOWERSHIELD: nPenalty = 10; break; + default: nPenalty = 0; break; + } + return nPenalty; +} + +int GetBaseSkill(int nSkill, struct xAbility stat, object oPC) +{ +int nSubtract = 0; +int nModifier = 0; +int nBase = 0; +int nArmorShield = 0; +int nValue = GetSkillRank(nSkill, oPC); +if (GetCostOfSkill(GetControlClass(oPC), nSkill) == -1 || nValue == 0) + { + return 0; //if skill non-available return 0 + } +else + { + switch(nSkill) + { + case SKILL_ANIMAL_EMPATHY: + nBase = stat.nANIMAL_EMPATHY; + if(GetHasFeat(FEAT_SKILL_FOCUS_ANIMAL_EMPATHY,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_ANIMAL_EMPATHY,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier=GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_APPRAISE: + nBase = stat.nAPPRAISE; + if(GetHasFeat(FEAT_SILVER_PALM,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILLFOCUS_APPRAISE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_APPRAISE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_BLUFF: + nBase = stat.nBLUFF; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_BLUFF,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_BLUFF,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_CONCENTRATION: + nBase = stat.nCONCENTRATION; + if(GetHasFeat(FEAT_SKILL_AFFINITY_CONCENTRATION,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_CONCENTRATION,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CONCENTRATION,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatConstitution(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCON); + break; + case SKILL_CRAFT_ARMOR: + nBase = stat.nCRAFT_ARMOR; + if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_ARMOR,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_ARMOR,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_CRAFT_TRAP: + nBase = stat.nCRAFT_TRAP; + if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_TRAP,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_TRAP,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_CRAFT_WEAPON: + nBase = stat.nCRAFT_WEAPON; + if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_WEAPON,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_WEAPON,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_DISABLE_TRAP: + nBase = stat.nDISABLE_TRAP; + if(GetHasFeat(FEAT_SKILL_FOCUS_DISABLE_TRAP,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_DISABLETRAP,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_DISCIPLINE: + nBase = stat.nDISCIPLINE; + if(GetHasFeat(FEAT_SKILL_FOCUS_DISCIPLINE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_DISCIPLINE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatStrenth(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nSTR); + break; + case SKILL_HEAL: + nBase = stat.nHEAL; + if(GetHasFeat(FEAT_SKILL_FOCUS_HEAL,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_HEAL,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nWIS); + break; + case SKILL_HIDE: + nBase = stat.nHIDE; + if(GetHasFeat(FEAT_STEALTHY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_HIDE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_HIDE,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_INTIMIDATE: + nBase = stat.nINTIMIDATE; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_INTIMIDATE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_INTIMIDATE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_LISTEN: + nBase = stat.nLISTEN; + if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_LISTEN,oPC)) + nSubtract++; + if(GetHasFeat(FEAT_ALERTNESS,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_AFFINITY_LISTEN,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_LISTEN,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_LISTEN,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nWIS); + break; + case SKILL_LORE: + nBase = stat.nLORE; + if(GetHasFeat(FEAT_BARDIC_KNOWLEDGE,oPC)) + nSubtract=nSubtract+GetLevelByClass(CLASS_TYPE_BARD,oPC)+GetLevelByClass(CLASS_TYPE_HARPER); + if(GetHasFeat(FEAT_SKILL_AFFINITY_LORE,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_COURTLY_MAGOCRACY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_LORE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_LORE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_MOVE_SILENTLY: + nBase = stat.nMOVE_SILENTLY; + if(GetHasFeat(FEAT_STEALTHY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_AFFINITY_MOVE_SILENTLY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_MOVE_SILENTLY,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_MOVESILENTLY,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_OPEN_LOCK: + nBase = stat.nOPEN_LOCK; + if(GetHasFeat(FEAT_SKILL_FOCUS_OPEN_LOCK,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_OPENLOCK,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_PARRY: + nBase = stat.nPARRY; + if(GetHasFeat(FEAT_SKILL_FOCUS_PARRY,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PARRY,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_PERFORM: + nBase = stat.nPERFORM; + if(GetHasFeat(FEAT_ARTIST,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_PERFORM,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PERFORM,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_PERSUADE: + nBase = stat.nPERSUADE; + if(GetHasFeat(FEAT_SILVER_PALM,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_THUG,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_PERSUADE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PERSUADE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_PICK_POCKET: + nBase = stat.nPICK_POCKET; + if(GetHasFeat(FEAT_SKILL_FOCUS_PICK_POCKET,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PICKPOCKET,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_SEARCH: + nBase = stat.nSEARCH; + if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_SEARCH,oPC)) + nSubtract=nSubtract+1; + if(GetHasFeat(FEAT_SKILL_AFFINITY_SEARCH,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_SEARCH,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SEARCH,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_SET_TRAP: + nBase = stat.nSET_TRAP; + if(GetHasFeat(FEAT_SKILL_FOCUS_SET_TRAP,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SETTRAP,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_SPELLCRAFT: + nBase = stat.nSPELLCRAFT; + if(GetHasFeat(FEAT_COURTLY_MAGOCRACY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_SPELLCRAFT,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SPELLCRAFT,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_SPOT: + nBase = stat.nSPOT; + if(GetHasFeat(FEAT_ALERTNESS,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_BLOODED,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_ARTIST,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_SPOT,oPC)) + nSubtract=nSubtract+1; + if(GetHasFeat(FEAT_SKILL_AFFINITY_SPOT,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_SPOT,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SPOT,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nWIS); + break; + case SKILL_TAUNT: + nBase = stat.nTAUNT; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_TAUNT,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_TAUNT,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_TUMBLE: + nBase = stat.nTUMBLE; + if(GetHasFeat(FEAT_SKILL_FOCUS_TUMBLE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_TUMBLE,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_USE_MAGIC_DEVICE: + nBase = stat.nUSE_MAGIC_DEVICE; + if(GetHasFeat(FEAT_SKILL_FOCUS_USE_MAGIC_DEVICE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_USEMAGICDEVICE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + default: return -3; + } + return (nBase-nSubtract-nModifier+nArmorShield); + } +} + +struct xAbility GetBaseAbilities(struct xAbility stat, object oPC) +{ +struct xAbility base; +int iCount; +int nBaseAbility; +for(iCount = 0; iCount < 6; iCount++)//filter out the greater stat feats + { + switch(iCount) + { + case ABILITY_STRENGTH: base.nSTR = GetBaseStat(iCount, stat.nSTR, oPC); break; + case ABILITY_DEXTERITY: base.nDEX = GetBaseStat(iCount, stat.nDEX, oPC); break; + case ABILITY_CONSTITUTION: base.nCON = GetBaseStat(iCount, stat.nCON, oPC); break; + case ABILITY_INTELLIGENCE: base.nINT = GetBaseStat(iCount, stat.nINT, oPC); break; + case ABILITY_WISDOM: base.nWIS = GetBaseStat(iCount, stat.nWIS, oPC); break; + case ABILITY_CHARISMA: base.nCHA = GetBaseStat(iCount, stat.nCHA, oPC); break; + } + } +//For skills we must still process them to remove ability and feat bonuses. +for(iCount = 0; iCount < 27; iCount++) + { + nBaseAbility = GetBaseSkill(iCount, stat, oPC); + switch (iCount) + { + case 0: base.nANIMAL_EMPATHY = nBaseAbility; break; + case 1: base.nCONCENTRATION = nBaseAbility; break; + case 2: base.nDISABLE_TRAP = nBaseAbility; break; + case 3: base.nDISCIPLINE = nBaseAbility; break; + case 4: base.nHEAL = nBaseAbility; break; + case 5: base.nHIDE = nBaseAbility; break; + case 6: base.nLISTEN = nBaseAbility; break; + case 7: base.nLORE = nBaseAbility; break; + case 8: base.nMOVE_SILENTLY = nBaseAbility; break; + case 9: base.nOPEN_LOCK = nBaseAbility; break; + case 10: base.nPARRY = nBaseAbility; break; + case 11: base.nPERFORM = nBaseAbility; break; + case 12: base.nPERSUADE = nBaseAbility; break; + case 13: base.nPICK_POCKET = nBaseAbility; break; + case 14: base.nSEARCH = nBaseAbility; break; + case 15: base.nSET_TRAP = nBaseAbility; break; + case 16: base.nSPELLCRAFT = nBaseAbility; break; + case 17: base.nSPOT = nBaseAbility; break; + case 18: base.nTAUNT = nBaseAbility; break; + case 19: base.nUSE_MAGIC_DEVICE = nBaseAbility; break; + case 20: base.nAPPRAISE = nBaseAbility; break; + case 21: base.nTUMBLE = nBaseAbility; break; + case 22: base.nCRAFT_TRAP = nBaseAbility; break; + case 23: base.nBLUFF = nBaseAbility; break; + case 24: base.nINTIMIDATE = nBaseAbility; break; + case 25: base.nCRAFT_ARMOR = nBaseAbility; break; + case 26: base.nCRAFT_WEAPON = nBaseAbility; break; + } + } +return base; +} + +void SetBaseAbilityMarkers(struct xAbility stat, object oPC) +{ +SetLocalInt(oPC, "BASE_STR", stat.nSTR); +SetLocalInt(oPC, "BASE_DEX", stat.nDEX); +SetLocalInt(oPC, "BASE_CON", stat.nCON); +SetLocalInt(oPC, "BASE_INT", stat.nINT); +SetLocalInt(oPC, "BASE_WIS", stat.nWIS); +SetLocalInt(oPC, "BASE_CHA", stat.nCHA); +DoDebug(oPC, "Base ability ints set as STR: "+IntToString(GetLocalInt(oPC, "BASE_STR"))+", DEX: "+IntToString(GetLocalInt(oPC, "BASE_DEX"))+", CON: "+IntToString(GetLocalInt(oPC, "BASE_CON"))+", INT: "+IntToString(GetLocalInt(oPC, "BASE_INT"))+", WIS: "+IntToString(GetLocalInt(oPC, "BASE_WIS"))+", CHA: "+IntToString(GetLocalInt(oPC, "BASE_CHA"))+"."); +SetLocalInt(oPC, "BASE_ANIMAL", stat.nANIMAL_EMPATHY); +SetLocalInt(oPC, "BASE_CONCEN", stat.nCONCENTRATION); +SetLocalInt(oPC, "BASE_DISABL", stat.nDISABLE_TRAP); +SetLocalInt(oPC, "BASE_DISCIP", stat.nDISCIPLINE); +SetLocalInt(oPC, "BASE_HEAL", stat.nHEAL); +SetLocalInt(oPC, "BASE_HIDE", stat.nHIDE); +DoDebug(oPC, "Base ability ints set as ANIMAL: "+IntToString(GetLocalInt(oPC, "BASE_ANIMAL"))+", CONCEN: "+IntToString(GetLocalInt(oPC, "BASE_CONCEN"))+", DISABL: "+IntToString(GetLocalInt(oPC, "BASE_DISABL"))+", DISCIP: "+IntToString(GetLocalInt(oPC, "BASE_DISCIP"))+", HEAL: "+IntToString(GetLocalInt(oPC, "BASE_HEAL"))+", HIDE: "+IntToString(GetLocalInt(oPC, "BASE_HIDE"))+"."); +SetLocalInt(oPC, "BASE_LISTEN", stat.nLISTEN); +SetLocalInt(oPC, "BASE_LORE", stat.nLORE); +SetLocalInt(oPC, "BASE_MOVE_S", stat.nMOVE_SILENTLY); +SetLocalInt(oPC, "BASE_OPEN_L", stat.nOPEN_LOCK); +SetLocalInt(oPC, "BASE_PARRY", stat.nPARRY); +SetLocalInt(oPC, "BASE_PERFOR", stat.nPERFORM); +DoDebug(oPC, "Base ability ints set as LISTEN: "+IntToString(GetLocalInt(oPC, "BASE_LISTEN"))+", LORE: "+IntToString(GetLocalInt(oPC, "BASE_LORE"))+", MOVE_S: "+IntToString(GetLocalInt(oPC, "BASE_MOVE_S"))+", OPEN_L: "+IntToString(GetLocalInt(oPC, "BASE_OPEN_L"))+", PARRY: "+IntToString(GetLocalInt(oPC, "BASE_PARRY"))+", PERFOR: "+IntToString(GetLocalInt(oPC, "BASE_PERFOR"))+"."); +SetLocalInt(oPC, "BASE_PERSUA", stat.nPERSUADE); +SetLocalInt(oPC, "BASE_PICK_P", stat.nPICK_POCKET); +SetLocalInt(oPC, "BASE_SEARCH", stat.nSEARCH); +SetLocalInt(oPC, "BASE_SET_TR", stat.nSET_TRAP); +SetLocalInt(oPC, "BASE_SPELLC", stat.nSPELLCRAFT); +SetLocalInt(oPC, "BASE_SPOT", stat.nSPOT); +DoDebug(oPC, "Base ability ints set as PERSUA: "+IntToString(GetLocalInt(oPC, "BASE_PERSUA"))+", PICK_P: "+IntToString(GetLocalInt(oPC, "BASE_PICK_P"))+", SEARCH: "+IntToString(GetLocalInt(oPC, "BASE_SEARCH"))+", SET_TR: "+IntToString(GetLocalInt(oPC, "BASE_SET_TR"))+", SPELLC: "+IntToString(GetLocalInt(oPC, "BASE_SPELLC"))+", SPOT: "+IntToString(GetLocalInt(oPC, "BASE_SPOT"))+"."); +SetLocalInt(oPC, "BASE_TAUNT", stat.nTAUNT); +SetLocalInt(oPC, "BASE_USE_MA", stat.nUSE_MAGIC_DEVICE); +SetLocalInt(oPC, "BASE_APPRAI", stat.nAPPRAISE); +SetLocalInt(oPC, "BASE_TUMBLE", stat.nTUMBLE); +SetLocalInt(oPC, "BASE_CRAFT_T", stat.nCRAFT_TRAP); +SetLocalInt(oPC, "BASE_BLUFF", stat.nBLUFF); +DoDebug(oPC, "Base ability ints set as TAUNT: "+IntToString(GetLocalInt(oPC, "BASE_TAUNT"))+", USE_MA: "+IntToString(GetLocalInt(oPC, "BASE_USE_MA"))+", APPRAI: "+IntToString(GetLocalInt(oPC, "BASE_APPRAI"))+", TUMBLE: "+IntToString(GetLocalInt(oPC, "BASE_TUMBLE"))+", CRAFT_T: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_T"))+", BLUFF: "+IntToString(GetLocalInt(oPC, "BASE_BLUFF"))+"."); +SetLocalInt(oPC, "BASE_INTIMI", stat.nINTIMIDATE); +SetLocalInt(oPC, "BASE_CRAFT_A", stat.nCRAFT_ARMOR); +SetLocalInt(oPC, "BASE_CRAFT_W", stat.nCRAFT_WEAPON); +DoDebug(oPC, "Base ability ints set as INTIMI: "+IntToString(GetLocalInt(oPC, "BASE_INTIMI"))+", CRAFT_A: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_A"))+", CRAFT_W: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_W"))+"."); +} + +void DeleteBaseAbilityMarkers(object oPC) +{ +DeleteLocalInt(oPC, "BASE_STR"); +DeleteLocalInt(oPC, "BASE_DEX"); +DeleteLocalInt(oPC, "BASE_CON"); +DeleteLocalInt(oPC, "BASE_INT"); +DeleteLocalInt(oPC, "BASE_WIS"); +DeleteLocalInt(oPC, "BASE_CHA"); +DoDebug(oPC, "Base ability ints set as STR: "+IntToString(GetLocalInt(oPC, "BASE_STR"))+", DEX: "+IntToString(GetLocalInt(oPC, "BASE_DEX"))+", CON: "+IntToString(GetLocalInt(oPC, "BASE_CON"))+", INT: "+IntToString(GetLocalInt(oPC, "BASE_INT"))+", WIS: "+IntToString(GetLocalInt(oPC, "BASE_WIS"))+", CHA: "+IntToString(GetLocalInt(oPC, "BASE_CHA"))+"."); +DeleteLocalInt(oPC, "BASE_ANIMAL"); +DeleteLocalInt(oPC, "BASE_CONCEN"); +DeleteLocalInt(oPC, "BASE_DISABL"); +DeleteLocalInt(oPC, "BASE_DISCIP"); +DeleteLocalInt(oPC, "BASE_HEAL"); +DeleteLocalInt(oPC, "BASE_HIDE"); +DoDebug(oPC, "Base ability ints set as ANIMAL: "+IntToString(GetLocalInt(oPC, "BASE_ANIMAL"))+", CONCEN: "+IntToString(GetLocalInt(oPC, "BASE_CONCEN"))+", DISABL: "+IntToString(GetLocalInt(oPC, "BASE_DISABL"))+", DISCIP: "+IntToString(GetLocalInt(oPC, "BASE_DISCIP"))+", HEAL: "+IntToString(GetLocalInt(oPC, "BASE_HEAL"))+", HIDE: "+IntToString(GetLocalInt(oPC, "BASE_HIDE"))+"."); +DeleteLocalInt(oPC, "BASE_LISTEN"); +DeleteLocalInt(oPC, "BASE_LORE"); +DeleteLocalInt(oPC, "BASE_MOVE_S"); +DeleteLocalInt(oPC, "BASE_OPEN_L"); +DeleteLocalInt(oPC, "BASE_PARRY"); +DeleteLocalInt(oPC, "BASE_PERFOR"); +DoDebug(oPC, "Base ability ints set as LISTEN: "+IntToString(GetLocalInt(oPC, "BASE_LISTEN"))+", LORE: "+IntToString(GetLocalInt(oPC, "BASE_LORE"))+", MOVE_S: "+IntToString(GetLocalInt(oPC, "BASE_MOVE_S"))+", OPEN_L: "+IntToString(GetLocalInt(oPC, "BASE_OPEN_L"))+", PARRY: "+IntToString(GetLocalInt(oPC, "BASE_PARRY"))+", PERFOR: "+IntToString(GetLocalInt(oPC, "BASE_PERFOR"))+"."); +DeleteLocalInt(oPC, "BASE_PERSUA"); +DeleteLocalInt(oPC, "BASE_PICK_P"); +DeleteLocalInt(oPC, "BASE_SEARCH"); +DeleteLocalInt(oPC, "BASE_SET_TR"); +DeleteLocalInt(oPC, "BASE_SPELLC"); +DeleteLocalInt(oPC, "BASE_SPOT"); +DoDebug(oPC, "Base ability ints set as PERSUA: "+IntToString(GetLocalInt(oPC, "BASE_PERSUA"))+", PICK_P: "+IntToString(GetLocalInt(oPC, "BASE_PICK_P"))+", SEARCH: "+IntToString(GetLocalInt(oPC, "BASE_SEARCH"))+", SET_TR: "+IntToString(GetLocalInt(oPC, "BASE_SET_TR"))+", SPELLC: "+IntToString(GetLocalInt(oPC, "BASE_SPELLC"))+", SPOT: "+IntToString(GetLocalInt(oPC, "BASE_SPOT"))+"."); +DeleteLocalInt(oPC, "BASE_TAUNT"); +DeleteLocalInt(oPC, "BASE_USE_MA"); +DeleteLocalInt(oPC, "BASE_APPRAI"); +DeleteLocalInt(oPC, "BASE_TUMBLE"); +DeleteLocalInt(oPC, "BASE_CRAFT_T"); +DeleteLocalInt(oPC, "BASE_BLUFF"); +DoDebug(oPC, "Base ability ints set as TAUNT: "+IntToString(GetLocalInt(oPC, "BASE_TAUNT"))+", USE_MA: "+IntToString(GetLocalInt(oPC, "BASE_USE_MA"))+", APPRAI: "+IntToString(GetLocalInt(oPC, "BASE_APPRAI"))+", TUMBLE: "+IntToString(GetLocalInt(oPC, "BASE_TUMBLE"))+", CRAFT_T: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_T"))+", BLUFF: "+IntToString(GetLocalInt(oPC, "BASE_BLUFF"))+"."); +DeleteLocalInt(oPC, "BASE_INTIMI"); +DeleteLocalInt(oPC, "BASE_CRAFT_A"); +DeleteLocalInt(oPC, "BASE_CRAFT_W"); +DoDebug(oPC, "Base ability ints set as INTIMI: "+IntToString(GetLocalInt(oPC, "BASE_INTIMI"))+", CRAFT_A: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_A"))+", CRAFT_W: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_W"))+"."); +} + +int GetSkillPointsGainedOnLevelUp(object oPC) +{ +int nClass = GetControlClass(oPC); +int nInt = GetLocalInt(oPC, "BASE_INT"); +int nClassBonus = 0; +int nRaceBonus = 0; +int nTotal; +if(GetRacialType(oPC)==RACIAL_TYPE_HUMAN) + { + nRaceBonus = 1; + } +switch(nClass) + { + case CLASS_TYPE_ROGUE: + nClassBonus = 8; break; + case CLASS_TYPE_SHADOWDANCER: + nClassBonus = 6; break; + case CLASS_TYPE_ARCANE_ARCHER: + case CLASS_TYPE_ASSASSIN: + case CLASS_TYPE_BARBARIAN: + case CLASS_TYPE_BARD: + case CLASS_TYPE_DRUID: + case CLASS_TYPE_HARPER: + case CLASS_TYPE_MONK: + case CLASS_TYPE_RANGER: + case CLASS_TYPE_SHIFTER: + nClassBonus = 4; break; + case CLASS_TYPE_BLACKGUARD: + case CLASS_TYPE_CLERIC: + case CLASS_TYPE_FIGHTER: + case CLASS_TYPE_DIVINECHAMPION: + case CLASS_TYPE_DRAGONDISCIPLE: + case CLASS_TYPE_DWARVENDEFENDER: + case CLASS_TYPE_PALADIN: + case CLASS_TYPE_PALEMASTER: + case CLASS_TYPE_SORCERER: + case CLASS_TYPE_WEAPON_MASTER: + case CLASS_TYPE_WIZARD: + nClassBonus = 2; break; + } +nTotal = nClassBonus+nRaceBonus+GetBaseAbilityModifier(nInt); +DoDebug(oPC, "Skill Points Gained: "+IntToString(nTotal)+"."); +return nTotal; +} + +int GetIsSkillAvailable(object oPC, int nSkill) +{ +int nPointsAvailable = GetLocalInt(oPC, "PointsAvailable"); +int nClass = GetControlClass(oPC); +int nLevel = CheckLegendaryLevel(oPC); +int nSkillMax; +int nSkillTotal; +switch (nSkill) + { + case 0: nSkillTotal = GetLocalInt(oPC, "BASE_ANIMAL"); break; + case 1: nSkillTotal = GetLocalInt(oPC, "BASE_CONCEN"); break; + case 2: nSkillTotal = GetLocalInt(oPC, "BASE_DISABL"); break; + case 3: nSkillTotal = GetLocalInt(oPC, "BASE_DISCIP"); break; + case 4: nSkillTotal = GetLocalInt(oPC, "BASE_HEAL"); break; + case 5: nSkillTotal = GetLocalInt(oPC, "BASE_HIDE"); break; + case 6: nSkillTotal = GetLocalInt(oPC, "BASE_LISTEN"); break; + case 7: nSkillTotal = GetLocalInt(oPC, "BASE_LORE"); break; + case 8: nSkillTotal = GetLocalInt(oPC, "BASE_MOVE_S"); break; + case 9: nSkillTotal = GetLocalInt(oPC, "BASE_OPEN_L"); break; + case 10: nSkillTotal = GetLocalInt(oPC, "BASE_PARRY"); break; + case 11: nSkillTotal = GetLocalInt(oPC, "BASE_PERFOR"); break; + case 12: nSkillTotal = GetLocalInt(oPC, "BASE_PERSUA"); break; + case 13: nSkillTotal = GetLocalInt(oPC, "BASE_PICK_P"); break; + case 14: nSkillTotal = GetLocalInt(oPC, "BASE_SEARCH"); break; + case 15: nSkillTotal = GetLocalInt(oPC, "BASE_SET_TR"); break; + case 16: nSkillTotal = GetLocalInt(oPC, "BASE_SPELLC"); break; + case 17: nSkillTotal = GetLocalInt(oPC, "BASE_SPOT"); break; + case 18: nSkillTotal = GetLocalInt(oPC, "BASE_TAUNT"); break; + case 19: nSkillTotal = GetLocalInt(oPC, "BASE_USE_MA"); break; + case 20: nSkillTotal = GetLocalInt(oPC, "BASE_APPRAI"); break; + case 21: nSkillTotal = GetLocalInt(oPC, "BASE_TUMBLE"); break; + case 22: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_T"); break; + case 23: nSkillTotal = GetLocalInt(oPC, "BASE_BLUFF"); break; + case 24: nSkillTotal = GetLocalInt(oPC, "BASE_INTIMI"); break; + case 25: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_A"); break; + case 26: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_W"); break; + } +int nSkillCost = GetCostOfSkill(nClass, nSkill);//returns -1 if not available +if (nSkillCost == 2)//cross-class + { + nSkillMax = (nLevel+4)/2;//they can go up to half of (three points higher than their new level), CheckLegendaryLevel returns the CURRENT level + } +else + { + nSkillMax = nLevel+4;//they can go three points higher than their new level, CheckLegendaryLevel returns the CURRENT level + } +if((nSkillCost > 0) && (nPointsAvailable >= nSkillCost) && (nSkillTotal < nSkillMax)) return TRUE; +else return FALSE; +} + +string GetNameOfSkill(int nSkill) +{ +string sSkill; +switch (nSkill) + { + case 0: sSkill = "Animal Empathy"; break; + case 1: sSkill = "Concentration"; break; + case 2: sSkill = "Disable Trap"; break; + case 3: sSkill = "Discipline"; break; + case 4: sSkill = "Heal"; break; + case 5: sSkill = "Hide"; break; + case 6: sSkill = "Listen"; break; + case 7: sSkill = "Lore"; break; + case 8: sSkill = "Move Silently"; break; + case 9: sSkill = "Open Lock"; break; + case 10: sSkill = "Parry"; break; + case 11: sSkill = "Perform"; break; + case 12: sSkill = "Persuade"; break; + case 13: sSkill = "Pick Pocket"; break; + case 14: sSkill = "Search"; break; + case 15: sSkill = "Set Trap"; break; + case 16: sSkill = "Spellcraft"; break; + case 17: sSkill = "Spot"; break; + case 18: sSkill = "Taunt"; break; + case 19: sSkill = "Use Magic Device"; break; + case 20: sSkill = "Appraise"; break; + case 21: sSkill = "Tumble"; break; + case 22: sSkill = "Craft Trap"; break; + case 23: sSkill = "Bluff"; break; + case 24: sSkill = "Intimidate"; break; + case 25: sSkill = "Craft Armor"; break; + case 26: sSkill = "Craft Weapon"; break; + default: sSkill = ""; break; + } +return sSkill; +} + +string GetNameOfTrackingInt(int nSkill) +{ +string sSkill; +switch (nSkill) + { + case 0: sSkill = "BASE_ANIMAL"; break; + case 1: sSkill = "BASE_CONCEN"; break; + case 2: sSkill = "BASE_DISABL"; break; + case 3: sSkill = "BASE_DISCIP"; break; + case 4: sSkill = "BASE_HEAL"; break; + case 5: sSkill = "BASE_HIDE"; break; + case 6: sSkill = "BASE_LISTEN"; break; + case 7: sSkill = "BASE_LORE"; break; + case 8: sSkill = "BASE_MOVE_S"; break; + case 9: sSkill = "BASE_OPEN_L"; break; + case 10: sSkill = "BASE_PARRY"; break; + case 11: sSkill = "BASE_PERFOR"; break; + case 12: sSkill = "BASE_PERSUA"; break; + case 13: sSkill = "BASE_PICK_P"; break; + case 14: sSkill = "BASE_SEARCH"; break; + case 15: sSkill = "BASE_SET_TR"; break; + case 16: sSkill = "BASE_SPELLC"; break; + case 17: sSkill = "BASE_SPOT"; break; + case 18: sSkill = "BASE_TAUNT"; break; + case 19: sSkill = "BASE_USE_MA"; break; + case 20: sSkill = "BASE_APPRAI"; break; + case 21: sSkill = "BASE_TUMBLE"; break; + case 22: sSkill = "BASE_CRAFT_T"; break; + case 23: sSkill = "BASE_BLUFF"; break; + case 24: sSkill = "BASE_INTIMI"; break; + case 25: sSkill = "BASE_CRAFT_A"; break; + case 26: sSkill = "BASE_CRAFT_W"; break; + default: sSkill = ""; break; + } +return sSkill; +} + +int GetHitPointsGainedOnLevelUp(object oPC) +{ +int nClass = GetControlClass(oPC); +int nCon = GetLocalInt(oPC, "BASE_CON"); +int nClassDie; +int nFeatBonus = 0; +int nTotal; +if(GetHasFeat(FEAT_TOUGHNESS, oPC)) +{ +nFeatBonus = 1; +} +switch(nClass) + { + case CLASS_TYPE_DWARVENDEFENDER: + case CLASS_TYPE_BARBARIAN: + nClassDie = 12; break; + case CLASS_TYPE_DIVINECHAMPION: + case CLASS_TYPE_WEAPON_MASTER: + case CLASS_TYPE_PALADIN: + case CLASS_TYPE_RANGER: + case CLASS_TYPE_BLACKGUARD: + case CLASS_TYPE_FIGHTER: + case CLASS_TYPE_DRAGONDISCIPLE: + nClassDie = 10; break; + case CLASS_TYPE_SHADOWDANCER: + case CLASS_TYPE_DRUID: + case CLASS_TYPE_ARCANE_ARCHER: + case CLASS_TYPE_MONK: + case CLASS_TYPE_SHIFTER: + case CLASS_TYPE_CLERIC: + nClassDie = 8; break; + case CLASS_TYPE_ROGUE: + case CLASS_TYPE_ASSASSIN: + case CLASS_TYPE_BARD: + case CLASS_TYPE_HARPER: + case CLASS_TYPE_PALEMASTER: + nClassDie = 6; break; + case CLASS_TYPE_SORCERER: + case CLASS_TYPE_WIZARD: + nClassDie = 4; break; + } +nTotal = nClassDie+nFeatBonus+GetBaseAbilityModifier(nCon)+10; +DoDebug(oPC, "HP Gained: "+IntToString(nTotal)+"."); +return nTotal; +} + +void ReplenishLimitedUseFeats(object oPC) +{ +int nFeat = 0; +for(nFeat = 0; nFeat < 1072; nFeat++) + { + if (GetIsFeatLimitedUses(nFeat)) + { + IncrementRemainingFeatUses(oPC, nFeat); + } + } +} + +int GetIsFeatAvailable(int nFeat, object oPC) +{ +int nClass = GetControlClass(oPC); +if (DEV_CRIT_DISABLED && GetIsFeatDevCrit(nFeat)) return FALSE; +if (GetIsFeatFirstLevelOnly(nFeat)) return FALSE; +if (GetHasFeat(nFeat, oPC) && nFeat != 13) return FALSE;//only Extra Turning (13) may be taken multiple times +if (!GetIsClassFeat(nFeat, nClass, oPC) && !GetIsGeneralFeat(nFeat)) return FALSE;//if it's not a class skill and it's not a general skill return FALSE +if (GetAreFeatStatReqsMet(nFeat, oPC) && + GetAreFeatSkillReqsMet(nFeat, oPC) && + GetAreFeatFeatReqsMet(nFeat, oPC) && + GetHasRequiredSpellLevelForFeat(oPC, nFeat)) return TRUE; + +return FALSE; +} + +string GetNameOfAbility(int nStat) +{ +string sReturn; +switch (nStat) + { + case ABILITY_STRENGTH: sReturn = "Strength"; break; + case ABILITY_DEXTERITY: sReturn = "Dexterity"; break; + case ABILITY_CONSTITUTION: sReturn = "Constitution"; break; + case ABILITY_INTELLIGENCE: sReturn = "Intelligence"; break; + case ABILITY_WISDOM: sReturn = "Wisdom"; break; + case ABILITY_CHARISMA: sReturn = "Charisma"; break; + } +return sReturn; +} + +int GetIsClassFeat(int nFeat, int nClass, object oPC) +{ +int nLevel = GetClassLevelReqForFeat(nFeat, nClass); +if (nLevel < -1) return FALSE; +if (GetLevelByClass(nClass, oPC) < nLevel) return FALSE; +return TRUE; +} + +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_module/_removed files/hgll_leto_inc.nss b/_module/_removed files/hgll_leto_inc.nss new file mode 100644 index 00000000..9c7f146c --- /dev/null +++ b/_module/_removed files/hgll_leto_inc.nss @@ -0,0 +1,284 @@ +#include "hgll_const_inc" +//--------------------------------DECLARATIONS--------------------------------// + +// This function bridges Letoscript into NWNX. +string LetoScript(string script); +// This function returns the bicfilename of the character specified. +string GetBicFileName(object oPC); +// This function finds the most recently edited .bic file in the player's folder, +// and applies whatever changes are conatained within the string of Letoscript. You must +// set the path to your servervault folder in the hgll_const_inc script for it to work. +// The easiest way to ensure that the ingame character is the most recently edited +// file is to save the character at least 3 seconds or more before calling this function. +void ApplyLetoScriptToPC(string Script, object oPC); +// This function tells Letoscript to add a stat point to the specified stat. +string AddStatPoint(int nStat); +// This function tells Letoscript to add a skill point to the specified skill. +string AddSkillPoint(int iSkill); +// This function tells Letoscript to add +1 to all the character's saving throws. +string ModifySaves(); +// This function tells Letoscript to add the specified number of hit points to the character. +string AddHitPoints(int nHP, int nLevel); +// This function tells Letoscript to add the specified feat to the character, treating +// it as if he had gained it on character creation (level 0). This ensures that deleveling +// the character thus will not remove the feat. +string AddFeat(int iFeat = -1); + +//----------------------------------FUNCTIONS---------------------------------// + +//--------------------------FUNCTIONS TAKEN FROM DAR--------------------------// + +string LetoScript(string script) +{ + SetLocalString(GetModule(), "NWNX!LETO!SCRIPT", script); + return GetLocalString(GetModule(), "NWNX!LETO!SCRIPT"); +} + + +string SetDocumentedLevel(int level = 1) { + string script = ""; + if (PHOENIX) + { + if(level > -1) script = ""; + } + else + { + if(level > -1) script = "/Lootable = "+IntToString(level)+";"; + } + return script; +} + +string GetBicFileName(object oPC) +{ + string sChar, sBicName; + string sPCName = GetStringLowerCase(GetName(oPC)); + int i, iNameLength = GetStringLength(sPCName); + + for(i=0; i < iNameLength; i++) { + sChar = GetSubString(sPCName, i, 1); + if (TestStringAgainstPattern("(*a|*n|*w|'|-|_)", sChar)) { + if (sChar != " ") sBicName += sChar; + } + } + return GetStringLeft(sBicName, 16); +} + +//------------------------------FUNCTIONS ADDED-------------------------------// + +void ApplyLetoScriptToPC(string Script, object oPC) +{ + string VaultPath = NWNPATH; + string Player = GetPCPlayerName(oPC); + string BicPath = VaultPath + Player + "/"; + string BicFile; + if (PHOENIX) + { + BicFile = BicPath + GetBicFileName(oPC)+ ".bic"; + Script = ">"+Script+">"; + } + else + { + Script = + "$RealFile = q<" + BicPath + "> + FindNewestBic q<" + BicPath + ">;" + + "$EditFile = $RealFile + '.utc';" + + "FileRename $RealFile, $EditFile;" + + "%bic = $EditFile or die;" + + Script + + "%bic = '>';" + + "close %bic;" + + "FileRename $EditFile, $RealFile;"; + } + SetLocalString(oPC, "LetoScript", Script); + //DelayCommand(3.0f, ActivatePortal(oPC, "62.167.237.11:5122", "", "",TRUE)); + DelayCommand(3.0f, BootPC(oPC)); + //DelayCommand(3.0f, ActivatePortal(oPC, "64.137.237.115:5121", "", "", TRUE)); +} + +string AddStatPoint(int nStat) +{ +string sReturn; +switch (nStat) + { + case ABILITY_STRENGTH: sReturn = "Str"; break; + case ABILITY_DEXTERITY: sReturn = "Dex"; break; + case ABILITY_CONSTITUTION: sReturn = "Con"; break; + case ABILITY_INTELLIGENCE: sReturn = "Int"; break; + case ABILITY_WISDOM: sReturn = "Wis"; break; + case ABILITY_CHARISMA: sReturn = "Cha"; break; + default: return ""; + } + if (PHOENIX) + { + return "+1)}>"; + } + else + { + return "/"+sReturn+" = /"+sReturn+" + 1;"; + } +} + +string AddSkillPoint(int iSkill) +{ + string sSkill = IntToString(iSkill); + if (PHOENIX) + { + return + "+1)}>"+ + "+1)}>"; + } + else + { + return + "/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +1; "+ + "/LvlStatList/[0]/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +1; "; + } +} + +string ModifySaves() +{ + string sLeto; + if (PHOENIX) + { + sLeto = "+1}>" + + "+1}>" + + "+1}>"; + } + else + { + sLeto = "/fortbonus = /fortbonus +1; /refbonus = /refbonus +1; /willbonus = /willbonus +1; "; + } + return sLeto; +} + +string AddHitPoints(int nHP, int nLevel) +{ +int nLvlHPAddedAt; +string sLeto; +string sLvl; +string sHP = IntToString(nHP); +if (nLevel < 41) + { + nLvlHPAddedAt = 0;//we add the hp at a different level each level so that the 255 field limit is never reached - if it was, it would roll over, causing the loss of 255 hps + } +else + { + nLvlHPAddedAt = nLevel - 40; + } +sLvl = IntToString(nLvlHPAddedAt); +if (PHOENIX) + { + sLeto = "+" + sHP + "}>" + + "+" + sHP + "}>" + + "+" + sHP + "}>" + + "+" + sHP + "}>" + + "+" + sHP + "}>"; + } +else + { + sLeto = "/HitPoints = /HitPoints + " + sHP + "; "; + sLeto += "/LvlStatList/[" + IntToString(nLvlHPAddedAt) + "]/LvlStatHitDie = /LvlStatList/[" + IntToString(nLvlHPAddedAt) + "]/LvlStatHitDie + " + sHP + "; "; + sLeto += "/MaxHitPoints = /MaxHitPoints + " + sHP + "; "; + sLeto += "/CurrentHitPoints = /CurrentHitPoints + " + sHP + "; "; + sLeto += "/PregameCurrent = /PregameCurrent + " + sHP + "; "; + } +return sLeto; +} + +string AddFeat(int iFeat = -1) +{ + string sLeto; + string sEnd; + if(iFeat < 0) return ""; + if(iFeat > 763 && iFeat < 824)//Greater Ability Feats + { + if(iFeat <= 773)//CHA + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Cha = /Cha + 1;"; + } + } + else if(iFeat <= 783)//CON + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Con = /Con + 1;"; + } + } + else if(iFeat <= 793)//DEX + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Dex = /Dex + 1;"; + } + } + else if(iFeat <= 803)//INT + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Int = /Int + 1;"; + } + } + else if(iFeat <= 813)//WIS + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Wis = /Wis + 1;"; + } + } + else // <= 823 STR + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Str = /Str + 1;"; + } + } + } + else + { + sLeto = ""; + } + if (PHOENIX) + { + sEnd = "" + + ""; + } + else + { + sEnd = "add /FeatList/Feat, type => gffWord, value => " + IntToString(iFeat) + ";" + + "add /LvlStatList/[0]/FeatList/Feat, type => gffWord, value => " + IntToString(iFeat) + ";"; + } + return sLeto + sEnd; + +} +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_module/_removed files/hgll_spells_inc.nss b/_module/_removed files/hgll_spells_inc.nss new file mode 100644 index 00000000..0f40c236 --- /dev/null +++ b/_module/_removed files/hgll_spells_inc.nss @@ -0,0 +1,808 @@ +//Returns the level of the input bard spell. Returns -1 if the input is not a bard spell. +int GetBardSpellLevel(int nSpell); +//Returns the level of the input sorcerer spell. Returns -1 if the input is not a sorcerer spell. +int GetSorcSpellLevel(int nSpell); +//This returns the name of any input sorcerer or bard spell. +string GetSpellName(int nSpell); + +int GetBardSpellLevel(int nSpell) +{ +int nResult = -1; //Defaults to not a Bard Spell + switch (nSpell/150) + { + case 0://0-149 + switch (nSpell/25) + { + case 0://0-24 + switch(nSpell) + { + case 4: nResult=3; break; + case 8: nResult=2; break; + case 9: nResult=2; break; + case 13: nResult=2; break; + case 15: nResult=3; break; + case 16: nResult=1; break; + case 20: nResult=3; break; + case 21: nResult=2; break; + } + break; + case 1://25-49 + switch(nSpell) + { + case 26: nResult=3; break; + case 31: nResult=4; break; + case 32: nResult=1; break; + case 33: nResult=0; break; + case 34: nResult=2; break; + case 35: nResult=3; break; + case 36: nResult=2; break; + case 37: nResult=0; break; + case 40: nResult=4; break; + case 41: nResult=3; break; + case 45: nResult=4; break; + } + break; + case 2://50-74 + switch(nSpell) + { + case 54: nResult=3; break; + case 66: nResult=1; break; + case 67: nResult=5; break; + } + break; + case 3://75-99 + switch(nSpell) + { + case 75: nResult=3; break; + case 78: nResult=3; break; + case 80: nResult=5; break; + case 82: nResult=4; break; + case 83: nResult=2; break; + case 86: nResult=1; break; + case 88: nResult=4; break; + case 90: nResult=2; break; + case 92: nResult=3; break; + case 94: nResult=1; break; + } + break; + case 4://100-124 + switch(nSpell) + { + case 100: nResult=0; break; + case 102: nResult=1; break; + case 113: nResult=6; break; + case 118: nResult=5; break; + case 120: nResult=2; break; + case 121: nResult=5; break; + } + break; + case 5://125-149 + switch(nSpell) + { + case 126: nResult=4; break; + case 146: nResult=3; break; + case 147: nResult=3; break; + } + break; + } + break; + case 1://150-299 + switch (nSpell/25) + { + case 6://150-174 + switch (nSpell) + { + case 151: nResult=0; break; + case 155: nResult=1; break; + case 157: nResult=2; break; + case 163: nResult=2; break; + case 165: nResult=1; break; + case 166: nResult=3; break; + case 167: nResult=2; break; + case 174: nResult=1; break; + } + break; + case 7://175-199 + switch (nSpell) + { + case 175: nResult=2; break; + case 176: nResult=3; break; + case 177: nResult=4; break; + case 179: nResult=5; break; + case 180: nResult=6; break; + } + break; + + } + break; + case 2://300-449 + switch (nSpell/25) + { + case 12://300-324 + switch (nSpell) + { + case 321: nResult=1; break; + case 322: nResult=3; break; + } + break; + case 14://350-374 + switch (nSpell) + { + case 354: nResult=2; break; + case 355: nResult=2; break; + case 356: nResult=2; break; + case 365: nResult=2; break; + case 368: nResult=6; break; + case 369: nResult=6; break; + case 373: nResult=4; break; + } + break; + case 15://375-399 + switch (nSpell) + { + case 376: nResult=4; break; + case 377: nResult=3; break; + } + break; + case 16://400-424 + switch (nSpell) + { + case 416: nResult=0; break; + } + break; + case 17://425-449 + switch (nSpell) + { + case 436: nResult=1; break; + case 442: nResult=1; break; + case 445: nResult=6; break; + } + break; + } + break; + case 3://450-569 + switch (nSpell/25) + { + case 18://450-474 + switch (nSpell) + { + case 456: nResult=1; break; + case 457: nResult=2; break; + case 458: nResult=3; break; + } + break; + + case 21://525-549 + switch (nSpell) + { + case 539: nResult=3; break; + case 544: nResult=1; break; + case 545: nResult=3; break; + } + break; + case 22://550-569 + switch (nSpell) + { + case 569: nResult=2; break; + } + break; + } + break; + } + +return nResult; +} + +int GetSorcSpellLevel(int nSpell) +{ +int nResult=-1;//Defaults to not a sorcerer spell + switch (nSpell/150) + { + case 0://0-149 + switch (nSpell/25) + { + case 0://0-24 + switch (nSpell) + { + case 0: nResult=6; break; + case 2: nResult=5; break; + case 4: nResult=4; break; + case 8: nResult=2; break; + case 9: nResult=2; break; + case 10: nResult=1; break; + case 13: nResult=2; break; + case 14: nResult=6; break; + case 15: nResult=4; break; + case 16: nResult=1; break; + case 18: nResult=6; break; + case 20: nResult=3; break; + case 21: nResult=3; break; + case 23: nResult=5; break; + case 24: nResult=1; break; + } + break; + case 1://25-49 + switch (nSpell) + { + case 25: nResult=5; break; + case 26: nResult=4; break; + case 27: nResult=4; break; + case 28: nResult=7; break; + case 30: nResult=8; break; + case 36: nResult=2; break; + case 37: nResult=0; break; + case 39: nResult=7; break; + case 40: nResult=5; break; + case 41: nResult=3; break; + case 44: nResult=9; break; + case 45: nResult=5; break; + case 47: nResult=4; break; + case 49: nResult=2; break; + } + break; + case 2://50-74 + switch (nSpell) + { + case 50: nResult=1; break; + case 51: nResult=9; break; + case 52: nResult=4; break; + case 54: nResult=4; break; + case 55: nResult=5; break; + case 56: nResult=7; break; + case 58: nResult=3; break; + case 59: nResult=3; break; + case 63: nResult=9; break; + case 64: nResult=2; break; + case 65: nResult=6; break; + case 66: nResult=1; break; + case 67: nResult=6; break; + case 69: nResult=8; break; + case 71: nResult=5; break; + case 72: nResult=6; break; + case 73: nResult=9; break; + case 74: nResult=6; break; + } + break; + case 3://75-99 + switch (nSpell) + { + case 75: nResult=3; break; + case 78: nResult=3; break; + case 82: nResult=5; break; + case 83: nResult=3; break; + case 86: nResult=1; break; + case 88: nResult=4; break; + case 89: nResult=8; break; + case 90: nResult=2; break; + case 92: nResult=3; break; + case 93: nResult=2; break; + case 94: nResult=2; break; + case 95: nResult=5; break; + case 96: nResult=5; break; + case 98: nResult=4; break; + case 99: nResult=5; break; + } + break; + case 4://100-124 + switch (nSpell) + { + case 100: nResult=0; break; + case 101: nResult=3; break; + case 102: nResult=1; break; + case 107: nResult=1; break; + case 110: nResult=8; break; + case 111: nResult=8; break; + case 113: nResult=6; break; + case 115: nResult=2; break; + case 116: nResult=9; break; + case 117: nResult=8; break; + case 118: nResult=5; break; + case 119: nResult=4; break; + case 120: nResult=2; break; + case 121: nResult=6; break; + case 122: nResult=9; break; + case 123: nResult=7; break; + } + break; + case 5://125-149 + switch (nSpell) + { + case 127: nResult=4; break; + case 128: nResult=6; break; + case 130: nResult=4; break; + case 131: nResult=9; break; + case 132: nResult=7; break; + case 134: nResult=8; break; + case 135: nResult=7; break; + case 137: nResult=3; break; + case 141: nResult=7; break; + case 143: nResult=1; break; + case 144: nResult=0; break; + case 145: nResult=4; break; + case 146: nResult=4; break; + } + break; + } + break; + case 1://150-299 + switch (nSpell/25) + { + case 6://150-174 + switch (nSpell) + { + case 150: nResult=2; break; + case 151: nResult=0; break; + case 155: nResult=1; break; + case 157: nResult=2; break; + case 158: nResult=6; break; + case 159: nResult=4; break; + case 160: nResult=7; break; + case 161: nResult=9; break; + case 165: nResult=1; break; + case 166: nResult=3; break; + case 169: nResult=7; break; + case 171: nResult=3; break; + case 172: nResult=4; break; + case 174: nResult=1; break; + } + break; + case 7://175-199 + switch (nSpell) + { + case 175: nResult=2; break; + case 176: nResult=3; break; + case 177: nResult=4; break; + case 178: nResult=9; break; + case 179: nResult=5; break; + case 180: nResult=6; break; + case 181: nResult=7; break; + case 182: nResult=8; break; + case 184: nResult=6; break; + case 185: nResult=9; break; + case 186: nResult=6; break; + case 188: nResult=3; break; + case 190: nResult=9; break; + case 191: nResult=4; break; + case 192: nResult=2; break; + case 193: nResult=9; break; + } + break; + } + break; + case 2://300-449 + switch (nSpell/25) + { + case 12://300-324 + switch (nSpell) + { + case 321: nResult=1; break; + case 322: nResult=3; break; + } + break; + case 14://350-374 + switch (nSpell) + { + case 354: nResult=2; break; + case 355: nResult=2; break; + case 356: nResult=2; break; + case 365: nResult=2; break; + case 367: nResult=8; break; + case 368: nResult=4; break; + case 369: nResult=5; break; + case 370: nResult=3; break; + case 371: nResult=1; break; + } + break; + case 15://375-399 + switch (nSpell) + { + case 375: nResult=4; break; + case 376: nResult=6; break; + case 377: nResult=3; break; + } + break; + case 16://400-424 + switch (nSpell) + { + case 415: nResult=1; break; + case 416: nResult=0; break; + case 417: nResult=1; break; + case 419: nResult=2; break; + case 424: nResult=0; break; + } + break; + case 17://425-449 + switch (nSpell) + { + case 427: nResult=8; break; + case 430: nResult=7; break; + case 436: nResult=2; break; + case 439: nResult=0; break; + case 440: nResult=5; break; + case 443: nResult=8; break; + case 447: nResult=1; break; + case 448: nResult=6; break; + } + break; + } + break; + case 3://450-569 + switch (nSpell/25) + { + case 18://450-474 + switch (nSpell) + { + case 456: nResult=1; break; + case 457: nResult=2; break; + case 458: nResult=3; break; + case 459: nResult=5; break; + case 460: nResult=6; break; + case 461: nResult=7; break; + case 462: nResult=8; break; + case 463: nResult=9; break; + } + break; + case 19://475-499 + switch (nSpell) + { + case 485: nResult=6; break; + case 486: nResult=6; break; + } + break; + case 20://500-524 + switch (nSpell) + { + case 515: nResult=7; break; + case 516: nResult=5; break; + case 518: nResult=2; break; + case 519: nResult=2; break; + case 520: nResult=2; break; + case 521: nResult=1; break; + case 522: nResult=1; break; + case 523: nResult=3; break; + case 524: nResult=5; break; + } + break; + case 21://525-549 + switch (nSpell) + { + case 526: nResult=3; break; + case 527: nResult=2; break; + case 528: nResult=6; break; + case 533: nResult=9; break; + case 534: nResult=1; break; + case 539: nResult=3; break; + case 541: nResult=8; break; + case 542: nResult=2; break; + case 543: nResult=1; break; + case 544: nResult=1; break; + case 545: nResult=3; break; + } + break; + case 22://550-569 + switch (nSpell) + { + case 569: nResult=2; break; + } + break; + } + break; + } +return nResult; +} + +string GetSpellName(int nSpell) +{ +string sResult = ""; + + switch (nSpell/150) + { + case 0://0-149 + switch (nSpell/25) + { + case 0://0-24 + switch (nSpell) + { + case 0: sResult = "Acid Fog"; break; + case 2: sResult = "Animate Dead"; break; + case 4: sResult = "Bestow Curse"; break; + case 8: sResult = "Blindness and Deafness"; break; + case 9: sResult = "Bull's Strength"; break; + case 10: sResult = "Burning Hands"; break; + case 13: sResult = "Cat's Grace"; break; + case 14: sResult = "Chain Lightning"; break; + case 15: sResult = "Charm Monster"; break; + case 16: sResult = "Charm Person"; break; + case 18: sResult = "Circle of Death"; break; + case 20: sResult = "Clairaudience and Clairvoyance"; break; + case 21: sResult = "Clarity"; break; + case 23: sResult = "Cloudkill"; break; + case 24: sResult = "Color Spray"; break; + } + break; + case 1://25-49 + switch (nSpell) + { + case 25: sResult = "Cone of Cold"; break; + case 26: sResult = "Confusion"; break; + case 27: sResult = "Contagion"; break; + case 28: sResult = "Control Undead"; break; + case 30: sResult = "Create Undead"; break; + case 31: sResult = "Cure Critical Wounds"; break; + case 32: sResult = "Cure Light Wounds"; break; + case 33: sResult = "Cure Minor Wounds"; break; + case 34: sResult = "Cure Moderate Wounds"; break; + case 35: sResult = "Cure Serious Wounds"; break; + case 36: sResult = "Darkness"; break; + case 37: sResult = "Daze"; break; + case 39: sResult = "Delayed Blast Fireball"; break; + case 40: sResult = "Dismissal"; break; + case 41: sResult = "Dispel Magic"; break; + case 44: sResult = "Dominate Monster"; break; + case 45: sResult = "Dominate Person"; break; + case 47: sResult = "Elemental Shield"; break; + case 49: sResult = "Endurance"; break; + } + break; + case 2://50-74 + switch (nSpell) + { + case 50: sResult = "Endure Elements"; break; + case 51: sResult = "Energy Drain"; break; + case 52: sResult = "Enervation"; break; + case 54: sResult = "Fear"; break; + case 55: sResult = "Feeblemind"; break; + case 56: sResult = "Finger of Death"; break; + case 58: sResult = "Fireball"; break; + case 59: sResult = "Flame Arrow"; break; + case 63: sResult = "Gate"; break; + case 64: sResult = "Ghoul Touch"; break; + case 65: sResult = "Globe of Invulnerability"; break; + case 66: sResult = "Grease"; break; + case 67: sResult = "Greater Dispelling"; break; + case 69: sResult = "Greater Planar Binding"; break; + case 71: sResult = "Greater Shadow Conjuration"; break; + case 72: sResult = "Greater Spell Breach"; break; + case 73: sResult = "Greater Spell Mantle"; break; + case 74: sResult = "Greater Stoneskin"; break; + } + break; + case 3://75-99 + switch (nSpell) + { + case 75: sResult = "Gust of Wind"; break; + case 78: sResult = "Haste"; break; + case 80: sResult = "Healing Circle"; break; + case 82: sResult = "Hold Monster"; break; + case 83: sResult = "Hold Person"; break; + case 86: sResult = "Identify"; break; + case 88: sResult = "Improved Invisibility"; break; + case 89: sResult = "Incendiary Cloud"; break; + case 90: sResult = "Invisibility"; break; + case 92: sResult = "Invisibility Sphere"; break; + case 93: sResult = "Knock"; break; + case 94: sResult = "Lesser Dispel"; break; + case 95: sResult = "Lesser Mind Blank"; break; + case 96: sResult = "Lesser Planar Binding"; break; + case 97: sResult = "Lesser Restoration"; break; + case 98: sResult = "Lesser Spell Breach"; break; + case 99: sResult = "Lesser Spell Mantle"; break; + } + break; + case 4://100-124 + switch (nSpell) + { + case 100: sResult = "Light"; break; + case 101: sResult = "Lightning Bolt"; break; + case 102: sResult = "Mage Armor"; break; + case 107: sResult = "Magic Missle"; break; + case 110: sResult = "Mass Blindness and Deafness"; break; + case 111: sResult = "Mass Charm"; break; + case 113: sResult = "Mass Haste"; break; + case 115: sResult = "Melf's Acid Arrow"; break; + case 116: sResult = "Meteor Swarm"; break; + case 117: sResult = "Mind Blank"; break; + case 118: sResult = "Mind Fog"; break; + case 119: sResult = "Minor Globe of Invulnerability"; break; + case 120: sResult = "Ghostly Visage"; break; + case 121: sResult = "Ethereal Visage"; break; + case 122: sResult = "Mordenkainen's Disjunction"; break; + case 123: sResult = "Mordenkainen's Sword"; break; + } + break; + case 5://125-149 + switch (nSpell) + { + case 126: sResult = "Neutralize Poison"; break; + case 127: sResult = "Phantasmal Killer"; break; + case 128: sResult = "Planar Binding"; break; + case 130: sResult = "Polymorph Self"; break; + case 131: sResult = "Power Word Kill"; break; + case 132: sResult = "Power Word Stun"; break; + case 134: sResult = "Premonition"; break; + case 135: sResult = "Premonition"; break; + case 137: sResult = "Protection from Elements"; break; + case 141: sResult = "Protection from Spells"; break; + case 143: sResult = "Ray of Enfeeblement"; break; + case 144: sResult = "Ray of Frost"; break; + case 145: sResult = "Remove Blindness and Deafness"; break; + case 146: sResult = "Remove Curse"; break; + case 147: sResult = "Remove Disease"; break; + } + break; + } + break; + case 1://150-299 + switch (nSpell/25) + { + case 6://150-174 + switch (nSpell) + { + case 150: sResult = "Resist Elements"; break; + case 151: sResult = "Resistance"; break; + case 155: sResult = "Scare"; break; + case 157: sResult = "See Invisibility"; break; + case 158: sResult = "Shades"; break; + case 159: sResult = "Shadow Conjuration"; break; + case 160: sResult = "Shadow Shield"; break; + case 161: sResult = "Shapechange"; break; + case 163: sResult = "Silence"; break; + case 165: sResult = "Sleep"; break; + case 166: sResult = "Slow"; break; + case 167: sResult = "Sound Burst"; break; + case 169: sResult = "Spell Mantle"; break; + case 171: sResult = "Stinking Cloud"; break; + case 172: sResult = "Stoneskin"; break; + case 174: sResult = "Summon Creature I"; break; + } + break; + case 7://175-199 + switch (nSpell) + { + case 175: sResult = "Summon Creature II"; break; + case 176: sResult = "Summon Creature III"; break; + case 177: sResult = "Summon Creature IV"; break; + case 178: sResult = "Summon Creature IX"; break; + case 179: sResult = "Summon Creature V"; break; + case 180: sResult = "Summon Creature VI"; break; + case 181: sResult = "Summon Creature VII"; break; + case 182: sResult = "Summon Creature VIII"; break; + case 184: sResult = "Tenser's Transformation"; break; + case 185: sResult = "Timestop"; break; + case 186: sResult = "True Seeing"; break; + case 188: sResult = "Vampric Touch"; break; + case 190: sResult = "Wail of the Banshee"; break; + case 191: sResult = "Wall of Fire"; break; + case 192: sResult = "Web"; break; + case 193: sResult = "Weird"; break; + } + break; + + } + break; + case 2://300-449 + switch (nSpell/25) + { + case 12://300-324 + switch (nSpell) + { + case 321: sResult = "Protection from Alignment"; break; + case 322: sResult = "Magic Circle Against Alignment"; break; + } + break; + case 14://350-374 + switch (nSpell) + { + case 354: sResult = "Eagle's Splendor"; break; + case 355: sResult = "Owl's Wisdom"; break; + case 356: sResult = "Fox's Cunning"; break; + case 365: sResult = "Ultravision"; break; + case 367: sResult = "Horrid Wilting"; break; + case 368: sResult = "Ice Storm"; break; + case 369: sResult = "Energy Buffer"; break; + case 370: sResult = "Negative Energy Burst"; break; + case 371: sResult = "Negative Energy Ray"; break; + case 373: sResult = "War Cry"; break; + } + break; + case 15://375-399 + switch (nSpell) + { + case 376: sResult = "Legend Lore"; break; + case 377: sResult = "Find Traps"; break; + } + break; + case 16://400-424 + switch (nSpell) + { + case 415: sResult = "True Strike"; break; + case 416: sResult = "Flare"; break; + case 417: sResult = "Shield"; break; + case 419: sResult = "Continual Flame"; break; + case 424: sResult = "Acid Splash"; break; + } + break; + case 17://425-449 + switch (nSpell) + { + case 427: sResult = "Sunburst"; break; + case 430: sResult = "Banishment"; break; + case 436: sResult = "Balagarn's Iron Horn"; break; + case 439: sResult = "Electric Jolt"; break; + case 440: sResult = "Firebrand"; break; + case 441: sResult = "Wounding Whispers"; break; + case 442: sResult = "Amplify"; break; + case 443: sResult = "Greater Sanctuary"; break; + case 445: sResult = "Dirge"; break; + case 447: sResult = "Isaac's Lesser Missle Storm"; break; + case 448: sResult = "Isaac's Greater Missle Storm"; break; + } + break; + } + break; + case 3://450-569 + switch (nSpell/25) + { + case 18://450-474 + switch (nSpell) + { + case 456: sResult = "Expeditious Retreat"; break; + case 457: sResult = "Tasha's Hideous Laughter"; break; + case 458: sResult = "Displacement"; break; + case 459: sResult = "Bigby's Interposing Hand"; break; + case 460: sResult = "Bigby's Forceful Hand"; break; + case 461: sResult = "Bigby's Grasping Hand"; break; + case 462: sResult = "Bigby's Clenched Fist"; break; + case 463: sResult = "Bigby's Crushing Hand"; break; + } + break; + case 19://475-499 + switch (nSpell) + { + case 485: sResult = "Flesh to Stone"; break; + case 486: sResult = "Stone to Flesh"; break; + } + break; + case 20://500-524 + switch (nSpell) + { + case 515: sResult = "Great Thunderclap"; break; + case 516: sResult = "Ball Lightning"; break; + case 518: sResult = "Combust"; break; + case 519: sResult = "Death Armor"; break; + case 520: sResult = "Gedlee's Electric Loop"; break; + case 521: sResult = "Horizikaul's Boom"; break; + case 522: sResult = "Ironguts"; break; + case 523: sResult = "Mestil's Acid Breath"; break; + case 524: sResult = "Mestil's Acid Sheath"; break; + } + break; + case 21://525-549 + switch (nSpell) + { + case 526: sResult = "Scintillating Sphere"; break; + case 527: sResult = "Stone Bones"; break; + case 528: sResult = "Undeath to Death"; break; + case 533: sResult = "Black Blade of Disaster"; break; + case 534: sResult = "Shelgarn's Persistent Blade"; break; + case 539: sResult = "Keen Edge"; break; + case 541: sResult = "Blackstaff"; break; + case 542: sResult = "Flame Weapon"; break; + case 543: sResult = "Ice Dagger"; break; + case 544: sResult = "Magic Weapon"; break; + case 545: sResult = "Greater Magic Weapon"; break; + } + break; + case 22://550-569 + switch (nSpell) + { + case 569: sResult = "Cloud of Bewilderment"; break; + } + break; + } + break; + } +return sResult; +} + +//void main(){} diff --git a/_module/_removed files/hgll_struct_stat.nss b/_module/_removed files/hgll_struct_stat.nss new file mode 100644 index 00000000..be0df5e4 --- /dev/null +++ b/_module/_removed files/hgll_struct_stat.nss @@ -0,0 +1,39 @@ +// Original script taken from post by CID-78 in the Bioware scripting forums. +// Modified to return 'base' skills as well, though they must be passed through +// another filter for feats and stat bonuses after this function. +struct xAbility +{ + int nSTR; //stats in 2da order + int nDEX; + int nCON; + int nINT; + int nWIS; + int nCHA; + int nANIMAL_EMPATHY;//skills in 2da order + int nCONCENTRATION; + int nDISABLE_TRAP; + int nDISCIPLINE; + int nHEAL; + int nHIDE; + int nLISTEN; + int nLORE; + int nMOVE_SILENTLY; + int nOPEN_LOCK; + int nPARRY; + int nPERFORM; + int nPERSUADE; + int nPICK_POCKET; + int nSEARCH; + int nSET_TRAP; + int nSPELLCRAFT; + int nSPOT; + int nTAUNT; + int nUSE_MAGIC_DEVICE; + int nAPPRAISE; + int nTUMBLE; + int nCRAFT_TRAP; + int nBLUFF; + int nINTIMIDATE; + int nCRAFT_ARMOR; + int nCRAFT_WEAPON; +}; diff --git a/_module/_removed files/nw_s0_acidfoga.nss b/_module/_removed files/nw_s0_acidfoga.nss new file mode 100644 index 00000000..2f5a9fbc --- /dev/null +++ b/_module/_removed files/nw_s0_acidfoga.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Acid Fog: On Enter +//:: NW_S0_AcidFogA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All creatures within the AoE take 2d6 acid damage + per round and upon entering if they fail a Fort Save + their movement is halved. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eSlow = EffectMovementSpeedDecrease(50); + object oTarget = GetEnteringObject(); + float fDelay = GetRandomDelay(1.0, 2.2); + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG)); + //Spell resistance check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + //Roll Damage + //Enter Metamagic conditions + nDamage = d8(5); + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 40;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Make a Fortitude Save to avoid the effects of the movement hit. + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay)) + { + //slowing effect + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oTarget); + // * BK: Removed this because it reduced damage, didn't make sense nDamage = d6(); + } + + //Set Damage Effect with the modified damage + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + //Apply damage and visuals + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } + } +} diff --git a/_module/_removed files/nw_s0_acidfogc.nss b/_module/_removed files/nw_s0_acidfogc.nss new file mode 100644 index 00000000..b945bf4d --- /dev/null +++ b/_module/_removed files/nw_s0_acidfogc.nss @@ -0,0 +1,79 @@ +//:://///////////////////////////////////////////// +//:: Acid Fog: Heartbeat +//:: NW_S0_AcidFogC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All creatures within the AoE take 2d6 acid damage + per round and upon entering if they fail a Fort Save + their movement is halved. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage = d8(3); + effect eDam; + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + object oTarget; + float fDelay; + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 24;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + //Start cycling through the AOE Object for viable targets including doors and placable objects. + oTarget = GetFirstInPersistentObject(OBJECT_SELF); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay)) + { + nDamage = d6(); + } + fDelay = GetRandomDelay(0.4, 1.2); + //Fire cast spell at event for the affected target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG)); + //Spell resistance check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + //Apply damage and visuals + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target. + oTarget = GetNextInPersistentObject(OBJECT_SELF); + } +} diff --git a/_module/_removed files/nw_s0_bescurse.nss b/_module/_removed files/nw_s0_bescurse.nss new file mode 100644 index 00000000..ebfe86e4 --- /dev/null +++ b/_module/_removed files/nw_s0_bescurse.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Bestow Curse +//:: NW_S0_BesCurse.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Afflicted creature must save or suffer a -2 penalty + to all ability scores. This is a supernatural effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Bob McCabe +//:: Created On: March 6, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk +//:: VFX Pass By: Preston W, On: June 20, 2001 +//:: Update Pass By: Preston W, On: July 20, 2001 + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + effect eCurse = EffectCurse(4, 4, 4, 4, 4, 4); + + //Make sure that curse is of type supernatural not magical + eCurse = SupernaturalEffect(eCurse); + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Signal spell cast at event + SignalEvent(oTarget, EventSpellCastAt(oTarget, SPELL_BESTOW_CURSE)); + //Make SR Check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make Will Save + if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC())) + { + //Apply Effect and VFX + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} diff --git a/_module/_removed files/nw_s0_bladebara.nss b/_module/_removed files/nw_s0_bladebara.nss new file mode 100644 index 00000000..512af426 --- /dev/null +++ b/_module/_removed files/nw_s0_bladebara.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Blade Barrier: On Enter +//:: NW_S0_BladeBarA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates a wall 10m long and 2m thick of whirling + blades that hack and slice anything moving into + them. Anything caught in the blades takes + 2d6 per caster level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: July 20, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + object oTarget = GetEnteringObject(); + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); + int nMetaMagic = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(GetAreaOfEffectCreator()); + + //Make level check + if (nLevel > 25) + { + nLevel = 25; + } + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire spell cast at event + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_BLADE_BARRIER)); + //Roll Damage + int nDamage = d6(nLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = nLevel * 6;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Make SR Check + if (!MyResistSpell(GetAreaOfEffectCreator(), oTarget) ) + { + if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC())) + { + nDamage = nDamage/2; + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING); + //Apply damage and VFX + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} + diff --git a/_module/_removed files/nw_s0_bladebarc.nss b/_module/_removed files/nw_s0_bladebarc.nss new file mode 100644 index 00000000..cd5073b7 --- /dev/null +++ b/_module/_removed files/nw_s0_bladebarc.nss @@ -0,0 +1,82 @@ +//:://///////////////////////////////////////////// +//:: Blade Barrier: Heartbeat +//:: NW_S0_BladeBarA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates a wall 10m long and 2m thick of whirling + blades that hack and slice anything moving into + them. Anything caught in the blades takes + 2d6 per caster level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: July 20, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + object oTarget; + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); + int nMetaMagic = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(GetAreaOfEffectCreator()); + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // Add damage to placeables/doors now that the command support bit fields + //-------------------------------------------------------------------------- + oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR); + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire spell cast at event + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_BLADE_BARRIER)); + //Make SR Check + if (!MyResistSpell(GetAreaOfEffectCreator(), oTarget) ) + { + //Roll Damage + int nDamage = d6(nLevel); + //Enter Metamagic conditions + if(nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = nLevel * 6;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC())) + { + nDamage = nDamage/2; + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING); + //Apply damage and VFX + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR); + } +} + diff --git a/_module/_removed files/nw_s0_calllghtn.nss b/_module/_removed files/nw_s0_calllghtn.nss new file mode 100644 index 00000000..99f21ff5 --- /dev/null +++ b/_module/_removed files/nw_s0_calllghtn.nss @@ -0,0 +1,98 @@ +//:://///////////////////////////////////////////// +//:: Call Lightning +//:: NW_S0_CallLghtn.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spells smites an area around the caster + with bolts of lightning which strike all enemies. + Bolts do 1d10 per level up 10d10 +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 20, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 20) + { + nCasterLvl = 20; + } + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CALL_LIGHTNING)); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetRandomDelay(0.4, 1.75); + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_module/_removed files/nw_s0_chlightn.nss b/_module/_removed files/nw_s0_chlightn.nss new file mode 100644 index 00000000..bb48393e --- /dev/null +++ b/_module/_removed files/nw_s0_chlightn.nss @@ -0,0 +1,186 @@ +//:://///////////////////////////////////////////// +//:: Chain Lightning +//:: NW_S0_ChLightn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The primary target is struck with 1d6 per caster, + 1/2 with a reflex save. 1 secondary target per + level is struck for 1d6 / 2 caster levels. No + repeat targets can be chosen. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brennon Holmes +//:: Created On: March 8, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 26, 2001 +//:: Update Pass By: Preston W, On: July 26, 2001 + +/* +bugfix by Kovi 2002.07.28 +- successful saving throw and (improved) evasion was ignored for + secondary targets, +- all secondary targets suffered exactly the same damage +2002.08.25 +- primary target was not effected +*/ + +#include "x0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + + //Limit caster level + // June 2/04 - Bugfix: Cap the level BEFORE the damage calculation, not after. Doh. + if (nCasterLevel > 20) + { + nCasterLevel = 20; + } + int nDamage = d6(nCasterLevel); + int nDamStrike; + int nNumAffected = 0; + int nMetaMagic = GetMetaMagicFeat(); + //Declare lightning effect connected the casters hands + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eDamage; + object oFirstTarget = GetSpellTargetObject(); + object oHolder; + object oTarget; + location lSpellLocation; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/is +50% + } + //Damage the initial target + if (spellsIsTarget(oFirstTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oFirstTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING)); + //Make an SR Check + if (!MyResistSpell(OBJECT_SELF, oFirstTarget)) + { + //Adjust damage via Reflex Save or Evasion or Improved Evasion + nDamStrike = GetReflexAdjustedDamage(nDamage, oFirstTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Set the damage effect for the first target + eDamage = EffectDamage(nDamStrike, DAMAGE_TYPE_ELECTRICAL); + //Apply damage to the first target and the VFX impact. + if(nDamStrike > 0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oFirstTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oFirstTarget); + } + } + } + //Apply the lightning stream effect to the first target, connecting it with the caster + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oFirstTarget,0.5); + + + //Reinitialize the lightning effect so that it travels from the first target to the next target + eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oFirstTarget, BODY_NODE_CHEST); + + + float fDelay = 0.2; + int nCnt = 0; + + + // * + // * Secondary Targets + // * + + + //Get the first target in the spell shape + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while (GetIsObjectValid(oTarget) && nCnt < nCasterLevel) + { + //Make sure the caster's faction is not hit and the first target is not hit + if (oTarget != oFirstTarget && spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + //Connect the new lightning stream to the older target and the new target + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5)); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING)); + //Do an SR check + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + + nDamage = d6(nCasterLevel) ; + + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/is +50% + } + //Adjust damage via Reflex Save or Evasion or Improved Evasion + nDamStrike = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Apply the damage and VFX impact to the current target + eDamage = EffectDamage(nDamStrike /2, DAMAGE_TYPE_ELECTRICAL); + if(nDamStrike > 0) //age > 0) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget)); + } + } + oHolder = oTarget; + + //change the currect holder of the lightning stream to the current target + if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST); + } + else + { + // * April 2003 trying to make sure beams originate correctly + effect eNewLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST); + if(GetIsEffectValid(eNewLightning)) + { + eLightning = eNewLightning; + } + } + + fDelay = fDelay + 0.1f; + } + //Count the number of targets that have been hit. + if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + nCnt++; + } + + // April 2003: Setting the new origin for the beam + // oFirstTarget = oTarget; + + //Get the next target in the shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + } diff --git a/_module/_removed files/nw_s0_conecold.nss b/_module/_removed files/nw_s0_conecold.nss new file mode 100644 index 00000000..c04fa62e --- /dev/null +++ b/_module/_removed files/nw_s0_conecold.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Cone of Cold +//:: NW_S0_ConeCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// Cone of cold creates an area of extreme cold, +// originating at your hand and extending outward +// in a cone. It drains heat, causing 1d6 points of +// cold damage per caster level (maximum 15d6). +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: 10/18/02000 +//::////////////////////////////////////////////// +//:: Last Updated By: Aidan Scanlan On: April 11, 2001 +//:: Update Pass By: Preston W, On: July 25, 2001 + +float SpellDelay (object oTarget, int nShape); + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + + float fDelay; + location lTargetLocation = GetSpellTargetLocation(); + object oTarget; + //Limit Caster level for the purposes of damage. + if (nCasterLevel > 25) + { + nCasterLevel = 25; + } + //Declare the spell shape, size and the location. Capture the first target object in the shape. + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + // March 2003. Removed this as part of the reputation pass + // if((GetSpellId() == 340 && !GetIsFriend(oTarget)) || GetSpellId() == 25) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CONE_OF_COLD)); + //Get the distance between the target and caster to delay the application of effects + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20.0; + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay) && (oTarget != OBJECT_SELF)) + { + //Detemine damage + nDamage = d6(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage according to Reflex Save, Evasion or Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_COLD); + + // Apply effects to the currently selected target. + effect eCold = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + effect eVis = EffectVisualEffect(VFX_IMP_FROST_L); + if(nDamage > 0) + { + //Apply delayed effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCold, oTarget)); + } + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_module/_removed files/nw_s0_crgrund.nss b/_module/_removed files/nw_s0_crgrund.nss new file mode 100644 index 00000000..afb3df79 --- /dev/null +++ b/_module/_removed files/nw_s0_crgrund.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Create Greater Undead +//:: NW_S0_CrGrUnd.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an undead type pegged to the character's + level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + nDuration = 24; + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + //Make metamagic extend check + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Determine undead to summon based on level + if (nCasterLevel <= 15) + { + eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 16) && (nCasterLevel <= 18)) + { + eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 19) && (nCasterLevel <= 24)) + { + eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD); + } + else + { + eSummon = EffectSummonCreature("greatlich02",VFX_FNF_SUMMON_UNDEAD); + } + //Apply summon effect and VFX impact. + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); +} + diff --git a/_module/_removed files/nw_s0_crpdooma.nss b/_module/_removed files/nw_s0_crpdooma.nss new file mode 100644 index 00000000..f20713f9 --- /dev/null +++ b/_module/_removed files/nw_s0_crpdooma.nss @@ -0,0 +1,51 @@ +//:://///////////////////////////////////////////// +//:: Creeping Doom: On Enter +//:: NW_S0_AcidFogA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature caught in the swarm take an initial + damage of 1d20, but there after they take + 1d4 per swarm counter on the AOE. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + + //Declare major variables + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); + object oTarget = GetEnteringObject(); + effect eSpeed = EffectMovementSpeedDecrease(50); + effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eSpeed, eVis2); + + float fDelay; + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM)); + fDelay = GetRandomDelay(1.0, 1.8); + //Spell resistance check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + //Roll Damage + nDamage = d6(4)+ 6; + + //Set Damage Effect with the modified damage + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + //Apply damage and visuals + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } + } +} diff --git a/_module/_removed files/nw_s0_crpdoomc.nss b/_module/_removed files/nw_s0_crpdoomc.nss new file mode 100644 index 00000000..12f3b18a --- /dev/null +++ b/_module/_removed files/nw_s0_crpdoomc.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: Creeping Doom: Heartbeat +//:: NW_S0_CrpDoomC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature caught in the swarm take an initial + damage of 1d20, but there after they take + 1d6 per swarm counter on the AOE. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + + //Declare major variables + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); + object oTarget = GetEnteringObject(); + string sConstant1 = "NW_SPELL_CONSTANT_CREEPING_DOOM1" + ObjectToString(GetAreaOfEffectCreator()); + string sConstant2 = "NW_SPELL_CONSTANT_CREEPING_DOOM2" + ObjectToString(GetAreaOfEffectCreator()); + int nSwarm = GetLocalInt(OBJECT_SELF, sConstant1); + int nDamCount = GetLocalInt(OBJECT_SELF, sConstant2); + float fDelay; + if(nSwarm < 1) + { + nSwarm = 1; + } + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + + //Get first target in spell area + oTarget = GetFirstInPersistentObject(); + while(GetIsObjectValid(oTarget) && nDamCount < 1000) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + fDelay = GetRandomDelay(1.0, 2.2); + //------------------------------------------------------------------ + // According to the book, SR Does not count against creeping doom + //------------------------------------------------------------------ + //Spell resistance check +// if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) +// { + SignalEvent(oTarget,EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM)); + //Roll Damage + nDamage = d6(nSwarm)+ 12; + //Set Damage Effect with the modified damage + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + //Apply damage and visuals + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + nDamCount = nDamCount + nDamage; +// } + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } + if(nDamCount >= 1000) + { + DestroyObject(OBJECT_SELF, 1.0); + } + else + { + nSwarm++; + SetLocalInt(OBJECT_SELF, sConstant1, nSwarm); + SetLocalInt(OBJECT_SELF, sConstant2, nDamCount); + } +} diff --git a/_module/_removed files/nw_s0_crundead.nss b/_module/_removed files/nw_s0_crundead.nss new file mode 100644 index 00000000..d0448a14 --- /dev/null +++ b/_module/_removed files/nw_s0_crundead.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Create Undead +//:: NW_S0_CrUndead.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Spell summons a Ghoul, Shadow, Ghast, Wight or + Wraith +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + nDuration = 24; + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Set the summoned undead to the appropriate template based on the caster level + if (nCasterLevel <= 13) + { + eSummon = EffectSummonCreature("doomknight01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 14) && (nCasterLevel <= 18)) + { + eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 19) && (nCasterLevel <= 25)) + { + eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); // change later + } + else if ((nCasterLevel >= 26)) + { + eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD); + } + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); +} + diff --git a/_module/_removed files/nw_s0_delfirea.nss b/_module/_removed files/nw_s0_delfirea.nss new file mode 100644 index 00000000..8b288074 --- /dev/null +++ b/_module/_removed files/nw_s0_delfirea.nss @@ -0,0 +1,98 @@ +//:://///////////////////////////////////////////// +//:: Delayed Blast Fireball: On Enter +//:: NW_S0_DelFireA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The caster creates a trapped area which detects + the entrance of enemy creatures into 3 m area + around the spell location. When tripped it + causes a fiery explosion that does 1d6 per + caster level up to a max of 20d6 damage. +*/ +//::////////////////////////////////////////////// +//:: Georg: Removed Spellhook, fixed damage cap +//:: Created By: Preston Watamaniuk +//:: Created On: July 27, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" +void main() +{ + + //Declare major variables + object oTarget = GetEnteringObject(); + object oCaster = GetAreaOfEffectCreator(); + location lTarget = GetLocation(OBJECT_SELF); + int nDamage; + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(oCaster); + int nFire = GetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL"); + //Limit caster level + if (nCasterLevel > 30) + { + nCasterLevel = 30; + } + effect eDam; + effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Check the faction of the entering object to make sure the entering object is not in the casters faction + if(nFire == 0) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + SetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL",TRUE); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Cycle through the targets in the explosion area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_DELAYED_BLAST_FIREBALL)); + //Make SR check + if (!MyResistSpell(oCaster, oTarget)) + { + nDamage = d8(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + //Change damage according to Reflex, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); + //Set up the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply VFX impact and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } + else + { + //They will be taking SOMETHING! + nDamage = d8(12); + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + + //Apply VFX impact and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + + } + } + } + //Get next target in the sequence + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + DestroyObject(OBJECT_SELF, 1.0); + } + } +} diff --git a/_module/_removed files/nw_s0_delfirebal.nss b/_module/_removed files/nw_s0_delfirebal.nss new file mode 100644 index 00000000..02a5d66a --- /dev/null +++ b/_module/_removed files/nw_s0_delfirebal.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Delayed Blast Fireball +//:: NW_S0_DelFirebal.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The caster creates a trapped area which detects + the entrance of enemy creatures into 3 m area + around the spell location. When tripped it + causes a fiery explosion that does 1d6 per + caster level up to a max of 20d6 damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: July 27, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables including Area of Effect Object + effect eAOE = EffectAreaOfEffect(AOE_PER_DELAY_BLAST_FIREBALL); + location lTarget = GetSpellTargetLocation(); + int nDuration = GetCasterLevel(OBJECT_SELF); + //Make sure the duration is at least one round + if (nDuration == 0) + { + nDuration = 1; + } + int nMetaMagic = GetMetaMagicFeat(); + //Check Extend metamagic feat. + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2;//Duration is +100% + } + //Create an instance of the AOE Object using the Apply Effect function + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration)); +} + + diff --git a/_module/_removed files/nw_s0_destruc.nss b/_module/_removed files/nw_s0_destruc.nss new file mode 100644 index 00000000..add3a9c9 --- /dev/null +++ b/_module/_removed files/nw_s0_destruc.nss @@ -0,0 +1,82 @@ +//:://///////////////////////////////////////////// +//:: Destruction +//:: NW_S0_Destruc +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The target creature is destroyed if it fails a + Fort save, otherwise it takes 10d6 damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 13, 2001 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + int nCasterLevel = GetCasterLevel(OBJECT_SELF)/2; + effect eSlay = EffectDeath(); + effect eDam; + effect eVis = EffectVisualEffect(234); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DESTRUCTION)); + //Make SR check + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make a saving throw check + //This spell is no longer a Death Effect They make a save or die. + if(!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC())) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget); + } + else + { + nDamage = d8(1) * nCasterLevel; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + //Apply VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_module/_removed files/nw_s0_eleswarm.nss b/_module/_removed files/nw_s0_eleswarm.nss new file mode 100644 index 00000000..c3ae370e --- /dev/null +++ b/_module/_removed files/nw_s0_eleswarm.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Elemental Swarm +//:: NW_S0_EleSwarm.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spell creates a conduit from the caster + to the elemental planes. The first elemental + summoned is a 24 HD Air elemental. Whenever an + elemental dies it is replaced by the next + elemental in the chain Air, Water, Earth, Fire +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: Update Pass By: Preston W, On: July 30, 2001 + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + nDuration = 24; + effect eSummon; + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Check for metamagic duration + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration * 2; //Duration is +100% + } + //Set the summoning effect + // eSummon = EffectSwarm(FALSE, "NW_SW_AIRGREAT", "NW_SW_WATERGREAT","NW_SW_EARTHGREAT","NW_SW_FIREGREAT"); + eSummon = EffectSwarm(TRUE, "airgreat8", "watergreat8", "earthgreat8", "firegreat8"); + //Apply the summon effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSummon, OBJECT_SELF, HoursToSeconds(nDuration)); +} + diff --git a/_module/_removed files/nw_s0_enedrain.nss b/_module/_removed files/nw_s0_enedrain.nss new file mode 100644 index 00000000..d1462c36 --- /dev/null +++ b/_module/_removed files/nw_s0_enedrain.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Energy Drain +//:: NW_S0_EneDrain.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Target loses 2d4 levels. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nDrain = d4(2); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDrain = 8;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDrain = nDrain + (nDrain/2); //Damage/Healing is +50% + } + effect eDrain = EffectNegativeLevel(nDrain); + eDrain = SupernaturalEffect(eDrain); + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERGY_DRAIN)); + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) + { + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} + diff --git a/_module/_removed files/nw_s0_enervat.nss b/_module/_removed files/nw_s0_enervat.nss new file mode 100644 index 00000000..34a17ca0 --- /dev/null +++ b/_module/_removed files/nw_s0_enervat.nss @@ -0,0 +1,79 @@ +//:://///////////////////////////////////////////// +//:: Enervation +//:: NW_S0_Enervat.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Target Loses 1d4 levels for 1 hour per caster + level +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nDrain = d4(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDrain = 4;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDrain = nDrain + (nDrain/2); //Damage/Healing is +50% + } + else if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + effect eDrain = EffectNegativeLevel(nDrain); + effect eLink = EffectLinkEffects(eDrain, eDur); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERVATION)); + //Resist magic check + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} + diff --git a/_module/_removed files/nw_s0_findtrap.nss b/_module/_removed files/nw_s0_findtrap.nss new file mode 100644 index 00000000..bc46da73 --- /dev/null +++ b/_module/_removed files/nw_s0_findtrap.nss @@ -0,0 +1,36 @@ +//:://///////////////////////////////////////////// +//:: Find Traps +//:: NW_S0_FindTrap +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Finds and removes all traps within 30m. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 29, 2001 +//::////////////////////////////////////////////// + +void main() +{ + effect eVis = EffectVisualEffect(VFX_IMP_KNOCK); + int nCnt = 1; + + object oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + + while(GetIsObjectValid(oTrap) && GetDistanceToObject(oTrap) <= 30.0) + { + if(GetIsTrapped(oTrap)) + { + int DC = GetTrapDisarmDC(oTrap); + if (DC <= 30){ + SetTrapDetectedBy(oTrap, OBJECT_SELF); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTrap)); + DelayCommand(2.0, SetTrapDisabled(oTrap)); + } + } + nCnt++; + oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + } +} + diff --git a/_module/_removed files/nw_s0_fingdeath.nss b/_module/_removed files/nw_s0_fingdeath.nss new file mode 100644 index 00000000..88ff52a5 --- /dev/null +++ b/_module/_removed files/nw_s0_fingdeath.nss @@ -0,0 +1,97 @@ +//:://///////////////////////////////////////////// +//:: Finger of Death +//:: NW_S0_FingDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// You can slay any one living creature within range. +// The victim is entitled to a Fortitude saving throw to +// survive the attack. If he succeeds, he instead +// sustains 3d6 points of damage +1 point per caster +// level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Oct 17, 2000 +//::////////////////////////////////////////////// +//:: Updated By: Georg Z, On: Aug 21, 2003 - no longer affects placeables + +#include "x0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_DEATH_L); + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + + if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE,OBJECT_SELF)) + { + //GZ: I still signal this event for scripting purposes, even if a placeable + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FINGER_OF_DEATH)); + if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + + //Make SR check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make Forttude save + if (!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH)) + { + //Apply the death effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + else + { + // Target shouldn't take damage if they are immune to death magic. + + //NOTE: I have made it where they take dmg no matter what! + // if ( GetIsImmune( oTarget, IMMUNITY_TYPE_DEATH) == FALSE ) + // { + //Roll damage(d6 X Caster Level up 40!) + nDamage = d6(1) * nCasterLvl; + //Make metamagic checks + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + //Apply damage effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + // } + } + } + } + } +} diff --git a/_module/_removed files/nw_s0_fireball.nss b/_module/_removed files/nw_s0_fireball.nss new file mode 100644 index 00000000..559a028e --- /dev/null +++ b/_module/_removed files/nw_s0_fireball.nss @@ -0,0 +1,109 @@ +//:://///////////////////////////////////////////// +//:: Fireball +//:: NW_S0_Fireball +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// A fireball is a burst of flame that detonates with +// a low roar and inflicts 1d6 points of damage per +// caster level (maximum of 10d6) to all creatures +// within the area. Unattended objects also take +// damage. The explosion creates almost no pressure. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Oct 18 , 2000 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001 +//:: Last Updated By: AidanScanlan, On: April 11, 2001 +//:: Last Updated By: Preston Watamaniuk, On: May 25, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 15) + { + nCasterLvl = 15; + } + //Apply the fireball explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + if((GetSpellId() == 341) || GetSpellId() == 58) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIREBALL)); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_module/_removed files/nw_s0_firestrm.nss b/_module/_removed files/nw_s0_firestrm.nss new file mode 100644 index 00000000..70a8a1b6 --- /dev/null +++ b/_module/_removed files/nw_s0_firestrm.nss @@ -0,0 +1,104 @@ +//:://///////////////////////////////////////////// +//:: Fire Storm +//:: NW_S0_FireStm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates a zone of destruction around the caster + within which all living creatures are pummeled + with fire. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 11, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 21, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + int nDamage2; + + //Level Capp + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + if(nCasterLevel > 30) + { + nCasterLevel == 30; + } + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eFireStorm = EffectVisualEffect(VFX_FNF_FIRESTORM); + float fDelay; + //Apply Fire and Forget Visual in the area; + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFireStorm, GetLocation(OBJECT_SELF)); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while(GetIsObjectValid(oTarget)) + { + //This spell smites everyone who is more than 2 meters away from the caster. + //if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0) + //{ + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + fDelay = GetRandomDelay(1.5, 2.5); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIRE_STORM)); + //Make SR check, and appropriate saving throw(s). + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll Damage + nDamage = d6(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + //Save versus both holy and fire damage + nDamage2 = nDamage; //No Save for Divine Dmg.. + //GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE); + nDamage = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. For this spell we have used + //both Divine and Fire damage. + effect eDivine = EffectDamage(nDamage2, DAMAGE_TYPE_DIVINE); + effect eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDivine, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //} + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_module/_removed files/nw_s0_flmarrow.nss b/_module/_removed files/nw_s0_flmarrow.nss new file mode 100644 index 00000000..09467c42 --- /dev/null +++ b/_module/_removed files/nw_s0_flmarrow.nss @@ -0,0 +1,99 @@ +//:://///////////////////////////////////////////// +//:: Flame Arrow +//:: NW_S0_FlmArrow +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Fires a stream of fiery arrows at the selected + target that do 4d6 damage per arrow. 1 Arrow + per 4 levels is created. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 20, 2001 +//:: Updated By: Georg Zoeller, Aug 18 2003: Uncapped +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nDamage = 0; + int nMetaMagic = GetMetaMagicFeat(); + int nCnt; + effect eMissile; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + int nMissiles = (nCasterLvl)/4; + + float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); + float fDelay = fDist/(3.0 * log(fDist) + 2.0); + //Limit missiles to five + if(nMissiles == 0) + { + nMissiles = 1; + } + /* Uncapped because PHB does list any cap and we now got epic levels + else if (nMissiles > 5) + { + nMissiles = 5; + }*/ + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FLAME_ARROW)); + //Apply a single damage hit for each missile instead of as a single mass + //Make SR Check + for (nCnt = 1; nCnt <= nMissiles; nCnt++) + { + if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + + //Roll damage + int nDam = d6(3) + 8; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDam = 26;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDam = nDam + nDam/2; //Damage/Healing is +50% + } + nDam = GetReflexAdjustedDamage(nDam, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + //Set damage effect + effect eDam = EffectDamage(nDam, DAMAGE_TYPE_FIRE); + //Apply the MIRV and damage effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget)); + + } + // * May 2003: Make it so the arrow always appears, even if resisted + eMissile = EffectVisualEffect(VFX_IMP_MIRV_FLAME); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget); + } + } +} + diff --git a/_module/_removed files/nw_s0_flmstrike.nss b/_module/_removed files/nw_s0_flmstrike.nss new file mode 100644 index 00000000..0359a17b --- /dev/null +++ b/_module/_removed files/nw_s0_flmstrike.nss @@ -0,0 +1,108 @@ +//:://///////////////////////////////////////////// +//:: Flame Strike +//:: NW_S0_FlmStrike +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// A flame strike is a vertical column of divine fire +// roaring downward. The spell deals 1d6 points of +// damage per level, to a maximum of 15d6. Half the +// damage is fire damage, but the rest of the damage +// results directly from divine power and is therefore +// not subject to protection from elements (fire), +// fire shield (chill shield), etc. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Oct 19, 2000 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 20, 2001 +//:: Update Pass By: Preston W, On: Aug 1, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nDamage, nDamage2; + int nMetaMagic = GetMetaMagicFeat(); + effect eStrike = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + effect eHoly; + effect eFire; + + //Limit caster level for the purposes of determining damage. + if (nCasterLvl > 25) + { + nCasterLvl = 25; + } + + + //Declare the spell shape, size and the location. Capture the first target object in the shape. + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR); + //Apply the location impact visual to the caster location instead of caster target creature. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation()); + //Cycle through the targets within the spell shape until an invalid object is captured. + while ( GetIsObjectValid(oTarget) ) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FLAME_STRIKE)); + //Make SR check, and appropriate saving throw(s). + if (!MyResistSpell(OBJECT_SELF, oTarget, 0.6)) + { + nDamage = d6(nCasterLvl); + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Adjust the damage based on Reflex Save, Evasion and Improved Evasion + nDamage2 = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE); + nDamage = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + //Make a faction check so that only enemies receieve the full brunt of the damage. + if(!GetIsFriend(oTarget)) + { + eHoly = EffectDamage(nDamage2,DAMAGE_TYPE_DIVINE); + DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHoly, oTarget)); + } + // Apply effects to the currently selected target. + eFire = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); + DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM,GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR); + } +} diff --git a/_module/_removed files/nw_s0_gate.nss b/_module/_removed files/nw_s0_gate.nss new file mode 100644 index 00000000..376f0bd2 --- /dev/null +++ b/_module/_removed files/nw_s0_gate.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Gate +//:: NW_S0_Gate.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +//:: Summons a Balor to fight for the caster. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +void CreateBalor(); +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + //Make metamagic extend check + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Summon the Balor and apply the VFX impact + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + location lSpellTargetLOC = GetSpellTargetLocation(); + + if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) || + GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) || + GetHasSpellEffect(SPELL_HOLY_AURA)) + { + eSummon = EffectSummonCreature("gatebalor01",VFX_FNF_SUMMON_GATE,3.0); + float fSeconds = RoundsToSeconds(nDuration); + DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds)); + + } + else + { + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lSpellTargetLOC); + DelayCommand(3.0, CreateBalor()); + } +} + +void CreateBalor() +{ + CreateObject(OBJECT_TYPE_CREATURE, "gatebalor1", GetSpellTargetLocation()); +} + diff --git a/_module/_removed files/nw_s0_grplanar.nss b/_module/_removed files/nw_s0_grplanar.nss new file mode 100644 index 00000000..748de3fd --- /dev/null +++ b/_module/_removed files/nw_s0_grplanar.nss @@ -0,0 +1,102 @@ +//:://///////////////////////////////////////////// +//:: Greater Planar Binding +//:: NW_S0_GrPlanar.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an outsider dependant on alignment, or + holds an outsider if the creature fails a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eGate; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + + effect eLink = EffectLinkEffects(eDur, EffectParalyze()); + eLink = EffectLinkEffects(eLink, eDur2); + eLink = EffectLinkEffects(eLink, eDur3); + + object oTarget = GetSpellTargetObject(); + int nRacial = GetRacialType(oTarget); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Check to see if a valid target has been chosen + if (GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_PLANAR_BINDING)); + //Check for racial type + if(nRacial == RACIAL_TYPE_OUTSIDER) + { + //Allow will save to negate hold effect + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+20)) + { + //Apply the hold effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); + } + } + } + } + else + { + //If the ground was clicked on summon an outsider based on alignment + int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); + float fDelay = 3.0; + switch (nAlign) + { + case ALIGNMENT_EVIL: + eSummon = EffectSummonCreature("succubus03", VFX_FNF_SUMMON_GATE, 3.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + break; + case ALIGNMENT_GOOD: + eSummon = EffectSummonCreature("avenger03", VFX_FNF_SUMMON_CELESTIAL, 3.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL); + break; + case ALIGNMENT_NEUTRAL: + eSummon = EffectSummonCreature("slaad03", VFX_FNF_SUMMON_MONSTER_3, 1.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + fDelay = 1.0; + break; + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); + } +} + diff --git a/_module/_removed files/nw_s0_hammgods.nss b/_module/_removed files/nw_s0_hammgods.nss new file mode 100644 index 00000000..cd522c76 --- /dev/null +++ b/_module/_removed files/nw_s0_hammgods.nss @@ -0,0 +1,110 @@ +//:://///////////////////////////////////////////// +//:: Hammer of the Gods +//:: [NW_S0_HammGods.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Does 1d8 damage to all enemies within the +//:: spells 20m radius and dazes them if a +//:: Will save is failed. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 21, 2001 +//:: Update Pass By: Preston W, On: Aug 1, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + effect eDam; + effect eDaze = EffectDazed(); + effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + effect eLink = EffectLinkEffects(eMind, eDaze); + eLink = EffectLinkEffects(eLink, eDur); + + effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY); + effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY); + float fDelay; + int nDamageDice = nCasterLvl/2; + if(nDamageDice == 0) + { + nDamageDice = 1; + } + //Limit caster level + if (nDamageDice > 15) + { + nDamageDice = 15; + } + int nDamage; + //Apply the holy strike VFX + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation()); + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation()); + while (GetIsObjectValid(oTarget)) + { + //Make faction checks + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HAMMER_OF_THE_GODS)); + //Make SR Check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + fDelay = GetRandomDelay(0.6, 1.3); + //Roll damage + nDamage = d8(nDamageDice); + //Make metamagic checks + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nDamageDice; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 ); + } + //Make a will save for half damage and negation of daze effect + if (MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 0.5)) + { + nDamage = nDamage / 2; + } + else + { + //Apply daze effect + DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6()))); + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE ); + //Apply the VFX impact and damage effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in shape + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation()); + } +} diff --git a/_module/_removed files/nw_s0_horrwilt.nss b/_module/_removed files/nw_s0_horrwilt.nss new file mode 100644 index 00000000..5dbcfc4e --- /dev/null +++ b/_module/_removed files/nw_s0_horrwilt.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Horrid Wilting +//:: NW_S0_HorrWilt +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All living creatures (not undead or constructs) + suffer 1d8 damage per caster level to a maximum + of 25d8 damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 12 , 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +int bInt; + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_HORRID_WILTING); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 35) + { + nCasterLvl = 35; + } + //Apply the horrid wilting explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + // GZ: Not much fun if the caster is always killing himself + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HORRID_WILTING)); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetRandomDelay(1.5, 2.5); + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + if(GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + //Roll damage for each target + nDamage = d8(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } //Epic DC Bonus Added + if(/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) + { + nDamage = nDamage/2; + } + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); + } +} diff --git a/_module/_removed files/nw_s0_icestorm.nss b/_module/_removed files/nw_s0_icestorm.nss new file mode 100644 index 00000000..3a0891bc --- /dev/null +++ b/_module/_removed files/nw_s0_icestorm.nss @@ -0,0 +1,97 @@ +//:://///////////////////////////////////////////// +//:: Ice Storm +//:: NW_S0_IceStorm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Everyone in the area takes 3d6 Bludgeoning + and 2d6 Cold damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 12, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage, nDamage2, nDamage3; + int nVariable = nCasterLvl/2; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_ICESTORM); //USE THE ICESTORM FNF + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + effect eDam,eDam2, eDam3; + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Apply the ice storm VFX at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + fDelay = GetRandomDelay(0.75, 2.25); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ICE_STORM)); + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(3); + nDamage2 = d6(2); + nDamage3 = d6(nVariable); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 18; + nDamage2 = 12; + nDamage3 = 6 * nVariable; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage / 2); + nDamage2 = nDamage2 + (nDamage2 / 2); + nDamage3 = nDamage3 + (nDamage3 / 2); + } + nDamage2 = nDamage2 + nDamage3; + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING); + eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_COLD); + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the impact that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_module/_removed files/nw_s0_implosion.nss b/_module/_removed files/nw_s0_implosion.nss new file mode 100644 index 00000000..78100d10 --- /dev/null +++ b/_module/_removed files/nw_s0_implosion.nss @@ -0,0 +1,80 @@ +//:://///////////////////////////////////////////// +//:: Implosion +//:: NW_S0_Implosion.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All persons within a 5ft radius of the spell must + save at +3 DC or die. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 13, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + effect eDeath = EffectDeath(TRUE); + effect eEffect; + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMult = d6(1); + int nTotalDmg = nMult * nCasterLvl; + eDeath = SupernaturalEffect(eDeath); + effect eImplode= EffectVisualEffect(VFX_FNF_IMPLOSION); + float fDelay; + //Apply the implose effect + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImplode, GetSpellTargetLocation()); + //Get the first target in the shape + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation()); + + while (GetIsObjectValid(oTarget)) + { + if (oTarget != OBJECT_SELF && spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPLOSION)); + fDelay = GetRandomDelay(0.4, 1.2); + //Make SR check + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Make Reflex save + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay)) + { + //Apply death effect and the VFX impact + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget)); + } + + //Apply Damage If spell is not resisted by magic... + eEffect = EffectDamage(nTotalDmg, DAMAGE_TYPE_DIVINE, DAMAGE_POWER_ENERGY); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f); + } + } + //Get next target in the shape + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation()); + } +} + diff --git a/_module/_removed files/nw_s0_imprinvis.nss b/_module/_removed files/nw_s0_imprinvis.nss new file mode 100644 index 00000000..d861e413 --- /dev/null +++ b/_module/_removed files/nw_s0_imprinvis.nss @@ -0,0 +1,66 @@ +///:://///////////////////////////////////////////// +//:: Improved Invisibility +//:: NW_S0_ImprInvis.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Target creature can attack and cast spells while + invisible +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_MIND); + + effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_IMPROVED); + + effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eCover = EffectConcealment(55); + effect eLink = EffectLinkEffects(eDur, eCover); + eLink = EffectLinkEffects(eLink, eVis); + + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPROVED_INVISIBILITY, FALSE)); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oTarget, TurnsToSeconds(nDuration)); +} + + diff --git a/_module/_removed files/nw_s0_incclouda.nss b/_module/_removed files/nw_s0_incclouda.nss new file mode 100644 index 00000000..c8c7b7e7 --- /dev/null +++ b/_module/_removed files/nw_s0_incclouda.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Incendiary Cloud +//:: NW_S0_IncCloud.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Person within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// +//:: March 2003: Removed movement speed penalty +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + // effect eSpeed = EffectMovementSpeedDecrease(50); + effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = eVis2; //EffectLinkEffects(eSpeed, eVis2); + + float fDelay; + //Capture the first target object in the shape. + oTarget = GetEnteringObject(); + //Declare the spell shape, size and the location. + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_INCENDIARY_CLOUD)); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + fDelay = GetRandomDelay(0.5, 2.0); + //Roll damage. + nDamage = d8(6) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 64;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage for Reflex Save, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + // ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget); + } +} diff --git a/_module/_removed files/nw_s0_inccloudc.nss b/_module/_removed files/nw_s0_inccloudc.nss new file mode 100644 index 00000000..3cf4999e --- /dev/null +++ b/_module/_removed files/nw_s0_inccloudc.nss @@ -0,0 +1,80 @@ +//:://///////////////////////////////////////////// +//:: Incendiary Cloud +//:: NW_S0_IncCloudC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Objects within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// +//:: Updated By: GeorgZ 2003-08-21: Now affects doors and placeables as well +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + + float fDelay; + //Capture the first target object in the shape. + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + + oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Declare the spell shape, size and the location. + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + fDelay = GetRandomDelay(0.5, 2.0); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_INCENDIARY_CLOUD)); + //Roll damage. + nDamage = d8(4) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 50;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage for Reflex Save, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_module/_removed files/nw_s0_knock.nss b/_module/_removed files/nw_s0_knock.nss new file mode 100644 index 00000000..d4a54c67 --- /dev/null +++ b/_module/_removed files/nw_s0_knock.nss @@ -0,0 +1,35 @@ +//:://///////////////////////////////////////////// +//:: Knock +//:: NW_S0_Knock +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Opens doors not locked by magical means. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 29, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk +//:: VFX Pass By: Preston W, On: June 22, 2001 +#include "nw_i0_spells" + +void main() +{ + object oTarget; + effect eVis = EffectVisualEffect(VFX_IMP_KNOCK); + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + float fDelay; + while(GetIsObjectValid(oTarget)) + { + fDelay = GetRandomDelay(0.5, 2.5); + if( GetLocked(oTarget)) + { + if (GetLockUnlockDC(oTarget) <= 30){ + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + AssignCommand(oTarget, ActionUnlockObject(oTarget)); + } + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_module/_removed files/nw_s0_lghtnbolt.nss b/_module/_removed files/nw_s0_lghtnbolt.nss new file mode 100644 index 00000000..51e19578 --- /dev/null +++ b/_module/_removed files/nw_s0_lghtnbolt.nss @@ -0,0 +1,112 @@ +//:://///////////////////////////////////////////// +//:: Lightning Bolt +//:: NW_S0_LightnBolt +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Does 1d6 per level in a 5ft tube for 30m +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: March 8, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: May 2, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + + //Limit caster level + if (nCasterLevel > 15) + { + nCasterLevel = 15; + } + int nDamage; + int nMetaMagic = GetMetaMagicFeat(); + //Set the lightning stream to start at the caster's hands + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND); + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eDamage; + object oTarget = GetSpellTargetObject(); + location lTarget = GetLocation(oTarget); + object oNextTarget, oTarget2; + float fDelay; + int nCnt = 1; + + oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + while(GetIsObjectValid(oTarget2) && GetDistanceToObject(oTarget2) <= 30.0) + { + //Get first target in the lightning area by passing in the location of first target and the casters vector (position) + oTarget = GetFirstObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF)); + while (GetIsObjectValid(oTarget)) + { + //Exclude the caster from the damage effects + if (oTarget != OBJECT_SELF && oTarget2 == oTarget) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LIGHTNING_BOLT)); + //Make an SR check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Roll damage + nDamage = d6(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage based on Reflex Save, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_ELECTRICITY); + //Set damage effect + eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + fDelay = GetSpellEffectDelay(GetLocation(oTarget), oTarget); + //Apply VFX impcat, damage effect and lightning effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget)); + } + } + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,1.0); + //Set the currect target as the holder of the lightning effect + oNextTarget = oTarget; + eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNextTarget, BODY_NODE_CHEST); + } + } + //Get the next object in the lightning cylinder + oTarget = GetNextObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF)); + } + nCnt++; + oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + } +} + diff --git a/_module/_removed files/nw_s0_lsplanar.nss b/_module/_removed files/nw_s0_lsplanar.nss new file mode 100644 index 00000000..084dbf88 --- /dev/null +++ b/_module/_removed files/nw_s0_lsplanar.nss @@ -0,0 +1,114 @@ +//:://///////////////////////////////////////////// +//:: Lesser Planar Binding +//:: NW_S0_LsPlanar.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an outsider dependant on alignment, or + holds an outsider if the creature fails a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 20, 2001 + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eGate; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + effect eLink = EffectLinkEffects(eDur, EffectParalyze()); + eLink = EffectLinkEffects(eLink, eDur2); + eLink = EffectLinkEffects(eLink, eDur3); + + object oTarget = GetSpellTargetObject(); + int nRacial = GetRacialType(oTarget); + if(nDuration == 0) + { + nDuration = 1; + } + + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Check to see if the target is valid + if (GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LESSER_PLANAR_BINDING)); + //Check to make sure the target is an outsider + if(nRacial == RACIAL_TYPE_OUTSIDER) + { + //Make a will save + if(!WillSave(oTarget, GetSpellSaveDC())) + { + //Apply the linked effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); + } + } + } + } + else + { + //Get the alignment of the caster + int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); + float fDelay = 3.0; + switch (nAlign) + { + //Set the summon effect based on alignment + case ALIGNMENT_EVIL: + { + eSummon = EffectSummonCreature("succubus01",VFX_FNF_SUMMON_GATE , fDelay); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + } + break; + case ALIGNMENT_GOOD: + { + eSummon = EffectSummonCreature("lantern01", 219 ,fDelay); + //eGate = EffectVisualEffect(219); + } + break; + case ALIGNMENT_NEUTRAL: + { + eSummon = EffectSummonCreature("slaad01", VFX_FNF_SUMMON_MONSTER_3); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3, ,1.0); + } + break; + } + //Apply the summon effect and the VFX impact + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + } +} + diff --git a/_module/_removed files/nw_s0_metswarm.nss b/_module/_removed files/nw_s0_metswarm.nss new file mode 100644 index 00000000..348b3d81 --- /dev/null +++ b/_module/_removed files/nw_s0_metswarm.nss @@ -0,0 +1,94 @@ +//:://///////////////////////////////////////////// +//:: Meteor Swarm +//:: NW_S0_MetSwarm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Everyone in a 50ft radius around the caster + takes 20d6 fire damage. Those within 6ft of the + caster will take no damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 24 , 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 22, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic; + int nDamage; + effect eFire; + effect eMeteor = EffectVisualEffect(VFX_FNF_METEOR_SWARM); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Apply the meteor swarm VFX area impact + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMeteor, GetLocation(OBJECT_SELF)); + //Get first object in the spell area + float fDelay; + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + fDelay = GetRandomDelay(); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_METEOR_SWARM)); + //Make sure the target is outside the 2m safe zone + if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0) + { + //Make SR check + if (!MyResistSpell(OBJECT_SELF, oTarget, 0.5)) + { + //Roll damage + nDamage = d6(20); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 120;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_FIRE); + //Set the damage effect + eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply damage effect and VFX impact. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + } + //Get next target in the spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + } +} + diff --git a/_module/_removed files/nw_s0_mordswrd.nss b/_module/_removed files/nw_s0_mordswrd.nss new file mode 100644 index 00000000..f90e6f9b --- /dev/null +++ b/_module/_removed files/nw_s0_mordswrd.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Mordenkainen's Sword +//:: NW_S0_MordSwrd.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a Helmed Horror to battle for the caster +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 29, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("mordsword01"); + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); +} + diff --git a/_module/_removed files/nw_s0_negray.nss b/_module/_removed files/nw_s0_negray.nss new file mode 100644 index 00000000..78bd0f32 --- /dev/null +++ b/_module/_removed files/nw_s0_negray.nss @@ -0,0 +1,96 @@ +//:://///////////////////////////////////////////// +//:: Negative Energy Ray +//:: NW_S0_NegRay +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Fires a bolt of negative energy at the target + doing 1d6 damage. Does an additional 1d6 + damage for 2 levels after level 1 (3,5,7,9) to + a maximum of 5d6 at level 9. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 13, 2001 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + + if(nCasterLevel > 20) + { + nCasterLevel = 20; + } + nCasterLevel = (nCasterLevel + 1) / 2; + int nDamage = d6(nCasterLevel); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eRay; + if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEGATIVE_ENERGY_RAY)); + eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make a saving throw check + if(/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) + { + nDamage /= 2; + } + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + //Apply the VFX impact and effects + //DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + } + } + else + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEGATIVE_ENERGY_RAY, FALSE)); + eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); + effect eHeal = EffectHeal(nDamage); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); + } + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7); +} diff --git a/_module/_removed files/nw_s0_planar.nss b/_module/_removed files/nw_s0_planar.nss new file mode 100644 index 00000000..baf01289 --- /dev/null +++ b/_module/_removed files/nw_s0_planar.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Planar Binding +//:: NW_S0_Planar.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an outsider dependant on alignment, or + holds an outsider if the creature fails a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eGate; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + effect eLink = EffectLinkEffects(eDur, EffectParalyze()); + eLink = EffectLinkEffects(eLink, eDur2); + eLink = EffectLinkEffects(eLink, eDur3); + + int nRacial = GetRacialType(oTarget); + int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); + if(nDuration == 0) + { + nDuration == 1; + } + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Check to make sure a target was selected + if (GetIsObjectValid(oTarget)) + { + //Check the racial type of the target + if(nRacial == RACIAL_TYPE_OUTSIDER) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PLANAR_BINDING)); + //Make a Will save + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+2)) + { + //Apply the linked effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); + } + } + } + } + else + { + //Set the summon effect based on the alignment of the caster + float fDelay = 3.0; + switch (nAlign) + { + case ALIGNMENT_EVIL: + eSummon = EffectSummonCreature("succubus02",VFX_FNF_SUMMON_GATE, fDelay); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + break; + case ALIGNMENT_GOOD: + eSummon = EffectSummonCreature("hound02", VFX_FNF_SUMMON_CELESTIAL, fDelay); + //eGate = EffectVisualEffect(219); + break; + case ALIGNMENT_NEUTRAL: + eSummon = EffectSummonCreature("slaad02",VFX_FNF_SUMMON_MONSTER_3, 1.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //fDelay = 1.0; + break; + } + //Apply the summon effect and VFX impact + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + } +} + diff --git a/_module/_removed files/nw_s0_pwkill.nss b/_module/_removed files/nw_s0_pwkill.nss new file mode 100644 index 00000000..0d0d3905 --- /dev/null +++ b/_module/_removed files/nw_s0_pwkill.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: Power Word, Kill +//:: NW_S0_PWKill +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// When power word, kill is uttered, you can either +// target a single creature or let the spell affect a +// group. +// If power word, kill is targeted at a single creature, +// that creature dies if it has 100 or fewer hit points. +// If the power word, kill is cast as an area spell, it +// kills creatures in a 15-foot-radius sphere. It only +// kills creatures that have 20 or fewer hit points, and +// only up to a total of 200 hit points of such +// creatures. The spell affects creatures with the lowest. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Dec 18, 2000 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 22, 2001 +//:: Update Pass By: Preston W, On: Aug 3, 2001 +#include "X0_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nDamageDealt = 0; + int nHitpoints, nMin; + object oWeakest; + effect eDeath = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eWord = EffectVisualEffect(VFX_FNF_PWKILL); + float fDelay; + int bKill; + + //Apply the VFX impact + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWord, GetSpellTargetLocation()); + //Check for the single creature or area targeting of the spell + if (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_KILL)); + //Check the creatures HP + if ( GetCurrentHitPoints(oTarget) <= 200 ) + { + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Apply the death effect and the VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } + } + else + { + //Continue through the while loop while the damage deal is less than 200. + while (nDamageDealt < 200) + { + //Set nMin higher than the highest HP amount allowed + nMin = 25; + oWeakest = OBJECT_INVALID; + //Get the first target in the spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation()); + while (GetIsObjectValid(oTarget)) + { + //Make sure the target avoids all allies. + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + bKill = GetLocalInt(oTarget, "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF)); + //Get the HP of the current target + nHitpoints = GetCurrentHitPoints(oTarget); + //Check if the currently selected target is lower in HP than the weakest stored creature + if ((nHitpoints < nMin) && ((nHitpoints > 0) && (nHitpoints <= 20)) && bKill == FALSE) + { + nMin = nHitpoints; + oWeakest = oTarget; + } + } + //Get next target in the spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation()); + } + //If no weak targets are available then break out of the loop + if (!GetIsObjectValid(oWeakest)) + { + nDamageDealt = 250; + } + else + { + fDelay = GetRandomDelay(0.75, 2.0); + SetLocalInt(oWeakest, "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF), TRUE); + //Fire cast spell at event for the specified target + SignalEvent(oWeakest, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_KILL)); + if(!MyResistSpell(OBJECT_SELF, oWeakest, fDelay)) + { + //Apply the VFX impact and death effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oWeakest)); + if(!GetIsImmune(oWeakest, IMMUNITY_TYPE_DEATH)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oWeakest)); + } + //Add the creatures HP to the total + nDamageDealt = nDamageDealt + nMin; + string sTag = "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF); + DelayCommand(fDelay + 0.25, DeleteLocalInt(oWeakest, sTag)); + } + } + } + } +} diff --git a/_module/_removed files/nw_s0_raisdead.nss b/_module/_removed files/nw_s0_raisdead.nss new file mode 100644 index 00000000..4ee6f14c --- /dev/null +++ b/_module/_removed files/nw_s0_raisdead.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: [Raise Dead] +//:: [NW_S0_RaisDead.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Brings a character back to life with 1 HP. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 31, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 22, 2001 + +void main() +{ + //Declare major variables + object oTarget = GetSpellTargetObject(); + object oPC = oTarget; + object oItem; + + //Remove the death token + object oDeath = GetItemPossessedBy(oPC, "death"); + DestroyObject(oDeath, 0.0f); + + effect eRaise = EffectResurrection(); + effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); + + if (GetLocalInt(GetArea(oTarget), "streamed")==2){ + return; + } + if(GetIsDead(oTarget)) + { + SetPlotFlag(oTarget, 0); + + SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC); + + + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE)); + //Apply raise dead effect and VFX impact + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget); + + } +} + diff --git a/_module/_removed files/nw_s0_regen.nss b/_module/_removed files/nw_s0_regen.nss new file mode 100644 index 00000000..c20c792c --- /dev/null +++ b/_module/_removed files/nw_s0_regen.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Regenerate +//:: NW_S0_Regen +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Grants the selected target 6 HP of regeneration + every round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 22, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eRegen = EffectRegenerate(12, 6.0); + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects(eRegen, eDur); + + + int nMeta = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(OBJECT_SELF); + //Meta-Magic Checks + if (nMeta == METAMAGIC_EXTEND) + { + nLevel *= 2; + + } + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REGENERATE, FALSE)); + //Apply effects and VFX + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + +} diff --git a/_module/_removed files/nw_s0_resserec.nss b/_module/_removed files/nw_s0_resserec.nss new file mode 100644 index 00000000..115921f8 --- /dev/null +++ b/_module/_removed files/nw_s0_resserec.nss @@ -0,0 +1,52 @@ +//:://///////////////////////////////////////////// +//:: [Ressurection] +//:: [NW_S0_Ressurec.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Brings a character back to life with full +//:: health. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 31, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 22, 2001 + +void main() +{ + //Get the spell target + object oTarget = GetSpellTargetObject(); + object oPC = oTarget; + object oItem; + object oDeath = GetItemPossessedBy(oPC, "death"); + DestroyObject(oDeath, 0.0f); + + if (!GetIsDead(oTarget)){return;} + + if (GetLocalInt(GetArea(oTarget), "streamed")==2){ + return; + } + + //Check to make sure the target is dead first + if (GetIsDead(oTarget)) + { + SetPlotFlag(oTarget, 0); + + //Remove the Death Logging from the player.. + SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE)); + //Declare major variables + int nHealed = GetMaxHitPoints(oTarget); + effect eRaise = EffectResurrection(); + effect eHeal = EffectHeal(nHealed + 10); + effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); + //Apply the heal, raise dead and VFX impact effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); + + } +} + diff --git a/_module/_removed files/nw_s0_shadconj.nss b/_module/_removed files/nw_s0_shadconj.nss new file mode 100644 index 00000000..8b569af4 --- /dev/null +++ b/_module/_removed files/nw_s0_shadconj.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Shadow Conjuration +//:: NW_S0_ShadConj.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If the opponent is clicked on Shadow Bolt is cast. + If the caster clicks on himself he will cast + Mage Armor and Mirror Image. If they click on + the ground they will summon a Shadow. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +void ShadowBolt (object oTarget, int nMetaMagic); + +void main() +{ + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = GetSpellTargetObject(); + int nCast; + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eVis; + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + if (GetIsObjectValid(oTarget)) + { + if (oTarget == OBJECT_SELF) + { + nCast = 1; + } + else + { + nCast = 2; + } + } + else + { + nCast = 3; + } + + switch (nCast) + { + case 1: + { + eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); + effect eAC = EffectACIncrease(4, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL); + effect eMirror = EffectVisualEffect(VFX_DUR_BLUR); + effect eMiss = EffectConcealment(40); + effect eLink = EffectLinkEffects(eAC, eMirror); + eLink = EffectLinkEffects(eLink, eVis); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMiss, OBJECT_SELF, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, TurnsToSeconds(nDuration)); + } + case 2: + if (!ResistSpell(OBJECT_SELF, oTarget)) + { + ShadowBolt(oTarget, nMetaMagic); + } + case 3: + eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("shadfiend01"); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + } +} + +void ShadowBolt (object oTarget, int nMetaMagic) +{ + int nDamage; + int nBolts = GetCasterLevel(OBJECT_SELF)/5; + int nCnt; + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eDam; + for (nCnt = 0; nCnt < nBolts; nCnt++) + { + int nDam = d6(2); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 12;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage/2; //Damage/Healing is +50% + } + if (ReflexSave(oTarget, GetSpellSaveDC())) + { + nDamage = nDamage/2; + } + eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } +} + + diff --git a/_module/_removed files/nw_s0_shades.nss b/_module/_removed files/nw_s0_shades.nss new file mode 100644 index 00000000..265bae6c --- /dev/null +++ b/_module/_removed files/nw_s0_shades.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Shades +//:: NW_S0_Shades.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If the opponent is clicked on Shadow Bolt is cast. + If the caster clicks on himself he will cast + Stoneskin and Mirror Image. If they click on + the ground they will summon a Shadow Lord. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +void ShadowBolt (object oTarget, int nMetaMagic); + +void main() +{ + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = GetSpellTargetObject(); + int nCast; + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eVis; + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + if (GetIsObjectValid(oTarget)) + { + if (oTarget == OBJECT_SELF) + { + nCast = 1; + } + else + { + nCast = 2; + } + } + else + { + nCast = 3; + } + + switch (nCast) + { + case 1: + { + eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN); + effect eStone = EffectDamageReduction(5, DAMAGE_POWER_PLUS_FIVE, nDuration * 10); + effect eMirror = EffectVisualEffect(VFX_DUR_BLUR); + effect eLink = EffectLinkEffects(eStone, eMirror); + effect eMiss = EffectConcealment(40); + eLink = EffectLinkEffects(eLink, eVis); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMiss, OBJECT_SELF, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration)); + } + case 2: + if (!ResistSpell(OBJECT_SELF, oTarget)) + { + ShadowBolt(oTarget, nMetaMagic); + } + case 3: + eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("shadlord01"); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + } +} + +void ShadowBolt (object oTarget, int nMetaMagic) +{ + int nDamage; + int nBolts = GetCasterLevel(OBJECT_SELF)/5; + int nCnt; + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + + for (nCnt = 0; nCnt < nBolts; nCnt++) + { + int nDam = d6(4); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 24;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage/2; //Damage/Healing is +50% + } + if (ReflexSave(oTarget, GetSpellSaveDC())) + { + nDamage = nDamage/2; + } + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } +} + + diff --git a/_module/_removed files/nw_s0_slaylive.nss b/_module/_removed files/nw_s0_slaylive.nss new file mode 100644 index 00000000..61809695 --- /dev/null +++ b/_module/_removed files/nw_s0_slaylive.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: [Slay Living] +//:: [NW_S0_SlayLive.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Caster makes a touch attack and if the target +//:: fails a Fortitude save they die. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: January 22nd / 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = GetSpellTargetObject(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLAY_LIVING)); + //Make SR check + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make melee touch attack + if(TouchAttackMelee(oTarget)) + { + //Make Fort save + if (!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH)) + { + //Apply the death effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + else + { + //Roll damage + nDamage = d6(3)+ nCasterLevel; + //Make metamagic checks + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 18 + nCasterLevel; + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Apply damage effect and VFX impact + eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + } + } + } +} diff --git a/_module/_removed files/nw_s0_slow.nss b/_module/_removed files/nw_s0_slow.nss new file mode 100644 index 00000000..67bd7fe0 --- /dev/null +++ b/_module/_removed files/nw_s0_slow.nss @@ -0,0 +1,84 @@ +//:://///////////////////////////////////////////// +//:: Slow +//:: NW_S0_Slow.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Character can take only one partial action + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 29, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + effect eSlow = EffectSlow(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eSlow, eDur); + + effect eVis = EffectVisualEffect(VFX_IMP_SLOW); + effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30); + int nMetaMagic = GetMetaMagicFeat(); + //Determine spell duration as an integer for later conversion to Rounds, Turns or Hours. + int nDuration = GetCasterLevel(OBJECT_SELF); + int nLevel = nDuration; + int nCount = 0; + location lSpell = GetSpellTargetLocation(); + + //Metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation()); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell); + //Cycle through the targets within the spell shape until an invalid object is captured or the number of + //targets affected is equal to the caster level. + while(GetIsObjectValid(oTarget) && nCount < nLevel) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLOW)); + if (!MyResistSpell(OBJECT_SELF, oTarget) && !/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC())) + { + //Apply the slow effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + //Count the number of creatures affected + nCount++; + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell); + } +} + diff --git a/_module/_removed files/nw_s0_splresis.nss b/_module/_removed files/nw_s0_splresis.nss new file mode 100644 index 00000000..9afb25b0 --- /dev/null +++ b/_module/_removed files/nw_s0_splresis.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Spell Resistance +//:: NW_S0_SplResis +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The target creature gains 12 + Caster Level SR. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: March 19, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(OBJECT_SELF); + + //Epic Spell Resistance Added + int nDC; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDC = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic Spell Resistance Bonus = + " + IntToString(nDC) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDC = 0; + } + + //Epic Resistance Added + int nBonus = 12 + nLevel + nDC; + effect eSR = EffectSpellResistanceIncrease(nBonus); + effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eDur2 = EffectVisualEffect(249); + effect eLink = EffectLinkEffects(eSR, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_RESISTANCE, FALSE)); + //Check for metamagic extension + if (nMetaMagic == METAMAGIC_EXTEND) + { + nLevel = nLevel *2; //Duration is +100% + } + //Apply VFX impact and SR bonus effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nLevel)); +} diff --git a/_module/_removed files/nw_s0_stormvenc.nss b/_module/_removed files/nw_s0_stormvenc.nss new file mode 100644 index 00000000..b2b89098 --- /dev/null +++ b/_module/_removed files/nw_s0_stormvenc.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Storm of Vengeance: Heartbeat +//:: NW_S0_StormVenC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates an AOE that decimates the enemies of + the cleric over a 30ft radius around the caster +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 8, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + effect eAcid = EffectDamage(d8(5), DAMAGE_TYPE_ACID); + effect eElec = EffectDamage(d8(7), DAMAGE_TYPE_ELECTRICAL); + effect eStun = EffectStunned(); + effect eVisAcid = EffectVisualEffect(VFX_IMP_ACID_S); + effect eVisElec = EffectVisualEffect(VFX_IMP_LIGHTNING_M); + effect eVisStun = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eStun, eVisStun); + eLink = EffectLinkEffects(eLink, eDur); + + float fDelay; + //Get first target in spell area + object oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_STORM_OF_VENGEANCE)); + //Make an SR Check + fDelay = GetRandomDelay(0.5, 2.0); + if(MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay) == 0) + { + //Make a saving throw check + // * if the saving throw is made they still suffer acid damage. + // * if they fail the saving throw, they suffer Electrical damage too + if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY, GetAreaOfEffectCreator(), fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget)); + if (d2()==1) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget)); + } + } + else + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eElec, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2))); + } + } + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE); + } +} diff --git a/_module/_removed files/nw_s0_summon.nss b/_module/_removed files/nw_s0_summon.nss new file mode 100644 index 00000000..5f8a7740 --- /dev/null +++ b/_module/_removed files/nw_s0_summon.nss @@ -0,0 +1,260 @@ +//:://///////////////////////////////////////////// +//:: Summon Creature Series +//:: NW_S0_Summon +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Carries out the summoning of the appropriate + creature for the Summon Monster Series of spells + 1 to 9 +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// + +effect SetSummonEffect(int nSpellID); + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nSpellID = GetSpellId(); + int nDuration = GetCasterLevel(OBJECT_SELF); + nDuration = 24; + if(nDuration == 1) + { + nDuration = 4; + } + effect eSummon = SetSummonEffect(nSpellID); + + //Make metamagic check for extend + int nMetaMagic = GetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); +} + + +effect SetSummonEffect(int nSpellID) +{ + int nFNF_Effect; + int nRoll = d3(); + string sSummon; + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) //WITH THE ANIMAL DOMAIN + { + if(nSpellID == SPELL_SUMMON_CREATURE_I) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_BOARDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_II) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_WOLFDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_III) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "direspider4"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IV) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "diretiger5"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_V) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "direbear6"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VI) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airelder7"; + break; + + case 2: + sSummon = "waterelder7"; + break; + + case 3: + sSummon = "fireelder7"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airgreat8"; + break; + + case 2: + sSummon = "watergreat8"; + break; + + case 3: + sSummon = "firegreat8"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VIII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "asummon9"; + break; + + case 2: + sSummon = "bsummon9"; + break; + + case 3: + sSummon = "csummon9"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IX) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "asummon9"; + break; + + case 2: + sSummon = "csummon9"; + break; + + case 3: + sSummon = "dsummon9"; + break; + } + } + } + else //WITOUT THE ANIMAL DOMAIN + { + if(nSpellID == SPELL_SUMMON_CREATURE_I) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_badgerdire"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_II) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_BOARDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_III) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_WOLFDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IV) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "direspider4"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_V) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "diretiger5"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VI) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "direbear6"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airelder7"; + break; + + case 2: + sSummon = "waterelder7"; + break; + + case 3: + sSummon = "fireelder7"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VIII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airgreat8"; + break; + + case 2: + sSummon = "watergreat8"; + break; + + case 3: + sSummon = "firegreat8"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IX) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "asummon9"; + break; + + case 2: + sSummon = "bsummon9"; + break; + + case 3: + sSummon = "csummon9"; + break; + + } + } + } + //effect eVis = EffectVisualEffect(nFNF_Effect); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + effect eSummonedMonster = EffectSummonCreature(sSummon, nFNF_Effect); + return eSummonedMonster; +} + diff --git a/_module/_removed files/nw_s0_summon4.nss b/_module/_removed files/nw_s0_summon4.nss new file mode 100644 index 00000000..9beb093d --- /dev/null +++ b/_module/_removed files/nw_s0_summon4.nss @@ -0,0 +1,54 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster IV +//:: NW_S0_Summon4 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a Sword Spider to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("direspider4"); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + eSummon = EffectSummonCreature("diretiger5"); + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} + diff --git a/_module/_removed files/nw_s0_summon5.nss b/_module/_removed files/nw_s0_summon5.nss new file mode 100644 index 00000000..9ea66ffc --- /dev/null +++ b/_module/_removed files/nw_s0_summon5.nss @@ -0,0 +1,52 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster V +//:: NW_S0_Summon5 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a dire spider to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12 , 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("diretiger5"); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + eSummon = EffectSummonCreature("direbear6"); + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_module/_removed files/nw_s0_summon6.nss b/_module/_removed files/nw_s0_summon6.nss new file mode 100644 index 00000000..669b3b93 --- /dev/null +++ b/_module/_removed files/nw_s0_summon6.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster VI +//:: NW_S0_Summon6 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a dire bear to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("direbear6"); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + int nRoll = d4(); + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airelder7"); + break; + + case 2: + eSummon = EffectSummonCreature("waterelder7"); + break; + + case 3: + eSummon = EffectSummonCreature("earthelder7"); + break; + + case 4: + eSummon = EffectSummonCreature("fireelder7"); + break; + } + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_module/_removed files/nw_s0_summon7.nss b/_module/_removed files/nw_s0_summon7.nss new file mode 100644 index 00000000..9c3ed080 --- /dev/null +++ b/_module/_removed files/nw_s0_summon7.nss @@ -0,0 +1,90 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster VII +//:: NW_S0_Summon7 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a Minogon to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + int nRoll = d4(); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airegreat8"); + break; + + case 2: + eSummon = EffectSummonCreature("watergreat8"); + break; + + case 3: + eSummon = EffectSummonCreature("earthgreat8"); + break; + + case 4: + eSummon = EffectSummonCreature("firegreat8"); + break; + } + } + else + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airelder7"); + break; + + case 2: + eSummon = EffectSummonCreature("waterelder7"); + break; + + case 3: + eSummon = EffectSummonCreature("earthelder7"); + break; + + case 4: + eSummon = EffectSummonCreature("fireelder7"); + break; + } + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_module/_removed files/nw_s0_summon8.nss b/_module/_removed files/nw_s0_summon8.nss new file mode 100644 index 00000000..4b773f24 --- /dev/null +++ b/_module/_removed files/nw_s0_summon8.nss @@ -0,0 +1,92 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster VIII +//:: NW_S0_Summon8 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a greater earth elemental to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + int nRoll = d4(); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("asummon9"); + break; + + case 2: + eSummon = EffectSummonCreature("bsummon9"); + break; + + case 3: + eSummon = EffectSummonCreature("csummon9"); + break; + + case 4: + eSummon = EffectSummonCreature("dsummon9"); + break; + + } + } + else + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airgreat8"); + break; + + case 2: + eSummon = EffectSummonCreature("watergreat8"); + break; + + case 3: + eSummon = EffectSummonCreature("earthgreat8"); + break; + + case 4: + eSummon = EffectSummonCreature("firegreat8"); + break; + } + } + + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_module/_removed files/nw_s0_summon9.nss b/_module/_removed files/nw_s0_summon9.nss new file mode 100644 index 00000000..35fc9ea8 --- /dev/null +++ b/_module/_removed files/nw_s0_summon9.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster IX +//:: NW_S0_Summon9 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a elder elemental to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + int nRoll = d4(); + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("asummon9"); + break; + + case 2: + eSummon = EffectSummonCreature("bsummon9"); + break; + + case 3: + eSummon = EffectSummonCreature("csummon9"); + break; + + case 4: + eSummon = EffectSummonCreature("dsummon9"); + break; + } + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_module/_removed files/nw_s0_summshad.nss b/_module/_removed files/nw_s0_summshad.nss new file mode 100644 index 00000000..6b9be3a3 --- /dev/null +++ b/_module/_removed files/nw_s0_summshad.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Summon Shadow +//:: NW_S0_SummShad.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Spell powerful ally from the shadow plane to + battle for the wizard +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 26, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Set the summoned undead to the appropriate template based on the caster level + if (nCasterLevel <= 7) + { + eSummon = EffectSummonCreature("shadow01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 8) && (nCasterLevel <= 17)) + { + eSummon = EffectSummonCreature("shadhound01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 18) && (nCasterLevel <= 23)) + { + eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); // change later + } + else if ((nCasterLevel >= 24)) + { + eSummon = EffectSummonCreature("shadlord01",VFX_FNF_SUMMON_UNDEAD); + } + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); +} + diff --git a/_module/_removed files/nw_s0_summshad02.nss b/_module/_removed files/nw_s0_summshad02.nss new file mode 100644 index 00000000..ea3664fe --- /dev/null +++ b/_module/_removed files/nw_s0_summshad02.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Summon Shadow +//:: NW_S0_SummShad02.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Spell powerful ally from the shadow plane to + battle for the wizard +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 26, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC); + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + + //Set the summoned undead to the appropriate template based on the caster level + if (nCasterLevel <= 7) + { + eSummon = EffectSummonCreature("shadow01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 8) && (nCasterLevel <= 17)) + { + eSummon = EffectSummonCreature("shadhound01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 18) && (nCasterLevel <= 23)) + { + eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); // change later + } + else if ((nCasterLevel >= 24)) + { + eSummon = EffectSummonCreature("shadlord01",VFX_FNF_SUMMON_UNDEAD); + } + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(24)); +} + diff --git a/_module/_removed files/nw_s0_timestop.nss b/_module/_removed files/nw_s0_timestop.nss new file mode 100644 index 00000000..e1723a53 --- /dev/null +++ b/_module/_removed files/nw_s0_timestop.nss @@ -0,0 +1,158 @@ +//:://///////////////////////////////////////////// +//:: Time Stop +//:: NW_S0_TimeStop.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All persons in the Area are frozen in time + except the caster. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +// Place the following variable on an area to disable timestop in that area. +// NAME : TIMESTOP_DISABLED TYPE : Int VALUE : 1 + +// If set to zero, the duration will default to 1 + 1d4 rounds. Otherwise, the +// duration will be the number of seconds the variable is changed to. +const int TIME_STOP_OVERRIDE_DURATION = 13; +// ex. const int TIME_STOP_OVERRIDE_DURATION = 9; Timestop lasts 9 seconds. + +// Number of seconds before Timestop can be recast after being cast. Countdown +//messages are sent based on this time. Set to 0.0 if you dont want there to +//be any cooldown +const float TIME_STOP_COOLDOWN_TIME = 0.0; + +//If set to 1, Timestop will not be usable\ +const int TIME_STOP_DISABLE = 0; + +#include "x2_inc_spellhook" + +int DetermineDuration() +{ + int nDuration = 1 + d4(1); + float fDuration = RoundsToSeconds(nDuration); + int nSeconds = FloatToInt(fDuration); + if (TIME_STOP_OVERRIDE_DURATION != 0) nSeconds = TIME_STOP_OVERRIDE_DURATION; + return nSeconds; +} + +void TimeStopDelay(object oCaster) +{ + float Delay1 = TIME_STOP_COOLDOWN_TIME * 0.25; + string Message1 = IntToString(FloatToInt(Delay1)); + float Delay2 = TIME_STOP_COOLDOWN_TIME * 0.50; + string Message2 = IntToString(FloatToInt(Delay2)); + float Delay3 = TIME_STOP_COOLDOWN_TIME * 0.75; + string Message3 = IntToString(FloatToInt(Delay3)); + SetLocalInt(oCaster, "TIMESTOP_DELAY", 1); + DelayCommand(Delay1, FloatingTextStringOnCreature("Time Stop Recastable In " + Message3 + " seconds", oCaster, FALSE)); + DelayCommand(Delay2, FloatingTextStringOnCreature("Time Stop Recastable In " + Message2 + " seconds", oCaster, FALSE)); + DelayCommand(Delay3, FloatingTextStringOnCreature("Time Stop Recastable In " + Message1 + " seconds", oCaster, FALSE)); + DelayCommand(TIME_STOP_COOLDOWN_TIME, FloatingTextStringOnCreature("Time Stop Ready", oCaster, FALSE)); + DelayCommand(TIME_STOP_COOLDOWN_TIME, DeleteLocalInt(oCaster, "TIMESTOP_DELAY")); +} +void Timestop(object oCaster) +{ + object oArea = GetArea(oCaster); + + effect eParalyze = EffectCutsceneParalyze(); + int nDuration = DetermineDuration(); + float fDuration = IntToFloat(nDuration); + object oTarget = GetFirstObjectInArea(oArea); + + while (GetIsObjectValid(oTarget)) { + if (GetIsPC(oTarget) == TRUE || GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) { + if (GetIsDM(oTarget) == FALSE) { + if (oTarget != oCaster) { + FloatingTextStringOnCreature("Time Stopped", oTarget, FALSE); + AssignCommand(oTarget, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, fDuration)); } } } + + oTarget = GetNextObjectInArea(oArea); } +} + +void TimestopCheck(object oCaster, int nDuration) +{ + if (nDuration == 0) return; + + nDuration = nDuration - 1; + float fDuration = IntToFloat(nDuration); + object oArea = GetArea(oCaster); + location lCaster = GetLocation(oCaster); + + effect eParalyze = EffectCutsceneParalyze(); + object oTarget = GetFirstObjectInArea(oArea); + + while (GetIsObjectValid(oTarget)) { + if (GetIsPC(oTarget) == TRUE || GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) { + if (GetIsDM(oTarget) == FALSE) { + if (oTarget != oCaster) { + + effect eEffect = GetFirstEffect(oTarget); + while (GetIsEffectValid(eEffect)) { + if (GetEffectType(eEffect) == EFFECT_TYPE_CUTSCENE_PARALYZE) { + SetLocalInt(oTarget, "TIME_STOPPED", 1); } + eEffect = GetNextEffect(oTarget); } + + if (GetLocalInt(oTarget, "TIME_STOPPED") == 0) { + FloatingTextStringOnCreature("Time Stopped", oTarget, FALSE); + AssignCommand(oTarget, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, fDuration)); } + + DeleteLocalInt(oTarget, "TIME_STOPPED"); } } } + + oTarget = GetNextObjectInArea(oArea); } + + DelayCommand(1.0, TimestopCheck(oCaster, nDuration)); +} + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + string sName = GetName(OBJECT_SELF); + if (TIME_STOP_DISABLE == 1) { + FloatingTextStringOnCreature("Timestop is disabled on this server", OBJECT_SELF, FALSE); + return; } + + + if (GetLocalInt(GetArea(OBJECT_SELF), "TIMESTOP_DISABLED") == 1 && GetName(OBJECT_SELF) != "Archmage Jezebeth") { + FloatingTextStringOnCreature("Time Stop is not permitted in this area", OBJECT_SELF, FALSE); + return; } + + if (GetLocalInt(OBJECT_SELF, "TIMESTOP_DELAY") == 1) { + FloatingTextStringOnCreature("Timestop is not castable yet", OBJECT_SELF, FALSE); + return; } + + if (TIME_STOP_COOLDOWN_TIME != 0.0) { + string Message = IntToString(FloatToInt(TIME_STOP_COOLDOWN_TIME)); + FloatingTextStringOnCreature("Time Stop Recastable In " + Message + " seconds", OBJECT_SELF, FALSE); + DelayCommand(0.6, TimeStopDelay(OBJECT_SELF)); } + + //Declare major variables + location lTarget = GetSpellTargetLocation(); + effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP); + int nDuration = DetermineDuration(); + + //Fire cast spell at event for the specified target + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); + Timestop(OBJECT_SELF); + DelayCommand(1.0, TimestopCheck(OBJECT_SELF, nDuration)); + +} diff --git a/_module/_removed files/nw_s0_timestop1.nss b/_module/_removed files/nw_s0_timestop1.nss new file mode 100644 index 00000000..13a7119f --- /dev/null +++ b/_module/_removed files/nw_s0_timestop1.nss @@ -0,0 +1,56 @@ +//:://///////////////////////////////////////////// +//:: Time Stop +//:: NW_S0_TimeStop.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All persons in the Area are frozen in time + except the caster. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +/*This is a modified version of kaltors PW friendly time stop script +It has been modified to do several new functions + +--It not will not dominate summoned units, to prevent them from becomine masterless +--It follows standard 9.0 second timestop with a .75 delay +--It applies a small visual affect to all units to show a timestop in effect +--It applies a knockdown effect to summoned units to prevent them doing anything(no summoned unit has + immune to knockdown to my knowledge +--it applies a Immobilize effect to prevent units from moving (an occasional bug with big PW's on high CPU load). +*/ + +void main() +{ + object oArea = GetArea(OBJECT_SELF); + location lLocation = GetLocation(OBJECT_SELF); + object oTG = GetFirstObjectInArea(oArea); + + int nRoll = 2 + d4(); + int bonus = ( (GetCasterLevel(OBJECT_SELF)-20) / 10 ); + if(bonus < 1 || bonus >40) + { bonus = 0; } + + SendMessageToPC(OBJECT_SELF, "Time stopped for " + IntToString(nRoll+bonus) + " rounds."); + + while (oTG != OBJECT_INVALID) + { + if(GetObjectType(oTG) == OBJECT_TYPE_CREATURE && oTG != OBJECT_SELF){ + if(!GetIsObjectValid(GetMaster(oTG))){ + DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneDominated(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); + } + else{ + DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectKnockdown(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); + } + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BLUR), oTG, 3.75f); + DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneImmobilize(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); + } + oTG = GetNextObjectInArea(oArea); + } + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), lLocation); +} diff --git a/_module/_removed files/nw_s0_timestop3.nss b/_module/_removed files/nw_s0_timestop3.nss new file mode 100644 index 00000000..6af4d98e --- /dev/null +++ b/_module/_removed files/nw_s0_timestop3.nss @@ -0,0 +1,76 @@ +// Function to get creature(s) within radius and apply the alternate TimeStop + +int TestScrollUsage() +{ + int n = GetLevelByClass(CLASS_TYPE_BARD) + + GetLevelByClass(CLASS_TYPE_SORCERER) + + GetLevelByClass(CLASS_TYPE_WIZARD) + + GetLevelByClass(CLASS_TYPE_ROGUE); + return Random(15) < n; +} +// Begin Main Function +void main() + { + int fDur = 12+ d6(); + float dur = IntToFloat(fDur); + + if (!TestScrollUsage() && !GetIsDM(OBJECT_SELF) && GetRacialType(OBJECT_SELF) != RACIAL_TYPE_DRAGON) { + SendMessageToPC(OBJECT_SELF, "Casting from item failed"); + return; + } + int nRoll; + int nRoll2 = d4(); + if (nRoll2 == 1){nRoll = 2;} + if (nRoll2 == 2 || nRoll2 == 3){nRoll = 3;} + if (nRoll2 == 4){nRoll = 4;} + + object dragon = GetNearestCreature(CREATURE_TYPE_RACIAL_TYPE, RACIAL_TYPE_DRAGON); + object area = GetArea(dragon); + + string pc = GetPCPlayerName(OBJECT_SELF); + + object area2 = GetArea(OBJECT_SELF); + string busted = GetName(area2); + if (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON){ + area = GetArea(GetWaypointByTag("sage")); + fDur = 18+ d6();} + if (dragon != OBJECT_INVALID && area == area2){ + SendMessageToPC(OBJECT_SELF, "There is a disturbance in the time stream, and you cannot cast Time Stop."); + return; + } + + + if (GetLocalInt(GetArea(OBJECT_SELF), "streamed")==2) { + SendMessageToPC(OBJECT_SELF, "Time is already stopped"); + return; + } + + DelayCommand(1.0, SetLocalInt(GetArea(OBJECT_SELF), "streamed", 2)); + DelayCommand(dur, DeleteLocalInt(OBJECT_SELF, "streamed")); + //Signal event to start the TimeStop + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); + // Begin custom TimeStop + SendMessageToAllDMs("Timestop cast by " + pc + " in " + busted); + +float fDist = 200.0; + object oNearestC; // Define nearest creature + // Begin loop to find all creatures within the fDist meter radius + oNearestC = GetFirstObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE); + while(GetIsObjectValid(oNearestC)) + { + + + + // This makes sure the Caster is not Timestopped and skips any PC's/NPC's associates + if (oNearestC != OBJECT_SELF) { + AssignCommand(oNearestC, ClearAllActions()); + DelayCommand(0.01, SetCommandable( FALSE, oNearestC )); + DelayCommand(dur, SetCommandable( FALSE, oNearestC )); + + } + // Get the next creature in the fDist meter radius and continue loop + oNearestC = GetNextObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE); + } + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), GetSpellTargetLocation()); +} diff --git a/_module/_removed files/nw_s0_vamptch.nss b/_module/_removed files/nw_s0_vamptch.nss new file mode 100644 index 00000000..d81a1e42 --- /dev/null +++ b/_module/_removed files/nw_s0_vamptch.nss @@ -0,0 +1,125 @@ +//:://///////////////////////////////////////////// +//:: Vampiric Touch +//:: NW_S0_VampTch +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + drain 1d6 + HP per 2 caster levels from the target. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 29, 2001 +//::////////////////////////////////////////////// + +/* +bugfix by Kovi 2002.07.22 +- did double damage with maximize +- temporary hp was stacked +2002.08.25 +- got temporary hp some immune creatures (Negative Energy Protection), lost +temporary hp against other resistant (SR, Shadow Shield) + +Georg 2003-09-11 +- Put in melee touch attack check, as the fixed attack bonus is now calculated correctly + +*/ + +#include "x0_I0_SPELLS" + + +#include "x2_inc_spellhook" + +void main() +{ + + //-------------------------------------------------------------------------- + /* Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + */ + //-------------------------------------------------------------------------- + + if (!X2PreSpellCastCode()) + { + return; + } + //-------------------------------------------------------------------------- + // End of Spell Cast Hook + //-------------------------------------------------------------------------- + + + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDDice = nCasterLevel /2; + if ((nDDice) == 0) + { + nDDice = 1; + } + //-------------------------------------------------------------------------- + // GZ: Cap according to the book + //-------------------------------------------------------------------------- + else if (nDDice>20) + { + nDDice = 20; + } + + int nDamage = d6(nDDice); + + //-------------------------------------------------------------------------- + //Enter Metamagic conditions + //-------------------------------------------------------------------------- + + nDamage = MaximizeOrEmpower(6,nDDice,nMetaMagic); + int nDuration = nCasterLevel/2; + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration *= 2; + } + + //-------------------------------------------------------------------------- + //Limit damage to max hp + 10 + //-------------------------------------------------------------------------- + int nMax = GetCurrentHitPoints(oTarget) + 20; + if(nMax < nDamage) + { + nDamage = nMax; + } + + effect eHeal = EffectTemporaryHitpoints(nDamage); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eHeal, eDur); + + effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); + if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + if(!GetIsReactionTypeFriendly(oTarget) && + GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD && + GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && + !GetHasSpellEffect(SPELL_NEGATIVE_ENERGY_PROTECTION, oTarget)) + { + + + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, FALSE)); + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, TRUE)); + // GZ: * GetSpellCastItem() == OBJECT_INVALID is used to prevent feedback from showing up when used as OnHitCastSpell property + if (TouchAttackMelee(oTarget,GetSpellCastItem() == OBJECT_INVALID)>0) + { + if(MyResistSpell(OBJECT_SELF, oTarget) == 0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, OBJECT_SELF); + RemoveTempHitPoints(); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration)); + } + } + } + } +} diff --git a/_module/_removed files/nw_s0_wallfirea.nss b/_module/_removed files/nw_s0_wallfirea.nss new file mode 100644 index 00000000..03b09932 --- /dev/null +++ b/_module/_removed files/nw_s0_wallfirea.nss @@ -0,0 +1,60 @@ +//:://///////////////////////////////////////////// +//:: Wall of Fire: On Enter +//:: NW_S0_WallFireA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Person within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Capture the first target object in the shape. + oTarget = GetEnteringObject(); + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE)); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + //Roll damage. + nDamage = d6(4) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 40;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} diff --git a/_module/_removed files/nw_s0_wallfirec.nss b/_module/_removed files/nw_s0_wallfirec.nss new file mode 100644 index 00000000..fcf7c778 --- /dev/null +++ b/_module/_removed files/nw_s0_wallfirec.nss @@ -0,0 +1,78 @@ +//:://///////////////////////////////////////////// +//:: Wall of Fire: Heartbeat +//:: NW_S0_WallFireA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Person within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Capture the first target object in the shape. + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Declare the spell shape, size and the location. + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE)); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + //Roll damage. + nDamage = d6(4) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 40;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, 1.0); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_module/_removed files/nwnx_admin_t.nss b/_module/_removed files/nwnx_admin_t.nss new file mode 100644 index 00000000..113ce5ef --- /dev/null +++ b/_module/_removed files/nwnx_admin_t.nss @@ -0,0 +1,26 @@ +#include "nwnx_admin" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Administration unit test begin.."); + + string sString = "FuzzyKittens"; + + NWNX_Administration_SetPlayerPassword(sString); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}PlayerPassword", NWNX_Administration_GetPlayerPassword() == sString); + + NWNX_Administration_ClearPlayerPassword(); + NWNX_Tests_Report("NWNX_Administration", "ClearPlayerPassword", NWNX_Administration_GetPlayerPassword() == ""); + + NWNX_Administration_SetDMPassword(sString); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}DMPassword", NWNX_Administration_GetDMPassword() == sString); + + NWNX_Administration_SetPlayOption(NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS, TRUE); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}PlayOption", NWNX_Administration_GetPlayOption(NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS)); + + NWNX_Administration_SetDebugValue(NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED, TRUE); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}DebugValue", NWNX_Administration_GetDebugValue(NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED)); + + WriteTimestampedLogEntry("NWNX_Administration unit test end."); +} diff --git a/_module/_removed files/nwnx_area_t.nss b/_module/_removed files/nwnx_area_t.nss new file mode 100644 index 00000000..0cef05af --- /dev/null +++ b/_module/_removed files/nwnx_area_t.nss @@ -0,0 +1,73 @@ +#include "nwnx_area" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Area unit test begin.."); + + object oArea = GetAreaFromLocation(GetStartingLocation()); + + if (GetIsObjectValid(oArea)) + { + WriteTimestampedLogEntry("Using starting area: " + GetName(oArea)); + + object oPC = GetFirstPC(); + + if (GetIsObjectValid(oPC) && GetArea(oPC) == oArea) + { + NWNX_Tests_Report("NWNX_Area", "GetNumberOfPlayersInArea", NWNX_Area_GetNumberOfPlayersInArea(oArea) == 1); + } + else + { + WriteTimestampedLogEntry("No player in area, skipping 'GetNumberOfPlayersInArea' test"); + } + + NWNX_Area_SetPVPSetting(oArea, NWNX_AREA_PVP_SETTING_PARTY_PVP); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}PVPSetting", NWNX_Area_GetPVPSetting(oArea) == NWNX_AREA_PVP_SETTING_PARTY_PVP); + + NWNX_Area_SetAreaSpotModifier(oArea, 25); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}AreaSpotModifier", NWNX_Area_GetAreaSpotModifier(oArea) == 25); + + NWNX_Area_SetAreaListenModifier(oArea, 25); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}AreaListenModifier", NWNX_Area_GetAreaListenModifier(oArea) == 25); + + NWNX_Area_SetNoRestingAllowed(oArea, TRUE); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}NoRestingAllowed", NWNX_Area_GetNoRestingAllowed(oArea)); + + NWNX_Area_SetWindPower(oArea, 2); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}WindPower", NWNX_Area_GetWindPower(oArea) == 2); + + NWNX_Area_SetWeatherChance(oArea, NWNX_AREA_WEATHER_CHANCE_LIGHTNING, 50); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}WeatherChance", NWNX_Area_GetWeatherChance(oArea, NWNX_AREA_WEATHER_CHANCE_LIGHTNING) == 50); + + NWNX_Area_SetFogClipDistance(oArea, 12.5f); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}FogClipDistance", NWNX_Area_GetFogClipDistance(oArea) == 12.5f); + + NWNX_Area_SetShadowOpacity(oArea, 75); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}ShadowOpacity", NWNX_Area_GetShadowOpacity(oArea) == 75); + + NWNX_Area_SetDayNightCycle(oArea, NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}DayNightCycle", NWNX_Area_GetDayNightCycle(oArea) == NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK); + + NWNX_Area_SetSunMoonColors(oArea, NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE, FOG_COLOR_GREEN); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}SunMoonColors", NWNX_Area_GetSunMoonColors(oArea, NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE) == FOG_COLOR_GREEN); + + vector vLoc = GetPositionFromLocation(GetStartingLocation()); + object oWP = CreateObject(OBJECT_TYPE_WAYPOINT, "nw_waypoint001", GetStartingLocation()); + object oAT = NWNX_Area_CreateTransition(oArea, oWP, vLoc.x, vLoc.y, vLoc.z); + NWNX_Tests_Report("NWNX_Area", "CreateTransition", oAT != OBJECT_INVALID); + + string sResult = NWNX_Area_GetTileModelResRef(oArea, vLoc.x, vLoc.y); + NWNX_Tests_Report("NWNX_Area", "GetTileModelResRef", sResult != ""); + + NWNX_Area_SetTileAnimationLoop(oArea, vLoc.x, vLoc.y, 1, FALSE); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}TileAnimationLoop", NWNX_Area_GetTileAnimationLoop(oArea, vLoc.x, vLoc.y, 1) == FALSE); + } + else + { + WriteTimestampedLogEntry("No valid area found, aborting."); + } + + + WriteTimestampedLogEntry("NWNX_Area unit test end."); +} diff --git a/_module/_removed files/nwnx_chat_t.nss b/_module/_removed files/nwnx_chat_t.nss new file mode 100644 index 00000000..03c35cea --- /dev/null +++ b/_module/_removed files/nwnx_chat_t.nss @@ -0,0 +1,20 @@ +#include "nwnx_chat" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Chat unit test begin.."); + + float fDefaultTalk = NWNX_Chat_GetChatHearingDistance(); + NWNX_Chat_SetChatHearingDistance(fDefaultTalk + 10.0f); + + NWNX_Tests_Report("NWNX_Chat", "SetChatHearingDistance Default", fDefaultTalk == NWNX_Chat_GetChatHearingDistance() - 10.0f); + + object oPC = GetFirstPC(); + float fPCWhisper = NWNX_Chat_GetChatHearingDistance(oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER); + NWNX_Chat_SetChatHearingDistance(fPCWhisper + 2.0f, oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER); + + NWNX_Tests_Report("NWNX_Chat", "SetChatHearingDistance Per PC", fPCWhisper == NWNX_Chat_GetChatHearingDistance(oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER) - 2.0f); + + WriteTimestampedLogEntry("NWNX_Chat unit test end."); +} diff --git a/_module/_removed files/nwnx_creature_t.nss b/_module/_removed files/nwnx_creature_t.nss new file mode 100644 index 00000000..ee192a66 --- /dev/null +++ b/_module/_removed files/nwnx_creature_t.nss @@ -0,0 +1,256 @@ +#include "nwnx_creature" +#include "nwnx_tests" + +const int FEAT_BARBARIAN_RAGE_2 = 326; + +void main() +{ + WriteTimestampedLogEntry("NWNX_Creature unit test begin.."); + + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); + return; + } + + + // + // FEAT related functions + // + + int nFeatCountLvl1 = NWNX_Creature_GetFeatCountByLevel(oCreature, 1); + int nFeatCountTotal = NWNX_Creature_GetFeatCount(oCreature); + + NWNX_Tests_Report("NWNX_Creature", "GetKnowsFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 0); + + NWNX_Creature_AddFeat(oCreature, FEAT_PLAYER_TOOL_01); + NWNX_Tests_Report("NWNX_Creature", "AddFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 1); + + NWNX_Tests_Report("NWNX_Creature", "GetFeatCountByLevel", NWNX_Creature_GetFeatCountByLevel(oCreature, 1) == nFeatCountLvl1); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == (nFeatCountTotal+1)); + + NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == FEAT_PLAYER_TOOL_01); + + NWNX_Creature_RemoveFeat(oCreature, FEAT_PLAYER_TOOL_01); + NWNX_Tests_Report("NWNX_Creature", "RemoveFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 0); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == nFeatCountTotal); + NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == -1); + + NWNX_Creature_AddFeatByLevel(oCreature, FEAT_PLAYER_TOOL_01, 1); + NWNX_Tests_Report("NWNX_Creature", "AddFeatByLevel", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 1); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCountByLevel", NWNX_Creature_GetFeatCountByLevel(oCreature, 1) > nFeatCountLvl1); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == (nFeatCountTotal+1)); + NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == FEAT_PLAYER_TOOL_01); + + NWNX_Tests_Report("NWNX_Creature", "GetFeatByLevel", NWNX_Creature_GetFeatByLevel(oCreature, 1, nFeatCountLvl1) == FEAT_PLAYER_TOOL_01); + NWNX_Tests_Report("NWNX_Creature", "GetFeatGrantLevel", NWNX_Creature_GetFeatGrantLevel(oCreature, FEAT_PLAYER_TOOL_01) == 1); + + NWNX_Creature_AddFeat(oCreature, FEAT_BARBARIAN_RAGE); + NWNX_Tests_Report("NWNX_Creature", "GetHighestLevelOfFeat", NWNX_Creature_GetHighestLevelOfFeat(oCreature, FEAT_BARBARIAN_RAGE) == FEAT_BARBARIAN_RAGE); + NWNX_Creature_AddFeat(oCreature, FEAT_BARBARIAN_RAGE_2); + NWNX_Tests_Report("NWNX_Creature", "GetHighestLevelOfFeat", NWNX_Creature_GetHighestLevelOfFeat(oCreature, FEAT_BARBARIAN_RAGE) == FEAT_BARBARIAN_RAGE_2); + + NWNX_Creature_AddFeat(oCreature, FEAT_STUNNING_FIST); + NWNX_Tests_Report("NWNX_Creature", "GetFeatRemainingUses", NWNX_Creature_GetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST) == 1); + NWNX_Creature_SetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST, 0); + NWNX_Tests_Report("NWNX_Creature", "GetFeatRemainingUses", NWNX_Creature_GetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST) == 0); + + int uses = NWNX_Creature_GetFeatTotalUses(oCreature, FEAT_STUNNING_FIST); + WriteTimestampedLogEntry("Creature has " + IntToString(uses) + " total uses of STUNNING FIST left"); + + // + // SPECIAL ABILITY functions + // + struct NWNX_Creature_SpecialAbility ability; + ability.id = 1; ability.ready = 1; ability.level = 1; + + int nAbilityCount = NWNX_Creature_GetSpecialAbilityCount(oCreature); + NWNX_Creature_AddSpecialAbility(oCreature, ability); + NWNX_Tests_Report("NWNX_Creature", "AddSpecialAbility", NWNX_Creature_GetSpecialAbilityCount(oCreature) > nAbilityCount); + + ability = NWNX_Creature_GetSpecialAbility(oCreature, nAbilityCount); + NWNX_Tests_Report("NWNX_Creature", "GetSpecialAbility", ability.id == 1); + + NWNX_Creature_RemoveSpecialAbility(oCreature, nAbilityCount); + NWNX_Tests_Report("NWNX_Creature", "RemoveSpecialAbility", NWNX_Creature_GetSpecialAbilityCount(oCreature) == nAbilityCount); + + // + // SPELL functions + // + // TODO: Need a wizard. + + // + // MISC + // + + int nBaseAC = NWNX_Creature_GetBaseAC(oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetBaseAC", nBaseAC >= 0); + + NWNX_Creature_SetBaseAC(oCreature, nBaseAC + 5); + NWNX_Tests_Report("NWNX_Creature", "SetBaseAC", NWNX_Creature_GetBaseAC(oCreature) > nBaseAC); + + + int nOldStr = GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE); + NWNX_Creature_SetRawAbilityScore(oCreature, ABILITY_STRENGTH, 25); + NWNX_Tests_Report("NWNX_Creature", "SetAbilityScore", nOldStr != GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE)); + NWNX_Tests_Report("NWNX_Creature", "SetAbilityScore", 25 == GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE)); + + ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPolymorph(POLYMORPH_TYPE_BADGER), oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetPrePolymorphAbilityScore", 25 == NWNX_Creature_GetPrePolymorphAbilityScore(oCreature, ABILITY_STRENGTH)); + RemoveEffect(oCreature, GetFirstEffect(oCreature)); + + NWNX_Tests_Report("NWNX_Creature", "GetMovementRateFactor", 1.0 == NWNX_Creature_GetMovementRateFactor(oCreature)); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectMovementSpeedIncrease(25), oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetMovementRateFactor", 1.25 == NWNX_Creature_GetMovementRateFactor(oCreature)); + NWNX_Creature_SetMovementRateFactor(oCreature, 1.5); + NWNX_Tests_Report("NWNX_Creature", "SetMovementRateFactor", 1.5 == NWNX_Creature_GetMovementRateFactor(oCreature)); + + int nLvl1HP = NWNX_Creature_GetMaxHitPointsByLevel(oCreature, 1); + NWNX_Tests_Report("NWNX_Creature", "GetMaxHitPointsByLevel", nLvl1HP >= 0); + + NWNX_Creature_SetMaxHitPointsByLevel(oCreature, 1, nLvl1HP + 5); + NWNX_Tests_Report("NWNX_Creature", "SetMaxHitPointsByLevel", NWNX_Creature_GetMaxHitPointsByLevel(oCreature, 1) > nLvl1HP); + + + int nSkillRanks = GetSkillRank(SKILL_LISTEN, oCreature, TRUE); + NWNX_Creature_SetSkillRank(oCreature, SKILL_LISTEN, nSkillRanks + 5); + NWNX_Tests_Report("NWNX_Creature", "SetSkillRank", GetSkillRank(SKILL_LISTEN, oCreature, TRUE) > nSkillRanks); + + int nBAB = GetBaseAttackBonus(oCreature); + NWNX_Creature_SetBaseAttackBonus(oCreature, 6); + NWNX_Tests_Report("NWNX_Creature", "SetBaseAttackBonus", GetBaseAttackBonus(oCreature) == 6); + SetBaseAttackBonus(4, oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - base", NWNX_Creature_GetAttacksPerRound(oCreature, TRUE) == 2); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - override", NWNX_Creature_GetAttacksPerRound(oCreature, FALSE) == 4); + RestoreBaseAttackBonus(oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - base", NWNX_Creature_GetAttacksPerRound(oCreature, TRUE) == 2); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - override", NWNX_Creature_GetAttacksPerRound(oCreature, FALSE) == 2); + + int nGender = GetGender(oCreature); + NWNX_Creature_SetGender(oCreature, !nGender); + NWNX_Tests_Report("NWNX_Creature", "SetGender", GetGender(oCreature) != nGender); + + int nSize = GetCreatureSize(oCreature); + NWNX_Creature_SetSize(oCreature, nSize + 1); + NWNX_Tests_Report("NWNX_Creature", "SetSize", GetCreatureSize(oCreature) != nSize); + + int nSkillPointsRemaining = NWNX_Creature_GetSkillPointsRemaining(oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetSkillPointsRemaining", nSkillPointsRemaining >= 0); + NWNX_Creature_SetSkillPointsRemaining(oCreature, nSkillPointsRemaining+1); + NWNX_Tests_Report("NWNX_Creature", "SetSkillPointsRemaining", NWNX_Creature_GetSkillPointsRemaining(oCreature) == nSkillPointsRemaining+1); + + int nGold = GetGold(oCreature); + NWNX_Creature_SetGold(oCreature, nGold + 100); + NWNX_Tests_Report("NWNX_Creature", "SetGold", GetGold(oCreature) == (nGold+100)); + + int nSave = NWNX_Creature_GetBaseSavingThrow(oCreature, SAVING_THROW_WILL); + NWNX_Creature_SetBaseSavingThrow(oCreature, SAVING_THROW_WILL, nSave + 10); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etBaseSavingThrow", NWNX_Creature_GetBaseSavingThrow(oCreature, SAVING_THROW_WILL) == nSave+10); + + + int cls = NWNX_Creature_GetClassByLevel(oCreature, 1); + NWNX_Creature_LevelUp(oCreature, cls, 10); + NWNX_Tests_Report("NWNX_Creature", "LevelUp", GetLevelByPosition(1, oCreature) == 11); + NWNX_Creature_LevelDown(oCreature, 10); + NWNX_Tests_Report("NWNX_Creature", "LevelDown", GetLevelByPosition(1, oCreature) == 1); + NWNX_Creature_SetClassByPosition(oCreature, 0, CLASS_TYPE_ROGUE); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Tests_Report("NWNX_Creature", "LevelUp+SetLevelByPosition", GetLevelByPosition(1, oCreature) == 60); + + NWNX_Creature_SetLevelByPosition(oCreature, 0, 1); // Ugh, game uses 1-based indexing here.. + NWNX_Tests_Report("NWNX_Creature", "SetLevelByPosition", GetLevelByPosition(1, oCreature) == 1); + + float fCR = GetChallengeRating(oCreature); + NWNX_Creature_SetChallengeRating(oCreature, fCR + 1.0); + NWNX_Tests_Report("NWNX_Creature", "SetChallengeRating", GetChallengeRating(oCreature) == (fCR + 1.0)); + + int iOldBonus = NWNX_Creature_GetTotalEffectBonus(oCreature, NWNX_CREATURE_BONUS_TYPE_ABILITY, OBJECT_INVALID, 0, 0, -1, -1, -1, ABILITY_STRENGTH); + effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH,1); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStr, oCreature, 2.0f); + int iNewBonus = NWNX_Creature_GetTotalEffectBonus(oCreature, NWNX_CREATURE_BONUS_TYPE_ABILITY, OBJECT_INVALID, 0, 0, -1, -1, -1, ABILITY_STRENGTH); + NWNX_Tests_Report("NWNX_Creature", "GetTotalEffectBonus", iOldBonus+1 == iNewBonus); + + int iSR = GetSpellResistance(oCreature); + NWNX_Creature_SetSpellResistance(oCreature, iSR + 10); + NWNX_Tests_Report("NWNX_Creature", "SetSpellResistance", GetSpellResistance(oCreature) == (iSR + 10)); + + NWNX_Creature_SetAnimalCompanionCreatureType(oCreature, ANIMAL_COMPANION_CREATURE_TYPE_PANTHER); + NWNX_Tests_Report("NWNX_Creature", "SetAnimalCompanionCreatureType", GetAnimalCompanionCreatureType(oCreature) == ANIMAL_COMPANION_CREATURE_TYPE_PANTHER); + + NWNX_Creature_SetFamiliarCreatureType(oCreature, FAMILIAR_CREATURE_TYPE_PSEUDO_DRAGON); + NWNX_Tests_Report("NWNX_Creature", "SetFamiliarCreatureType", GetFamiliarCreatureType(oCreature) == FAMILIAR_CREATURE_TYPE_PSEUDO_DRAGON); + + NWNX_Creature_SetAnimalCompanionName(oCreature, "Fuzzles"); + NWNX_Tests_Report("NWNX_Creature", "SetAnimalCompanionName", GetAnimalCompanionName(oCreature) == "Fuzzles"); + + NWNX_Creature_SetFamiliarName(oCreature, "Fuzzles"); + NWNX_Tests_Report("NWNX_Creature", "SetFamiliarName", GetFamiliarName(oCreature) == "Fuzzles"); + + int bDisarmable = NWNX_Creature_GetDisarmable(oCreature); + NWNX_Creature_SetDisarmable(oCreature, !bDisarmable); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDisarmable", NWNX_Creature_GetDisarmable(oCreature) != bDisarmable); + + //Spawn a Wizard + oCreature = CreateObject(OBJECT_TYPE_CREATURE, "NW_ELFMAGE001", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); + return; + } + + //Test specialization functions on a class that has specialization + int nSchool = NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_WIZARD); + NWNX_Creature_SetSpecialization(oCreature, CLASS_TYPE_WIZARD, (nSchool+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_WIZARD) == (nSchool+1)%5); + + //Test old functions for compatibility (deprecated) + nSchool = NWNX_Creature_GetWizardSpecialization(oCreature); + NWNX_Creature_SetWizardSpecialization(oCreature, (nSchool+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etWizardSpecialization", NWNX_Creature_GetWizardSpecialization(oCreature) == (nSchool+1)%5); + + //Test domain functions on a class that doesn't have domains + int nDomain = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1); + NWNX_Tests_Report("NWNX_Creature", "GetDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1) == 0); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_WIZARD, 1, (nDomain+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1) == (nDomain+1)%5); + int nDomain2 = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2); + NWNX_Tests_Report("NWNX_Creature", "GetDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2) == 0); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_WIZARD, 2, (nDomain2+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2) == (nDomain2+1)%5); + + //Spawn a cleric + oCreature = CreateObject(OBJECT_TYPE_CREATURE, "NW_BANDIT004", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); + return; + } + + //Test specialization functions on a class that doesn't have specialization + nSchool = NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC); + NWNX_Tests_Report("NWNX_Creature", "GetSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC) == 0); + NWNX_Creature_SetSpecialization(oCreature, CLASS_TYPE_CLERIC, (nSchool+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC) == (nSchool+1)%5); + + //Test domain functions on a class that has domains + nDomain = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 1); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_CLERIC, 1, (nDomain+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 1) == (nDomain+1)%5); + nDomain2 = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 2); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_CLERIC, 2, (nDomain2+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 2) == (nDomain2+1)%5); + + //Test old functions for compatibility (deprecated) + nDomain = NWNX_Creature_GetClericDomain(oCreature, 1); + NWNX_Creature_SetClericDomain(oCreature, 1, (nDomain+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etClericDomain", NWNX_Creature_GetClericDomain(oCreature, 1) == (nDomain+1)%5); + nDomain2 = NWNX_Creature_GetClericDomain(oCreature, 2); + NWNX_Creature_SetClericDomain(oCreature, 2, (nDomain2+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etClericDomain", NWNX_Creature_GetClericDomain(oCreature, 2) == (nDomain2+1)%5); + + WriteTimestampedLogEntry("NWNX_Creature unit test end."); +} diff --git a/_module/_removed files/nwnx_dialog_t.nss b/_module/_removed files/nwnx_dialog_t.nss new file mode 100644 index 00000000..ff74404f --- /dev/null +++ b/_module/_removed files/nwnx_dialog_t.nss @@ -0,0 +1,37 @@ +#include "nwnx_dialog" + +void _report() +{ + string sMessage = "NWNX_Dialog debug:"; + int id = NWNX_Dialog_GetCurrentNodeID(); + sMessage = "\nNode ID = " + IntToString(id); + + int type = NWNX_Dialog_GetCurrentNodeType(); + sMessage += "\nCurrent node type = " + IntToString(type) + " ("; + switch (type) + { + case NWNX_DIALOG_NODE_TYPE_INVALID: sMessage += "INVALID)"; break; + case NWNX_DIALOG_NODE_TYPE_STARTING_NODE: sMessage += "STARTING_NODE)"; break; + case NWNX_DIALOG_NODE_TYPE_ENTRY_NODE: sMessage += "ENTRY_NODE)"; break; + case NWNX_DIALOG_NODE_TYPE_REPLY_NODE: sMessage += "REPLY_NODE)"; break; + } + + int scripttype = NWNX_Dialog_GetCurrentScriptType(); + sMessage += "\nScript type = " + IntToString(scripttype) + " ("; + switch (scripttype) + { + case NWNX_DIALOG_SCRIPT_TYPE_OTHER: sMessage += "OTHER)"; break; + case NWNX_DIALOG_SCRIPT_TYPE_STARTING_CONDITIONAL: sMessage += "STARTING_CONDITIONAL)"; break; + case NWNX_DIALOG_SCRIPT_TYPE_ACTION_TAKEN: sMessage += "ACTION_TAKEN)"; break; + } + + int index = NWNX_Dialog_GetCurrentNodeIndex(); + sMessage += "\nNode index = " + IntToString(index); + + string text = NWNX_Dialog_GetCurrentNodeText(); + sMessage += "\nText = '" + text + "'"; + + NWNX_Dialog_SetCurrentNodeText(text + " [ADDED]"); + + SendMessageToPC(GetFirstPC(), sMessage); +} diff --git a/_module/_removed files/nwnx_dialog_t1.nss b/_module/_removed files/nwnx_dialog_t1.nss new file mode 100644 index 00000000..11f93fd7 --- /dev/null +++ b/_module/_removed files/nwnx_dialog_t1.nss @@ -0,0 +1,7 @@ +#include "nwnx_dialog_t" + +int StartingConditional() +{ + _report(); + return FALSE; +} diff --git a/_module/_removed files/nwnx_dialog_t2.nss b/_module/_removed files/nwnx_dialog_t2.nss new file mode 100644 index 00000000..7249a40f --- /dev/null +++ b/_module/_removed files/nwnx_dialog_t2.nss @@ -0,0 +1,7 @@ +#include "nwnx_dialog_t" + +int StartingConditional() +{ + _report(); + return TRUE; +} diff --git a/_module/_removed files/nwnx_dialog_t3.nss b/_module/_removed files/nwnx_dialog_t3.nss new file mode 100644 index 00000000..fb2a52e8 --- /dev/null +++ b/_module/_removed files/nwnx_dialog_t3.nss @@ -0,0 +1,6 @@ +#include "nwnx_dialog_t" + +void main() +{ + _report(); +} diff --git a/_module/_removed files/nwnx_effect_t.nss b/_module/_removed files/nwnx_effect_t.nss new file mode 100644 index 00000000..52431842 --- /dev/null +++ b/_module/_removed files/nwnx_effect_t.nss @@ -0,0 +1,80 @@ +#include "nwnx_effect" +#include "nwnx_tests" + +void printeff(struct NWNX_EffectUnpacked n) +{ + string s = "Unpacked effect: \n"; + s += "nType = " + IntToString(n.nType) + "\n"; + s += "nSubType = " + IntToString(n.nSubType) + "\n"; + + s += "fDuration = " + FloatToString(n.fDuration) + "\n"; + s += "nExpiryCalendarDay = " + IntToString(n.nExpiryCalendarDay) + "\n"; + s += "nExpiryTimeOfDay = " + IntToString(n.nExpiryTimeOfDay) + "\n"; + + s += "oCreator = " + ObjectToString(n.oCreator) + "\n"; + s += "nSpellId = " + IntToString(n.nSpellId) + "\n"; + s += "bExpose = " + IntToString(n.bExpose) + "\n"; + s += "bShowIcon = " + IntToString(n.bShowIcon) + "\n"; + s += "nCasterLevel = " + IntToString(n.nCasterLevel) + "\n"; + + s += "bLinkLeftValid = " + IntToString(n.bLinkLeftValid) + "\n"; + struct NWNX_EffectUnpacked link = NWNX_Effect_UnpackEffect(n.eLinkLeft); + s += "bLinkLeft (nType) = " + IntToString(link.nType) + "\n"; + s += "bLinkRightValid = " + IntToString(n.bLinkRightValid) + "\n"; + link = NWNX_Effect_UnpackEffect(n.eLinkRight); + s += "bLinkRight (nType) = " + IntToString(link.nType) + "\n"; + + s += "nNumIntegers = " + IntToString(n.nNumIntegers) + "\n"; + s += "nParam0 = " + IntToString(n.nParam0) + "\n"; + s += "nParam1 = " + IntToString(n.nParam1) + "\n"; + s += "nParam2 = " + IntToString(n.nParam2) + "\n"; + s += "nParam3 = " + IntToString(n.nParam3) + "\n"; + s += "nParam4 = " + IntToString(n.nParam4) + "\n"; + s += "nParam5 = " + IntToString(n.nParam5) + "\n"; + s += "nParam6 = " + IntToString(n.nParam6) + "\n"; + s += "nParam7 = " + IntToString(n.nParam7) + "\n"; + s += "fParam0 = " + FloatToString(n.fParam0) + "\n"; + s += "fParam1 = " + FloatToString(n.fParam1) + "\n"; + s += "fParam2 = " + FloatToString(n.fParam2) + "\n"; + s += "fParam3 = " + FloatToString(n.fParam3) + "\n"; + s += "sParam0 = " + "'" + n.sParam0 + "'" + "\n"; + s += "sParam1 = " + "'" + n.sParam1 + "'" + "\n"; + s += "sParam2 = " + "'" + n.sParam2 + "'" + "\n"; + s += "sParam3 = " + "'" + n.sParam3 + "'" + "\n"; + s += "sParam4 = " + "'" + n.sParam4 + "'" + "\n"; + s += "sParam5 = " + "'" + n.sParam5 + "'" + "\n"; + s += "oParam0 = " + ObjectToString(n.oParam0) + "\n"; + s += "oParam1 = " + ObjectToString(n.oParam1) + "\n"; + s += "oParam2 = " + ObjectToString(n.oParam2) + "\n"; + s += "oParam3 = " + ObjectToString(n.oParam3) + "\n"; + + s += "sTag = " + "'" + n.sTag + "'" + "\n"; + + WriteTimestampedLogEntry(s); +} + +void main() +{ + WriteTimestampedLogEntry("NWNX_Effect unit test begin.."); + + effect eCurse = EffectCurse(1, 2, 3, 4, 5, 6); + effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN); + effect e = EffectLinkEffects(eCurse, eVis); + e = TagEffect(e, "NWNX_EFFECT_TEST"); + + struct NWNX_EffectUnpacked unpacked = NWNX_Effect_UnpackEffect(e); + printeff(unpacked); + NWNX_Tests_Report("NWNX_Effect", "UnpackEffect", unpacked.sTag == "NWNX_EFFECT_TEST"); + + effect packed = NWNX_Effect_PackEffect(unpacked); + NWNX_Tests_Report("NWNX_Effect", "PackEffect", GetEffectTag(packed) == "NWNX_EFFECT_TEST"); + + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, packed, oCreature); + + e = NWNX_Effect_SetEffectExpiredScript(EffectDarkness(), "effect_test"); + unpacked = NWNX_Effect_UnpackEffect(e); + NWNX_Tests_Report("NWNX_Effect", "SetEffectExpiredScript", unpacked.sParam4 == "effect_test"); + + WriteTimestampedLogEntry("NWNX_Effect unit test end."); +} diff --git a/_module/_removed files/nwnx_feedback_t.nss b/_module/_removed files/nwnx_feedback_t.nss new file mode 100644 index 00000000..7a3edabc --- /dev/null +++ b/_module/_removed files/nwnx_feedback_t.nss @@ -0,0 +1,34 @@ +#include "nwnx_feedback" +#include "nwnx_tests" + +const int NWNX_FEEDBACK_REST_BEGINNING_REST = 18; +const int NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE = 3; + +void main() +{ + WriteTimestampedLogEntry("NWNX_Feedback unit test begin.."); + + NWNX_Feedback_SetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, TRUE); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}FeedbackMessageHidden (Global)", NWNX_Feedback_GetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST)); + + NWNX_Feedback_SetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, TRUE); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}CombatMessageHidden (Global)", NWNX_Feedback_GetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE)); + + object oPC = GetFirstPC(); + + if( GetIsObjectValid(oPC) ) + { + NWNX_Feedback_SetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, TRUE, oPC); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}FeedbackMessageHidden (Personal)", NWNX_Feedback_GetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, oPC)); + + NWNX_Feedback_SetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, TRUE, oPC); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}CombatMessageHidden (Personal)", NWNX_Feedback_GetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, oPC)); + } + else + { + WriteTimestampedLogEntry("No valid PC found, skipping personal feedback state tests"); + } + + + WriteTimestampedLogEntry("NWNX_Feedback unit test end."); +} diff --git a/_module/_removed files/nwnx_itemprop_t.nss b/_module/_removed files/nwnx_itemprop_t.nss new file mode 100644 index 00000000..f7886565 --- /dev/null +++ b/_module/_removed files/nwnx_itemprop_t.nss @@ -0,0 +1,42 @@ +#include "nwnx_itemprop" +#include "nwnx_tests" + +void printip(struct NWNX_IPUnpacked n) +{ + string s = "Unpacked IP: \n"; + s += "nProperty = " + IntToString(n.nProperty) + "\n"; + s += "nSubType = " + IntToString(n.nSubType) + "\n"; + s += "nCostTable = " + IntToString(n.nCostTable) + "\n"; + s += "nCostTableValue = " + IntToString(n.nCostTableValue) + "\n"; + s += "nParam1 = " + IntToString(n.nParam1) + "\n"; + s += "nParam1Value = " + IntToString(n.nParam1Value) + "\n"; + s += "nUsesPerDay = " + IntToString(n.nUsesPerDay) + "\n"; + s += "nChanceToAppear = " + IntToString(n.nChanceToAppear) + "\n"; + s += "bUsable = " + IntToString(n.bUsable) + "\n"; + s += "nSpellId = " + IntToString(n.nSpellId) + "\n"; + s += "sTag = " + "'" + n.sTag + "'" + "\n"; + + WriteTimestampedLogEntry(s); +} + +void main() +{ + WriteTimestampedLogEntry("NWNX_ItemProperty unit test begin.."); + + itemproperty ip = ItemPropertyDamageBonusVsRace(1,2,3); + ip = TagItemProperty(ip, "NWNX_ItemProperty_TEST"); + + struct NWNX_IPUnpacked unpacked = NWNX_ItemProperty_UnpackIP(ip); + printip(unpacked); + NWNX_Tests_Report("NWNX_ItemProperty", "UnpackIP", unpacked.sTag == "NWNX_ItemProperty_TEST"); + + itemproperty ip2 = NWNX_ItemProperty_PackIP(unpacked); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetIsItemPropertyValid(ip2)); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyTag(ip2) == "NWNX_ItemProperty_TEST"); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyCostTable(ip2) == unpacked.nCostTable); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyCostTableValue(ip2) == unpacked.nCostTableValue); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyParam1(ip2) == unpacked.nParam1); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyParam1Value(ip2) == unpacked.nParam1Value); + + WriteTimestampedLogEntry("NWNX_ItemProperty unit test end."); +} diff --git a/_module/_removed files/nwnx_object_t.nss b/_module/_removed files/nwnx_object_t.nss new file mode 100644 index 00000000..6bf99fda --- /dev/null +++ b/_module/_removed files/nwnx_object_t.nss @@ -0,0 +1,121 @@ +#include "nwnx_object" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Object unit test begin.."); + + object o = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(o)) + { + WriteTimestampedLogEntry("NWNX_Object test: Failed to create creature"); + return; + } + + int nVarCount = NWNX_Object_GetLocalVariableCount(o); + SetLocalInt(o, "nwnx_object_test", 1); + NWNX_Tests_Report("NWNX_Object", "GetLocalVariableCount", NWNX_Object_GetLocalVariableCount(o) == (nVarCount+1)); + + struct NWNX_Object_LocalVariable lv = NWNX_Object_GetLocalVariable(o, nVarCount); + NWNX_Tests_Report("NWNX_Object", "GetLocalVariable", lv.key == "nwnx_object_test"); + NWNX_Tests_Report("NWNX_Object", "GetLocalVariable", lv.type == NWNX_OBJECT_LOCALVAR_TYPE_INT); + + string sObj = ObjectToString(o); + NWNX_Tests_Report("NWNX_Object", "StringToObject", NWNX_Object_StringToObject(sObj) == o); + NWNX_Tests_Report("NWNX_Object", "Negative: StringToObject", NWNX_Object_StringToObject("!@#!@#!@#!") == OBJECT_INVALID); + + vector vPos = GetPosition(o); + vPos.x += 1; + NWNX_Object_SetPosition(o, vPos); + NWNX_Tests_Report("NWNX_Object", "SetPosition", GetPosition(o).x == vPos.x); + + int nMaxHP = GetMaxHitPoints(o); + NWNX_Object_SetMaxHitPoints(o, nMaxHP + 1); + NWNX_Tests_Report("NWNX_Object", "SetMaxHitPoints", GetMaxHitPoints(o) == (nMaxHP + 1)); + + int nCurrHP = GetCurrentHitPoints(o); + NWNX_Object_SetCurrentHitPoints(o, nCurrHP + 1); + NWNX_Tests_Report("NWNX_Object", "SetCurrentHitPoints", GetCurrentHitPoints(o) == (nCurrHP + 1)); + + string dialog = "nwnxtest"; + NWNX_Object_SetDialogResref(o, dialog); + NWNX_Tests_Report("NWNX_Object", "SetDialogResRef/GetDialogResRef", NWNX_Object_GetDialogResref(o) == dialog); + + NWNX_Object_SetInt(o, "TestInt", 10, TRUE); + NWNX_Object_SetString(o, "TestString_1", "This is a string.", TRUE); + NWNX_Object_SetString(o, "TestString_2", "This is another string.", TRUE); + NWNX_Object_SetFloat(o, "TestFloat", 1.5f, TRUE); + NWNX_Tests_Report("NWNX_Object", "Set/GetInt", NWNX_Object_GetInt(o, "TestInt") == 10); + NWNX_Tests_Report("NWNX_Object", "Set/GetString #1", NWNX_Object_GetString(o, "TestString_1") == "This is a string."); + NWNX_Tests_Report("NWNX_Object", "Set/GetString #2", NWNX_Object_GetString(o, "TestString_2") == "This is another string."); + NWNX_Tests_Report("NWNX_Object", "Set/GetFloat", NWNX_Object_GetFloat(o, "TestFloat") == 1.5f); + + string sSerialized = NWNX_Object_Serialize(o); + NWNX_Tests_Report("NWNX_Object", "Serialize", sSerialized != ""); + WriteTimestampedLogEntry("Serialized chicken: " + sSerialized); + + object oDeserialized = NWNX_Object_Deserialize(sSerialized); + NWNX_Tests_Report("NWNX_Object", "Deserialize", GetIsObjectValid(oDeserialized)); + + NWNX_Object_DeleteInt(o, "TestInt"); + NWNX_Object_DeleteString(o, "TestString_1"); + NWNX_Object_DeleteString(o, "TestString_2"); + NWNX_Object_DeleteFloat(o, "TestFloat"); + NWNX_Tests_Report("NWNX_Object", "DeleteInt", NWNX_Object_GetInt(o, "TestInt") == 0); + NWNX_Tests_Report("NWNX_Object", "DeleteString #1", NWNX_Object_GetString(o, "TestString_1") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteString #2", NWNX_Object_GetString(o, "TestString_2") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteFloat", NWNX_Object_GetFloat(o, "TestFloat") == 0.0f); + + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetInt", NWNX_Object_GetInt(oDeserialized, "TestInt") == 10); + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetString #1", NWNX_Object_GetString(oDeserialized, "TestString_1") == "This is a string."); + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetString #2", NWNX_Object_GetString(oDeserialized, "TestString_2") == "This is another string."); + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetFloat", NWNX_Object_GetFloat(oDeserialized, "TestFloat") == 1.5f); + + NWNX_Object_DeleteVarRegex(oDeserialized, ".*TestString.*"); + + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetInt(oDeserialized, "TestInt") == 10); + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetString(oDeserialized, "TestString_1") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetString(oDeserialized, "TestString_2") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetFloat(oDeserialized, "TestFloat") == 1.5f); + + WriteTimestampedLogEntry("Deserialized " + GetName(oDeserialized) + " in " + GetName(GetArea(oDeserialized))); + + object bag = CreateObject(OBJECT_TYPE_ITEM, "nw_it_contain006", GetStartingLocation()); // Bag of holding + CreateItemOnObject("x2_it_adaplate", bag, 1); + CreateItemOnObject("x2_it_adaplate", bag, 1); + CreateItemOnObject("x2_it_adaplate", bag, 1); + int iFits = NWNX_Object_CheckFit(bag, BASE_ITEM_ARROW); + NWNX_Tests_Report("NWNX_Object", "CheckFit", iFits == 1); + iFits = NWNX_Object_CheckFit(bag, BASE_ITEM_ARMOR); + NWNX_Tests_Report("NWNX_Object", "CheckFit", iFits == 0); + object oItem = GetFirstItemInInventory(bag); + while (oItem != OBJECT_INVALID) + { + DestroyObject(oItem); + oItem = GetNextItemInInventory(bag); + } + DestroyObject(bag); + + NWNX_Tests_Report("NWNX_Object", "GetDamageImmunity", NWNX_Object_GetDamageImmunity(o, DAMAGE_TYPE_FIRE) == 0); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 50), o); + NWNX_Tests_Report("NWNX_Object", "GetDamageImmunity", NWNX_Object_GetDamageImmunity(o, DAMAGE_TYPE_FIRE) == 50); + + object oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_defportal", GetStartingLocation()); + NWNX_Object_SetPlaceableIsStatic(oPlc, 1); + NWNX_Tests_Report("NWNX_Object", "SetPlaceableIsStatic 1", NWNX_Object_GetPlaceableIsStatic(oPlc) == 1); + DestroyObject(oPlc); + + oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_driftwd1", GetStartingLocation()); + NWNX_Object_SetPlaceableIsStatic(oPlc, 0); + NWNX_Tests_Report("NWNX_Object", "SetPlaceableIsStatic 2", NWNX_Object_GetPlaceableIsStatic(oPlc) == 0); + DestroyObject(oPlc); + + oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_driftwd1", GetStartingLocation()); + NWNX_Object_SetAutoRemoveKey(oPlc, 1); + NWNX_Tests_Report("NWNX_Object", "SetAutoRemoveKey", NWNX_Object_GetAutoRemoveKey(oPlc) == 1); + DestroyObject(oPlc); + + DestroyObject(o); + DestroyObject(oDeserialized); + WriteTimestampedLogEntry("NWNX_Object unit test end."); +} diff --git a/_module/_removed files/nwnx_player_t.nss b/_module/_removed files/nwnx_player_t.nss new file mode 100644 index 00000000..574431cb --- /dev/null +++ b/_module/_removed files/nwnx_player_t.nss @@ -0,0 +1,16 @@ +#include "nwnx_player" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Player unit test begin.."); + + object oPC = GetFirstPC(); + if (!GetIsObjectValid(oPC)) + { + WriteTimestampedLogEntry("NWNX_Player test: No PC found"); + return; + } + + WriteTimestampedLogEntry("NWNX_Player unit test end."); +} diff --git a/_module/_removed files/nwnx_race_t.nss b/_module/_removed files/nwnx_race_t.nss new file mode 100644 index 00000000..48a15c79 --- /dev/null +++ b/_module/_removed files/nwnx_race_t.nss @@ -0,0 +1,33 @@ +#include "nwnx_race" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Race unit test begin.."); + + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + int iSR = GetSpellResistance(oCreature); + int iSkillRank = GetSkillRank(SKILL_HEAL, oCreature); + int iAC = GetAC(oCreature); + int iImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED); + DestroyObject(oCreature); + + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SRCHARGEN, 10); + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SKILL, SKILL_HEAL, 5); + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_AC, 1); + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_IMMUNITY, IMMUNITY_TYPE_CURSED); + + oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + int iNewSR = GetSpellResistance(oCreature); + int iNewSkillRank = GetSkillRank(SKILL_HEAL, oCreature); + int iNewAC = GetAC(oCreature); + int iNewImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED); + DestroyObject(oCreature); + + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SR", iSR == iNewSR - 10); + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SkillRank", iSkillRank == iNewSkillRank - 5); + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier AC", iAC == iNewAC - 1); + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier Immunity", iImmune != iNewImmune); + + WriteTimestampedLogEntry("NWNX_Race unit test end."); +} diff --git a/_module/_removed files/nwnx_sql_t.nss b/_module/_removed files/nwnx_sql_t.nss new file mode 100644 index 00000000..ffbb7306 --- /dev/null +++ b/_module/_removed files/nwnx_sql_t.nss @@ -0,0 +1,249 @@ +#include "nwnx_sql" +#include "nwnx_object" +#include "nwnx_tests" + +void cleanup() +{ + NWNX_Tests_Report("NWNX_SQL", "Cleanup sql_test", NWNX_SQL_ExecuteQuery("DROP TABLE sql_test")); + NWNX_Tests_Report("NWNX_SQL", "Cleanup stress_test", NWNX_SQL_ExecuteQuery("DROP TABLE stress_test")); + NWNX_Tests_Report("NWNX_SQL", "Cleanup error_test", NWNX_SQL_ExecuteQuery("DROP TABLE error_test")); +} + +void main() +{ + WriteTimestampedLogEntry("NWNX_SQL unit test begin.."); + + string db_type = GetStringUpperCase(NWNX_SQL_GetDatabaseType()); + WriteTimestampedLogEntry("Testing database " + db_type); + + string sCreate = ""; + string sInsert = ""; + + /* MySQL and SQLite version */ + if (db_type == "MYSQL" || db_type == "SQLITE") + { + sCreate = "CREATE TABLE sql_test (" + + "colInt INT, colFloat FLOAT, colStr VARCHAR(256)," + + "colObjId INT, colObj TEXT(1000000) );"; + + sInsert = "INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(?, ?, ?, ?, ?)"; + } + + /* PostgreSQL version */ + if (db_type == "POSTGRESQL") + { + sCreate = "CREATE TABLE sql_test (" + + "colInt INT, colFloat FLOAT, colStr VARCHAR(256)," + + "colObjId INT, colObj TEXT );"; + + // Even though we're using 0 based parameter numbers, PostgreSQL requires the parameter + // numbers in the actual SQL string to be 1 based (e.g. $1, $2... not $0, $1... ) + sInsert = "INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES($1, $2, $3, $4, $5)"; + } + + int b = NWNX_SQL_ExecuteQuery(sCreate); + NWNX_Tests_Report("NWNX_SQL", "Create Table", b); + + object o = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(o)) + { + WriteTimestampedLogEntry("NWNX_SQL test: Failed to create creature"); + cleanup(); + return; + } + + vector v = Vector(5.0, 5.0, 0.0); // slightly different location. + + b = NWNX_SQL_PrepareQuery(sInsert); + NWNX_Tests_Report("NWNX_SQL", "Complex PrepareQuery", b); + NWNX_Tests_Report("NWNX_SQL", "GetPreparedQueryParamCount", NWNX_SQL_GetPreparedQueryParamCount() == 5); + + NWNX_SQL_PreparedInt(0, 42); + NWNX_SQL_PreparedFloat(1, 0.42); + NWNX_SQL_PreparedString(2, "FourtyTwooo"); + NWNX_SQL_PreparedObjectId(3, o); + NWNX_SQL_PreparedObjectFull(4, o); + + b = NWNX_SQL_ExecutePreparedQuery(); + NWNX_Tests_Report("NWNX_SQL", "Complex ExecutePreparedQuery", b); + + b = NWNX_SQL_ExecuteQuery("SELECT * FROM sql_test;"); + NWNX_Tests_Report("NWNX_SQL", "Select ExecuteQuery", b); + + if (b) + { + while (NWNX_SQL_ReadyToReadNextRow()) + { + NWNX_SQL_ReadNextRow(); + int n = StringToInt(NWNX_SQL_ReadDataInActiveRow(0)); + NWNX_Tests_Report("NWNX_SQL", "ReadInt", n == 42); + float f = StringToFloat(NWNX_SQL_ReadDataInActiveRow(1)); + NWNX_Tests_Report("NWNX_SQL", "ReadFloat", fabs(f - 0.42) < 0.01); + string s = NWNX_SQL_ReadDataInActiveRow(2); + NWNX_Tests_Report("NWNX_SQL", "ReadString", s == "FourtyTwooo"); + + string sObjId = NWNX_SQL_ReadDataInActiveRow(3); // In base 10 + object o2 = NWNX_Object_StringToObject(IntToHexString(StringToInt(sObjId))); + NWNX_Tests_Report("NWNX_SQL", "ReadObjectId", o == o2); + + object o3 = NWNX_SQL_ReadFullObjectInActiveRow(4, GetArea(o), v.x, v.y, v.z); + NWNX_Tests_Report("NWNX_SQL", "ReadFullObject", GetIsObjectValid(o3)); + // Alternatively: + // object o3 = NWNX_Object_Deserialize(NWNX_SQL_ReadDataInActiveRow(4)); + } + } + + + object oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_chestburd", GetStartingLocation()); + object oItem = CreateObject(OBJECT_TYPE_ITEM, "x0_it_mring013", GetStartingLocation()); + if (!GetIsObjectValid(oPlc) || !GetIsObjectValid(oItem)) + { + WriteTimestampedLogEntry("NWNX_SQL test: Failed to create objects.."); + } + else + { + object oTmp = GetFirstItemInInventory(oPlc); + while (GetIsObjectValid(oTmp)) + { + WriteTimestampedLogEntry("NWNX_SQL Destroying auto created object " + GetTag(oTmp)); + DestroyObject(oTmp); + oTmp = GetNextItemInInventory(oPlc); + } + + string test2 = ""; + if (db_type == "MYSQL" || db_type == "SQLITE") + { + test2="INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(1337,0.0,'xxx',1337,?)"; + } + if (db_type == "POSTGRESQL") + { + test2="INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(1337,0.0,'xxx',1337,$1)"; + } + + NWNX_SQL_PrepareQuery(test2); + + NWNX_SQL_PreparedObjectFull(0, oItem); + b = NWNX_SQL_ExecutePreparedQuery(); + NWNX_Tests_Report("NWNX_SQL", "Insert item full", b); + + b = NWNX_SQL_ExecuteQuery("SELECT colObj FROM sql_test WHERE colInt=1337"); + NWNX_Tests_Report("NWNX_SQL", "Select item", b); + + if (NWNX_SQL_ReadyToReadNextRow()) + { + NWNX_SQL_ReadNextRow(); + + object oItem2 = NWNX_SQL_ReadFullObjectInActiveRow(0, oPlc); + NWNX_Tests_Report("NWNX_SQL", "ReadFullObject Item", GetIsObjectValid(oItem2)); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to placeable's inventory", oItem2 == GetFirstItemInInventory(oPlc)); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to placeable's inventory - possessor", GetItemPossessor(oItem2) == oPlc); + + object oItem3 = NWNX_SQL_ReadFullObjectInActiveRow(0, GetArea(oPlc), v.x, v.y, v.z); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to area", GetArea(oItem3) == GetArea(oPlc)); + + object oItem4 = NWNX_SQL_ReadFullObjectInActiveRow(0, o); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to creature's inventory - possessor", GetItemPossessor(oItem4) == o); + } + else + { + WriteTimestampedLogEntry("NWNX_SQL not ready to read item"); + } + + } + + int STRESS_CNT = 10; + + WriteTimestampedLogEntry("NWNX_SQL stress test."); + NWNX_SQL_ExecuteQuery("create table stress_test ( i_key int, i_int int, s_text varchar(8))"); + int i; + // Brute force some inserts + for ( i=1 ; i<=STRESS_CNT ; i++ ) // Generate 1000 rows. + { + // Simulates the existing NWNX2 ODBC way of generating SQL. + NWNX_SQL_ExecuteQuery("insert into stress_test values ( " + IntToString(i) + ", " + IntToString(i*2) + ", '" + IntToString(i*100) + "')"); + } + NWNX_SQL_ExecuteQuery("delete from stress_test where i_key > 0"); + int res = NWNX_SQL_GetAffectedRows(); + WriteTimestampedLogEntry("Deleted " + IntToString(res) + " rows."); + report ("Delete rows", res == STRESS_CNT); + + // now do some elegant inserts + string test3 = ""; + if (db_type == "MYSQL" || db_type == "SQLITE") + { + test3 = "insert into stress_test values ( ?, ?, ? )"; + } + if (db_type == "POSTGRESQL") + { + test3 = "insert into stress_test values ( $1, $2, $3 )"; + } + + NWNX_SQL_PrepareQuery(test3); + for ( i = 1 ; i <= STRESS_CNT ; i++ ) + { + NWNX_SQL_PreparedInt(0, i); + NWNX_SQL_PreparedInt(1, i*2); + NWNX_SQL_PreparedString(2, IntToString(i*100)); + b = NWNX_SQL_ExecutePreparedQuery(); + NWNX_Tests_Report("NWNX_SQL", "Elegant Looping ExecutePreparedQuery", b); + } + NWNX_SQL_ExecuteQuery("delete from stress_test where i_key > 0"); + res = NWNX_SQL_GetAffectedRows(); + WriteTimestampedLogEntry("Deleted " + IntToString(res) + " rows."); + NWNX_Tests_Report("Delete rows", res == STRESS_CNT); + + // Test some error output. + b = NWNX_SQL_ExecuteQuery("create table error_test (col varchar(10))"); + NWNX_Tests_Report("Test Table Create", b); + + b = NWNX_SQL_ExecuteQuery("insert into error_test values('abcdefghij')"); + NWNX_Tests_Report("good insert", b); + + if (db_type != "SQLITE") + {// SQLite doesn't care about size constraints of columns + b = NWNX_SQL_ExecuteQuery("insert into error_test values('abcde000fghij')"); + report ("bad insert", !b); + if (!b) { + WriteTimestampedLogEntry("There should be an error a couple rows up."); + } + } + + string test4 = ""; + if (db_type == "MYSQL" || db_type == "SQLITE") + { + test3 = "insert into error_test values ( ? )"; + } + if (db_type == "POSTGRESQL") + { + test3 = "insert into error_test values ( $1 )"; + } + NWNX_SQL_PrepareQuery(test3); + NWNX_SQL_PreparedString(100, "lala"); // out of bounds, must not crash. + + NWNX_Tests_Report("NWNX_SQL", "Negative prepare query", NWNX_SQL_PrepareQuery("not a valid query!") == 0); + NWNX_Tests_Report("NWNX_SQL", "GetLastError", NWNX_SQL_GetLastError() != ""); + + // Test with null values + NWNX_SQL_ExecuteQuery("INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(5121, null, null, null, null)"); + NWNX_Tests_Report("NWNX_SQL", "Select null", NWNX_SQL_ExecuteQuery("SELECT * FROM sql_test WHERE colInt=5121")); + if (NWNX_SQL_ReadyToReadNextRow()) + { + NWNX_SQL_ReadNextRow(); + int n = StringToInt(NWNX_SQL_ReadDataInActiveRow(0)); + NWNX_Tests_Report("NWNX_SQL", "ReadInt", n == 5121); + float f = StringToFloat(NWNX_SQL_ReadDataInActiveRow(1)); + NWNX_Tests_Report("NWNX_SQL", "ReadFloat", f == 0.0); + string s = NWNX_SQL_ReadDataInActiveRow(2); + NWNX_Tests_Report("NWNX_SQL", "ReadString", s == ""); + + string sObjId = NWNX_SQL_ReadDataInActiveRow(3); // In base 10 + NWNX_Tests_Report("NWNX_SQL", "ReadObjectId", sObjId == ""); + + object obj = NWNX_SQL_ReadFullObjectInActiveRow(4); + NWNX_Tests_Report("NWNX_SQL", "ReadFullObject", obj == OBJECT_INVALID); + } + + cleanup(); + WriteTimestampedLogEntry("Testing database " + db_type + " complete."); + WriteTimestampedLogEntry("NWNX_SQL unit tests end."); +} diff --git a/_module/_removed files/old_thunderclap.nss b/_module/_removed files/old_thunderclap.nss new file mode 100644 index 00000000..188e42a2 --- /dev/null +++ b/_module/_removed files/old_thunderclap.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Great Thunderclap +//:: X2_S0_GrtThdclp +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// You create a loud noise equivalent to a peal of +// thunder and its acommpanying shock wave. The +// spell has three effects. First, all creatures +// in the area must make Will saves to avoid being +// stunned for 1 round. Second, the creatures must +// make Fortitude saves or be deafened for 1 minute. +// Third, they must make Reflex saves or fall prone. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 20, 2002 +//:: Updated On: Oct 20, 2003 - some nice Vfx:) +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" + +#include "x2_inc_spellhook" + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Epic DC Bonus Added + int nDB; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDB = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = +" + IntToString(nDB) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDB = 0; + } + + int nDamage = 0; + int nDC = GetSpellSaveDC(); + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eVis2 = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M); + effect eVis3 = EffectVisualEffect(VFX_IMP_STUN); + effect eDeaf = EffectDeaf(); + effect eKnock = EffectKnockdown(); + effect eStun = EffectStunned(); + effect eShake = EffectVisualEffect(356); + effect eDmg = EffectDamage(d8(3), DAMAGE_TYPE_SONIC, DAMAGE_POWER_ENERGY); + + location lTarget = GetSpellTargetLocation(); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eShake, OBJECT_SELF, 2.0f); + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE); + while (GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, RoundsToSeconds(10))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + } + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStun, oTarget, RoundsToSeconds(1))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget, 6.0f)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis3, oTarget,4.0f)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDmg, oTarget)); + } + } + } + + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE); + +} + diff --git a/_module/_removed files/vat_stripdmfi.nss b/_module/_removed files/vat_stripdmfi.nss new file mode 100644 index 00000000..0c14b6cb --- /dev/null +++ b/_module/_removed files/vat_stripdmfi.nss @@ -0,0 +1,28 @@ +#include "inc_levelset" + +void main() +{ + object oTarget = GetPCSpeaker(); + int iFoundItemFlag = 0; + //for testing + //AssignCommand(oTarget, SpeakString("stripInventory fired")); + + //valid only for creatures + //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; + + // set the variables + int i; + object oItem = GetFirstItemInInventory(oTarget); + + // destroy unequipped items in inventory + while ( GetIsObjectValid(oItem) ) + { + if (GetIsDMFI(oItem)) + { + DestroyObject(oItem); + iFoundItemFlag = 1; + } + oItem = GetNextItemInInventory(oTarget); + } + if (iFoundItemFlag = 0) FloatingTextStringOnCreature("No DMFI items found.", oTarget, FALSE); +} diff --git a/_module/_removed files/vat_stripflags.nss b/_module/_removed files/vat_stripflags.nss new file mode 100644 index 00000000..0a557029 --- /dev/null +++ b/_module/_removed files/vat_stripflags.nss @@ -0,0 +1,60 @@ +#include "inc_levelset" + +void main() +{ + object oTarget = GetPCSpeaker(); + int iFoundItemFlag = 0; + int i = 0; + //for testing + //AssignCommand(oTarget, SpeakString("stripInventory fired")); + + //valid only for creatures + //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; + + // set the variables + object oItem = GetFirstItemInInventory(oTarget); + + // unflag unequipped items in inventory + while ( GetIsObjectValid(oItem) ) + { + //SendMessageToPC(oTarget, "Evaluating " + GetName(oItem)); + + if (GetPlotFlag(oItem) == TRUE) + { + SetPlotFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Plot flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + + if (GetStolenFlag(oItem) == TRUE) + { + SetStolenFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Stolen flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + //else SendMessageToPC(oTarget, GetName(oItem) + " was not changed."); + + oItem = GetNextItemInInventory(oTarget); + } + + //unflag equipped items in slots + for ( i = 0; i < NUM_INVENTORY_SLOTS; i++ ) + { + oItem = GetItemInSlot(i, oTarget); + if (GetPlotFlag(oItem) == TRUE) + { + SetPlotFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Plot flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + + if (GetStolenFlag(oItem) == TRUE) + { + SetStolenFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Stolen flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + } + + if (iFoundItemFlag == 0) SendMessageToPC(oTarget, "No Plot or Stolen items found."); +} diff --git a/_module/_removed files/vat_stripnondrop.nss b/_module/_removed files/vat_stripnondrop.nss new file mode 100644 index 00000000..08ae6aa0 --- /dev/null +++ b/_module/_removed files/vat_stripnondrop.nss @@ -0,0 +1,51 @@ +#include "inc_levelset" + +void main() +{ + object oTarget = GetPCSpeaker(); + int iFoundItemFlag = 0; + int i = 0; + //for testing + //AssignCommand(oTarget, SpeakString("stripInventory fired")); + + //valid only for creatures + //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; + + // set the variables + object oItem = GetFirstItemInInventory(oTarget); + + // unflag unequipped items in inventory + while ( GetIsObjectValid(oItem) ) + { + //SendMessageToPC(oTarget, "Evaluating " + GetName(oItem)); + + if (GetIsDMFI(oItem) != TRUE) + { + if (GetItemCursedFlag(oItem) == TRUE) + { + + SetItemCursedFlag(oItem, FALSE); + SendMessageToPC(oTarget, GetName(oItem) + " changed to droppable."); + iFoundItemFlag = 1; + } + //else SendMessageToPC(oTarget, GetName(oItem) + " was not changed."); + } + else SendMessageToPC(oTarget, GetName(oItem) + " is a DMFI item."); + + oItem = GetNextItemInInventory(oTarget); + } + + //unflag equipped items in slots + for ( i = 0; i < NUM_INVENTORY_SLOTS; i++ ) + { + oItem = GetItemInSlot(i, oTarget); + if (GetItemCursedFlag(oItem) == TRUE) + { + SetItemCursedFlag(oItem, FALSE); + SendMessageToPC(oTarget, GetName(oItem) + " changed to droppable."); + iFoundItemFlag = 1; + } + } + + if (iFoundItemFlag == 0) SendMessageToPC(oTarget, "No cursed / non-droppable items found."); +} diff --git a/_module/_removed files/x0_s0_bombard.nss b/_module/_removed files/x0_s0_bombard.nss new file mode 100644 index 00000000..e42b51f4 --- /dev/null +++ b/_module/_removed files/x0_s0_bombard.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Bombardment +//:: X0_S0_Bombard +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* +// Rocks fall from sky +// 1d8 damage/level to a max of 10d8 +// Reflex save for half +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 22 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 01, 2003 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_METEOR_SWARM); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eDam; + + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 20) + { + nCasterLvl = 20; + } + + //Apply the fireball explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) == TRUE) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d8(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ALL); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING); + if(nDamage > 0) + { + + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + + + diff --git a/_module/_removed files/x0_s0_enten.nss b/_module/_removed files/x0_s0_enten.nss new file mode 100644 index 00000000..645796ad --- /dev/null +++ b/_module/_removed files/x0_s0_enten.nss @@ -0,0 +1,24 @@ +//:://///////////////////////////////////////////// +//:: x0_s0_entEN +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Applies a miss chance to any enemies + of the area of effect creator. +*/ +//::////////////////////////////////////////////// +//:: Created By: +//:: Created On: +//::////////////////////////////////////////////// + +void main() +{ + object oTarget = GetEnteringObject(); + if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator())) + { + effect eMiss = EffectMissChance(40, MISS_CHANCE_TYPE_VS_RANGED); + + // * only leaving the area of effect removes the miss chance + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMiss, oTarget); + } +} diff --git a/_module/_removed files/x0_s0_entrshield.nss b/_module/_removed files/x0_s0_entrshield.nss new file mode 100644 index 00000000..24518009 --- /dev/null +++ b/_module/_removed files/x0_s0_entrshield.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Entropic Shield +//:: x0_s0_entrshield.nss +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + 20% concealment to ranged attacks including + ranged spell attacks + + Duration: 1 turn/level + +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent Knowles +//:: Created On: July 18, 2002 +//::////////////////////////////////////////////// +//:: VFX Pass By: +#include "NW_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = OBJECT_SELF; + int nDuration = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100% + { + nDuration = nDuration * 2; + } + //Set the four unique armor bonuses + effect eShield = EffectConcealment(40, MISS_CHANCE_TYPE_VS_RANGED); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects(eShield, eDur); +// RemoveEffectsFromSpell(oTarget, GetSpellId()); + + //Apply the armor bonuses and the VFX impact + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); +} + diff --git a/_module/_removed files/x0_s0_ether.nss b/_module/_removed files/x0_s0_ether.nss new file mode 100644 index 00000000..9a44c6d6 --- /dev/null +++ b/_module/_removed files/x0_s0_ether.nss @@ -0,0 +1,48 @@ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eVis = EffectVisualEffect(VFX_DUR_SANCTUARY); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eSanc = EffectEthereal(); + + effect eLink = EffectLinkEffects(eVis, eSanc); + eLink = EffectLinkEffects(eLink, eDur); + + int nDuration = GetCasterLevel(OBJECT_SELF); + //Enter Metamagic conditions + int nMetaMagic = GetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ETHEREALNESS, FALSE)); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); +} diff --git a/_module/_removed files/x0_s0_firebrand.nss b/_module/_removed files/x0_s0_firebrand.nss new file mode 100644 index 00000000..92897881 --- /dev/null +++ b/_module/_removed files/x0_s0_firebrand.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Firebrand +//:: x0_x0_Firebrand +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* +// * Fires a flame arrow to every target in a +// * colossal area +// * Each target explodes into a small fireball for +// * 1d6 damage / level (max = 15 levels) +// * Only nLevel targets can be affected +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 29 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + int nDamage = GetCasterLevel(OBJECT_SELF); + if (nDamage > 25) + nDamage = 25; + + DoMissileStorm(nDamage, 25, SPELL_FIREBRAND, VFX_IMP_MIRV_FLAME, VFX_IMP_FLAME_M, DAMAGE_TYPE_FIRE, TRUE, TRUE); +} + + + + diff --git a/_module/_removed files/x0_s0_fleshsto.nss b/_module/_removed files/x0_s0_fleshsto.nss new file mode 100644 index 00000000..67f5d2a9 --- /dev/null +++ b/_module/_removed files/x0_s0_fleshsto.nss @@ -0,0 +1,57 @@ +//:://///////////////////////////////////////////// +//:: Flesh to Stone +//:: x0_s0_fleshsto +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* +//:: The target freezes in place, standing helpless. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent Knowles +//:: Created On: October 16, 2002 +//::////////////////////////////////////////////// +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +//Override in town, no casting! +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + + + if (MyResistSpell(OBJECT_SELF,oTarget) <1) + { + DoPetrification(nCasterLvl, OBJECT_SELF, oTarget, GetSpellId(), GetEpicSpellSaveDC()); + } +} + + diff --git a/_module/_removed files/x0_s0_missstorm1.nss b/_module/_removed files/x0_s0_missstorm1.nss new file mode 100644 index 00000000..21c2fdd0 --- /dev/null +++ b/_module/_removed files/x0_s0_missstorm1.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Isaacs Lesser Missile Storm +//:: x0_s0_MissStorm1 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Up to 10 missiles, each doing 1d6 damage to all + targets in area. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 31, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + +//Epic Adjustment By Genisys +//I added a level adjustment to the spell +int nInt; +int nDD; +object oCaster = OBJECT_SELF; +int nCL = GetCasterLevel(oCaster); + +//If caster level is 9 or higher.. +if(nCL >8) +{ +int nEL = nCL - 6; +int nDiv = nEL / 3; +nInt = nDiv + 6; //6 missles + 1 missle every 3 levels over level 6 caster +//(16 Max total Missles) + +//end if Level Check +} +//If not level 9+, then 6 is the max # of missles / level +else +{ +nInt = 6; +} + + //SpawnScriptDebugger(); + DoMissileStorm(1, nInt, SPELL_ISAACS_LESSER_MISSILE_STORM); +} + + diff --git a/_module/_removed files/x0_s0_missstorm2.nss b/_module/_removed files/x0_s0_missstorm2.nss new file mode 100644 index 00000000..c30470db --- /dev/null +++ b/_module/_removed files/x0_s0_missstorm2.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Isaacs Greater Missile Storm +//:: x0_s0_MissStorm2 +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* + Up to 20 missiles, each doing 3d6 damage to each + target in area. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 31, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + +//Epic Adjustment Added By Genisys +int nInt; +int nDD; +object oCaster = OBJECT_SELF; +int nCL = GetCasterLevel(oCaster); + +//If caster level is 22 or higher.. +if(nCL >21) +{ +int nEL = nCL - 20; +int nDiv = nEL / 2; +nInt = nDiv + 10; //10 + 1 / 2 levels over level 10 +//(25 Max Total Missles) + +//end if Level Check +} +//If not greater than level 21, then 10 is the max level cap +else +{ +nInt = 10; +} + + DoMissileStorm(2, nInt, SPELL_ISAACS_GREATER_MISSILE_STORM); +} + diff --git a/_module/_removed files/x0_s0_truestrike.nss b/_module/_removed files/x0_s0_truestrike.nss new file mode 100644 index 00000000..61bea73c --- /dev/null +++ b/_module/_removed files/x0_s0_truestrike.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Truestrike +//:: x0_s0_truestrike.nss +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* ++20 attack bonus for 9 seconds. +CHANGE: Miss chance still applies, unlike rules. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent Knowles +//:: Created On: July 15, 2002 +//::////////////////////////////////////////////// +//:: VFX Pass By: +#include "NW_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_ODD); + + + // * determine the damage bonus to apply + effect eAttack = EffectAttackIncrease(20); + + + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = eAttack; + eLink = EffectLinkEffects(eLink, eDur); + + + oTarget = OBJECT_SELF; + + //Fire spell cast at event for target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 415, FALSE)); + //Apply VFX impact and bonus effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, 18.0); + +} + diff --git a/_module/_removed files/x0_s0_woundwhis.nss b/_module/_removed files/x0_s0_woundwhis.nss new file mode 100644 index 00000000..4389a182 --- /dev/null +++ b/_module/_removed files/x0_s0_woundwhis.nss @@ -0,0 +1,69 @@ +//:://///////////////////////////////////////////// +//:: Wounding Whispers +//:: x0_s0_WoundWhis.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Magical whispers cause 1d8 sonic damage to attackers who hit you. + Made the damage slightly more than the book says because we cannot + do the +1 per level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// +//:: Modified for wounding whispers, July 30 2002, Brent +//::////////////////////////////////////////////// +//:: Last Update By: Andrew Nobbs May 01, 2003 + +#include "x2_inc_spellhook" +#include "x0_i0_spells" +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_POSITIVE); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nBonus = nDuration; + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = OBJECT_SELF; + effect eShield = EffectDamageShield(d6(3) + nBonus, 0, DAMAGE_TYPE_SONIC); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + //Link effects + effect eLink = EffectLinkEffects(eShield, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 441, FALSE)); + + if (GetHasSpellEffect(GetSpellId())) + { + RemoveSpellEffects(GetSpellId(),OBJECT_SELF,OBJECT_SELF); + } + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); +} diff --git a/_module/_removed files/x2_m1_mindblast.nss b/_module/_removed files/x2_m1_mindblast.nss new file mode 100644 index 00000000..ff8332f4 --- /dev/null +++ b/_module/_removed files/x2_m1_mindblast.nss @@ -0,0 +1,118 @@ +//:://///////////////////////////////////////////// +//:: Cone: Mindflayer Mind Blast +//:: x2_m1_mindblast +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* + Anyone caught in the cone must make a + Will save (DC 17) or be stunned for 3d4 rounds +*/ +//::////////////////////////////////////////////// +//:: Created By: Keith Warner +//:: Created On: Dec 5/02 +//::////////////////////////////////////////////// + +#include "x2_i0_spells" + +void main() +{ + int nSaveDC = 14 +(GetHitDice(OBJECT_SELF)/2) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); + int nDC = (GetHitDice(OBJECT_SELF)-20)+ nSaveDC; + object oTarget = GetSpellTargetObject(); + object oCaster = OBJECT_SELF; + float fRange = 15.0f; + int nDuration = d4(1)+1; + //DoMindBlast(nSaveDC, d6(10), 15.0f); + + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(oCaster)) +{ + +//Make them stop what they are doing instantly! +AssignCommand(oCaster, ClearAllActions()); + +//Though the player may show animation, nothing happens! :) +//SetModuleOverrideSpellScriptFinished(); + +FloatingTextStringOnCreature("All spells fizzle in town.", oCaster); + +return; +} + +/////////////////////////////////////////////////////////////////////////////// +//Handle Jail... +//NO ITEMS WORK IN JAIL!!! +if(GetLocalInt(GetArea(oCaster), "JAIL")==1) +{ + AssignCommand(oCaster, ClearAllActions()); + //Though the player may show animation, nothing happens! :) + //SetModuleOverrideSpellScriptFinished(); + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + + { + int nStunTime; + float fDelay; + + location lTargetLocation = GetSpellTargetLocation(); + object oTarget; + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE); + + while(GetIsObjectValid(oTarget)) + { + int nApp = GetAppearanceType(oTarget); + int bImmune = FALSE; + //---------------------------------------------------------------------- + // Hack to make mind flayers immune to their psionic attacks... + //---------------------------------------------------------------------- + if (nApp == 413 ||nApp== 414 || nApp == 415) + { + bImmune = TRUE; + } + + if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF && !bImmune ) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + // already stunned + if (GetHasSpellEffect(GetSpellId(),oTarget)) + { + // only affects the targeted object + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_STUN), oTarget); + int nDamage; + if (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)>0) + { + nDamage = d6(GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/2); + } + else + { + nDamage = d6(GetHitDice(OBJECT_SELF)/2); + } + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BIGBYS_FORCEFUL_HAND), oTarget); + } + else if (WillSave(oTarget, nDC) < 1) + { + //Calculate the length of the stun + nStunTime = nDuration; + //Set stunned effect + eCone = EffectStunned(); + eCone = SupernaturalEffect(eCone); //Hack to make it bypass immunities :) + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCone, oTarget, RoundsToSeconds(nStunTime))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE); + } +} + +} + diff --git a/_module/_removed files/x2_p_craftskills.dlg b/_module/_removed files/x2_p_craftskills.dlg new file mode 100644 index 0000000000000000000000000000000000000000..4066ed93081b18cb1c6161e7f43f49a527062068 GIT binary patch literal 12806 zcmbuF37AvW`NpH{`@RYo0R;g8Srio&1VnV$kxdW+6ChQb;m1*uY33Mi{8aFU}`6&2pD#sL)C;|E$aF+U+iuW~Yla?j9FoHS~pxt8qN& zV(f-$GJyJ}Z%J(P4j?vfc}^qU6i;)Fr&-}N8h@Rq+2(0>IF07r<7w(*+~#UYta)lc zXJYd+%F|478kRX!;Aw7ld9C$&FTdU8HP$XKUzJHUZyjhzU~~0z`MTr>d-(#FuSb4? zmtW`d^~pc%<#!OP7D^56ad89UeV(Qb0@HLOpexi6`VpI->7J&@#f{J`^fdPq+aB9a ztZ_8&PM4?b&_PcV=7lm%Hy2CO&&BE+>|!npjq>tSh;6Qgo@Tk1-$1PEkHre|>T-pzv ziOoZv%WDrz^zv5_%YS27?&UWS>$O#%HLFwSiq(HP=2freR8y=z+lPAn)Z~+8OE>jl zIn)%SWvcQfzgiEim2`Ta)R^LSkY0Uyk5s?b>kd%A*61!!Ui01Uj#`U6(6y>xzNJ^q z_kmiIvO~E>r>5EH`b=Z~pCVtG|IKb3ja8MxGWoCO)=>Uy5u5+o#HvI7C+d2Tf70dN z>g$9S^wxlUW!{>gkuPz)(+AhKtJBC^4`TDyli0jXr_a3U^{{p8gGSA~na1YS`uEME z(LS(o24~S|51D3c7LE3wX=Y^6Xz!ZlvMd^THO)d#qfl$2y}XDM+Z&6CD_j4iXf&p{ z#p#3Vf2-4I{Z|p&`mZLo^*8iiKN2b@?f9}!np%cp3pmam;Y zSj#@AQ7!w4t(F7CR?ABItQNh;SuH=JQOi|JJ-taejpSBKeezaIW8%tcX^zHfY47yG zS~@t5YUxC5wdh&OYFSU8)uMi@r5hTxT($J~G=42-ySa294R?7rpt7QXyR*SB;S}sAOmaCSzp2n}mo+(vJ5t_fmPJmZS{4&q zElY^4mQD0oE&hGI42_y<@qJ$B#*xn(h%57X6B_fm*6D*j*Ex-R+B3BL-9z4dZsk0a z&j-+`1${n9UiHf7BgB>Yd>oDWeA?-QKA&+K`Fx(()^jVd`P@#Q`IOG~#x^u+wl~b% z%j7Hb_8J=V_KwpBy}j!+n)7{P^Y#I;dD}ssc~j23eS}6W=xq=A%DjDs#=Pxw`k=RO zoJQUb5SzE}iOt(C`plc2SIpZ_Xw-t<4w0|STNVCeHg64xr4M@3XE15xttqj2YesC| z_RweE^!#MrTA@)3dTUL-GH>nBn71xYAN1DMY2>X3v3cuBY~J?LXWkBbc0!{jZ~pz; zm%Qoy`~8e8`ZLLEUfoCMxNCDgZ=Z+8>Kftn!Ma8|jp`apY;}zzwz~GyXFmP9CZbUb z)-{Q|>HWHeXy2<)2NnWVyh)ZY_-^PyY`M>i$2e*1#2lK zpQ)BBv*@oPZ*^VmuFX}~5;RuVjZPn|>n5jBUAGZiT`P&Lu7+$Z#m%58u{`IRca0lU zbH79^eQ@4wPNR9Z6WhG65o@mIkniRSewKL?jhfw$mHBzg%_Tqjek7BhZ=6Pc4iKB4 z?}^P%!BN!ylN(2KoyA0%=IT#U{hDh4vCTD**ybwoYWLrZhG;;VU%UGK_tNoMG#Xp; z>b{wkMI%q9nV&_Yw`$W|n?aLnZ!ATxYsD?Zx;(fyZgm=YSw(E?vzpk}=UQ)lSn_f| zYc(LvU!Pol*15Ul=V4-99`v)>Y2@cQV)L_w*!-;U{P>?qU(|rK;JyDgd3EWvlRsO} z_p<1BIeo5LcB8Si-RtzhT0VCg)$%2=)$$dw)w0H`g><>MZ*@XD+O_=-z4@ua2W(v) z^wX5QH1gAu*!;92Hb3hC(dTjV4R(gmD8w}Z;7pz?})9Ion9?^M%0+vw?Cj!JKD89=;qS(HF=RTt!*pv>X)Ck#O9|R zvH98U`SJH{do*gkpWypI?+lt;YpA~y*cuKX&g6NZ)5!A>V)J}Hv3cI>c~-xz;e}|_ ze9yW3T;%4`^%ICQ`I+c6@-v0l{7fY_Kl*OU_M6qG*EE7g?P&eXaC2#lIB_OF38#^t zVq){7zpt2|gPtGlQCpt{Xw;6@PpO+r*Dof{rj^K%`s`KjtYduspq&+|8+ zQ9D{cE8JZ2vxYd6pWB^Ae(oeTKX(zEpSqqO{~7FFG-~q05~i=!_ssW^*Ic>w(nDzE zOFZfH!S@IKeM|lFwu#uhZ6-EvO);dn1=!zNwQg#Q!8^9Lp3^P&9oSBNvi&i9t6%U#dE2tPTFBYHc z&zWAj^3lrb_s1WbiX>C9_-vEZTF`6S%-FPOJij8+Y>PmDE7Sf_y9|bPDh!WJB$K7x z!ZS)z;X%pBEDaT&6DbbQh(_b#{8({hMnN<`oQQ{0b7IBe!bE;aL9|=AG*J>RjFg5; zilcNy!(&*4@bGB7B%De}6q{8Vj-{f7or=SeB3_|nBtA1*+&w*W`k#igc-5xOOvLkJ zdf6id>Fgl>^-cEXd{SVlQG>!0BJuq2{5i3ibHaFv#bqbSQ5z+ZEcK>IkE+|_r*UP4 z*C|_`Vy#-bGyPBfvh3_=N~TXe{Iu8Mr@aq9?Q{5P-||5<>mfI5c{0?%&6G&ZP88%% zJ6s;R*j^pGARzB!`SdM+Ol5K{Us;oxV=I&QGIe_NDwWAkJxpHp2>D^%)pB=N&)hBB zHL`cr%-&TidspquU5DANlS3m@b#wGBcRH#iQZ*v4VndocGftw|BUh zDY>l^=^J>|pzhvn(~w;nE1Xu8C@3vVB#Y+c+dhn@W<>INf0clD8E%+(B9cVoC+0^Z zMTzth)IVYg(&+{+?Ji1JtQ)W5Zm1Y;RwPzXlB{^c)XFx@JZz&Z!&clixrc3>dDtdd zhOM}}au3@y^RUgb3|ny*<{q|r=3!f88MfkXJ#tvBY0J#RX}i+vH>v;MX$`1>S{*s9 zy7WG%Cm? zpl>+!&13p0hGQ#e4aY$nXbZaEj)yRu0PUdzbc7S(B+#AQ8FYVjfv(UEP66FVJ)kFO z)%AjEuV@=;ho1(gLqE{{dM2C&{o!ml2Xy}rfPrux=s(86Fa*wrp>P2VgA3sz$b;c9 z0!G3p7!6}!ER2JTVLVKLi7*K!!zC~UroyE#4W>f`X249)Gm7rRSuh*sKn#8cb3y-w z7eX8ophvFDAPL2gf)bbq^FdEVrSNmO9Ik*X;VSqAEQCdHHT)8;fyJ-{eg)UUQdkDp z!E*RDTn{(E3iu7&2sgpaa0}cDx4}yIEv$moum*02J76uWgFE3axEt2PJ#a7F2lvAR z@E|+{55w=^5qK0fz+><@{2rcwKfoX1N!SQa!JpvIun9K9)9?&D3(vt8cpkRG3-BVm z1l!UJoOK1hH;W%gm zZJ{0LS5RR%0op?c=m;mmNze&ShAyCAMsQ=mou@5A=o8;B@E*XTX_o z7W9X+;T$*@2Eaf#4+g8vu7E4yD)!OH_zm0$H^I$t3)~8~ z!Akfotb*0B25yHtU@feJJK-+48`i@;a4*~k_rnA5AUp&Q!|&h`coa6kWAHfq9-e?d zz#rjB*a%O-pWx512{yyi@C-Z)&%qXW9=5^@@FKhf+u&t*1zv^i@EW`he}OmPO?V6b z3OnF$@OO9{cEUUGF1!c3;2-cld;q)QL-;3r1bg6P_yj(M&){G1Z}<=Fh0o!?@IUwh zzJ#yfYuE?hz_;)n?1uyJJ^TO%;Yauh4uSsjKL(D4Dxhy_szG(A0X3l()P_2sZ%*_} zDg7#{0W^e0pkGEc0eySX4D>6g7NBo1T0v_#4%$FlXa~nb7)}8FQmO-VgcIQ;&@ZF( zi>Q;K3+R_mr$FPfx2*K@N_FD;&3q02~LJ?&;xn_!=Ht}Z@>V|N$#20) + { + nStat =20; + } + + if (nStat <1) + { + nStat = 0; + } + } + + object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED); + // Make the blade require concentration + SetLocalInt(oSummon,"X2_L_CREATURE_NEEDS_CONCENTRATION",TRUE); + SetPlotFlag (oSummon,TRUE); + object oWeapon; + //Create item on the creature, epuip it and add properties. + oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oSummon); + if (nStat > 0) + { + IPSetWeaponEnhancementBonus(oWeapon, nStat); + } + SetDroppableFlag(oWeapon, FALSE); +} + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("blackblade01"); + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2;//Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); + DelayCommand(1.5, spellsCreateItemForSummoned()); +} diff --git a/_module/_removed files/x2_s0_blckstff.nss b/_module/_removed files/x2_s0_blckstff.nss new file mode 100644 index 00000000..b3254728 --- /dev/null +++ b/_module/_removed files/x2_s0_blckstff.nss @@ -0,0 +1,89 @@ +//:://///////////////////////////////////////////// +//:: Blackstaff +//:: X2_S0_Blckstff +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Adds +4 enhancement bonus, On Hit: Dispel. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 29, 2002 +//::////////////////////////////////////////////// +//:: Updated by Andrew Nobbs May 07, 2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller +//:: 2003-07-15: Complete Rewrite to make use of Item Property System + +#include "nw_i0_spells" +#include "x2_i0_spells" + +#include "x2_inc_spellhook" + + +void AddBlackStaffEffectOnWeapon (object oTarget, float fDuration) +{ + IPSafeAddItemProperty(oTarget, ItemPropertyEnhancementBonus(8), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE, TRUE); + IPSafeAddItemProperty(oTarget, ItemPropertyOnHitProps(IP_CONST_ONHIT_DISPELMAGIC, IP_CONST_ONHIT_SAVEDC_16), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING ); + IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_EVIL), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE ); + return; +} + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + + object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon(); + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration * 2; //Duration is +100% + } + + if(GetIsObjectValid(oMyWeapon) ) + { + SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + if (GetBaseItemType(oMyWeapon) == BASE_ITEM_QUARTERSTAFF) + { + if (nDuration>0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration)); + AddBlackStaffEffectOnWeapon(oMyWeapon, RoundsToSeconds(nDuration)); + } + return; + } + else + { + FloatingTextStrRefOnCreature(83620, OBJECT_SELF); // not a qstaff + return; + } + } + else + { + FloatingTextStrRefOnCreature(83615, OBJECT_SELF); + return; + } +} diff --git a/_module/_removed files/x2_s0_combust.nss b/_module/_removed files/x2_s0_combust.nss new file mode 100644 index 00000000..12e304ed --- /dev/null +++ b/_module/_removed files/x2_s0_combust.nss @@ -0,0 +1,214 @@ +//:://///////////////////////////////////////////// +//:: Combust +//:: X2_S0_Combust +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +/* + The initial eruption of flame causes 2d6 fire damage +1 + point per caster level(maximum +10) + with no saving throw. + + Further, the creature must make + a Reflex save or catch fire taking a further 1d6 points + of damage. This will continue until the Reflex save is + made. + + There is an undocumented artificial limit of + 10 + casterlevel rounds on this spell to prevent + it from running indefinitly when used against + fire resistant creatures with bad saving throws + +*/ +//::////////////////////////////////////////////// +// Created: 2003/09/05 Georg Zoeller +//::////////////////////////////////////////////// + +#include "x2_I0_SPELLS" +#include "x2_inc_toollib" +#include "x2_inc_spellhook" + +void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic); + +void main() +{ + + object oTarget = GetSpellTargetObject(); + object oCaster = OBJECT_SELF; + + //-------------------------------------------------------------------------- + // Spellcast Hook Code + // Added 2003-06-20 by Georg + // If you want to make changes to all spells, check x2_inc_spellhook.nss to + // find out more + //-------------------------------------------------------------------------- + if (!X2PreSpellCastCode()) + { + return; + } + // End of Spell Cast Hook + + //-------------------------------------------------------------------------- + // Calculate the save DC + //-------------------------------------------------------------------------- + //Epic DC Bonus Added + int nDB; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDB = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = + " + IntToString(nDB) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDB = 0; + } + int nDC = GetSpellSaveDC() + nDB; + int nLevel = GetCasterLevel(OBJECT_SELF); + + + //-------------------------------------------------------------------------- + // Calculate the damage, 2d6 + casterlevel, capped at +10 + //-------------------------------------------------------------------------- + int nDamage = GetCasterLevel(OBJECT_SELF); + if (nDamage > 20) + { + nDamage = 20; + } + int nMetaMagic = GetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage += 12;//Damage is at max + } + else + { + nDamage += d6(2); + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + } + + //-------------------------------------------------------------------------- + // Calculate the duration (we need a duration or bad things would happen + // if someone is immune to fire but fails his safe all the time) + //-------------------------------------------------------------------------- + int nDuration = 10 + GetCasterLevel(OBJECT_SELF); + if (nDuration < 1) + { + nDuration = 10; + } + + //-------------------------------------------------------------------------- + // Setup Effects + //-------------------------------------------------------------------------- + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + effect eDur = EffectVisualEffect(498); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + //----------------------------------------------------------------------- + // Check SR + //----------------------------------------------------------------------- + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + + //------------------------------------------------------------------- + // Apply VFX + //------------------------------------------------------------------- + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + TLVFXPillar(VFX_IMP_FLAME_M, GetLocation(oTarget), 5, 0.1f,0.0f, 2.0f); + + //------------------------------------------------------------------ + // This spell no longer stacks. If there is one of that type, + // that's enough + //------------------------------------------------------------------ + if (GetHasSpellEffect(GetSpellId(),oTarget) || GetHasSpellEffect(SPELL_INFERNO,oTarget) ) + { + FloatingTextStrRefOnCreature(100775,OBJECT_SELF,FALSE); + return; + } + + //------------------------------------------------------------------ + // Apply the VFX that is used to track the spells duration + //------------------------------------------------------------------ + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration)); + + //------------------------------------------------------------------ + // Save the spell save DC as a variable for later retrieval + //------------------------------------------------------------------ + SetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST), nDC); + + //------------------------------------------------------------------ + // Tick damage after 6 seconds again + //------------------------------------------------------------------ + DelayCommand(6.0, RunCombustImpact(oTarget,oCaster,nLevel, nMetaMagic)); + } + } +} + +void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic) +{ + //-------------------------------------------------------------------------- + // Check if the spell has expired (check also removes effects) + //-------------------------------------------------------------------------- + if (GZGetDelayedSpellEffectsExpired(SPELL_COMBUST,oTarget,oCaster)) + { + return; + } + + if (GetIsDead(oTarget) == FALSE) + { + + int nDC = GetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST)); + + if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE)) + { + //------------------------------------------------------------------ + // Calculate the damage, 1d6 + casterlevel, capped at +10 + //------------------------------------------------------------------ + int nDamage = nLevel; + if (nDamage > 20) + { + nDamage = 20; + } + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage += 6; + } + else + { + nDamage += d6(); + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + } + + effect eDmg = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); + effect eVFX = EffectVisualEffect(VFX_IMP_FLAME_S); + + ApplyEffectToObject(DURATION_TYPE_INSTANT,eDmg,oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT,eVFX,oTarget); + + //------------------------------------------------------------------ + // After six seconds (1 round), check damage again + //------------------------------------------------------------------ + DelayCommand(6.0f,RunCombustImpact(oTarget,oCaster, nLevel,nMetaMagic)); + } + else + { + DeleteLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST)); + GZRemoveSpellEffects(SPELL_COMBUST, oTarget); + } + + } + +} + + + + + diff --git a/_module/_removed files/x2_s0_crshadow.nss b/_module/_removed files/x2_s0_crshadow.nss new file mode 100644 index 00000000..3b4e8e73 --- /dev/null +++ b/_module/_removed files/x2_s0_crshadow.nss @@ -0,0 +1,63 @@ +//:://///////////////////////////////////////////// +//:: Create Undead +//:: x2_s0_CrShadow.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spell will summon a shadow - 20% of the time, + the shadow will be hostile to the summoner. +*/ +//::////////////////////////////////////////////// +//:: Created By: Keith Warner +//:: Created On: Jan 2/03 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + nDuration = 24; + effect eSummon; + + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Set the summoned undead to the appropriate template based on the caster level + if (d100() > 20) + { + eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); + } + else + { + eSummon = EffectSummonCreature("x2shfiendfoe",VFX_FNF_SUMMON_UNDEAD); + } + + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); +} + diff --git a/_module/_removed files/x2_s0_dtharm.nss b/_module/_removed files/x2_s0_dtharm.nss new file mode 100644 index 00000000..dc978748 --- /dev/null +++ b/_module/_removed files/x2_s0_dtharm.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Death Armor +//:: X2_S0_DthArm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + You are surrounded with a magical aura that injures + creatures that contact it. Any creature striking + you with its body or handheld weapon takes 1d4 points + of damage +1 point per 2 caster levels (maximum +5). +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Jan 6, 2003 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs, 02/06/2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller + +#include "x2_inc_spellhook" +#include "x0_i0_spells" + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + object oTarget = GetSpellTargetObject(); + + int nDuration = GetCasterLevel(oTarget); + int nCasterLvl = GetCasterLevel(oTarget)/2; + if(nCasterLvl > 10) + { + nCasterLvl = 10; + } + int nMetaMagic = GetMetaMagicFeat(); + + effect eShield = EffectDamageShield(nCasterLvl, DAMAGE_BONUS_1d8, DAMAGE_TYPE_MAGICAL); + effect eDur = EffectVisualEffect(463); + + //Link effects + effect eLink = EffectLinkEffects(eShield, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + //Stacking Spellpass, 2003-07-07, Georg + RemoveEffectsFromSpell(oTarget, GetSpellId()); + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); +} + diff --git a/_module/_removed files/x2_s0_elecloop.nss b/_module/_removed files/x2_s0_elecloop.nss new file mode 100644 index 00000000..72006fae --- /dev/null +++ b/_module/_removed files/x2_s0_elecloop.nss @@ -0,0 +1,157 @@ +//:://///////////////////////////////////////////// +//:: Gedlee's Electric Loop +//:: X2_S0_ElecLoop +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + You create a small stroke of lightning that + cycles through all creatures in the area of effect. + The spell deals 1d6 points of damage per 2 caster + levels (maximum 5d6). Those who fail their Reflex + saves must succeed at a Will save or be stunned + for 1 round. + + Spell is standard hostile, so if you use it + in hardcore mode, it will zap yourself! + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: Oct 19 2003 +//::////////////////////////////////////////////// + + +#include "x2_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + + //-------------------------------------------------------------------------- + // Spellcast Hook Code + // Added 2003-06-20 by Georg + // If you want to make changes to all spells, check x2_inc_spellhook.nss to + // find out more + //-------------------------------------------------------------------------- + if (!X2PreSpellCastCode()) + { + return; + } + // End of Spell Cast Hook + + + location lTarget = GetSpellTargetLocation(); + effect eStrike = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + int nMetaMagic = GetMetaMagicFeat(); + float fDelay; + effect eBeam; + int nDamage; + int nPotential; + effect eDam; + object oLastValid; + effect eStun = EffectLinkEffects(EffectVisualEffect(VFX_IMP_STUN),EffectStunned()); + + //Epic DC Bonus Added + int nDC; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDC = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = +" + IntToString(nDC) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDC = 0; + } + + //-------------------------------------------------------------------------- + // Calculate Damage Dice. 1d per 2 caster levels, max 5d + //-------------------------------------------------------------------------- + int nNumDice = GetCasterLevel(OBJECT_SELF)/2; + if (nNumDice<1) + { + nNumDice = 1; + } + else if (nNumDice >10) + { + nNumDice = 10; + } + + //-------------------------------------------------------------------------- + // Loop through all targets + //-------------------------------------------------------------------------- + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE); + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + //------------------------------------------------------------------ + // Calculate delay until spell hits current target. If we are the + // first target, the delay is the time until the spell hits us + //------------------------------------------------------------------ + if (GetIsObjectValid(oLastValid)) + { + fDelay += 0.2f; + fDelay += GetDistanceBetweenLocations(GetLocation(oLastValid), GetLocation(oTarget))/20; + } + else + { + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + } + + //------------------------------------------------------------------ + // If there was a previous target, draw a lightning beam between us + // and iterate delay so it appears that the beam is jumping from + // target to target + //------------------------------------------------------------------ + if (GetIsObjectValid(oLastValid)) + { + eBeam = EffectBeam(VFX_BEAM_LIGHTNING, oLastValid, BODY_NODE_CHEST); + DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam,oTarget,1.5f)); + } + + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + + nPotential = MaximizeOrEmpower(6, nNumDice, nMetaMagic); + nDamage = GetReflexAdjustedDamage(nPotential, oTarget, GetSpellSaveDC() + nDC, SAVING_THROW_TYPE_ELECTRICITY); + + //-------------------------------------------------------------- + // If we failed the reflex save, we save vs will or are stunned + // for one round + //-------------------------------------------------------------- + if (nPotential == nDamage || (GetHasFeat(FEAT_IMPROVED_EVASION,oTarget) && nDamage == (nPotential/2))) + { + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eStun,oTarget, RoundsToSeconds(1))); + } + + } + + + if (nDamage >0) + { + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eStrike, oTarget)); + } + } + + //------------------------------------------------------------------ + // Store Target to make it appear that the lightning bolt is jumping + // from target to target + //------------------------------------------------------------------ + oLastValid = oTarget; + + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE ); + } + +} + + diff --git a/_module/_removed files/x2_s0_glphwardx.nss b/_module/_removed files/x2_s0_glphwardx.nss new file mode 100644 index 00000000..8a29670d --- /dev/null +++ b/_module/_removed files/x2_s0_glphwardx.nss @@ -0,0 +1,117 @@ +//:://///////////////////////////////////////////// +//:: Glyph of Warding Heartbet +//:: x2_o0_glyphhb +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Default Glyph of warding damage script + + This spellscript is fired when someone triggers + a player cast Glyph of Warding + + + Check x2_o0_hhb.nss and the Glyph of Warding + placeable object for details + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-09-02 +//::////////////////////////////////////////////// + +#include "x0_i0_spells" +#include "epicdc_inc" + +void DoDamage(int nDamage, object oTarget) +{ + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + if(nDamage > 0) + { + //Apply VFX impact and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } +} + +void main() +{ + + //Declare major variables + object oTarget = GetLocalObject(OBJECT_SELF,"X2_GLYPH_LAST_ENTER"); + location lTarget = GetLocation(OBJECT_SELF); + effect eDur = EffectVisualEffect(445); + int nDamage; + int nCasterLevel = GetLocalInt(OBJECT_SELF,"X2_PLC_GLYPH_CASTER_LEVEL"); + int nMetaMagic = GetLocalInt(OBJECT_SELF,"X2_PLC_GLYPH_CASTER_METAMAGIC"); + object oCreator = GetLocalObject(OBJECT_SELF,"X2_PLC_GLYPH_CASTER") ; + + if ( GetLocalInt (OBJECT_SELF,"X2_PLC_GLYPH_PLAYERCREATED") == 0 ) + { + oCreator = OBJECT_SELF; + } + + if (!GetIsObjectValid(oCreator)) + { + DestroyObject(OBJECT_SELF); + return; + } + + int nDice = nCasterLevel /2; + + if (nDice > 10) + nDice = 10; + else if (nDice <1 ) + nDice = 1; + + effect eDam; + effect eExplode = EffectVisualEffect(459); + + //Check the faction of the entering object to make sure the entering object is not in the casters faction + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Cycle through the targets in the explosion area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,oCreator)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oCreator, GetSpellId())); + //Make SR check + if (!MyResistSpell(oCreator, oTarget)) + { + nDamage = d8(nDice); + //Enter Metamagic conditions + + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * 10;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + + //Change damage according to Reflex, Evasion and Improved Evasion +5 DC Added + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC() + 5, SAVING_THROW_TYPE_SONIC, oCreator); + + + //---------------------------------------------------------- + // Have the creator do the damage so he gets feedback strings + //---------------------------------------------------------- + if (oCreator != OBJECT_SELF) + { + AssignCommand(oCreator, DoDamage(nDamage,oTarget)); + } + else + { + DoDamage(nDamage,oTarget); + } + + } + } + //Get next target in the sequence + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_module/_removed files/x2_s0_grmagweap.nss b/_module/_removed files/x2_s0_grmagweap.nss new file mode 100644 index 00000000..0086922b --- /dev/null +++ b/_module/_removed files/x2_s0_grmagweap.nss @@ -0,0 +1,89 @@ +//:://///////////////////////////////////////////// +//:: Greater Magic Weapon +//:: X2_S0_GrMagWeap +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Grants a +1 enhancement bonus per 3 caster levels + (maximum of +5). + lasts 1 hour per level +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 28, 2002 +//::////////////////////////////////////////////// +//:: Updated by Andrew Nobbs May 08, 2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller +//:: 2003-07-17: Complete Rewrite to make use of Item Property System + + +#include "nw_i0_spells" +#include "x2_i0_spells" + +#include "x2_inc_spellhook" + +void AddGreaterEnhancementEffectToWeapon(object oMyWeapon, float fDuration, int nBonus) +{ + IPSafeAddItemProperty(oMyWeapon,ItemPropertyEnhancementBonus(nBonus), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + return; +} + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nCasterLvl = nDuration / 3; + int nMetaMagic = GetMetaMagicFeat(); + + //Limit nCasterLvl to 5, so it max out at +5 enhancement to the weapon. + if(nCasterLvl > 8) + { + nCasterLvl = 8; + } + + object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon(); + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration * 2; //Duration is +100% + } + + if(GetIsObjectValid(oMyWeapon) ) + { + SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + if (nDuration>0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), HoursToSeconds(nDuration)); + AddGreaterEnhancementEffectToWeapon(oMyWeapon, (HoursToSeconds(nDuration)), nCasterLvl); + + } + return; + } + else + { + FloatingTextStrRefOnCreature(83615, OBJECT_SELF); + return; + } +} diff --git a/_module/_removed files/x2_s0_horiboom.nss b/_module/_removed files/x2_s0_horiboom.nss new file mode 100644 index 00000000..66be8d8f --- /dev/null +++ b/_module/_removed files/x2_s0_horiboom.nss @@ -0,0 +1,90 @@ +//:://///////////////////////////////////////////// +//:: Horizikaul's Boom +//:: X2_S0_HoriBoom +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// You blast the target with loud and high-pitched +// sounds. The target takes 1d4 points of sonic +// damage per two caster levels (maximum 5d4) and +// must make a Will save or be deafened for 1d4 +// rounds. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 22, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs, 02/06/2003 + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF)/2; + int nRounds = d4(1); + int nMetaMagic = GetMetaMagicFeat(); + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eDeaf = EffectDeaf(); + + //Minimum caster level of 1, maximum of 15. + if(nCasterLvl == 0) + { + nCasterLvl = 1; + } + else if (nCasterLvl > 5) + { + nCasterLvl = 5; + } + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Roll damage + int nDam = d4(nCasterLvl); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDam = 4 * nCasterLvl; //Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDam = nDam + nDam/2; //Damage/Healing is +50% + } + //Set damage effect + effect eDam = EffectDamage(nDam, DAMAGE_TYPE_SONIC); + //Apply the MIRV and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, RoundsToSeconds(nRounds)); + } + } + } +} diff --git a/_module/_removed files/x2_s0_monregen.nss b/_module/_removed files/x2_s0_monregen.nss new file mode 100644 index 00000000..55f82a65 --- /dev/null +++ b/_module/_removed files/x2_s0_monregen.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Monstrous Regeneration +//:: X2_S0_MonRegen +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Grants the selected target 3 HP of regeneration + every round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 25, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 09, 2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller + +#include "x2_inc_spellhook" +#include "x0_i0_spells" + +void main() +{ + + + //-------------------------------------------------------------------------- + // Spellcast Hook Code + // Added 2003-06-20 by Georg + // If you want to make changes to all spells, check x2_inc_spellhook.nss to + // find out more + //-------------------------------------------------------------------------- + if (!X2PreSpellCastCode()) + { + return; + } + // End of Spell Cast Hook + + + object oTarget = GetSpellTargetObject(); + + /* Bug fix 21/07/03: Andrew. Lowered regen to 3 HP per round, instead of 10. */ + effect eRegen = EffectRegenerate(6, 6.0); + + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects(eRegen, eDur); + + int nMeta = GetMetaMagicFeat(); + int nLevel = (GetCasterLevel(OBJECT_SELF)/2)+1; + + if (nMeta == METAMAGIC_EXTEND) + { + nLevel *= 2; + } + + // Stacking Spellpass, 2003-07-07, Georg ... just in case + RemoveEffectsFromSpell(oTarget, GetSpellId()); + + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + //Apply effects and VFX + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + +} diff --git a/_module/_removed files/x2_s0_scntsphere.nss b/_module/_removed files/x2_s0_scntsphere.nss new file mode 100644 index 00000000..a3593b37 --- /dev/null +++ b/_module/_removed files/x2_s0_scntsphere.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Scintillating Sphere +//:: X2_S0_ScntSphere +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// A scintillating sphere is a burst of electricity +// that detonates with a low roar and inflicts 1d6 +// points of damage per caster level (maximum of 10d6) +// to all creatures within the area. Unattended objects +// also take damage. The explosion creates almost no pressure. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 25 , 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs, 02/06/2003 + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(459); + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 15) + { + nCasterLvl = 15; + } + //Apply the fireball explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_module/_removed files/x2_s0_stneholda.nss b/_module/_removed files/x2_s0_stneholda.nss new file mode 100644 index 00000000..9394692a --- /dev/null +++ b/_module/_removed files/x2_s0_stneholda.nss @@ -0,0 +1,55 @@ +//:://///////////////////////////////////////////// +//:: Stonehold +//:: X2_S0_StneholdA +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates an area of effect that will cover the + creature with a stone shell holding them in + place. +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: August 2003 +//:: Updated : October 2003 +//::////////////////////////////////////////////// + + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + //Declare major variables + int nRounds; + effect eHold = EffectParalyze(); + effect eDur = EffectVisualEffect(476 ); + effect eFind; + object oTarget; + object oCreator; + float fDelay; + int nMetaMagic = GetMetaMagicFeat(); + + effect eLink = EffectLinkEffects(eDur,eHold); + //Get the first object in the persistant area + oTarget = GetEnteringObject(); + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STONEHOLD)); + //Make a SR check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + //Make a Will Save + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_SPELL)) + { + nRounds = MaximizeOrEmpower(6, 1, nMetaMagic); + fDelay = GetRandomDelay(0.45, 1.85); + //Apply the VFX impact and linked effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nRounds))); + } + } + } +} diff --git a/_module/_removed files/x2_s0_stneholdc.nss b/_module/_removed files/x2_s0_stneholdc.nss new file mode 100644 index 00000000..b7669662 --- /dev/null +++ b/_module/_removed files/x2_s0_stneholdc.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Stonehold +//:: X2_S0_StneholdC +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates an area of effect that will cover the + creature with a stone shell holding them in + place. +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: May 04, 2002 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nRounds; + int nMetaMagic = GetMetaMagicFeat(); + effect eHold = EffectParalyze(); + effect eDur = EffectVisualEffect(476 ); + eHold = EffectLinkEffects(eDur, eHold); + effect eFind; + object oTarget; + object oCreator; + float fDelay; + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + oTarget = GetFirstInPersistentObject(); + while(GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STONEHOLD)); + if (!GetHasSpellEffect(SPELL_STONEHOLD,oTarget)) + { + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_SPELL)) + { + nRounds = MaximizeOrEmpower(6, 1, nMetaMagic); + fDelay = GetRandomDelay(0.75, 1.75); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHold, oTarget, RoundsToSeconds(nRounds))); + } + } + } + } + oTarget = GetNextInPersistentObject(); + } +} diff --git a/_module/_removed files/x2_s0_undeath.nss b/_module/_removed files/x2_s0_undeath.nss new file mode 100644 index 00000000..706e3715 --- /dev/null +++ b/_module/_removed files/x2_s0_undeath.nss @@ -0,0 +1,155 @@ +//:://///////////////////////////////////////////// +//:: Undeath to Death +//:: X2_S0_Undeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + + This spell slays 1d4 HD worth of undead creatures + per caster level (maximum 20d4). Creatures with + the fewest HD are affected first; + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: August 13,2003 +//::////////////////////////////////////////////// + + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_toollib" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void DoUndeadToDeath(object oCreature) +{ + SignalEvent(oCreature, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + SetLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD", TRUE); + + if (!MySavingThrow(SAVING_THROW_WILL,oCreature, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_NONE,OBJECT_SELF)) + { + float fDelay = GetRandomDelay(0.2f,0.4f); + if (!MyResistSpell(OBJECT_SELF, oCreature, fDelay)) + { + effect eDeath = EffectDamage(GetCurrentHitPoints(oCreature),DAMAGE_TYPE_DIVINE,DAMAGE_POWER_ENERGY); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + DelayCommand(fDelay+0.5f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oCreature)); + DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oCreature)); + } + else + { + DelayCommand(1.0f,DeleteLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD")); + } + } + else + { + DelayCommand(1.0f,DeleteLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD")); + } +} + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + int nMetaMagic = GetMetaMagicFeat(); + + +// End of Spell Cast Hook + + // Impact VFX + location lLoc = GetSpellTargetLocation(); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_STRIKE_HOLY),lLoc); + TLVFXPillar(VFX_FNF_LOS_HOLY_20, lLoc,3,0.0f); + + + // build list with affected creatures + + // calculation + int nLevel = GetCasterLevel(OBJECT_SELF); + if (nLevel>30) + { + nLevel = 30; + } + + // calculate number of hitdice affected + int nLow = 9999; + object oLow; + int nHDLeft = nLevel *d4(); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nHDLeft = 4 * GetCasterLevel(OBJECT_SELF);//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nHDLeft += (nHDLeft/2); //Damage/Healing is +50% + } + + int nCurHD; + object oFirst = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f,lLoc ); + + // Only start loop if there is a creature in the area of effect + if (GetIsObjectValid(oFirst)) + { + + object oTarget = oFirst; + while (GetIsObjectValid(oTarget) && nHDLeft >0) + { + + if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) + { + nCurHD = GetHitDice(oTarget); + if (nCurHD <= nHDLeft ) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + // ignore creatures already affected + if (GetLocalInt(oTarget,"X2_EBLIGHT_I_AM_DEAD") == 0 && !GetPlotFlag(oTarget) && !GetIsDead(oTarget)) + { + // store the creature with the lowest HD + if (GetHitDice(oTarget) <= nLow) + { + nLow = GetHitDice(oTarget); + oLow = oTarget; + } + } + } + } + } + + // Get next target + oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f ,lLoc); + + // End of cycle, time to kill the lowest creature + if (!GetIsObjectValid(oTarget)) + { + // we have a valid lowest creature we can affect with the remaining HD + if (GetIsObjectValid(oLow) && nHDLeft >= nLow) + { + DoUndeadToDeath(oLow); + // decrement remaining HD + nHDLeft -= nLow; + // restart the loop + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, GetSpellTargetLocation()); + } + // reset counters + oLow = OBJECT_INVALID; + nLow = 9999; + } + } + } + } diff --git a/_module/_removed files/x2_s1_chaosspit.nss b/_module/_removed files/x2_s1_chaosspit.nss new file mode 100644 index 00000000..0b5c097b --- /dev/null +++ b/_module/_removed files/x2_s1_chaosspit.nss @@ -0,0 +1,90 @@ +//:://///////////////////////////////////////////// +//:: Slaad Chaos Spittle +//:: x2_s1_chaosspit +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. + + Damage is 20d4 for black slaad, 10d4 for white + slaad and hd/2 d4 for any other creature this + spell is assigned to + + A shifter will do his shifter level /3 d6 + points of damage + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: Sept 08 , 2003 +//::////////////////////////////////////////////// +#include "x0_i0_spells" +#include "NW_I0_SPELLS" +void main() +{ + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nHD = GetHitDice(OBJECT_SELF); + effect eVis = EffectVisualEffect(VFX_IMP_ACID_L); + effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt; + int nCount; + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + if (GetIsPC(OBJECT_SELF)) + { + nCount = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3) + 2 ; + } + else if (GetAppearanceType(OBJECT_SELF) == 426) // black slaad = 20d6 + { + nCount = 20 ; + } + else if (GetAppearanceType(OBJECT_SELF) == 427) // white slaad = 10d6 + { + nCount = 10 ; + } + else + { + nCount = nHD /2; + } + + if (nCount == 0) + { + nCount = 1; + } + + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + int nDamage = d4(nCount); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } + } + } +} diff --git a/_module/_removed files/x2_s1_petrgaze.nss b/_module/_removed files/x2_s1_petrgaze.nss new file mode 100644 index 00000000..994ccd23 --- /dev/null +++ b/_module/_removed files/x2_s1_petrgaze.nss @@ -0,0 +1,92 @@ +//:://///////////////////////////////////////////// +//:: Gaze attack for shifter forms +//:: x2_s1_petrgaze +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + + Petrification gaze for polymorph type + basilisk and medusa + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: July, 09, 2003 +//::////////////////////////////////////////////// + +#include "x0_i0_spells" +#include "x2_inc_shifter" + +void main() +{ +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + //-------------------------------------------------------------------------- + // Enforce artifical use limit on that ability + //-------------------------------------------------------------------------- + //Comment out to make unlimited! + if (ShifterDecrementGWildShapeSpellUsesLeft() <1 ) + { + FloatingTextStrRefOnCreature(83576, OBJECT_SELF); + return; + } + + //-------------------------------------------------------------------------- + // Make sure we are not blind + //-------------------------------------------------------------------------- + if( GZCanNotUseGazeAttackCheck(OBJECT_SELF)) + { + return; + } + + //-------------------------------------------------------------------------- + // Calculate Save DC + //-------------------------------------------------------------------------- + //Here we can adjust how hard the DC is on the Gaze Press the Constant buttn + int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_HARD); + + float fDelay; + object oTarget = GetSpellTargetObject(); + int nHitDice = GetCasterLevel(OBJECT_SELF); + int nSpellID = GetSpellId(); + object oSelf = OBJECT_SELF; + + //-------------------------------------------------------------------------- + // Loop through all available targets in spellcone + //-------------------------------------------------------------------------- + location lFinalTarget = GetSpellTargetLocation(); + vector vFinalPosition; + if ( lFinalTarget == GetLocation(OBJECT_SELF) ) + { + // Since the target and origin are the same, we have to determine the + // direction of the spell from the facing of OBJECT_SELF (which is more + // intuitive than defaulting to East everytime). + + // In order to use the direction that OBJECT_SELF is facing, we have to + // instead we pick a point slightly in front of OBJECT_SELF as the target. + vector lTargetPosition = GetPositionFromLocation(lFinalTarget); + vFinalPosition.x = lTargetPosition.x + cos(GetFacing(OBJECT_SELF)); + vFinalPosition.y = lTargetPosition.y + sin(GetFacing(OBJECT_SELF)); + lFinalTarget = Location(GetAreaFromLocation(lFinalTarget),vFinalPosition,GetFacingFromLocation(lFinalTarget)); + } + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lFinalTarget, TRUE); + while(GetIsObjectValid(oTarget)) + { + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + + if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF) + { + DelayCommand(fDelay, DoPetrification(nHitDice, oSelf, oTarget, nSpellID, nDC)); + //Get next target in spell area + } + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lFinalTarget, TRUE); + } + +} + + diff --git a/_module/_removed files/x2_s1_wyrmbreath.nss b/_module/_removed files/x2_s1_wyrmbreath.nss new file mode 100644 index 00000000..db31b9c1 --- /dev/null +++ b/_module/_removed files/x2_s1_wyrmbreath.nss @@ -0,0 +1,153 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath for Wyrmling Shape +//:: x2_s1_wyrmbreath +//:: Copyright (c) 2003Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the power of the dragon breath + used by a player polymorphed into wyrmling + shape + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: June, 17, 2003 +//::////////////////////////////////////////////// +/* +-- Modified by Iznoghoud January 13 2004 +Made a fix for the way the damage is calculated. + +- Before, it would determine a number of dice and die type (d4, d6, d8, d10), throw +that die one time, and then multiply that number with the number of dice. +Also, every target got the same amount of damage. + +- Now, it determines a number of dice N and die type (d4, d6, d8, d10), throws that +die N times, and adds up the results. +This results in the damage being averaged out like all other spells, instead of +going into the low or high extremes so often. Also, every target can get a +different amount of damage, just like with other spells. +*/ +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_shifter" + +void main() +{ + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + //-------------------------------------------------------------------------- + // Set up variables + //-------------------------------------------------------------------------- + int nType = GetSpellId(); + int nDamageType; + int nDamageDie; + int nVfx; + int nSave; + int nSpell; + int nDice; + + + //-------------------------------------------------------------------------- + // Decide on breath weapon type, vfx based on spell id + //-------------------------------------------------------------------------- + switch (nType) + { + case 663: //white + nDamageDie = 4; + nDamageType = DAMAGE_TYPE_COLD; + nVfx = VFX_IMP_FROST_S; + nSave = SAVING_THROW_TYPE_COLD; + nSpell = SPELLABILITY_DRAGON_BREATH_COLD; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; + break; + + case 664: //black + nDamageDie = 4; + nDamageType = DAMAGE_TYPE_ACID; + nVfx = VFX_IMP_ACID_S; + nSave = SAVING_THROW_TYPE_ACID; + nSpell = SPELLABILITY_DRAGON_BREATH_ACID; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; + break; + + case 665: //red + nDamageDie = 10; + nDamageType = DAMAGE_TYPE_FIRE; + nVfx = VFX_IMP_FLAME_M; + nSave = SAVING_THROW_TYPE_FIRE; + nSpell = SPELLABILITY_DRAGON_BREATH_FIRE; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /3)+1; + break; + + case 666: //green + nDamageDie = 6; + nDamageType = DAMAGE_TYPE_ACID; + nVfx = VFX_IMP_ACID_S; + nSave = SAVING_THROW_TYPE_ACID; + nSpell = SPELLABILITY_DRAGON_BREATH_GAS; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; + break; + + case 667: //blue + nDamageDie = 8; + nDamageType = DAMAGE_TYPE_ELECTRICAL; + nVfx = VFX_IMP_LIGHTNING_S; + nSave = SAVING_THROW_TYPE_ELECTRICITY; + nSpell = SPELLABILITY_DRAGON_BREATH_LIGHTNING; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /3)+1; + break; + + } + + //-------------------------------------------------------------------------- + // Calculate Save DC based on shifter level + //-------------------------------------------------------------------------- + int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_NORMAL); + + //-------------------------------------------------------------------------- + // Calculate Damage + //-------------------------------------------------------------------------- + + + int nDamage = 0; + int i; + int nDamStrike; + float fDelay; + object oTarget; + effect eVis, eBreath; + + //-------------------------------------------------------------------------- + //Loop through all targets and do damage + //-------------------------------------------------------------------------- + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpell)); + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + // Calculate damage for this target + nDamage = 0; + for (i = 0; i < nDice; i++) // Roll the damage die nDice times and add up the damage. + nDamage += (Random(nDamageDie)+1); + + nDamStrike = GetReflexAdjustedDamage(nDamage, oTarget, nDC); + if (nDamStrike > 0) + { + eBreath = EffectDamage(nDamStrike, nDamageType); + eVis = EffectVisualEffect(nVfx); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget)); + } + } + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + } +} diff --git a/_module/_removed files/x2_s2_blindspd.nss b/_module/_removed files/x2_s2_blindspd.nss new file mode 100644 index 00000000..237a274c --- /dev/null +++ b/_module/_removed files/x2_s2_blindspd.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Haste +//:: NW_S0_Haste.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Gives the targeted creature one extra partial + action per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 29, 2001 +//::////////////////////////////////////////////// +// Modified March 2003: Remove Expeditious Retreat effects + +#include "x0_i0_spells" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + //Declare major variables + object oTarget = GetSpellTargetObject(); + + if (GetHasSpellEffect(SPELL_EXPEDITIOUS_RETREAT, oTarget) == TRUE) + { + RemoveSpellEffects(SPELL_EXPEDITIOUS_RETREAT, OBJECT_SELF, oTarget); + } + + if (GetHasSpellEffect(SPELL_HASTE, oTarget) == TRUE) + { + RemoveSpellEffects(SPELL_HASTE, OBJECT_SELF, oTarget); + } + + if (GetHasSpellEffect(SPELL_MASS_HASTE, oTarget) == TRUE) + { + RemoveSpellEffects(SPELL_MASS_HASTE, OBJECT_SELF, oTarget); + } + + if (GetHasSpellEffect(GetSpellId(), oTarget) == TRUE) + { + RemoveSpellEffects(GetSpellId(), OBJECT_SELF, oTarget); + } + + effect eHaste = EffectHaste(); + effect eVis = EffectVisualEffect(460); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eHaste, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Check for metamagic extension + + // Apply effects to the currently selected target. + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + +effect eEffect; +eEffect = EffectModifyAttacks(2); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectACIncrease(4, AC_DODGE_BONUS); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL, 4, SAVING_THROW_TYPE_ALL); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectAttackIncrease(2); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectDamageIncrease(DAMAGE_BONUS_1d8, DAMAGE_TYPE_BLUDGEONING); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); +} + + diff --git a/_module/_removed files/x2_s2_cursesong.nss b/_module/_removed files/x2_s2_cursesong.nss new file mode 100644 index 00000000..bc7f8cab --- /dev/null +++ b/_module/_removed files/x2_s2_cursesong.nss @@ -0,0 +1,417 @@ +//:://///////////////////////////////////////////// +//:: Curse Song +//:: X2_S2_CurseSong +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spells applies penalties to all of the + bard's enemies within 30ft for a set duration of + 10 rounds. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: May 16, 2003 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 20, 2003 + +#include "x2_i0_spells" + +void main() +{ + +//Override in town, no casting! +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left + return; + } + + if (GetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced + return; + } + + + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARD); + int nRanks = GetSkillRank(SKILL_PERFORM); + int nPerform = nRanks; + int nDuration = 10; //+ nChr; + + effect eAttack; + effect eDamage; + effect eWill; + effect eFort; + effect eReflex; + effect eHP; + effect eAC; + effect eSkill; + + int nAttack; + int nDamage; + int nWill; + int nFort; + int nReflex; + int nHP; + int nAC; + int nSkill; + //Check to see if the caster has Lasting Impression and increase duration. + if(GetHasFeat(870)) + { + nDuration *= 10; + } + + if(GetHasFeat(424)) // lingering song + { + nDuration += 5; + } + + if(nPerform >= 90 && nLevel >= 30) + { + nAttack = 4; + nDamage = 6; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 70; + nAC = 5; + nSkill = 20; + } + else if(nPerform >= 85 && nLevel >= 29) + { + nAttack = 4; + nDamage = 6; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 65; + nAC = 5; + nSkill = 18; + } + else if(nPerform >= 82 && nLevel >= 28) + { + nAttack = 3; + nDamage = 5; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 60; + nAC = 5; + nSkill = 16; + } + else if(nPerform >= 78 && nLevel >= 27) + { + nAttack = 3; + nDamage = 5; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 55; + nAC = 4; + nSkill = 14; + } + else if(nPerform >= 75 && nLevel >= 26) + { + nAttack = 3; + nDamage = 4; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 50; + nAC = 4; + nSkill = 14; + } + else if(nPerform >= 75 && nLevel >= 25) + { + nAttack = 2; + nDamage = 4; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 45; + nAC = 4; + nSkill = 13; + } + else if(nPerform >= 70 && nLevel >= 24) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 40; + nAC = 4; + nSkill = 12; + } + else if(nPerform >= 65 && nLevel >= 23) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 36; + nAC = 4; + nSkill = 11; + } + else if(nPerform >= 60 && nLevel >= 22) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 34; + nAC = 4; + nSkill = 10; + } + else if(nPerform >= 55 && nLevel >= 21) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 32; + nAC = 4; + nSkill = 9; + } + else if(nPerform >= 50 && nLevel >= 20) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 28; + nAC = 3; + nSkill = 8; + } + else if(nPerform >= 45 && nLevel >= 19) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 26; + nAC = 3; + nSkill = 7; + } + else if(nPerform >= 40 && nLevel >= 18) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 24; + nAC = 3; + nSkill = 6; + } + else if(nPerform >= 35 && nLevel >= 17) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 22; + nAC = 3; + nSkill = 5; + } + else if(nPerform >= 30 && nLevel >= 16) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 20; + nAC = 3; + nSkill = 4; + } + else if(nPerform >= 24 && nLevel >= 15) + { + nAttack = 2; + nDamage = 3; + nWill = 2; + nFort = 2; + nReflex = 2; + nHP = 16; + nAC = 3; + nSkill = 3; + } + else if(nPerform >= 21 && nLevel >= 14) + { + nAttack = 2; + nDamage = 3; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 16; + nAC = 3; + nSkill = 2; + } + else if(nPerform >= 18 && nLevel >= 12) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 2; + nSkill = 2; + } + else if(nPerform >= 15 && nLevel >= 8) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 12 && nLevel >= 6) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 0; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 9 && nLevel >= 3) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 6 && nLevel >= 2) + { + nAttack = 1; + nDamage = 1; + nWill = 1; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 3 && nLevel >= 1) + { + nAttack = 1; + nDamage = 1; + nWill = 0; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + + eAttack = EffectAttackDecrease(nAttack); + eDamage = EffectDamageDecrease(nDamage, DAMAGE_TYPE_SLASHING); + effect eLink = EffectLinkEffects(eAttack, eDamage); + + if(nWill > 0) + { + eWill = EffectSavingThrowDecrease(SAVING_THROW_WILL, nWill); + eLink = EffectLinkEffects(eLink, eWill); + } + if(nFort > 0) + { + eFort = EffectSavingThrowDecrease(SAVING_THROW_FORT, nFort); + eLink = EffectLinkEffects(eLink, eFort); + } + if(nReflex > 0) + { + eReflex = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nReflex); + eLink = EffectLinkEffects(eLink, eReflex); + } + if(nHP > 0) + { + //SpeakString("HP Bonus " + IntToString(nHP)); + eHP = EffectDamage(nHP, DAMAGE_TYPE_SONIC, DAMAGE_POWER_NORMAL); +// eLink = EffectLinkEffects(eLink, eHP); + } + if(nAC > 0) + { + eAC = EffectACDecrease(nAC, AC_DODGE_BONUS); + eLink = EffectLinkEffects(eLink, eAC); + } + if(nSkill > 0) + { + eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nSkill); + eLink = EffectLinkEffects(eLink, eSkill); + } + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(507); + eLink = EffectLinkEffects(eLink, eDur); + + effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC); + effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF)); + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + + eHP = ExtraordinaryEffect(eHP); + eLink = ExtraordinaryEffect(eLink); + + if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur2, OBJECT_SELF, RoundsToSeconds(nDuration)); + } + float fDelay; + while(GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song + if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget)) + { + if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget)) + { + if (nHP > 0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SONIC), oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHP, oTarget)); + } + + if (!GetIsDead(oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + else + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); + } + } + + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + } + DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS); +} diff --git a/_module/_removed files/x2_s2_dragknght.nss b/_module/_removed files/x2_s2_dragknght.nss new file mode 100644 index 00000000..bb1757ba --- /dev/null +++ b/_module/_removed files/x2_s2_dragknght.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Dragon Knight +//:: X2_S2_DragKnght +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an adult red dragon for you to + command. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 07, 2003 +//::////////////////////////////////////////////// +#include "x2_inc_toollib" + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + */ + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + + //Declare major variables + int nDuration = 20; + effect eSummon; + effect eVis = EffectVisualEffect(460); + eSummon = EffectSummonCreature("epicdragon1",481,0.0f,TRUE); + + // * make it so dragon cannot be dispelled + eSummon = ExtraordinaryEffect(eSummon); + //Apply the summon visual and summon the dragon. + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon,GetSpellTargetLocation(), RoundsToSeconds(nDuration)); + DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis,GetSpellTargetLocation())); +} + + diff --git a/_module/_removed files/x2_s2_dthmsttch.nss b/_module/_removed files/x2_s2_dthmsttch.nss new file mode 100644 index 00000000..77c97dd3 --- /dev/null +++ b/_module/_removed files/x2_s2_dthmsttch.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: Deathless Master Touch +//:: X2_S2_dthmsttch +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Pale Master may use their undead arm to + kill their foes. + + -Requires melee Touch attack + -Save vs DC 17 to resist + + Epic: + -SaveDC raised by +1 for each 2 levels past 10th +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: July, 24, 2003 +//::////////////////////////////////////////////// + + +#include "NW_I0_SPELLS" +#include "X2_inc_switches" + +void main() +{ + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + //Declare major variables + object oTarget = GetSpellTargetObject(); + //object oCaster = GetCurrentHitPoints(OBJECT_SELF); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + + //Declare effects + effect eSlay = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH); + int nSave = 24; + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + //* GZ: Handle Epic Save Progression + int nEpicMod = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF) - 10 ; + if (nEpicMod>0) + { + nSave += (nEpicMod/2); + } + + //Link effects + + if(TouchAttackMelee(oTarget,TRUE)>0) + { + //Signal spell cast at event + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 624)); + //Saving Throw + + if ((GetCreatureSize(oTarget)>CREATURE_SIZE_LARGE )&& (GetModuleSwitchValue(MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH) == TRUE)) + { + return; // creature too large to be affected. + } + + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nSave, SAVING_THROW_TYPE_NEGATIVE)) + { + //Apply effects to target and caster + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } + } + +} diff --git a/_module/_removed files/x2_s2_gwburn.nss b/_module/_removed files/x2_s2_gwburn.nss new file mode 100644 index 00000000..8b2387f7 --- /dev/null +++ b/_module/_removed files/x2_s2_gwburn.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Outsider Shape - Azer - Fire stream +//:: x2_s2_gwburn +//:: Copyright (c) 2003Bioware Corp. +//::////////////////////////////////////////////// +/* + + Azer shoot fire ability. The fire they breathe + is natural, so there is no SR check against it + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: July, 07, 2003 +//::////////////////////////////////////////////// + +#include "x2_inc_shifter" +void main() +{ + //-------------------------------------------------------------------------- + // Enforce artifical use limit on that ability + //-------------------------------------------------------------------------- + /* if (ShifterDecrementGWildShapeSpellUsesLeft() <1 ) + { + FloatingTextStrRefOnCreature(83576, OBJECT_SELF); + return; + } + */ + + //-------------------------------------------------------------------------- + // Create VFX + //-------------------------------------------------------------------------- + object oTarget = GetSpellTargetObject(); + int nTouch = TouchAttackRanged(oTarget); + effect eRay = EffectBeam(444,OBJECT_SELF,BODY_NODE_CHEST,(nTouch == 0)); + effect eDur = EffectVisualEffect(498); + + + float fDelay = GetDistanceBetween(oTarget, OBJECT_SELF)/14; + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eRay,oTarget,1.7f); + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + + if (nTouch > 0) + { + int nDamage = d4( GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3 ) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); + if (nTouch ==2) + { + nDamage += d4( GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3 ) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); + } + int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_NORMAL); + nDamage = GetReflexAdjustedDamage(nDamage,oTarget,nDC,SAVING_THROW_TYPE_FIRE,OBJECT_SELF); + effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); + effect eHit = EffectVisualEffect(VFX_IMP_FLAME_S); + + eHit = EffectLinkEffects(eDamage,eHit); + DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eDur,oTarget,3.0f)); + DelayCommand(fDelay+0.3f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eHit,oTarget,3.0f)); + } + + +} + + + diff --git a/_module/_removed files/x2_s2_gwildshp.nss b/_module/_removed files/x2_s2_gwildshp.nss new file mode 100644 index 00000000..0f668ba8 --- /dev/null +++ b/_module/_removed files/x2_s2_gwildshp.nss @@ -0,0 +1,458 @@ +//:://///////////////////////////////////////////// +//:: Greater Wild Shape, Humanoid Shape +//:: x2_s2_gwildshp +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Allows the character to shift into one of these + forms, gaining special abilities + Credits must be given to mr_bumpkin from the NWN + community who had the idea of merging item properties + from weapon and armor to the creatures new forms. +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-07-02 +//::////////////////////////////////////////////// +//:: Modified By: Iznoghoud +/* +What this script changes: +- Tower shields now carry over their properties just like Small and Large +shields. (Which has been a bug I believe since the original script had 2 checks +for SMALLSHIELD in it, one probably should have been TOWERSHIELD) +- Melee Weapon properties now carry over to the unarmed forms' claws and bite +attacks. +- My last (and most complicated) changes: +1) Now, items with an AC bonus (or penalty) carry over to the shifted form as +the correct type. This means if you wear an amulet of natural armor +4, and a +cloak of protection +5, and you shift to a form that gets all item properties +carried over, you will have the +4 natural armor bonus from the ammy, as well as +the +5 deflection bonus from the cloak. No longer will the highest one override +all the other AC bonuses even if they are a different type. Note that some +forms, such as the dragon, get an inherent natural AC bonus, which may still +override your amulet of natural armor, if the inherent bonus is better. +2) Other "stackable" item properties, like ability bonuses, skill bonuses and +saving throw bonuses, now correctly add up in shifted form. This means if you +have a ring that gives +2 strength, and a ring with +3 strength, and you shift +into a drow warrior, you get +5 strength in shifted form, where you used to get +only +3. (the highest) + +-- Modified by StoneDK 2003.12.21 +Added saving of old equip to allow items to be applied without going +through normal shape, should now get item effects even when changing +directly from wyrm to kobold shape. +Added message to player about which items are merged. + +-- Modified by Iznoghoud 2003-12-26 +Added storing of Polymorph ID on the player for letting exportallchars() scripts +reapply polymorphing effects when saving + +-- Modified by Iznoghoud 2003-12-27 +Added regeneration as a stacking property, bracers now stored correctly for re-shifting, +Added constants for easy configuration. + +-- Modified by Iznoghoud January 13 2004 +The bulk of the handling of stacking item properties, as well as the constants +for configuration, are now in ws_inc_shifter, which is included +by this file, and the two druid polymorphing scripts, nw_s2_elemshape and nw_s2_wildshape. +Made the message about which items are merged more explicit. +*/ +//::////////////////////////////////////////////// + +#include "ws_inc_shifter" + +// Main function of the script +void main() +{ + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + //-------------------------------------------------------------------------- + // Declare major variables + //-------------------------------------------------------------------------- + object oPC = OBJECT_SELF; + int nSpell = GetSpellId(); + object oTarget = GetSpellTargetObject(); + effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH); + int nShifter = GetLevelByClass(CLASS_TYPE_SHIFTER); + effect ePoly; + int nPoly; + //-------------------------------------------------------------------------- + // Determine which form to use based on spell id, gender and level + //-------------------------------------------------------------------------- + switch (nSpell) + { + //----------------------------------------------------------------------- + // Greater Wildshape I - Wyrmling Shape + //----------------------------------------------------------------------- + case 658: nPoly = POLYMORPH_TYPE_WYRMLING_RED; break; + case 659: nPoly = POLYMORPH_TYPE_WYRMLING_BLUE; break; + case 660: nPoly = POLYMORPH_TYPE_WYRMLING_BLACK; break; + case 661: nPoly = POLYMORPH_TYPE_WYRMLING_WHITE; break; + case 662: nPoly = POLYMORPH_TYPE_WYRMLING_GREEN; break; + //----------------------------------------------------------------------- + // Greater Wildshape II - Minotaur, Gargoyle, Harpy + //----------------------------------------------------------------------- + case 672: if (nShifter < X2_GW2_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_HARPY; + else + nPoly = 97; + break; + case 678: if (nShifter < X2_GW2_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_GARGOYLE; + else + nPoly = 98; + break; + case 680: if (nShifter < X2_GW2_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_MINOTAUR; + else + nPoly = 96; + break; + //----------------------------------------------------------------------- + // Greater Wildshape III - Drider, Basilisk, Manticore + //----------------------------------------------------------------------- + case 670: if (nShifter < X2_GW3_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_BASILISK; + else + nPoly = 99; + break; + case 673: if (nShifter < X2_GW3_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_DRIDER; + else + nPoly = 100; + break; + case 674: if (nShifter < X2_GW3_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_MANTICORE; + else + nPoly = 101; + break; + //----------------------------------------------------------------------- + // Greater Wildshape IV - Dire Tiger, Medusa, MindFlayer + //----------------------------------------------------------------------- + case 679: nPoly = POLYMORPH_TYPE_MEDUSA; break; + case 691: nPoly = 68; break; // Mindflayer + case 694: nPoly = 69; break; // DireTiger + //----------------------------------------------------------------------- + // Humanoid Shape - Kobold Commando, Drow, Lizard Crossbow Specialist + //----------------------------------------------------------------------- + case 682: + if(nShifter< 17) + { + if (GetGender(OBJECT_SELF) == GENDER_MALE) //drow + nPoly = 59; + else + nPoly = 70; + } + else + { + if (GetGender(OBJECT_SELF) == GENDER_MALE) //drow + nPoly = 105; + else + nPoly = 106; + } + break; + case 683: + if(nShifter< 17) + { + nPoly = 82; break; // Lizard + } + else + { + nPoly =104; break; // Epic Lizard + } + case 684: if(nShifter< 17) + { + nPoly = 83; break; // Kobold Commando + } + else + { + nPoly = 103; break; // Kobold Commando + } + //----------------------------------------------------------------------- + // Undead Shape - Spectre, Risen Lord, Vampire + //----------------------------------------------------------------------- + case 704: nPoly = 75; break; // Risen lord + case 705: if (GetGender(OBJECT_SELF) == GENDER_MALE) // vampire + nPoly = 74; + else + nPoly = 77; + break; + case 706: nPoly = 76; break; /// spectre + //----------------------------------------------------------------------- + // Dragon Shape - Red Blue and Green Dragons + //----------------------------------------------------------------------- + case 707: nPoly = 72; break; // Ancient Red Dragon + case 708: nPoly = 71; break; // Ancient Blue Dragon + case 709: nPoly = 73; break; // Ancient Green Dragon + //----------------------------------------------------------------------- + // Outsider Shape - Rakshasa, Azer Chieftain, Black Slaad + //----------------------------------------------------------------------- + case 733: if (GetGender(OBJECT_SELF) == GENDER_MALE) //azer + nPoly = 85; + else // anything else is female + nPoly = 86; + break; + case 734: if (GetGender(OBJECT_SELF) == GENDER_MALE) //rakshasa + nPoly = 88; + else // anything else is female + nPoly = 89; + break; + case 735: nPoly =87; break; // slaad + //----------------------------------------------------------------------- + // Construct Shape - Stone Golem, Iron Golem, Demonflesh Golem + //----------------------------------------------------------------------- + case 738: nPoly =91; break; // stone golem + case 739: nPoly =92; break; // demonflesh golem + case 740: nPoly =90; break; // iron golem + } + //-------------------------------------------------------------------------- + // Determine which items get their item properties merged onto the shifters + // new form. + //-------------------------------------------------------------------------- + int bWeapon; + int bArmor; + int bItems; + int bCopyGlovesToClaws = FALSE; + + bWeapon = ShifterMergeWeapon(nPoly); + + if ( GW_ALWAYS_COPY_ARMOR_PROPS ) + bArmor = TRUE; + else + bArmor = ShifterMergeArmor(nPoly); + + if ( GW_ALWAYS_COPY_ITEM_PROPS ) + bItems = TRUE; + else + bItems = ShifterMergeItems(nPoly); + + // Send message to PC about which items get merged to this form + string sMerge; + sMerge = "Merged: "; // : This is a color code that makes the text behind it sort of light blue. + if(bArmor) sMerge += "Armor, Helmet, Shield"; + if(bItems) sMerge += ", Rings, Amulet, Cloak, Boots, Belt, Bracers"; + if( bWeapon || GW_COPY_WEAPON_PROPS_TO_UNARMED == 1 ) + sMerge += ", Weapon"; + else if ( GW_COPY_WEAPON_PROPS_TO_UNARMED == 2 ) + sMerge += ", Gloves to unarmed attacks"; + else if (GW_COPY_WEAPON_PROPS_TO_UNARMED == 3 ) + sMerge += ", Weapon (if you had one equipped) or gloves to unarmed attacks"; + else + sMerge += ", No weapon or gloves to unarmed attacks"; + SendMessageToPC(oTarget,sMerge + "."); + + // Store which items should transfer to this polymorph type. (For exportallchar scripts) + SetLocalInt(oTarget, "GW_PolyID", nPoly); + SetLocalInt(oTarget, "GW_bWeapon", bWeapon ); + SetLocalInt(oTarget, "GW_bArmor", bArmor ); + SetLocalInt(oTarget, "GW_bItems", bItems ); + + //-------------------------------------------------------------------------- + // Store the old objects so we can access them after the character has + // changed into his new form + //-------------------------------------------------------------------------- + object oWeaponOld; + object oArmorOld; + object oRing1Old ; + object oRing2Old; + object oAmuletOld; + object oCloakOld ; + object oBootsOld ; + object oBeltOld ; + object oHelmetOld; + object oShield ; + object oBracerOld; + object oHideOld; + //Assume the normal shape doesn't have a creature skin object. + //If using a subracesystem or something else that places a skin on the normal shape + //another condition is needed to decide whether or not to store current items. + //One way could be to scan all effects to see whether one is a polymorph effect. + int nPolyed = GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF)); + // If there is a creature armor see if it is a creature hide put + // on the unpolymorphed player by scanning for a polymorph effect. + if ( nPolyed ) + nPolyed = ( ScanForPolymorphEffect(OBJECT_SELF) != -2 ); + if(! nPolyed) + { + //if not polymorphed get items worn and store on player. + oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF); + oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF); + oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF); + oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF); + oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF); + oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF); + oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF); + oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF); + oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF); + oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF); + oBracerOld = GetItemInSlot(INVENTORY_SLOT_ARMS,OBJECT_SELF); + oHideOld = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF); + SetLocalObject(OBJECT_SELF,"GW_OldWeapon",oWeaponOld); + SetLocalObject(OBJECT_SELF,"GW_OldArmor",oArmorOld); + SetLocalObject(OBJECT_SELF,"GW_OldRing1",oRing1Old); + SetLocalObject(OBJECT_SELF,"GW_OldRing2",oRing2Old); + SetLocalObject(OBJECT_SELF,"GW_OldAmulet",oAmuletOld); + SetLocalObject(OBJECT_SELF,"GW_OldCloak",oCloakOld); + SetLocalObject(OBJECT_SELF,"GW_OldBoots",oBootsOld); + SetLocalObject(OBJECT_SELF,"GW_OldBelt",oBeltOld); + SetLocalObject(OBJECT_SELF,"GW_OldHelmet",oHelmetOld); + SetLocalObject(OBJECT_SELF,"GW_OldBracer",oBracerOld); + SetLocalObject(OBJECT_SELF,"GW_OldHide",oHideOld); + if (GetIsObjectValid(oShield)) + { + if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD && + GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD && + GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD) + { + oShield = OBJECT_INVALID; + } + } + SetLocalObject(OBJECT_SELF,"GW_OldShield",oShield); + + } + else + { + //if already polymorphed use items stored earlier. + oWeaponOld = GetLocalObject(OBJECT_SELF,"GW_OldWeapon"); + oArmorOld = GetLocalObject(OBJECT_SELF,"GW_OldArmor"); + oRing1Old = GetLocalObject(OBJECT_SELF,"GW_OldRing1"); + oRing2Old = GetLocalObject(OBJECT_SELF,"GW_OldRing2"); + oAmuletOld = GetLocalObject(OBJECT_SELF,"GW_OldAmulet"); + oCloakOld = GetLocalObject(OBJECT_SELF,"GW_OldCloak"); + oBootsOld = GetLocalObject(OBJECT_SELF,"GW_OldBoots"); + oBeltOld = GetLocalObject(OBJECT_SELF,"GW_OldBelt"); + oHelmetOld = GetLocalObject(OBJECT_SELF,"GW_OldHelmet"); + oShield = GetLocalObject(OBJECT_SELF,"GW_OldShield"); + oBracerOld = GetLocalObject(OBJECT_SELF,"GW_OldBracer"); + oHideOld = GetLocalObject(OBJECT_SELF,"GW_OldHide"); + } + + //-------------------------------------------------------------------------- + // Here the actual polymorphing is done + //-------------------------------------------------------------------------- + ePoly = EffectPolymorph(nPoly); + //-------------------------------------------------------------------------- + // Iznoghoud: Link the stackable properties as permanent bonuses to the + // Polymorph effect, instead of putting them on the creature hide. They will + // properly disappear as soon as the polymorph is ended. + //-------------------------------------------------------------------------- + ePoly = AddStackablePropertiesToPoly ( oPC, ePoly, bWeapon, bItems, bArmor, oArmorOld, oRing1Old, oRing2Old, oAmuletOld, oCloakOld, oBracerOld, oBootsOld, oBeltOld, oHelmetOld, oShield, oWeaponOld, oHideOld); + ePoly = ExtraordinaryEffect(ePoly); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF); + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //-------------------------------------------------------------------------- + // This code handles the merging of item properties + //-------------------------------------------------------------------------- + object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF); + object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF); + object oClawLeft = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,OBJECT_SELF); + object oClawRight = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,OBJECT_SELF); + object oBite = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,OBJECT_SELF); + //-------------------------------------------------------------------------- + // ...Weapons + //-------------------------------------------------------------------------- + if (bWeapon) + { + //---------------------------------------------------------------------- + // GZ: 2003-10-20 + // Sorry, but I was forced to take that out, it was confusing people + // and there were problems with updating the stats sheet. + //---------------------------------------------------------------------- + /* if (!GetIsObjectValid(oWeaponOld)) + { + //------------------------------------------------------------------ + // If we had no weapon equipped before, remove the old weapon + // to allow monks to change into unarmed forms by not equipping any + // weapon before polymorphing + //------------------------------------------------------------------ + DestroyObject(oWeaponNew); + } + else*/ + { + //------------------------------------------------------------------ + // Merge item properties... + //------------------------------------------------------------------ + WildshapeCopyWeaponProperties(oTarget, oWeaponOld,oWeaponNew); + } + } + else { + switch ( GW_COPY_WEAPON_PROPS_TO_UNARMED ) + { + case 1: // Copy over weapon properties to claws/bite + WildshapeCopyNonStackProperties(oWeaponOld,oClawLeft, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oClawRight, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oBite, TRUE); + break; + case 2: // Copy over glove properties to claws/bite + WildshapeCopyNonStackProperties(oBracerOld,oClawLeft, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oClawRight, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oBite, FALSE); + bCopyGlovesToClaws = TRUE; + break; + case 3: // Copy over weapon properties to claws/bite if wearing a weapon, otherwise copy gloves + if ( GetIsObjectValid(oWeaponOld) ) + { + WildshapeCopyNonStackProperties(oWeaponOld,oClawLeft, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oClawRight, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oBite, TRUE); + } + else + { + WildshapeCopyNonStackProperties(oBracerOld,oClawLeft, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oClawRight, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oBite, FALSE); + bCopyGlovesToClaws = TRUE; + } + break; + default: // Do not copy over anything + break; + }; + } + //-------------------------------------------------------------------------- + // ...Armor + //-------------------------------------------------------------------------- + if (bArmor) + { + //---------------------------------------------------------------------- + // Merge item properties from armor and helmet... + //---------------------------------------------------------------------- + WildshapeCopyNonStackProperties(oArmorOld,oArmorNew); + WildshapeCopyNonStackProperties(oHelmetOld,oArmorNew); + WildshapeCopyNonStackProperties(oShield,oArmorNew); + WildshapeCopyNonStackProperties(oHideOld,oArmorNew); + } + //-------------------------------------------------------------------------- + // ...Magic Items + //-------------------------------------------------------------------------- + if (bItems) + { + //---------------------------------------------------------------------- + // Merge item properties from from rings, amulets, cloak, boots, belt + // Iz: And bracers, in case oBracerOld gets set to a valid object. + //---------------------------------------------------------------------- + WildshapeCopyNonStackProperties(oRing1Old,oArmorNew); + WildshapeCopyNonStackProperties(oRing2Old,oArmorNew); + WildshapeCopyNonStackProperties(oAmuletOld,oArmorNew); + WildshapeCopyNonStackProperties(oCloakOld,oArmorNew); + WildshapeCopyNonStackProperties(oBootsOld,oArmorNew); + WildshapeCopyNonStackProperties(oBeltOld,oArmorNew); + // Because Bracers can have On Hit Cast Spell type properties we should + // avoid copying the bracers twice. Otherwise the player can get that On + // Hit effect both when hitting, and getting hit. + if ( bCopyGlovesToClaws == FALSE ) + WildshapeCopyNonStackProperties(oBracerOld,oArmorNew); + } + //-------------------------------------------------------------------------- + // Set artificial usage limits for special ability spells to work around + // the engine limitation of not being able to set a number of uses for + // spells in the polymorph radial + //-------------------------------------------------------------------------- + ShifterSetGWildshapeSpellLimits(nSpell); +} + diff --git a/_module/_removed files/x2_s2_hellball.nss b/_module/_removed files/x2_s2_hellball.nss new file mode 100644 index 00000000..660a0a01 --- /dev/null +++ b/_module/_removed files/x2_s2_hellball.nss @@ -0,0 +1,144 @@ +//:://///////////////////////////////////////////// +//:: Hellball +//:: X2_S2_HELLBALL +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Long range area of effect spell + 10d6 sonic, acid, fire and lightning damage to all + objects in the area + + 10d6 points of negative energy damage to caster + if MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER switch + was enabled on the module. + + This spell is supposed to hurt the caster if he + is stupid enough to stand in the area of effect + when all hell breaks loose. It will hurt other + players allied with the caster as well. These + effects are dependent on your difficulty setting + + Save is 20 + relevant ability score, or, when cast + by a placeable, equal to the placeables WILL Save + + There is no benefit from the evasion feats here + as the are of the spell is too large to avoid it + + +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Noobs, Georg Zoeller +//:: Created On: 2003-08-20 +//::////////////////////////////////////////////// + + +#include "X0_I0_SPELLS" +#include "x2_i0_spells" +#include "x2_inc_spellhook" + + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + //Declare major variables + int nDamage1, nDamage2, nDamage3, nDamage4; + float fDelay; + effect eExplode = EffectVisualEffect(464); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_L); + effect eVis3 = EffectVisualEffect(VFX_IMP_SONIC); + + int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF); + + // if this option has been enabled, the caster will take damage for casting + // epic spells, as descripbed in the ELHB + if (GetModuleSwitchValue( MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER) == TRUE) + { + effect eCast = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + int nDamage5 = d8(10); + effect eDam5 = EffectDamage(nDamage5, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eCast, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam5, OBJECT_SELF); + } + + + + effect eDam1, eDam2, eDam3, eDam4, eDam5, eKnock; + eKnock= EffectKnockdown(); + + location lTarget = GetSpellTargetLocation(); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + + int nTotalDamage; + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20 + 0.5f; + //Roll damage for each target + nDamage1 = d10(10) + 20; + nDamage2 = d10(10) + 20; + nDamage3 = d10(10) + 20; + nDamage4 = d10(10) + 20; + // no we don't care about evasion. there is no evasion to hellball + if (MySavingThrow(SAVING_THROW_REFLEX,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF,fDelay) >0) + { + nDamage1 /=2; + nDamage2 /=2; + nDamage3 /=2; + nDamage4 /=2; + } + nTotalDamage = nDamage1+nDamage2+nDamage3+nDamage4; + //Set the damage effect + eDam1 = EffectDamage(nDamage1, DAMAGE_TYPE_NEGATIVE); + eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_POSITIVE); + eDam3 = EffectDamage(nDamage3, DAMAGE_TYPE_FIRE); + eDam4 = EffectDamage(nDamage4, DAMAGE_TYPE_SONIC); + + if(nTotalDamage > 0) + { + if (nTotalDamage > 50) + { + DelayCommand(fDelay+0.3f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget,3.0f)); + } + + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam1, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam3, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam4, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay+0.2f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + DelayCommand(fDelay+0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget)); + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + + +} + diff --git a/_module/_removed files/x2_s2_mghtyrage.nss b/_module/_removed files/x2_s2_mghtyrage.nss new file mode 100644 index 00000000..350ec4d2 --- /dev/null +++ b/_module/_removed files/x2_s2_mghtyrage.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Mighty Rage +//:: X2_S2_MghtyRage +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The Str and Con of the Barbarian increases, + Will Save are +2, AC -2. + Greater Rage starts at level 15. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: May 16, 2003 +//::////////////////////////////////////////////// +#include "x2_i0_spells" +void main() +{ + if(!GetHasFeatEffect(FEAT_BARBARIAN_RAGE)) + { + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARBARIAN); + PlayVoiceChat(VOICE_CHAT_BATTLECRY1); + //Determine the duration by getting the con modifier after being modified + int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + 8; + effect eStr = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8); + effect eCon = EffectAbilityIncrease(ABILITY_STRENGTH, 8); + effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, 4); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + //Added by Guile(This offsets the +12 Cap Some. + effect eAtk; + eAtk = EffectAttackIncrease(6); + eAtk = SupernaturalEffect(eAtk); + effect eDmg; + eDmg = EffectDamageIncrease(DAMAGE_BONUS_8, DAMAGE_TYPE_BLUDGEONING); + eDmg = SupernaturalEffect(eDmg); + effect eHP; + eHP = EffectTemporaryHitpoints(nLevel * 6); + eHP = SupernaturalEffect(eHP); + + effect eLink = EffectLinkEffects(eCon, eStr); + eLink = EffectLinkEffects(eLink, eSave); + eLink = EffectLinkEffects(eLink, eDur); + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Make effect extraordinary + eLink = ExtraordinaryEffect(eLink); + effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX + + if (nCon > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nCon)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF) ; + //This part was added by Guile to offset +12 Cap. + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAtk, OBJECT_SELF, RoundsToSeconds(nCon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDmg, OBJECT_SELF, RoundsToSeconds(nCon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, OBJECT_SELF, RoundsToSeconds(nCon)); + + // 2003-07-08, Georg: Rage Epic Feat Handling + CheckAndApplyEpicRageFeats(nCon); + } + } +} diff --git a/_module/_removed files/x2_s2_mumdust.nss b/_module/_removed files/x2_s2_mumdust.nss new file mode 100644 index 00000000..c596cc4d --- /dev/null +++ b/_module/_removed files/x2_s2_mumdust.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Mummy Dust +//:: X2_S2_MumDust +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a strong warrior mummy for you to + command. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 07, 2003 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + + //Declare major variables + int nDuration = 24; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + effect eSummon; + //Summon the appropriate creature based on the summoner level + //Warrior Mummy + eSummon = EffectSummonCreature("epicmummy1",496,1.0f); + eSummon = ExtraordinaryEffect(eSummon); + //Apply the summon visual and summon the undead. + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); +} + + diff --git a/_module/_removed files/x2_s2_ruin.nss b/_module/_removed files/x2_s2_ruin.nss new file mode 100644 index 00000000..46c168f3 --- /dev/null +++ b/_module/_removed files/x2_s2_ruin.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Greater Ruin +//:: X2_S2_Ruin +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* +// The caster deals 35d6 damage to a single target + fort save for half damage +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 18, 2002 +//::////////////////////////////////////////////// + +#include "x2_I0_SPELLS" +#include "x2_inc_spellhook" +#include "x0_I0_SPELLS" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + object oTarget = GetSpellTargetObject(); + + + float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); + float fDelay = fDist/(3.0 * log(fDist) + 2.0); + + int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF); + + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Roll damage + int nDam = d10(15) + 150; + //Set damage effect + + if (MySavingThrow(SAVING_THROW_FORT,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF) != 0 ) + { + nDam /=2; + } + + effect eDam = EffectDamage(nDam, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_PLUS_TWENTY); + ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(487), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_BONE_MEDIUM), oTarget); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } +} diff --git a/_module/_removed files/x2_s2_sumundead.nss b/_module/_removed files/x2_s2_sumundead.nss new file mode 100644 index 00000000..111d3036 --- /dev/null +++ b/_module/_removed files/x2_s2_sumundead.nss @@ -0,0 +1,72 @@ +//:://///////////////////////////////////////////// +//:: Summon Undead +//:: X2_S2_SumUndead +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The level of the Pale Master determines the + type of undead that is summoned. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 05, 2003 +//:: Updated By: Georg Zoeller, Oct 2003 +//::////////////////////////////////////////////// + +void PMUpgradeSummon(object oSelf, string sScript) +{ + object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED,oSelf); + ExecuteScript ( sScript, oSummon); +} + +void main() +{ + //Declare major variables + int nCasterLevel = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF); + int nDuration = 14 + nCasterLevel; + + + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + effect eSummon; + //Summon the appropriate creature based on the summoner level + if (nCasterLevel <= 6) + { + //Ghoul + eSummon = EffectSummonCreature("shadow01",VFX_IMP_HARM,0.0f,0); + } + else if (nCasterLevel <= 8) + { + //Shadow + eSummon = EffectSummonCreature("doomknight01",VFX_IMP_HARM,0.0f,0); + } + else if (nCasterLevel <= 10) + { + //Ghast + eSummon = EffectSummonCreature("shadfiend01",VFX_IMP_HARM,0.0f,1); + } + else if (nCasterLevel <= 14) + { + //Wight + eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD,0.0f,1); + } + else if (nCasterLevel >= 15) + { + //Wraith + eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD,0.0f,1); + } + // * Apply the summon visual and summon the two undead. + // * ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_LOS_EVIL_10),GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + + // * If the character has a special pale master item equipped (variable set via OnEquip) + // * run a script on the summoned monster. + string sScript = GetLocalString(OBJECT_SELF,"X2_S_PM_SPECIAL_ITEM"); + if (sScript != "") + { + object oSelf = OBJECT_SELF; + DelayCommand(1.0,PMUpgradeSummon(oSelf,sScript)); + } +} + + diff --git a/_module/_removed files/x2_s3_demitouch.nss b/_module/_removed files/x2_s3_demitouch.nss new file mode 100644 index 00000000..f2464576 --- /dev/null +++ b/_module/_removed files/x2_s3_demitouch.nss @@ -0,0 +1,96 @@ +//:://///////////////////////////////////////////// +//:: Demilich paralzying touch +//:: x2_s3_demitouch +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + On touch a demilich can paralyze an opponent. + Fort vs DC 38 + + Duration varies by game difficulty between + 1 and 5 rounds + (Sorry, no permanent paralyze, its just not fun) +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-08-27 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +void main() +{ + + object oItem; // The item casting triggering this spellscript + object oSpellTarget; // On a weapon: The one being hit. On an armor: The one hitting the armor + object oSpellOrigin; // On a weapon: The one wielding the weapon. On an armor: The one wearing an armor + + // fill the variables + oSpellOrigin = OBJECT_SELF; + oSpellTarget = GetSpellTargetObject(); + oItem = GetSpellCastItem(); + +object oCaster = OBJECT_SELF; +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(oCaster)) +{ + +//Make them stop what they are doing instantly! +AssignCommand(oCaster, ClearAllActions()); + +//Though the player may show animation, nothing happens! :) +//SetModuleOverrideSpellScriptFinished(); + +FloatingTextStringOnCreature("All spells fizzle in town.", oCaster); + +return; +} + +/////////////////////////////////////////////////////////////////////////////// +//Handle Jail... +//NO ITEMS WORK IN JAIL!!! +if(GetLocalInt(GetArea(oCaster), "JAIL")==1) +{ + AssignCommand(oCaster, ClearAllActions()); + //Though the player may show animation, nothing happens! :) + //SetModuleOverrideSpellScriptFinished(); + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + + + int nDuration = 3; + int nDiff = GetGameDifficulty(); + + if (nDiff == GAME_DIFFICULTY_CORE_RULES) + { + nDuration = 4; + } + else if (nDiff == GAME_DIFFICULTY_DIFFICULT) + { + nDuration = 6; + } + else if (nDiff == GAME_DIFFICULTY_VERY_EASY) + { + nDuration =2; + } + + if (GetIsObjectValid(oItem)) + { + SignalEvent(oSpellTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + if(!GetHasSpellEffect(GetSpellId(),oSpellTarget)) + { + if(!MySavingThrow(SAVING_THROW_FORT, oSpellTarget,36 , SAVING_THROW_TYPE_ALL)) + { + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED); + effect ePara = EffectParalyze(); + ePara = SupernaturalEffect(ePara); + ePara = EffectLinkEffects(eDur,ePara); + ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oSpellTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePara,oSpellTarget,RoundsToSeconds(nDuration)); + } + } + } + +} diff --git a/_removed files/evercliententer.nss b/_removed files/evercliententer.nss new file mode 100644 index 00000000..e933c0b2 --- /dev/null +++ b/_removed files/evercliententer.nss @@ -0,0 +1,363 @@ +//Script Name: evercliententer +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 6/14/08 (Updated_8/10/08) +///////////////////////////////////////// +/* +This my premier OnClientEnter Module Event Script +for all my modules NWNX2 / Leto Modules + +This script goes in the OnClient Enter Event +if you are using the nwnx2 system & leto! +*/ +///////////////////////////////////////////////////////////////// +//This script does multiple things, it checks to see if... +//If the PC is immortal or level 40 (apply special effects) +//If the character they have has been banned. (not a total bann) +//If they logged out while dead, if so make them dead instantly!!! ;) +//If the player is playing a legal character or not...read below... +//And if the Player themself have been banned from the module or not.. +/////////////////////////////////////////////////////////////////////// + +//Required Includes (Don't touch!) +#include "nw_i0_tool" +#include "gen_inc_color" +#include "fky_chat_inc" + +/////////////////////////// +//Repetitive Variables.. +effect eEffect; +int nInt; +object oItem; +object aTarget; +location bTarget; + +void main() +{ +//Declare Major Variables.. +object oPC; +oPC = GetEnteringObject(); +object oTarget; +oTarget = oPC; +object oPlayer = oPC; +object oPP = oPC; + +if(GetIsDM(oPC)) +{return; } + +//object oInfo = GetItemPossessedBy(oPP, "pcidname"); +//string sID = GetStringRight(GetName(oInfo), 14); + +//Tell us if the entering CHARACTER has been banned or not +int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); + +object oTag; +location lTag; + + +//This part is about verifying the Player's name.. +//A player must have at least a 2 character name or they are going to +//return with an error! If they have spaces in their name it will return +//with an error as well, including alt code! +string sPCNM = GetName(oPP); +string sPCNMR = GetStringRight(sPCNM, 2); +string sNC1; string sNC2; string sRNC1; string sRNC2; +int nBad; + +//Find the second character of the players name.. +sNC1 = GetSubString(sPCNM, 0, 1); +//Find the second character of the players name.. +sNC2 = GetSubString(sPCNM, 0, 2); +//Find the last letter in the player's name. +sRNC1 = GetSubString(sPCNMR, 0, 1); +//Find the next to the last letter in the player's name. +sRNC2 = GetSubString(sPCNMR, 0, 2); + +///////////////////////////////////////////////////////////////////////////// +//Please leave the credits to the module within the message. + +//Colorful Server Message sent to all PCs when they enter the module.. +string sMessage; +sMessage = GetRGB(1,7,7); //The color (See above) +sMessage += "Welcome "; //The text to be colorized by the above color. +sMessage += GetRGB(15,15,1);//The next color. +sMessage += "to a "; //The next text to be colorized by the above color. +sMessage += GetRGB(15,1,1);//etc.. +sMessage += "Revised Edition "; +sMessage += GetRGB(7,7,15); +sMessage += "of the "; +sMessage += GetRGB(1,15,1); +sMessage += "Classic Module"; +sMessage += GetRGB(13,9,13); +sMessage += "Paths of Ascension "; +sMessage += GetRGB(12,10,7); +sMessage += "Created By: AW_Olorin "; +sMessage += GetRGB(); +sMessage += "Revised By "; +sMessage += GetRGB(15,5,1); +sMessage += "Genisys (Guile) "; +sMessage += GetRGB(12,10,7); +sMessage += "on 7/21/08"; + +//Float welcome message by.. +DelayCommand(13.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE)); + +/////////////////////////IMPORTANT////////////////////////////////// +//You must make all the "" below into " " to check for legal names +//I turned it off because a lot of my characters have bad names! +//Simply put the cursor between "" and hit the space bar for "" to " " +if(sNC1 =="") +{ nBad =1; } +else if(sNC2 =="") +{ nBad =1; } +else if(sRNC1 =="") +{ nBad =1; } +else if(sRNC2 =="") +{ nBad =1; } +else { nBad = 0; } + +///////////////////////////////////////////////////////////////////// + +//If it's a DM entering the module... +if(GetIsDM(oPC)) +{ + //If the DM has never logged on before.. + if(GetItemPossessedBy(oPC, "dmtoolz")==OBJECT_INVALID) + { + //Change "dmtoolz" to the tag name of any items you want given to DMs + //the first time they enter only...(copy / paste for more items) + //simply type // at the start of a line to deactivate it.. + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + //CreateItemOnObject("dmtoolz", oPC, 1); + + //This message is here for a reason! + DelayCommand(10.0, SendMessageToPC(oPC, + "You have been given DM Items and your DM Character was saved," + + " please login with the updated version of your DM Character and" + + " delete the original, thank you.")); + + //You may want to create a journal tagnamed "dmrules" and define + //what your DMs are not allowed to do here.. + //simply delete the // on the line below to activate the jounral entry + //AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); + } +} + +///////////////////////////////////////////////////////////////////////////// +//SimTools & Higher Ground's Legendary Leveler Functions +//////////////////////////////////////////////////////// + string sCDKey = GetPCPublicCDKey(oPC); + + Speech_OnClientEnter(oPC); + int nPerm, nPerm2; + if (USING_NWNX_DB) + { + nPerm = GetPersistentInt(GetModule(), "FKY_CHT_BANSHOUT" + sCDKey); + nPerm2 = GetPersistentInt(GetModule(), "FKY_CHT_BANPLAYER" + sCDKey);; + if (ENABLE_LANGUAGES) DoLanguageSetupNWNX(oPC); + } + else //using Bioware db + { + nPerm = GetCampaignInt("FKY_CHT", "FKY_CHT_BANSHOUT" + sCDKey); + nPerm2 = GetCampaignInt("FKY_CHT", "FKY_CHT_BANPLAYER" + sCDKey); + if (ENABLE_LANGUAGES) DoLanguageSetupBio(oPC); + } + if (nPerm) SetLocalInt(oPC, "FKY_CHT_BANSHOUT", TRUE); + if (nPerm2 || GetLocalInt(oPC, "FKY_CHT_BANPLAYER")) DoBoot(oPC);//Boot them if Valid Object + + + //below removes the Letoscript string so the changes won't be applied again on the next logout + string Script = GetLocalString(oPC, "LetoScript"); + if( Script != "" ) + { + SetLocalString(oPC, "LetoScript", ""); + } + +/////////////////////////////////////////////// + +//Let's make sure that the following code is only executed +//on Players and not DMs.. + +if(!GetIsPC(oPC))return; +if(GetIsDMPossessed(oPC))return; +if(GetIsDM(oPC))return; + +//////////////////////////////////////////////////////////////////////// +////////JOURNAL ENTRIES//////// +/////////////////////////////// +//These function add journal entries by the tag names below +//If you do not have these journal entries you can create them +//I only included the 1st entry (1). +AddJournalQuestEntry("severrules", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); + + +//////////////////IMPORTANT////////////////IMPORTANT//////////////////////// + +//This function scans the Entering PC to see if they have a legal character. +//Delete the // Below to activate the anti-cheat script +//DelayCommand(9.0, ExecuteScript("cheatercheck2", oPC)); + +///////////////////////////////////////////////////////////////////////////// +//If level 40 lets do some cool stuff to them :) (optional of course) +//Simply type // before any effect you do not wish to apply... + if(GetHitDice(oPC) == 40) + { + //Lets make the concealed 40% + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Lets make the look like a ghost.. :) + ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); + + } + +////////////////////////////////////////////////////////////////////////////// + +//This is the immortal option, you must utilize the makeimmortal script +//to make players immortal (please read that script.) +if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) +{ +//Run this script on the player (See script to configure settings) +ExecuteScript("powerimmortal", oPC); +} + +////////////////////////////////////////////////////////////////////////////// + +//If a player has been found with an illegal character they will have this item. +//It will prevent them from logging onto your server with that character. +if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) + { + AssignCommand(oPC, ClearAllActions()); + + SetCutsceneMode(oPC, TRUE); + + SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA); + + DelayCommand(4.0, FloatingTextStringOnCreature("You have an illegal character which is not allowed on this server.", oPC)); + + DelayCommand(5.0, SetCutsceneMode(oPC, FALSE)); + + DelayCommand(6.0, BootPC(oPC)); + + } + +//Since the player was dead when they logged, kill them! +if (GetItemPossessedBy(oPC, "death")!= OBJECT_INVALID) + { + effect eEffect; + eEffect = EffectDeath(); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); + SendMessageToPC(oPC, "You died because you were dead when you logged out."); + } + +////////////////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////// +//Let's see if the player's character has been banned from the module.. +//Not the save as a player being banned altogether.. +if(nBann ==1) +{ +//Boot the PC fast! +DelayCommand(3.9, BootPC(oPP)); +return; +} +//Let's see if the player playing the character has been banned altogether! +if(GetCampaignInt(GetName(GetModule()), "BANN", oPP)==TRUE) +{ +//If so boot them fast! +DelayCommand(3.5, BootPC(oPP)); + +//In Case They Can't be Booted..(Allow them to enter the module first..) +//Then lock thier game down! (Note; You cannot have a script in OnCutscenAbort!) +DelayCommand(9.0, SetCutsceneMode(oPP, TRUE, FALSE)); +//They can't see nothing! +DelayCommand(9.1, FadeToBlack(oPP, FADE_SPEED_FAST)); +//Turn them into a chiken :) +DelayCommand(9.2, ApplyEffectToObject +(DURATION_TYPE_PERMANENT, EffectPolymorph(113, TRUE), oPP)); +DelayCommand(9.3, ExportSingleCharacter(oPP)); //Make the polymorph permanent! +return; +} + +////////////////////////////////////////////////////////////////////////////// +//Let's prevent badly named characters from logging onto the server.. + +// /*(Delete the // at the start of this line to deactivate this section) + +//Let's verify they have a legal name! + +//NOTE This function works in conjunction with another script +//in which an NPC at the start verifies if the PC is playing a legal name. + +//If the first 2 or last 2 letters of their name are bad.. +if(nBad==1) +{ +//Delay the following to allow the PC to enter the module.. +DelayCommand(10.0, +FloatingTextStringOnCreature("You character name is not allowed!", oPP)); + + +return; +} + +else // (do not touch this line!) */ +{ +//Welcome to them to the server.. +DelayCommand(5.0, SendMessageToPC(oPP, +"Welcome to this CEP2 Persistent Module Created by Genisys")); +} + +/////////////////////////////////////////////////////////////// + +//If the player has been inside of a party room, but logged out, then +//teleport them to the start and take the token! +if (GetItemPossessedBy(oPC, "partyroom")!= OBJECT_INVALID) + { + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="partyroom") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + + aTarget = GetWaypointByTag("home"); + bTarget = GetLocation(aTarget); + + if (GetAreaFromLocation(bTarget)==OBJECT_INVALID) return; + + //Allow them to fully enter the module.. + DelayCommand(8.0, AssignCommand(oPC, ClearAllActions())); + DelayCommand(8.1, AssignCommand(oPC, ActionJumpToLocation(bTarget))); + + } + +////////////////////////////////////////////////////////////////////////////// + +//Remove all Arena Tokens on enter.. + +if (GetItemPossessedBy(oPC, "arenatoken")!= OBJECT_INVALID) + { + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="arenatoken") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + } + +//End Script +} diff --git a/_removed files/everclientexit.nss b/_removed files/everclientexit.nss new file mode 100644 index 00000000..bade40a1 --- /dev/null +++ b/_removed files/everclientexit.nss @@ -0,0 +1,358 @@ +//Script Name: everclientexit +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 7/05/08 (Updated_8/10/08) +///////////////////////////////////////// +/* +This is my premier CEP2 - NWNX2 / Leto +OnClientExit Event Script. +*/ +///////////////////////////////////////////////////////////////// +/* +This script does multiple things, it checks to see if... +If the PC is immortal or level 40 (apply special effects) +If the character they have has been banned. (not a total bann) +If they logged out while dead, if so make them dead instantly!!! ;) +If the player is playing a legal character or not...read below.. +And if the Player themself have been banned from the module or not.. +*/ +////////////////////////////////////////////////////////////////////// + +//Redundant Variables Declared +effect eEffect; +int nInt; +object oItem; +object aTarget; +location bTarget; + + +//////////////////////////////////////// +//Required Includes +//#include "hgll_func_inc" +#include "fky_chat_inc" +///////////////////////////////////////// + +//PROTOTYPE DECLARED +void SendMessageToAllPC(string sMessage); + +///////////////////////////////////////// + +//Main Script +void main() +{ + +//Declare Major Variables.. +object oPC; +oPC = GetEnteringObject(); +object oTarget; +oTarget = oPC; +object oPlayer = oPC; +object oPP = oPC; + +object oInfo = GetItemPossessedBy(oPP, "pcidname"); +string sID = GetStringRight(GetName(oInfo), 14); + +//This means the entering Character has been banned. +int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); + +object oTag; +location lTag; + +//This part is about verifying the Player's name.. +//A player must have at least a 2 character name or they are going to +//return with an error! If they have spaces in their name it will return +//with an error as well, including alt code! +string sPCNM = GetName(oPP); +string sPCNMR = GetStringRight(sPCNM, 2); +string sNC1; string sNC2; string sRNC1; string sRNC2; +int nBad; + +//Find the second character of the players name.. +sNC1 = GetSubString(sPCNM, 0, 1); +//Find the second character of the players name.. +sNC2 = GetSubString(sPCNM, 0, 2); +//Find the last letter in the player's name. +sRNC1 = GetSubString(sPCNMR, 0, 1); +//Find the next to the last letter in the player's name. +sRNC2 = GetSubString(sPCNMR, 0, 2); + +//////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////// +//Sim Tools & Legendary Level Functions.. +////////////////////////////////////////////////////// + object M = GetModule(); + + string Script = GetLocalString(oPC, "LetoScript"); + + if( Script != "" ) + { + SetLocalString(oPC, "LetoScript", ""); + LetoScript(Script); + } + +Speech_OnClientExit(GetExitingObject()); + +//////////////////////////////////////////////////////////////////// + +//Your Code Goes here.. + +/////////////////////////IMPORTANT////////////////////////////////// +//You must make all the "" below into " " to check for legal names +//I turned it off because a lot of my characters have bad names! +//Simply put the cursor between "" and hit the space bar for "" to " " +if(sNC1 =="") +{ nBad =1; } +else if(sNC2 =="") +{ nBad =1; } +else if(sRNC1 =="") +{ nBad =1; } +else if(sRNC2 =="") +{ nBad =1; } +else { nBad = 0; } + +//See below to activate this system.. + +//////////////////////////////////////////////////////////////////////// +//If it's a DM entering the module... +if(GetIsDM(oPC)) +{ + //If the DM has never logged on before.. + if(GetItemPossessedBy(oPC, "dmtoolz")==OBJECT_INVALID) + { + //Change "dmtoolz" to the tag name of any items you want given to DMs + //the first time they enter only...(copy / paste for more items) + //simply type // at the start of a line to deactivate it.. + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + CreateItemOnObject("dmtoolz", oPC, 1); + //CreateItemOnObject("dmtoolz", oPC, 1); + + //This message is here for a reason! + DelayCommand(10.0, FloatingTextStringOnCreature( + "You have been given DM Items and your DM Character was saved," + + " please login with the updated version of your DM Character and" + + " delete the original, thank you.", oPC, FALSE)); + + //You may want to create a journal tagnamed "dmrules" and define + //what your DMs are not allowed to do here.. + //simply delete the // on the line below to activate the jounral entry + //AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); + } +} + + +//This is for the rest of the script, if it's not a PC stop here! +if(!GetIsPC(oPC))return; + + +///////////////////////////////////////////////////////////////////////////// + +//These function add journal entries by the tag names below +//If you wish to create more, just copy / paste and change +//The tagname which is in "here", and the entry # remains 1 only! +AddJournalQuestEntry("rules", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("pcinfo", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); +AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); + +//////////////////IMPORTANT////////////////IMPORTANT//////////////////////// + +//This function scans the Entering PC to see if they have a legal character. +//Delete the // Below to activate the anti-cheat script +//DelayCommand(9.0, ExecuteScript("cheatercheck2", oPC)); + +///////////////////////////////////////////////////////////////////////////// +//If level 40 lets do some cool stuff to them :) (optional of course) +//If you do not wish to use this options you will need to delete the // below + // /* <<(don't touch this part) + + if(GetHitDice(oPC) == 40) + { + //Lets make the concealed 40% + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Lets make the look like a ghost.. :) + ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); + + } + +// don't touch this line */ +////////////////////////////////////////////////////////////////////////////// + +//This is the immortal option, you must utilize the "makeimmortal" script +//to make players immortal (please read that script.) +if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) +{ +//Run this script on the player (See script to configure settings) +ExecuteScript("powerimmortal", oPC); +} + +////////////////////////////////////////////////////////////////////////////// + +//If a player has been found with an illegal character they will have this item. +//It will prevent them from logging onto your server with that character. +//Note this will only work if you have activated the Anti-Cheat option above! +if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) + { + AssignCommand(oPC, ClearAllActions()); + + SetCutsceneMode(oPC, TRUE); + + SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA); + + DelayCommand(4.0, FloatingTextStringOnCreature("You have an illegal character which is not allowed on this server.", oPC)); + + DelayCommand(5.0, SetCutsceneMode(oPC, FALSE)); + + DelayCommand(6.0, BootPC(oPC)); + + } + +//////////////////////////////////////////////////////////////////////////// + +//Since the player was dead when they logged, kill them! +if (GetItemPossessedBy(oPC, "death")!= OBJECT_INVALID) + { + effect eEffect; + eEffect = EffectDeath(); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); + SendMessageToPC(oPC, "You died because you were dead when you logged out."); + } + +////////////////////////////////////////////////////////////////////////////// +//This function is currently disabled (Not in use, may be used later on) + +/* +//Let's make sure All players have a valid PC Name ID Item.. +if(oInfo==OBJECT_INVALID) +{ + //Open the "eq_pcidname" script to learn more + CreateItemOnObject("pcidname", oPP, 1); +} // */ + + +//////////////////////////////////////////////////////////////////////// +//Let's see if the entering CHARACTER has been banned from the module.. +//Not the save as a player being banned altogether.. +if(nBann ==1) +{ +//Boot the PC fast! +DelayCommand(3.9, BootPC(oPP)); +return; +} +//Let's see if the player has been banned altogether! +//Note the TRUE after oPP = Single Player / FALSE = Multiplayer Mode +if(GetCampaignInt(GetName(GetModule()), "BANN", oPP)==TRUE) +{ +//If so boot them fast! +DelayCommand(3.5, BootPC(oPP)); + +//In Case They Can't be Booted..(Allow them to enter the module first..) +//Then lock thier game down! (Note; You cannot have a script in OnCutscenAbort!) +DelayCommand(9.0, SetCutsceneMode(oPP, TRUE, FALSE)); +//They can't see nothing! +DelayCommand(9.1, FadeToBlack(oPP, FADE_SPEED_FAST)); +//Turn the PC into a punk chicken :) +DelayCommand(9.2, ApplyEffectToObject +(DURATION_TYPE_PERMANENT, EffectPolymorph(113, TRUE), oPP)); +DelayCommand(9.3, ExportSingleCharacter(oPP)); //Make it permanent! +return; +} + +////////////////////////////////////////////////////////////////////////////// +//Let's prevent badly named characters from logging onto the server.. + +//Delete the /* below this line to activate the name checking system. +/* + +//Let's verify the Entering PC has a legal name! + +//NOTE This function works in conjunction with another script +//in which an NPC at the start verifies if the PC is playing a legal name. + +//If the first 2 or last 2 letters of their name are bad.. +if(nBad==1) +{ +//Delay the following to allow the PC to enter the module.. +DelayCommand(10.0, +FloatingTextStringOnCreature("You character name is not allowed!", oPP)); + +//Tell the database the player character is banned +DelayCommand(11.0, SetCampaignInt(GetName(GetModule()), "BANN", 1, oPP)); + +//Boot the PC +DelayCommand(14.0, BootPC(oPP)); + +return; +} + +else +{ +//do nothing.. +} + +// (do not touch this line!) */ +/////////////////////////////////////////////////////////////// + +//If the player has been inside of a party room, but logged out, then +//teleport them to the start and take the token! +if (GetItemPossessedBy(oPC, "partyroom")!= OBJECT_INVALID) + { + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="partyroom") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + + aTarget = GetWaypointByTag("home"); + bTarget = GetLocation(aTarget); + + if (GetAreaFromLocation(bTarget)==OBJECT_INVALID) return; + + //Allow them to fully enter the module.. + DelayCommand(8.0, AssignCommand(oPC, ClearAllActions())); + DelayCommand(8.1, AssignCommand(oPC, ActionJumpToLocation(bTarget))); + + } + +//Finally! Send this message to the PC.. + +//(Please change to match your module name) +//(I would appreciate credit to my work in your start message thanks.) + +//Welcome them PC to the server with a colorful message +DelayCommand(5.0, SendMessageToPC(oPP, + +//Enter your module name below +"Welcome to (ENTER MODULE NAME)" + //Make sure you use one space! +" a 1.68 Persistent Module " + +"Created by Genisys " + + +//Enter your name below +"Designed By: (YOUR NAME HERE)")); + + +//Main Script End +} + +//PROTOTYPE DEFINED +void SendMessageToAllPC(string sMessage) +{ + object PC = GetFirstPC(); + + while(GetIsObjectValid(PC)) + { + FloatingTextStringOnCreature(sMessage, PC); + PC = GetNextPC(); + } +} diff --git a/_removed files/everheartbeat.nss b/_removed files/everheartbeat.nss new file mode 100644 index 00000000..ca9bcb74 --- /dev/null +++ b/_removed files/everheartbeat.nss @@ -0,0 +1,77 @@ +//Script Name: everheartbeat +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 4/20/08 (Updated 8/10/08) +///////////////////////////////////////// +/* +Some parts of this script were taken from +AW_Olorin's Paths of Ascension Module +This script goes in the OnHeartbeat +Event of the Module Properties +*/ +//////////////////////////////////////// + +//Required Include +#include "nw_i0_tool" + +//Main Script +void main() +{ + +object oPC = GetFirstPC(); + +///////////////////////////////////////////////////////////////////////////// +//Prevent Trap Setting in any area where the placeable object "No Crown" +//is located (Which is found on the custom paletted) +//I recommend you place this object anywhere you don't want traps set! + + while(GetIsObjectValid(oPC)) + { + object detector = GetNearestObjectByTag("nocrown", oPC, 0); + if (GetIsObjectValid(detector)) + { + object trap = GetNearestTrapToObject(detector, FALSE); + if ( GetTrapCreator(trap) == oPC && !GetIsDM(oPC) && GetIsPC(oPC)) + if (GetArea(oPC) != GetArea(GetObjectByTag("throneofdeath"))) + { + AssignCommand(oPC, ClearAllActions()); + AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("prison")))); + SendMessageToPC(oPC, "You have been sent to jail for setting a trap in a restricted area."); + } + } + + oPC = GetNextPC(); + } + +//////////////////////////////////////////////////////////////////////// +//GLOBAL MESSAGING SYSTEM By: AW_OLORIN (Paths of Ascension) + +// Server Time Keeper + int timekeeper = GetLocalInt(GetModule(), "loadtimer"); + SetLocalInt(GetModule(), "loadtimer", (timekeeper +1)); + + +// DM announcement check +//This feature isn't currently in Use, but DO NOT REMOVE IT!!! + int iAnnounceTimer = GetLocalInt(GetModule(),"iAnnounceTimer"); + SetLocalInt(GetModule(), "iAnnounceTimer", (iAnnounceTimer +1) ); + + + if(iAnnounceTimer >= GetLocalInt(GetModule(),"iAnnounce_Period")) + { + string sAnnouncement = GetLocalString(GetModule(),"Announcement"); + string sAuthor = GetLocalString(GetModule(),"Announcement_Author"); + SetLocalInt(GetModule(),"iAnnounceTimer",0); + if(sAnnouncement == "") return; + oPC = GetFirstPC(); + while(GetIsObjectValid(oPC)) + { + if(GetIsDM(oPC)) + SendMessageToPC(oPC,"Module wide announcement being sent, created by DM " + sAuthor + "."); + SendMessageToPC(oPC,sAnnouncement); + oPC = GetNextPC(); + } + } + +//Main Script End +} diff --git a/_removed files/evermodload.nss b/_removed files/evermodload.nss new file mode 100644 index 00000000..d4857865 --- /dev/null +++ b/_removed files/evermodload.nss @@ -0,0 +1,167 @@ +//////////////////////////////////// +//Created by Genisys / Guile 7/05/08 +//////////////////////////////////// +/* +script name: evermodload + +This is my premier NWNX2 / Leto +CEP2 OnModuleLoad Event Script + +*/ +//////////////////////////////////// + +#include "fky_chat_inc" +#include "x2_inc_switches" +#include "x2_inc_restsys" +#include "aps_include" +#include "x2_inc_restsys" +#include "se_inc_reset" + + +///SCRIPT MAIN//////// +void main() +{ + +//The NWNX2 Reset Plugin Function +//the first # must be 1 month Higher than the current module month! +//see the script "se_inc_reset" to see how it works.. +SE_NWNX_ResetModuleCheck(7, 30.0, 120.0); + +//////////////////////////////////////////////////////////////////////// + +//This sets color in Tokens in conversatoins, it requires that +//you use the #s below for tokens, ie, where +//you want the text to be colorized. +string sColor = GetName(GetObjectByTag("COLORS")); + +SetCustomToken(1001, GetSubString(sColor, 0, 6)); //white +SetCustomToken(1002, GetSubString(sColor, 6, 6)); //yellow +SetCustomToken(1003, GetSubString(sColor, 12, 6)); //magenta +SetCustomToken(1004, GetSubString(sColor, 18, 6)); //cyan +SetCustomToken(1005, GetSubString(sColor, 24, 6)); //red +SetCustomToken(1006, GetSubString(sColor, 30, 6)); //green +SetCustomToken(1007, GetSubString(sColor, 36, 6)); //blue + +//More Custom Tokens for Conversations +//By GENISYS (Guile) + + SetCustomToken(100, ""); // CLOSE tag + SetCustomToken(101, ""); // red + SetCustomToken(102, ""); // green + SetCustomToken(103, ""); // blue + SetCustomToken(104, ""); // cyan + SetCustomToken(105, ""); // magenta + SetCustomToken(106, ""); // yellow + SetCustomToken(107, ""); // black + SetCustomToken(108, ""); // dark red + SetCustomToken(109, ""); // dark green + SetCustomToken(110, ""); // dark blue + SetCustomToken(111, ""); // dark cyan + SetCustomToken(112, ""); // dark magenta + SetCustomToken(113, ""); // dark yellow + SetCustomToken(114, ""); // grey + SetCustomToken(117, ""); // dark grey + SetCustomToken(115, ""); // orange + SetCustomToken(116, ""); // dark orange + SetCustomToken(117, ""); // brown + SetCustomToken(118, ""); // dark brown + SetCustomToken(119, ""); // Light Purple + SetCustomToken(120, ""); // Neon Green + SetCustomToken(121, ""); // Light Blue + SetCustomToken(122, ""); // Purple + SetCustomToken(123, ""); //Neon Green + +/////////////////AUTOMATIC CHARACTER SAVING FUCTION//////////////////////// +//Note this function is Polymorphing Friendly (Designed for that purpose!) + +//This feature stores All PC's location on the module ever 3 minutes... +//To deactivate this feature, simply type // at the start of the line below. + +//DelayCommand(60.0, ExecuteScript("savepcinfo", OBJECT_SELF)); + +////////////////////////////////////////////////////////////////////////// + +//This is part of the SimTools by Funkyswerve... + // Init placeholders for ODBC gateway + SQLInit(); + // Init placeholders for chat gateway + InitSpeech(); + +/////////////MAIN BIOWARE X2 FUNCTIONS (DO NOT REMOVE!)///////////// + + if (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT) + { + // * Setting the switch below will enable a seperate Use Magic Device Skillcheck for + // * rogues when playing on Hardcore+ difficulty. This only applies to scrolls + SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE); + + // * Activating the switch below will make AOE spells hurt neutral NPCS by default + // SetModuleSwitch (MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE); + } + + // * AI: Activating the switch below will make the creaures using the WalkWaypoint function + // * able to walk across areas + // SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE); + + // * Spells: Activating the switch below will make the Glyph of Warding spell behave differently: + // * The visual glyph will disappear after 6 seconds, making them impossible to spot + SetModuleSwitch (MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING, TRUE); + + // * Craft Feats: Want 50 charges on a newly created wand? We found this unbalancing, + // * but since it is described this way in the book, here is the switch to get it back... + SetModuleSwitch (MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES, TRUE); + + // * Craft Feats: Use this to disable Item Creation Feats if you do not want + // * them in your module + // SetModuleSwitch (MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS, TRUE); + + // * Palemaster: Deathless master touch in PnP only affects creatures up to a certain size. + // * We do not support this check for balancing reasons, but you can still activate it... + // SetModuleSwitch (MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH, TRUE); + + // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this + // * did not fit into NWNs spell system and was confusing, so we took it out... + // SetModuleSwitch (MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE); + + // * Spellcasting: Some people don't like caster's abusing expertise to raise their AC + // * Uncommenting this line will drop expertise mode whenever a spell is cast by a player + // SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE); + + + // * Item Event Scripts: The game's default event scripts allow routing of all item related events + // * into a single file, based on the tag of that item. If an item's tag is "test", it will fire a + // * script called "test" when an item based event (equip, unequip, acquire, unacquire, activate,...) + // * is triggered. Check "x2_it_example.nss" for an example. + // * This feature is disabled by default. + SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE); + + if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) + { + // * If Tagbased scripts are enabled, and you are running a Local Vault Server + // * you should use the line below to add a layer of security to your server, preventing + // * people to execute script you don't want them to. If you use the feature below, + // * all called item scrips will be the prefix + the Tag of the item you want to execute, up to a + // * maximum of 16 chars, instead of the pure tag of the object. + // * i.e. without the line below a user activating an item with the tag "test", + // * will result in the execution of a script called "test". If you uncomment the line below + // * the script called will be "1_test.nss" + // SetUserDefinedItemEventPrefix("1_"); + + } + + // * This initializes Bioware's wandering monster system as used in Hordes of the Underdark + // * You can deactivate it, making your module load faster if you do not use it. + // * If you want to use it, make sure you set "x2_mod_def_rest" as your module's OnRest Script + // SetModuleSwitch (MODULE_SWITCH_USE_XP2_RESTSYSTEM, TRUE); + + if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE) + { + + // * This allows you to specify a different 2da for the wandering monster system. + // SetWanderingMonster2DAFile("des_restsystem"); + + //* Do not change this line. + WMBuild2DACache(); + } + +} diff --git a/_removed files/everpcdeath.nss b/_removed files/everpcdeath.nss new file mode 100644 index 00000000..07482c0f --- /dev/null +++ b/_removed files/everpcdeath.nss @@ -0,0 +1,702 @@ +//Script Name: everpcdeath +///////////////////////////////////////// +//Created By: Genisys / Guile +//Created On: 1/11/08 (Updated_8/10/08) +///////////////////////////////////////// +/* + +This is my premier OnPlayerDeath Module Event Script which I designed +specifically for all my modules, it's rather nice and is part of +multiple systems, so do not edit ANYTHING you do not know what it's for! + +*/ +//////////////////////////////////////////////////////////////////////// + +//Rquired Includes.. (Don't touch!) +#include "nw_i0_plot" +#include "x2_inc_compon" +#include "setxp_inc" + +/////////////////////////////////////////////////////////////////////////// +/////////////////IMPORTANT OPTIONAL SETTINGS/////////////////////////////// +//The constant intergal below allows you to choose where or not to utilize +//the PVP Death System I have scripted, please read below to learn more.. +//FALSE = Disabled / TRUE = Enabled +const int nPVP = TRUE; + +//This constant will decide whether or not you want to send a PVP message +//to all players when PVP transpires (This is for PVP Servers) +//FALSE = Disabled / TRUE = Enabled +const int nPVPMessage = TRUE; + +//If you wish to restrict PVP to the arena only, then.. +//Set the below setting to TRUE / FALSE = Deactivated (Default) +const int nArenaOnly = FALSE; + +//This determines the level difference allowed in PVP (default 5) +//If set to 5 players within 4 levels of each other will not be +//Penalized for Killing one another. (Works both ways!) +//Add +1 for the level you want so if you want 8 level difference make it 9! +//(Set this whether you allow PVP or not!) +const int nDif = 5; //(Between 5 - 40) / (40 = Disabled) + +//This is how you set the reward for XP given to the player for +//fair PVP Kills, this # is multiplied by the level difference! +const int nReward1 = 80; //(ie. if 3 Levels difference / 80 X 3) + +//This is how ytou set the reward for Gold given to the player for +//fair PVP Kills, this # is multiplied by the level difference! +const int nReward2 = 800; + +/////////OPTIONS END////////////////////////////////////////////////// + +////DO NOT TOUCH ANYTHING BELOW UNLESS IT SAYS - ///OPTION//// + +////////////////////////////////////////////////////////////////////// +///// This Part was Created by: bushido +///// Developed by: Wouter Dhondt +///// Modified by: Genisys / Guile For Persistency.. +//////////////////////////////////////////////////////// +//This is the PVP Stats (Used to keep track of PVP Activity) +//This allows DMs and Players to see PVP Activity. +void AdjustPlayerStats() +{ + +//Delare Variables +object oDied = GetLastPlayerDied(); +object oAttacker = GetLastHostileActor(oDied); +object oKiller; + +//Only if the player who died is a PC +if(GetIsPC(GetLastPlayerDied())) +{ + //Let's make sure we properly identify who the Attacker is... + if (GetIsPC(GetMaster(oAttacker))) + { + oKiller = GetMaster(oAttacker); + } + + else + { + //Let's make sure the Killer is a PC + if(GetIsPC(oAttacker)) + { + oKiller = oAttacker; + } + } + + // Increment or set the death variable + int iDied = GetCampaignInt("PVP_SCORE", "iDied", oDied); + int nCount = iDied + 1; + SetCampaignInt("PVP_SCORE", "iDied", nCount, oDied); + // Is this object a PC? + if (GetIsPC(oKiller) == TRUE) + { + // Increment or set the killer var + int iKilled = GetCampaignInt("PVP_SCORE", "iKilled", oKiller); + int nDeaths = iKilled + 1; + SetCampaignInt("PVP_SCORE", "iKilled", nDeaths, oKiller); + } + } + +//AdjustPlayerStats End.. +} +/////////////////////////////////////////////////////////////// +// Raise OnDeath function (Standard Bioware Function) +void Raise(object oPlayer) +{ + effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); + + effect eBad = GetFirstEffect(oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); + + //Search for negative effects + while(GetIsEffectValid(eBad)) + { + if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || + GetEffectType(eBad) == EFFECT_TYPE_DEAF || + GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || + GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) + { + //Remove effect if it is negative. + RemoveEffect(oPlayer, eBad); + } + eBad = GetNextEffect(oPlayer); + } + //Fire cast spell at event for the specified target + SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); +} + +// Respawn/Teleporter OnDeath function (By Bushido / Modified By Genisys) +// Optionally you can create the waypoints described to send the dead player +// to that location. You must create an item named arenatoken (tag & resref name) +//Then you must use give it to them & take it away from them on enter/exit of +//an area by a script, this will deem that area as the arena. +void Respawn(object oPlayer) +{ + + string waiting = "The gods show you favor, your life is restored."; + + if (GetIsDead(oPlayer)) + { + object oPC = GetLastPlayerDied(); + + if (GetItemPossessedBy(oPC, "arenatoken")!= OBJECT_INVALID) + { + //Create a way point and tagname it "arenawp" + object oTarget = GetWaypointByTag("arenawp"); + effect eTeleport = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oPlayer); + + //Tell the player why they are being restored. + FloatingTextStringOnCreature(waiting, oPC); + + //Resurrect the player + Raise(oPlayer); + + //Teleport the raised player to the arena spawn point. + DelayCommand(0.1, AssignCommand(oPlayer, ClearAllActions())); + DelayCommand(0.2, AssignCommand(oPlayer, JumpToObject(oTarget))); + } + else + { + CreateItemOnObject("death", oPC); + } + + } +} + +//////////////////////////////////////////////////////////////////////// +////////////////////////Main Script///////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +void main() +{ + + //Declare Major Variables... + object oPlayer = GetLastPlayerDied(); + object oPC = GetLastPlayerDied(); + object oTarget = oPlayer; + object oToken = GetItemPossessedBy(oPlayer, "death"); + object oItem; + object oPP = oPlayer; + string sArea = GetTag(GetArea(oPlayer)); + string sName = GetName(GetModule()); + location lDead = GetLocation(oPlayer); + + //If the player is being tortured, ressurect them... + object hell = GetArea(oPlayer); + object helltest = GetArea(GetObjectByTag("satan1")); + if (hell == helltest) + { + DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPlayer)); + return; + } + + object oInfo = GetItemPossessedBy(oPP, "pcidname"); + string sID = GetStringRight(GetName(oInfo), 14); + + //PVP Variables.. + object oDead = GetLastPlayerDied(); + object oKiller = GetLastHostileActor(oDead); + object oVictor; + object oDied; + int nInt; + int kLvl = GetHitDice(oKiller); + int pLvl = GetHitDice(oDead); + int dLvl = kLvl - pLvl; + int aLvl = pLvl - kLvl; + + effect eKill = EffectDeath(TRUE); + effect eVis = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); + + +//Define who oKiller is.. +//Define the attacker& dead guy +object oAttacker = GetLastHostileActor(oDied); +oDied = oPlayer; + + //Let's make sure we properly identify who the Attacker is... + if (GetIsPC(GetMaster(oAttacker))) + { + oKiller = GetMaster(oAttacker); + } + + else + { + //Let's make sure the Killer is a PC + if(GetIsPC(oAttacker)) + { + oKiller = oAttacker; + } + } + + //Count up & Store in Database the kills and deaths + AdjustPlayerStats(); + +///////////LOCATION SAVING OPTION///////////////////////////////// + +//Type: // Below this line to activate location saving on death + /*(Before this!) + + //Store the PC's location, because if they are ressurected they can + //come back to this place when they logg back on..(unless location changed) + SetCampaignLocation(sName, "SAVED_LOC", lDead, oPlayer); + //Tell the PC thier location was saved.. + SendMessageToPC(oPC, "Location Saved."); + + +//(leave this alone) */ +////////////////////////////////////////////////////////////// + + //Lets auto ressurect anyone in the arena and give death tokens to the others. + Respawn(oPlayer); + + // * make friendly to Each of the 3 common factions + AssignCommand(oPlayer, ClearAllActions()); + + // * Note: waiting for Sophia to make SetStandardFactionReptuation to clear all personal reputation + if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10) + { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad + SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer); + } + if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10) + { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad + SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer); + } + if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10) + { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad + SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer); + } + +////////////////////////////////////////////////////////////////////////// + + //Fancy death visual effect when they die. + location lSelf = GetLocation(oPC); + effect eVis2 = EffectVisualEffect(234); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis2, lSelf); + +///////////////////////////////////////////////////////////////////////////// + +//Have the player tell everyone around them he is dying (actually dead) + AssignCommand(oPlayer, ActionSpeakString("I'm dying, help!", + TALKVOLUME_TALK)); + +//////////////////////////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////////////////// + //Pop up the Death GUI Panel only if they don't meet the following.. + + //If the player is not immortal + if(GetItemPossessedBy(oPC, "immotoken") == OBJECT_INVALID) + { + //If the player does not have an arena token + if(GetItemPossessedBy(oPC, "arenatoken") == OBJECT_INVALID) + { + //Show the player the Death Panel + DelayCommand(2.0, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH)); + } + } + +////////////////////////PVP MESSAGE////////////////////////////////////// +///////See the const int nPVPMessage above to turn on/off)/////////////// + +if(nPVPMessage == TRUE) +{ + + + ////Send PVP Stats Messages to all PCs.///////// + //This shouts whever a player has died, who killed them and also + //alerts DMs of any pvp action going on! (Though done below as well.) + //This can also alert DM's not playing as a DM as well too! + oPC = GetFirstPC(); + int count = 0; + int nVictims = GetCampaignInt("PVP_SCORE", "iKilled", oKiller); + int vLvl = GetHitDice(oVictor); + int dLvl = GetHitDice(oPlayer); + string sKilled; + //Send Message to all PC's + sKilled = ""; + sKilled += GetName(oPlayer); + sKilled += " "; + sKilled += "Lvl "; + sKilled += IntToString(dLvl); + sKilled += " Was slain by - "; + sKilled += ""; + sKilled += GetName(oVictor); + sKilled += " "; + sKilled += "Lvl - "; + sKilled += IntToString(vLvl); + sKilled += " "; + sKilled += GetName(oVictor); + sKilled += " has "; + sKilled += IntToString(nVictims); + sKilled += " kills. "; + + //Lets make sure the killer is a PC + if(GetIsPC(oVictor)) + { + + //Write the PVP Information in the log file. (For those not allowing PVP) + WriteTimestampedLogEntry("**The Following Player: "); + WriteTimestampedLogEntry(GetPCPlayerName(oVictor)); + WriteTimestampedLogEntry(" - "); + WriteTimestampedLogEntry(GetPCPublicCDKey(oVictor)); + WriteTimestampedLogEntry(" - "); + WriteTimestampedLogEntry(GetPCIPAddress(oVictor)); + WriteTimestampedLogEntry(" ** Has Killed This Player: "); + WriteTimestampedLogEntry(GetName(oPlayer)); + WriteTimestampedLogEntry(" - "); + WriteTimestampedLogEntry(GetPCPlayerName(oPlayer)); + + while (GetIsPC(oPC) == TRUE) + { + SendMessageToPC(oPC, sKilled); + oPC = GetNextPC(); + } + + } + +//end PVP message function + } + +////////////NO PVP ON SERVER ALLOWED!/////////// + +//IF PVP IS NOT ALLOWED! +if(nPVP == FALSE) +{ +object oDumbo; +//If it's not a PC let's make sure an associate of a PC has not killed the PC +if(!GetIsPC(oKiller)) +{ + //Let's get the master of the asscoiate.. + if(GetIsPC(GetMaster(oKiller))) + { + oDumbo = GetMaster(oKiller); + } +} +//Otherwise let's make sure the Attacker is a PC.. +else +{ + if(GetIsPC(oKiller)) + { + oDumbo = oKiller; + } +} + + //Let's Double Check to make sure it's a PC who killed the PC. + if(GetIsPC(oDumbo)) + { + + //Apply the respawn penalty to the Killer instead!! + ApplyRespawnPenalty(oDumbo); + + //Raise the Player Who Died without a penalty + //Note these must be delayed because of GUI Panel! + DelayCommand(2.1, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.2, Raise(oDead)); + + //Remove the death token from the dead guy + oItem = GetFirstItemInInventory(oPC); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oPC); + } + + string sBadPC = GetName(oDumbo); + sBadPC += " / "; + sBadPC += GetPCPlayerName(oDumbo); + sBadPC += " / "; + sBadPC += GetPCPublicCDKey(oDumbo); + sBadPC += " Has killed - "; + sBadPC += GetName(oPC); + sBadPC += " In the "; + sBadPC += GetName(GetArea(oPC)); + sBadPC += " Area."; + + //Send Message to All DMs about the Attack.. + SendMessageToAllDMs(sBadPC); + } + +//End No PVP Check.. +} + +//////////IF PVP IS RESTRICTED TO THE ARENA////////////// + +if(nArenaOnly == TRUE) +{ + //If a PC kills a PC outside of the arena.. + if(GetItemPossessedBy(oDead, "arenatoken")==OBJECT_INVALID) + { + + //Raise the Player Who Died + DelayCommand(2.3, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.4, Raise(oDead)); + + //Remove the death token from the dead guy + oItem = GetFirstItemInInventory(oDead); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oDead); + } + + //Kill the offender and alert the DMs! + //Type // below at the start of the line to deactivate! + ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); + + //Apply the respawn penalty to the Killer instead!! + ApplyRespawnPenalty(oKiller); + + //Send Message to All DMs about the Attack.. + string sArena; + sArena = GetName(oKiller); + sArena += " / "; + sArena += GetPCPlayerName(oKiller); + sArena += " "; + sArena += "Has killed - "; + sArena += GetName(oDead); + sArena += "Outside of the Arena!"; + + SendMessageToAllDMs(sArena); + } + +} +/////////////////////////////////////////////////////////////////////////// +//////////////////PVP SCRIPT FUNCTIONS///////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +///////PVP Option (See the const int nPVP above to turn on/off)/////// +if (nPVP == TRUE) +{ + +//////Start PVP Reward/Penalty Function////// + + +//Only continue if the killer is a PC! +if(GetIsPC(oKiller) == TRUE) +{ + + //More PVP Variables + + //Get the Killer's HD + nDif + 1 + int nAdj = GetHitDice(oKiller) + 1; + int nCheck = nAdj + nDif; + //Will return 1 or less if they are more than nDif levels + //lower than the person they killed + int nDeed = nCheck - pLvl; + + //Ok, this part rewards players for killing players who kill low + //level players, if they are flagged for killing low level players, + //and anyone can easially recognized them by the flag on thier back. + if(GetLocalInt(oDead, "effer") >=1) + { + //Lower their effy score by one. + nInt = GetLocalInt(oDead, "effer"); + nInt -= 1; + //Decrement thier effer status (because they got killed) + SetLocalInt(oDead, "effer", nInt); + +//If they are at 0 Effy Kills, Remove the flag from them +//Otherwise they can be killed again!!! (After it's been lowered!) + if (GetLocalInt(oDead, "effer") <=0) + { + effect eEffect; + eEffect = GetFirstEffect(oDead); + while (GetIsEffectValid(eEffect)) + { + if (GetEffectType(eEffect)==EFFECT_TYPE_VISUALEFFECT) + { + //Note sure about this one! + if (EFFECT_TYPE_VISUALEFFECT == VFX_DUR_FLAG_RED) + { + RemoveEffect(oDead, eEffect); + eEffect = GetNextEffect(oDead); + } + } + + } + + //Now reward the Killer of the bad player with the flag. + //Adjust to your likings. + GiveGoldToCreature(oKiller, 5000); + GiveXPToCreature(oKiller, 500); + + } + } + + //If the player is too low of a level + //Punish them for killing a much high level player. + //This is to prevent lower level players from killing higher + //level players (which allows the higher levels to ignore them!) + if (nDeed <=1) + { + //Flag them as an Effy Killer (Because they are picking fights!) + nInt = GetLocalInt(oKiller, "effer"); + nInt += 1; + + int nKind; + nKind = GetObjectType(oKiller); + + if (nKind != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), oKiller); + else ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), GetLocation(oKiller)); + + SetLocalInt(oKiller, "effer", nInt); + + //Raise the Player Who Died without a penalty + //Note these must be delayed because of GUI Panel! + DelayCommand(2.1, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.2, Raise(oDead)); + + //Remove the death token from the dead guy + oItem = GetFirstItemInInventory(oDead); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oDead); + } + + //Kill the offender & take xp/gold + //Type // below at the start of the line to deactivate! + ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); + + //Penalize the killer Gold / XP + ApplyRespawnPenalty(oKiller); + + AssignCommand(oKiller, ClearAllActions()); + AssignCommand(oKiller, ActionSpeakString("I have offended the Gods and must be punished!!!", TALKVOLUME_SHOUT)); + + //Notify the DMs + SendMessageToAllDMs("We have an effy kill in progress, please investigate" + + GetName(oKiller) + ". Has Killed Player " + GetName(oDead)); + //end low level check. + } + + //If the killer is 5 levels higher than the player they kill + int aCheck = dLvl; + if(aCheck >= nDif) + { + //Flag them as an Effy Killer + int nInt; + nInt = GetLocalInt(oKiller, "effer"); + nInt += 1; + + int nKind; + nKind = GetObjectType(oKiller); + + if (nKind != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), oKiller); + else ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), GetLocation(oKiller)); + + SetLocalInt(oDead, "effer", nInt); + + //Raise the Player Who Died + //This must be delayed due to the GUI Panel that pops up. + DelayCommand(2.1, + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); + + DelayCommand(2.2, Raise(oDead)); + + //Remove the death token from the dead guy + object oItem; + oItem = GetFirstItemInInventory(oDead); + + while (GetIsObjectValid(oItem)) + { + if (GetTag(oItem)=="death") DestroyObject(oItem); + + oItem = GetNextItemInInventory(oDead); + } + + //Kill the offender & take xp/gold + //Type // below at the start of the line to deactivate! + ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); + + //Take XP & Gold from the Offending Killer + if (GetHitDice(oKiller)<40)//Only if less than level 40 + { + SetXP(oKiller,GetXP(oKiller)-1000);//NOTE: They can Lose a Level! + } + + //Remove Gold / XP from the Offender + ApplyRespawnPenalty(oKiller); + + //Make them shout that they have been bad... + AssignCommand(oKiller, ClearAllActions()); + AssignCommand(oKiller, ActionSpeakString + ("I have offended the Gods and must be punished!!!", TALKVOLUME_SHOUT)); + + //Notify the DMs + SendMessageToAllDMs("We have a low level bashing in progress, please investigate" + + GetName(oKiller) + ". Has Killed Player " + GetName(oPlayer)); + +//End Effy Check.. + } + +//This is the reward of fair PVP + + //Lets make sure the killer is at least 1 level + //lower than the player they kill + else if(aLvl >= 1) + { + //award xp/gold by level difference, + //If the player is 1 to nDif levels lower than the player they kill + if (aLvl <=nDif) + { + //Adjust this to your likings.. + int nXP = aLvl * nReward1; + int nGold = aLvl * nReward2; + + GiveXPToCreature(oKiller,nXP); + GiveGoldToCreature(oKiller,nGold); + //The dead guy shouts how he lost badly. :) + AssignCommand(oDead, ActionSpeakString("I got pwned!!", TALKVOLUME_SHOUT)); + } + + } + + //If the killer is at least 1 level higher than the player they kill + else if (dLvl <=nDif) + { + //Lets make sure the killer is within 1-4 Level difference + if (dLvl >=1) + { + int nXP = dLvl * nReward1; + int nGold = dLvl * nReward2; + + GiveXPToCreature(oKiller,nXP); + GiveGoldToCreature(oKiller,nGold); + //The dead guy shouts how he lost badly. :) + AssignCommand(oDead, ActionSpeakString("I got pwned!!", TALKVOLUME_SHOUT)); + } + } + //end pc check + } + //end pvp function + } + +///////////////////////////////////////////////////////////////////////// + +//Script End WOOSH!! +} diff --git a/_removed files/everpcdying.nss b/_removed files/everpcdying.nss new file mode 100644 index 00000000..97f4d38f --- /dev/null +++ b/_removed files/everpcdying.nss @@ -0,0 +1,104 @@ +//:://///////////////////////////////////////////// +//:: Script Name: everpcdying +//::////////////////////////////////////////////// +/* + This script handles the default behavior + that occurs when a character is dying. Dying + is when the character is between 0 and -9 hit + points; -10 and below is death. To use, redirect + the OnDying event script of the module to this script. +*/ +//::////////////////////////////////////////////// +//:: Author : Scott Thorne +//:: Updated: July 25, 2002 +//::////////////////////////////////////////////// +//::Modified by Genisys (Guile) +//::Modified On: 4/23/08 (Updated 8/10/08) +////////////////////////////////////////////////// + +//Required Include +#include "nw_i0_tool" + +//PROTOTYPE DECLARED +void bleed(int iBleedAmt); + +//Main Script +void main() +{ + //Declare Major Variables + object oDying = GetLastPlayerDying(); + object oPlayer = GetLastPlayerDying(); + object oPC = GetLastPlayerDying(); + string ddVarName = "dd"+GetName(oPC); + object oModule = GetModule(); + SetLocalInt (oModule, ddVarName, 1); + + //If the player is being tortured in Hell, ressurect them... + object hell = GetArea(oPlayer); + object helltest = GetArea(GetObjectByTag("satan1")); + if (hell == helltest) + { + DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPlayer)); + return; + } + + AssignCommand(oDying, ClearAllActions()); + AssignCommand(oDying, bleed(1)); + +//Main Script End +} + +//PROTOTYPE DEFINED +void bleed(int iBleedAmt) +{ + + object oPC = GetLastPlayerDying(); + if (!GetIsPC(oPC)){ +return; +} + string ddVarName = "dd"+GetName(oPC); + object oModule = GetModule(); + effect eBleedEff; + + /* keep executing recursively until character is dead or at +1 hit points */ + if (GetCurrentHitPoints() <= 0) { + + /* a positive bleeding amount means damage, otherwise heal the character */ + if (iBleedAmt > 0) { + eBleedEff = EffectDamage(iBleedAmt); + } else { + eBleedEff = EffectHeal(-iBleedAmt); /* note the negative sign */ + } + + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBleedEff, OBJECT_SELF); + + /* -10 hit points is the death threshold, at or beyond it the character dies */ + if (GetCurrentHitPoints() <= -10) { + SetLocalInt (oModule, ddVarName, 1); + PlayVoiceChat(VOICE_CHAT_DEATH); /* scream one last time */ + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), OBJECT_SELF); /* make death dramatic */ + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF); /* now kill them */ + return; + } + + if (iBleedAmt > 0) { /* only check if character has not stablized */ + if (d10(1) == 1) { + /* 10% chance to stablize */ + iBleedAmt = -iBleedAmt; /* reverse the bleeding process */ + PlayVoiceChat(VOICE_CHAT_LAUGH); + /* laugh at death -- this time */ + } else { + switch (d6()) { + case 1: PlayVoiceChat(VOICE_CHAT_PAIN1); break; + case 2: PlayVoiceChat(VOICE_CHAT_PAIN2); break; + case 3: PlayVoiceChat(VOICE_CHAT_PAIN3); break; + case 4: PlayVoiceChat(VOICE_CHAT_HEALME); break; + case 5: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break; + case 6: PlayVoiceChat(VOICE_CHAT_HELP); + } + } + } + DelayCommand(6.0,bleed(iBleedAmt)); /* do this again next round */ + } +} diff --git a/_removed files/everpcequip.nss b/_removed files/everpcequip.nss new file mode 100644 index 00000000..7801a67a --- /dev/null +++ b/_removed files/everpcequip.nss @@ -0,0 +1,85 @@ +//Script Name: everpcequip +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 5/10/08 (updated 8/10/08) +///////////////////////////////////////// +/* +This script handles the equipping of all items tagged "arena" +Players cannot equip items in the arena unless it's tagnamed "arena" +Likewise players cannot equipt items tagnamed "arena" outside of the arena. +*/ +//////////////////////////////////////// +//Required Include +#include "x2_inc_switches" + +//Main Script +void main() +{ + //Declare Major Variables + object oItem = GetPCItemLastEquipped(); + object oPC = GetPCItemLastEquippedBy(); + int nSlot; + object nItem; + + +//You need to assign the tagname "TheArena" to any areas you deem as an Arena +//All items tagnamed "Arena" are unequipped if the person is NOT in the Arena. +//All Non-Arena items are unequipped if the player is IN the Arena + +//If the player is in the arena and eqiupping a non-arena item + if(GetTag(GetArea(oPC)) == "TheArena") + { + for (nSlot=0; nSlot=40) +{ + //Lets make the concealed 40% + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Lets make the look like a ghost.. :) + ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); + +} + +//Send them to Fugue +oTarget = GetWaypointByTag("respawnpt"); +lTarget = GetLocation(oTarget); + +//Apply a respawn penalty (See the setxp_inc script) +ApplyRespawnPenalty(oPC); + +//If the location is valid, send them there.. +if (GetArea(GetAreaFromLocation(lTarget))!=OBJECT_INVALID) +{ + +//Send the PC to the waypoint tagnamed "deathway" +AssignCommand(oPC, ClearAllActions()); +AssignCommand(oPC, ActionJumpToLocation(lTarget)); +} + +//Otherwise if the area is not valid.. +else +{ +//Otherwise they respawn where they died. +} + +//Main Script End +} + +//////BIOWARE STANDARD Raise OnDeath FUNCTION/////////// + +//PROTOTYPE DEFINED +// Raise OnDeath function +void Raise(object oPlayer) +{ + effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); + + effect eBad = GetFirstEffect(oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); + ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); + + //Search for negative effects + while(GetIsEffectValid(eBad)) + { + if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || + GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || + GetEffectType(eBad) == EFFECT_TYPE_DEAF || + GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || + GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) + { + //Remove effect if it is negative. + RemoveEffect(oPlayer, eBad); + } + eBad = GetNextEffect(oPlayer); + } + //Fire cast spell at event for the specified target + SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); +} diff --git a/_removed files/everpcrest.nss b/_removed files/everpcrest.nss new file mode 100644 index 00000000..35ebcbef --- /dev/null +++ b/_removed files/everpcrest.nss @@ -0,0 +1,130 @@ +//Script Name: everpcrest +/////////////////////////////////////// +//Created by Genisys / Guile +//Created on: 3/11/08 (Updated 8/10/08 +////////////////////////////////////// +/* +This is my premier OnPlayerRest +Module Properties Event script +to handle rest within all of my +module.. +*/ +////////////////////////////////////// + +//Redundant Variable +effect eEffect; + +//Main Script +void main() +{ + +//Declare Major Variables +object oPC=GetLastPCRested(); +object oPP = oPC; + +location lSaved = GetLocation(oPP); + +int nRestType=GetLastRestEventType(); +int nHD = GetHitDice(oPC); + +//Determine which Event has happened and run the script for that event. +switch (nRestType) + { + +///////////////////////////////////////////////////////////////////////////// + case REST_EVENTTYPE_REST_STARTED: + { + //Dark the screen out on the PC.. + FadeToBlack(oPC, FADE_SPEED_FAST); + + + //Your code goes here. + + + } + + break; +//////////////////////////////////////////////////////////////////////////// + case REST_EVENTTYPE_REST_FINISHED: + { + + //remove the black out from thier screen.. + FadeFromBlack(oPC, FADE_SPEED_SLOW); + + //Store the PC's location, so they can come back here after relogging + SetCampaignLocation(GetName(GetModule()), "SAVED_LOC", lSaved, oPP); + //Tell the PC their location was saved.. + SendMessageToPC(oPP, "Location Saved!"); + + FloatingTextStringOnCreature("Your character was saved.", oPC); + //Delete the // below to activate autosave when pc's finish resting. + // DelayCommand(1.0, ExportSingleCharacter(oPC)); + + if(nHD == 40) + { + //If the player is Legendary Level 60 give them a cool power! + if(GetXP(oPC) >5000000) + { + //The legendary character is immune to death! + eEffect = EffectImmunity(IMMUNITY_TYPE_ABILITY_DECREASE); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //The legendary character is immune to poison! + eEffect = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + } + + //Make ALL level 40s have 40% concealment + + //Make them harder to hit 40% miss chance... + eEffect = EffectConcealment(40); + eEffect = SupernaturalEffect(eEffect); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); + + //Apply the Ghost Like Visual to all Level 40 PCs + DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, + SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC)); + } + + //if the PC is immortal (has the immotoken) + if (GetItemPossessedBy(oPC, "immotoken")!= OBJECT_INVALID) + { + //See this script to adjust the immortal options.. + ExecuteScript("powerimmortal", oPC); + } + + + //Your code goes here. + + + } + break; + + +//////////////////////////////////////////////////////////////////////// + case REST_EVENTTYPE_REST_CANCELLED: + { + FloatingTextStringOnCreature("Your character was not saved!", oPC); + + FadeFromBlack(oPC, FADE_SPEED_MEDIUM); + + + //Your code goes here. + + } + + break; + +///////////////////////////////////////////////////////////////////////// + default: //You will probably never see this message.. + SendMessageToPC(oPC, + "If you see this message tell the DMs there is an error in the rest event script."); + + + //Switch Statement end.. + } + +//Main Script end +} diff --git a/_removed files/everpcunequip.nss b/_removed files/everpcunequip.nss new file mode 100644 index 00000000..e6dcf3c1 --- /dev/null +++ b/_removed files/everpcunequip.nss @@ -0,0 +1,96 @@ +//:: Script Name: everpcunequip +//:://///////////////////////////////////////////// +//:: Example XP2 OnItemEquipped +//:: x2_mod_def_unequ +//:: (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +// Put into the: OnUnEquip Module Event +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-07-16 +//::////////////////////////////////////////////// +//Modified By Guile 3/24/08 (Updated 8/10/08) +//This modifcation stops a weapon switching exploit +//Which gives the makes the PC never miss!!! +/////////////////////////////////////////////////// + +//Required Includes +#include "x2_inc_switches" +#include "x2_inc_intweapon" + +//Main Script +void main() +{ + + object oItem = GetPCItemLastUnequipped(); + object oPC = GetPCItemLastUnequippedBy(); + + if (!GetIsPC(oPC)) return; + + +//This is my weapon swap pvp exploit fix +//Lets make sure they are actually fighting someone +if(GetIsInCombat(oPC)) +{ +//Lets make sure it's a weapon or shield they are unequipping +if(GetBaseItemType(oItem) != BASE_ITEM_AMULET) +{if(GetBaseItemType(oItem) != BASE_ITEM_ARROW) +{if(GetBaseItemType(oItem) != BASE_ITEM_BELT) +{if(GetBaseItemType(oItem) != BASE_ITEM_BOLT) +{if(GetBaseItemType(oItem) != BASE_ITEM_BOOTS) +{if(GetBaseItemType(oItem) != BASE_ITEM_BRACER) +{if(GetBaseItemType(oItem) != BASE_ITEM_CLOAK) +{if(GetBaseItemType(oItem) != BASE_ITEM_HELMET) +{if(GetBaseItemType(oItem) != BASE_ITEM_BULLET) +{if(GetBaseItemType(oItem) != BASE_ITEM_RING) +{ +DelayCommand(0.5, AssignCommand(oPC, ClearAllActions())); +}}}}}}}}}} +//Exploit Fix END +} + +/////////////////////////////////////////////////////////////////////////// + + +//Your Code Goes here.. + + +/////////////////////////////////////////////////////////////////////////// + +///////////////////BIOWARE XP2 FUNCTIONS/////////////////////////////////// + //Commented out because I am not using it... + /* Delete this line to activate + // ------------------------------------------------------------------------- + // Intelligent Weapon System + // ------------------------------------------------------------------------- + if (IPGetIsIntelligentWeapon(oItem)) + { + IWSetIntelligentWeaponEquipped(oPC,OBJECT_INVALID); + IWPlayRandomUnequipComment(oPC,oItem); + } + + // DO NOT TOUCH THIS LINE! */ + + +///////////////////////XP2 TAGBASED SCRIPTING CODE/////////////////////////// + + // ------------------------------------------------------------------------- + // Generic Item Script Execution Code + // If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module, + // it will execute a script that has the same name as the item's tag + // inside this script you can manage scripts for all events by checking against + // GetUserDefinedItemEventNumber(). See x2_it_example.nss + // ------------------------------------------------------------------------- + if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) + { + SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNEQUIP); + int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); + if (nRet == X2_EXECUTE_SCRIPT_END) + { + return; + } + + } + +//Main Script End +} diff --git a/_removed files/everunaquire.nss b/_removed files/everunaquire.nss new file mode 100644 index 00000000..2351c36a --- /dev/null +++ b/_removed files/everunaquire.nss @@ -0,0 +1,108 @@ +//Script Name: onunaquireitem +////////////////////////////////////////// +//Created By: Genisys (Guile) +//Created On: 3/05/08 (Update 8/10/08) +///////////////////////////////////////// +/* +This script goes in the OnUnAquireItem +Module Event in the Module Properties + +This script accurately nails a player +for pick pocketing another player. +It doesn't fire if they are pick +pocketing anything but a player. + +The Tag Standard Bioware Tag-Based +Scripting will still fire reguardless. +*/ +//////////////////////////////////////// + +//Required Include +#include "x2_inc_switches" +void main() +{ + +//IMPORTANT THIS MUST BE IN YOUR OnUnAcquireItem Module Event Script + //This is a fix for the Inventory Organizing System! + object oPC = GetModuleItemLostBy(); + if(GetLocalInt(oPC, "ORGANIZING")==1) + { return; } + +object oItem = GetModuleItemLost(); + +object oRobbed; +oRobbed = GetModuleItemLostBy(); +object oThief; +oThief = GetModuleItemAcquiredBy(); +object oLost; +oLost = GetModuleItemLost(); +object oFound; +oFound = GetModuleItemAcquired(); + +string sMsg; +sMsg = "You can't pick player's pockets, it's not permitted!"; + + //Let's make sure the thief is a PC, or continue on to the tag based scripting + if (GetIsPC(oThief)) + { + + //Lets see if they have Pick Pocket Skills + if(GetSkillRank(SKILL_PICK_POCKET, oThief, TRUE)>0) + { + //Lets make sure they took it from a PC and not an NPC or Monster. + if(GetIsPC(oRobbed)) + { + //Let's make sure the thief isn't crafting. + if(oRobbed != oThief) + { + //Lets make sure the the thief is the one who disturbed the inventory + //of the person who lost the item. (This needs to be tested thoroughly) + // if(GetLastDisturbed()== oThief) + //Delete the // Below and the // where } appears below as well to activate. + // { + + //Give the item back, destroy the one they took, and kill the thief. + ActionTakeItem(oFound, oThief); + ActionGiveItem(oFound, oRobbed); + SendMessageToPC(oThief, sMsg); + effect eEffect; + eEffect = EffectDeath(); + eEffect = SupernaturalEffect(eEffect); + DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oThief)); + AssignCommand(oThief, SpeakString("I'm a thief!!", TALKVOLUME_SHOUT)); + + //} + } + } + } + } + +//This script destroys all items dropped if not in combat (disarmed) +//or if the item is put into a container in the module. +//Simply place // before Execute to turn off. +ExecuteScript("trashem",OBJECT_SELF); + +/////////////////////////////////////////////////////////////////////////// + + +//Your Code Goes here... + + +/////////////////////////////////////////////////////////////////////////// + +///////////STANDARD XP2 TAG BASED SCRIPTING CODE/////////////////////////// + + //Tag Based Scripting Check + if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) + { + SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNACQUIRE); + int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); + if (nRet == X2_EXECUTE_SCRIPT_END) + { + return; + } + + } + +//Main Script End +} diff --git a/_removed files/hgll_classft_inc.nss b/_removed files/hgll_classft_inc.nss new file mode 100644 index 00000000..6e947dd3 --- /dev/null +++ b/_removed files/hgll_classft_inc.nss @@ -0,0 +1,7473 @@ +//--------------------------------DECLARATIONS--------------------------------// + +// This function returns the level at which the specified class gets the specified feat. +// If the feat is epic only, it will return -1 in most cases, though it will also return +// 21 on occasion, as with Epic Spoells, which actually require 21 levels of the class rather +// than just epic character status. It replicates EXACTLY the cls_feat 2da for each of the +// respective classes, though the order of feats has been shuffled to accomodate the switch +// statements, and a few duplicate cases in the 2das were removed. If the feat input is not +// a class feat (and therefore not found in the 2da), this function will return -2. If the +// class input is not a valid class int, the function returns -3. Although Harper Scout could +// not possibly be a character's control class for legendary levels, it is included at the end +// of the switch so that the function can be of broader use to the community. Several feats were +// added as class feats for Palemasters, including Spell Focuses and Greater Spell Focuses +// (since they get Epic Focuses). They are marked in the function. The class switches are +// in aphabetical order by 2da file (which is slightly different than class name). +int GetClassLevelReqForFeat(int nFeat, int nClass); +// This function returns TRUE if the feat specified is a general feat, avalable to all classes. +int GetIsGeneralFeat(int nFeat); + +//----------------------------------FUNCTIONS---------------------------------// + +int GetClassLevelReqForFeat(int nFeat, int nClass) +{ +int nInt; +switch(nClass) +{ + case CLASS_TYPE_ARCANE_ARCHER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +case 445 : nInt = 1 ; break; +case 446 : nInt = 3 ; break; +case 447 : nInt = 5 ; break; +case 448 : nInt = 7 ; break; +case 449 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +case 450 : nInt = 2 ; break; +case 451 : nInt = 4 ; break; +case 452 : nInt = 6 ; break; +case 453 : nInt = 8 ; break; +case 454 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 585 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 977 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1045 : nInt = 11 ; break; +case 1046 : nInt = 13 ; break; +case 1047 : nInt = 15 ; break; +case 1048 : nInt = 17 ; break; +case 1049 : nInt = 19 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1050 : nInt = 21 ; break; +case 1051 : nInt = 23 ; break; +case 1052 : nInt = 25 ; break; +case 1053 : nInt = 27 ; break; +case 1054 : nInt = 29 ; break; +case 1055 : nInt = 31 ; break; +case 1056 : nInt = 33 ; break; +case 1057 : nInt = 35 ; break; +case 1058 : nInt = 37 ; break; +case 1059 : nInt = 39 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_ASSASSIN: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 195 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 251 : nInt = 5 ; break; +case 252 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +case 455 : nInt = 1 ; break; +case 456 : nInt = 3 ; break; +case 457 : nInt = 5 ; break; +case 458 : nInt = 7 ; break; +case 459 : nInt = 9 ; break; +case 463 : nInt = 2 ; break; +case 464 : nInt = 4 ; break; +case 465 : nInt = 6 ; break; +case 466 : nInt = 8 ; break; +case 467 : nInt = 10 ; break; +case 468 : nInt = 2 ; break; +case 469 : nInt = 5 ; break; +case 470 : nInt = 7 ; break; +case 471 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 585 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 753 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 834 : nInt = -1 ; break; +case 835 : nInt = -1 ; break; +case 836 : nInt = -1 ; break; +case 837 : nInt = -1 ; break; +case 838 : nInt = -1 ; break; +case 839 : nInt = -1 ; break; +case 840 : nInt = -1 ; break; +case 841 : nInt = -1 ; break; +case 842 : nInt = -1 ; break; +case 843 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 960 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 978 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1004 : nInt = 11 ; break; +case 1005 : nInt = 13 ; break; +case 1006 : nInt = 15 ; break; +case 1019 : nInt = 17 ; break; +case 1020 : nInt = 19 ; break; +case 1021 : nInt = 21 ; break; +case 1022 : nInt = 23 ; break; +case 1023 : nInt = 25 ; break; +case 1024 : nInt = 27 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1025 : nInt = 29 ; break; +case 1026 : nInt = 31 ; break; +case 1027 : nInt = 33 ; break; +case 1028 : nInt = 35 ; break; +case 1029 : nInt = 37 ; break; +case 1030 : nInt = 39 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1070 : nInt = 12 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_BARBARIAN: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 194 : nInt = 1 ; break; +case 195 : nInt = 2 ; break; +case 196 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 251 : nInt = 5 ; break; +case 252 : nInt = 10 ; break; +case 253 : nInt = 13 ; break; +case 254 : nInt = 16 ; break; +case 255 : nInt = 19 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 293 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 326 : nInt = 4 ; break; +case 327 : nInt = 8 ; break; +case 328 : nInt = 12 ; break; +case 329 : nInt = 15 ; break; +case 330 : nInt = 16 ; break; +case 331 : nInt = 20 ; break; +case 332 : nInt = 14 ; break; +case 333 : nInt = 17 ; break; +case 334 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 869 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 967 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 988 : nInt = -1 ; break; +case 989 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1067 : nInt = 23 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_BARD: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 193 : nInt = -1 ; break; +case 197 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 257 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +case 355 : nInt = 2 ; break; +case 356 : nInt = 3 ; break; +case 357 : nInt = 4 ; break; +case 358 : nInt = 5 ; break; +case 359 : nInt = 6 ; break; +case 360 : nInt = 7 ; break; +case 361 : nInt = 8 ; break; +case 362 : nInt = 9 ; break; +case 363 : nInt = 10 ; break; +case 364 : nInt = 11 ; break; +case 365 : nInt = 12 ; break; +case 366 : nInt = 13 ; break; +case 367 : nInt = 14 ; break; +case 368 : nInt = 15 ; break; +case 369 : nInt = 16 ; break; +case 370 : nInt = 17 ; break; +case 371 : nInt = 18 ; break; +case 372 : nInt = 19 ; break; +case 373 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 401 : nInt = -1 ; break; +case 415 : nInt = -1 ; break; +case 416 : nInt = -1 ; break; +case 417 : nInt = -1 ; break; +case 418 : nInt = -1 ; break; +case 419 : nInt = -1 ; break; +case 420 : nInt = -1 ; break; +case 421 : nInt = -1 ; break; +case 422 : nInt = -1 ; break; +case 423 : nInt = -1 ; break; +case 424 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +case 600 : nInt = -1 ; break; +case 609 : nInt = -1 ; break; +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 695 : nInt = -1 ; break; +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 764 : nInt = -1 ; break; +case 765 : nInt = -1 ; break; +case 766 : nInt = -1 ; break; +case 767 : nInt = -1 ; break; +case 768 : nInt = -1 ; break; +case 769 : nInt = -1 ; break; +case 770 : nInt = -1 ; break; +case 771 : nInt = -1 ; break; +case 772 : nInt = -1 ; break; +case 773 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 870 : nInt = -1 ; break; +case 871 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 968 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_BLACKGUARD: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 294 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 413 : nInt = -1 ; break; +case 414 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +case 460 : nInt = 4 ; break; +case 461 : nInt = 7 ; break; +case 462 : nInt = 10 ; break; +case 472 : nInt = 2 ; break; +case 473 : nInt = 2 ; break; +case 474 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 475 : nInt = 5 ; break; +case 476 : nInt = 6 ; break; +case 477 : nInt = 8 ; break; +case 478 : nInt = 2 ; break; +case 479 : nInt = 7 ; break; +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 586 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 824 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 825 : nInt = -1 ; break; +case 826 : nInt = -1 ; break; +case 827 : nInt = -1 ; break; +case 828 : nInt = -1 ; break; +case 829 : nInt = -1 ; break; +case 830 : nInt = -1 ; break; +case 831 : nInt = -1 ; break; +case 832 : nInt = -1 ; break; +case 833 : nInt = -1 ; break; +case 834 : nInt = -1 ; break; +case 835 : nInt = -1 ; break; +case 836 : nInt = -1 ; break; +case 837 : nInt = -1 ; break; +case 838 : nInt = -1 ; break; +case 839 : nInt = -1 ; break; +case 840 : nInt = -1 ; break; +case 841 : nInt = -1 ; break; +case 842 : nInt = -1 ; break; +case 843 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 960 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 979 : nInt = 11 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1003 : nInt = 15 ; break; +case 1007 : nInt = 13 ; break; +case 1008 : nInt = 16 ; break; +case 1009 : nInt = 19 ; break; +case 1010 : nInt = 22 ; break; +case 1011 : nInt = 25 ; break; +case 1012 : nInt = 28 ; break; +case 1013 : nInt = 31 ; break; +case 1014 : nInt = 34 ; break; +case 1015 : nInt = 37 ; break; +case 1016 : nInt = 40 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_CLERIC: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +case 13 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 294 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 413 : nInt = -1 ; break; +case 414 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 969 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DIVINECHAMPION: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 5 : nInt = -1 ; break; +case 6 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 9 : nInt = -1 ; break; +case 10 : nInt = -1 ; break; +case 15 : nInt = -1 ; break; +case 16 : nInt = -1 ; break; +case 17 : nInt = -1 ; break; +case 18 : nInt = -1 ; break; +case 19 : nInt = -1 ; break; +case 20 : nInt = -1 ; break; +case 21 : nInt = -1 ; break; +case 23 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 26 : nInt = -1 ; break; +case 27 : nInt = -1 ; break; +case 28 : nInt = -1 ; break; +case 30 : nInt = -1 ; break; +case 31 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 39 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 42 : nInt = -1 ; break; +case 43 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 52 : nInt = -1 ; break; +case 53 : nInt = -1 ; break; +case 54 : nInt = -1 ; break; +case 55 : nInt = -1 ; break; +case 56 : nInt = -1 ; break; +case 57 : nInt = -1 ; break; +case 58 : nInt = -1 ; break; +case 59 : nInt = -1 ; break; +case 60 : nInt = -1 ; break; +case 61 : nInt = -1 ; break; +case 62 : nInt = -1 ; break; +case 63 : nInt = -1 ; break; +case 64 : nInt = -1 ; break; +case 65 : nInt = -1 ; break; +case 66 : nInt = -1 ; break; +case 67 : nInt = -1 ; break; +case 68 : nInt = -1 ; break; +case 69 : nInt = -1 ; break; +case 70 : nInt = -1 ; break; +case 71 : nInt = -1 ; break; +case 72 : nInt = -1 ; break; +case 73 : nInt = -1 ; break; +case 74 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +case 75 : nInt = -1 ; break; +case 76 : nInt = -1 ; break; +case 77 : nInt = -1 ; break; +case 78 : nInt = -1 ; break; +case 79 : nInt = -1 ; break; +case 80 : nInt = -1 ; break; +case 82 : nInt = -1 ; break; +case 83 : nInt = -1 ; break; +case 84 : nInt = -1 ; break; +case 85 : nInt = -1 ; break; +case 87 : nInt = -1 ; break; +case 88 : nInt = -1 ; break; +case 89 : nInt = -1 ; break; +case 90 : nInt = -1 ; break; +case 91 : nInt = -1 ; break; +case 92 : nInt = -1 ; break; +case 93 : nInt = -1 ; break; +case 94 : nInt = -1 ; break; +case 95 : nInt = -1 ; break; +case 96 : nInt = -1 ; break; +case 97 : nInt = -1 ; break; +case 98 : nInt = -1 ; break; +case 99 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +case 100 : nInt = -1 ; break; +case 101 : nInt = -1 ; break; +case 102 : nInt = -1 ; break; +case 103 : nInt = -1 ; break; +case 104 : nInt = -1 ; break; +case 105 : nInt = -1 ; break; +case 106 : nInt = -1 ; break; +case 107 : nInt = -1 ; break; +case 108 : nInt = -1 ; break; +case 109 : nInt = -1 ; break; +case 110 : nInt = -1 ; break; +case 111 : nInt = -1 ; break; +case 112 : nInt = -1 ; break; +case 113 : nInt = -1 ; break; +case 114 : nInt = -1 ; break; +case 115 : nInt = -1 ; break; +case 116 : nInt = -1 ; break; +case 117 : nInt = -1 ; break; +case 118 : nInt = -1 ; break; +case 120 : nInt = -1 ; break; +case 121 : nInt = -1 ; break; +case 122 : nInt = -1 ; break; +case 123 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +case 125 : nInt = -1 ; break; +case 126 : nInt = -1 ; break; +case 127 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 299 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 301 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 389 : nInt = -1 ; break; +case 390 : nInt = -1 ; break; +case 391 : nInt = -1 ; break; +case 392 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 408 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +case 657 : nInt = -1 ; break; +case 658 : nInt = -1 ; break; +case 659 : nInt = -1 ; break; +case 660 : nInt = -1 ; break; +case 661 : nInt = -1 ; break; +case 662 : nInt = -1 ; break; +case 663 : nInt = -1 ; break; +case 664 : nInt = -1 ; break; +case 665 : nInt = -1 ; break; +case 666 : nInt = -1 ; break; +case 667 : nInt = -1 ; break; +case 668 : nInt = -1 ; break; +case 669 : nInt = -1 ; break; +case 670 : nInt = -1 ; break; +case 671 : nInt = -1 ; break; +case 672 : nInt = -1 ; break; +case 673 : nInt = -1 ; break; +case 674 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 675 : nInt = -1 ; break; +case 676 : nInt = -1 ; break; +case 677 : nInt = -1 ; break; +case 678 : nInt = -1 ; break; +case 679 : nInt = -1 ; break; +case 680 : nInt = -1 ; break; +case 681 : nInt = -1 ; break; +case 682 : nInt = -1 ; break; +case 683 : nInt = -1 ; break; +case 684 : nInt = -1 ; break; +case 685 : nInt = -1 ; break; +case 686 : nInt = -1 ; break; +case 687 : nInt = -1 ; break; +case 688 : nInt = -1 ; break; +case 689 : nInt = -1 ; break; +case 690 : nInt = -1 ; break; +case 691 : nInt = -1 ; break; +case 692 : nInt = -1 ; break; +case 693 : nInt = -1 ; break; +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +case 824 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 825 : nInt = -1 ; break; +case 826 : nInt = -1 ; break; +case 827 : nInt = -1 ; break; +case 828 : nInt = -1 ; break; +case 829 : nInt = -1 ; break; +case 830 : nInt = -1 ; break; +case 831 : nInt = -1 ; break; +case 832 : nInt = -1 ; break; +case 833 : nInt = -1 ; break; +case 844 : nInt = -1 ; break; +case 845 : nInt = -1 ; break; +case 846 : nInt = -1 ; break; +case 847 : nInt = -1 ; break; +case 848 : nInt = -1 ; break; +case 849 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 850 : nInt = -1 ; break; +case 851 : nInt = -1 ; break; +case 852 : nInt = -1 ; break; +case 853 : nInt = -1 ; break; +case 854 : nInt = -1 ; break; +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 867 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 904 : nInt = 2 ; break; +case 909 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 952 : nInt = -1 ; break; +case 954 : nInt = -1 ; break; +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 982 : nInt = 11 ; break; +case 993 : nInt = -1 ; break; +case 995 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 998 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DRAGONDISCIPLE: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 228 : nInt = 10 ; break; +case 235 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 586 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 961 : nInt = 1 ; break; +case 962 : nInt = 2 ; break; +case 963 : nInt = 10 ; break; +case 964 : nInt = 10 ; break; +case 965 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 987 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1042 : nInt = 1 ; break; +case 1043 : nInt = 4 ; break; +case 1044 : nInt = 6 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DRUID: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 34 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 48 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 198 : nInt = 1 ; break; +case 199 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 200 : nInt = 2 ; break; +case 201 : nInt = 3 ; break; +case 202 : nInt = 4 ; break; +case 203 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 304 : nInt = 16 ; break; +case 305 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 335 : nInt = 6 ; break; +case 336 : nInt = 7 ; break; +case 337 : nInt = 10 ; break; +case 338 : nInt = 14 ; break; +case 339 : nInt = 18 ; break; +case 340 : nInt = 17 ; break; +case 341 : nInt = 19 ; break; +case 342 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +case 587 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 873 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 970 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1068 : nInt = 22 ; break; +case 1069 : nInt = 26 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_DWARVENDEFENDER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 947 : nInt = 1 ; break; +case 948 : nInt = 6 ; break; +case 949 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 950 : nInt = 5 ; break; +case 951 : nInt = 10 ; break; +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 985 : nInt = 11 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_FIGHTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 5 : nInt = -1 ; break; +case 6 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 9 : nInt = -1 ; break; +case 10 : nInt = -1 ; break; +case 15 : nInt = -1 ; break; +case 16 : nInt = -1 ; break; +case 17 : nInt = -1 ; break; +case 18 : nInt = -1 ; break; +case 19 : nInt = -1 ; break; +case 20 : nInt = -1 ; break; +case 21 : nInt = -1 ; break; +case 23 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 26 : nInt = -1 ; break; +case 27 : nInt = -1 ; break; +case 28 : nInt = -1 ; break; +case 30 : nInt = -1 ; break; +case 31 : nInt = -1 ; break; +case 32 : nInt = 1 ; break; +case 39 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 42 : nInt = -1 ; break; +case 43 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +case 47 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 52 : nInt = -1 ; break; +case 53 : nInt = -1 ; break; +case 54 : nInt = -1 ; break; +case 55 : nInt = -1 ; break; +case 56 : nInt = -1 ; break; +case 57 : nInt = -1 ; break; +case 58 : nInt = -1 ; break; +case 59 : nInt = -1 ; break; +case 60 : nInt = -1 ; break; +case 61 : nInt = -1 ; break; +case 62 : nInt = -1 ; break; +case 63 : nInt = -1 ; break; +case 64 : nInt = -1 ; break; +case 65 : nInt = -1 ; break; +case 66 : nInt = -1 ; break; +case 67 : nInt = -1 ; break; +case 68 : nInt = -1 ; break; +case 69 : nInt = -1 ; break; +case 70 : nInt = -1 ; break; +case 71 : nInt = -1 ; break; +case 72 : nInt = -1 ; break; +case 73 : nInt = -1 ; break; +case 74 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +case 75 : nInt = -1 ; break; +case 76 : nInt = -1 ; break; +case 77 : nInt = -1 ; break; +case 78 : nInt = -1 ; break; +case 79 : nInt = -1 ; break; +case 80 : nInt = -1 ; break; +case 82 : nInt = -1 ; break; +case 83 : nInt = -1 ; break; +case 84 : nInt = -1 ; break; +case 85 : nInt = -1 ; break; +case 87 : nInt = -1 ; break; +case 88 : nInt = -1 ; break; +case 89 : nInt = -1 ; break; +case 90 : nInt = -1 ; break; +case 91 : nInt = -1 ; break; +case 92 : nInt = -1 ; break; +case 93 : nInt = -1 ; break; +case 94 : nInt = -1 ; break; +case 95 : nInt = -1 ; break; +case 96 : nInt = -1 ; break; +case 97 : nInt = -1 ; break; +case 98 : nInt = -1 ; break; +case 99 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +case 100 : nInt = -1 ; break; +case 101 : nInt = -1 ; break; +case 102 : nInt = -1 ; break; +case 103 : nInt = -1 ; break; +case 104 : nInt = -1 ; break; +case 105 : nInt = -1 ; break; +case 106 : nInt = -1 ; break; +case 107 : nInt = -1 ; break; +case 108 : nInt = -1 ; break; +case 109 : nInt = -1 ; break; +case 110 : nInt = -1 ; break; +case 111 : nInt = -1 ; break; +case 112 : nInt = -1 ; break; +case 113 : nInt = -1 ; break; +case 114 : nInt = -1 ; break; +case 115 : nInt = -1 ; break; +case 116 : nInt = -1 ; break; +case 117 : nInt = -1 ; break; +case 118 : nInt = -1 ; break; +case 120 : nInt = -1 ; break; +case 121 : nInt = -1 ; break; +case 122 : nInt = -1 ; break; +case 123 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +case 125 : nInt = -1 ; break; +case 126 : nInt = -1 ; break; +case 127 : nInt = -1 ; break; +case 128 : nInt = -1 ; break; +case 129 : nInt = -1 ; break; +case 130 : nInt = -1 ; break; +case 131 : nInt = -1 ; break; +case 132 : nInt = -1 ; break; +case 133 : nInt = -1 ; break; +case 134 : nInt = -1 ; break; +case 135 : nInt = -1 ; break; +case 136 : nInt = -1 ; break; +case 137 : nInt = -1 ; break; +case 138 : nInt = -1 ; break; +case 139 : nInt = -1 ; break; +case 140 : nInt = -1 ; break; +case 141 : nInt = -1 ; break; +case 142 : nInt = -1 ; break; +case 143 : nInt = -1 ; break; +case 144 : nInt = -1 ; break; +case 145 : nInt = -1 ; break; +case 146 : nInt = -1 ; break; +case 147 : nInt = -1 ; break; +case 148 : nInt = -1 ; break; +case 149 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 150 : nInt = -1 ; break; +case 151 : nInt = -1 ; break; +case 152 : nInt = -1 ; break; +case 153 : nInt = -1 ; break; +case 154 : nInt = -1 ; break; +case 155 : nInt = -1 ; break; +case 156 : nInt = -1 ; break; +case 158 : nInt = -1 ; break; +case 159 : nInt = -1 ; break; +case 160 : nInt = -1 ; break; +case 161 : nInt = -1 ; break; +case 163 : nInt = -1 ; break; +case 164 : nInt = -1 ; break; +case 165 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 389 : nInt = -1 ; break; +case 390 : nInt = -1 ; break; +case 391 : nInt = -1 ; break; +case 392 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 408 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +case 657 : nInt = -1 ; break; +case 658 : nInt = -1 ; break; +case 659 : nInt = -1 ; break; +case 660 : nInt = -1 ; break; +case 661 : nInt = -1 ; break; +case 662 : nInt = -1 ; break; +case 663 : nInt = -1 ; break; +case 664 : nInt = -1 ; break; +case 665 : nInt = -1 ; break; +case 666 : nInt = -1 ; break; +case 667 : nInt = -1 ; break; +case 668 : nInt = -1 ; break; +case 669 : nInt = -1 ; break; +case 670 : nInt = -1 ; break; +case 671 : nInt = -1 ; break; +case 672 : nInt = -1 ; break; +case 673 : nInt = -1 ; break; +case 674 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 675 : nInt = -1 ; break; +case 676 : nInt = -1 ; break; +case 677 : nInt = -1 ; break; +case 678 : nInt = -1 ; break; +case 679 : nInt = -1 ; break; +case 680 : nInt = -1 ; break; +case 681 : nInt = -1 ; break; +case 682 : nInt = -1 ; break; +case 683 : nInt = -1 ; break; +case 684 : nInt = -1 ; break; +case 685 : nInt = -1 ; break; +case 686 : nInt = -1 ; break; +case 687 : nInt = -1 ; break; +case 688 : nInt = -1 ; break; +case 689 : nInt = -1 ; break; +case 690 : nInt = -1 ; break; +case 691 : nInt = -1 ; break; +case 692 : nInt = -1 ; break; +case 693 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 844 : nInt = -1 ; break; +case 845 : nInt = -1 ; break; +case 846 : nInt = -1 ; break; +case 847 : nInt = -1 ; break; +case 848 : nInt = -1 ; break; +case 849 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 850 : nInt = -1 ; break; +case 851 : nInt = -1 ; break; +case 852 : nInt = -1 ; break; +case 853 : nInt = -1 ; break; +case 867 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 952 : nInt = -1 ; break; +case 953 : nInt = -1 ; break; +case 954 : nInt = -1 ; break; +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 957 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 966 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 993 : nInt = -1 ; break; +case 994 : nInt = -1 ; break; +case 995 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 998 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_MONK: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 6 : nInt = 1 ; break; +case 8 : nInt = 2 ; break; +case 17 : nInt = 6 ; break; +case 21 : nInt = 1 ; break; +case 23 : nInt = 6 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 39 : nInt = 1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +case 49 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 204 : nInt = 1 ; break; +case 206 : nInt = 1 ; break; +case 207 : nInt = 3 ; break; +case 208 : nInt = 3 ; break; +case 209 : nInt = 5 ; break; +case 211 : nInt = 7 ; break; +case 212 : nInt = 9 ; break; +case 213 : nInt = 10 ; break; +case 214 : nInt = 11 ; break; +case 215 : nInt = 12 ; break; +case 216 : nInt = 20 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 260 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 296 : nInt = 15 ; break; +case 297 : nInt = 18 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 343 : nInt = 13 ; break; +case 344 : nInt = 16 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 697 : nInt = -1 ; break; +case 698 : nInt = -1 ; break; +case 699 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 700 : nInt = -1 ; break; +case 701 : nInt = -1 ; break; +case 702 : nInt = -1 ; break; +case 703 : nInt = -1 ; break; +case 704 : nInt = -1 ; break; +case 705 : nInt = -1 ; break; +case 706 : nInt = -1 ; break; +case 707 : nInt = -1 ; break; +case 708 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 844 : nInt = -1 ; break; +case 845 : nInt = -1 ; break; +case 846 : nInt = -1 ; break; +case 847 : nInt = -1 ; break; +case 848 : nInt = -1 ; break; +case 849 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 850 : nInt = -1 ; break; +case 851 : nInt = -1 ; break; +case 852 : nInt = -1 ; break; +case 853 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 971 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_PALADIN: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 2 : nInt = 1 ; break; +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +case 13 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 217 : nInt = 1 ; break; +case 219 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 294 : nInt = 3 ; break; +case 299 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 300 : nInt = 2 ; break; +case 301 : nInt = 2 ; break; +case 302 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 413 : nInt = -1 ; break; +case 414 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 586 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +case 746 : nInt = -1 ; break; +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 824 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 825 : nInt = -1 ; break; +case 826 : nInt = -1 ; break; +case 827 : nInt = -1 ; break; +case 828 : nInt = -1 ; break; +case 829 : nInt = -1 ; break; +case 830 : nInt = -1 ; break; +case 831 : nInt = -1 ; break; +case 832 : nInt = -1 ; break; +case 833 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 972 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 995 : nInt = -1 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_PALEMASTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 11 : nInt = -1 ; break; //feat Empower Spell added to standard Bioware 2da data +case 12 : nInt = -1 ; break; //feat Extend Spell added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 25 : nInt = -1 ; break; //feat Maximize Spell added to standard Bioware 2da data +case 29 : nInt = -1 ; break; //feat Quicken Spell added to standard Bioware 2da data +case 35 : nInt = -1 ; break; //feat Spell Focus Abjuration added to standard Bioware 2da data +case 36 : nInt = -1 ; break; //feat Spell Penetration added to standard Bioware 2da data +case 37 : nInt = -1 ; break; //feat Still Spell added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; //feat Spell Focus Conjuration added to standard Bioware 2da data +case 167 : nInt = -1 ; break; //feat Spell Focus Divination added to standard Bioware 2da data +case 168 : nInt = -1 ; break; //feat Spell Focus Enchantment added to standard Bioware 2da data +case 169 : nInt = -1 ; break; //feat Spell Focus Evocation added to standard Bioware 2da data +case 170 : nInt = -1 ; break; //feat Spell Focus Illusion added to standard Bioware 2da data +case 171 : nInt = -1 ; break; //feat Spell Focus Necromancy added to standard Bioware 2da data +case 172 : nInt = -1 ; break; //feat Spell Focus Transmutation added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 228 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; //feat Greater Spell Focus Abjuration added to standard Bioware 2da data +case 394 : nInt = -1 ; break; //feat Greater Spell Focus Conjuration added to standard Bioware 2da data +case 395 : nInt = -1 ; break; //feat Greater Spell Focus Divination added to standard Bioware 2da data +case 396 : nInt = -1 ; break; //feat Greater Spell Focus Enchantment added to standard Bioware 2da data +case 397 : nInt = -1 ; break; //feat Greater Spell Focus Evocation added to standard Bioware 2da data +case 398 : nInt = -1 ; break; //feat Greater Spell Focus Illusion added to standard Bioware 2da data +case 399 : nInt = -1 ; break; //feat Greater Spell Focus Necromancy added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; //feat Greater Spell Focus Transmutation added to standard Bioware 2da data +case 401 : nInt = -1 ; break; //feat Greater Spell Penetration added to standard Bioware 2da data +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 15 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 15 ; break; +case 876 : nInt = 15 ; break; +case 877 : nInt = 15 ; break; +case 878 : nInt = 15 ; break; +case 886 : nInt = 1 ; break; +case 889 : nInt = 2 ; break; +case 890 : nInt = 4 ; break; +case 891 : nInt = 5 ; break; +case 892 : nInt = 6 ; break; +case 893 : nInt = 8 ; break; +case 894 : nInt = 7 ; break; +case 895 : nInt = 9 ; break; +case 896 : nInt = 10 ; break; +case 897 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 984 : nInt = 11 ; break; +case 990 : nInt = 15 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_RANGER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 3 : nInt = 1 ; break; +case 4 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +case 20 : nInt = 9 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 32 : nInt = 1 ; break; +case 34 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = 1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 199 : nInt = 6 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 201 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 261 : nInt = -1 ; break; +case 262 : nInt = -1 ; break; +case 263 : nInt = -1 ; break; +case 264 : nInt = -1 ; break; +case 265 : nInt = -1 ; break; +case 266 : nInt = -1 ; break; +case 267 : nInt = -1 ; break; +case 268 : nInt = -1 ; break; +case 269 : nInt = -1 ; break; +case 270 : nInt = -1 ; break; +case 271 : nInt = -1 ; break; +case 272 : nInt = -1 ; break; +case 273 : nInt = -1 ; break; +case 274 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 275 : nInt = -1 ; break; +case 276 : nInt = -1 ; break; +case 277 : nInt = -1 ; break; +case 278 : nInt = -1 ; break; +case 279 : nInt = -1 ; break; +case 280 : nInt = -1 ; break; +case 281 : nInt = -1 ; break; +case 284 : nInt = -1 ; break; +case 285 : nInt = -1 ; break; +case 286 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +case 374 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +case 587 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 747 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 754 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 855 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 956 : nInt = -1 ; break; +case 973 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 997 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_ROGUE: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 50 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 193 : nInt = -1 ; break; +case 195 : nInt = 3 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 206 : nInt = 2 ; break; +case 212 : nInt = -1 ; break; +case 221 : nInt = 1 ; break; +case 222 : nInt = -1 ; break; +case 223 : nInt = -1 ; break; +case 224 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 225 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 251 : nInt = 6 ; break; +case 252 : nInt = 11 ; break; +case 253 : nInt = 14 ; break; +case 254 : nInt = 17 ; break; +case 255 : nInt = 20 ; break; +case 259 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +case 345 : nInt = 3 ; break; +case 346 : nInt = 5 ; break; +case 347 : nInt = 7 ; break; +case 348 : nInt = 9 ; break; +case 349 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +case 350 : nInt = 13 ; break; +case 351 : nInt = 15 ; break; +case 352 : nInt = 17 ; break; +case 353 : nInt = 19 ; break; +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 586 : nInt = -1 ; break; +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +case 609 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 753 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 834 : nInt = -1 ; break; +case 835 : nInt = -1 ; break; +case 836 : nInt = -1 ; break; +case 837 : nInt = -1 ; break; +case 838 : nInt = -1 ; break; +case 839 : nInt = -1 ; break; +case 840 : nInt = -1 ; break; +case 841 : nInt = -1 ; break; +case 842 : nInt = -1 ; break; +case 843 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 856 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 974 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +case 1032 : nInt = 21 ; break; +case 1033 : nInt = 23 ; break; +case 1034 : nInt = 25 ; break; +case 1035 : nInt = 27 ; break; +case 1036 : nInt = 29 ; break; +case 1037 : nInt = 31 ; break; +case 1038 : nInt = 33 ; break; +case 1039 : nInt = 35 ; break; +case 1040 : nInt = 37 ; break; +case 1041 : nInt = 39 ; break; +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_SHADOWDANCER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 195 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +case 206 : nInt = 2 ; break; +case 212 : nInt = 10 ; break; +case 223 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +case 228 : nInt = 2 ; break; +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 252 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +case 433 : nInt = 1 ; break; +case 434 : nInt = 3 ; break; +case 435 : nInt = 3 ; break; +case 436 : nInt = 4 ; break; +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 585 : nInt = -1 ; break; +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +case 609 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 748 : nInt = -1 ; break; +case 749 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 750 : nInt = -1 ; break; +case 751 : nInt = -1 ; break; +case 752 : nInt = -1 ; break; +case 753 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 856 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 980 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1002 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_SHIFTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +case 587 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 804 : nInt = -1 ; break; +case 805 : nInt = -1 ; break; +case 806 : nInt = -1 ; break; +case 807 : nInt = -1 ; break; +case 808 : nInt = -1 ; break; +case 809 : nInt = -1 ; break; +case 810 : nInt = -1 ; break; +case 811 : nInt = -1 ; break; +case 812 : nInt = -1 ; break; +case 813 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 872 : nInt = -1 ; break; +case 873 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 898 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 900 : nInt = 3 ; break; +case 901 : nInt = 5 ; break; +case 902 : nInt = 7 ; break; +case 903 : nInt = 10 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 986 : nInt = 11 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1060 : nInt = -1 ; break; +case 1061 : nInt = -1 ; break; +case 1062 : nInt = 4 ; break; +case 1063 : nInt = 7 ; break; +case 1064 : nInt = 10 ; break; +case 1065 : nInt = 16 ; break; +case 1066 : nInt = 13 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_SORCERER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 303 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 533 : nInt = -1 ; break; +case 534 : nInt = -1 ; break; +case 535 : nInt = -1 ; break; +case 536 : nInt = -1 ; break; +case 537 : nInt = -1 ; break; +case 538 : nInt = -1 ; break; +case 539 : nInt = -1 ; break; +case 540 : nInt = -1 ; break; +case 541 : nInt = -1 ; break; +case 542 : nInt = -1 ; break; +case 543 : nInt = -1 ; break; +case 544 : nInt = -1 ; break; +case 545 : nInt = -1 ; break; +case 546 : nInt = -1 ; break; +case 547 : nInt = -1 ; break; +case 548 : nInt = -1 ; break; +case 549 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +case 550 : nInt = -1 ; break; +case 551 : nInt = -1 ; break; +case 552 : nInt = -1 ; break; +case 553 : nInt = -1 ; break; +case 554 : nInt = -1 ; break; +case 555 : nInt = -1 ; break; +case 556 : nInt = -1 ; break; +case 557 : nInt = -1 ; break; +case 558 : nInt = -1 ; break; +case 559 : nInt = -1 ; break; +case 560 : nInt = -1 ; break; +case 561 : nInt = -1 ; break; +case 562 : nInt = -1 ; break; +case 563 : nInt = -1 ; break; +case 564 : nInt = -1 ; break; +case 565 : nInt = -1 ; break; +case 566 : nInt = -1 ; break; +case 567 : nInt = -1 ; break; +case 568 : nInt = -1 ; break; +case 569 : nInt = -1 ; break; +case 570 : nInt = -1 ; break; +case 571 : nInt = -1 ; break; +case 572 : nInt = -1 ; break; +case 573 : nInt = -1 ; break; +case 574 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 575 : nInt = -1 ; break; +case 576 : nInt = -1 ; break; +case 577 : nInt = -1 ; break; +case 578 : nInt = -1 ; break; +case 579 : nInt = -1 ; break; +case 580 : nInt = -1 ; break; +case 581 : nInt = -1 ; break; +case 582 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 764 : nInt = -1 ; break; +case 765 : nInt = -1 ; break; +case 766 : nInt = -1 ; break; +case 767 : nInt = -1 ; break; +case 768 : nInt = -1 ; break; +case 769 : nInt = -1 ; break; +case 770 : nInt = -1 ; break; +case 771 : nInt = -1 ; break; +case 772 : nInt = -1 ; break; +case 773 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 877 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ + default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 975 : nInt = 21 ; break; +case 990 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_WIZARD: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 7 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +case 11 : nInt = -1 ; break; +case 12 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 25 : nInt = -1 ; break; +case 29 : nInt = -1 ; break; +case 33 : nInt = -1 ; break; +case 35 : nInt = -1 ; break; +case 36 : nInt = -1 ; break; +case 37 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +case 51 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +case 166 : nInt = -1 ; break; +case 167 : nInt = -1 ; break; +case 168 : nInt = -1 ; break; +case 169 : nInt = -1 ; break; +case 170 : nInt = -1 ; break; +case 171 : nInt = -1 ; break; +case 172 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +case 303 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +case 393 : nInt = -1 ; break; +case 394 : nInt = -1 ; break; +case 395 : nInt = -1 ; break; +case 396 : nInt = -1 ; break; +case 397 : nInt = -1 ; break; +case 398 : nInt = -1 ; break; +case 399 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +case 400 : nInt = -1 ; break; +case 401 : nInt = -1 ; break; +case 415 : nInt = -1 ; break; +case 416 : nInt = -1 ; break; +case 417 : nInt = -1 ; break; +case 418 : nInt = -1 ; break; +case 419 : nInt = -1 ; break; +case 420 : nInt = -1 ; break; +case 421 : nInt = -1 ; break; +case 422 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 491 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 610 : nInt = -1 ; break; +case 611 : nInt = -1 ; break; +case 612 : nInt = -1 ; break; +case 613 : nInt = -1 ; break; +case 614 : nInt = -1 ; break; +case 615 : nInt = -1 ; break; +case 616 : nInt = -1 ; break; +case 617 : nInt = -1 ; break; +case 618 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 794 : nInt = -1 ; break; +case 795 : nInt = -1 ; break; +case 796 : nInt = -1 ; break; +case 797 : nInt = -1 ; break; +case 798 : nInt = -1 ; break; +case 799 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +case 800 : nInt = -1 ; break; +case 801 : nInt = -1 ; break; +case 802 : nInt = -1 ; break; +case 803 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 857 : nInt = -1 ; break; +case 858 : nInt = -1 ; break; +case 859 : nInt = -1 ; break; +case 860 : nInt = -1 ; break; +case 861 : nInt = -1 ; break; +case 862 : nInt = -1 ; break; +case 863 : nInt = -1 ; break; +case 864 : nInt = -1 ; break; +case 865 : nInt = -1 ; break; +case 874 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 875 : nInt = 21 ; break; +case 876 : nInt = 21 ; break; +case 877 : nInt = 21 ; break; +case 878 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 944 : nInt = 3 ; break; +case 945 : nInt = 1 ; break; +case 946 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 976 : nInt = 21 ; break; +case 990 : nInt = 21 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_WEAPON_MASTER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ + +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +case 490 : nInt = -1 ; break; +case 491 : nInt = -1 ; break; +case 492 : nInt = -1 ; break; +case 493 : nInt = -1 ; break; +case 494 : nInt = -1 ; break; +case 495 : nInt = -1 ; break; +case 496 : nInt = -1 ; break; +case 497 : nInt = -1 ; break; +case 498 : nInt = -1 ; break; +case 499 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +case 500 : nInt = -1 ; break; +case 501 : nInt = -1 ; break; +case 502 : nInt = -1 ; break; +case 503 : nInt = -1 ; break; +case 504 : nInt = -1 ; break; +case 505 : nInt = -1 ; break; +case 506 : nInt = -1 ; break; +case 507 : nInt = -1 ; break; +case 508 : nInt = -1 ; break; +case 509 : nInt = -1 ; break; +case 510 : nInt = -1 ; break; +case 511 : nInt = -1 ; break; +case 512 : nInt = -1 ; break; +case 513 : nInt = -1 ; break; +case 514 : nInt = -1 ; break; +case 515 : nInt = -1 ; break; +case 516 : nInt = -1 ; break; +case 517 : nInt = -1 ; break; +case 518 : nInt = -1 ; break; +case 519 : nInt = -1 ; break; +case 520 : nInt = -1 ; break; +case 521 : nInt = -1 ; break; +case 522 : nInt = -1 ; break; +case 523 : nInt = -1 ; break; +case 524 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +case 525 : nInt = -1 ; break; +case 526 : nInt = -1 ; break; +case 527 : nInt = -1 ; break; +case 528 : nInt = -1 ; break; +case 529 : nInt = -1 ; break; +case 530 : nInt = -1 ; break; +case 531 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 584 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 619 : nInt = -1 ; break; +case 620 : nInt = -1 ; break; +case 621 : nInt = -1 ; break; +case 622 : nInt = -1 ; break; +case 623 : nInt = -1 ; break; +case 624 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +case 625 : nInt = -1 ; break; +case 626 : nInt = -1 ; break; +case 627 : nInt = -1 ; break; +case 628 : nInt = -1 ; break; +case 629 : nInt = -1 ; break; +case 630 : nInt = -1 ; break; +case 631 : nInt = -1 ; break; +case 632 : nInt = -1 ; break; +case 633 : nInt = -1 ; break; +case 634 : nInt = -1 ; break; +case 635 : nInt = -1 ; break; +case 636 : nInt = -1 ; break; +case 637 : nInt = -1 ; break; +case 638 : nInt = -1 ; break; +case 639 : nInt = -1 ; break; +case 640 : nInt = -1 ; break; +case 641 : nInt = -1 ; break; +case 642 : nInt = -1 ; break; +case 643 : nInt = -1 ; break; +case 644 : nInt = -1 ; break; +case 645 : nInt = -1 ; break; +case 646 : nInt = -1 ; break; +case 647 : nInt = -1 ; break; +case 648 : nInt = -1 ; break; +case 649 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +case 650 : nInt = -1 ; break; +case 651 : nInt = -1 ; break; +case 652 : nInt = -1 ; break; +case 653 : nInt = -1 ; break; +case 654 : nInt = -1 ; break; +case 655 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +case 709 : nInt = -1 ; break; +case 710 : nInt = -1 ; break; +case 711 : nInt = -1 ; break; +case 712 : nInt = -1 ; break; +case 713 : nInt = -1 ; break; +case 714 : nInt = -1 ; break; +case 715 : nInt = -1 ; break; +case 716 : nInt = -1 ; break; +case 717 : nInt = -1 ; break; +case 718 : nInt = -1 ; break; +case 719 : nInt = -1 ; break; +case 720 : nInt = -1 ; break; +case 721 : nInt = -1 ; break; +case 722 : nInt = -1 ; break; +case 723 : nInt = -1 ; break; +case 724 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +case 725 : nInt = -1 ; break; +case 726 : nInt = -1 ; break; +case 727 : nInt = -1 ; break; +case 728 : nInt = -1 ; break; +case 729 : nInt = -1 ; break; +case 730 : nInt = -1 ; break; +case 731 : nInt = -1 ; break; +case 732 : nInt = -1 ; break; +case 733 : nInt = -1 ; break; +case 734 : nInt = -1 ; break; +case 735 : nInt = -1 ; break; +case 736 : nInt = -1 ; break; +case 737 : nInt = -1 ; break; +case 738 : nInt = -1 ; break; +case 739 : nInt = -1 ; break; +case 740 : nInt = -1 ; break; +case 741 : nInt = -1 ; break; +case 742 : nInt = -1 ; break; +case 743 : nInt = -1 ; break; +case 744 : nInt = -1 ; break; +case 745 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 753 : nInt = -1 ; break; +case 754 : nInt = -1 ; break; +case 755 : nInt = -1 ; break; +case 756 : nInt = -1 ; break; +case 757 : nInt = -1 ; break; +case 758 : nInt = -1 ; break; +case 759 : nInt = -1 ; break; +case 760 : nInt = -1 ; break; +case 761 : nInt = -1 ; break; +case 762 : nInt = -1 ; break; +case 763 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 854 : nInt = -1 ; break; +case 868 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +case 879 : nInt = 1 ; break; +case 880 : nInt = 1 ; break; +case 881 : nInt = 1 ; break; +case 882 : nInt = 1 ; break; +case 883 : nInt = 5 ; break; +case 884 : nInt = 5 ; break; +case 885 : nInt = 7 ; break; +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 919 : nInt = 1 ; break; +case 920 : nInt = 1 ; break; +case 921 : nInt = 1 ; break; +case 922 : nInt = 1 ; break; +case 923 : nInt = 1 ; break; +case 924 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +case 925 : nInt = 1 ; break; +case 926 : nInt = 1 ; break; +case 927 : nInt = 1 ; break; +case 928 : nInt = 1 ; break; +case 929 : nInt = 1 ; break; +case 930 : nInt = 1 ; break; +case 931 : nInt = 1 ; break; +case 932 : nInt = 1 ; break; +case 933 : nInt = 1 ; break; +case 934 : nInt = 1 ; break; +case 935 : nInt = 1 ; break; +case 936 : nInt = 1 ; break; +case 937 : nInt = 1 ; break; +case 938 : nInt = 1 ; break; +case 939 : nInt = 1 ; break; +case 940 : nInt = 1 ; break; +case 941 : nInt = 1 ; break; +case 942 : nInt = 1 ; break; +case 943 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +case 955 : nInt = -1 ; break; +case 956 : nInt = -1 ; break; +case 958 : nInt = -1 ; break; +case 959 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +case 983 : nInt = 11 ; break; +case 996 : nInt = -1 ; break; +case 997 : nInt = -1 ; break; +case 999 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +case 1000 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +case 1071 : nInt = 13 ; break; +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + case CLASS_TYPE_HARPER: + switch(nFeat/250) + { + case 0: + switch(nFeat/25) + { + case 0: //0-24 + switch(nFeat){ +case 1 : nInt = -1 ; break; +case 3 : nInt = 1 ; break; +case 8 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 1: //25-49 + switch(nFeat){ +case 29 : nInt = -1 ; break; +case 41 : nInt = -1 ; break; +case 44 : nInt = -1 ; break; +case 45 : nInt = -1 ; break; +case 46 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 2: //50-74 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 3: //75-99 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 4: //100-124 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 5: //125-149 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 6: //150-174 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 7: //175-199 + switch(nFeat){ +case 197 : nInt = 1 ; break; +default : nInt = -2 ; break;}; break; + case 8: //200-224 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 9: //225-249 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//250 break + case 1: + switch(nFeat/25) + { + case 10: //250-274 + switch(nFeat){ +case 261 : nInt = -1 ; break; +case 262 : nInt = -1 ; break; +case 263 : nInt = -1 ; break; +case 264 : nInt = -1 ; break; +case 265 : nInt = -1 ; break; +case 266 : nInt = -1 ; break; +case 267 : nInt = -1 ; break; +case 268 : nInt = -1 ; break; +case 269 : nInt = -1 ; break; +case 270 : nInt = -1 ; break; +case 271 : nInt = -1 ; break; +case 272 : nInt = -1 ; break; +case 273 : nInt = -1 ; break; +case 274 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 11: //275-299 + switch(nFeat){ +case 275 : nInt = -1 ; break; +case 276 : nInt = -1 ; break; +case 277 : nInt = -1 ; break; +case 278 : nInt = -1 ; break; +case 279 : nInt = -1 ; break; +case 280 : nInt = -1 ; break; +case 281 : nInt = -1 ; break; +case 284 : nInt = -1 ; break; +case 285 : nInt = -1 ; break; +case 286 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 12: //300-324 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 13: //325-349 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 14: //350-374 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 15: //375-399 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 16: //400-424 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 17: //425-449 + switch(nFeat){ +case 437 : nInt = 2 ; break; +case 438 : nInt = 3 ; break; +case 439 : nInt = 4 ; break; +case 440 : nInt = 5 ; break; +case 441 : nInt = 2 ; break; +case 442 : nInt = 3 ; break; +case 443 : nInt = 4 ; break; +case 444 : nInt = 5 ; break; +default : nInt = -2 ; break;}; break; + case 18: //450-474 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 19: //475-499 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//500 break + case 2: + switch(nFeat/25) + { + case 20: //500-524 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 21: //525-549 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 22: //550-574 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 23: //575-599 + switch(nFeat){ +case 588 : nInt = -1 ; break; +case 589 : nInt = -1 ; break; +case 590 : nInt = -1 ; break; +case 591 : nInt = -1 ; break; +case 592 : nInt = -1 ; break; +case 593 : nInt = -1 ; break; +case 594 : nInt = -1 ; break; +case 595 : nInt = -1 ; break; +case 596 : nInt = -1 ; break; +case 597 : nInt = -1 ; break; +case 598 : nInt = -1 ; break; +case 599 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 24: //600-624 + switch(nFeat){ +case 601 : nInt = -1 ; break; +case 602 : nInt = -1 ; break; +case 603 : nInt = -1 ; break; +case 604 : nInt = -1 ; break; +case 605 : nInt = -1 ; break; +case 606 : nInt = -1 ; break; +case 607 : nInt = -1 ; break; +case 608 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 25: //625-649 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 26: //650-674 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 27: //675-699 + switch(nFeat){ +case 695 : nInt = -1 ; break; +case 696 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 28: //700-724 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 29: //725-749 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//750 break + case 3: + switch(nFeat/25) + { + case 30: //750-774 + switch(nFeat){ +case 764 : nInt = -1 ; break; +case 765 : nInt = -1 ; break; +case 766 : nInt = -1 ; break; +case 767 : nInt = -1 ; break; +case 768 : nInt = -1 ; break; +case 769 : nInt = -1 ; break; +case 770 : nInt = -1 ; break; +case 771 : nInt = -1 ; break; +case 772 : nInt = -1 ; break; +case 773 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 31: //775-799 + switch(nFeat){ +case 784 : nInt = -1 ; break; +case 785 : nInt = -1 ; break; +case 786 : nInt = -1 ; break; +case 787 : nInt = -1 ; break; +case 788 : nInt = -1 ; break; +case 789 : nInt = -1 ; break; +case 790 : nInt = -1 ; break; +case 791 : nInt = -1 ; break; +case 792 : nInt = -1 ; break; +case 793 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 32: //800-824 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 33: //825-849 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 34: //850-874 + switch(nFeat){ +case 870 : nInt = -1 ; break; +case 871 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 35: //875-899 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 36: //900-924 + switch(nFeat){ +case 913 : nInt = -1 ; break; +case 914 : nInt = -1 ; break; +case 917 : nInt = -1 ; break; +case 918 : nInt = -1 ; break; +default : nInt = -2 ; break;}; break; + case 37: //925-949 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 38: //950-974 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 39: //975-999 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1000 break + case 4: + switch(nFeat/25) + { + case 40: //1000-1024 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 41: //1025-1049 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + case 42: //1050-1071 + switch(nFeat){ +default : nInt = -2 ; break;}; break; + } + break;//1071 end break + } + return nInt; break;//class switch break///////////////////////////////// + default: return -3;//wrong class int was input +} +return -3;//wrong input type +} + +int GetIsGeneralFeat(int nFeat) +{ +int nReturn = FALSE; +if (nFeat < 250) + { + if (nFeat < 50) + { + if (nFeat < 10) + { + switch (nFeat) + { +case 0: nReturn = TRUE; break; +case 2: nReturn = TRUE; break; +case 3: nReturn = TRUE; break; +case 4: nReturn = TRUE; break; +case 5: nReturn = TRUE; break; +case 6: nReturn = TRUE; break; +case 7: nReturn = TRUE; break; +case 9: nReturn = TRUE; break; + } + } + else if (nFeat < 20) + { + switch (nFeat) + { +case 10: nReturn = TRUE; break; +case 11: nReturn = TRUE; break; +case 12: nReturn = TRUE; break; +case 14: nReturn = TRUE; break; +case 15: nReturn = TRUE; break; +case 16: nReturn = TRUE; break; +case 17: nReturn = TRUE; break; +case 18: nReturn = TRUE; break; +case 19: nReturn = TRUE; break; + } + } + else if (nFeat < 30) + { + switch (nFeat) + { +case 20: nReturn = TRUE; break; +case 21: nReturn = TRUE; break; +case 22: nReturn = TRUE; break; +case 23: nReturn = TRUE; break; +case 24: nReturn = TRUE; break; +case 25: nReturn = TRUE; break; +case 26: nReturn = TRUE; break; +case 27: nReturn = TRUE; break; +case 28: nReturn = TRUE; break; + } + } + else if (nFeat < 40) + { + switch (nFeat) + { +case 30: nReturn = TRUE; break; +case 31: nReturn = TRUE; break; +case 32: nReturn = TRUE; break; +case 33: nReturn = TRUE; break; +case 36: nReturn = TRUE; break; +case 37: nReturn = TRUE; break; +case 39: nReturn = TRUE; break; + } + } + else //<50 + { + switch (nFeat) + { +case 40: nReturn = TRUE; break; +case 42: nReturn = TRUE; break; +case 43: nReturn = TRUE; break; + } + } + } + else if (nFeat < 100) + { + if (nFeat < 60) + { + switch (nFeat) + { +case 52: nReturn = TRUE; break; +case 53: nReturn = TRUE; break; +case 54: nReturn = TRUE; break; +case 55: nReturn = TRUE; break; +case 56: nReturn = TRUE; break; +case 57: nReturn = TRUE; break; +case 58: nReturn = TRUE; break; +case 59: nReturn = TRUE; break; + } + } + else if (nFeat < 70) + { + switch (nFeat) + { +case 60: nReturn = TRUE; break; +case 61: nReturn = TRUE; break; +case 62: nReturn = TRUE; break; +case 63: nReturn = TRUE; break; +case 64: nReturn = TRUE; break; +case 65: nReturn = TRUE; break; +case 66: nReturn = TRUE; break; +case 67: nReturn = TRUE; break; +case 68: nReturn = TRUE; break; +case 69: nReturn = TRUE; break; + } + } + else if (nFeat < 80) + { + switch (nFeat) + { +case 70: nReturn = TRUE; break; +case 71: nReturn = TRUE; break; +case 72: nReturn = TRUE; break; +case 73: nReturn = TRUE; break; +case 74: nReturn = TRUE; break; +case 75: nReturn = TRUE; break; +case 76: nReturn = TRUE; break; +case 77: nReturn = TRUE; break; +case 78: nReturn = TRUE; break; +case 79: nReturn = TRUE; break; + } + } + else if (nFeat < 90) + { + switch (nFeat) + { +case 80: nReturn = TRUE; break; +case 82: nReturn = TRUE; break; +case 83: nReturn = TRUE; break; +case 84: nReturn = TRUE; break; +case 85: nReturn = TRUE; break; +case 87: nReturn = TRUE; break; +case 88: nReturn = TRUE; break; +case 89: nReturn = TRUE; break; + } + } + else //<100 + { + switch (nFeat) + { +case 90: nReturn = TRUE; break; +case 91: nReturn = TRUE; break; +case 92: nReturn = TRUE; break; +case 93: nReturn = TRUE; break; +case 94: nReturn = TRUE; break; +case 95: nReturn = TRUE; break; +case 96: nReturn = TRUE; break; +case 97: nReturn = TRUE; break; +case 98: nReturn = TRUE; break; +case 99: nReturn = TRUE; break; + } + } + } + else if (nFeat < 150) + { + if (nFeat < 110) + { + switch (nFeat) + { +case 100: nReturn = TRUE; break; +case 101: nReturn = TRUE; break; +case 102: nReturn = TRUE; break; +case 103: nReturn = TRUE; break; +case 104: nReturn = TRUE; break; +case 105: nReturn = TRUE; break; +case 106: nReturn = TRUE; break; +case 107: nReturn = TRUE; break; +case 108: nReturn = TRUE; break; +case 109: nReturn = TRUE; break; + } + } + else if (nFeat < 120) + { + switch (nFeat) + { +case 110: nReturn = TRUE; break; +case 111: nReturn = TRUE; break; +case 112: nReturn = TRUE; break; +case 113: nReturn = TRUE; break; +case 114: nReturn = TRUE; break; +case 115: nReturn = TRUE; break; +case 116: nReturn = TRUE; break; +case 117: nReturn = TRUE; break; +case 118: nReturn = TRUE; break; + } + } + else + { + switch (nFeat) + { +case 120: nReturn = TRUE; break; +case 121: nReturn = TRUE; break; +case 122: nReturn = TRUE; break; +case 123: nReturn = TRUE; break; +case 125: nReturn = TRUE; break; +case 126: nReturn = TRUE; break; +case 127: nReturn = TRUE; break; + } + } + } + else + { + if (nFeat < 180) + { + switch (nFeat) + { +case 173: nReturn = TRUE; break; +case 174: nReturn = TRUE; break; +case 175: nReturn = TRUE; break; +case 177: nReturn = TRUE; break; +case 178: nReturn = TRUE; break; +case 179: nReturn = TRUE; break; + } + } + else if (nFeat < 190) + { + switch (nFeat) + { +case 180: nReturn = TRUE; break; +case 181: nReturn = TRUE; break; +case 182: nReturn = TRUE; break; +case 183: nReturn = TRUE; break; +case 184: nReturn = TRUE; break; +case 185: nReturn = TRUE; break; +case 186: nReturn = TRUE; break; +case 187: nReturn = TRUE; break; +case 188: nReturn = TRUE; break; +case 189: nReturn = TRUE; break; + } + } + else //<200 + { + switch (nFeat) + { +case 190: nReturn = TRUE; break; +case 192: nReturn = TRUE; break; + + } + } + } + } +else if (nFeat < 500) + { + if (nFeat < 400) + { + if (nFeat < 380) + { + switch (nFeat) + { +case 377: nReturn = TRUE; break; +case 378: nReturn = TRUE; break; +case 379: nReturn = TRUE; break; + } + } + else if (nFeat < 390) + { + switch (nFeat) + { +case 380: nReturn = TRUE; break; +case 381: nReturn = TRUE; break; +case 382: nReturn = TRUE; break; +case 383: nReturn = TRUE; break; +case 384: nReturn = TRUE; break; +//case 385: nReturn = TRUE; break;//this is feat "Small Talk", deleted in NWN +case 386: nReturn = TRUE; break; +case 387: nReturn = TRUE; break; +case 388: nReturn = TRUE; break; +case 389: nReturn = TRUE; break; + } + } + else //<400 + { + switch (nFeat) + { +case 390: nReturn = TRUE; break; +case 391: nReturn = TRUE; break; +case 392: nReturn = TRUE; break; +case 393: nReturn = TRUE; break; +case 394: nReturn = TRUE; break; +case 395: nReturn = TRUE; break; +case 396: nReturn = TRUE; break; +case 397: nReturn = TRUE; break; +case 398: nReturn = TRUE; break; +case 399: nReturn = TRUE; break; + } + } + } + else if (nFeat < 450) + { + if (nFeat < 410) + { + switch (nFeat) + { +case 400: nReturn = TRUE; break; +case 401: nReturn = TRUE; break; +case 402: nReturn = TRUE; break; +//case 403: nReturn = TRUE; break;//this is feat "Mercantile Background", deleted in NWN +case 404: nReturn = TRUE; break; +case 406: nReturn = TRUE; break; +case 407: nReturn = TRUE; break; +case 408: nReturn = TRUE; break; +case 409: nReturn = TRUE; break; + } + } + else if (nFeat < 420) + { + switch (nFeat) + { +case 410: nReturn = TRUE; break; +case 411: nReturn = TRUE; break; +case 412: nReturn = TRUE; break; +case 415: nReturn = TRUE; break; +case 416: nReturn = TRUE; break; +case 417: nReturn = TRUE; break; +case 418: nReturn = TRUE; break; +case 419: nReturn = TRUE; break; + } + } + else if (nFeat < 430) + { + switch (nFeat) + { +case 420: nReturn = TRUE; break; +case 421: nReturn = TRUE; break; +case 422: nReturn = TRUE; break; +case 425: nReturn = TRUE; break; +case 426: nReturn = TRUE; break; +case 427: nReturn = TRUE; break; +case 428: nReturn = TRUE; break; +case 429: nReturn = TRUE; break; + } + } + else if (nFeat < 440) + { + switch (nFeat) + { +case 430: nReturn = TRUE; break; +case 431: nReturn = TRUE; break; + } + } + } + else //<500 + { + switch (nFeat) + { +case 490: nReturn = TRUE; break; +case 492: nReturn = TRUE; break; +case 493: nReturn = TRUE; break; +case 494: nReturn = TRUE; break; +case 495: nReturn = TRUE; break; +case 496: nReturn = TRUE; break; +case 497: nReturn = TRUE; break; +case 498: nReturn = TRUE; break; +case 499: nReturn = TRUE; break; + } + } + } +else if (nFeat < 750) + { + if (nFeat < 550) + { + if (nFeat < 510) + { + switch (nFeat) + { +case 500: nReturn = TRUE; break; +case 501: nReturn = TRUE; break; +case 502: nReturn = TRUE; break; +case 503: nReturn = TRUE; break; +case 504: nReturn = TRUE; break; +case 505: nReturn = TRUE; break; +case 506: nReturn = TRUE; break; +case 507: nReturn = TRUE; break; +case 508: nReturn = TRUE; break; +case 509: nReturn = TRUE; break; + } + } + else if (nFeat < 520) + { + switch (nFeat) + { +case 510: nReturn = TRUE; break; +case 511: nReturn = TRUE; break; +case 512: nReturn = TRUE; break; +case 513: nReturn = TRUE; break; +case 514: nReturn = TRUE; break; +case 515: nReturn = TRUE; break; +case 516: nReturn = TRUE; break; +case 517: nReturn = TRUE; break; +case 518: nReturn = TRUE; break; +case 519: nReturn = TRUE; break; + } + } + else if (nFeat < 530) + { + switch (nFeat) + { +case 520: nReturn = TRUE; break; +case 521: nReturn = TRUE; break; +case 522: nReturn = TRUE; break; +case 523: nReturn = TRUE; break; +case 524: nReturn = TRUE; break; +case 525: nReturn = TRUE; break; +case 526: nReturn = TRUE; break; +case 527: nReturn = TRUE; break; +case 528: nReturn = TRUE; break; +case 529: nReturn = TRUE; break; + } + } + else if (nFeat < 540) + { + switch (nFeat) + { +case 530: nReturn = TRUE; break; +case 531: nReturn = TRUE; break; +case 533: nReturn = TRUE; break; +case 534: nReturn = TRUE; break; +case 535: nReturn = TRUE; break; +case 536: nReturn = TRUE; break; +case 537: nReturn = TRUE; break; +case 538: nReturn = TRUE; break; +case 539: nReturn = TRUE; break; + } + } + else //<550 + { + switch (nFeat) + { +case 540: nReturn = TRUE; break; +case 541: nReturn = TRUE; break; +case 542: nReturn = TRUE; break; +case 543: nReturn = TRUE; break; +case 544: nReturn = TRUE; break; +case 545: nReturn = TRUE; break; +case 546: nReturn = TRUE; break; +case 547: nReturn = TRUE; break; +case 548: nReturn = TRUE; break; +case 549: nReturn = TRUE; break; + } + } + } + else if (nFeat < 600) + { + if (nFeat < 560) + { + switch (nFeat) + { +case 550: nReturn = TRUE; break; +case 551: nReturn = TRUE; break; +case 552: nReturn = TRUE; break; +case 553: nReturn = TRUE; break; +case 554: nReturn = TRUE; break; +case 555: nReturn = TRUE; break; +case 556: nReturn = TRUE; break; +case 557: nReturn = TRUE; break; +case 558: nReturn = TRUE; break; +case 559: nReturn = TRUE; break; + } + } + else if (nFeat < 570) + { + switch (nFeat) + { +case 560: nReturn = TRUE; break; +case 561: nReturn = TRUE; break; +case 562: nReturn = TRUE; break; +case 563: nReturn = TRUE; break; +case 564: nReturn = TRUE; break; +case 565: nReturn = TRUE; break; +case 566: nReturn = TRUE; break; +case 567: nReturn = TRUE; break; +case 568: nReturn = TRUE; break; +case 569: nReturn = TRUE; break; + } + } + else if (nFeat < 580) + { + switch (nFeat) + { +case 570: nReturn = TRUE; break; +case 571: nReturn = TRUE; break; +case 572: nReturn = TRUE; break; +case 573: nReturn = TRUE; break; +case 574: nReturn = TRUE; break; +case 575: nReturn = TRUE; break; +case 576: nReturn = TRUE; break; +case 577: nReturn = TRUE; break; +case 578: nReturn = TRUE; break; +case 579: nReturn = TRUE; break; + } + } + else if (nFeat < 590) + { + switch (nFeat) + { +case 580: nReturn = TRUE; break; +case 581: nReturn = TRUE; break; +case 582: nReturn = TRUE; break; +case 583: nReturn = TRUE; break; +case 584: nReturn = TRUE; break; +case 585: nReturn = TRUE; break; +case 586: nReturn = TRUE; break; +case 588: nReturn = TRUE; break; +case 589: nReturn = TRUE; break; + } + } + else //<600 + { + switch (nFeat) + { +case 590: nReturn = TRUE; break; +case 591: nReturn = TRUE; break; +case 592: nReturn = TRUE; break; +case 593: nReturn = TRUE; break; +case 594: nReturn = TRUE; break; +case 595: nReturn = TRUE; break; +case 596: nReturn = TRUE; break; +case 597: nReturn = TRUE; break; +case 598: nReturn = TRUE; break; +case 599: nReturn = TRUE; break; + } + } + } + else if (nFeat < 650) + { + if (nFeat < 610) + { + switch (nFeat) + { +case 601: nReturn = TRUE; break; +case 602: nReturn = TRUE; break; +case 603: nReturn = TRUE; break; +case 604: nReturn = TRUE; break; +case 605: nReturn = TRUE; break; +case 606: nReturn = TRUE; break; +case 607: nReturn = TRUE; break; +case 608: nReturn = TRUE; break; + } + } + else if (nFeat < 620) + { + switch (nFeat) + { +case 610: nReturn = TRUE; break; +case 611: nReturn = TRUE; break; +case 612: nReturn = TRUE; break; +case 613: nReturn = TRUE; break; +case 614: nReturn = TRUE; break; +case 615: nReturn = TRUE; break; +case 616: nReturn = TRUE; break; +case 617: nReturn = TRUE; break; +case 619: nReturn = TRUE; break; + } + } + else if (nFeat < 630) + { + switch (nFeat) + { +case 620: nReturn = TRUE; break; +case 621: nReturn = TRUE; break; +case 622: nReturn = TRUE; break; +case 623: nReturn = TRUE; break; +case 624: nReturn = TRUE; break; +case 625: nReturn = TRUE; break; +case 626: nReturn = TRUE; break; +case 627: nReturn = TRUE; break; +case 628: nReturn = TRUE; break; +case 629: nReturn = TRUE; break; + } + } + else if (nFeat < 640) + { + switch (nFeat) + { +case 630: nReturn = TRUE; break; +case 631: nReturn = TRUE; break; +case 632: nReturn = TRUE; break; +case 633: nReturn = TRUE; break; +case 634: nReturn = TRUE; break; +case 635: nReturn = TRUE; break; +case 636: nReturn = TRUE; break; +case 637: nReturn = TRUE; break; +case 638: nReturn = TRUE; break; +case 639: nReturn = TRUE; break; + } + } + else //<650 + { + switch (nFeat) + { +case 640: nReturn = TRUE; break; +case 641: nReturn = TRUE; break; +case 642: nReturn = TRUE; break; +case 643: nReturn = TRUE; break; +case 644: nReturn = TRUE; break; +case 645: nReturn = TRUE; break; +case 646: nReturn = TRUE; break; +case 647: nReturn = TRUE; break; +case 648: nReturn = TRUE; break; +case 649: nReturn = TRUE; break; + } + } + } + else if (nFeat < 700) + { + if (nFeat < 660) + { + switch (nFeat) + { +case 650: nReturn = TRUE; break; +case 651: nReturn = TRUE; break; +case 652: nReturn = TRUE; break; +case 653: nReturn = TRUE; break; +case 654: nReturn = TRUE; break; +case 655: nReturn = TRUE; break; + } + } + else //<700 + { + switch (nFeat) + { +case 695: nReturn = TRUE; break; +case 696: nReturn = TRUE; break; + } + } + } + else //<750 + { + if (nFeat < 710) + { + switch (nFeat) + { +case 709: nReturn = TRUE; break; + } + } + else if (nFeat < 720) + { + switch (nFeat) + { +case 710: nReturn = TRUE; break; +case 711: nReturn = TRUE; break; +case 712: nReturn = TRUE; break; +case 713: nReturn = TRUE; break; +case 714: nReturn = TRUE; break; +case 715: nReturn = TRUE; break; +case 716: nReturn = TRUE; break; +case 717: nReturn = TRUE; break; +case 718: nReturn = TRUE; break; +case 719: nReturn = TRUE; break; + } + } + else if (nFeat < 730) + { + switch (nFeat) + { +case 720: nReturn = TRUE; break; +case 721: nReturn = TRUE; break; +case 722: nReturn = TRUE; break; +case 723: nReturn = TRUE; break; +case 724: nReturn = TRUE; break; +case 725: nReturn = TRUE; break; +case 726: nReturn = TRUE; break; +case 727: nReturn = TRUE; break; +case 728: nReturn = TRUE; break; +case 729: nReturn = TRUE; break; + } + } + else if (nFeat < 740) + { + switch (nFeat) + { +case 730: nReturn = TRUE; break; +case 731: nReturn = TRUE; break; +case 732: nReturn = TRUE; break; +case 733: nReturn = TRUE; break; +case 734: nReturn = TRUE; break; +case 735: nReturn = TRUE; break; +case 736: nReturn = TRUE; break; +case 737: nReturn = TRUE; break; +case 738: nReturn = TRUE; break; +case 739: nReturn = TRUE; break; + } + } + else //750 + { + switch (nFeat) + { +case 740: nReturn = TRUE; break; +case 741: nReturn = TRUE; break; +case 742: nReturn = TRUE; break; +case 743: nReturn = TRUE; break; +case 744: nReturn = TRUE; break; +case 745: nReturn = TRUE; break; +case 747: nReturn = TRUE; break; +case 748: nReturn = TRUE; break; +case 749: nReturn = TRUE; break; + } + } + } + } +else + { + if (nFeat < 800) + { + if (nFeat < 760) + { + switch (nFeat) + { +case 750: nReturn = TRUE; break; +case 751: nReturn = TRUE; break; +case 752: nReturn = TRUE; break; +case 753: nReturn = TRUE; break; +case 754: nReturn = TRUE; break; +case 755: nReturn = TRUE; break; +case 756: nReturn = TRUE; break; +case 757: nReturn = TRUE; break; +case 758: nReturn = TRUE; break; +case 759: nReturn = TRUE; break; + } + } + else if (nFeat < 770) + { + switch (nFeat) + { +case 760: nReturn = TRUE; break; +case 761: nReturn = TRUE; break; +case 762: nReturn = TRUE; break; +case 763: nReturn = TRUE; break; +case 764: nReturn = TRUE; break; +case 765: nReturn = TRUE; break; +case 766: nReturn = TRUE; break; +case 767: nReturn = TRUE; break; +case 768: nReturn = TRUE; break; +case 769: nReturn = TRUE; break; + } + } + else if (nFeat < 780) + { + switch (nFeat) + { +case 770: nReturn = TRUE; break; +case 771: nReturn = TRUE; break; +case 772: nReturn = TRUE; break; +case 773: nReturn = TRUE; break; +case 774: nReturn = TRUE; break; +case 775: nReturn = TRUE; break; +case 776: nReturn = TRUE; break; +case 777: nReturn = TRUE; break; +case 778: nReturn = TRUE; break; +case 779: nReturn = TRUE; break; + } + } + else if (nFeat < 790) + { + switch (nFeat) + { +case 780: nReturn = TRUE; break; +case 781: nReturn = TRUE; break; +case 782: nReturn = TRUE; break; +case 783: nReturn = TRUE; break; +case 784: nReturn = TRUE; break; +case 785: nReturn = TRUE; break; +case 786: nReturn = TRUE; break; +case 787: nReturn = TRUE; break; +case 788: nReturn = TRUE; break; +case 789: nReturn = TRUE; break; + } + } + else //<800 + { + switch (nFeat) + { +case 790: nReturn = TRUE; break; +case 791: nReturn = TRUE; break; +case 792: nReturn = TRUE; break; +case 793: nReturn = TRUE; break; +case 794: nReturn = TRUE; break; +case 795: nReturn = TRUE; break; +case 796: nReturn = TRUE; break; +case 797: nReturn = TRUE; break; +case 798: nReturn = TRUE; break; +case 799: nReturn = TRUE; break; + } + } + } + else if (nFeat < 850) + { + if (nFeat < 810) + { + switch (nFeat) + { +case 800: nReturn = TRUE; break; +case 801: nReturn = TRUE; break; +case 802: nReturn = TRUE; break; +case 803: nReturn = TRUE; break; +case 804: nReturn = TRUE; break; +case 805: nReturn = TRUE; break; +case 806: nReturn = TRUE; break; +case 807: nReturn = TRUE; break; +case 808: nReturn = TRUE; break; +case 809: nReturn = TRUE; break; + } + } + else if (nFeat < 820) + { + switch (nFeat) + { +case 810: nReturn = TRUE; break; +case 811: nReturn = TRUE; break; +case 812: nReturn = TRUE; break; +case 813: nReturn = TRUE; break; +case 814: nReturn = TRUE; break; +case 815: nReturn = TRUE; break; +case 816: nReturn = TRUE; break; +case 817: nReturn = TRUE; break; +case 818: nReturn = TRUE; break; +case 819: nReturn = TRUE; break; + } + } + else if (nFeat < 830) + { + switch (nFeat) + { +case 820: nReturn = TRUE; break; +case 821: nReturn = TRUE; break; +case 822: nReturn = TRUE; break; +case 823: nReturn = TRUE; break; + } + } + else //<850 + { + switch (nFeat) + { +case 844: nReturn = TRUE; break; + } + } + } + else if (nFeat < 900) + { + if (nFeat < 860) + { + switch (nFeat) + { +case 856: nReturn = TRUE; break; + } + } + else + { + switch (nFeat) + { +case 867: nReturn = TRUE; break; +case 868: nReturn = TRUE; break; + } + } + } + else if (nFeat < 950) + { + if (nFeat < 920) + { + switch (nFeat) + { +case 910: nReturn = TRUE; break; +case 911: nReturn = TRUE; break; +case 912: nReturn = TRUE; break; +case 913: nReturn = TRUE; break; +case 914: nReturn = TRUE; break; +case 915: nReturn = TRUE; break; +case 916: nReturn = TRUE; break; +case 917: nReturn = TRUE; break; +case 918: nReturn = TRUE; break; + } + } + } + else + { + if (nFeat < 960) + { + switch (nFeat) + { +case 952: nReturn = TRUE; break; +case 954: nReturn = TRUE; break; +case 955: nReturn = TRUE; break; +case 956: nReturn = TRUE; break; +case 958: nReturn = TRUE; break; + } + } + else //<1000 + { + switch (nFeat) + { +case 993: nReturn = TRUE; break; +case 995: nReturn = TRUE; break; +case 996: nReturn = TRUE; break; +case 997: nReturn = TRUE; break; +case 999: nReturn = TRUE; break; + } + } + } + } +return nReturn; +} + +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_removed files/hgll_const_inc.nss b/_removed files/hgll_const_inc.nss new file mode 100644 index 00000000..d6e9f563 --- /dev/null +++ b/_removed files/hgll_const_inc.nss @@ -0,0 +1,39 @@ +// This lists all of the constant ints that are to be used for LL + +// This is the path to your servervault. It must be set correctly for Letoscript to work. +const string NWNPATH = "C:/NeverwinterNights/NWN/servervault/";//windows sample +// const string NWNPATH = "/home/funkyswerve/nwn/servervault/";//linux sample + +const int PHOENIX = FALSE;//set this to true if you are using the older version of Letoscript, 3-18, rather than the newer 3-24 (other versions are 'bridge' versions with bugs) + +const int DEBUG = FALSE;//set this to TRUE to enable debugging + +const int DEV_CRIT_DISABLED = FALSE;//set this to TRUE to disable devastating critical feat selection on levelup + +// Experience Requirements for Legendary Levels +// Adjust as desired. These were set by increasing the additional amount required for the +// previous level by 25%. Level 40 required 39000 experience points, so Level 41 was set +// to require 39000 x 1.25 = 48800 experience points. This will be ALOT on some worlds, +// and not enough on others, so adjust to suit your needs + +const int BASE_XP_LVL_40 = 780000; +const int XP_REQ_LVL41 = 821000; +const int XP_REQ_LVL42 = 863000; +const int XP_REQ_LVL43 = 900000; +const int XP_REQ_LVL44 = 100000; +const int XP_REQ_LVL45 = 1100000; +const int XP_REQ_LVL46 = 1200000; +const int XP_REQ_LVL47 = 1300000; +const int XP_REQ_LVL48 = 1400000; +const int XP_REQ_LVL49 = 1600000; +const int XP_REQ_LVL50 = 1800000; +const int XP_REQ_LVL51 = 2200000; +const int XP_REQ_LVL52 = 2400000; +const int XP_REQ_LVL53 = 2600000; +const int XP_REQ_LVL54 = 2800000; +const int XP_REQ_LVL55 = 3000000; +const int XP_REQ_LVL56 = 3400000; +const int XP_REQ_LVL57 = 3800000; +const int XP_REQ_LVL58 = 4200000; +const int XP_REQ_LVL59 = 4600000; +const int XP_REQ_LVL60 = 5000000; diff --git a/_removed files/hgll_featreq_inc.nss b/_removed files/hgll_featreq_inc.nss new file mode 100644 index 00000000..bc104321 --- /dev/null +++ b/_removed files/hgll_featreq_inc.nss @@ -0,0 +1,4202 @@ +//--------------------------------DECLARATIONS--------------------------------// + +// This function determines what class controls the character's advancement during legendary +// levels. First it checks the character's It returns the class type with the most levels. +// If the character has two classes that tie for most number of levels, it will return the +// class the character took first. It returns -1 on an error. +int GetControlClass(object oPC); +// This function returns the cost of taking a certain skill based on the class. Return +// values are: 1 for class skill, 2 for cross-class skill, -1 for class forbidden skill (default), +// and -2 for CLASS_TYPE input error. The switches essentially reconstruct the 2da. They also +// conveniently mirror the skill chart order in the HotU book. This allows users to alter skill +// costs and availabilities, and is faster than a 2da or int cache lookup. +int GetCostOfSkill(int nClass, int nSkill); +// This function returns TRUE if the PC has the stat or stats required to take nFeat, +// or if nFeat has no required stats. +int GetAreFeatStatReqsMet(int nFeat, object oPC); +// This function returns TRUE if the PC has the skill or skills required to take nFeat, +// or if nFeat has no required skills. +int GetAreFeatSkillReqsMet(int nFeat, object oPC); +// This function returns TRUE if the PC has the feat or feats required to take nFeat, +// or if nFeat has no required feats. +int GetAreFeatFeatReqsMet(int nFeat, object oPC); +// This function returns TRUE if the feat is only available at first level. Returns -3 on error. +int GetIsFeatFirstLevelOnly(int nFeat); +// This function returns true if a feat is of the devastating critical type. +int GetIsFeatDevCrit(int nFeat); +// This function returns TRUE if the PC has the ability to cast spells of the level required +// by the feat specified. It returns TRUE if the feat has no spell level requirement, and +// always returns FALSE for Sap. +int GetHasRequiredSpellLevelForFeat(object oPC, int nFeat); +// This function returns the name of the designated feat. +string GetNameOfFeat(int nFeat); +// This function returns TRUE if the feat is restricted to a limited number of uses per day. +int GetIsFeatLimitedUses(int nFeat); + +//----------------------------------FUNCTIONS---------------------------------// + +int GetControlClass(object oPC) +{ +int nL1 = GetLevelByPosition(1, oPC); +int nL2 = GetLevelByPosition(2, oPC); +int nL3 = GetLevelByPosition(3, oPC); +//class 1 highest +if ((nL1 > nL2) && (nL1 > nL3)) return GetClassByPosition(1, oPC); +//class 2 highest +else if ((nL2 > nL1) && (nL2 > nL3)) return GetClassByPosition(2, oPC); +//class 3 highest +else if ((nL3 > nL1) && (nL3 > nL2)) return GetClassByPosition(3, oPC); +//class 1 and 2 tied for highest +else if (nL1 == nL2) return GetClassByPosition(1, oPC); +//class 1 and 3 tied for highest +else if (nL1 == nL3) return GetClassByPosition(1, oPC); +//class 2 and 3 tied for highest +else if (nL2 == nL3) return GetClassByPosition(2, oPC); +//return -1 on error +else return -1; +} + +int GetCostOfSkill(int nClass, int nSkill) +{ +switch(nClass) //These switches essentially reconstruct the 2da. They also conveniently mirror + { //the skill chart order in the HotU book. This allows users to alter skill costs + //and availabilities as well, and is faster than a 2da or int cache lookup. + case 0://barbarian + switch(nSkill){ + case 0: return -1; break;//animal empathy + case 1: return 2; break;//concentration + case 2: return 2; break;//disable trap + case 3: return 1; break;//discipline + case 4: return 1; break;//heal + case 5: return 2; break;//hide + case 6: return 1; break;//listen + case 7: return 1; break;//lore + case 8: return 2; break;//move silently + case 9: return 2; break;//open lock + case 10: return 1; break;//parry + case 11: return -1; break;//perform + case 12: return 2; break;//persuade + case 13: return 2; break;//pick pocket + case 14: return 2; break;//search + case 15: return 2; break;//set trap + case 16: return 2; break;//spellcraft + case 17: return 2; break;//spot + case 18: return 1; break;//taunt + case 19: return -1; break;//UMD + case 20: return 2; break;//appraise + case 21: return 2; break;//tumble + case 22: return 1; break;//craft trap + case 23: return 2; break;//bluff + case 24: return 1; break;//intimidate + case 25: return 1; break;//craft armor + case 26: return 1; break;//craft weapon + default: return -1; + } + case 1://bard + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return 1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 1; break; + case 19: return 1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 2://cleric + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 3://druid + switch(nSkill){ + case 0: return 1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 4://fighter + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 5://monk + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 6://paladin + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 1; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 7://ranger + switch(nSkill){ + case 0: return 1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 1; break; + case 15: return 1; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 8://rogue + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 1; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 1; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 1; break; + case 15: return 1; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return 1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 1; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 9://sorceror + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 10://wizard + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 27://shadowdancer + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 1; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 1; break; + case 22: return 2; break; + case 23: return 1; break; + case 24: return 2; break; + case 25: return 2; break; + case 26: return 2; break; + default: return -1; + } + case 28://harper scout + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 1; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 29://arcane archer + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 30://assassin + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 1; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 1; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 1; break; + case 14: return 1; break; + case 15: return 1; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return 1; break;//UMD + case 20: return 1; break; + case 21: return 1; break; + case 22: return 1; break; + case 23: return 1; break; + case 24: return 1; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 31://blackguard + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 2; break; + case 18: return 1; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 1; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 32://CoT + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 2; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 33://weaponmaster + switch(nSkill){ + case 0: return -1; break; + case 1: return 2; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 2; break; + case 23: return 2; break; + case 24: return 1; break; + case 25: return 2; break; + case 26: return 2; break; + default: return -1; + } + case 34://palemaster + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 1; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 2; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 35://shifter + switch(nSkill){ + case 0: return 1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 2; break; + case 4: return 1; break; + case 5: return 1; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 2; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 36://dwarven defender + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 2; break; + case 13: return 2; break; + case 14: return 2; break; + case 15: return 2; break; + case 16: return 2; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + case 37://dragon disciple + switch(nSkill){ + case 0: return -1; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 1; break; + case 4: return 1; break; + case 5: return 2; break; + case 6: return 1; break; + case 7: return 1; break; + case 8: return 2; break; + case 9: return 2; break; + case 10: return 1; break; + case 11: return -1; break;//perform + case 12: return 1; break; + case 13: return 2; break; + case 14: return 1; break; + case 15: return 2; break; + case 16: return 1; break; + case 17: return 1; break; + case 18: return 2; break; + case 19: return -1; break;//UMD + case 20: return 2; break; + case 21: return 2; break; + case 22: return 1; break; + case 23: return 2; break; + case 24: return 2; break; + case 25: return 1; break; + case 26: return 1; break; + default: return -1; + } + default: return -2; + } +return -3; +} + +int GetAreFeatStatReqsMet(int nFeat, object oPC) +{ +int nStr = TRUE; +int nDex = TRUE; +int nCon = TRUE; +int nInt = TRUE; +int nWis = TRUE; +int nCha = TRUE; +if (nFeat < 495) + { + if (nFeat < 35) + { + switch(nFeat) + { +case 1: nDex = (GetLocalInt(oPC, "BASE_DEX") >=15); break; +case 6: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 8: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 9: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 10: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 16: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 17: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 18: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 19: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 26: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 28: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 30: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; + } + } + else + { + switch(nFeat) + { +case 38: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 39: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); nWis = (GetLocalInt(oPC, "BASE_WIS") >=13); break; +case 389: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 390: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 391: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; +case 392: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; +case 409: nDex = (GetLocalInt(oPC, "BASE_DEX") >=15); break; +case 412: nWis = (GetLocalInt(oPC, "BASE_WIS") >=13); break; +case 413: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); nCha = (GetLocalInt(oPC, "BASE_CHA") >=13); break; +case 414: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); nCha = (GetLocalInt(oPC, "BASE_CHA") >=13); break; +case 491: nDex = (GetLocalInt(oPC, "BASE_DEX") >=25); break; +case 492: nCon = (GetLocalInt(oPC, "BASE_CON") >=21); break; + } + } + } +else if (nFeat < 532) + { + if (nFeat < 513) + { + switch(nFeat) + { +case 495: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 496: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 497: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 498: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 499: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 500: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 501: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 502: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 503: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 504: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 505: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 506: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 507: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 508: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 509: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 510: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 511: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 512: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; + } + } + else + { + switch(nFeat) + { +case 513: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 514: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 515: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 516: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 517: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 518: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 519: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 520: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 521: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 522: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 523: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 524: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 525: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 526: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 527: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 528: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 529: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 530: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 531: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; + } + } + } +else if (nFeat < 746) + { + if (nFeat < 727) + { + switch(nFeat) + { +case 697: nWis = (GetLocalInt(oPC, "BASE_WIS") >=21); break; +case 709: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 710: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 711: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 712: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 713: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 714: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 715: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 716: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 717: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 718: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 719: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 720: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 721: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 722: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 723: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 724: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 725: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 726: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; + } + } + else + { + switch(nFeat) + { +case 727: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 728: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 729: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 730: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 731: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 732: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 733: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 734: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 735: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 736: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 737: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 738: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 739: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 740: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 741: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 742: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 743: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 744: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 745: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; + } + } + } +else + { + if (nFeat < 840) + { + switch(nFeat) + { +case 747: nCon = (GetLocalInt(oPC, "BASE_CON") >=25); break; +case 748: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 749: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 750: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 751: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 752: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; +case 824: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 825: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 826: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 827: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 828: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 829: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 830: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 831: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 832: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 833: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; + } + } + else + { + switch(nFeat) + { +case 844: nDex = (GetLocalInt(oPC, "BASE_DEX") >=19); nWis = (GetLocalInt(oPC, "BASE_WIS") >=19); break; +case 854: nWis = (GetLocalInt(oPC, "BASE_WIS") >=25); nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; +case 856: nDex = (GetLocalInt(oPC, "BASE_DEX") >=25); break; +case 867: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; +case 868: nDex = (GetLocalInt(oPC, "BASE_DEX") >=23); break; +case 869: nStr = (GetLocalInt(oPC, "BASE_STR") >=21); nCon = (GetLocalInt(oPC, "BASE_CON") >=21); break; +case 873: nWis = (GetLocalInt(oPC, "BASE_WIS") >=30); break; +case 955: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 958: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 988: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 996: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; +case 999: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; +case 1060: nWis = (GetLocalInt(oPC, "BASE_WIS") >=25); break; +case 1061: nWis = (GetLocalInt(oPC, "BASE_WIS") >=27); break; + } + } + } +return (nStr && nDex && nCon && nInt && nWis && nCha); +} + +int GetAreFeatSkillReqsMet(int nFeat, object oPC) +{ +int nReturn = TRUE; +if (nFeat < 200) + { + if (nFeat < 180) + { + switch(nFeat) + { +case 34: nReturn = (GetCostOfSkill(GetControlClass(oPC), 0) > 0); break; +case 173: nReturn = (GetCostOfSkill(GetControlClass(oPC), 1) > 0); break; +case 174: nReturn = (GetCostOfSkill(GetControlClass(oPC), 2) > 0); break; +case 175: nReturn = (GetCostOfSkill(GetControlClass(oPC), 3) > 0); break; +case 177: nReturn = (GetCostOfSkill(GetControlClass(oPC), 4) > 0); break; +case 178: nReturn = (GetCostOfSkill(GetControlClass(oPC), 5) > 0); break; +case 179: nReturn = (GetCostOfSkill(GetControlClass(oPC), 6) > 0); break; + } + } + else + { + switch(nFeat) + { +case 180: nReturn = (GetCostOfSkill(GetControlClass(oPC), 7) > 0); break; +case 181: nReturn = (GetCostOfSkill(GetControlClass(oPC), 8) > 0); break; +case 182: nReturn = (GetCostOfSkill(GetControlClass(oPC), 9) > 0); break; +case 183: nReturn = (GetCostOfSkill(GetControlClass(oPC), 10) > 0); break; +case 184: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 185: nReturn = (GetCostOfSkill(GetControlClass(oPC), 12) > 0); break; +case 186: nReturn = (GetCostOfSkill(GetControlClass(oPC), 13) > 0); break; +case 187: nReturn = (GetCostOfSkill(GetControlClass(oPC), 14) > 0); break; +case 188: nReturn = (GetCostOfSkill(GetControlClass(oPC), 15) > 0); break; +case 189: nReturn = (GetCostOfSkill(GetControlClass(oPC), 16) > 0); break; +case 190: nReturn = (GetCostOfSkill(GetControlClass(oPC), 17) > 0); break; +case 192: nReturn = (GetCostOfSkill(GetControlClass(oPC), 18) > 0); break; +case 193: nReturn = (GetCostOfSkill(GetControlClass(oPC), 19) > 0); break; + } + } + } +else if (nFeat < 600) + { + if (nFeat < 590) + { + switch(nFeat) + { +case 378: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 404: nReturn = (GetCostOfSkill(GetControlClass(oPC), 20) > 0); break; +case 406: nReturn = (GetCostOfSkill(GetControlClass(oPC), 21) > 0); break; +case 407: nReturn = (GetCostOfSkill(GetControlClass(oPC), 22) > 0); break; +case 423: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 424: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; +case 587: nReturn = (GetLocalInt(oPC, "BASE_ANIMAL") > 19); break; +case 588: nReturn = (GetLocalInt(oPC, "BASE_APPRAI") > 19); break; +case 589: nReturn = (GetLocalInt(oPC, "BASE_CONCEN") > 19); break; + } + } + else + { + switch(nFeat) + { +case 590: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_T") > 19); break; +case 591: nReturn = (GetLocalInt(oPC, "BASE_DISABL") > 19); break; +case 592: nReturn = (GetLocalInt(oPC, "BASE_DISCIP") > 19); break; +case 593: nReturn = (GetLocalInt(oPC, "BASE_HEAL") > 19); break; +case 594: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 19); break; +case 595: nReturn = (GetLocalInt(oPC, "BASE_LISTEN") > 19); break; +case 596: nReturn = (GetLocalInt(oPC, "BASE_LORE") > 19); break; +case 597: nReturn = (GetLocalInt(oPC, "BASE_MOVE_S") > 19); break; +case 598: nReturn = (GetLocalInt(oPC, "BASE_OPEN_L") > 19); break; +case 599: nReturn = (GetLocalInt(oPC, "BASE_PARRY") > 19); break; + } + } + } +else if (nFeat < 860) + { + if (nFeat < 610) + { + switch(nFeat) + { +case 600: nReturn = (GetLocalInt(oPC, "BASE_PERFOR") > 19); break; +case 601: nReturn = (GetLocalInt(oPC, "BASE_PERSUA") > 19); break; +case 602: nReturn = (GetLocalInt(oPC, "BASE_PICK_P") > 19); break; +case 603: nReturn = (GetLocalInt(oPC, "BASE_SEARCH") > 19); break; +case 604: nReturn = (GetLocalInt(oPC, "BASE_SET_TR") > 19); break; +case 605: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 19); break; +case 606: nReturn = (GetLocalInt(oPC, "BASE_SPOT") > 19); break; +case 607: nReturn = (GetLocalInt(oPC, "BASE_TAUNT") > 19); break; +case 608: nReturn = (GetLocalInt(oPC, "BASE_TUMBLE") > 19); break; +case 609: nReturn = (GetLocalInt(oPC, "BASE_USE_MA") > 19); break; + } + } + else + { + switch(nFeat) + { +case 696: nReturn = (GetLocalInt(oPC, "BASE_CONCEN") > 24); break; +case 748: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 749: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 750: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 751: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 752: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; +case 856: nReturn = (GetLocalInt(oPC, "BASE_TUMBLE") > 29); break; +case 857: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; +case 858: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; +case 859: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; + } + } + } +else + { + if (nFeat < 900) + { + switch(nFeat) + { +case 860: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; +case 861: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; +case 862: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; +case 863: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; +case 864: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; +case 865: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; +case 870: nReturn = (GetLocalInt(oPC, "BASE_PERFOR") > 24); break; +case 874: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 14); break; +case 875: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 21); break; +case 876: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 31); break; +case 877: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 25); break; +case 878: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 24); break; + } + } + else + { + switch(nFeat) + { +case 911: nReturn = (GetCostOfSkill(GetControlClass(oPC), 25) > 0); break; +case 912: nReturn = (GetCostOfSkill(GetControlClass(oPC), 26) > 0); break; +case 913: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_A") > 19); break; +case 914: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_W") > 19); break; +case 915: nReturn = (GetCostOfSkill(GetControlClass(oPC), 23) > 0); break; +case 916: nReturn = (GetCostOfSkill(GetControlClass(oPC), 24) > 0); break; +case 917: nReturn = (GetLocalInt(oPC, "BASE_BLUFF") > 19); break; +case 918: nReturn = (GetLocalInt(oPC, "BASE_INTIMI") > 19); break; +case 989: nReturn = (GetLocalInt(oPC, "BASE_INTIMI") > 24); break; +case 990: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 33); break; + } + } + } +return nReturn; +} + +int GetAreFeatFeatReqsMet(int nFeat, object oPC) +{ +int nPRF1 = 1, nPRF2 = 1, nORF1 = 1, nORF2 = 0, nORF3 = 0, nORF4 = 0, nORF5 = 0;//these match columns from the 2da +if (nFeat < 250)//nORF1 defaults to true so that feats without "Or Feat" Requirements will return for them + { //Likewise nPRF1 & 2 default to true for feats that have no prerequisite feats + if (nFeat < 50) + { + if (nFeat < 10) + { + switch (nFeat) + { +case 2: nPRF1 = GetHasFeat(3, oPC); nPRF2 = GetHasFeat(4, oPC); break; +case 4: nPRF1 = GetHasFeat(3, oPC); break; +case 6: nPRF1 = GetHasFeat(28, oPC); break; +case 8: nPRF1 = GetHasFeat(21, oPC); break; + } + } + else if (nFeat < 20) + { + switch (nFeat) + { +case 13: nPRF1 = GetHasFeat(294, oPC); break; +case 15: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 16: nPRF1 = GetHasFeat(9, oPC); break; +case 17: nPRF1 = GetHasFeat(23, oPC); break; +case 19: nPRF1 = GetHasFeat(28, oPC); break; + + } + } + else if (nFeat < 30) + { + switch (nFeat) + { +case 20: nPRF1 = GetHasFeat(41, oPC); nPRF2 = GetHasFeat(1, oPC); break; +case 26: nPRF1 = GetHasFeat(10, oPC); break; + } + } + else if (nFeat < 40) + { + switch (nFeat) + { +case 30: nPRF1 = GetHasFeat(27, oPC); break; +case 31: nPRF1 = GetHasFeat(5, oPC); break; +case 38: nPRF1 = GetHasFeat(31, oPC); break; +case 39: nPRF1 = GetHasFeat(21, oPC); break; + } + } + else //<50 + { + switch (nFeat) + { +case 43: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 47: nPRF1 = GetHasFeat(43, oPC); break; + } + } + } + else if (nFeat < 100) + { + if (nFeat < 60) + { + switch (nFeat) + { +case 52: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 53: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 54: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 55: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 56: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 57: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 58: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 59: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; + } + } + else if (nFeat < 70) + { + switch (nFeat) + { +case 60: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 61: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); break; +case 63: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 64: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 65: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 66: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 67: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 68: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 69: nPRF1 = GetHasFeat(45, oPC); break; + } + } + else if (nFeat < 80) + { + switch (nFeat) + { +case 70: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); break; +case 71: nPRF1 = GetHasFeat(45, oPC); break; +case 72: nPRF1 = GetHasFeat(45, oPC); break; +case 73: nPRF1 = GetHasFeat(45, oPC); break; +case 74: nPRF1 = GetHasFeat(45, oPC); break; +case 75: nPRF1 = GetHasFeat(45, oPC); break; +case 76: nPRF1 = GetHasFeat(45, oPC); break; +case 77: nPRF1 = GetHasFeat(45, oPC); break; +case 78: nPRF1 = GetHasFeat(45, oPC); break; +case 79: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; + } + } + else if (nFeat < 90) + { + switch (nFeat) + { +case 80: nPRF1 = GetHasFeat(44, oPC); break; +case 81: nPRF1 = GetHasFeat(44, oPC); break; +case 82: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; +case 83: nPRF1 = GetHasFeat(44, oPC); break; +case 84: nPRF1 = GetHasFeat(44, oPC); break; +case 85: nORF1 = GetHasFeat(44, oPC); break; +case 86: nPRF1 = GetHasFeat(44, oPC); break; +case 87: nPRF1 = GetHasFeat(44, oPC); break; +case 88: nPRF1 = GetHasFeat(44, oPC); break; +case 89: nPRF1 = GetHasFeat(44, oPC); break; + } + } + else //<100 + { + switch (nFeat) + { +case 90: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 91: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 92: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 93: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; +case 94: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 95: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 96: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; +case 97: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 98: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 99: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); break; + } + } + } + else if (nFeat < 150) + { + if (nFeat < 110) + { + switch (nFeat) + { +case 101: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 102: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 103: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); break; +case 104: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; +case 105: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(48, oPC); break; +case 106: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; +case 107: nPRF1 = GetHasFeat(45, oPC); break; +case 108: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); break; +case 109: nPRF1 = GetHasFeat(45, oPC); break; + } + } + else if (nFeat < 120) + { + switch (nFeat) + { +case 110: nPRF1 = GetHasFeat(45, oPC); break; +case 111: nPRF1 = GetHasFeat(45, oPC); break; +case 112: nPRF1 = GetHasFeat(45, oPC); break; +case 113: nPRF1 = GetHasFeat(45, oPC); break; +case 114: nPRF1 = GetHasFeat(45, oPC); break; +case 115: nPRF1 = GetHasFeat(45, oPC); break; +case 116: nPRF1 = GetHasFeat(45, oPC); break; +case 117: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; +case 118: nPRF1 = GetHasFeat(44, oPC); break; +case 119: nPRF1 = GetHasFeat(44, oPC); break; + } + } + else if (nFeat < 130) + { + switch (nFeat) + { +case 120: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; +case 121: nPRF1 = GetHasFeat(44, oPC); break; +case 122: nPRF1 = GetHasFeat(44, oPC); break; +case 123: nPRF1 = GetHasFeat(44, oPC); break; +case 124: nPRF1 = GetHasFeat(44, oPC); break; +case 125: nPRF1 = GetHasFeat(44, oPC); break; +case 126: nPRF1 = GetHasFeat(44, oPC); break; +case 127: nPRF1 = GetHasFeat(44, oPC); break; +case 128: nPRF1 = GetHasFeat(90, oPC); break; +case 129: nPRF1 = GetHasFeat(91, oPC); break; + } + } + else if (nFeat < 140) + { + switch (nFeat) + { +case 130: nPRF1 = GetHasFeat(92, oPC); break; +case 131: nPRF1 = GetHasFeat(93, oPC); break; +case 132: nPRF1 = GetHasFeat(94, oPC); break; +case 133: nPRF1 = GetHasFeat(95, oPC); break; +case 134: nPRF1 = GetHasFeat(96, oPC); break; +case 135: nPRF1 = GetHasFeat(97, oPC); break; +case 136: nPRF1 = GetHasFeat(98, oPC); break; +case 137: nPRF1 = GetHasFeat(99, oPC); break; +case 138: nPRF1 = GetHasFeat(100, oPC); break; +case 139: nPRF1 = GetHasFeat(101, oPC); break; + } + } + else //<150 + { + switch (nFeat) + { +case 140: nPRF1 = GetHasFeat(102, oPC); break; +case 141: nPRF1 = GetHasFeat(103, oPC); break; +case 142: nPRF1 = GetHasFeat(104, oPC); break; +case 143: nPRF1 = GetHasFeat(105, oPC); break; +case 144: nPRF1 = GetHasFeat(106, oPC); break; +case 145: nPRF1 = GetHasFeat(107, oPC); break; +case 146: nPRF1 = GetHasFeat(108, oPC); break; +case 147: nPRF1 = GetHasFeat(109, oPC); break; +case 148: nPRF1 = GetHasFeat(110, oPC); break; +case 149: nPRF1 = GetHasFeat(111, oPC); break; + } + } + } + else + { + if (nFeat < 160) + { + switch (nFeat) + { +case 150: nPRF1 = GetHasFeat(112, oPC); break; +case 151: nPRF1 = GetHasFeat(113, oPC); break; +case 152: nPRF1 = GetHasFeat(114, oPC); break; +case 153: nPRF1 = GetHasFeat(115, oPC); break; +case 154: nPRF1 = GetHasFeat(116, oPC); break; +case 155: nPRF1 = GetHasFeat(117, oPC); break; +case 156: nPRF1 = GetHasFeat(118, oPC); break; +case 157: nPRF1 = GetHasFeat(119, oPC); break; +case 158: nPRF1 = GetHasFeat(120, oPC); break; +case 159: nPRF1 = GetHasFeat(121, oPC); break; + } + } + else + { + switch (nFeat) + { +case 160: nPRF1 = GetHasFeat(122, oPC); break; +case 161: nPRF1 = GetHasFeat(123, oPC); break; +case 162: nPRF1 = GetHasFeat(124, oPC); break; +case 163: nPRF1 = GetHasFeat(125, oPC); break; +case 164: nPRF1 = GetHasFeat(126, oPC); break; +case 165: nPRF1 = GetHasFeat(127, oPC); break; + } + } + } + } +else if (nFeat < 500) + { + if (nFeat < 400) + { + switch (nFeat) + { +case 390: nPRF1 = GetHasFeat(389, oPC); break; +case 391: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(6, oPC); break; +case 392: nPRF1 = GetHasFeat(26, oPC); nPRF2 = GetHasFeat(10, oPC); break; +case 393: nPRF1 = GetHasFeat(35, oPC); break; +case 394: nPRF1 = GetHasFeat(166, oPC); break; +case 395: nPRF1 = GetHasFeat(167, oPC); break; +case 396: nPRF1 = GetHasFeat(168, oPC); break; +case 397: nPRF1 = GetHasFeat(169, oPC); break; +case 398: nPRF1 = GetHasFeat(170, oPC); break; +case 399: nPRF1 = GetHasFeat(171, oPC); break; + } + } + else if (nFeat < 450) + { + if (nFeat < 410) + { + switch (nFeat) + { +case 400: nPRF1 = GetHasFeat(172, oPC); break; +case 401: nPRF1 = GetHasFeat(36, oPC); break; +case 409: nPRF1 = GetHasFeat(21, oPC); break; + } + } + else if (nFeat < 420) + { + switch (nFeat) + { +case 410: nPRF1 = GetHasFeat(39, oPC); break; +case 413: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(294, oPC); break; +case 414: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(294, oPC); break; +case 415: nPRF1 = GetHasFeat(35, oPC); break; +case 416: nPRF1 = GetHasFeat(166, oPC); break; +case 417: nPRF1 = GetHasFeat(167, oPC); break; +case 418: nPRF1 = GetHasFeat(168, oPC); break; +case 419: nPRF1 = GetHasFeat(169, oPC); break; + } + } + else if (nFeat < 430) + { + switch (nFeat) + { +case 420: nPRF1 = GetHasFeat(170, oPC); break; +case 421: nPRF1 = GetHasFeat(171, oPC); break; +case 422: nPRF1 = GetHasFeat(172, oPC); break; + } + } + else //<450 + { + switch (nFeat) + { +case 446: nPRF1 = GetHasFeat(445, oPC); break; +case 447: nPRF1 = GetHasFeat(446, oPC); break; +case 448: nPRF1 = GetHasFeat(447, oPC); break; +case 449: nPRF1 = GetHasFeat(448, oPC); break; + } + } + } + else //<500 + { + if (nFeat < 460) + { + switch (nFeat) + { +case 452: nPRF1 = GetHasFeat(451, oPC); break; +case 456: nPRF1 = GetHasFeat(455, oPC); break; +case 457: nPRF1 = GetHasFeat(456, oPC); break; +case 458: nPRF1 = GetHasFeat(457, oPC); break; +case 459: nPRF1 = GetHasFeat(458, oPC); break; + } + } + else if (nFeat < 470) + { + switch (nFeat) + { +case 461: nPRF1 = GetHasFeat(460, oPC); break; +case 462: nPRF1 = GetHasFeat(461, oPC); break; +case 464: nPRF1 = GetHasFeat(463, oPC); break; +case 465: nPRF1 = GetHasFeat(464, oPC); break; +case 466: nPRF1 = GetHasFeat(465, oPC); break; +case 467: nPRF1 = GetHasFeat(466, oPC); break; + } + } + else //<500 + { + switch (nFeat) + { +case 493: nPRF1 = GetHasFeat(492, oPC); break; +case 494: nPRF1 = GetHasFeat(493, oPC); break; +case 495: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(709, oPC); break; +case 496: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(710, oPC); break; +case 497: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(711, oPC); break; +case 498: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(712, oPC); break; +case 499: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(713, oPC); break; + } + } + } + } +else if (nFeat < 750) + { + if (nFeat < 550) + { + if (nFeat < 510) + { + switch (nFeat) + { +case 500: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(714, oPC); break; +case 501: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(715, oPC); break; +case 502: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(716, oPC); break; +case 503: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(717, oPC); break; +case 504: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(718, oPC); break; +case 505: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(719, oPC); break; +case 506: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(720, oPC); break; +case 507: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(721, oPC); break; +case 508: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(722, oPC); break; +case 509: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(723, oPC); break; + } + } + else if (nFeat < 520) + { + switch (nFeat) + { +case 510: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(724, oPC); break; +case 511: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(725, oPC); break; +case 512: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(726, oPC); break; +case 513: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(727, oPC); break; +case 514: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(728, oPC); break; +case 515: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(729, oPC); break; +case 516: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(730, oPC); break; +case 517: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(731, oPC); break; +case 518: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(732, oPC); break; +case 519: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(733, oPC); break; + } + } + else if (nFeat < 530) + { + switch (nFeat) + { +case 520: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(734, oPC); break; +case 521: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(735, oPC); break; +case 522: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(736, oPC); break; +case 523: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(737, oPC); break; +case 524: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(738, oPC); break; +case 525: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(739, oPC); break; +case 526: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(740, oPC); break; +case 527: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(741, oPC); break; +case 528: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(742, oPC); break; +case 529: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(743, oPC); break; + } + } + else if (nFeat < 540) + { + switch (nFeat) + { +case 530: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(744, oPC); break; +case 531: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(745, oPC); break; +case 534: nPRF1 = GetHasFeat(533, oPC); break; +case 535: nPRF1 = GetHasFeat(534, oPC); break; +case 536: nPRF1 = GetHasFeat(535, oPC); break; +case 537: nPRF1 = GetHasFeat(536, oPC); break; +case 538: nPRF1 = GetHasFeat(537, oPC); break; +case 539: nPRF1 = GetHasFeat(538, oPC); break; + } + } + else //<550 + { + switch (nFeat) + { +case 540: nPRF1 = GetHasFeat(539, oPC); break; +case 541: nPRF1 = GetHasFeat(540, oPC); break; +case 542: nPRF1 = GetHasFeat(541, oPC); break; +case 544: nPRF1 = GetHasFeat(543, oPC); break; +case 545: nPRF1 = GetHasFeat(544, oPC); break; +case 546: nPRF1 = GetHasFeat(545, oPC); break; +case 547: nPRF1 = GetHasFeat(546, oPC); break; +case 548: nPRF1 = GetHasFeat(547, oPC); break; +case 549: nPRF1 = GetHasFeat(548, oPC); break; + } + } + } + else if (nFeat < 600) + { + if (nFeat < 560) + { + switch (nFeat) + { +case 550: nPRF1 = GetHasFeat(549, oPC); break; +case 551: nPRF1 = GetHasFeat(550, oPC); break; +case 552: nPRF1 = GetHasFeat(551, oPC); break; +case 554: nPRF1 = GetHasFeat(553, oPC); break; +case 555: nPRF1 = GetHasFeat(554, oPC); break; +case 556: nPRF1 = GetHasFeat(555, oPC); break; +case 557: nPRF1 = GetHasFeat(556, oPC); break; +case 558: nPRF1 = GetHasFeat(557, oPC); break; +case 559: nPRF1 = GetHasFeat(558, oPC); break; + } + } + else if (nFeat < 570) + { + switch (nFeat) + { +case 560: nPRF1 = GetHasFeat(559, oPC); break; +case 561: nPRF1 = GetHasFeat(560, oPC); break; +case 562: nPRF1 = GetHasFeat(561, oPC); break; +case 564: nPRF1 = GetHasFeat(563, oPC); break; +case 565: nPRF1 = GetHasFeat(564, oPC); break; +case 566: nPRF1 = GetHasFeat(565, oPC); break; +case 567: nPRF1 = GetHasFeat(566, oPC); break; +case 568: nPRF1 = GetHasFeat(567, oPC); break; +case 569: nPRF1 = GetHasFeat(568, oPC); break; + } + } + else if (nFeat < 580) + { + switch (nFeat) + { +case 570: nPRF1 = GetHasFeat(569, oPC); break; +case 571: nPRF1 = GetHasFeat(570, oPC); break; +case 572: nPRF1 = GetHasFeat(571, oPC); break; +case 574: nPRF1 = GetHasFeat(573, oPC); break; +case 575: nPRF1 = GetHasFeat(574, oPC); break; +case 576: nPRF1 = GetHasFeat(575, oPC); break; +case 577: nPRF1 = GetHasFeat(576, oPC); break; +case 578: nPRF1 = GetHasFeat(577, oPC); break; +case 579: nPRF1 = GetHasFeat(578, oPC); break; + } + } + else + { + switch (nFeat) + { +case 580: nPRF1 = GetHasFeat(579, oPC); break; +case 581: nPRF1 = GetHasFeat(580, oPC); break; +case 582: nPRF1 = GetHasFeat(581, oPC); break; + } + } + } + else if (nFeat < 650) + { + if (nFeat < 620) + { + switch (nFeat) + { +case 610: nPRF1 = GetHasFeat(393, oPC); break; +case 611: nPRF1 = GetHasFeat(394, oPC); break; +case 612: nPRF1 = GetHasFeat(395, oPC); break; +case 613: nPRF1 = GetHasFeat(396, oPC); break; +case 614: nPRF1 = GetHasFeat(397, oPC); break; +case 615: nPRF1 = GetHasFeat(398, oPC); break; +case 616: nPRF1 = GetHasFeat(399, oPC); break; +case 617: nPRF1 = GetHasFeat(400, oPC); break; +case 618: nPRF1 = GetHasFeat(401, oPC); break; +case 619: nPRF1 = GetHasFeat(15, oPC); break; + } + } + else if (nFeat < 630) + { + switch (nFeat) + { +case 620: nPRF1 = GetHasFeat(90, oPC); break; +case 621: nPRF1 = GetHasFeat(91, oPC); break; +case 622: nPRF1 = GetHasFeat(92, oPC); break; +case 623: nPRF1 = GetHasFeat(93, oPC); break; +case 624: nPRF1 = GetHasFeat(94, oPC); break; +case 625: nPRF1 = GetHasFeat(95, oPC); break; +case 626: nPRF1 = GetHasFeat(96, oPC); break; +case 627: nPRF1 = GetHasFeat(97, oPC); break; +case 628: nPRF1 = GetHasFeat(98, oPC); break; +case 629: nPRF1 = GetHasFeat(99, oPC); break; + } + } + else if (nFeat < 640) + { + switch (nFeat) + { +case 630: nPRF1 = GetHasFeat(100, oPC); break; +case 631: nPRF1 = GetHasFeat(101, oPC); break; +case 632: nPRF1 = GetHasFeat(102, oPC); break; +case 633: nPRF1 = GetHasFeat(103, oPC); break; +case 634: nPRF1 = GetHasFeat(104, oPC); break; +case 635: nPRF1 = GetHasFeat(105, oPC); break; +case 636: nPRF1 = GetHasFeat(106, oPC); break; +case 637: nPRF1 = GetHasFeat(107, oPC); break; +case 638: nPRF1 = GetHasFeat(108, oPC); break; +case 639: nPRF1 = GetHasFeat(109, oPC); break; + } + } + else //<650 + { + switch (nFeat) + { +case 640: nPRF1 = GetHasFeat(110, oPC); break; +case 641: nPRF1 = GetHasFeat(111, oPC); break; +case 642: nPRF1 = GetHasFeat(112, oPC); break; +case 643: nPRF1 = GetHasFeat(113, oPC); break; +case 644: nPRF1 = GetHasFeat(114, oPC); break; +case 645: nPRF1 = GetHasFeat(115, oPC); break; +case 646: nPRF1 = GetHasFeat(116, oPC); break; +case 647: nPRF1 = GetHasFeat(117, oPC); break; +case 648: nPRF1 = GetHasFeat(118, oPC); break; +case 649: nPRF1 = GetHasFeat(120, oPC); break; + } + } + } + else if (nFeat < 700) + { + if (nFeat < 660) + { + switch (nFeat) + { +case 650: nPRF1 = GetHasFeat(121, oPC); break; +case 651: nPRF1 = GetHasFeat(122, oPC); break; +case 652: nPRF1 = GetHasFeat(123, oPC); break; +case 653: nPRF1 = GetHasFeat(125, oPC); break; +case 654: nPRF1 = GetHasFeat(126, oPC); break; +case 655: nPRF1 = GetHasFeat(127, oPC); break; +case 657: nPRF1 = GetHasFeat(47, oPC); nPRF2 = GetHasFeat(619, oPC); break; +case 658: nPRF1 = GetHasFeat(128, oPC); nPRF2 = GetHasFeat(620, oPC); break; +case 659: nPRF1 = GetHasFeat(129, oPC); nPRF2 = GetHasFeat(621, oPC); break; + } + } + else if (nFeat < 670) + { + switch (nFeat) + { +case 660: nPRF1 = GetHasFeat(130, oPC); nPRF2 = GetHasFeat(622, oPC); break; +case 661: nPRF1 = GetHasFeat(131, oPC); nPRF2 = GetHasFeat(623, oPC); break; +case 662: nPRF1 = GetHasFeat(132, oPC); nPRF2 = GetHasFeat(624, oPC); break; +case 663: nPRF1 = GetHasFeat(133, oPC); nPRF2 = GetHasFeat(625, oPC); break; +case 664: nPRF1 = GetHasFeat(134, oPC); nPRF2 = GetHasFeat(626, oPC); break; +case 665: nPRF1 = GetHasFeat(135, oPC); nPRF2 = GetHasFeat(627, oPC); break; +case 666: nPRF1 = GetHasFeat(136, oPC); nPRF2 = GetHasFeat(628, oPC); break; +case 667: nPRF1 = GetHasFeat(137, oPC); nPRF2 = GetHasFeat(629, oPC); break; +case 668: nPRF1 = GetHasFeat(138, oPC); nPRF2 = GetHasFeat(630, oPC); break; +case 669: nPRF1 = GetHasFeat(139, oPC); nPRF2 = GetHasFeat(631, oPC); break; + } + } + else if (nFeat < 680) + { + switch (nFeat) + { +case 670: nPRF1 = GetHasFeat(140, oPC); nPRF2 = GetHasFeat(632, oPC); break; +case 671: nPRF1 = GetHasFeat(141, oPC); nPRF2 = GetHasFeat(633, oPC); break; +case 672: nPRF1 = GetHasFeat(142, oPC); nPRF2 = GetHasFeat(634, oPC); break; +case 673: nPRF1 = GetHasFeat(143, oPC); nPRF2 = GetHasFeat(635, oPC); break; +case 674: nPRF1 = GetHasFeat(144, oPC); nPRF2 = GetHasFeat(636, oPC); break; +case 675: nPRF1 = GetHasFeat(145, oPC); nPRF2 = GetHasFeat(637, oPC); break; +case 676: nPRF1 = GetHasFeat(146, oPC); nPRF2 = GetHasFeat(638, oPC); break; +case 677: nPRF1 = GetHasFeat(147, oPC); nPRF2 = GetHasFeat(639, oPC); break; +case 678: nPRF1 = GetHasFeat(148, oPC); nPRF2 = GetHasFeat(640, oPC); break; +case 679: nPRF1 = GetHasFeat(149, oPC); nPRF2 = GetHasFeat(641, oPC); break; + } + } + else if (nFeat < 690) + { + switch (nFeat) + { +case 680: nPRF1 = GetHasFeat(150, oPC); nPRF2 = GetHasFeat(642, oPC); break; +case 681: nPRF1 = GetHasFeat(151, oPC); nPRF2 = GetHasFeat(643, oPC); break; +case 682: nPRF1 = GetHasFeat(152, oPC); nPRF2 = GetHasFeat(644, oPC); break; +case 683: nPRF1 = GetHasFeat(153, oPC); nPRF2 = GetHasFeat(645, oPC); break; +case 684: nPRF1 = GetHasFeat(154, oPC); nPRF2 = GetHasFeat(646, oPC); break; +case 685: nPRF1 = GetHasFeat(155, oPC); nPRF2 = GetHasFeat(647, oPC); break; +case 686: nPRF1 = GetHasFeat(156, oPC); nPRF2 = GetHasFeat(648, oPC); break; +case 687: nPRF1 = GetHasFeat(158, oPC); nPRF2 = GetHasFeat(649, oPC); break; +case 688: nPRF1 = GetHasFeat(159, oPC); nPRF2 = GetHasFeat(650, oPC); break; +case 689: nPRF1 = GetHasFeat(160, oPC); nPRF2 = GetHasFeat(651, oPC); break; + } + } + else //<700 + { + switch (nFeat) + { +case 690: nPRF1 = GetHasFeat(161, oPC); nPRF2 = GetHasFeat(652, oPC); break; +case 691: nPRF1 = GetHasFeat(163, oPC); nPRF2 = GetHasFeat(653, oPC); break; +case 692: nPRF1 = GetHasFeat(164, oPC); nPRF2 = GetHasFeat(654, oPC); break; +case 693: nPRF1 = GetHasFeat(165, oPC); nPRF2 = GetHasFeat(655, oPC); break; +case 696: nPRF1 = GetHasFeat(7, oPC); break; +case 697: nPRF1 = GetHasFeat(344, oPC); break; +case 698: nPRF1 = GetHasFeat(697, oPC); break; +case 699: nPRF1 = GetHasFeat(215, oPC); break; + } + } + } + else //<750 + { + if (nFeat < 710) + { + switch (nFeat) + { +case 700: nPRF1 = GetHasFeat(699, oPC); break; +case 701: nPRF1 = GetHasFeat(700, oPC); break; +case 702: nPRF1 = GetHasFeat(701, oPC); break; +case 703: nPRF1 = GetHasFeat(702, oPC); break; +case 704: nPRF1 = GetHasFeat(703, oPC); break; +case 705: nPRF1 = GetHasFeat(704, oPC); break; +case 706: nPRF1 = GetHasFeat(705, oPC); break; +case 707: nPRF1 = GetHasFeat(706, oPC); break; +case 708: nPRF1 = GetHasFeat(707, oPC); break; +case 709: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(15, oPC); break; + } + } + else if (nFeat < 720) + { + switch (nFeat) + { +case 710: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(52, oPC); break; +case 711: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(53, oPC); break; +case 712: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(54, oPC); break; +case 713: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(55, oPC); break; +case 714: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(56, oPC); break; +case 715: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(57, oPC); break; +case 716: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(58, oPC); break; +case 717: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(59, oPC); break; +case 718: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(60, oPC); break; +case 719: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(61, oPC); break; + } + } + else if (nFeat < 730) + { + switch (nFeat) + { +case 720: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(62, oPC); break; +case 721: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(63, oPC); break; +case 722: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(64, oPC); break; +case 723: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(65, oPC); break; +case 724: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(66, oPC); break; +case 725: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(67, oPC); break; +case 726: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(68, oPC); break; +case 727: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(69, oPC); break; +case 728: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(70, oPC); break; +case 729: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(71, oPC); break; + } + } + else if (nFeat < 740) + { + switch (nFeat) + { +case 730: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(72, oPC); break; +case 731: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(73, oPC); break; +case 732: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(74, oPC); break; +case 733: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(75, oPC); break; +case 734: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(76, oPC); break; +case 735: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(77, oPC); break; +case 736: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(78, oPC); break; +case 737: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(79, oPC); break; +case 738: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(80, oPC); break; +case 739: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(82, oPC); break; + } + } + else //750 + { + switch (nFeat) + { +case 740: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(83, oPC); break; +case 741: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(84, oPC); break; +case 742: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(85, oPC); break; +case 743: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(87, oPC); break; +case 744: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(88, oPC); break; +case 745: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(89, oPC); break; +case 746: nPRF1 = GetHasFeat(292, oPC); break; +case 747: nPRF1 = GetHasFeat(14, oPC); break; +case 748: nPRF1 = GetHasFeat(212, oPC); break; +case 749: nPRF1 = GetHasFeat(748, oPC); break; + } + } + } + } +else + { + if (nFeat < 800) + { + if (nFeat < 760) + { + switch (nFeat) + { +case 750: nPRF1 = GetHasFeat(749, oPC); break; +case 751: nPRF1 = GetHasFeat(750, oPC); break; +case 752: nPRF1 = GetHasFeat(751, oPC); break; +case 753: nPRF1 = GetHasFeat(377, oPC); break; +case 755: nPRF1 = GetHasFeat(754, oPC); break; +case 756: nPRF1 = GetHasFeat(755, oPC); break; +case 757: nPRF1 = GetHasFeat(756, oPC); break; +case 758: nPRF1 = GetHasFeat(757, oPC); break; +case 759: nPRF1 = GetHasFeat(758, oPC); break; + } + } + else if (nFeat < 770) + { + switch (nFeat) + { +case 760: nPRF1 = GetHasFeat(759, oPC); break; +case 761: nPRF1 = GetHasFeat(760, oPC); break; +case 762: nPRF1 = GetHasFeat(761, oPC); break; +case 763: nPRF1 = GetHasFeat(762, oPC); break; +case 765: nPRF1 = GetHasFeat(764, oPC); break; +case 766: nPRF1 = GetHasFeat(765, oPC); break; +case 767: nPRF1 = GetHasFeat(766, oPC); break; +case 768: nPRF1 = GetHasFeat(767, oPC); break; +case 769: nPRF1 = GetHasFeat(768, oPC); break; + } + } + else if (nFeat < 780) + { + switch (nFeat) + { +case 770: nPRF1 = GetHasFeat(769, oPC); break; +case 771: nPRF1 = GetHasFeat(770, oPC); break; +case 772: nPRF1 = GetHasFeat(771, oPC); break; +case 773: nPRF1 = GetHasFeat(772, oPC); break; +case 775: nPRF1 = GetHasFeat(774, oPC); break; +case 776: nPRF1 = GetHasFeat(775, oPC); break; +case 777: nPRF1 = GetHasFeat(776, oPC); break; +case 778: nPRF1 = GetHasFeat(777, oPC); break; +case 779: nPRF1 = GetHasFeat(778, oPC); break; + } + } + else if (nFeat < 790) + { + switch (nFeat) + { +case 780: nPRF1 = GetHasFeat(779, oPC); break; +case 781: nPRF1 = GetHasFeat(780, oPC); break; +case 782: nPRF1 = GetHasFeat(781, oPC); break; +case 783: nPRF1 = GetHasFeat(782, oPC); break; +case 785: nPRF1 = GetHasFeat(784, oPC); break; +case 786: nPRF1 = GetHasFeat(785, oPC); break; +case 787: nPRF1 = GetHasFeat(786, oPC); break; +case 788: nPRF1 = GetHasFeat(787, oPC); break; +case 789: nPRF1 = GetHasFeat(788, oPC); break; + } + } + else //<800 + { + switch (nFeat) + { +case 790: nPRF1 = GetHasFeat(789, oPC); break; +case 791: nPRF1 = GetHasFeat(790, oPC); break; +case 792: nPRF1 = GetHasFeat(791, oPC); break; +case 793: nPRF1 = GetHasFeat(792, oPC); break; +case 795: nPRF1 = GetHasFeat(794, oPC); break; +case 796: nPRF1 = GetHasFeat(795, oPC); break; +case 797: nPRF1 = GetHasFeat(796, oPC); break; +case 798: nPRF1 = GetHasFeat(797, oPC); break; +case 799: nPRF1 = GetHasFeat(798, oPC); break; + } + } + } + else if (nFeat < 850) + { + if (nFeat < 810) + { + switch (nFeat) + { +case 800: nPRF1 = GetHasFeat(799, oPC); break; +case 801: nPRF1 = GetHasFeat(800, oPC); break; +case 802: nPRF1 = GetHasFeat(801, oPC); break; +case 803: nPRF1 = GetHasFeat(802, oPC); break; +case 805: nPRF1 = GetHasFeat(804, oPC); break; +case 806: nPRF1 = GetHasFeat(805, oPC); break; +case 807: nPRF1 = GetHasFeat(806, oPC); break; +case 808: nPRF1 = GetHasFeat(807, oPC); break; +case 809: nPRF1 = GetHasFeat(808, oPC); break; + } + } + else if (nFeat < 820) + { + switch (nFeat) + { +case 810: nPRF1 = GetHasFeat(809, oPC); break; +case 811: nPRF1 = GetHasFeat(810, oPC); break; +case 812: nPRF1 = GetHasFeat(811, oPC); break; +case 813: nPRF1 = GetHasFeat(812, oPC); break; +case 815: nPRF1 = GetHasFeat(814, oPC); break; +case 816: nPRF1 = GetHasFeat(815, oPC); break; +case 817: nPRF1 = GetHasFeat(816, oPC); break; +case 818: nPRF1 = GetHasFeat(817, oPC); break; +case 819: nPRF1 = GetHasFeat(818, oPC); break; + } + } + else if (nFeat < 830) + { + switch (nFeat) + { +case 820: nPRF1 = GetHasFeat(819, oPC); break; +case 821: nPRF1 = GetHasFeat(820, oPC); break; +case 822: nPRF1 = GetHasFeat(821, oPC); break; +case 823: nPRF1 = GetHasFeat(822, oPC); break; +case 824: nORF1 = GetHasFeat(472, oPC); nORF2 = GetHasFeat(301, oPC); break; +case 825: nPRF1 = GetHasFeat(824, oPC); break; +case 826: nPRF1 = GetHasFeat(825, oPC); break; +case 827: nPRF1 = GetHasFeat(826, oPC); break; +case 828: nPRF1 = GetHasFeat(827, oPC); break; +case 829: nPRF1 = GetHasFeat(828, oPC); break; + } + } + else if (nFeat < 840) + { + switch (nFeat) + { +case 830: nPRF1 = GetHasFeat(829, oPC); break; +case 831: nPRF1 = GetHasFeat(830, oPC); break; +case 832: nPRF1 = GetHasFeat(831, oPC); break; +case 833: nPRF1 = GetHasFeat(832, oPC); break; +case 834: nORF1 = GetHasFeat(351, oPC); nORF2 = GetHasFeat(1006, oPC); nORF3 = GetHasFeat(1011, oPC); break; +case 835: nPRF1 = GetHasFeat(834, oPC); break; +case 836: nPRF1 = GetHasFeat(835, oPC); break; +case 837: nPRF1 = GetHasFeat(836, oPC); break; +case 838: nPRF1 = GetHasFeat(837, oPC); break; +case 839: nPRF1 = GetHasFeat(838, oPC); break; + } + } + else //<850 + { + switch (nFeat) + { +case 840: nPRF1 = GetHasFeat(839, oPC); break; +case 841: nPRF1 = GetHasFeat(840, oPC); break; +case 842: nPRF1 = GetHasFeat(841, oPC); break; +case 843: nPRF1 = GetHasFeat(842, oPC); break; +case 844: nPRF1 = GetHasFeat(39, oPC); nPRF2 = GetHasFeat(21, oPC); break; +case 845: nPRF1 = GetHasFeat(844, oPC); break; +case 846: nPRF1 = GetHasFeat(845, oPC); break; +case 847: nPRF1 = GetHasFeat(846, oPC); break; +case 848: nPRF1 = GetHasFeat(847, oPC); break; +case 849: nPRF1 = GetHasFeat(848, oPC); break; + } + } + } + else if (nFeat < 900) + { + if (nFeat < 860) + { + switch (nFeat) + { +case 850: nPRF1 = GetHasFeat(849, oPC); break; +case 851: nPRF1 = GetHasFeat(850, oPC); break; +case 852: nPRF1 = GetHasFeat(851, oPC); break; +case 853: nPRF1 = GetHasFeat(852, oPC); break; +case 854: nPRF1 = GetHasFeat(294, oPC); break; +case 856: nPRF1 = GetHasFeat(212, oPC); nPRF2 = GetHasFeat(223, oPC); break; +case 857: nPRF1 = GetHasFeat(29, oPC); break; +case 858: nPRF1 = GetHasFeat(857, oPC); break; +case 859: nPRF1 = GetHasFeat(858, oPC); break; + } + } + else if (nFeat < 870) + { + switch (nFeat) + { +case 860: nPRF1 = GetHasFeat(33, oPC); break; +case 861: nPRF1 = GetHasFeat(860, oPC); break; +case 862: nPRF1 = GetHasFeat(861, oPC); break; +case 863: nPRF1 = GetHasFeat(37, oPC); break; +case 864: nPRF1 = GetHasFeat(863, oPC); break; +case 865: nPRF1 = GetHasFeat(864, oPC); break; +case 867: nPRF1 = GetHasFeat(392, oPC); nPRF2 = GetHasFeat(389, oPC); break; +case 868: nPRF1 = GetHasFeat(867, oPC); break; +case 869: nPRF1 = GetHasFeat(331, oPC); break; + } + } + else if (nFeat < 880) + { + switch (nFeat) + { +case 870: nPRF1 = GetHasFeat(373, oPC); break; +case 872: nPRF1 = GetHasFeat(903, oPC); break; +case 873: nORF1 = GetHasFeat(338, oPC); nORF2 = GetHasFeat(903, oPC); break; +case 879: nPRF1 = GetHasFeat(98, oPC); break; + } + } + else if (nFeat < 890) + { + switch (nFeat) + { +case 880: nPRF1 = GetHasFeat(117, oPC); break; +case 881: nPRF1 = GetHasFeat(118, oPC); break; +case 887: nPRF1 = GetHasFeat(886, oPC); break; +case 888: nPRF1 = GetHasFeat(887, oPC); break; + } + } + else //<900 + { + switch (nFeat) + { +case 893: nPRF1 = GetHasFeat(892, oPC); break; +case 897: nPRF1 = GetHasFeat(893, oPC); break; + } + } + } + else if (nFeat < 950) + { + if (nFeat < 910) + { + switch (nFeat) + { +case 900: nPRF1 = GetHasFeat(898, oPC); break; +case 901: nPRF1 = GetHasFeat(900, oPC); break; +case 903: nPRF1 = GetHasFeat(901, oPC); break; +case 905: nPRF1 = GetHasFeat(904, oPC); break; +case 906: nPRF1 = GetHasFeat(905, oPC); break; +case 907: nPRF1 = GetHasFeat(906, oPC); break; +case 908: nPRF1 = GetHasFeat(907, oPC); break; + } + } + else if (nFeat < 920) + { + switch (nFeat) + { +case 910: nORF1 = GetHasFeat(301, oPC); nORF2 = GetHasFeat(472, oPC); break; +case 919: nPRF1 = GetHasFeat(43, oPC); break; + } + } + else if (nFeat < 930) + { + switch (nFeat) + { +case 920: nPRF1 = GetHasFeat(90, oPC); break; +case 921: nPRF1 = GetHasFeat(94, oPC); break; +case 922: nPRF1 = GetHasFeat(95, oPC); break; +case 923: nPRF1 = GetHasFeat(96, oPC); break; +case 924: nPRF1 = GetHasFeat(97, oPC); break; +case 925: nPRF1 = GetHasFeat(103, oPC); break; +case 926: nPRF1 = GetHasFeat(104, oPC); break; +case 927: nPRF1 = GetHasFeat(105, oPC); break; +case 928: nPRF1 = GetHasFeat(106, oPC); break; +case 929: nPRF1 = GetHasFeat(107, oPC); break; + } + } + else if (nFeat < 940) + { + switch (nFeat) + { +case 930: nPRF1 = GetHasFeat(108, oPC); break; +case 931: nPRF1 = GetHasFeat(110, oPC); break; +case 932: nPRF1 = GetHasFeat(111, oPC); break; +case 933: nPRF1 = GetHasFeat(112, oPC); break; +case 934: nPRF1 = GetHasFeat(113, oPC); break; +case 935: nPRF1 = GetHasFeat(114, oPC); break; +case 936: nPRF1 = GetHasFeat(115, oPC); break; +case 937: nPRF1 = GetHasFeat(116, oPC); break; +case 938: nPRF1 = GetHasFeat(121, oPC); break; +case 939: nPRF1 = GetHasFeat(122, oPC); break; + } + } + else //<950 + { + switch (nFeat) + { +case 940: nPRF1 = GetHasFeat(123, oPC); break; +case 941: nPRF1 = GetHasFeat(125, oPC); break; +case 942: nPRF1 = GetHasFeat(126, oPC); break; +case 943: nPRF1 = GetHasFeat(127, oPC); break; + } + } + } + else if (nFeat < 1000) + { + if (nFeat < 960) + { + switch (nFeat) + { +case 950: nPRF1 = GetHasFeat(949, oPC); break; +case 951: nPRF1 = GetHasFeat(950, oPC); break; +case 952: nPRF1 = GetHasFeat(44, oPC); break; +case 953: nPRF1 = GetHasFeat(952, oPC); break; +case 954: nPRF1 = GetHasFeat(44, oPC); break; +case 955: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(958, oPC); break; +case 956: nPRF1 = GetHasFeat(952, oPC); break; +case 957: nPRF1 = GetHasFeat(953, oPC); nPRF2 = GetHasFeat(956, oPC); break; +case 958: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(954, oPC); break; +case 959: nPRF1 = GetHasFeat(952, oPC); break; + } + } + else if (nFeat < 990) + { + switch (nFeat) + { +case 988: nPRF1 = GetHasFeat(329, oPC); break; +case 989: nPRF1 = GetHasFeat(329, oPC); break; + } + } + else //<1000 + { + switch (nFeat) + { +case 993: nPRF1 = GetHasFeat(44, oPC); break; +case 994: nPRF1 = GetHasFeat(993, oPC); break; +case 995: nPRF1 = GetHasFeat(44, oPC); break; +case 996: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(999, oPC); break; +case 997: nPRF1 = GetHasFeat(993, oPC); break; +case 998: nPRF1 = GetHasFeat(994, oPC); nPRF2 = GetHasFeat(997, oPC); break; +case 999: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(995, oPC); break; + } + } + } + else //through 1071 + { + if (nFeat < 1010) + { + switch (nFeat) + { +case 1000: nPRF1 = GetHasFeat(993, oPC); break; +case 1002: nPRF1 = GetHasFeat(435, oPC); break; +case 1003: nPRF1 = GetHasFeat(475, oPC); break; + } + } + else if (nFeat < 1050) + { + switch (nFeat) + { +case 1045: nPRF1 = GetHasFeat(449, oPC); break; +case 1046: nPRF1 = GetHasFeat(1045, oPC); break; +case 1047: nPRF1 = GetHasFeat(1046, oPC); break; +case 1048: nPRF1 = GetHasFeat(1047, oPC); break; +case 1049: nPRF1 = GetHasFeat(1048, oPC); break; + } + } + else if (nFeat < 1060) + { + switch (nFeat) + { +case 1050: nPRF1 = GetHasFeat(1049, oPC); break; +case 1051: nPRF1 = GetHasFeat(1050, oPC); break; +case 1052: nPRF1 = GetHasFeat(1051, oPC); break; +case 1053: nPRF1 = GetHasFeat(1052, oPC); break; +case 1054: nPRF1 = GetHasFeat(1053, oPC); break; +case 1055: nPRF1 = GetHasFeat(1054, oPC); break; +case 1056: nPRF1 = GetHasFeat(1055, oPC); break; +case 1057: nPRF1 = GetHasFeat(1056, oPC); break; +case 1058: nPRF1 = GetHasFeat(1057, oPC); break; +case 1059: nPRF1 = GetHasFeat(1058, oPC); break; + } + } + else //through 1071 + { + switch (nFeat) + { +case 1060: nPRF1 = GetHasFeat(903, oPC); break; +case 1061: nPRF1 = GetHasFeat(903, oPC); break; +case 1067: nPRF1 = GetHasFeat(334, oPC); break; +case 1070: nPRF1 = GetHasFeat(466, oPC); break; +case 1071: nPRF1 = GetHasFeat(884, oPC); break; + } + } + } + } +return ((nPRF1 && nPRF2) && (nORF1 || nORF2 || nORF3 || nORF4 || nORF5)); +} + +int GetIsFeatFirstLevelOnly(int nFeat) +{ +switch(nFeat) + { + case 378: return TRUE; break; + case 379: return TRUE; break; + case 380: return TRUE; break; + case 381: return TRUE; break; + case 382: return TRUE; break; + case 384: return TRUE; break; + case 386: return TRUE; break; + case 388: return TRUE; break; + default : return FALSE; break; + } +return -3; +} + +int GetIsFeatDevCrit(int nFeat) +{ +if (nFeat > 494 && nFeat <532) return TRUE; +else if (nFeat == 955 || nFeat == 996) return TRUE; +else return FALSE; +} + +int GetHasRequiredSpellLevelForFeat(object oPC, int nFeat) +{ +int nReturn = TRUE; +switch(nFeat) + { + case 7: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 12: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 33: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 35: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 36: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 37: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 166: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 167: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 168: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 169: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 170: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 171: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 172: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; + case 11: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 3) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 4) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 3) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 3) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 8) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 8)); break; + case 25: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 5) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 6) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 5) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 5) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 11) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 11)); break; + case 29: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 8) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 7) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 10) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 14) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 14)); break; + case 31: nReturn = FALSE; break; + case 610: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 611: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 612: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 613: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 614: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 615: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 616: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 617: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 857: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 858: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 859: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 860: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 861: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 862: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 863: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 864: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + case 865: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; + default: nReturn = TRUE; break; + } +return nReturn; +} + +string GetNameOfFeat(int nFeat) +{ +string sName; +if (nFeat < 250) + { + if (nFeat < 50) + { + if (nFeat < 10) + { + switch (nFeat) + { +case 0: sName = "Alertness"; break; +case 1: sName = "Ambidexterity"; break; +case 2: sName = "Armor Proficiency Heavy"; break; +case 3: sName = "Armor Proficiency Light"; break; +case 4: sName = "Armor Proficiency Medium"; break; +case 5: sName = "Called Shot"; break; +case 6: sName = "Cleave"; break; +case 7: sName = "Combat Casting"; break; +case 8: sName = "Deflect Arrows"; break; +case 9: sName = "Disarm"; break; + } + } + else if (nFeat < 20) + { + switch (nFeat) + { +case 10: sName = "Dodge"; break; +case 11: sName = "Empower Spell"; break; +case 12: sName = "Extend Spell"; break; +case 13: sName = "Extra Turning"; break; +case 14: sName = "Great Fortitude"; break; +case 15: sName = "Improved Critical Club"; break; +case 16: sName = "Improved Disarm"; break; +case 17: sName = "Improved Knockdown"; break; +case 18: sName = "Improved Parry"; break; +case 19: sName = "Improved Power Attack"; break; + } + } + else if (nFeat < 30) + { + switch (nFeat) + { +case 20: sName = "Improved Two Weapon Fighting"; break; +case 21: sName = "Improved Unarmed Strike"; break; +case 22: sName = "Iron Will"; break; +case 23: sName = "Knockdown"; break; +case 24: sName = "Lightning Reflexes"; break; +case 25: sName = "Maximize Spell"; break; +case 26: sName = "Mobility"; break; +case 27: sName = "Point Blank Shot"; break; +case 28: sName = "Power Attack"; break; +case 29: sName = "Quicken Spell"; break; + } + } + else if (nFeat < 40) + { + switch (nFeat) + { +case 30: sName = "Rapid Shot"; break; +case 31: sName = "Sap"; break; +case 32: sName = "Shield Proficiency"; break; +case 33: sName = "Silence Spell"; break; +case 34: sName = "Skill Focus Animal Empathy"; break; +case 35: sName = "Spell Focus Abjuration"; break; +case 36: sName = "Spell Penetration"; break; +case 37: sName = "Still Spell"; break; +case 39: sName = "Stunning Fist"; break; + } + } + else //<50 + { + switch (nFeat) + { +case 40: sName = "Toughness"; break; +case 41: sName = "Two Weapon Fighting"; break; +case 42: sName = "Weapon Finesse"; break; +case 43: sName = "Weapon Focus Club"; break; +case 44: sName = "Weapon Proficiency Exotic"; break; +case 45: sName = "Weapon Proficiency Martial"; break; +case 46: sName = "Weapon Proficiency Simple"; break; +case 47: sName = "Weapon Specialization Club"; break; +case 48: sName = "Weapon Proficiency Druid"; break; +case 49: sName = "Weapon Proficiency Monk"; break; + } + } + } + else if (nFeat < 100) + { + if (nFeat < 60) + { + switch (nFeat) + { +case 50: sName = "Weapon Proficiency Rogue"; break; +case 51: sName = "Weapon Proficiency Wizard"; break; +case 52: sName = "Improved Critical Dagger"; break; +case 53: sName = "Improved Critical Dart"; break; +case 54: sName = "Improved Critical Heavy Crossbow"; break; +case 55: sName = "Improved Critical Light Crossbow"; break; +case 56: sName = "Improved Critical Light Mace"; break; +case 57: sName = "Improved Critical Morning Star"; break; +case 58: sName = "Improved Critical Staff"; break; +case 59: sName = "Improved Critical Spear"; break; + } + } + else if (nFeat < 70) + { + switch (nFeat) + { +case 60: sName = "Improved Critical Sickle"; break; +case 61: sName = "Improved Critical Sling"; break; +case 62: sName = "Improved Critical Unarmed Strike"; break; +case 63: sName = "Improved Critical Longbow"; break; +case 64: sName = "Improved Critical Shortbow"; break; +case 65: sName = "Improved Critical Short Sword"; break; +case 66: sName = "Improved Critical Rapier"; break; +case 67: sName = "Improved Critical Scimitar"; break; +case 68: sName = "Improved Critical Long Sword"; break; +case 69: sName = "Improved Critical Great Sword"; break; + } + } + else if (nFeat < 80) + { + switch (nFeat) + { +case 70: sName = "Improved Critical Hand Axe"; break; +case 71: sName = "Improved Critical Throwing Axe"; break; +case 72: sName = "Improved Critical Battle Axe"; break; +case 73: sName = "Improved Critical Great Axe"; break; +case 74: sName = "Improved Critical Halberd"; break; +case 75: sName = "Improved Critical Light Hammer"; break; +case 76: sName = "Improved Critical Light Flail"; break; +case 77: sName = "Improved Critical War Hammer"; break; +case 78: sName = "Improved Critical Heavy Flail"; break; +case 79: sName = "Improved Critical Kama"; break; + } + } + else if (nFeat < 90) + { + switch (nFeat) + { +case 80: sName = "Improved Critical Kukri"; break; +case 82: sName = "Improved Critical Shuriken"; break; +case 83: sName = "Improved Critical Scythe"; break; +case 84: sName = "Improved Critical Katana"; break; +case 85: sName = "Improved Critical Bastard Sword"; break; +case 87: sName = "Improved Critical Dire Mace"; break; +case 88: sName = "Improved Critical Double Axe"; break; +case 89: sName = "Improved Critical Two Bladed Sword"; break; + } + } + else //<100 + { + switch (nFeat) + { +case 90: sName = "Weapon Focus Dagger"; break; +case 91: sName = "Weapon Focus Dart"; break; +case 92: sName = "Weapon Focus Heavy Crossbow"; break; +case 93: sName = "Weapon Focus Light Crossbow"; break; +case 94: sName = "Weapon Focus Light Mace"; break; +case 95: sName = "Weapon Focus Morning Star"; break; +case 96: sName = "Weapon Focus Staff"; break; +case 97: sName = "Weapon Focus Spear"; break; +case 98: sName = "Weapon Focus Sickle"; break; +case 99: sName = "Weapon Focus Sling"; break; + } + } + } + else if (nFeat < 150) + { + if (nFeat < 110) + { + switch (nFeat) + { +case 100: sName = "Weapon Focus Unarmed Strike"; break; +case 101: sName = "Weapon Focus Longbow"; break; +case 102: sName = "Weapon Focus Shortbow"; break; +case 103: sName = "Weapon Focus Short Sword"; break; +case 104: sName = "Weapon Focus Rapier"; break; +case 105: sName = "Weapon Focus Scimitar"; break; +case 106: sName = "Weapon Focus Long Sword"; break; +case 107: sName = "Weapon Focus Great Sword"; break; +case 108: sName = "Weapon Focus Hand Axe"; break; +case 109: sName = "Weapon Focus Throwing Axe"; break; + } + } + else if (nFeat < 120) + { + switch (nFeat) + { +case 110: sName = "Weapon Focus Battle Axe"; break; +case 111: sName = "Weapon Focus Great Axe"; break; +case 112: sName = "Weapon Focus Halberd"; break; +case 113: sName = "Weapon Focus Light Hammer"; break; +case 114: sName = "Weapon Focus Light Flail"; break; +case 115: sName = "Weapon Focus War Hammer"; break; +case 116: sName = "Weapon Focus Heavy Flail"; break; +case 117: sName = "Weapon Focus Kama"; break; +case 118: sName = "Weapon Focus Kukri"; break; + } + } + else if (nFeat < 130) + { + switch (nFeat) + { +case 120: sName = "Weapon Focus Shuriken"; break; +case 121: sName = "Weapon Focus Scythe"; break; +case 122: sName = "Weapon Focus Katana"; break; +case 123: sName = "Weapon Focus Bastard Sword"; break; +case 125: sName = "Weapon Focus Dire Mace"; break; +case 126: sName = "Weapon Focus Double Axe"; break; +case 127: sName = "Weapon Focus Two Bladed Sword"; break; +case 128: sName = "Weapon Specialization Dagger"; break; +case 129: sName = "Weapon Specialization Dart"; break; + } + } + else if (nFeat < 140) + { + switch (nFeat) + { +case 130: sName = "Weapon Specialization Heavy Crossbow"; break; +case 131: sName = "Weapon Specialization Light Crossbow"; break; +case 132: sName = "Weapon Specialization Light Mace"; break; +case 133: sName = "Weapon Specialization Morning Star"; break; +case 134: sName = "Weapon Specialization Staff"; break; +case 135: sName = "Weapon Specialization Spear"; break; +case 136: sName = "Weapon Specialization Sickle"; break; +case 137: sName = "Weapon Specialization Sling"; break; +case 138: sName = "Weapon Specialization Unarmed Strike"; break; +case 139: sName = "Weapon Specialization Longbow"; break; + } + } + else //<150 + { + switch (nFeat) + { +case 140: sName = "Weapon Specialization Shortbow"; break; +case 141: sName = "Weapon Specialization Short Sword"; break; +case 142: sName = "Weapon Specialization Rapier"; break; +case 143: sName = "Weapon Specialization Scimitar"; break; +case 144: sName = "Weapon Specialization Long Sword"; break; +case 145: sName = "Weapon Specialization Great Sword"; break; +case 146: sName = "Weapon Specialization Hand Axe"; break; +case 147: sName = "Weapon Specialization Throwing Axe"; break; +case 148: sName = "Weapon Specialization Battle Axe"; break; +case 149: sName = "Weapon Specialization Great Axe"; break; + } + } + } + else if (nFeat < 200) + { + if (nFeat < 160) + { + switch (nFeat) + { +case 150: sName = "Weapon Specialization Halberd"; break; +case 151: sName = "Weapon Specialization Light Hammer"; break; +case 152: sName = "Weapon Specialization Light Flail"; break; +case 153: sName = "Weapon Specialization War Hammer"; break; +case 154: sName = "Weapon Specialization Heavy Flail"; break; +case 155: sName = "Weapon Specialization Kama"; break; +case 156: sName = "Weapon Specialization Kukri"; break; +case 158: sName = "Weapon Specialization Shuriken"; break; +case 159: sName = "Weapon Specialization Scythe"; break; + } + } + else if (nFeat < 170) + { + switch (nFeat) + { +case 160: sName = "Weapon Specialization Katana"; break; +case 161: sName = "Weapon Specialization Bastard Sword"; break; +case 163: sName = "Weapon Specialization Dire Mace"; break; +case 164: sName = "Weapon Specialization Double Axe"; break; +case 165: sName = "Weapon Specialization Two Bladed Sword"; break; +case 166: sName = "Spell Focus Conjuration"; break; +case 167: sName = "Spell Focus Divination"; break; +case 168: sName = "Spell Focus Enchantment"; break; +case 169: sName = "Spell Focus Evocation"; break; + } + } + else if (nFeat < 180) + { + switch (nFeat) + { +case 170: sName = "Spell Focus Illusion"; break; +case 171: sName = "Spell Focus Necromancy"; break; +case 172: sName = "Spell Focus Transmutation"; break; +case 173: sName = "Skill Focus Concentration"; break; +case 174: sName = "Skill Focus Disable Trap"; break; +case 175: sName = "Skill Focus Discipline"; break; +case 177: sName = "Skill Focus Heal"; break; +case 178: sName = "Skill Focus Hide"; break; +case 179: sName = "Skill Focus Listen"; break; + } + } + else if (nFeat < 190) + { + switch (nFeat) + { +case 180: sName = "Skill Focus Lore"; break; +case 181: sName = "Skill Focus Move Silently"; break; +case 182: sName = "Skill Focus Open Lock"; break; +case 183: sName = "Skill Focus Parry"; break; +case 184: sName = "Skill Focus Perform"; break; +case 185: sName = "Skill Focus Persuade"; break; +case 186: sName = "Skill Focus Pick Pocket"; break; +case 187: sName = "Skill Focus Search"; break; +case 188: sName = "Skill Focus Set Trap"; break; +case 189: sName = "Skill Focus Spellcraft"; break; + } + } + else //<200 + { + switch (nFeat) + { +case 190: sName = "Skill Focus Spot"; break; +case 192: sName = "Skill Focus Taunt"; break; +case 193: sName = "Skill Focus Use Magic Device"; break; +case 194: sName = "Barbarian Endurance"; break; +case 195: sName = "Uncanny Dodge 1"; break; +case 196: sName = "Damage Reduction"; break; +case 197: sName = "Bardic Knowledge"; break; +case 198: sName = "Nature Sense"; break; +case 199: sName = "Animal Companion"; break; + } + } + } + else //<250 + { + if (nFeat < 210) + { + switch (nFeat) + { +case 200: sName = "Woodland Stride"; break; +case 201: sName = "Trackless Step"; break; +case 202: sName = "Resist Natures Lure"; break; +case 203: sName = "Venom Immunity"; break; +case 204: sName = "Flurry Of Blows"; break; +case 206: sName = "Evasion"; break; +case 207: sName = "Monk Endurance"; break; +case 208: sName = "Still Mind"; break; +case 209: sName = "Purity Of Body"; break; + } + } + else if (nFeat < 220) + { + switch (nFeat) + { +case 211: sName = "Wholeness Of Body"; break; +case 212: sName = "Improved Evasion"; break; +case 213: sName = "Ki Strike"; break; +case 214: sName = "Diamond Body"; break; +case 215: sName = "Diamond Soul"; break; +case 216: sName = "Perfect Self"; break; +case 217: sName = "Divine Grace"; break; +case 219: sName = "Divine Health"; break; + } + } + else if (nFeat < 230) + { + switch (nFeat) + { +case 221: sName = "Sneak Attack"; break; +case 222: sName = "Crippling Strike"; break; +case 223: sName = "Defensive Roll"; break; +case 224: sName = "Opportunist"; break; +case 225: sName = "Skill Mastery"; break; +case 226: sName = "Uncanny Reflex"; break; +case 227: sName = "Stonecunning"; break; +case 228: sName = "Darkvision"; break; +case 229: sName = "Hardiness Versus Poisons"; break; + } + } + else if (nFeat < 240) + { + switch (nFeat) + { +case 230: sName = "Hardiness Versus Spells"; break; +case 231: sName = "Battle Training Versus Orcs"; break; +case 232: sName = "Battle Training Versus Goblins"; break; +case 233: sName = "Battle Training Versus Giants"; break; +case 234: sName = "Skill Affinity Lore"; break; +case 235: sName = "Immunity To Sleep"; break; +case 236: sName = "Hardiness Versus Enchantments"; break; +case 237: sName = "Skill Affinity Listen"; break; +case 238: sName = "Skill Affinity Search"; break; +case 239: sName = "Skill Affinity Spot"; break; + } + } + else //<250 + { + switch (nFeat) + { +case 240: sName = "Keen Sense"; break; +case 241: sName = "Hardiness Versus Illusions"; break; +case 242: sName = "Battle Training Versus Reptilians"; break; +case 243: sName = "Skill Affinity Concentration"; break; +case 244: sName = "Partial Skill Affinity Listen"; break; +case 245: sName = "Partial Skill Affinity Search"; break; +case 246: sName = "Partial Skill Affinity Spot"; break; +case 247: sName = "Skill Affinity Move Silently"; break; +case 248: sName = "Lucky"; break; +case 249: sName = "Fearless"; break; + } + } + } + } +else if (nFeat < 500) + { + if (nFeat < 300) + { + if (nFeat < 260) + { + switch (nFeat) + { +case 250: sName = "Good Aim"; break; +case 251: sName = "Uncanny Dodge 2"; break; +case 252: sName = "Uncanny Dodge 3"; break; +case 253: sName = "Uncanny Dodge 4"; break; +case 254: sName = "Uncanny Dodge 5"; break; +case 255: sName = "Uncanny Dodge 6"; break; +case 256: sName = "Weapon Proficiency Elf"; break; +case 257: sName = "Bard Songs"; break; +case 258: sName = "Quick To Master"; break; +case 259: sName = "Slippery Mind"; break; + } + } + else if (nFeat < 270) + { + switch (nFeat) + { +case 260: sName = "Monk Ac Bonus"; break; +case 261: sName = "Favored Enemy Dwarf"; break; +case 262: sName = "Favored Enemy Elf"; break; +case 263: sName = "Favored Enemy Gnome"; break; +case 264: sName = "Favored Enemy Halfling"; break; +case 265: sName = "Favored Enemy Halfelf"; break; +case 266: sName = "Favored Enemy Halforc"; break; +case 267: sName = "Favored Enemy Human"; break; +case 268: sName = "Favored Enemy Aberration"; break; +case 269: sName = "Favored Enemy Animal"; break; + } + } + else if (nFeat < 280) + { + switch (nFeat) + { +case 270: sName = "Favored Enemy Beast"; break; +case 271: sName = "Favored Enemy Construct"; break; +case 272: sName = "Favored Enemy Dragon"; break; +case 273: sName = "Favored Enemy Goblinoid"; break; +case 274: sName = "Favored Enemy Monstrous"; break; +case 275: sName = "Favored Enemy Orc"; break; +case 276: sName = "Favored Enemy Reptilian"; break; +case 277: sName = "Favored Enemy Elemental"; break; +case 278: sName = "Favored Enemy Fey"; break; +case 279: sName = "Favored Enemy Giant"; break; + } + } + else if (nFeat < 290) + { + switch (nFeat) + { +case 280: sName = "Favored Enemy Magical Beast"; break; +case 281: sName = "Favored Enemy Outsider"; break; +case 284: sName = "Favored Enemy Shapechanger"; break; +case 285: sName = "Favored Enemy Undead"; break; +case 286: sName = "Favored Enemy Vermin"; break; +case 289: sName = "Weapon Proficiency Creature"; break; + } + } + else //<300 + { + switch (nFeat) + { +case 290: sName = "Weapon Specialization Creature"; break; +case 291: sName = "Weapon Focus Creature"; break; +case 292: sName = "Improved Critical Creature"; break; +case 293: sName = "Barbarian Rage"; break; +case 294: sName = "Turn Undead"; break; +case 296: sName = "Quivering Palm"; break; +case 297: sName = "Empty Body"; break; +case 299: sName = "Lay On Hands"; break; + } + } + } + else if (nFeat < 350) + { + if (nFeat < 310) + { + switch (nFeat) + { +case 300: sName = "Aura Of Courage"; break; +case 301: sName = "Smite Evil"; break; +case 302: sName = "Remove Disease"; break; +case 303: sName = "Summon Familiar"; break; +case 304: sName = "Elemental Shape"; break; +case 305: sName = "Wild Shape"; break; +case 306: sName = "War Domain Power"; break; +case 307: sName = "Strength Domain Power"; break; +case 308: sName = "Protection Domain Power"; break; +case 309: sName = "Luck Domain Power"; break; + } + } + else if (nFeat < 320) + { + switch (nFeat) + { +case 310: sName = "Death Domain Power"; break; +case 311: sName = "Air Domain Power"; break; +case 312: sName = "Animal Domain Power"; break; +case 313: sName = "Destruction Domain Power"; break; +case 314: sName = "Earth Domain Power"; break; +case 315: sName = "Evil Domain Power"; break; +case 316: sName = "Fire Domain Power"; break; +case 317: sName = "Good Domain Power"; break; +case 318: sName = "Healing Domain Power"; break; +case 319: sName = "Knowledge Domain Power"; break; + } + } + else if (nFeat < 330) + { + switch (nFeat) + { +case 320: sName = "Magic Domain Power"; break; +case 321: sName = "Plant Domain Power"; break; +case 322: sName = "Sun Domain Power"; break; +case 323: sName = "Travel Domain Power"; break; +case 324: sName = "Trickery Domain Power"; break; +case 325: sName = "Water Domain Power"; break; +case 326: sName = "Barbarian Rage"; break; +case 327: sName = "Barbarian Rage"; break; +case 328: sName = "Barbarian Rage"; break; +case 329: sName = "Barbarian Rage"; break; + } + } + else if (nFeat < 340) + { + switch (nFeat) + { +case 330: sName = "Barbarian Rage"; break; +case 331: sName = "Barbarian Rage"; break; +case 332: sName = "Damage Reduction"; break; +case 333: sName = "Damage Reduction"; break; +case 334: sName = "Damage Reduction"; break; +case 335: sName = "Wild Shape"; break; +case 336: sName = "Wild Shape"; break; +case 337: sName = "Wild Shape"; break; +case 338: sName = "Wild Shape"; break; +case 339: sName = "Wild Shape"; break; + } + } + else //<350 + { + switch (nFeat) + { +case 340: sName = "Elemental Shape"; break; +case 341: sName = "Elemental Shape"; break; +case 342: sName = "Elemental Shape"; break; +case 343: sName = "Ki Strike"; break; +case 344: sName = "Ki Strike"; break; +case 345: sName = "Sneak Attack"; break; +case 346: sName = "Sneak Attack"; break; +case 347: sName = "Sneak Attack"; break; +case 348: sName = "Sneak Attack"; break; +case 349: sName = "Sneak Attack"; break; + } + } + } + else if (nFeat < 400) + { + if (nFeat < 360) + { + switch (nFeat) + { +case 350: sName = "Sneak Attack"; break; +case 351: sName = "Sneak Attack"; break; +case 352: sName = "Sneak Attack"; break; +case 353: sName = "Sneak Attack"; break; +case 354: sName = "Lowlightvision"; break; +case 355: sName = "Bard Songs"; break; +case 356: sName = "Bard Songs"; break; +case 357: sName = "Bard Songs"; break; +case 358: sName = "Bard Songs"; break; +case 359: sName = "Bard Songs"; break; + } + } + else if (nFeat < 370) + { + switch (nFeat) + { +case 360: sName = "Bard Songs"; break; +case 361: sName = "Bard Songs"; break; +case 362: sName = "Bard Songs"; break; +case 363: sName = "Bard Songs"; break; +case 364: sName = "Bard Songs"; break; +case 365: sName = "Bard Songs"; break; +case 366: sName = "Bard Songs"; break; +case 367: sName = "Bard Songs"; break; +case 368: sName = "Bard Songs"; break; +case 369: sName = "Bard Songs"; break; + } + } + else if (nFeat < 380) + { + switch (nFeat) + { +case 370: sName = "Bard Songs"; break; +case 371: sName = "Bard Songs"; break; +case 372: sName = "Bard Songs"; break; +case 373: sName = "Bard Songs"; break; +case 374: sName = "Ambidexterity"; break; +case 375: sName = "Ambidexterity"; break; +case 377: sName = "Improved Initiative"; break; +case 378: sName = "Artist"; break; +case 379: sName = "Blooded"; break; + } + } + else if (nFeat < 390) + { + switch (nFeat) + { +case 380: sName = "Bullheaded"; break; +case 381: sName = "Courteous Magocracy"; break; +case 382: sName = "Luck Of Heroes"; break; +case 383: sName = "Resist Poison"; break; +case 384: sName = "Silver Palm"; break; +case 385: sName = "Smooth Talk"; break; +case 386: sName = "Snake Blood"; break; +case 387: sName = "Stealthy"; break; +case 388: sName = "Strong Soul"; break; +case 389: sName = "Expertise"; break; + } + } + else //<400 + { + switch (nFeat) + { +case 390: sName = "Improved Expertise"; break; +case 391: sName = "Great Cleave"; break; +case 392: sName = "Spring Attack"; break; +case 393: sName = "Greater Spell Focus Abjuration"; break; +case 394: sName = "Greater Spell Focus Conjuration"; break; +case 395: sName = "Greater Spell Focus Divination"; break; +case 396: sName = "Greater Spell Focus Enchantment"; break; +case 397: sName = "Greater Spell Focus Evocation"; break; +case 398: sName = "Greater Spell Focus Illusion"; break; +case 399: sName = "Greater Spell Focus Necromancy"; break; + } + } + } + else if (nFeat < 450) + { + if (nFeat < 410) + { + switch (nFeat) + { +case 400: sName = "Greater Spell Focus Transmutation"; break; +case 401: sName = "Greater Spell Penetration"; break; +case 402: sName = "Thug"; break; +case 403: sName = "Mercantile Background"; break; +case 404: sName = "Skill Focus Appraise"; break; +case 406: sName = "Skill Focus Tumble"; break; +case 407: sName = "Skill Focus Craft Trap"; break; +case 408: sName = "Blind Fight"; break; +case 409: sName = "Circle Kick"; break; + } + } + else if (nFeat < 420) + { + switch (nFeat) + { +case 410: sName = "Extra Stunning Attack"; break; +case 411: sName = "Rapid Reload"; break; +case 412: sName = "Zen Archery"; break; +case 413: sName = "Divine Might"; break; +case 414: sName = "Divine Shield"; break; +case 415: sName = "Arcane Defense Abjuration"; break; +case 416: sName = "Arcane Defense Conjuration"; break; +case 417: sName = "Arcane Defense Divination"; break; +case 418: sName = "Arcane Defense Enchatment"; break; +case 419: sName = "Arcane Defense Evocation"; break; + } + } + else if (nFeat < 430) + { + switch (nFeat) + { +case 420: sName = "Arcane Defense Illusion"; break; +case 421: sName = "Arcane Defense Necromancy"; break; +case 422: sName = "Arcane Defense Transmutation"; break; +case 423: sName = "Extra Music"; break; +case 424: sName = "Lingering Song"; break; +case 425: sName = "Dirty Fighting"; break; +case 426: sName = "Resist Disease"; break; +case 427: sName = "Resist Energy Cold"; break; +case 428: sName = "Resist Energy Acid"; break; +case 429: sName = "Resist Energy Fire"; break; + } + } + else if (nFeat < 440) + { + switch (nFeat) + { +case 430: sName = "Resist Energy Electrical"; break; +case 431: sName = "Resist Energy Sonic"; break; +case 433: sName = "Hide In Plain Sight"; break; +case 434: sName = "Shadow Daze"; break; +case 435: sName = "Summon Shadow"; break; +case 436: sName = "Shadow Evade"; break; +case 437: sName = "Deneirs Eye"; break; +case 438: sName = "Tymoras Smile"; break; +case 439: sName = "Lliiras Heart"; break; + } + } + else //<450 + { + switch (nFeat) + { +case 440: sName = "Craft Harper Item"; break; +case 441: sName = "Harper Sleep"; break; +case 442: sName = "Harper Cats Grace"; break; +case 443: sName = "Harper Eagles Splendor"; break; +case 444: sName = "Harper Invisibility"; break; +case 445: sName = "Prestige Enchant Arrow 1"; break; +case 446: sName = "Prestige Enchant Arrow 2"; break; +case 447: sName = "Prestige Enchant Arrow 3"; break; +case 448: sName = "Prestige Enchant Arrow 4"; break; +case 449: sName = "Prestige Enchant Arrow 5"; break; + } + } + } + else //<500 + { + if (nFeat < 460) + { + switch (nFeat) + { +case 450: sName = "Prestige Embue Arrow"; break; +case 451: sName = "Prestige Seeker Arrow 1"; break; +case 452: sName = "Prestige Seeker Arrow 2"; break; +case 453: sName = "Prestige Hail Of Arrows"; break; +case 454: sName = "Prestige Arrow Of Death"; break; +case 455: sName = "Prestige Death Attack 1"; break; +case 456: sName = "Prestige Death Attack 2"; break; +case 457: sName = "Prestige Death Attack 3"; break; +case 458: sName = "Prestige Death Attack 4"; break; +case 459: sName = "Prestige Death Attack 5"; break; + } + } + else if (nFeat < 470) + { + switch (nFeat) + { +case 460: sName = "Blackguard Sneak Attack 1d6"; break; +case 461: sName = "Blackguard Sneak Attack 2d6"; break; +case 462: sName = "Blackguard Sneak Attack 3d6"; break; +case 463: sName = "Prestige Poison Save 1"; break; +case 464: sName = "Prestige Poison Save 2"; break; +case 465: sName = "Prestige Poison Save 3"; break; +case 466: sName = "Prestige Poison Save 4"; break; +case 467: sName = "Prestige Poison Save 5"; break; +case 468: sName = "Prestige Spell Ghostly Visage"; break; +case 469: sName = "Prestige Darkness"; break; + } + } + else if (nFeat < 480) + { + switch (nFeat) + { +case 470: sName = "Prestige Invisibility 1"; break; +case 471: sName = "Prestige Invisibility 2"; break; +case 472: sName = "Smite Good"; break; +case 473: sName = "Prestige Dark Blessing"; break; +case 474: sName = "Inflict Light Wounds"; break; +case 475: sName = "Inflict Moderate Wounds"; break; +case 476: sName = "Inflict Serious Wounds"; break; +case 477: sName = "Inflict Critical Wounds"; break; +case 478: sName = "Bulls Strength"; break; +case 479: sName = "Contagion"; break; + } + } + else //<500 + { + switch (nFeat) + { +case 490: sName = "Epic Armor Skin"; break; +case 491: sName = "Epic Blinding Speed"; break; +case 492: sName = "Epic Damage Reduction 3"; break; +case 493: sName = "Epic Damage Reduction 6"; break; +case 494: sName = "Epic Damage Reduction 9"; break; +case 495: sName = "Epic Devastating Critical Club"; break; +case 496: sName = "Epic Devastating Critical Dagger"; break; +case 497: sName = "Epic Devastating Critical Dart"; break; +case 498: sName = "Epic Devastating Critical Heavycrossbow"; break; +case 499: sName = "Epic Devastating Critical Lightcrossbow"; break; + } + } + } + } +else if (nFeat < 750) + { + if (nFeat < 550) + { + if (nFeat < 510) + { + switch (nFeat) + { +case 500: sName = "Epic Devastating Critical Lightmace"; break; +case 501: sName = "Epic Devastating Critical Morningstar"; break; +case 502: sName = "Epic Devastating Critical Quarterstaff"; break; +case 503: sName = "Epic Devastating Critical Shortspear"; break; +case 504: sName = "Epic Devastating Critical Sickle"; break; +case 505: sName = "Epic Devastating Critical Sling"; break; +case 506: sName = "Epic Devastating Critical Unarmed"; break; +case 507: sName = "Epic Devastating Critical Longbow"; break; +case 508: sName = "Epic Devastating Critical Shortbow"; break; +case 509: sName = "Epic Devastating Critical Shortsword"; break; + } + } + else if (nFeat < 520) + { + switch (nFeat) + { +case 510: sName = "Epic Devastating Critical Rapier"; break; +case 511: sName = "Epic Devastating Critical Scimitar"; break; +case 512: sName = "Epic Devastating Critical Longsword"; break; +case 513: sName = "Epic Devastating Critical Greatsword"; break; +case 514: sName = "Epic Devastating Critical Handaxe"; break; +case 515: sName = "Epic Devastating Critical Throwingaxe"; break; +case 516: sName = "Epic Devastating Critical Battleaxe"; break; +case 517: sName = "Epic Devastating Critical Greataxe"; break; +case 518: sName = "Epic Devastating Critical Halberd"; break; +case 519: sName = "Epic Devastating Critical Lighthammer"; break; + } + } + else if (nFeat < 530) + { + switch (nFeat) + { +case 520: sName = "Epic Devastating Critical Lightflail"; break; +case 521: sName = "Epic Devastating Critical Warhammer"; break; +case 522: sName = "Epic Devastating Critical Heavyflail"; break; +case 523: sName = "Epic Devastating Critical Kama"; break; +case 524: sName = "Epic Devastating Critical Kukri"; break; +case 525: sName = "Epic Devastating Critical Shuriken"; break; +case 526: sName = "Epic Devastating Critical Scythe"; break; +case 527: sName = "Epic Devastating Critical Katana"; break; +case 528: sName = "Epic Devastating Critical Bastardsword"; break; +case 529: sName = "Epic Devastating Critical Diremace"; break; + } + } + else if (nFeat < 540) + { + switch (nFeat) + { +case 530: sName = "Epic Devastating Critical Doubleaxe"; break; +case 531: sName = "Epic Devastating Critical Twobladedsword"; break; +case 532: sName = "Epic Devastating Critical Creature"; break; +case 533: sName = "Epic Energy Resistance Cold 1"; break; +case 534: sName = "Epic Energy Resistance Cold 2"; break; +case 535: sName = "Epic Energy Resistance Cold 3"; break; +case 536: sName = "Epic Energy Resistance Cold 4"; break; +case 537: sName = "Epic Energy Resistance Cold 5"; break; +case 538: sName = "Epic Energy Resistance Cold 6"; break; +case 539: sName = "Epic Energy Resistance Cold 7"; break; + } + } + else //<550 + { + switch (nFeat) + { +case 540: sName = "Epic Energy Resistance Cold 8"; break; +case 541: sName = "Epic Energy Resistance Cold 9"; break; +case 542: sName = "Epic Energy Resistance Cold 10"; break; +case 543: sName = "Epic Energy Resistance Acid 1"; break; +case 544: sName = "Epic Energy Resistance Acid 2"; break; +case 545: sName = "Epic Energy Resistance Acid 3"; break; +case 546: sName = "Epic Energy Resistance Acid 4"; break; +case 547: sName = "Epic Energy Resistance Acid 5"; break; +case 548: sName = "Epic Energy Resistance Acid 6"; break; +case 549: sName = "Epic Energy Resistance Acid 7"; break; + } + } + } + else if (nFeat < 600) + { + if (nFeat < 560) + { + switch (nFeat) + { +case 550: sName = "Epic Energy Resistance Acid 8"; break; +case 551: sName = "Epic Energy Resistance Acid 9"; break; +case 552: sName = "Epic Energy Resistance Acid 10"; break; +case 553: sName = "Epic Energy Resistance Fire 1"; break; +case 554: sName = "Epic Energy Resistance Fire 2"; break; +case 555: sName = "Epic Energy Resistance Fire 3"; break; +case 556: sName = "Epic Energy Resistance Fire 4"; break; +case 557: sName = "Epic Energy Resistance Fire 5"; break; +case 558: sName = "Epic Energy Resistance Fire 6"; break; +case 559: sName = "Epic Energy Resistance Fire 7"; break; + } + } + else if (nFeat < 570) + { + switch (nFeat) + { +case 560: sName = "Epic Energy Resistance Fire 8"; break; +case 561: sName = "Epic Energy Resistance Fire 9"; break; +case 562: sName = "Epic Energy Resistance Fire 10"; break; +case 563: sName = "Epic Energy Resistance Electrical 1"; break; +case 564: sName = "Epic Energy Resistance Electrical 2"; break; +case 565: sName = "Epic Energy Resistance Electrical 3"; break; +case 566: sName = "Epic Energy Resistance Electrical 4"; break; +case 567: sName = "Epic Energy Resistance Electrical 5"; break; +case 568: sName = "Epic Energy Resistance Electrical 6"; break; +case 569: sName = "Epic Energy Resistance Electrical 7"; break; + } + } + else if (nFeat < 580) + { + switch (nFeat) + { +case 570: sName = "Epic Energy Resistance Electrical 8"; break; +case 571: sName = "Epic Energy Resistance Electrical 9"; break; +case 572: sName = "Epic Energy Resistance Electrical 10"; break; +case 573: sName = "Epic Energy Resistance Sonic 1"; break; +case 574: sName = "Epic Energy Resistance Sonic 2"; break; +case 575: sName = "Epic Energy Resistance Sonic 3"; break; +case 576: sName = "Epic Energy Resistance Sonic 4"; break; +case 577: sName = "Epic Energy Resistance Sonic 5"; break; +case 578: sName = "Epic Energy Resistance Sonic 6"; break; +case 579: sName = "Epic Energy Resistance Sonic 7"; break; + } + } + else if (nFeat < 590) + { + switch (nFeat) + { +case 580: sName = "Epic Energy Resistance Sonic 8"; break; +case 581: sName = "Epic Energy Resistance Sonic 9"; break; +case 582: sName = "Epic Energy Resistance Sonic 10"; break; +case 583: sName = "Epic Fortitude"; break; +case 584: sName = "Epic Prowess"; break; +case 585: sName = "Epic Reflexes"; break; +case 586: sName = "Epic Reputation"; break; +case 587: sName = "Epic Skill Focus Animal Empathy"; break; +case 588: sName = "Epic Skill Focus Appraise"; break; +case 589: sName = "Epic Skill Focus Concentration"; break; + } + } + else //<600 + { + switch (nFeat) + { +case 590: sName = "Epic Skill Focus Craft Trap"; break; +case 591: sName = "Epic Skill Focus Disabletrap"; break; +case 592: sName = "Epic Skill Focus Discipline"; break; +case 593: sName = "Epic Skill Focus Heal"; break; +case 594: sName = "Epic Skill Focus Hide"; break; +case 595: sName = "Epic Skill Focus Listen"; break; +case 596: sName = "Epic Skill Focus Lore"; break; +case 597: sName = "Epic Skill Focus Movesilently"; break; +case 598: sName = "Epic Skill Focus Openlock"; break; +case 599: sName = "Epic Skill Focus Parry"; break; + } + } + } + else if (nFeat < 650) + { + if (nFeat < 610) + { + switch (nFeat) + { +case 600: sName = "Epic Skill Focus Perform"; break; +case 601: sName = "Epic Skill Focus Persuade"; break; +case 602: sName = "Epic Skill Focus Pickpocket"; break; +case 603: sName = "Epic Skill Focus Search"; break; +case 604: sName = "Epic Skill Focus Settrap"; break; +case 605: sName = "Epic Skill Focus Spellcraft"; break; +case 606: sName = "Epic Skill Focus Spot"; break; +case 607: sName = "Epic Skill Focus Taunt"; break; +case 608: sName = "Epic Skill Focus Tumble"; break; +case 609: sName = "Epic Skill Focus Usemagicdevice"; break; + } + } + else if (nFeat < 620) + { + switch (nFeat) + { +case 610: sName = "Epic Spell Focus Abjuration"; break; +case 611: sName = "Epic Spell Focus Conjuration"; break; +case 612: sName = "Epic Spell Focus Divination"; break; +case 613: sName = "Epic Spell Focus Enchantment"; break; +case 614: sName = "Epic Spell Focus Evocation"; break; +case 615: sName = "Epic Spell Focus Illusion"; break; +case 616: sName = "Epic Spell Focus Necromancy"; break; +case 617: sName = "Epic Spell Focus Transmutation"; break; +case 618: sName = "Epic Spell Penetration"; break; +case 619: sName = "Epic Weapon Focus Club"; break; + } + } + else if (nFeat < 630) + { + switch (nFeat) + { +case 620: sName = "Epic Weapon Focus Dagger"; break; +case 621: sName = "Epic Weapon Focus Dart"; break; +case 622: sName = "Epic Weapon Focus Heavycrossbow"; break; +case 623: sName = "Epic Weapon Focus Lightcrossbow"; break; +case 624: sName = "Epic Weapon Focus Lightmace"; break; +case 625: sName = "Epic Weapon Focus Morningstar"; break; +case 626: sName = "Epic Weapon Focus Quarterstaff"; break; +case 627: sName = "Epic Weapon Focus Shortspear"; break; +case 628: sName = "Epic Weapon Focus Sickle"; break; +case 629: sName = "Epic Weapon Focus Sling"; break; + } + } + else if (nFeat < 640) + { + switch (nFeat) + { +case 630: sName = "Epic Weapon Focus Unarmed"; break; +case 631: sName = "Epic Weapon Focus Longbow"; break; +case 632: sName = "Epic Weapon Focus Shortbow"; break; +case 633: sName = "Epic Weapon Focus Shortsword"; break; +case 634: sName = "Epic Weapon Focus Rapier"; break; +case 635: sName = "Epic Weapon Focus Scimitar"; break; +case 636: sName = "Epic Weapon Focus Longsword"; break; +case 637: sName = "Epic Weapon Focus Greatsword"; break; +case 638: sName = "Epic Weapon Focus Handaxe"; break; +case 639: sName = "Epic Weapon Focus Throwingaxe"; break; + } + } + else //<650 + { + switch (nFeat) + { +case 640: sName = "Epic Weapon Focus Battleaxe"; break; +case 641: sName = "Epic Weapon Focus Greataxe"; break; +case 642: sName = "Epic Weapon Focus Halberd"; break; +case 643: sName = "Epic Weapon Focus Lighthammer"; break; +case 644: sName = "Epic Weapon Focus Lightflail"; break; +case 645: sName = "Epic Weapon Focus Warhammer"; break; +case 646: sName = "Epic Weapon Focus Heavyflail"; break; +case 647: sName = "Epic Weapon Focus Kama"; break; +case 648: sName = "Epic Weapon Focus Kukri"; break; +case 649: sName = "Epic Weapon Focus Shuriken"; break; + } + } + } + else if (nFeat < 700) + { + if (nFeat < 660) + { + switch (nFeat) + { +case 650: sName = "Epic Weapon Focus Scythe"; break; +case 651: sName = "Epic Weapon Focus Katana"; break; +case 652: sName = "Epic Weapon Focus Bastardsword"; break; +case 653: sName = "Epic Weapon Focus Diremace"; break; +case 654: sName = "Epic Weapon Focus Doubleaxe"; break; +case 655: sName = "Epic Weapon Focus Twobladedsword"; break; +case 656: sName = "Epic Weapon Focus Creature"; break; +case 657: sName = "Epic Weapon Specialization Club"; break; +case 658: sName = "Epic Weapon Specialization Dagger"; break; +case 659: sName = "Epic Weapon Specialization Dart"; break; + } + } + else if (nFeat < 670) + { + switch (nFeat) + { +case 660: sName = "Epic Weapon Specialization Heavycrossbow"; break; +case 661: sName = "Epic Weapon Specialization Lightcrossbow"; break; +case 662: sName = "Epic Weapon Specialization Lightmace"; break; +case 663: sName = "Epic Weapon Specialization Morningstar"; break; +case 664: sName = "Epic Weapon Specialization Quarterstaff"; break; +case 665: sName = "Epic Weapon Specialization Shortspear"; break; +case 666: sName = "Epic Weapon Specialization Sickle"; break; +case 667: sName = "Epic Weapon Specialization Sling"; break; +case 668: sName = "Epic Weapon Specialization Unarmed"; break; +case 669: sName = "Epic Weapon Specialization Longbow"; break; + } + } + else if (nFeat < 680) + { + switch (nFeat) + { +case 670: sName = "Epic Weapon Specialization Shortbow"; break; +case 671: sName = "Epic Weapon Specialization Shortsword"; break; +case 672: sName = "Epic Weapon Specialization Rapier"; break; +case 673: sName = "Epic Weapon Specialization Scimitar"; break; +case 674: sName = "Epic Weapon Specialization Longsword"; break; +case 675: sName = "Epic Weapon Specialization Greatsword"; break; +case 676: sName = "Epic Weapon Specialization Handaxe"; break; +case 677: sName = "Epic Weapon Specialization Throwingaxe"; break; +case 678: sName = "Epic Weapon Specialization Battleaxe"; break; +case 679: sName = "Epic Weapon Specialization Greataxe"; break; + } + } + else if (nFeat < 690) + { + switch (nFeat) + { +case 680: sName = "Epic Weapon Specialization Halberd"; break; +case 681: sName = "Epic Weapon Specialization Lighthammer"; break; +case 682: sName = "Epic Weapon Specialization Lightflail"; break; +case 683: sName = "Epic Weapon Specialization Warhammer"; break; +case 684: sName = "Epic Weapon Specialization Heavyflail"; break; +case 685: sName = "Epic Weapon Specialization Kama"; break; +case 686: sName = "Epic Weapon Specialization Kukri"; break; +case 687: sName = "Epic Weapon Specialization Shuriken"; break; +case 688: sName = "Epic Weapon Specialization Scythe"; break; +case 689: sName = "Epic Weapon Specialization Katana"; break; + } + } + else //<700 + { + switch (nFeat) + { +case 690: sName = "Epic Weapon Specialization Bastardsword"; break; +case 691: sName = "Epic Weapon Specialization Diremace"; break; +case 692: sName = "Epic Weapon Specialization Doubleaxe"; break; +case 693: sName = "Epic Weapon Specialization Twobladedsword"; break; +case 694: sName = "Epic Weapon Specialization Creature"; break; +case 695: sName = "Epic Will"; break; +case 696: sName = "Epic Improved Combat Casting"; break; +case 697: sName = "Epic Improved Ki Strike 4"; break; +case 698: sName = "Epic Improved Ki Strike 5"; break; +case 699: sName = "Epic Improved Spell Resistance 1"; break; + } + } + } + else //<750 + { + if (nFeat < 710) + { + switch (nFeat) + { +case 700: sName = "Epic Improved Spell Resistance 2"; break; +case 701: sName = "Epic Improved Spell Resistance 3"; break; +case 702: sName = "Epic Improved Spell Resistance 4"; break; +case 703: sName = "Epic Improved Spell Resistance 5"; break; +case 704: sName = "Epic Improved Spell Resistance 6"; break; +case 705: sName = "Epic Improved Spell Resistance 7"; break; +case 706: sName = "Epic Improved Spell Resistance 8"; break; +case 707: sName = "Epic Improved Spell Resistance 9"; break; +case 708: sName = "Epic Improved Spell Resistance 10"; break; +case 709: sName = "Epic Overwhelming Critical Club"; break; + } + } + else if (nFeat < 720) + { + switch (nFeat) + { +case 710: sName = "Epic Overwhelming Critical Dagger"; break; +case 711: sName = "Epic Overwhelming Critical Dart"; break; +case 712: sName = "Epic Overwhelming Critical Heavycrossbow"; break; +case 713: sName = "Epic Overwhelming Critical Lightcrossbow"; break; +case 714: sName = "Epic Overwhelming Critical Lightmace"; break; +case 715: sName = "Epic Overwhelming Critical Morningstar"; break; +case 716: sName = "Epic Overwhelming Critical Quarterstaff"; break; +case 717: sName = "Epic Overwhelming Critical Shortspear"; break; +case 718: sName = "Epic Overwhelming Critical Sickle"; break; +case 719: sName = "Epic Overwhelming Critical Sling"; break; + } + } + else if (nFeat < 730) + { + switch (nFeat) + { +case 720: sName = "Epic Overwhelming Critical Unarmed"; break; +case 721: sName = "Epic Overwhelming Critical Longbow"; break; +case 722: sName = "Epic Overwhelming Critical Shortbow"; break; +case 723: sName = "Epic Overwhelming Critical Shortsword"; break; +case 724: sName = "Epic Overwhelming Critical Rapier"; break; +case 725: sName = "Epic Overwhelming Critical Scimitar"; break; +case 726: sName = "Epic Overwhelming Critical Longsword"; break; +case 727: sName = "Epic Overwhelming Critical Greatsword"; break; +case 728: sName = "Epic Overwhelming Critical Handaxe"; break; +case 729: sName = "Epic Overwhelming Critical Throwingaxe"; break; + } + } + else if (nFeat < 740) + { + switch (nFeat) + { +case 730: sName = "Epic Overwhelming Critical Battleaxe"; break; +case 731: sName = "Epic Overwhelming Critical Greataxe"; break; +case 732: sName = "Epic Overwhelming Critical Halberd"; break; +case 733: sName = "Epic Overwhelming Critical Lighthammer"; break; +case 734: sName = "Epic Overwhelming Critical Lightflail"; break; +case 735: sName = "Epic Overwhelming Critical Warhammer"; break; +case 736: sName = "Epic Overwhelming Critical Heavyflail"; break; +case 737: sName = "Epic Overwhelming Critical Kama"; break; +case 738: sName = "Epic Overwhelming Critical Kukri"; break; +case 739: sName = "Epic Overwhelming Critical Shuriken"; break; + } + } + else //750 + { + switch (nFeat) + { +case 740: sName = "Epic Overwhelming Critical Scythe"; break; +case 741: sName = "Epic Overwhelming Critical Katana"; break; +case 742: sName = "Epic Overwhelming Critical Bastardsword"; break; +case 743: sName = "Epic Overwhelming Critical Diremace"; break; +case 744: sName = "Epic Overwhelming Critical Doubleaxe"; break; +case 745: sName = "Epic Overwhelming Critical Twobladedsword"; break; +case 746: sName = "Epic Overwhelming Critical Creature"; break; +case 747: sName = "Epic Perfect Health"; break; +case 748: sName = "Epic Self Concealment 1"; break; +case 749: sName = "Epic Self Concealment 2"; break; + } + } + } + } +else + { + if (nFeat < 800) + { + if (nFeat < 760) + { + switch (nFeat) + { +case 750: sName = "Epic Self Concealment 3"; break; +case 751: sName = "Epic Self Concealment 4"; break; +case 752: sName = "Epic Self Concealment 5"; break; +case 753: sName = "Epic Superior Initiative"; break; +case 754: sName = "Epic Toughness 1"; break; +case 755: sName = "Epic Toughness 2"; break; +case 756: sName = "Epic Toughness 3"; break; +case 757: sName = "Epic Toughness 4"; break; +case 758: sName = "Epic Toughness 5"; break; +case 759: sName = "Epic Toughness 6"; break; + } + } + else if (nFeat < 770) + { + switch (nFeat) + { +case 760: sName = "Epic Toughness 7"; break; +case 761: sName = "Epic Toughness 8"; break; +case 762: sName = "Epic Toughness 9"; break; +case 763: sName = "Epic Toughness 10"; break; +case 764: sName = "Epic Great Charisma 1"; break; +case 765: sName = "Epic Great Charisma 2"; break; +case 766: sName = "Epic Great Charisma 3"; break; +case 767: sName = "Epic Great Charisma 4"; break; +case 768: sName = "Epic Great Charisma 5"; break; +case 769: sName = "Epic Great Charisma 6"; break; + } + } + else if (nFeat < 780) + { + switch (nFeat) + { +case 770: sName = "Epic Great Charisma 7"; break; +case 771: sName = "Epic Great Charisma 8"; break; +case 772: sName = "Epic Great Charisma 9"; break; +case 773: sName = "Epic Great Charisma 10"; break; +case 774: sName = "Epic Great Constitution 1"; break; +case 775: sName = "Epic Great Constitution 2"; break; +case 776: sName = "Epic Great Constitution 3"; break; +case 777: sName = "Epic Great Constitution 4"; break; +case 778: sName = "Epic Great Constitution 5"; break; +case 779: sName = "Epic Great Constitution 6"; break; + } + } + else if (nFeat < 790) + { + switch (nFeat) + { +case 780: sName = "Epic Great Constitution 7"; break; +case 781: sName = "Epic Great Constitution 8"; break; +case 782: sName = "Epic Great Constitution 9"; break; +case 783: sName = "Epic Great Constitution 10"; break; +case 784: sName = "Epic Great Dexterity 1"; break; +case 785: sName = "Epic Great Dexterity 2"; break; +case 786: sName = "Epic Great Dexterity 3"; break; +case 787: sName = "Epic Great Dexterity 4"; break; +case 788: sName = "Epic Great Dexterity 5"; break; +case 789: sName = "Epic Great Dexterity 6"; break; + } + } + else //<800 + { + switch (nFeat) + { +case 790: sName = "Epic Great Dexterity 7"; break; +case 791: sName = "Epic Great Dexterity 8"; break; +case 792: sName = "Epic Great Dexterity 9"; break; +case 793: sName = "Epic Great Dexterity 10"; break; +case 794: sName = "Epic Great Intelligence 1"; break; +case 795: sName = "Epic Great Intelligence 2"; break; +case 796: sName = "Epic Great Intelligence 3"; break; +case 797: sName = "Epic Great Intelligence 4"; break; +case 798: sName = "Epic Great Intelligence 5"; break; +case 799: sName = "Epic Great Intelligence 6"; break; + } + } + } + else if (nFeat < 850) + { + if (nFeat < 810) + { + switch (nFeat) + { +case 800: sName = "Epic Great Intelligence 7"; break; +case 801: sName = "Epic Great Intelligence 8"; break; +case 802: sName = "Epic Great Intelligence 9"; break; +case 803: sName = "Epic Great Intelligence 10"; break; +case 804: sName = "Epic Great Wisdom 1"; break; +case 805: sName = "Epic Great Wisdom 2"; break; +case 806: sName = "Epic Great Wisdom 3"; break; +case 807: sName = "Epic Great Wisdom 4"; break; +case 808: sName = "Epic Great Wisdom 5"; break; +case 809: sName = "Epic Great Wisdom 6"; break; + } + } + else if (nFeat < 820) + { + switch (nFeat) + { +case 810: sName = "Epic Great Wisdom 7"; break; +case 811: sName = "Epic Great Wisdom 8"; break; +case 812: sName = "Epic Great Wisdom 9"; break; +case 813: sName = "Epic Great Wisdom 10"; break; +case 814: sName = "Epic Great Strength 1"; break; +case 815: sName = "Epic Great Strength 2"; break; +case 816: sName = "Epic Great Strength 3"; break; +case 817: sName = "Epic Great Strength 4"; break; +case 818: sName = "Epic Great Strength 5"; break; +case 819: sName = "Epic Great Strength 6"; break; + } + } + else if (nFeat < 830) + { + switch (nFeat) + { +case 820: sName = "Epic Great Strength 7"; break; +case 821: sName = "Epic Great Strength 8"; break; +case 822: sName = "Epic Great Strength 9"; break; +case 823: sName = "Epic Great Strength 10"; break; +case 824: sName = "Epic Great Smiting 1"; break; +case 825: sName = "Epic Great Smiting 2"; break; +case 826: sName = "Epic Great Smiting 3"; break; +case 827: sName = "Epic Great Smiting 4"; break; +case 828: sName = "Epic Great Smiting 5"; break; +case 829: sName = "Epic Great Smiting 6"; break; + } + } + else if (nFeat < 840) + { + switch (nFeat) + { +case 830: sName = "Epic Great Smiting 7"; break; +case 831: sName = "Epic Great Smiting 8"; break; +case 832: sName = "Epic Great Smiting 9"; break; +case 833: sName = "Epic Great Smiting 10"; break; +case 834: sName = "Epic Improved Sneak Attack 1"; break; +case 835: sName = "Epic Improved Sneak Attack 2"; break; +case 836: sName = "Epic Improved Sneak Attack 3"; break; +case 837: sName = "Epic Improved Sneak Attack 4"; break; +case 838: sName = "Epic Improved Sneak Attack 5"; break; +case 839: sName = "Epic Improved Sneak Attack 6"; break; + } + } + else //<850 + { + switch (nFeat) + { +case 840: sName = "Epic Improved Sneak Attack 7"; break; +case 841: sName = "Epic Improved Sneak Attack 8"; break; +case 842: sName = "Epic Improved Sneak Attack 9"; break; +case 843: sName = "Epic Improved Sneak Attack 10"; break; +case 844: sName = "Epic Improved Stunning Fist 1"; break; +case 845: sName = "Epic Improved Stunning Fist 2"; break; +case 846: sName = "Epic Improved Stunning Fist 3"; break; +case 847: sName = "Epic Improved Stunning Fist 4"; break; +case 848: sName = "Epic Improved Stunning Fist 5"; break; +case 849: sName = "Epic Improved Stunning Fist 6"; break; + } + } + } + else if (nFeat < 900) + { + if (nFeat < 860) + { + switch (nFeat) + { +case 850: sName = "Epic Improved Stunning Fist 7"; break; +case 851: sName = "Epic Improved Stunning Fist 8"; break; +case 852: sName = "Epic Improved Stunning Fist 9"; break; +case 853: sName = "Epic Improved Stunning Fist 10"; break; +case 854: sName = "Epic Planar Turning"; break; +case 855: sName = "Epic Bane Of Enemies"; break; +case 856: sName = "Epic Dodge"; break; +case 857: sName = "Epic Automatic Quicken 1"; break; +case 858: sName = "Epic Automatic Quicken 2"; break; +case 859: sName = "Epic Automatic Quicken 3"; break; + } + } + else if (nFeat < 870) + { + switch (nFeat) + { +case 860: sName = "Epic Automatic Silent Spell 1"; break; +case 861: sName = "Epic Automatic Silent Spell 2"; break; +case 862: sName = "Epic Automatic Silent Spell 3"; break; +case 863: sName = "Epic Automatic Still Spell 1"; break; +case 864: sName = "Epic Automatic Still Spell 2"; break; +case 865: sName = "Epic Automatic Still Spell 3"; break; +case 867: sName = "Whirlwind Attack"; break; +case 868: sName = "Improved Whirlwind"; break; +case 869: sName = "Mighty Rage"; break; + } + } + else if (nFeat < 880) + { + switch (nFeat) + { +case 870: sName = "Epic Lasting Inspiration"; break; +case 871: sName = "Curse Song"; break; +case 872: sName = "Wild Shape Undead"; break; +case 873: sName = "Wild Shape Dragon"; break; +case 874: sName = "Epic Spell Mummy Dust"; break; +case 875: sName = "Epic Spell Dragon Knight"; break; +case 876: sName = "Epic Spell Hellball"; break; +case 877: sName = "Epic Spell Mage Armour"; break; +case 878: sName = "Epic Spell Ruin"; break; +case 879: sName = "Weapon Of Choice Sickle"; break; + } + } + else if (nFeat < 890) + { + switch (nFeat) + { +case 880: sName = "Weapon Of Choice Kama"; break; +case 881: sName = "Weapon Of Choice Kukri"; break; +case 882: sName = "Ki Damage"; break; +case 883: sName = "Increase Multiplier"; break; +case 884: sName = "Superior Weapon Focus"; break; +case 885: sName = "Ki Critical"; break; +case 886: sName = "Bone Skin 2"; break; +case 889: sName = "Animate Dead"; break; + } + } + else //<900 + { + switch (nFeat) + { +case 890: sName = "Summon Undead"; break; +case 891: sName = "Deathless Vigor"; break; +case 892: sName = "Undead Graft 1"; break; +case 893: sName = "Undead Graft 2"; break; +case 894: sName = "Tough As Bone"; break; +case 895: sName = "Summon Greater Undead"; break; +case 896: sName = "Deathless Mastery"; break; +case 897: sName = "Deathless Master Touch"; break; +case 898: sName = "Greater Wildshape 1"; break; + } + } + } + else if (nFeat < 950) + { + if (nFeat < 910) + { + switch (nFeat) + { +case 900: sName = "Greater Wildshape 2"; break; +case 901: sName = "Greater Wildshape 3"; break; +case 902: sName = "Humanoid Shape"; break; +case 903: sName = "Greater Wildshape 4"; break; +case 904: sName = "Sacred Defense 1"; break; +case 905: sName = "Sacred Defense 2"; break; +case 906: sName = "Sacred Defense 3"; break; +case 907: sName = "Sacred Defense 4"; break; +case 908: sName = "Sacred Defense 5"; break; +case 909: sName = "Divine Wrath"; break; + } + } + else if (nFeat < 920) + { + switch (nFeat) + { +case 910: sName = "Extra Smiting"; break; +case 911: sName = "Skill Focus Craft Armor"; break; +case 912: sName = "Skill Focus Craft Weapon"; break; +case 913: sName = "Epic Skill Focus Craft Armor"; break; +case 914: sName = "Epic Skill Focus Craft Weapon"; break; +case 915: sName = "Skill Focus Bluff"; break; +case 916: sName = "Skill Focus Intimidate"; break; +case 917: sName = "Epic Skill Focus Bluff"; break; +case 918: sName = "Epic Skill Focus Intimidate"; break; +case 919: sName = "Weapon Of Choice Club"; break; + } + } + else if (nFeat < 930) + { + switch (nFeat) + { +case 920: sName = "Weapon Of Choice Dagger"; break; +case 921: sName = "Weapon Of Choice Lightmace"; break; +case 922: sName = "Weapon Of Choice Morningstar"; break; +case 923: sName = "Weapon Of Choice Quarterstaff"; break; +case 924: sName = "Weapon Of Choice Shortspear"; break; +case 925: sName = "Weapon Of Choice Shortsword"; break; +case 926: sName = "Weapon Of Choice Rapier"; break; +case 927: sName = "Weapon Of Choice Scimitar"; break; +case 928: sName = "Weapon Of Choice Longsword"; break; +case 929: sName = "Weapon Of Choice Greatsword"; break; + } + } + else if (nFeat < 940) + { + switch (nFeat) + { +case 930: sName = "Weapon Of Choice Handaxe"; break; +case 931: sName = "Weapon Of Choice Battleaxe"; break; +case 932: sName = "Weapon Of Choice Greataxe"; break; +case 933: sName = "Weapon Of Choice Halberd"; break; +case 934: sName = "Weapon Of Choice Lighthammer"; break; +case 935: sName = "Weapon Of Choice Lightflail"; break; +case 936: sName = "Weapon Of Choice Warhammer"; break; +case 937: sName = "Weapon Of Choice Heavyflail"; break; +case 938: sName = "Weapon Of Choice Scythe"; break; +case 939: sName = "Weapon Of Choice Katana"; break; + } + } + else //<950 + { + switch (nFeat) + { +case 940: sName = "Weapon Of Choice Bastardsword"; break; +case 941: sName = "Weapon Of Choice Diremace"; break; +case 942: sName = "Weapon Of Choice Doubleaxe"; break; +case 943: sName = "Weapon Of Choice Twobladedsword"; break; +case 944: sName = "Brew Potion"; break; +case 945: sName = "Scribe Scroll"; break; +case 946: sName = "Craft Wand"; break; +case 947: sName = "Dwarven Defender Defensive Stance"; break; +case 948: sName = "Damage Reduction 6"; break; +case 949: sName = "Prestige Defensive Awareness 1"; break; + } + } + } + else if (nFeat < 1000) + { + if (nFeat < 960) + { + switch (nFeat) + { +case 950: sName = "Prestige Defensive Awareness 2"; break; +case 951: sName = "Prestige Defensive Awareness 3"; break; +case 952: sName = "Weapon Focus Dwaxe"; break; +case 953: sName = "Weapon Specialization Dwaxe"; break; +case 954: sName = "Improved Critical Dwaxe"; break; +case 955: sName = "Epic Devastating Critical Dwaxe"; break; +case 956: sName = "Epic Weapon Focus Dwaxe"; break; +case 957: sName = "Epic Weapon Specialization Dwaxe"; break; +case 958: sName = "Epic Overwhelming Critical Dwaxe"; break; +case 959: sName = "Weapon Of Choice Dwaxe"; break; + } + } + else if (nFeat < 970) + { + switch (nFeat) + { +case 960: sName = "Use Poison"; break; +case 961: sName = "Dragon Armor"; break; +case 962: sName = "Dragon Abilities"; break; +case 963: sName = "Dragon Immune Paralysis"; break; +case 964: sName = "Dragon Immune Fire"; break; +case 965: sName = "Dragon Dis Breath"; break; +case 966: sName = "Epic Fighter"; break; +case 967: sName = "Epic Barbarian"; break; +case 968: sName = "Epic Bard"; break; +case 969: sName = "Epic Cleric"; break; + } + } + else if (nFeat < 980) + { + switch (nFeat) + { +case 970: sName = "Epic Druid"; break; +case 971: sName = "Epic Monk"; break; +case 972: sName = "Epic Paladin"; break; +case 973: sName = "Epic Ranger"; break; +case 974: sName = "Epic Rogue"; break; +case 975: sName = "Epic Sorcerer"; break; +case 976: sName = "Epic Wizard"; break; +case 977: sName = "Epic Arcane Archer"; break; +case 978: sName = "Epic Assassin"; break; +case 979: sName = "Epic Blackguard"; break; + } + } + else if (nFeat < 990) + { + switch (nFeat) + { +case 980: sName = "Epic Shadowdancer"; break; +case 981: sName = "Epic Harper Scout"; break; +case 982: sName = "Epic Divine Champion"; break; +case 983: sName = "Epic Weapon Master"; break; +case 984: sName = "Epic Pale Master"; break; +case 985: sName = "Epic Dwarven Defender"; break; +case 986: sName = "Epic Shifter"; break; +case 987: sName = "Epic Red Dragon Disc"; break; +case 988: sName = "Epic Thundering Rage"; break; +case 989: sName = "Epic Terrifying Rage"; break; + } + } + else //<1000 + { + switch (nFeat) + { +case 990: sName = "Epic Spell Epic Warding"; break; +case 991: sName = "Prestige Master Crafter"; break; +case 992: sName = "Prestige Scrounger"; break; +case 993: sName = "Weapon Focus Whip"; break; +case 994: sName = "Weapon Specialization Whip"; break; +case 995: sName = "Improved Critical Whip"; break; +case 996: sName = "Epic Devastating Critical Whip"; break; +case 997: sName = "Epic Weapon Focus Whip"; break; +case 998: sName = "Epic Weapon Specialization Whip"; break; +case 999: sName = "Epic Overwhelming Critical Whip"; break; + } + } + } + else //through 1071 + { + if (nFeat < 1010) + { + switch (nFeat) + { +case 1000: sName = "Weapon Of Choice Whip"; break; +case 1001: sName = "Epic Character"; break; +case 1002: sName = "Epic Epic Shadowlord"; break; +case 1003: sName = "Epic Epic Fiend"; break; +case 1004: sName = "Prestige Death Attack 6"; break; +case 1005: sName = "Prestige Death Attack 7"; break; +case 1006: sName = "Prestige Death Attack 8"; break; +case 1007: sName = "Blackguard Sneak Attack 4d6"; break; +case 1008: sName = "Blackguard Sneak Attack 5d6"; break; +case 1009: sName = "Blackguard Sneak Attack 6d6"; break; + } + } + else if (nFeat < 1020) + { + switch (nFeat) + { +case 1010: sName = "Blackguard Sneak Attack 7d6"; break; +case 1011: sName = "Blackguard Sneak Attack 8d6"; break; +case 1012: sName = "Blackguard Sneak Attack 9d6"; break; +case 1013: sName = "Blackguard Sneak Attack 10d6"; break; +case 1014: sName = "Blackguard Sneak Attack 11d6"; break; +case 1015: sName = "Blackguard Sneak Attack 12d6"; break; +case 1016: sName = "Blackguard Sneak Attack 13d6"; break; +case 1017: sName = "Blackguard Sneak Attack 14d6"; break; +case 1018: sName = "Blackguard Sneak Attack 15d6"; break; +case 1019: sName = "Prestige Death Attack 9"; break; + } + } + else if (nFeat < 1030) + { + switch (nFeat) + { +case 1020: sName = "Prestige Death Attack 10"; break; +case 1021: sName = "Prestige Death Attack 11"; break; +case 1022: sName = "Prestige Death Attack 12"; break; +case 1023: sName = "Prestige Death Attack 13"; break; +case 1024: sName = "Prestige Death Attack 14"; break; +case 1025: sName = "Prestige Death Attack 15"; break; +case 1026: sName = "Prestige Death Attack 16"; break; +case 1027: sName = "Prestige Death Attack 17"; break; +case 1028: sName = "Prestige Death Attack 18"; break; +case 1029: sName = "Prestige Death Attack 19"; break; + } + } + else if (nFeat < 1040) + { + switch (nFeat) + { +case 1030: sName = "Prestige Death Attack 20"; break; +case 1032: sName = "Sneak Attack 11"; break; +case 1033: sName = "Sneak Attack 12"; break; +case 1034: sName = "Sneak Attack 13"; break; +case 1035: sName = "Sneak Attack 14"; break; +case 1036: sName = "Sneak Attack 15"; break; +case 1037: sName = "Sneak Attack 16"; break; +case 1038: sName = "Sneak Attack 17"; break; +case 1039: sName = "Sneak Attack 18"; break; + } + } + else if (nFeat < 1050) + { + switch (nFeat) + { +case 1040: sName = "Sneak Attack 19"; break; +case 1041: sName = "Sneak Attack 20"; break; +case 1042: sName = "Dragon Hdincrease D6"; break; +case 1043: sName = "Dragon Hdincrease D8"; break; +case 1044: sName = "Dragon Hdincrease D10"; break; +case 1045: sName = "Prestige Enchant Arrow 6"; break; +case 1046: sName = "Prestige Enchant Arrow 7"; break; +case 1047: sName = "Prestige Enchant Arrow 8"; break; +case 1048: sName = "Prestige Enchant Arrow 9"; break; +case 1049: sName = "Prestige Enchant Arrow 10"; break; + } + } + else if (nFeat < 1060) + { + switch (nFeat) + { +case 1050: sName = "Prestige Enchant Arrow 11"; break; +case 1051: sName = "Prestige Enchant Arrow 12"; break; +case 1052: sName = "Prestige Enchant Arrow 13"; break; +case 1053: sName = "Prestige Enchant Arrow 14"; break; +case 1054: sName = "Prestige Enchant Arrow 15"; break; +case 1055: sName = "Prestige Enchant Arrow 16"; break; +case 1056: sName = "Prestige Enchant Arrow 17"; break; +case 1057: sName = "Prestige Enchant Arrow 18"; break; +case 1058: sName = "Prestige Enchant Arrow 19"; break; +case 1059: sName = "Prestige Enchant Arrow 20"; break; + } + } + else //through 1071 + { + switch (nFeat) + { +case 1060: sName = "Epic Outsider Shape"; break; +case 1061: sName = "Epic Construct Shape"; break; +case 1062: sName = "Epic Shifter Infinite Wildshape 1"; break; +case 1063: sName = "Epic Shifter Infinite Wildshape 2"; break; +case 1064: sName = "Epic Shifter Infinite Wildshape 3"; break; +case 1065: sName = "Epic Shifter Infinite Wildshape 4"; break; +case 1066: sName = "Epic Shifter Infinite Humanoid Shape"; break; +case 1067: sName = "Epic Barbarian Damage Reduction"; break; +case 1068: sName = "Epic Druid Infinite Wildshape"; break; +case 1069: sName = "Epic Druid Infinite Elemental Shape"; break; +case 1070: sName = "Prestige Poison Save Epic"; break; +case 1071: sName = "Epic Superior Weapon Focus"; break; + } + } + } + } +return sName; +} + +int GetIsFeatLimitedUses(int nFeat) +{ +int nReturn = FALSE; +if (nFeat < 330) + { + if (nFeat < 300) + { + switch(nFeat) + { +case 39: nReturn = TRUE; break; +case 199: nReturn = TRUE; break; +case 211: nReturn = TRUE; break; +case 223: nReturn = TRUE; break; +case 257: nReturn = TRUE; break; +case 293: nReturn = TRUE; break; +case 294: nReturn = TRUE; break; +case 296: nReturn = TRUE; break; +case 297: nReturn = TRUE; break; +case 299: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 301: nReturn = TRUE; break; +case 302: nReturn = TRUE; break; +case 303: nReturn = TRUE; break; +case 304: nReturn = TRUE; break; +case 305: nReturn = TRUE; break; +case 306: nReturn = TRUE; break; +case 307: nReturn = TRUE; break; +case 308: nReturn = TRUE; break; +case 310: nReturn = TRUE; break; +case 324: nReturn = TRUE; break; +case 326: nReturn = TRUE; break; +case 327: nReturn = TRUE; break; +case 328: nReturn = TRUE; break; +case 329: nReturn = TRUE; break; + } + } + } +else if (nFeat < 400) + { + if (nFeat < 360) + { + switch(nFeat) + { +case 330: nReturn = TRUE; break; +case 331: nReturn = TRUE; break; +case 335: nReturn = TRUE; break; +case 336: nReturn = TRUE; break; +case 337: nReturn = TRUE; break; +case 338: nReturn = TRUE; break; +case 339: nReturn = TRUE; break; +case 340: nReturn = TRUE; break; +case 341: nReturn = TRUE; break; +case 342: nReturn = TRUE; break; +case 355: nReturn = TRUE; break; +case 356: nReturn = TRUE; break; +case 357: nReturn = TRUE; break; +case 358: nReturn = TRUE; break; +case 359: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 360: nReturn = TRUE; break; +case 361: nReturn = TRUE; break; +case 362: nReturn = TRUE; break; +case 363: nReturn = TRUE; break; +case 364: nReturn = TRUE; break; +case 365: nReturn = TRUE; break; +case 366: nReturn = TRUE; break; +case 367: nReturn = TRUE; break; +case 368: nReturn = TRUE; break; +case 369: nReturn = TRUE; break; +case 370: nReturn = TRUE; break; +case 371: nReturn = TRUE; break; +case 372: nReturn = TRUE; break; +case 373: nReturn = TRUE; break; + } + } + } +else if (nFeat < 500) + { + if (nFeat < 460) + { + switch(nFeat) + { +case 434: nReturn = TRUE; break; +case 435: nReturn = TRUE; break; +case 436: nReturn = TRUE; break; +case 438: nReturn = TRUE; break; +case 440: nReturn = TRUE; break; +case 441: nReturn = TRUE; break; +case 442: nReturn = TRUE; break; +case 443: nReturn = TRUE; break; +case 444: nReturn = TRUE; break; +case 450: nReturn = TRUE; break; +case 451: nReturn = TRUE; break; +case 452: nReturn = TRUE; break; +case 453: nReturn = TRUE; break; +case 454: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 468: nReturn = TRUE; break; +case 469: nReturn = TRUE; break; +case 470: nReturn = TRUE; break; +case 471: nReturn = TRUE; break; +case 472: nReturn = TRUE; break; +case 474: nReturn = TRUE; break; +case 475: nReturn = TRUE; break; +case 476: nReturn = TRUE; break; +case 477: nReturn = TRUE; break; +case 478: nReturn = TRUE; break; +case 479: nReturn = TRUE; break; +case 491: nReturn = TRUE; break; + } + } + } +else + { + if (nFeat < 900) + { + switch(nFeat) + { +case 869: nReturn = TRUE; break; +case 872: nReturn = TRUE; break; +case 873: nReturn = TRUE; break; +case 874: nReturn = TRUE; break; +case 875: nReturn = TRUE; break; +case 876: nReturn = TRUE; break; +case 877: nReturn = TRUE; break; +case 878: nReturn = TRUE; break; +case 882: nReturn = TRUE; break; +case 889: nReturn = TRUE; break; +case 890: nReturn = TRUE; break; +case 892: nReturn = TRUE; break; +case 893: nReturn = TRUE; break; +case 895: nReturn = TRUE; break; +case 897: nReturn = TRUE; break; +case 898: nReturn = TRUE; break; + } + } + else + { + switch(nFeat) + { +case 900: nReturn = TRUE; break; +case 901: nReturn = TRUE; break; +case 902: nReturn = TRUE; break; +case 903: nReturn = TRUE; break; +case 909: nReturn = TRUE; break; +case 947: nReturn = TRUE; break; +case 965: nReturn = TRUE; break; +case 990: nReturn = TRUE; break; +case 1060: nReturn = TRUE; break; +case 1061: nReturn = TRUE; break; + } + } + } +return nReturn; +} + + + +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_removed files/hgll_func_inc.nss b/_removed files/hgll_func_inc.nss new file mode 100644 index 00000000..c27bce72 --- /dev/null +++ b/_removed files/hgll_func_inc.nss @@ -0,0 +1,1405 @@ +#include "hgll_const_inc" +#include "hgll_struct_stat" +#include "hgll_featreq_inc" +#include "hgll_classft_inc" +#include "hgll_leto_inc" +#include "hgll_spells_inc" +#include "aps_include" +//--------------------------------DECLARATIONS--------------------------------// + +// This returns the current legendary level ("LL") of the PC. It is designed to +// work hand in hand with DAR subraces by tracking level by entering it in +// the (normally unused on PCs) Lootable field on the character file (".bic file"). +// If you are not using DAR, it will still function correctly, using GetHitDice to +// track non-legendary levels. +int CheckLegendaryLevel(object oPC); +// This function determines whether a PC has enough experience to take the next legendary +// level. Possible return values: 1 for having enough, 0 for not, -1 for having too few +// levels to gain Legendary levels, and -2 for already having the maximum amount of LL. +int GetHasXPForNextLL(object oPC); +// This function was used to remove xp from a character based on what LL they were taking. +// It subtracted XP and then returned the XP that was subtracted. It returns zero if they +// are level 60 and -1 if they aren't level 40 yet. It is not used in the current configuration, +// which just lets the xp keep adding up, rather than subtracting the xp after the level is +// gained. This ensures that the character doesn't lose the experience that accrued if for some +// reason Letoscript misfires and fails to edit the character. +int SubtractXPForNextLL(object oPC); +// This function returns the amount of XP the PC is missing to reach their next LL. It will +// return the amount needed to reach level 41 if they are under level 40. If they already +// have enough, it returns 0. If they are level 60, it returns -1. +int GetXPNeededForNextLL(object oPC); +// This function checks for whether or not the PC gains a feat this level. By default it +// is set to one every three levels, carrying the progression of character feats onward from +// the last standard one received at 39, adding new feats starting at level 42 and ending at +// level 60. It is easily modified so that you can assign feats at whatever levels desired. +int GetGainsFeatOnLevelUp(object oPC); +// This function checks for whether or not the PC gains a stat this level. By default it +// is set to one every two levels, doubling the progression of character stats onward from +// the last standard one received at 40, adding new stats starting at level 42 and ending at +// level 60. It is easily modified so that you can assign stats at whatever levels desired. +int GetGainsStatOnLevelUp(object oPC); +// This function tells the caller whether the PC gains +1 to saving throws this level. By default +// it is set to one every four levels, halving the progression of character saves onward from +// the last standard increase received at 40, increasing saves starting at level 44 and ending at +// level 60. It is easily modified so that you can increase saves at whatever levels desired. +int GetGainsSavesOnLevelUp(object oPC); +// This function permanently tags a PC with the CLASS_TYPE that controls his LLs. +void SetControlClass(object oPC, int nClass); +// This function is where any other requirements besides experence and level +// are added to GetHasXPForNextLL. It returns TRUE by default unless modified. +int GetCanGainLL(object oPC); +// This function outputs debugging info to the player and log, but only if DEBUG is +// set to TRUE in hgll_const_inc. +void DoDebug(object oPC, string sDebug); +// This function calculates the Base Ability Scores and Skills of a character, including +// improvements by level and by feats, but filtering out bonuses from gear and effects. +// Skills need another round of filtering before they arrive at base levels. +// sWP: If you specify a WayPoint Tag in an inaccesible area, the clones will be +// generated there. +struct xAbility GetRoughAbilities(object oPC, string sWP=""); +// This function returns the number of Great Strenth feats the character has. +int GetHasGreatStrenth(object oPC); +// This function returns the number of Great Dexterity feats the character has. +int GetHasGreatDexterity(object oPC); +// This function returns the number of Great Constitution feats the character has. +int GetHasGreatConstitution(object oPC); +// This function returns the number of Great Intelligence feats the character has. +int GetHasGreatIntelligence(object oPC); +// This function returns the number of Great Wisdom feats the character has. +int GetHasGreatWisdom(object oPC); +// This function returns the number of Great Charisma feats the character has. +int GetHasGreatCharisma(object oPC); +// This function filters out the Greater Stat Feats and Red Dragon Disciple ability bonuses +// from the ability scores. +int GetBaseStat(int nStatType, int nStat, object oPC); +// This function returns the Red Dragon Disciple ability bonus the character has for the +// specified ability. +int GetRDDStatMod(int nStatType, object oPC); +// This function returns the point vaule penalty (a positive number) for +// dexterity-based skills of the armor worn by the PC. +int GetArmorPenalty(object oPC); +// This function returns the point vaule penalty (a positive number) for +// dexterity-based skills of the shield worn by the PC. +int GetShieldPenalty(object oPC); +// This function takes a given stat number and calculates the bonus from it. +int GetBaseAbilityModifier(int nAmount); +// This function takes the scores retrieved from the GetRoughAbilities function and +// subtracts feat and ability bonuses from the skill to arrive at final base skill. +int GetBaseSkill(int nSkill, struct xAbility stat, object oPC); +// This function calculates the values of all the characters base skills, +// after adjusting them for stat modifiers and feats via GetBaseSkill. +struct xAbility GetBaseAbilities(struct xAbility stat, object oPC); +// This function sets local ints indicating the base ability for all 6 ability scores and +// all 27 skills. They are called later to help determine dependant characteristics like +// hitpoints, and are used to determine feat availabilities, etc. +void SetBaseAbilityMarkers(struct xAbility stat, object oPC); +//This function deletes all the ints tracking base ability and skill scores. +void DeleteBaseAbilityMarkers(object oPC); +// This function determines and returns the amount of skill points a character will get each +// LL based on their control class, INT modifier, and their main race (humans get +1) +int GetSkillPointsGainedOnLevelUp(object oPC); +// This function determines whether a skill is available to the charcter and should appear on the +// skill list, based on the character's control class, the amount of points they have remaining, +// the cost of the skill for the control class, and their current skill level in the skill. +int GetIsSkillAvailable(object oPC, int nSkill); +// This function returns the name string of the specified skill. +string GetNameOfSkill(int nSkill); +// This function returns the name of the tracking int for the specified skill. +string GetNameOfTrackingInt(int nSkill); +// This function determines the amount of HP that a character gets on levelup based on their +// control class, their CON modifier, and whether or not they've taken the toughness feat. +int GetHitPointsGainedOnLevelUp(object oPC); +// This function restores all limited usage feats so that GetHasFeat will not +// return a false negative. +void ReplenishLimitedUseFeats(object oPC); +// This function determines whether a feat is available to the charcter and should appear on the +// feat list, based on the character's control class, whether they meet the feat's requirements, +// whether they already have the feat, and whether the feat is restricted. +int GetIsFeatAvailable(int nFeat, object oPC); +// This function returns the name of the designated ability score. +string GetNameOfAbility(int nStat); +// This function returns TRUE if the specified feat is a class feat and the character has +// enough levels in the class to take it. Otherwise it returns FALSE. +int GetIsClassFeat(int nFeat, int nClass, object oPC); + +//----------------------------------FUNCTIONS---------------------------------// + +int CheckLegendaryLevel(object oPC) +{ +int nLevel = GetLootable(oPC); +if (nLevel<41) + { + return GetHitDice(oPC); + } +else + { + return nLevel; + } +} + +int GetHasXPForNextLL(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 40: return (XP_REQ_LVL41-GetXP(oPC)<=0); break; + case 41: return (XP_REQ_LVL42-GetXP(oPC)<=0); break; + case 42: return (XP_REQ_LVL43-GetXP(oPC)<=0); break; + case 43: return (XP_REQ_LVL44-GetXP(oPC)<=0); break; + case 44: return (XP_REQ_LVL45-GetXP(oPC)<=0); break; + case 45: return (XP_REQ_LVL46-GetXP(oPC)<=0); break; + case 46: return (XP_REQ_LVL47-GetXP(oPC)<=0); break; + case 47: return (XP_REQ_LVL48-GetXP(oPC)<=0); break; + case 48: return (XP_REQ_LVL49-GetXP(oPC)<=0); break; + case 49: return (XP_REQ_LVL50-GetXP(oPC)<=0); break; + case 50: return (XP_REQ_LVL51-GetXP(oPC)<=0); break; + case 51: return (XP_REQ_LVL52-GetXP(oPC)<=0); break; + case 52: return (XP_REQ_LVL53-GetXP(oPC)<=0); break; + case 53: return (XP_REQ_LVL54-GetXP(oPC)<=0); break; + case 54: return (XP_REQ_LVL55-GetXP(oPC)<=0); break; + case 55: return (XP_REQ_LVL56-GetXP(oPC)<=0); break; + case 56: return (XP_REQ_LVL57-GetXP(oPC)<=0); break; + case 57: return (XP_REQ_LVL58-GetXP(oPC)<=0); break; + case 58: return (XP_REQ_LVL59-GetXP(oPC)<=0); break; + case 59: return (XP_REQ_LVL60-GetXP(oPC)<=0); break; + case 60: return -2; break; + default: return -1; break; + } + return -3; +} + +int SubtractXPForNextLL(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 40: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL41)); return XP_REQ_LVL41; break; + case 41: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL42)); return XP_REQ_LVL42; break; + case 42: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL43)); return XP_REQ_LVL43; break; + case 43: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL44)); return XP_REQ_LVL44; break; + case 44: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL45)); return XP_REQ_LVL45; break; + case 45: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL46)); return XP_REQ_LVL46; break; + case 46: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL47)); return XP_REQ_LVL47; break; + case 47: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL48)); return XP_REQ_LVL48; break; + case 48: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL49)); return XP_REQ_LVL49; break; + case 49: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL50)); return XP_REQ_LVL50; break; + case 50: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL51)); return XP_REQ_LVL51; break; + case 51: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL52)); return XP_REQ_LVL52; break; + case 52: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL53)); return XP_REQ_LVL53; break; + case 53: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL54)); return XP_REQ_LVL54; break; + case 54: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL55)); return XP_REQ_LVL55; break; + case 55: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL56)); return XP_REQ_LVL56; break; + case 56: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL57)); return XP_REQ_LVL57; break; + case 57: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL58)); return XP_REQ_LVL58; break; + case 58: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL59)); return XP_REQ_LVL59; break; + case 59: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL60)); return XP_REQ_LVL60; break; + case 60: return 0; break; + default: return -1; break; + } + return -3; +} + +int GetXPNeededForNextLL(object oPC) +{ +int nXP; +switch(CheckLegendaryLevel(oPC)) + { + case 40: nXP = XP_REQ_LVL41-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 41: nXP = XP_REQ_LVL42-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 42: nXP = XP_REQ_LVL43-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 43: nXP = XP_REQ_LVL44-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 44: nXP = XP_REQ_LVL45-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 45: nXP = XP_REQ_LVL46-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 46: nXP = XP_REQ_LVL47-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 47: nXP = XP_REQ_LVL48-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 48: nXP = XP_REQ_LVL49-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 49: nXP = XP_REQ_LVL50-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 50: nXP = XP_REQ_LVL51-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 51: nXP = XP_REQ_LVL52-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 52: nXP = XP_REQ_LVL53-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 53: nXP = XP_REQ_LVL54-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 54: nXP = XP_REQ_LVL55-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 55: nXP = XP_REQ_LVL56-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 56: nXP = XP_REQ_LVL57-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 57: nXP = XP_REQ_LVL58-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 58: nXP = XP_REQ_LVL59-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 59: nXP = XP_REQ_LVL60-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + case 60: nXP = -1; + default: nXP = XP_REQ_LVL41-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; + } +return nXP; +} + +int GetGainsFeatOnLevelUp(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 41: return 1; break; + case 44: return 1; break; + case 47: return 1; break; + case 50: return 1; break; + case 53: return 1; break; + case 56: return 1; break; + case 59: return 1; break; + default: return 0; break; + } + return -3; +} + +int GetGainsStatOnLevelUp(object oPC) +{ +switch(CheckLegendaryLevel(oPC)) + { + case 41: return 1; break; + case 43: return 1; break; + case 45: return 1; break; + case 47: return 1; break; + case 49: return 1; break; + case 51: return 1; break; + case 53: return 1; break; + case 55: return 1; break; + case 57: return 1; break; + case 59: return 1; break; + default: return 0; break; + } + return -3; +} + +int GetGainsSavesOnLevelUp(object oPC) +{ + switch(CheckLegendaryLevel(oPC)) + { + case 43: + case 47: + case 51: + case 55: + case 59: return 1; break; + default: return 0; break; + } + return -3; +} + +void SetControlClass(object oPC, int nClass) +{ +SetPersistentInt(oPC, "ControlClass", nClass); +DoDebug(oPC, "Control Class: " + IntToString(nClass)); +} + + + +int GetCanGainLL(object oPC) +{ +string immortalname; +string sName = GetName(oPC); +immortalname = GetStringLeft(sName, 8) + GetStringRight(sName, 8) + GetStringLeft(GetPCPlayerName(oPC), 8) + GetStringRight(GetPCPlayerName(oPC), 8); +int nImmortal = 2;//GetLocalInt(oPC, immortalname); +if (nImmortal == 2) return TRUE; +return FALSE; +} + +void DoDebug(object oPC, string sDebug) +{ +if (DEBUG) + { + WriteTimestampedLogEntry(sDebug); + SendMessageToPC(oPC, sDebug); + } +} + +struct xAbility GetRoughAbilities(object oPC, string sWP="") +{ + effect eEffect; + itemproperty ipPenalty; + int iCount; + int nValue; + int nValue2; + int nClass = GetControlClass(oPC); + object oItem, oWP, oClone; + location lClone; + struct xAbility xAbility; + for(iCount = 0; iCount < NUM_INVENTORY_SLOTS; iCount++) + { + oItem = GetItemInSlot(iCount, oPC); + if(GetIsObjectValid(oItem)) + { + ipPenalty = GetFirstItemProperty(oItem); + while(GetIsItemPropertyValid(ipPenalty)) + { + if(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE)) + { + if(GetItemPropertyType(ipPenalty) == ITEM_PROPERTY_DECREASED_ABILITY_SCORE) + { + nValue = GetItemPropertyCostTableValue(ipPenalty);//will return between -1 and -10, matching the maximum penalty to skills from any given item + switch(GetItemPropertySubType(ipPenalty)) + { + case ABILITY_STRENGTH: xAbility.nSTR += nValue; break; + case ABILITY_DEXTERITY: xAbility.nDEX += nValue; break; + case ABILITY_CONSTITUTION: xAbility.nCON += nValue; break; + case ABILITY_INTELLIGENCE: xAbility.nINT += nValue; break; + case ABILITY_WISDOM: xAbility.nWIS += nValue; break; + case ABILITY_CHARISMA: xAbility.nCHA += nValue; break; + } + } + } + if(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)) + { + if(GetItemPropertyType(ipPenalty) == ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) + { + nValue2 = GetItemPropertyCostTableValue(ipPenalty);//will return between -1 and -10, matching the maximum penalty to skills from any given item + switch(GetItemPropertySubType(ipPenalty)) + { + case SKILL_ANIMAL_EMPATHY: xAbility.nANIMAL_EMPATHY += nValue2; break; + case SKILL_CONCENTRATION: xAbility.nCONCENTRATION += nValue2; break; + case SKILL_DISABLE_TRAP: xAbility.nDISABLE_TRAP += nValue2; break; + case SKILL_DISCIPLINE: xAbility.nDISCIPLINE += nValue2; break; + case SKILL_HEAL: xAbility.nHEAL += nValue2; break; + case SKILL_HIDE: xAbility.nHIDE += nValue2; break; + case SKILL_LISTEN: xAbility.nLISTEN += nValue2; break; + case SKILL_LORE: xAbility.nLORE += nValue2; break; + case SKILL_MOVE_SILENTLY: xAbility.nMOVE_SILENTLY += nValue2; break; + case SKILL_OPEN_LOCK: xAbility.nOPEN_LOCK += nValue2; break; + case SKILL_PARRY: xAbility.nPARRY += nValue2; break; + case SKILL_PERFORM: xAbility.nPERFORM += nValue2; break; + case SKILL_PERSUADE: xAbility.nPERSUADE += nValue2; break; + case SKILL_PICK_POCKET: xAbility.nPICK_POCKET += nValue2; break; + case SKILL_SEARCH: xAbility.nSEARCH += nValue2; break; + case SKILL_SET_TRAP: xAbility.nSET_TRAP += nValue2; break; + case SKILL_SPELLCRAFT: xAbility.nSPELLCRAFT += nValue2; break; + case SKILL_SPOT: xAbility.nSPOT += nValue2; break; + case SKILL_TAUNT: xAbility.nTAUNT += nValue2; break; + case SKILL_USE_MAGIC_DEVICE: xAbility.nUSE_MAGIC_DEVICE += nValue2; break; + case SKILL_APPRAISE: xAbility.nAPPRAISE += nValue2; break; + case SKILL_TUMBLE: xAbility.nTUMBLE += nValue2; break; + case SKILL_CRAFT_TRAP: xAbility.nCRAFT_TRAP += nValue2; break; + case SKILL_BLUFF: xAbility.nBLUFF += nValue2; break; + case SKILL_INTIMIDATE: xAbility.nINTIMIDATE += nValue2; break; + case SKILL_CRAFT_ARMOR: xAbility.nCRAFT_ARMOR += nValue2; break; + case SKILL_CRAFT_WEAPON: xAbility.nCRAFT_WEAPON += nValue2; break; + } + } + } + ipPenalty = GetNextItemProperty(oItem); + } + } + } + //Create Clone + oWP = GetWaypointByTag(sWP); + lClone = GetLocation(oWP); + if(sWP != "" && oWP != OBJECT_INVALID && GetAreaFromLocation(lClone)!= OBJECT_INVALID) + { + lClone = GetLocation(oWP); + } + else + { + lClone = GetLocation(oPC); + } + oClone = CopyObject(oPC,lClone); + //Remove Effects from Clone + eEffect = GetFirstEffect(oClone); + while(GetEffectType(eEffect) != EFFECT_TYPE_INVALIDEFFECT) + { + RemoveEffect(oClone, eEffect); + eEffect = GetNextEffect(oClone); + } + for(iCount = 0; iCount < 6; iCount++) + { + eEffect = EffectAbilityIncrease(iCount, 12); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oClone); + nValue = GetAbilityScore(oClone, iCount); + switch(iCount) + { + case ABILITY_STRENGTH: if(xAbility.nSTR >= -10) xAbility.nSTR += nValue - 12; else xAbility.nSTR = nValue - 2; break; + case ABILITY_DEXTERITY: if(xAbility.nDEX >= -10) xAbility.nDEX += nValue - 12; else xAbility.nDEX = nValue - 2; break; + case ABILITY_CONSTITUTION: if(xAbility.nCON >= -10) xAbility.nCON += nValue - 12; else xAbility.nCON = nValue - 2; break; + case ABILITY_INTELLIGENCE: if(xAbility.nINT >= -10) xAbility.nINT += nValue - 12; else xAbility.nINT = nValue - 2; break; + case ABILITY_WISDOM: if(xAbility.nWIS >= -10) xAbility.nWIS += nValue - 12; else xAbility.nWIS = nValue - 2; break; + case ABILITY_CHARISMA: if(xAbility.nCHA >= -10) xAbility.nCHA += nValue - 12; else xAbility.nCHA = nValue - 2; break; + } + } + for(iCount = 0; iCount < 27; iCount++) + { + //eEffect = EffectSkillIncrease(iCount, 50); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oClone); + nValue = GetSkillRank(iCount, oClone); + switch(iCount)//we subtract and extra 6 here for the stats being at +12, for a total of -56 + { + case SKILL_ANIMAL_EMPATHY: if(xAbility.nANIMAL_EMPATHY >= -10) xAbility.nANIMAL_EMPATHY += nValue - 6; else xAbility.nANIMAL_EMPATHY = nValue - 2; break; + case SKILL_CONCENTRATION: if(xAbility.nCONCENTRATION >= -10) xAbility.nCONCENTRATION += nValue - 6; else xAbility.nCONCENTRATION = nValue - 2; break; + case SKILL_DISABLE_TRAP: if(xAbility.nDISABLE_TRAP >= -10) xAbility.nDISABLE_TRAP += nValue - 6; else xAbility.nDISABLE_TRAP = nValue - 2; break; + case SKILL_DISCIPLINE: if(xAbility.nDISCIPLINE >= -10) xAbility.nDISCIPLINE += nValue - 6; else xAbility.nDISCIPLINE = nValue - 2; break; + case SKILL_HEAL: if(xAbility.nHEAL >= -10) xAbility.nHEAL += nValue - 6; else xAbility.nHEAL = nValue - 2; break; + case SKILL_HIDE: if(xAbility.nHIDE >= -10) xAbility.nHIDE += nValue - 6; else xAbility.nHIDE = nValue - 2; break; + case SKILL_LISTEN: if(xAbility.nLISTEN >= -10) xAbility.nLISTEN += nValue - 6; else xAbility.nLISTEN = nValue - 2; break; + case SKILL_LORE: if(xAbility.nLORE >= -10) xAbility.nLORE += nValue - 6; else xAbility.nLORE = nValue - 2; break; + case SKILL_MOVE_SILENTLY: if(xAbility.nMOVE_SILENTLY >= -10) xAbility.nMOVE_SILENTLY += nValue - 6; else xAbility.nMOVE_SILENTLY = nValue - 2; break; + case SKILL_OPEN_LOCK: if(xAbility.nOPEN_LOCK >= -10) xAbility.nOPEN_LOCK += nValue - 6; else xAbility.nOPEN_LOCK = nValue - 2; break; + case SKILL_PARRY: if(xAbility.nPARRY >= -10) xAbility.nPARRY += nValue - 6; else xAbility.nPARRY = nValue - 2; break; + case SKILL_PERFORM: if(xAbility.nPERFORM >= -10) xAbility.nPERFORM += nValue - 6; else xAbility.nPERFORM = nValue - 2; break; + case SKILL_PERSUADE: if(xAbility.nPERSUADE >= -10) xAbility.nPERSUADE += nValue - 6; else xAbility.nPERSUADE = nValue - 2; break; + case SKILL_PICK_POCKET: if(xAbility.nPICK_POCKET >= -10) xAbility.nPICK_POCKET += nValue - 6; else xAbility.nPICK_POCKET = nValue - 2; break; + case SKILL_SEARCH: if(xAbility.nSEARCH >= -10) xAbility.nSEARCH += nValue - 6; else xAbility.nSEARCH = nValue - 2; break; + case SKILL_SET_TRAP: if(xAbility.nSET_TRAP >= -10) xAbility.nSET_TRAP += nValue - 6; else xAbility.nSET_TRAP = nValue - 2; break; + case SKILL_SPELLCRAFT: if(xAbility.nSPELLCRAFT >= -10) xAbility.nSPELLCRAFT += nValue - 6; else xAbility.nSPELLCRAFT = nValue - 2; break; + case SKILL_SPOT: if(xAbility.nSPOT >= -10) xAbility.nSPOT += nValue - 6; else xAbility.nSPOT = nValue - 2; break; + case SKILL_TAUNT: if(xAbility.nTAUNT >= -10) xAbility.nTAUNT += nValue - 6; else xAbility.nTAUNT = nValue - 2; break; + case SKILL_USE_MAGIC_DEVICE: if(xAbility.nUSE_MAGIC_DEVICE >= -10) xAbility.nUSE_MAGIC_DEVICE += nValue - 6; else xAbility.nUSE_MAGIC_DEVICE = nValue - 2; break; + case SKILL_APPRAISE: if(xAbility.nAPPRAISE >= -10) xAbility.nAPPRAISE += nValue - 6; else xAbility.nAPPRAISE = nValue - 2; break; + case SKILL_TUMBLE: if(xAbility.nTUMBLE >= -10) xAbility.nTUMBLE += nValue - 6; else xAbility.nTUMBLE = nValue - 2; break; + case SKILL_CRAFT_TRAP: if(xAbility.nCRAFT_TRAP >= -10) xAbility.nCRAFT_TRAP += nValue - 6; else xAbility.nCRAFT_TRAP = nValue - 2; break; + case SKILL_BLUFF: if(xAbility.nBLUFF >= -10) xAbility.nBLUFF += nValue - 6; else xAbility.nBLUFF = nValue - 2; break; + case SKILL_INTIMIDATE: if(xAbility.nINTIMIDATE >= -10) xAbility.nINTIMIDATE += nValue - 6; else xAbility.nINTIMIDATE = nValue - 2; break; + case SKILL_CRAFT_ARMOR: if(xAbility.nCRAFT_ARMOR >= -10) xAbility.nCRAFT_ARMOR += nValue - 6; else xAbility.nCRAFT_ARMOR = nValue - 2; break; + case SKILL_CRAFT_WEAPON: if(xAbility.nCRAFT_WEAPON >= -10) xAbility.nCRAFT_WEAPON += nValue - 6; else xAbility.nCRAFT_WEAPON = nValue - 2; break; + } + } +//dont try to destroy or take the clone items, wont work +DestroyObject(oClone); +return xAbility; +} + +int GetBaseAbilityModifier(int nAmount) +{ + if ((nAmount%2)==0) + { + nAmount = (nAmount/2)+(nAmount%2); + nAmount = nAmount-5; + } + else + { + nAmount = (nAmount/2)+(nAmount%2); + nAmount = nAmount-6; + } + return nAmount; +} + +int GetHasGreatStrenth(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatDexterity(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatConstitution(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatIntelligence(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatWisdom(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_10,oPC)) nFeat++; + return nFeat; +} + +int GetHasGreatCharisma(object oPC) +{ + int nFeat = 0; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_1,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_2,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_3,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_4,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_5,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_6,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_7,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_8,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_9,oPC)) nFeat++; + if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_10,oPC)) nFeat++; + return nFeat; +} + +int GetBaseStat(int nStatType, int nStat, object oPC) +{ +int nSubtract = 0; +int nBase; +switch(nStatType) + { + case ABILITY_STRENGTH: + nSubtract = GetHasGreatStrenth(oPC) + GetRDDStatMod(nStatType, oPC); + nBase = nStat; break; + case ABILITY_DEXTERITY: + nSubtract = GetHasGreatDexterity(oPC) + GetRDDStatMod(nStatType, oPC); + nBase = nStat; break ; + case ABILITY_CONSTITUTION: + nSubtract = GetHasGreatConstitution(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + case ABILITY_INTELLIGENCE: + nSubtract = GetHasGreatIntelligence(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + case ABILITY_WISDOM: + nSubtract = GetHasGreatWisdom(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + case ABILITY_CHARISMA: + nSubtract = GetHasGreatCharisma(oPC) + GetRDDStatMod(nStatType, oPC);; + nBase = nStat; break; + default: return -3; break; + } +return (nBase-nSubtract); +} + +int GetRDDStatMod(int nStatType, object oPC) +{ +int nRDDLevel = GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC); +int nReturn = 0; +if (nRDDLevel < 1) return 0;//if not rdd, return +switch(nStatType) + { + case ABILITY_STRENGTH: + if (nRDDLevel > 9) nReturn = 8; + else if (nRDDLevel > 3) nReturn = 4; + else if (nRDDLevel > 1) nReturn = 2; + else nReturn = 0; + break; + case ABILITY_DEXTERITY: + if (nRDDLevel > 6) nReturn = 2; + else nReturn = 0; + break; + case ABILITY_CONSTITUTION: + + case ABILITY_INTELLIGENCE: + if (nRDDLevel > 8) nReturn = 2; + else nReturn = 0; + break; + case ABILITY_WISDOM: + nReturn = 0; + break; + case ABILITY_CHARISMA: + if (nRDDLevel > 9) nReturn = 2; + else nReturn = 0; + break; + } +return nReturn; +} + +int GetArmorPenalty(object oPC) +{ + object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); + if (!GetIsObjectValid(oItem)) return 0; + if (GetBaseItemType(oItem) != BASE_ITEM_ARMOR) return 0; + SetIdentified(oItem,FALSE); + int nPenalty = 0; + switch (GetGoldPieceValue(oItem)) + { + case 1: nPenalty = 0; break; + case 5: nPenalty = 0; break; + case 10: nPenalty = 0; break; + case 15: nPenalty = 1; break; + case 100: nPenalty = 2; break; + case 150: nPenalty = 5; break; + case 200: nPenalty = 7; break; + case 600: nPenalty = 7; break; + case 1500: nPenalty = 8; break; + } + SetIdentified(oItem,TRUE); + return nPenalty; +} + +int GetShieldPenalty(object oPC) +{ + object oItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC); + if (!GetIsObjectValid(oItem)) return 0; + int nType = GetBaseItemType(oItem); + int nPenalty = 0; + switch(nType) + { + case BASE_ITEM_SMALLSHIELD: nPenalty = 1; break; + case BASE_ITEM_LARGESHIELD: nPenalty = 2; break; + case BASE_ITEM_TOWERSHIELD: nPenalty = 10; break; + default: nPenalty = 0; break; + } + return nPenalty; +} + +int GetBaseSkill(int nSkill, struct xAbility stat, object oPC) +{ +int nSubtract = 0; +int nModifier = 0; +int nBase = 0; +int nArmorShield = 0; +int nValue = GetSkillRank(nSkill, oPC); +if (GetCostOfSkill(GetControlClass(oPC), nSkill) == -1 || nValue == 0) + { + return 0; //if skill non-available return 0 + } +else + { + switch(nSkill) + { + case SKILL_ANIMAL_EMPATHY: + nBase = stat.nANIMAL_EMPATHY; + if(GetHasFeat(FEAT_SKILL_FOCUS_ANIMAL_EMPATHY,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_ANIMAL_EMPATHY,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier=GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_APPRAISE: + nBase = stat.nAPPRAISE; + if(GetHasFeat(FEAT_SILVER_PALM,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILLFOCUS_APPRAISE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_APPRAISE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_BLUFF: + nBase = stat.nBLUFF; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_BLUFF,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_BLUFF,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_CONCENTRATION: + nBase = stat.nCONCENTRATION; + if(GetHasFeat(FEAT_SKILL_AFFINITY_CONCENTRATION,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_CONCENTRATION,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CONCENTRATION,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatConstitution(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCON); + break; + case SKILL_CRAFT_ARMOR: + nBase = stat.nCRAFT_ARMOR; + if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_ARMOR,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_ARMOR,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_CRAFT_TRAP: + nBase = stat.nCRAFT_TRAP; + if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_TRAP,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_TRAP,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_CRAFT_WEAPON: + nBase = stat.nCRAFT_WEAPON; + if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_WEAPON,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_WEAPON,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_DISABLE_TRAP: + nBase = stat.nDISABLE_TRAP; + if(GetHasFeat(FEAT_SKILL_FOCUS_DISABLE_TRAP,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_DISABLETRAP,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_DISCIPLINE: + nBase = stat.nDISCIPLINE; + if(GetHasFeat(FEAT_SKILL_FOCUS_DISCIPLINE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_DISCIPLINE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatStrenth(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nSTR); + break; + case SKILL_HEAL: + nBase = stat.nHEAL; + if(GetHasFeat(FEAT_SKILL_FOCUS_HEAL,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_HEAL,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nWIS); + break; + case SKILL_HIDE: + nBase = stat.nHIDE; + if(GetHasFeat(FEAT_STEALTHY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_HIDE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_HIDE,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_INTIMIDATE: + nBase = stat.nINTIMIDATE; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_INTIMIDATE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_INTIMIDATE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_LISTEN: + nBase = stat.nLISTEN; + if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_LISTEN,oPC)) + nSubtract++; + if(GetHasFeat(FEAT_ALERTNESS,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_AFFINITY_LISTEN,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_LISTEN,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_LISTEN,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nWIS); + break; + case SKILL_LORE: + nBase = stat.nLORE; + if(GetHasFeat(FEAT_BARDIC_KNOWLEDGE,oPC)) + nSubtract=nSubtract+GetLevelByClass(CLASS_TYPE_BARD,oPC)+GetLevelByClass(CLASS_TYPE_HARPER); + if(GetHasFeat(FEAT_SKILL_AFFINITY_LORE,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_COURTLY_MAGOCRACY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_LORE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_LORE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_MOVE_SILENTLY: + nBase = stat.nMOVE_SILENTLY; + if(GetHasFeat(FEAT_STEALTHY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_AFFINITY_MOVE_SILENTLY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_MOVE_SILENTLY,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_MOVESILENTLY,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_OPEN_LOCK: + nBase = stat.nOPEN_LOCK; + if(GetHasFeat(FEAT_SKILL_FOCUS_OPEN_LOCK,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_OPENLOCK,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_PARRY: + nBase = stat.nPARRY; + if(GetHasFeat(FEAT_SKILL_FOCUS_PARRY,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PARRY,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_PERFORM: + nBase = stat.nPERFORM; + if(GetHasFeat(FEAT_ARTIST,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_PERFORM,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PERFORM,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_PERSUADE: + nBase = stat.nPERSUADE; + if(GetHasFeat(FEAT_SILVER_PALM,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_THUG,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_PERSUADE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PERSUADE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_PICK_POCKET: + nBase = stat.nPICK_POCKET; + if(GetHasFeat(FEAT_SKILL_FOCUS_PICK_POCKET,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PICKPOCKET,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_SEARCH: + nBase = stat.nSEARCH; + if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_SEARCH,oPC)) + nSubtract=nSubtract+1; + if(GetHasFeat(FEAT_SKILL_AFFINITY_SEARCH,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_SEARCH,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SEARCH,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_SET_TRAP: + nBase = stat.nSET_TRAP; + if(GetHasFeat(FEAT_SKILL_FOCUS_SET_TRAP,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SETTRAP,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_SPELLCRAFT: + nBase = stat.nSPELLCRAFT; + if(GetHasFeat(FEAT_COURTLY_MAGOCRACY,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_SPELLCRAFT,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SPELLCRAFT,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nINT); + break; + case SKILL_SPOT: + nBase = stat.nSPOT; + if(GetHasFeat(FEAT_ALERTNESS,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_BLOODED,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_ARTIST,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_SPOT,oPC)) + nSubtract=nSubtract+1; + if(GetHasFeat(FEAT_SKILL_AFFINITY_SPOT,oPC)) + nSubtract=nSubtract+2; + if(GetHasFeat(FEAT_SKILL_FOCUS_SPOT,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SPOT,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nWIS); + break; + case SKILL_TAUNT: + nBase = stat.nTAUNT; + if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) + nSubtract=nSubtract+4; + if(GetHasFeat(FEAT_SKILL_FOCUS_TAUNT,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_TAUNT,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + case SKILL_TUMBLE: + nBase = stat.nTUMBLE; + if(GetHasFeat(FEAT_SKILL_FOCUS_TUMBLE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_TUMBLE,oPC)) + nSubtract=nSubtract+10; + nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); +// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nDEX); + break; + case SKILL_USE_MAGIC_DEVICE: + nBase = stat.nUSE_MAGIC_DEVICE; + if(GetHasFeat(FEAT_SKILL_FOCUS_USE_MAGIC_DEVICE,oPC)) + nSubtract=nSubtract+3; + if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_USEMAGICDEVICE,oPC)) + nSubtract=nSubtract+10; +// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); + nModifier = GetBaseAbilityModifier(stat.nCHA); + break; + default: return -3; + } + return (nBase-nSubtract-nModifier+nArmorShield); + } +} + +struct xAbility GetBaseAbilities(struct xAbility stat, object oPC) +{ +struct xAbility base; +int iCount; +int nBaseAbility; +for(iCount = 0; iCount < 6; iCount++)//filter out the greater stat feats + { + switch(iCount) + { + case ABILITY_STRENGTH: base.nSTR = GetBaseStat(iCount, stat.nSTR, oPC); break; + case ABILITY_DEXTERITY: base.nDEX = GetBaseStat(iCount, stat.nDEX, oPC); break; + case ABILITY_CONSTITUTION: base.nCON = GetBaseStat(iCount, stat.nCON, oPC); break; + case ABILITY_INTELLIGENCE: base.nINT = GetBaseStat(iCount, stat.nINT, oPC); break; + case ABILITY_WISDOM: base.nWIS = GetBaseStat(iCount, stat.nWIS, oPC); break; + case ABILITY_CHARISMA: base.nCHA = GetBaseStat(iCount, stat.nCHA, oPC); break; + } + } +//For skills we must still process them to remove ability and feat bonuses. +for(iCount = 0; iCount < 27; iCount++) + { + nBaseAbility = GetBaseSkill(iCount, stat, oPC); + switch (iCount) + { + case 0: base.nANIMAL_EMPATHY = nBaseAbility; break; + case 1: base.nCONCENTRATION = nBaseAbility; break; + case 2: base.nDISABLE_TRAP = nBaseAbility; break; + case 3: base.nDISCIPLINE = nBaseAbility; break; + case 4: base.nHEAL = nBaseAbility; break; + case 5: base.nHIDE = nBaseAbility; break; + case 6: base.nLISTEN = nBaseAbility; break; + case 7: base.nLORE = nBaseAbility; break; + case 8: base.nMOVE_SILENTLY = nBaseAbility; break; + case 9: base.nOPEN_LOCK = nBaseAbility; break; + case 10: base.nPARRY = nBaseAbility; break; + case 11: base.nPERFORM = nBaseAbility; break; + case 12: base.nPERSUADE = nBaseAbility; break; + case 13: base.nPICK_POCKET = nBaseAbility; break; + case 14: base.nSEARCH = nBaseAbility; break; + case 15: base.nSET_TRAP = nBaseAbility; break; + case 16: base.nSPELLCRAFT = nBaseAbility; break; + case 17: base.nSPOT = nBaseAbility; break; + case 18: base.nTAUNT = nBaseAbility; break; + case 19: base.nUSE_MAGIC_DEVICE = nBaseAbility; break; + case 20: base.nAPPRAISE = nBaseAbility; break; + case 21: base.nTUMBLE = nBaseAbility; break; + case 22: base.nCRAFT_TRAP = nBaseAbility; break; + case 23: base.nBLUFF = nBaseAbility; break; + case 24: base.nINTIMIDATE = nBaseAbility; break; + case 25: base.nCRAFT_ARMOR = nBaseAbility; break; + case 26: base.nCRAFT_WEAPON = nBaseAbility; break; + } + } +return base; +} + +void SetBaseAbilityMarkers(struct xAbility stat, object oPC) +{ +SetLocalInt(oPC, "BASE_STR", stat.nSTR); +SetLocalInt(oPC, "BASE_DEX", stat.nDEX); +SetLocalInt(oPC, "BASE_CON", stat.nCON); +SetLocalInt(oPC, "BASE_INT", stat.nINT); +SetLocalInt(oPC, "BASE_WIS", stat.nWIS); +SetLocalInt(oPC, "BASE_CHA", stat.nCHA); +DoDebug(oPC, "Base ability ints set as STR: "+IntToString(GetLocalInt(oPC, "BASE_STR"))+", DEX: "+IntToString(GetLocalInt(oPC, "BASE_DEX"))+", CON: "+IntToString(GetLocalInt(oPC, "BASE_CON"))+", INT: "+IntToString(GetLocalInt(oPC, "BASE_INT"))+", WIS: "+IntToString(GetLocalInt(oPC, "BASE_WIS"))+", CHA: "+IntToString(GetLocalInt(oPC, "BASE_CHA"))+"."); +SetLocalInt(oPC, "BASE_ANIMAL", stat.nANIMAL_EMPATHY); +SetLocalInt(oPC, "BASE_CONCEN", stat.nCONCENTRATION); +SetLocalInt(oPC, "BASE_DISABL", stat.nDISABLE_TRAP); +SetLocalInt(oPC, "BASE_DISCIP", stat.nDISCIPLINE); +SetLocalInt(oPC, "BASE_HEAL", stat.nHEAL); +SetLocalInt(oPC, "BASE_HIDE", stat.nHIDE); +DoDebug(oPC, "Base ability ints set as ANIMAL: "+IntToString(GetLocalInt(oPC, "BASE_ANIMAL"))+", CONCEN: "+IntToString(GetLocalInt(oPC, "BASE_CONCEN"))+", DISABL: "+IntToString(GetLocalInt(oPC, "BASE_DISABL"))+", DISCIP: "+IntToString(GetLocalInt(oPC, "BASE_DISCIP"))+", HEAL: "+IntToString(GetLocalInt(oPC, "BASE_HEAL"))+", HIDE: "+IntToString(GetLocalInt(oPC, "BASE_HIDE"))+"."); +SetLocalInt(oPC, "BASE_LISTEN", stat.nLISTEN); +SetLocalInt(oPC, "BASE_LORE", stat.nLORE); +SetLocalInt(oPC, "BASE_MOVE_S", stat.nMOVE_SILENTLY); +SetLocalInt(oPC, "BASE_OPEN_L", stat.nOPEN_LOCK); +SetLocalInt(oPC, "BASE_PARRY", stat.nPARRY); +SetLocalInt(oPC, "BASE_PERFOR", stat.nPERFORM); +DoDebug(oPC, "Base ability ints set as LISTEN: "+IntToString(GetLocalInt(oPC, "BASE_LISTEN"))+", LORE: "+IntToString(GetLocalInt(oPC, "BASE_LORE"))+", MOVE_S: "+IntToString(GetLocalInt(oPC, "BASE_MOVE_S"))+", OPEN_L: "+IntToString(GetLocalInt(oPC, "BASE_OPEN_L"))+", PARRY: "+IntToString(GetLocalInt(oPC, "BASE_PARRY"))+", PERFOR: "+IntToString(GetLocalInt(oPC, "BASE_PERFOR"))+"."); +SetLocalInt(oPC, "BASE_PERSUA", stat.nPERSUADE); +SetLocalInt(oPC, "BASE_PICK_P", stat.nPICK_POCKET); +SetLocalInt(oPC, "BASE_SEARCH", stat.nSEARCH); +SetLocalInt(oPC, "BASE_SET_TR", stat.nSET_TRAP); +SetLocalInt(oPC, "BASE_SPELLC", stat.nSPELLCRAFT); +SetLocalInt(oPC, "BASE_SPOT", stat.nSPOT); +DoDebug(oPC, "Base ability ints set as PERSUA: "+IntToString(GetLocalInt(oPC, "BASE_PERSUA"))+", PICK_P: "+IntToString(GetLocalInt(oPC, "BASE_PICK_P"))+", SEARCH: "+IntToString(GetLocalInt(oPC, "BASE_SEARCH"))+", SET_TR: "+IntToString(GetLocalInt(oPC, "BASE_SET_TR"))+", SPELLC: "+IntToString(GetLocalInt(oPC, "BASE_SPELLC"))+", SPOT: "+IntToString(GetLocalInt(oPC, "BASE_SPOT"))+"."); +SetLocalInt(oPC, "BASE_TAUNT", stat.nTAUNT); +SetLocalInt(oPC, "BASE_USE_MA", stat.nUSE_MAGIC_DEVICE); +SetLocalInt(oPC, "BASE_APPRAI", stat.nAPPRAISE); +SetLocalInt(oPC, "BASE_TUMBLE", stat.nTUMBLE); +SetLocalInt(oPC, "BASE_CRAFT_T", stat.nCRAFT_TRAP); +SetLocalInt(oPC, "BASE_BLUFF", stat.nBLUFF); +DoDebug(oPC, "Base ability ints set as TAUNT: "+IntToString(GetLocalInt(oPC, "BASE_TAUNT"))+", USE_MA: "+IntToString(GetLocalInt(oPC, "BASE_USE_MA"))+", APPRAI: "+IntToString(GetLocalInt(oPC, "BASE_APPRAI"))+", TUMBLE: "+IntToString(GetLocalInt(oPC, "BASE_TUMBLE"))+", CRAFT_T: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_T"))+", BLUFF: "+IntToString(GetLocalInt(oPC, "BASE_BLUFF"))+"."); +SetLocalInt(oPC, "BASE_INTIMI", stat.nINTIMIDATE); +SetLocalInt(oPC, "BASE_CRAFT_A", stat.nCRAFT_ARMOR); +SetLocalInt(oPC, "BASE_CRAFT_W", stat.nCRAFT_WEAPON); +DoDebug(oPC, "Base ability ints set as INTIMI: "+IntToString(GetLocalInt(oPC, "BASE_INTIMI"))+", CRAFT_A: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_A"))+", CRAFT_W: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_W"))+"."); +} + +void DeleteBaseAbilityMarkers(object oPC) +{ +DeleteLocalInt(oPC, "BASE_STR"); +DeleteLocalInt(oPC, "BASE_DEX"); +DeleteLocalInt(oPC, "BASE_CON"); +DeleteLocalInt(oPC, "BASE_INT"); +DeleteLocalInt(oPC, "BASE_WIS"); +DeleteLocalInt(oPC, "BASE_CHA"); +DoDebug(oPC, "Base ability ints set as STR: "+IntToString(GetLocalInt(oPC, "BASE_STR"))+", DEX: "+IntToString(GetLocalInt(oPC, "BASE_DEX"))+", CON: "+IntToString(GetLocalInt(oPC, "BASE_CON"))+", INT: "+IntToString(GetLocalInt(oPC, "BASE_INT"))+", WIS: "+IntToString(GetLocalInt(oPC, "BASE_WIS"))+", CHA: "+IntToString(GetLocalInt(oPC, "BASE_CHA"))+"."); +DeleteLocalInt(oPC, "BASE_ANIMAL"); +DeleteLocalInt(oPC, "BASE_CONCEN"); +DeleteLocalInt(oPC, "BASE_DISABL"); +DeleteLocalInt(oPC, "BASE_DISCIP"); +DeleteLocalInt(oPC, "BASE_HEAL"); +DeleteLocalInt(oPC, "BASE_HIDE"); +DoDebug(oPC, "Base ability ints set as ANIMAL: "+IntToString(GetLocalInt(oPC, "BASE_ANIMAL"))+", CONCEN: "+IntToString(GetLocalInt(oPC, "BASE_CONCEN"))+", DISABL: "+IntToString(GetLocalInt(oPC, "BASE_DISABL"))+", DISCIP: "+IntToString(GetLocalInt(oPC, "BASE_DISCIP"))+", HEAL: "+IntToString(GetLocalInt(oPC, "BASE_HEAL"))+", HIDE: "+IntToString(GetLocalInt(oPC, "BASE_HIDE"))+"."); +DeleteLocalInt(oPC, "BASE_LISTEN"); +DeleteLocalInt(oPC, "BASE_LORE"); +DeleteLocalInt(oPC, "BASE_MOVE_S"); +DeleteLocalInt(oPC, "BASE_OPEN_L"); +DeleteLocalInt(oPC, "BASE_PARRY"); +DeleteLocalInt(oPC, "BASE_PERFOR"); +DoDebug(oPC, "Base ability ints set as LISTEN: "+IntToString(GetLocalInt(oPC, "BASE_LISTEN"))+", LORE: "+IntToString(GetLocalInt(oPC, "BASE_LORE"))+", MOVE_S: "+IntToString(GetLocalInt(oPC, "BASE_MOVE_S"))+", OPEN_L: "+IntToString(GetLocalInt(oPC, "BASE_OPEN_L"))+", PARRY: "+IntToString(GetLocalInt(oPC, "BASE_PARRY"))+", PERFOR: "+IntToString(GetLocalInt(oPC, "BASE_PERFOR"))+"."); +DeleteLocalInt(oPC, "BASE_PERSUA"); +DeleteLocalInt(oPC, "BASE_PICK_P"); +DeleteLocalInt(oPC, "BASE_SEARCH"); +DeleteLocalInt(oPC, "BASE_SET_TR"); +DeleteLocalInt(oPC, "BASE_SPELLC"); +DeleteLocalInt(oPC, "BASE_SPOT"); +DoDebug(oPC, "Base ability ints set as PERSUA: "+IntToString(GetLocalInt(oPC, "BASE_PERSUA"))+", PICK_P: "+IntToString(GetLocalInt(oPC, "BASE_PICK_P"))+", SEARCH: "+IntToString(GetLocalInt(oPC, "BASE_SEARCH"))+", SET_TR: "+IntToString(GetLocalInt(oPC, "BASE_SET_TR"))+", SPELLC: "+IntToString(GetLocalInt(oPC, "BASE_SPELLC"))+", SPOT: "+IntToString(GetLocalInt(oPC, "BASE_SPOT"))+"."); +DeleteLocalInt(oPC, "BASE_TAUNT"); +DeleteLocalInt(oPC, "BASE_USE_MA"); +DeleteLocalInt(oPC, "BASE_APPRAI"); +DeleteLocalInt(oPC, "BASE_TUMBLE"); +DeleteLocalInt(oPC, "BASE_CRAFT_T"); +DeleteLocalInt(oPC, "BASE_BLUFF"); +DoDebug(oPC, "Base ability ints set as TAUNT: "+IntToString(GetLocalInt(oPC, "BASE_TAUNT"))+", USE_MA: "+IntToString(GetLocalInt(oPC, "BASE_USE_MA"))+", APPRAI: "+IntToString(GetLocalInt(oPC, "BASE_APPRAI"))+", TUMBLE: "+IntToString(GetLocalInt(oPC, "BASE_TUMBLE"))+", CRAFT_T: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_T"))+", BLUFF: "+IntToString(GetLocalInt(oPC, "BASE_BLUFF"))+"."); +DeleteLocalInt(oPC, "BASE_INTIMI"); +DeleteLocalInt(oPC, "BASE_CRAFT_A"); +DeleteLocalInt(oPC, "BASE_CRAFT_W"); +DoDebug(oPC, "Base ability ints set as INTIMI: "+IntToString(GetLocalInt(oPC, "BASE_INTIMI"))+", CRAFT_A: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_A"))+", CRAFT_W: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_W"))+"."); +} + +int GetSkillPointsGainedOnLevelUp(object oPC) +{ +int nClass = GetControlClass(oPC); +int nInt = GetLocalInt(oPC, "BASE_INT"); +int nClassBonus = 0; +int nRaceBonus = 0; +int nTotal; +if(GetRacialType(oPC)==RACIAL_TYPE_HUMAN) + { + nRaceBonus = 1; + } +switch(nClass) + { + case CLASS_TYPE_ROGUE: + nClassBonus = 8; break; + case CLASS_TYPE_SHADOWDANCER: + nClassBonus = 6; break; + case CLASS_TYPE_ARCANE_ARCHER: + case CLASS_TYPE_ASSASSIN: + case CLASS_TYPE_BARBARIAN: + case CLASS_TYPE_BARD: + case CLASS_TYPE_DRUID: + case CLASS_TYPE_HARPER: + case CLASS_TYPE_MONK: + case CLASS_TYPE_RANGER: + case CLASS_TYPE_SHIFTER: + nClassBonus = 4; break; + case CLASS_TYPE_BLACKGUARD: + case CLASS_TYPE_CLERIC: + case CLASS_TYPE_FIGHTER: + case CLASS_TYPE_DIVINECHAMPION: + case CLASS_TYPE_DRAGONDISCIPLE: + case CLASS_TYPE_DWARVENDEFENDER: + case CLASS_TYPE_PALADIN: + case CLASS_TYPE_PALEMASTER: + case CLASS_TYPE_SORCERER: + case CLASS_TYPE_WEAPON_MASTER: + case CLASS_TYPE_WIZARD: + nClassBonus = 2; break; + } +nTotal = nClassBonus+nRaceBonus+GetBaseAbilityModifier(nInt); +DoDebug(oPC, "Skill Points Gained: "+IntToString(nTotal)+"."); +return nTotal; +} + +int GetIsSkillAvailable(object oPC, int nSkill) +{ +int nPointsAvailable = GetLocalInt(oPC, "PointsAvailable"); +int nClass = GetControlClass(oPC); +int nLevel = CheckLegendaryLevel(oPC); +int nSkillMax; +int nSkillTotal; +switch (nSkill) + { + case 0: nSkillTotal = GetLocalInt(oPC, "BASE_ANIMAL"); break; + case 1: nSkillTotal = GetLocalInt(oPC, "BASE_CONCEN"); break; + case 2: nSkillTotal = GetLocalInt(oPC, "BASE_DISABL"); break; + case 3: nSkillTotal = GetLocalInt(oPC, "BASE_DISCIP"); break; + case 4: nSkillTotal = GetLocalInt(oPC, "BASE_HEAL"); break; + case 5: nSkillTotal = GetLocalInt(oPC, "BASE_HIDE"); break; + case 6: nSkillTotal = GetLocalInt(oPC, "BASE_LISTEN"); break; + case 7: nSkillTotal = GetLocalInt(oPC, "BASE_LORE"); break; + case 8: nSkillTotal = GetLocalInt(oPC, "BASE_MOVE_S"); break; + case 9: nSkillTotal = GetLocalInt(oPC, "BASE_OPEN_L"); break; + case 10: nSkillTotal = GetLocalInt(oPC, "BASE_PARRY"); break; + case 11: nSkillTotal = GetLocalInt(oPC, "BASE_PERFOR"); break; + case 12: nSkillTotal = GetLocalInt(oPC, "BASE_PERSUA"); break; + case 13: nSkillTotal = GetLocalInt(oPC, "BASE_PICK_P"); break; + case 14: nSkillTotal = GetLocalInt(oPC, "BASE_SEARCH"); break; + case 15: nSkillTotal = GetLocalInt(oPC, "BASE_SET_TR"); break; + case 16: nSkillTotal = GetLocalInt(oPC, "BASE_SPELLC"); break; + case 17: nSkillTotal = GetLocalInt(oPC, "BASE_SPOT"); break; + case 18: nSkillTotal = GetLocalInt(oPC, "BASE_TAUNT"); break; + case 19: nSkillTotal = GetLocalInt(oPC, "BASE_USE_MA"); break; + case 20: nSkillTotal = GetLocalInt(oPC, "BASE_APPRAI"); break; + case 21: nSkillTotal = GetLocalInt(oPC, "BASE_TUMBLE"); break; + case 22: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_T"); break; + case 23: nSkillTotal = GetLocalInt(oPC, "BASE_BLUFF"); break; + case 24: nSkillTotal = GetLocalInt(oPC, "BASE_INTIMI"); break; + case 25: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_A"); break; + case 26: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_W"); break; + } +int nSkillCost = GetCostOfSkill(nClass, nSkill);//returns -1 if not available +if (nSkillCost == 2)//cross-class + { + nSkillMax = (nLevel+4)/2;//they can go up to half of (three points higher than their new level), CheckLegendaryLevel returns the CURRENT level + } +else + { + nSkillMax = nLevel+4;//they can go three points higher than their new level, CheckLegendaryLevel returns the CURRENT level + } +if((nSkillCost > 0) && (nPointsAvailable >= nSkillCost) && (nSkillTotal < nSkillMax)) return TRUE; +else return FALSE; +} + +string GetNameOfSkill(int nSkill) +{ +string sSkill; +switch (nSkill) + { + case 0: sSkill = "Animal Empathy"; break; + case 1: sSkill = "Concentration"; break; + case 2: sSkill = "Disable Trap"; break; + case 3: sSkill = "Discipline"; break; + case 4: sSkill = "Heal"; break; + case 5: sSkill = "Hide"; break; + case 6: sSkill = "Listen"; break; + case 7: sSkill = "Lore"; break; + case 8: sSkill = "Move Silently"; break; + case 9: sSkill = "Open Lock"; break; + case 10: sSkill = "Parry"; break; + case 11: sSkill = "Perform"; break; + case 12: sSkill = "Persuade"; break; + case 13: sSkill = "Pick Pocket"; break; + case 14: sSkill = "Search"; break; + case 15: sSkill = "Set Trap"; break; + case 16: sSkill = "Spellcraft"; break; + case 17: sSkill = "Spot"; break; + case 18: sSkill = "Taunt"; break; + case 19: sSkill = "Use Magic Device"; break; + case 20: sSkill = "Appraise"; break; + case 21: sSkill = "Tumble"; break; + case 22: sSkill = "Craft Trap"; break; + case 23: sSkill = "Bluff"; break; + case 24: sSkill = "Intimidate"; break; + case 25: sSkill = "Craft Armor"; break; + case 26: sSkill = "Craft Weapon"; break; + default: sSkill = ""; break; + } +return sSkill; +} + +string GetNameOfTrackingInt(int nSkill) +{ +string sSkill; +switch (nSkill) + { + case 0: sSkill = "BASE_ANIMAL"; break; + case 1: sSkill = "BASE_CONCEN"; break; + case 2: sSkill = "BASE_DISABL"; break; + case 3: sSkill = "BASE_DISCIP"; break; + case 4: sSkill = "BASE_HEAL"; break; + case 5: sSkill = "BASE_HIDE"; break; + case 6: sSkill = "BASE_LISTEN"; break; + case 7: sSkill = "BASE_LORE"; break; + case 8: sSkill = "BASE_MOVE_S"; break; + case 9: sSkill = "BASE_OPEN_L"; break; + case 10: sSkill = "BASE_PARRY"; break; + case 11: sSkill = "BASE_PERFOR"; break; + case 12: sSkill = "BASE_PERSUA"; break; + case 13: sSkill = "BASE_PICK_P"; break; + case 14: sSkill = "BASE_SEARCH"; break; + case 15: sSkill = "BASE_SET_TR"; break; + case 16: sSkill = "BASE_SPELLC"; break; + case 17: sSkill = "BASE_SPOT"; break; + case 18: sSkill = "BASE_TAUNT"; break; + case 19: sSkill = "BASE_USE_MA"; break; + case 20: sSkill = "BASE_APPRAI"; break; + case 21: sSkill = "BASE_TUMBLE"; break; + case 22: sSkill = "BASE_CRAFT_T"; break; + case 23: sSkill = "BASE_BLUFF"; break; + case 24: sSkill = "BASE_INTIMI"; break; + case 25: sSkill = "BASE_CRAFT_A"; break; + case 26: sSkill = "BASE_CRAFT_W"; break; + default: sSkill = ""; break; + } +return sSkill; +} + +int GetHitPointsGainedOnLevelUp(object oPC) +{ +int nClass = GetControlClass(oPC); +int nCon = GetLocalInt(oPC, "BASE_CON"); +int nClassDie; +int nFeatBonus = 0; +int nTotal; +if(GetHasFeat(FEAT_TOUGHNESS, oPC)) +{ +nFeatBonus = 1; +} +switch(nClass) + { + case CLASS_TYPE_DWARVENDEFENDER: + case CLASS_TYPE_BARBARIAN: + nClassDie = 12; break; + case CLASS_TYPE_DIVINECHAMPION: + case CLASS_TYPE_WEAPON_MASTER: + case CLASS_TYPE_PALADIN: + case CLASS_TYPE_RANGER: + case CLASS_TYPE_BLACKGUARD: + case CLASS_TYPE_FIGHTER: + case CLASS_TYPE_DRAGONDISCIPLE: + nClassDie = 10; break; + case CLASS_TYPE_SHADOWDANCER: + case CLASS_TYPE_DRUID: + case CLASS_TYPE_ARCANE_ARCHER: + case CLASS_TYPE_MONK: + case CLASS_TYPE_SHIFTER: + case CLASS_TYPE_CLERIC: + nClassDie = 8; break; + case CLASS_TYPE_ROGUE: + case CLASS_TYPE_ASSASSIN: + case CLASS_TYPE_BARD: + case CLASS_TYPE_HARPER: + case CLASS_TYPE_PALEMASTER: + nClassDie = 6; break; + case CLASS_TYPE_SORCERER: + case CLASS_TYPE_WIZARD: + nClassDie = 4; break; + } +nTotal = nClassDie+nFeatBonus+GetBaseAbilityModifier(nCon)+10; +DoDebug(oPC, "HP Gained: "+IntToString(nTotal)+"."); +return nTotal; +} + +void ReplenishLimitedUseFeats(object oPC) +{ +int nFeat = 0; +for(nFeat = 0; nFeat < 1072; nFeat++) + { + if (GetIsFeatLimitedUses(nFeat)) + { + IncrementRemainingFeatUses(oPC, nFeat); + } + } +} + +int GetIsFeatAvailable(int nFeat, object oPC) +{ +int nClass = GetControlClass(oPC); +if (DEV_CRIT_DISABLED && GetIsFeatDevCrit(nFeat)) return FALSE; +if (GetIsFeatFirstLevelOnly(nFeat)) return FALSE; +if (GetHasFeat(nFeat, oPC) && nFeat != 13) return FALSE;//only Extra Turning (13) may be taken multiple times +if (!GetIsClassFeat(nFeat, nClass, oPC) && !GetIsGeneralFeat(nFeat)) return FALSE;//if it's not a class skill and it's not a general skill return FALSE +if (GetAreFeatStatReqsMet(nFeat, oPC) && + GetAreFeatSkillReqsMet(nFeat, oPC) && + GetAreFeatFeatReqsMet(nFeat, oPC) && + GetHasRequiredSpellLevelForFeat(oPC, nFeat)) return TRUE; + +return FALSE; +} + +string GetNameOfAbility(int nStat) +{ +string sReturn; +switch (nStat) + { + case ABILITY_STRENGTH: sReturn = "Strength"; break; + case ABILITY_DEXTERITY: sReturn = "Dexterity"; break; + case ABILITY_CONSTITUTION: sReturn = "Constitution"; break; + case ABILITY_INTELLIGENCE: sReturn = "Intelligence"; break; + case ABILITY_WISDOM: sReturn = "Wisdom"; break; + case ABILITY_CHARISMA: sReturn = "Charisma"; break; + } +return sReturn; +} + +int GetIsClassFeat(int nFeat, int nClass, object oPC) +{ +int nLevel = GetClassLevelReqForFeat(nFeat, nClass); +if (nLevel < -1) return FALSE; +if (GetLevelByClass(nClass, oPC) < nLevel) return FALSE; +return TRUE; +} + +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_removed files/hgll_leto_inc.nss b/_removed files/hgll_leto_inc.nss new file mode 100644 index 00000000..9c7f146c --- /dev/null +++ b/_removed files/hgll_leto_inc.nss @@ -0,0 +1,284 @@ +#include "hgll_const_inc" +//--------------------------------DECLARATIONS--------------------------------// + +// This function bridges Letoscript into NWNX. +string LetoScript(string script); +// This function returns the bicfilename of the character specified. +string GetBicFileName(object oPC); +// This function finds the most recently edited .bic file in the player's folder, +// and applies whatever changes are conatained within the string of Letoscript. You must +// set the path to your servervault folder in the hgll_const_inc script for it to work. +// The easiest way to ensure that the ingame character is the most recently edited +// file is to save the character at least 3 seconds or more before calling this function. +void ApplyLetoScriptToPC(string Script, object oPC); +// This function tells Letoscript to add a stat point to the specified stat. +string AddStatPoint(int nStat); +// This function tells Letoscript to add a skill point to the specified skill. +string AddSkillPoint(int iSkill); +// This function tells Letoscript to add +1 to all the character's saving throws. +string ModifySaves(); +// This function tells Letoscript to add the specified number of hit points to the character. +string AddHitPoints(int nHP, int nLevel); +// This function tells Letoscript to add the specified feat to the character, treating +// it as if he had gained it on character creation (level 0). This ensures that deleveling +// the character thus will not remove the feat. +string AddFeat(int iFeat = -1); + +//----------------------------------FUNCTIONS---------------------------------// + +//--------------------------FUNCTIONS TAKEN FROM DAR--------------------------// + +string LetoScript(string script) +{ + SetLocalString(GetModule(), "NWNX!LETO!SCRIPT", script); + return GetLocalString(GetModule(), "NWNX!LETO!SCRIPT"); +} + + +string SetDocumentedLevel(int level = 1) { + string script = ""; + if (PHOENIX) + { + if(level > -1) script = ""; + } + else + { + if(level > -1) script = "/Lootable = "+IntToString(level)+";"; + } + return script; +} + +string GetBicFileName(object oPC) +{ + string sChar, sBicName; + string sPCName = GetStringLowerCase(GetName(oPC)); + int i, iNameLength = GetStringLength(sPCName); + + for(i=0; i < iNameLength; i++) { + sChar = GetSubString(sPCName, i, 1); + if (TestStringAgainstPattern("(*a|*n|*w|'|-|_)", sChar)) { + if (sChar != " ") sBicName += sChar; + } + } + return GetStringLeft(sBicName, 16); +} + +//------------------------------FUNCTIONS ADDED-------------------------------// + +void ApplyLetoScriptToPC(string Script, object oPC) +{ + string VaultPath = NWNPATH; + string Player = GetPCPlayerName(oPC); + string BicPath = VaultPath + Player + "/"; + string BicFile; + if (PHOENIX) + { + BicFile = BicPath + GetBicFileName(oPC)+ ".bic"; + Script = ">"+Script+">"; + } + else + { + Script = + "$RealFile = q<" + BicPath + "> + FindNewestBic q<" + BicPath + ">;" + + "$EditFile = $RealFile + '.utc';" + + "FileRename $RealFile, $EditFile;" + + "%bic = $EditFile or die;" + + Script + + "%bic = '>';" + + "close %bic;" + + "FileRename $EditFile, $RealFile;"; + } + SetLocalString(oPC, "LetoScript", Script); + //DelayCommand(3.0f, ActivatePortal(oPC, "62.167.237.11:5122", "", "",TRUE)); + DelayCommand(3.0f, BootPC(oPC)); + //DelayCommand(3.0f, ActivatePortal(oPC, "64.137.237.115:5121", "", "", TRUE)); +} + +string AddStatPoint(int nStat) +{ +string sReturn; +switch (nStat) + { + case ABILITY_STRENGTH: sReturn = "Str"; break; + case ABILITY_DEXTERITY: sReturn = "Dex"; break; + case ABILITY_CONSTITUTION: sReturn = "Con"; break; + case ABILITY_INTELLIGENCE: sReturn = "Int"; break; + case ABILITY_WISDOM: sReturn = "Wis"; break; + case ABILITY_CHARISMA: sReturn = "Cha"; break; + default: return ""; + } + if (PHOENIX) + { + return "+1)}>"; + } + else + { + return "/"+sReturn+" = /"+sReturn+" + 1;"; + } +} + +string AddSkillPoint(int iSkill) +{ + string sSkill = IntToString(iSkill); + if (PHOENIX) + { + return + "+1)}>"+ + "+1)}>"; + } + else + { + return + "/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +1; "+ + "/LvlStatList/[0]/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +1; "; + } +} + +string ModifySaves() +{ + string sLeto; + if (PHOENIX) + { + sLeto = "+1}>" + + "+1}>" + + "+1}>"; + } + else + { + sLeto = "/fortbonus = /fortbonus +1; /refbonus = /refbonus +1; /willbonus = /willbonus +1; "; + } + return sLeto; +} + +string AddHitPoints(int nHP, int nLevel) +{ +int nLvlHPAddedAt; +string sLeto; +string sLvl; +string sHP = IntToString(nHP); +if (nLevel < 41) + { + nLvlHPAddedAt = 0;//we add the hp at a different level each level so that the 255 field limit is never reached - if it was, it would roll over, causing the loss of 255 hps + } +else + { + nLvlHPAddedAt = nLevel - 40; + } +sLvl = IntToString(nLvlHPAddedAt); +if (PHOENIX) + { + sLeto = "+" + sHP + "}>" + + "+" + sHP + "}>" + + "+" + sHP + "}>" + + "+" + sHP + "}>" + + "+" + sHP + "}>"; + } +else + { + sLeto = "/HitPoints = /HitPoints + " + sHP + "; "; + sLeto += "/LvlStatList/[" + IntToString(nLvlHPAddedAt) + "]/LvlStatHitDie = /LvlStatList/[" + IntToString(nLvlHPAddedAt) + "]/LvlStatHitDie + " + sHP + "; "; + sLeto += "/MaxHitPoints = /MaxHitPoints + " + sHP + "; "; + sLeto += "/CurrentHitPoints = /CurrentHitPoints + " + sHP + "; "; + sLeto += "/PregameCurrent = /PregameCurrent + " + sHP + "; "; + } +return sLeto; +} + +string AddFeat(int iFeat = -1) +{ + string sLeto; + string sEnd; + if(iFeat < 0) return ""; + if(iFeat > 763 && iFeat < 824)//Greater Ability Feats + { + if(iFeat <= 773)//CHA + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Cha = /Cha + 1;"; + } + } + else if(iFeat <= 783)//CON + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Con = /Con + 1;"; + } + } + else if(iFeat <= 793)//DEX + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Dex = /Dex + 1;"; + } + } + else if(iFeat <= 803)//INT + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Int = /Int + 1;"; + } + } + else if(iFeat <= 813)//WIS + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Wis = /Wis + 1;"; + } + } + else // <= 823 STR + { + if (PHOENIX) + { + sLeto = "+1)}>"; + } + else + { + sLeto = "/Str = /Str + 1;"; + } + } + } + else + { + sLeto = ""; + } + if (PHOENIX) + { + sEnd = "" + + ""; + } + else + { + sEnd = "add /FeatList/Feat, type => gffWord, value => " + IntToString(iFeat) + ";" + + "add /LvlStatList/[0]/FeatList/Feat, type => gffWord, value => " + IntToString(iFeat) + ";"; + } + return sLeto + sEnd; + +} +//below used to compile +/* +void main() +{ + +} +*/ diff --git a/_removed files/hgll_spells_inc.nss b/_removed files/hgll_spells_inc.nss new file mode 100644 index 00000000..0f40c236 --- /dev/null +++ b/_removed files/hgll_spells_inc.nss @@ -0,0 +1,808 @@ +//Returns the level of the input bard spell. Returns -1 if the input is not a bard spell. +int GetBardSpellLevel(int nSpell); +//Returns the level of the input sorcerer spell. Returns -1 if the input is not a sorcerer spell. +int GetSorcSpellLevel(int nSpell); +//This returns the name of any input sorcerer or bard spell. +string GetSpellName(int nSpell); + +int GetBardSpellLevel(int nSpell) +{ +int nResult = -1; //Defaults to not a Bard Spell + switch (nSpell/150) + { + case 0://0-149 + switch (nSpell/25) + { + case 0://0-24 + switch(nSpell) + { + case 4: nResult=3; break; + case 8: nResult=2; break; + case 9: nResult=2; break; + case 13: nResult=2; break; + case 15: nResult=3; break; + case 16: nResult=1; break; + case 20: nResult=3; break; + case 21: nResult=2; break; + } + break; + case 1://25-49 + switch(nSpell) + { + case 26: nResult=3; break; + case 31: nResult=4; break; + case 32: nResult=1; break; + case 33: nResult=0; break; + case 34: nResult=2; break; + case 35: nResult=3; break; + case 36: nResult=2; break; + case 37: nResult=0; break; + case 40: nResult=4; break; + case 41: nResult=3; break; + case 45: nResult=4; break; + } + break; + case 2://50-74 + switch(nSpell) + { + case 54: nResult=3; break; + case 66: nResult=1; break; + case 67: nResult=5; break; + } + break; + case 3://75-99 + switch(nSpell) + { + case 75: nResult=3; break; + case 78: nResult=3; break; + case 80: nResult=5; break; + case 82: nResult=4; break; + case 83: nResult=2; break; + case 86: nResult=1; break; + case 88: nResult=4; break; + case 90: nResult=2; break; + case 92: nResult=3; break; + case 94: nResult=1; break; + } + break; + case 4://100-124 + switch(nSpell) + { + case 100: nResult=0; break; + case 102: nResult=1; break; + case 113: nResult=6; break; + case 118: nResult=5; break; + case 120: nResult=2; break; + case 121: nResult=5; break; + } + break; + case 5://125-149 + switch(nSpell) + { + case 126: nResult=4; break; + case 146: nResult=3; break; + case 147: nResult=3; break; + } + break; + } + break; + case 1://150-299 + switch (nSpell/25) + { + case 6://150-174 + switch (nSpell) + { + case 151: nResult=0; break; + case 155: nResult=1; break; + case 157: nResult=2; break; + case 163: nResult=2; break; + case 165: nResult=1; break; + case 166: nResult=3; break; + case 167: nResult=2; break; + case 174: nResult=1; break; + } + break; + case 7://175-199 + switch (nSpell) + { + case 175: nResult=2; break; + case 176: nResult=3; break; + case 177: nResult=4; break; + case 179: nResult=5; break; + case 180: nResult=6; break; + } + break; + + } + break; + case 2://300-449 + switch (nSpell/25) + { + case 12://300-324 + switch (nSpell) + { + case 321: nResult=1; break; + case 322: nResult=3; break; + } + break; + case 14://350-374 + switch (nSpell) + { + case 354: nResult=2; break; + case 355: nResult=2; break; + case 356: nResult=2; break; + case 365: nResult=2; break; + case 368: nResult=6; break; + case 369: nResult=6; break; + case 373: nResult=4; break; + } + break; + case 15://375-399 + switch (nSpell) + { + case 376: nResult=4; break; + case 377: nResult=3; break; + } + break; + case 16://400-424 + switch (nSpell) + { + case 416: nResult=0; break; + } + break; + case 17://425-449 + switch (nSpell) + { + case 436: nResult=1; break; + case 442: nResult=1; break; + case 445: nResult=6; break; + } + break; + } + break; + case 3://450-569 + switch (nSpell/25) + { + case 18://450-474 + switch (nSpell) + { + case 456: nResult=1; break; + case 457: nResult=2; break; + case 458: nResult=3; break; + } + break; + + case 21://525-549 + switch (nSpell) + { + case 539: nResult=3; break; + case 544: nResult=1; break; + case 545: nResult=3; break; + } + break; + case 22://550-569 + switch (nSpell) + { + case 569: nResult=2; break; + } + break; + } + break; + } + +return nResult; +} + +int GetSorcSpellLevel(int nSpell) +{ +int nResult=-1;//Defaults to not a sorcerer spell + switch (nSpell/150) + { + case 0://0-149 + switch (nSpell/25) + { + case 0://0-24 + switch (nSpell) + { + case 0: nResult=6; break; + case 2: nResult=5; break; + case 4: nResult=4; break; + case 8: nResult=2; break; + case 9: nResult=2; break; + case 10: nResult=1; break; + case 13: nResult=2; break; + case 14: nResult=6; break; + case 15: nResult=4; break; + case 16: nResult=1; break; + case 18: nResult=6; break; + case 20: nResult=3; break; + case 21: nResult=3; break; + case 23: nResult=5; break; + case 24: nResult=1; break; + } + break; + case 1://25-49 + switch (nSpell) + { + case 25: nResult=5; break; + case 26: nResult=4; break; + case 27: nResult=4; break; + case 28: nResult=7; break; + case 30: nResult=8; break; + case 36: nResult=2; break; + case 37: nResult=0; break; + case 39: nResult=7; break; + case 40: nResult=5; break; + case 41: nResult=3; break; + case 44: nResult=9; break; + case 45: nResult=5; break; + case 47: nResult=4; break; + case 49: nResult=2; break; + } + break; + case 2://50-74 + switch (nSpell) + { + case 50: nResult=1; break; + case 51: nResult=9; break; + case 52: nResult=4; break; + case 54: nResult=4; break; + case 55: nResult=5; break; + case 56: nResult=7; break; + case 58: nResult=3; break; + case 59: nResult=3; break; + case 63: nResult=9; break; + case 64: nResult=2; break; + case 65: nResult=6; break; + case 66: nResult=1; break; + case 67: nResult=6; break; + case 69: nResult=8; break; + case 71: nResult=5; break; + case 72: nResult=6; break; + case 73: nResult=9; break; + case 74: nResult=6; break; + } + break; + case 3://75-99 + switch (nSpell) + { + case 75: nResult=3; break; + case 78: nResult=3; break; + case 82: nResult=5; break; + case 83: nResult=3; break; + case 86: nResult=1; break; + case 88: nResult=4; break; + case 89: nResult=8; break; + case 90: nResult=2; break; + case 92: nResult=3; break; + case 93: nResult=2; break; + case 94: nResult=2; break; + case 95: nResult=5; break; + case 96: nResult=5; break; + case 98: nResult=4; break; + case 99: nResult=5; break; + } + break; + case 4://100-124 + switch (nSpell) + { + case 100: nResult=0; break; + case 101: nResult=3; break; + case 102: nResult=1; break; + case 107: nResult=1; break; + case 110: nResult=8; break; + case 111: nResult=8; break; + case 113: nResult=6; break; + case 115: nResult=2; break; + case 116: nResult=9; break; + case 117: nResult=8; break; + case 118: nResult=5; break; + case 119: nResult=4; break; + case 120: nResult=2; break; + case 121: nResult=6; break; + case 122: nResult=9; break; + case 123: nResult=7; break; + } + break; + case 5://125-149 + switch (nSpell) + { + case 127: nResult=4; break; + case 128: nResult=6; break; + case 130: nResult=4; break; + case 131: nResult=9; break; + case 132: nResult=7; break; + case 134: nResult=8; break; + case 135: nResult=7; break; + case 137: nResult=3; break; + case 141: nResult=7; break; + case 143: nResult=1; break; + case 144: nResult=0; break; + case 145: nResult=4; break; + case 146: nResult=4; break; + } + break; + } + break; + case 1://150-299 + switch (nSpell/25) + { + case 6://150-174 + switch (nSpell) + { + case 150: nResult=2; break; + case 151: nResult=0; break; + case 155: nResult=1; break; + case 157: nResult=2; break; + case 158: nResult=6; break; + case 159: nResult=4; break; + case 160: nResult=7; break; + case 161: nResult=9; break; + case 165: nResult=1; break; + case 166: nResult=3; break; + case 169: nResult=7; break; + case 171: nResult=3; break; + case 172: nResult=4; break; + case 174: nResult=1; break; + } + break; + case 7://175-199 + switch (nSpell) + { + case 175: nResult=2; break; + case 176: nResult=3; break; + case 177: nResult=4; break; + case 178: nResult=9; break; + case 179: nResult=5; break; + case 180: nResult=6; break; + case 181: nResult=7; break; + case 182: nResult=8; break; + case 184: nResult=6; break; + case 185: nResult=9; break; + case 186: nResult=6; break; + case 188: nResult=3; break; + case 190: nResult=9; break; + case 191: nResult=4; break; + case 192: nResult=2; break; + case 193: nResult=9; break; + } + break; + } + break; + case 2://300-449 + switch (nSpell/25) + { + case 12://300-324 + switch (nSpell) + { + case 321: nResult=1; break; + case 322: nResult=3; break; + } + break; + case 14://350-374 + switch (nSpell) + { + case 354: nResult=2; break; + case 355: nResult=2; break; + case 356: nResult=2; break; + case 365: nResult=2; break; + case 367: nResult=8; break; + case 368: nResult=4; break; + case 369: nResult=5; break; + case 370: nResult=3; break; + case 371: nResult=1; break; + } + break; + case 15://375-399 + switch (nSpell) + { + case 375: nResult=4; break; + case 376: nResult=6; break; + case 377: nResult=3; break; + } + break; + case 16://400-424 + switch (nSpell) + { + case 415: nResult=1; break; + case 416: nResult=0; break; + case 417: nResult=1; break; + case 419: nResult=2; break; + case 424: nResult=0; break; + } + break; + case 17://425-449 + switch (nSpell) + { + case 427: nResult=8; break; + case 430: nResult=7; break; + case 436: nResult=2; break; + case 439: nResult=0; break; + case 440: nResult=5; break; + case 443: nResult=8; break; + case 447: nResult=1; break; + case 448: nResult=6; break; + } + break; + } + break; + case 3://450-569 + switch (nSpell/25) + { + case 18://450-474 + switch (nSpell) + { + case 456: nResult=1; break; + case 457: nResult=2; break; + case 458: nResult=3; break; + case 459: nResult=5; break; + case 460: nResult=6; break; + case 461: nResult=7; break; + case 462: nResult=8; break; + case 463: nResult=9; break; + } + break; + case 19://475-499 + switch (nSpell) + { + case 485: nResult=6; break; + case 486: nResult=6; break; + } + break; + case 20://500-524 + switch (nSpell) + { + case 515: nResult=7; break; + case 516: nResult=5; break; + case 518: nResult=2; break; + case 519: nResult=2; break; + case 520: nResult=2; break; + case 521: nResult=1; break; + case 522: nResult=1; break; + case 523: nResult=3; break; + case 524: nResult=5; break; + } + break; + case 21://525-549 + switch (nSpell) + { + case 526: nResult=3; break; + case 527: nResult=2; break; + case 528: nResult=6; break; + case 533: nResult=9; break; + case 534: nResult=1; break; + case 539: nResult=3; break; + case 541: nResult=8; break; + case 542: nResult=2; break; + case 543: nResult=1; break; + case 544: nResult=1; break; + case 545: nResult=3; break; + } + break; + case 22://550-569 + switch (nSpell) + { + case 569: nResult=2; break; + } + break; + } + break; + } +return nResult; +} + +string GetSpellName(int nSpell) +{ +string sResult = ""; + + switch (nSpell/150) + { + case 0://0-149 + switch (nSpell/25) + { + case 0://0-24 + switch (nSpell) + { + case 0: sResult = "Acid Fog"; break; + case 2: sResult = "Animate Dead"; break; + case 4: sResult = "Bestow Curse"; break; + case 8: sResult = "Blindness and Deafness"; break; + case 9: sResult = "Bull's Strength"; break; + case 10: sResult = "Burning Hands"; break; + case 13: sResult = "Cat's Grace"; break; + case 14: sResult = "Chain Lightning"; break; + case 15: sResult = "Charm Monster"; break; + case 16: sResult = "Charm Person"; break; + case 18: sResult = "Circle of Death"; break; + case 20: sResult = "Clairaudience and Clairvoyance"; break; + case 21: sResult = "Clarity"; break; + case 23: sResult = "Cloudkill"; break; + case 24: sResult = "Color Spray"; break; + } + break; + case 1://25-49 + switch (nSpell) + { + case 25: sResult = "Cone of Cold"; break; + case 26: sResult = "Confusion"; break; + case 27: sResult = "Contagion"; break; + case 28: sResult = "Control Undead"; break; + case 30: sResult = "Create Undead"; break; + case 31: sResult = "Cure Critical Wounds"; break; + case 32: sResult = "Cure Light Wounds"; break; + case 33: sResult = "Cure Minor Wounds"; break; + case 34: sResult = "Cure Moderate Wounds"; break; + case 35: sResult = "Cure Serious Wounds"; break; + case 36: sResult = "Darkness"; break; + case 37: sResult = "Daze"; break; + case 39: sResult = "Delayed Blast Fireball"; break; + case 40: sResult = "Dismissal"; break; + case 41: sResult = "Dispel Magic"; break; + case 44: sResult = "Dominate Monster"; break; + case 45: sResult = "Dominate Person"; break; + case 47: sResult = "Elemental Shield"; break; + case 49: sResult = "Endurance"; break; + } + break; + case 2://50-74 + switch (nSpell) + { + case 50: sResult = "Endure Elements"; break; + case 51: sResult = "Energy Drain"; break; + case 52: sResult = "Enervation"; break; + case 54: sResult = "Fear"; break; + case 55: sResult = "Feeblemind"; break; + case 56: sResult = "Finger of Death"; break; + case 58: sResult = "Fireball"; break; + case 59: sResult = "Flame Arrow"; break; + case 63: sResult = "Gate"; break; + case 64: sResult = "Ghoul Touch"; break; + case 65: sResult = "Globe of Invulnerability"; break; + case 66: sResult = "Grease"; break; + case 67: sResult = "Greater Dispelling"; break; + case 69: sResult = "Greater Planar Binding"; break; + case 71: sResult = "Greater Shadow Conjuration"; break; + case 72: sResult = "Greater Spell Breach"; break; + case 73: sResult = "Greater Spell Mantle"; break; + case 74: sResult = "Greater Stoneskin"; break; + } + break; + case 3://75-99 + switch (nSpell) + { + case 75: sResult = "Gust of Wind"; break; + case 78: sResult = "Haste"; break; + case 80: sResult = "Healing Circle"; break; + case 82: sResult = "Hold Monster"; break; + case 83: sResult = "Hold Person"; break; + case 86: sResult = "Identify"; break; + case 88: sResult = "Improved Invisibility"; break; + case 89: sResult = "Incendiary Cloud"; break; + case 90: sResult = "Invisibility"; break; + case 92: sResult = "Invisibility Sphere"; break; + case 93: sResult = "Knock"; break; + case 94: sResult = "Lesser Dispel"; break; + case 95: sResult = "Lesser Mind Blank"; break; + case 96: sResult = "Lesser Planar Binding"; break; + case 97: sResult = "Lesser Restoration"; break; + case 98: sResult = "Lesser Spell Breach"; break; + case 99: sResult = "Lesser Spell Mantle"; break; + } + break; + case 4://100-124 + switch (nSpell) + { + case 100: sResult = "Light"; break; + case 101: sResult = "Lightning Bolt"; break; + case 102: sResult = "Mage Armor"; break; + case 107: sResult = "Magic Missle"; break; + case 110: sResult = "Mass Blindness and Deafness"; break; + case 111: sResult = "Mass Charm"; break; + case 113: sResult = "Mass Haste"; break; + case 115: sResult = "Melf's Acid Arrow"; break; + case 116: sResult = "Meteor Swarm"; break; + case 117: sResult = "Mind Blank"; break; + case 118: sResult = "Mind Fog"; break; + case 119: sResult = "Minor Globe of Invulnerability"; break; + case 120: sResult = "Ghostly Visage"; break; + case 121: sResult = "Ethereal Visage"; break; + case 122: sResult = "Mordenkainen's Disjunction"; break; + case 123: sResult = "Mordenkainen's Sword"; break; + } + break; + case 5://125-149 + switch (nSpell) + { + case 126: sResult = "Neutralize Poison"; break; + case 127: sResult = "Phantasmal Killer"; break; + case 128: sResult = "Planar Binding"; break; + case 130: sResult = "Polymorph Self"; break; + case 131: sResult = "Power Word Kill"; break; + case 132: sResult = "Power Word Stun"; break; + case 134: sResult = "Premonition"; break; + case 135: sResult = "Premonition"; break; + case 137: sResult = "Protection from Elements"; break; + case 141: sResult = "Protection from Spells"; break; + case 143: sResult = "Ray of Enfeeblement"; break; + case 144: sResult = "Ray of Frost"; break; + case 145: sResult = "Remove Blindness and Deafness"; break; + case 146: sResult = "Remove Curse"; break; + case 147: sResult = "Remove Disease"; break; + } + break; + } + break; + case 1://150-299 + switch (nSpell/25) + { + case 6://150-174 + switch (nSpell) + { + case 150: sResult = "Resist Elements"; break; + case 151: sResult = "Resistance"; break; + case 155: sResult = "Scare"; break; + case 157: sResult = "See Invisibility"; break; + case 158: sResult = "Shades"; break; + case 159: sResult = "Shadow Conjuration"; break; + case 160: sResult = "Shadow Shield"; break; + case 161: sResult = "Shapechange"; break; + case 163: sResult = "Silence"; break; + case 165: sResult = "Sleep"; break; + case 166: sResult = "Slow"; break; + case 167: sResult = "Sound Burst"; break; + case 169: sResult = "Spell Mantle"; break; + case 171: sResult = "Stinking Cloud"; break; + case 172: sResult = "Stoneskin"; break; + case 174: sResult = "Summon Creature I"; break; + } + break; + case 7://175-199 + switch (nSpell) + { + case 175: sResult = "Summon Creature II"; break; + case 176: sResult = "Summon Creature III"; break; + case 177: sResult = "Summon Creature IV"; break; + case 178: sResult = "Summon Creature IX"; break; + case 179: sResult = "Summon Creature V"; break; + case 180: sResult = "Summon Creature VI"; break; + case 181: sResult = "Summon Creature VII"; break; + case 182: sResult = "Summon Creature VIII"; break; + case 184: sResult = "Tenser's Transformation"; break; + case 185: sResult = "Timestop"; break; + case 186: sResult = "True Seeing"; break; + case 188: sResult = "Vampric Touch"; break; + case 190: sResult = "Wail of the Banshee"; break; + case 191: sResult = "Wall of Fire"; break; + case 192: sResult = "Web"; break; + case 193: sResult = "Weird"; break; + } + break; + + } + break; + case 2://300-449 + switch (nSpell/25) + { + case 12://300-324 + switch (nSpell) + { + case 321: sResult = "Protection from Alignment"; break; + case 322: sResult = "Magic Circle Against Alignment"; break; + } + break; + case 14://350-374 + switch (nSpell) + { + case 354: sResult = "Eagle's Splendor"; break; + case 355: sResult = "Owl's Wisdom"; break; + case 356: sResult = "Fox's Cunning"; break; + case 365: sResult = "Ultravision"; break; + case 367: sResult = "Horrid Wilting"; break; + case 368: sResult = "Ice Storm"; break; + case 369: sResult = "Energy Buffer"; break; + case 370: sResult = "Negative Energy Burst"; break; + case 371: sResult = "Negative Energy Ray"; break; + case 373: sResult = "War Cry"; break; + } + break; + case 15://375-399 + switch (nSpell) + { + case 376: sResult = "Legend Lore"; break; + case 377: sResult = "Find Traps"; break; + } + break; + case 16://400-424 + switch (nSpell) + { + case 415: sResult = "True Strike"; break; + case 416: sResult = "Flare"; break; + case 417: sResult = "Shield"; break; + case 419: sResult = "Continual Flame"; break; + case 424: sResult = "Acid Splash"; break; + } + break; + case 17://425-449 + switch (nSpell) + { + case 427: sResult = "Sunburst"; break; + case 430: sResult = "Banishment"; break; + case 436: sResult = "Balagarn's Iron Horn"; break; + case 439: sResult = "Electric Jolt"; break; + case 440: sResult = "Firebrand"; break; + case 441: sResult = "Wounding Whispers"; break; + case 442: sResult = "Amplify"; break; + case 443: sResult = "Greater Sanctuary"; break; + case 445: sResult = "Dirge"; break; + case 447: sResult = "Isaac's Lesser Missle Storm"; break; + case 448: sResult = "Isaac's Greater Missle Storm"; break; + } + break; + } + break; + case 3://450-569 + switch (nSpell/25) + { + case 18://450-474 + switch (nSpell) + { + case 456: sResult = "Expeditious Retreat"; break; + case 457: sResult = "Tasha's Hideous Laughter"; break; + case 458: sResult = "Displacement"; break; + case 459: sResult = "Bigby's Interposing Hand"; break; + case 460: sResult = "Bigby's Forceful Hand"; break; + case 461: sResult = "Bigby's Grasping Hand"; break; + case 462: sResult = "Bigby's Clenched Fist"; break; + case 463: sResult = "Bigby's Crushing Hand"; break; + } + break; + case 19://475-499 + switch (nSpell) + { + case 485: sResult = "Flesh to Stone"; break; + case 486: sResult = "Stone to Flesh"; break; + } + break; + case 20://500-524 + switch (nSpell) + { + case 515: sResult = "Great Thunderclap"; break; + case 516: sResult = "Ball Lightning"; break; + case 518: sResult = "Combust"; break; + case 519: sResult = "Death Armor"; break; + case 520: sResult = "Gedlee's Electric Loop"; break; + case 521: sResult = "Horizikaul's Boom"; break; + case 522: sResult = "Ironguts"; break; + case 523: sResult = "Mestil's Acid Breath"; break; + case 524: sResult = "Mestil's Acid Sheath"; break; + } + break; + case 21://525-549 + switch (nSpell) + { + case 526: sResult = "Scintillating Sphere"; break; + case 527: sResult = "Stone Bones"; break; + case 528: sResult = "Undeath to Death"; break; + case 533: sResult = "Black Blade of Disaster"; break; + case 534: sResult = "Shelgarn's Persistent Blade"; break; + case 539: sResult = "Keen Edge"; break; + case 541: sResult = "Blackstaff"; break; + case 542: sResult = "Flame Weapon"; break; + case 543: sResult = "Ice Dagger"; break; + case 544: sResult = "Magic Weapon"; break; + case 545: sResult = "Greater Magic Weapon"; break; + } + break; + case 22://550-569 + switch (nSpell) + { + case 569: sResult = "Cloud of Bewilderment"; break; + } + break; + } + break; + } +return sResult; +} + +//void main(){} diff --git a/_removed files/hgll_struct_stat.nss b/_removed files/hgll_struct_stat.nss new file mode 100644 index 00000000..be0df5e4 --- /dev/null +++ b/_removed files/hgll_struct_stat.nss @@ -0,0 +1,39 @@ +// Original script taken from post by CID-78 in the Bioware scripting forums. +// Modified to return 'base' skills as well, though they must be passed through +// another filter for feats and stat bonuses after this function. +struct xAbility +{ + int nSTR; //stats in 2da order + int nDEX; + int nCON; + int nINT; + int nWIS; + int nCHA; + int nANIMAL_EMPATHY;//skills in 2da order + int nCONCENTRATION; + int nDISABLE_TRAP; + int nDISCIPLINE; + int nHEAL; + int nHIDE; + int nLISTEN; + int nLORE; + int nMOVE_SILENTLY; + int nOPEN_LOCK; + int nPARRY; + int nPERFORM; + int nPERSUADE; + int nPICK_POCKET; + int nSEARCH; + int nSET_TRAP; + int nSPELLCRAFT; + int nSPOT; + int nTAUNT; + int nUSE_MAGIC_DEVICE; + int nAPPRAISE; + int nTUMBLE; + int nCRAFT_TRAP; + int nBLUFF; + int nINTIMIDATE; + int nCRAFT_ARMOR; + int nCRAFT_WEAPON; +}; diff --git a/_removed files/nw_s0_acidfoga.nss b/_removed files/nw_s0_acidfoga.nss new file mode 100644 index 00000000..2f5a9fbc --- /dev/null +++ b/_removed files/nw_s0_acidfoga.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Acid Fog: On Enter +//:: NW_S0_AcidFogA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All creatures within the AoE take 2d6 acid damage + per round and upon entering if they fail a Fort Save + their movement is halved. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eSlow = EffectMovementSpeedDecrease(50); + object oTarget = GetEnteringObject(); + float fDelay = GetRandomDelay(1.0, 2.2); + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG)); + //Spell resistance check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + //Roll Damage + //Enter Metamagic conditions + nDamage = d8(5); + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 40;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Make a Fortitude Save to avoid the effects of the movement hit. + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay)) + { + //slowing effect + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oTarget); + // * BK: Removed this because it reduced damage, didn't make sense nDamage = d6(); + } + + //Set Damage Effect with the modified damage + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + //Apply damage and visuals + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } + } +} diff --git a/_removed files/nw_s0_acidfogc.nss b/_removed files/nw_s0_acidfogc.nss new file mode 100644 index 00000000..b945bf4d --- /dev/null +++ b/_removed files/nw_s0_acidfogc.nss @@ -0,0 +1,79 @@ +//:://///////////////////////////////////////////// +//:: Acid Fog: Heartbeat +//:: NW_S0_AcidFogC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All creatures within the AoE take 2d6 acid damage + per round and upon entering if they fail a Fort Save + their movement is halved. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage = d8(3); + effect eDam; + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + object oTarget; + float fDelay; + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 24;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + //Start cycling through the AOE Object for viable targets including doors and placable objects. + oTarget = GetFirstInPersistentObject(OBJECT_SELF); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay)) + { + nDamage = d6(); + } + fDelay = GetRandomDelay(0.4, 1.2); + //Fire cast spell at event for the affected target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG)); + //Spell resistance check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + //Apply damage and visuals + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target. + oTarget = GetNextInPersistentObject(OBJECT_SELF); + } +} diff --git a/_removed files/nw_s0_bescurse.nss b/_removed files/nw_s0_bescurse.nss new file mode 100644 index 00000000..ebfe86e4 --- /dev/null +++ b/_removed files/nw_s0_bescurse.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Bestow Curse +//:: NW_S0_BesCurse.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Afflicted creature must save or suffer a -2 penalty + to all ability scores. This is a supernatural effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Bob McCabe +//:: Created On: March 6, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk +//:: VFX Pass By: Preston W, On: June 20, 2001 +//:: Update Pass By: Preston W, On: July 20, 2001 + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + effect eCurse = EffectCurse(4, 4, 4, 4, 4, 4); + + //Make sure that curse is of type supernatural not magical + eCurse = SupernaturalEffect(eCurse); + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Signal spell cast at event + SignalEvent(oTarget, EventSpellCastAt(oTarget, SPELL_BESTOW_CURSE)); + //Make SR Check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make Will Save + if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC())) + { + //Apply Effect and VFX + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} diff --git a/_removed files/nw_s0_bladebara.nss b/_removed files/nw_s0_bladebara.nss new file mode 100644 index 00000000..512af426 --- /dev/null +++ b/_removed files/nw_s0_bladebara.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Blade Barrier: On Enter +//:: NW_S0_BladeBarA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates a wall 10m long and 2m thick of whirling + blades that hack and slice anything moving into + them. Anything caught in the blades takes + 2d6 per caster level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: July 20, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + object oTarget = GetEnteringObject(); + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); + int nMetaMagic = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(GetAreaOfEffectCreator()); + + //Make level check + if (nLevel > 25) + { + nLevel = 25; + } + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire spell cast at event + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_BLADE_BARRIER)); + //Roll Damage + int nDamage = d6(nLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = nLevel * 6;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Make SR Check + if (!MyResistSpell(GetAreaOfEffectCreator(), oTarget) ) + { + if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC())) + { + nDamage = nDamage/2; + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING); + //Apply damage and VFX + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} + diff --git a/_removed files/nw_s0_bladebarc.nss b/_removed files/nw_s0_bladebarc.nss new file mode 100644 index 00000000..cd5073b7 --- /dev/null +++ b/_removed files/nw_s0_bladebarc.nss @@ -0,0 +1,82 @@ +//:://///////////////////////////////////////////// +//:: Blade Barrier: Heartbeat +//:: NW_S0_BladeBarA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates a wall 10m long and 2m thick of whirling + blades that hack and slice anything moving into + them. Anything caught in the blades takes + 2d6 per caster level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: July 20, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + object oTarget; + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); + int nMetaMagic = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(GetAreaOfEffectCreator()); + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // Add damage to placeables/doors now that the command support bit fields + //-------------------------------------------------------------------------- + oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR); + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire spell cast at event + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_BLADE_BARRIER)); + //Make SR Check + if (!MyResistSpell(GetAreaOfEffectCreator(), oTarget) ) + { + //Roll Damage + int nDamage = d6(nLevel); + //Enter Metamagic conditions + if(nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = nLevel * 6;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC())) + { + nDamage = nDamage/2; + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING); + //Apply damage and VFX + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR); + } +} + diff --git a/_removed files/nw_s0_calllghtn.nss b/_removed files/nw_s0_calllghtn.nss new file mode 100644 index 00000000..99f21ff5 --- /dev/null +++ b/_removed files/nw_s0_calllghtn.nss @@ -0,0 +1,98 @@ +//:://///////////////////////////////////////////// +//:: Call Lightning +//:: NW_S0_CallLghtn.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spells smites an area around the caster + with bolts of lightning which strike all enemies. + Bolts do 1d10 per level up 10d10 +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 20, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 20) + { + nCasterLvl = 20; + } + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CALL_LIGHTNING)); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetRandomDelay(0.4, 1.75); + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_removed files/nw_s0_chlightn.nss b/_removed files/nw_s0_chlightn.nss new file mode 100644 index 00000000..bb48393e --- /dev/null +++ b/_removed files/nw_s0_chlightn.nss @@ -0,0 +1,186 @@ +//:://///////////////////////////////////////////// +//:: Chain Lightning +//:: NW_S0_ChLightn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The primary target is struck with 1d6 per caster, + 1/2 with a reflex save. 1 secondary target per + level is struck for 1d6 / 2 caster levels. No + repeat targets can be chosen. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brennon Holmes +//:: Created On: March 8, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 26, 2001 +//:: Update Pass By: Preston W, On: July 26, 2001 + +/* +bugfix by Kovi 2002.07.28 +- successful saving throw and (improved) evasion was ignored for + secondary targets, +- all secondary targets suffered exactly the same damage +2002.08.25 +- primary target was not effected +*/ + +#include "x0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + + //Limit caster level + // June 2/04 - Bugfix: Cap the level BEFORE the damage calculation, not after. Doh. + if (nCasterLevel > 20) + { + nCasterLevel = 20; + } + int nDamage = d6(nCasterLevel); + int nDamStrike; + int nNumAffected = 0; + int nMetaMagic = GetMetaMagicFeat(); + //Declare lightning effect connected the casters hands + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eDamage; + object oFirstTarget = GetSpellTargetObject(); + object oHolder; + object oTarget; + location lSpellLocation; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/is +50% + } + //Damage the initial target + if (spellsIsTarget(oFirstTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oFirstTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING)); + //Make an SR Check + if (!MyResistSpell(OBJECT_SELF, oFirstTarget)) + { + //Adjust damage via Reflex Save or Evasion or Improved Evasion + nDamStrike = GetReflexAdjustedDamage(nDamage, oFirstTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Set the damage effect for the first target + eDamage = EffectDamage(nDamStrike, DAMAGE_TYPE_ELECTRICAL); + //Apply damage to the first target and the VFX impact. + if(nDamStrike > 0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oFirstTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oFirstTarget); + } + } + } + //Apply the lightning stream effect to the first target, connecting it with the caster + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oFirstTarget,0.5); + + + //Reinitialize the lightning effect so that it travels from the first target to the next target + eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oFirstTarget, BODY_NODE_CHEST); + + + float fDelay = 0.2; + int nCnt = 0; + + + // * + // * Secondary Targets + // * + + + //Get the first target in the spell shape + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while (GetIsObjectValid(oTarget) && nCnt < nCasterLevel) + { + //Make sure the caster's faction is not hit and the first target is not hit + if (oTarget != oFirstTarget && spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + //Connect the new lightning stream to the older target and the new target + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5)); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING)); + //Do an SR check + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + + nDamage = d6(nCasterLevel) ; + + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/is +50% + } + //Adjust damage via Reflex Save or Evasion or Improved Evasion + nDamStrike = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Apply the damage and VFX impact to the current target + eDamage = EffectDamage(nDamStrike /2, DAMAGE_TYPE_ELECTRICAL); + if(nDamStrike > 0) //age > 0) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget)); + } + } + oHolder = oTarget; + + //change the currect holder of the lightning stream to the current target + if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST); + } + else + { + // * April 2003 trying to make sure beams originate correctly + effect eNewLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST); + if(GetIsEffectValid(eNewLightning)) + { + eLightning = eNewLightning; + } + } + + fDelay = fDelay + 0.1f; + } + //Count the number of targets that have been hit. + if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + nCnt++; + } + + // April 2003: Setting the new origin for the beam + // oFirstTarget = oTarget; + + //Get the next target in the shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + } diff --git a/_removed files/nw_s0_conecold.nss b/_removed files/nw_s0_conecold.nss new file mode 100644 index 00000000..c04fa62e --- /dev/null +++ b/_removed files/nw_s0_conecold.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Cone of Cold +//:: NW_S0_ConeCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// Cone of cold creates an area of extreme cold, +// originating at your hand and extending outward +// in a cone. It drains heat, causing 1d6 points of +// cold damage per caster level (maximum 15d6). +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: 10/18/02000 +//::////////////////////////////////////////////// +//:: Last Updated By: Aidan Scanlan On: April 11, 2001 +//:: Update Pass By: Preston W, On: July 25, 2001 + +float SpellDelay (object oTarget, int nShape); + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + + float fDelay; + location lTargetLocation = GetSpellTargetLocation(); + object oTarget; + //Limit Caster level for the purposes of damage. + if (nCasterLevel > 25) + { + nCasterLevel = 25; + } + //Declare the spell shape, size and the location. Capture the first target object in the shape. + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + // March 2003. Removed this as part of the reputation pass + // if((GetSpellId() == 340 && !GetIsFriend(oTarget)) || GetSpellId() == 25) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CONE_OF_COLD)); + //Get the distance between the target and caster to delay the application of effects + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20.0; + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay) && (oTarget != OBJECT_SELF)) + { + //Detemine damage + nDamage = d6(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage according to Reflex Save, Evasion or Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_COLD); + + // Apply effects to the currently selected target. + effect eCold = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + effect eVis = EffectVisualEffect(VFX_IMP_FROST_L); + if(nDamage > 0) + { + //Apply delayed effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCold, oTarget)); + } + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_removed files/nw_s0_crgrund.nss b/_removed files/nw_s0_crgrund.nss new file mode 100644 index 00000000..afb3df79 --- /dev/null +++ b/_removed files/nw_s0_crgrund.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Create Greater Undead +//:: NW_S0_CrGrUnd.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an undead type pegged to the character's + level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + nDuration = 24; + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + //Make metamagic extend check + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Determine undead to summon based on level + if (nCasterLevel <= 15) + { + eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 16) && (nCasterLevel <= 18)) + { + eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 19) && (nCasterLevel <= 24)) + { + eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD); + } + else + { + eSummon = EffectSummonCreature("greatlich02",VFX_FNF_SUMMON_UNDEAD); + } + //Apply summon effect and VFX impact. + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); +} + diff --git a/_removed files/nw_s0_crpdooma.nss b/_removed files/nw_s0_crpdooma.nss new file mode 100644 index 00000000..f20713f9 --- /dev/null +++ b/_removed files/nw_s0_crpdooma.nss @@ -0,0 +1,51 @@ +//:://///////////////////////////////////////////// +//:: Creeping Doom: On Enter +//:: NW_S0_AcidFogA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature caught in the swarm take an initial + damage of 1d20, but there after they take + 1d4 per swarm counter on the AOE. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + + //Declare major variables + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); + object oTarget = GetEnteringObject(); + effect eSpeed = EffectMovementSpeedDecrease(50); + effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eSpeed, eVis2); + + float fDelay; + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM)); + fDelay = GetRandomDelay(1.0, 1.8); + //Spell resistance check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + //Roll Damage + nDamage = d6(4)+ 6; + + //Set Damage Effect with the modified damage + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + //Apply damage and visuals + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } + } +} diff --git a/_removed files/nw_s0_crpdoomc.nss b/_removed files/nw_s0_crpdoomc.nss new file mode 100644 index 00000000..12f3b18a --- /dev/null +++ b/_removed files/nw_s0_crpdoomc.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: Creeping Doom: Heartbeat +//:: NW_S0_CrpDoomC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature caught in the swarm take an initial + damage of 1d20, but there after they take + 1d6 per swarm counter on the AOE. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + + //Declare major variables + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); + object oTarget = GetEnteringObject(); + string sConstant1 = "NW_SPELL_CONSTANT_CREEPING_DOOM1" + ObjectToString(GetAreaOfEffectCreator()); + string sConstant2 = "NW_SPELL_CONSTANT_CREEPING_DOOM2" + ObjectToString(GetAreaOfEffectCreator()); + int nSwarm = GetLocalInt(OBJECT_SELF, sConstant1); + int nDamCount = GetLocalInt(OBJECT_SELF, sConstant2); + float fDelay; + if(nSwarm < 1) + { + nSwarm = 1; + } + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + + //Get first target in spell area + oTarget = GetFirstInPersistentObject(); + while(GetIsObjectValid(oTarget) && nDamCount < 1000) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + fDelay = GetRandomDelay(1.0, 2.2); + //------------------------------------------------------------------ + // According to the book, SR Does not count against creeping doom + //------------------------------------------------------------------ + //Spell resistance check +// if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) +// { + SignalEvent(oTarget,EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM)); + //Roll Damage + nDamage = d6(nSwarm)+ 12; + //Set Damage Effect with the modified damage + eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + //Apply damage and visuals + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + nDamCount = nDamCount + nDamage; +// } + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } + if(nDamCount >= 1000) + { + DestroyObject(OBJECT_SELF, 1.0); + } + else + { + nSwarm++; + SetLocalInt(OBJECT_SELF, sConstant1, nSwarm); + SetLocalInt(OBJECT_SELF, sConstant2, nDamCount); + } +} diff --git a/_removed files/nw_s0_crundead.nss b/_removed files/nw_s0_crundead.nss new file mode 100644 index 00000000..d0448a14 --- /dev/null +++ b/_removed files/nw_s0_crundead.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Create Undead +//:: NW_S0_CrUndead.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Spell summons a Ghoul, Shadow, Ghast, Wight or + Wraith +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + nDuration = 24; + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Set the summoned undead to the appropriate template based on the caster level + if (nCasterLevel <= 13) + { + eSummon = EffectSummonCreature("doomknight01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 14) && (nCasterLevel <= 18)) + { + eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 19) && (nCasterLevel <= 25)) + { + eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); // change later + } + else if ((nCasterLevel >= 26)) + { + eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD); + } + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); +} + diff --git a/_removed files/nw_s0_delfirea.nss b/_removed files/nw_s0_delfirea.nss new file mode 100644 index 00000000..8b288074 --- /dev/null +++ b/_removed files/nw_s0_delfirea.nss @@ -0,0 +1,98 @@ +//:://///////////////////////////////////////////// +//:: Delayed Blast Fireball: On Enter +//:: NW_S0_DelFireA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The caster creates a trapped area which detects + the entrance of enemy creatures into 3 m area + around the spell location. When tripped it + causes a fiery explosion that does 1d6 per + caster level up to a max of 20d6 damage. +*/ +//::////////////////////////////////////////////// +//:: Georg: Removed Spellhook, fixed damage cap +//:: Created By: Preston Watamaniuk +//:: Created On: July 27, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" +void main() +{ + + //Declare major variables + object oTarget = GetEnteringObject(); + object oCaster = GetAreaOfEffectCreator(); + location lTarget = GetLocation(OBJECT_SELF); + int nDamage; + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(oCaster); + int nFire = GetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL"); + //Limit caster level + if (nCasterLevel > 30) + { + nCasterLevel = 30; + } + effect eDam; + effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Check the faction of the entering object to make sure the entering object is not in the casters faction + if(nFire == 0) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + SetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL",TRUE); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Cycle through the targets in the explosion area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_DELAYED_BLAST_FIREBALL)); + //Make SR check + if (!MyResistSpell(oCaster, oTarget)) + { + nDamage = d8(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + //Change damage according to Reflex, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); + //Set up the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply VFX impact and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } + else + { + //They will be taking SOMETHING! + nDamage = d8(12); + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + + //Apply VFX impact and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + + } + } + } + //Get next target in the sequence + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + DestroyObject(OBJECT_SELF, 1.0); + } + } +} diff --git a/_removed files/nw_s0_delfirebal.nss b/_removed files/nw_s0_delfirebal.nss new file mode 100644 index 00000000..02a5d66a --- /dev/null +++ b/_removed files/nw_s0_delfirebal.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Delayed Blast Fireball +//:: NW_S0_DelFirebal.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The caster creates a trapped area which detects + the entrance of enemy creatures into 3 m area + around the spell location. When tripped it + causes a fiery explosion that does 1d6 per + caster level up to a max of 20d6 damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: July 27, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables including Area of Effect Object + effect eAOE = EffectAreaOfEffect(AOE_PER_DELAY_BLAST_FIREBALL); + location lTarget = GetSpellTargetLocation(); + int nDuration = GetCasterLevel(OBJECT_SELF); + //Make sure the duration is at least one round + if (nDuration == 0) + { + nDuration = 1; + } + int nMetaMagic = GetMetaMagicFeat(); + //Check Extend metamagic feat. + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2;//Duration is +100% + } + //Create an instance of the AOE Object using the Apply Effect function + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration)); +} + + diff --git a/_removed files/nw_s0_destruc.nss b/_removed files/nw_s0_destruc.nss new file mode 100644 index 00000000..add3a9c9 --- /dev/null +++ b/_removed files/nw_s0_destruc.nss @@ -0,0 +1,82 @@ +//:://///////////////////////////////////////////// +//:: Destruction +//:: NW_S0_Destruc +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The target creature is destroyed if it fails a + Fort save, otherwise it takes 10d6 damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 13, 2001 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + int nCasterLevel = GetCasterLevel(OBJECT_SELF)/2; + effect eSlay = EffectDeath(); + effect eDam; + effect eVis = EffectVisualEffect(234); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DESTRUCTION)); + //Make SR check + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make a saving throw check + //This spell is no longer a Death Effect They make a save or die. + if(!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC())) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget); + } + else + { + nDamage = d8(1) * nCasterLevel; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + //Apply VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_removed files/nw_s0_eleswarm.nss b/_removed files/nw_s0_eleswarm.nss new file mode 100644 index 00000000..c3ae370e --- /dev/null +++ b/_removed files/nw_s0_eleswarm.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Elemental Swarm +//:: NW_S0_EleSwarm.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spell creates a conduit from the caster + to the elemental planes. The first elemental + summoned is a 24 HD Air elemental. Whenever an + elemental dies it is replaced by the next + elemental in the chain Air, Water, Earth, Fire +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: Update Pass By: Preston W, On: July 30, 2001 + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + nDuration = 24; + effect eSummon; + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Check for metamagic duration + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration * 2; //Duration is +100% + } + //Set the summoning effect + // eSummon = EffectSwarm(FALSE, "NW_SW_AIRGREAT", "NW_SW_WATERGREAT","NW_SW_EARTHGREAT","NW_SW_FIREGREAT"); + eSummon = EffectSwarm(TRUE, "airgreat8", "watergreat8", "earthgreat8", "firegreat8"); + //Apply the summon effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSummon, OBJECT_SELF, HoursToSeconds(nDuration)); +} + diff --git a/_removed files/nw_s0_enedrain.nss b/_removed files/nw_s0_enedrain.nss new file mode 100644 index 00000000..d1462c36 --- /dev/null +++ b/_removed files/nw_s0_enedrain.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Energy Drain +//:: NW_S0_EneDrain.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Target loses 2d4 levels. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nDrain = d4(2); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDrain = 8;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDrain = nDrain + (nDrain/2); //Damage/Healing is +50% + } + effect eDrain = EffectNegativeLevel(nDrain); + eDrain = SupernaturalEffect(eDrain); + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERGY_DRAIN)); + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) + { + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} + diff --git a/_removed files/nw_s0_enervat.nss b/_removed files/nw_s0_enervat.nss new file mode 100644 index 00000000..34a17ca0 --- /dev/null +++ b/_removed files/nw_s0_enervat.nss @@ -0,0 +1,79 @@ +//:://///////////////////////////////////////////// +//:: Enervation +//:: NW_S0_Enervat.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Target Loses 1d4 levels for 1 hour per caster + level +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nDrain = d4(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDrain = 4;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDrain = nDrain + (nDrain/2); //Damage/Healing is +50% + } + else if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + effect eDrain = EffectNegativeLevel(nDrain); + effect eLink = EffectLinkEffects(eDrain, eDur); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERVATION)); + //Resist magic check + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} + diff --git a/_removed files/nw_s0_findtrap.nss b/_removed files/nw_s0_findtrap.nss new file mode 100644 index 00000000..bc46da73 --- /dev/null +++ b/_removed files/nw_s0_findtrap.nss @@ -0,0 +1,36 @@ +//:://///////////////////////////////////////////// +//:: Find Traps +//:: NW_S0_FindTrap +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Finds and removes all traps within 30m. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 29, 2001 +//::////////////////////////////////////////////// + +void main() +{ + effect eVis = EffectVisualEffect(VFX_IMP_KNOCK); + int nCnt = 1; + + object oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + + while(GetIsObjectValid(oTrap) && GetDistanceToObject(oTrap) <= 30.0) + { + if(GetIsTrapped(oTrap)) + { + int DC = GetTrapDisarmDC(oTrap); + if (DC <= 30){ + SetTrapDetectedBy(oTrap, OBJECT_SELF); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTrap)); + DelayCommand(2.0, SetTrapDisabled(oTrap)); + } + } + nCnt++; + oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + } +} + diff --git a/_removed files/nw_s0_fingdeath.nss b/_removed files/nw_s0_fingdeath.nss new file mode 100644 index 00000000..88ff52a5 --- /dev/null +++ b/_removed files/nw_s0_fingdeath.nss @@ -0,0 +1,97 @@ +//:://///////////////////////////////////////////// +//:: Finger of Death +//:: NW_S0_FingDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// You can slay any one living creature within range. +// The victim is entitled to a Fortitude saving throw to +// survive the attack. If he succeeds, he instead +// sustains 3d6 points of damage +1 point per caster +// level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Oct 17, 2000 +//::////////////////////////////////////////////// +//:: Updated By: Georg Z, On: Aug 21, 2003 - no longer affects placeables + +#include "x0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_DEATH_L); + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + + if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE,OBJECT_SELF)) + { + //GZ: I still signal this event for scripting purposes, even if a placeable + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FINGER_OF_DEATH)); + if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + + //Make SR check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make Forttude save + if (!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH)) + { + //Apply the death effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + else + { + // Target shouldn't take damage if they are immune to death magic. + + //NOTE: I have made it where they take dmg no matter what! + // if ( GetIsImmune( oTarget, IMMUNITY_TYPE_DEATH) == FALSE ) + // { + //Roll damage(d6 X Caster Level up 40!) + nDamage = d6(1) * nCasterLvl; + //Make metamagic checks + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + //Apply damage effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + // } + } + } + } + } +} diff --git a/_removed files/nw_s0_fireball.nss b/_removed files/nw_s0_fireball.nss new file mode 100644 index 00000000..559a028e --- /dev/null +++ b/_removed files/nw_s0_fireball.nss @@ -0,0 +1,109 @@ +//:://///////////////////////////////////////////// +//:: Fireball +//:: NW_S0_Fireball +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// A fireball is a burst of flame that detonates with +// a low roar and inflicts 1d6 points of damage per +// caster level (maximum of 10d6) to all creatures +// within the area. Unattended objects also take +// damage. The explosion creates almost no pressure. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Oct 18 , 2000 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001 +//:: Last Updated By: AidanScanlan, On: April 11, 2001 +//:: Last Updated By: Preston Watamaniuk, On: May 25, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 15) + { + nCasterLvl = 15; + } + //Apply the fireball explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + if((GetSpellId() == 341) || GetSpellId() == 58) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIREBALL)); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_removed files/nw_s0_firestrm.nss b/_removed files/nw_s0_firestrm.nss new file mode 100644 index 00000000..70a8a1b6 --- /dev/null +++ b/_removed files/nw_s0_firestrm.nss @@ -0,0 +1,104 @@ +//:://///////////////////////////////////////////// +//:: Fire Storm +//:: NW_S0_FireStm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates a zone of destruction around the caster + within which all living creatures are pummeled + with fire. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 11, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 21, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + int nDamage2; + + //Level Capp + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + if(nCasterLevel > 30) + { + nCasterLevel == 30; + } + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eFireStorm = EffectVisualEffect(VFX_FNF_FIRESTORM); + float fDelay; + //Apply Fire and Forget Visual in the area; + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFireStorm, GetLocation(OBJECT_SELF)); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while(GetIsObjectValid(oTarget)) + { + //This spell smites everyone who is more than 2 meters away from the caster. + //if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0) + //{ + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + fDelay = GetRandomDelay(1.5, 2.5); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIRE_STORM)); + //Make SR check, and appropriate saving throw(s). + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll Damage + nDamage = d6(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + //Save versus both holy and fire damage + nDamage2 = nDamage; //No Save for Divine Dmg.. + //GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE); + nDamage = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. For this spell we have used + //both Divine and Fire damage. + effect eDivine = EffectDamage(nDamage2, DAMAGE_TYPE_DIVINE); + effect eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDivine, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //} + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_removed files/nw_s0_flmarrow.nss b/_removed files/nw_s0_flmarrow.nss new file mode 100644 index 00000000..09467c42 --- /dev/null +++ b/_removed files/nw_s0_flmarrow.nss @@ -0,0 +1,99 @@ +//:://///////////////////////////////////////////// +//:: Flame Arrow +//:: NW_S0_FlmArrow +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Fires a stream of fiery arrows at the selected + target that do 4d6 damage per arrow. 1 Arrow + per 4 levels is created. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 20, 2001 +//:: Updated By: Georg Zoeller, Aug 18 2003: Uncapped +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nDamage = 0; + int nMetaMagic = GetMetaMagicFeat(); + int nCnt; + effect eMissile; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + int nMissiles = (nCasterLvl)/4; + + float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); + float fDelay = fDist/(3.0 * log(fDist) + 2.0); + //Limit missiles to five + if(nMissiles == 0) + { + nMissiles = 1; + } + /* Uncapped because PHB does list any cap and we now got epic levels + else if (nMissiles > 5) + { + nMissiles = 5; + }*/ + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FLAME_ARROW)); + //Apply a single damage hit for each missile instead of as a single mass + //Make SR Check + for (nCnt = 1; nCnt <= nMissiles; nCnt++) + { + if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + + //Roll damage + int nDam = d6(3) + 8; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDam = 26;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDam = nDam + nDam/2; //Damage/Healing is +50% + } + nDam = GetReflexAdjustedDamage(nDam, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + //Set damage effect + effect eDam = EffectDamage(nDam, DAMAGE_TYPE_FIRE); + //Apply the MIRV and damage effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget)); + + } + // * May 2003: Make it so the arrow always appears, even if resisted + eMissile = EffectVisualEffect(VFX_IMP_MIRV_FLAME); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget); + } + } +} + diff --git a/_removed files/nw_s0_flmstrike.nss b/_removed files/nw_s0_flmstrike.nss new file mode 100644 index 00000000..0359a17b --- /dev/null +++ b/_removed files/nw_s0_flmstrike.nss @@ -0,0 +1,108 @@ +//:://///////////////////////////////////////////// +//:: Flame Strike +//:: NW_S0_FlmStrike +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// A flame strike is a vertical column of divine fire +// roaring downward. The spell deals 1d6 points of +// damage per level, to a maximum of 15d6. Half the +// damage is fire damage, but the rest of the damage +// results directly from divine power and is therefore +// not subject to protection from elements (fire), +// fire shield (chill shield), etc. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Oct 19, 2000 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 20, 2001 +//:: Update Pass By: Preston W, On: Aug 1, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nDamage, nDamage2; + int nMetaMagic = GetMetaMagicFeat(); + effect eStrike = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + effect eHoly; + effect eFire; + + //Limit caster level for the purposes of determining damage. + if (nCasterLvl > 25) + { + nCasterLvl = 25; + } + + + //Declare the spell shape, size and the location. Capture the first target object in the shape. + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR); + //Apply the location impact visual to the caster location instead of caster target creature. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation()); + //Cycle through the targets within the spell shape until an invalid object is captured. + while ( GetIsObjectValid(oTarget) ) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FLAME_STRIKE)); + //Make SR check, and appropriate saving throw(s). + if (!MyResistSpell(OBJECT_SELF, oTarget, 0.6)) + { + nDamage = d6(nCasterLvl); + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Adjust the damage based on Reflex Save, Evasion and Improved Evasion + nDamage2 = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE); + nDamage = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + //Make a faction check so that only enemies receieve the full brunt of the damage. + if(!GetIsFriend(oTarget)) + { + eHoly = EffectDamage(nDamage2,DAMAGE_TYPE_DIVINE); + DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHoly, oTarget)); + } + // Apply effects to the currently selected target. + eFire = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); + DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM,GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR); + } +} diff --git a/_removed files/nw_s0_gate.nss b/_removed files/nw_s0_gate.nss new file mode 100644 index 00000000..376f0bd2 --- /dev/null +++ b/_removed files/nw_s0_gate.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Gate +//:: NW_S0_Gate.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +//:: Summons a Balor to fight for the caster. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +void CreateBalor(); +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + //Make metamagic extend check + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Summon the Balor and apply the VFX impact + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + location lSpellTargetLOC = GetSpellTargetLocation(); + + if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) || + GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) || + GetHasSpellEffect(SPELL_HOLY_AURA)) + { + eSummon = EffectSummonCreature("gatebalor01",VFX_FNF_SUMMON_GATE,3.0); + float fSeconds = RoundsToSeconds(nDuration); + DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds)); + + } + else + { + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lSpellTargetLOC); + DelayCommand(3.0, CreateBalor()); + } +} + +void CreateBalor() +{ + CreateObject(OBJECT_TYPE_CREATURE, "gatebalor1", GetSpellTargetLocation()); +} + diff --git a/_removed files/nw_s0_grplanar.nss b/_removed files/nw_s0_grplanar.nss new file mode 100644 index 00000000..748de3fd --- /dev/null +++ b/_removed files/nw_s0_grplanar.nss @@ -0,0 +1,102 @@ +//:://///////////////////////////////////////////// +//:: Greater Planar Binding +//:: NW_S0_GrPlanar.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an outsider dependant on alignment, or + holds an outsider if the creature fails a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eGate; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + + effect eLink = EffectLinkEffects(eDur, EffectParalyze()); + eLink = EffectLinkEffects(eLink, eDur2); + eLink = EffectLinkEffects(eLink, eDur3); + + object oTarget = GetSpellTargetObject(); + int nRacial = GetRacialType(oTarget); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Check to see if a valid target has been chosen + if (GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_PLANAR_BINDING)); + //Check for racial type + if(nRacial == RACIAL_TYPE_OUTSIDER) + { + //Allow will save to negate hold effect + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+20)) + { + //Apply the hold effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); + } + } + } + } + else + { + //If the ground was clicked on summon an outsider based on alignment + int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); + float fDelay = 3.0; + switch (nAlign) + { + case ALIGNMENT_EVIL: + eSummon = EffectSummonCreature("succubus03", VFX_FNF_SUMMON_GATE, 3.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + break; + case ALIGNMENT_GOOD: + eSummon = EffectSummonCreature("avenger03", VFX_FNF_SUMMON_CELESTIAL, 3.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL); + break; + case ALIGNMENT_NEUTRAL: + eSummon = EffectSummonCreature("slaad03", VFX_FNF_SUMMON_MONSTER_3, 1.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + fDelay = 1.0; + break; + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); + } +} + diff --git a/_removed files/nw_s0_hammgods.nss b/_removed files/nw_s0_hammgods.nss new file mode 100644 index 00000000..cd522c76 --- /dev/null +++ b/_removed files/nw_s0_hammgods.nss @@ -0,0 +1,110 @@ +//:://///////////////////////////////////////////// +//:: Hammer of the Gods +//:: [NW_S0_HammGods.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Does 1d8 damage to all enemies within the +//:: spells 20m radius and dazes them if a +//:: Will save is failed. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 21, 2001 +//:: Update Pass By: Preston W, On: Aug 1, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + effect eDam; + effect eDaze = EffectDazed(); + effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + effect eLink = EffectLinkEffects(eMind, eDaze); + eLink = EffectLinkEffects(eLink, eDur); + + effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY); + effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY); + float fDelay; + int nDamageDice = nCasterLvl/2; + if(nDamageDice == 0) + { + nDamageDice = 1; + } + //Limit caster level + if (nDamageDice > 15) + { + nDamageDice = 15; + } + int nDamage; + //Apply the holy strike VFX + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation()); + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation()); + while (GetIsObjectValid(oTarget)) + { + //Make faction checks + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HAMMER_OF_THE_GODS)); + //Make SR Check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + fDelay = GetRandomDelay(0.6, 1.3); + //Roll damage + nDamage = d8(nDamageDice); + //Make metamagic checks + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nDamageDice; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 ); + } + //Make a will save for half damage and negation of daze effect + if (MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 0.5)) + { + nDamage = nDamage / 2; + } + else + { + //Apply daze effect + DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6()))); + } + //Set damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE ); + //Apply the VFX impact and damage effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in shape + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation()); + } +} diff --git a/_removed files/nw_s0_horrwilt.nss b/_removed files/nw_s0_horrwilt.nss new file mode 100644 index 00000000..5dbcfc4e --- /dev/null +++ b/_removed files/nw_s0_horrwilt.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Horrid Wilting +//:: NW_S0_HorrWilt +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All living creatures (not undead or constructs) + suffer 1d8 damage per caster level to a maximum + of 25d8 damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 12 , 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +int bInt; + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_HORRID_WILTING); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 35) + { + nCasterLvl = 35; + } + //Apply the horrid wilting explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + // GZ: Not much fun if the caster is always killing himself + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HORRID_WILTING)); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetRandomDelay(1.5, 2.5); + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + if(GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + //Roll damage for each target + nDamage = d8(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } //Epic DC Bonus Added + if(/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) + { + nDamage = nDamage/2; + } + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); + } +} diff --git a/_removed files/nw_s0_icestorm.nss b/_removed files/nw_s0_icestorm.nss new file mode 100644 index 00000000..3a0891bc --- /dev/null +++ b/_removed files/nw_s0_icestorm.nss @@ -0,0 +1,97 @@ +//:://///////////////////////////////////////////// +//:: Ice Storm +//:: NW_S0_IceStorm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Everyone in the area takes 3d6 Bludgeoning + and 2d6 Cold damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 12, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage, nDamage2, nDamage3; + int nVariable = nCasterLvl/2; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_ICESTORM); //USE THE ICESTORM FNF + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + effect eDam,eDam2, eDam3; + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Apply the ice storm VFX at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + fDelay = GetRandomDelay(0.75, 2.25); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ICE_STORM)); + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(3); + nDamage2 = d6(2); + nDamage3 = d6(nVariable); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 18; + nDamage2 = 12; + nDamage3 = 6 * nVariable; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage / 2); + nDamage2 = nDamage2 + (nDamage2 / 2); + nDamage3 = nDamage3 + (nDamage3 / 2); + } + nDamage2 = nDamage2 + nDamage3; + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING); + eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_COLD); + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the impact that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_removed files/nw_s0_implosion.nss b/_removed files/nw_s0_implosion.nss new file mode 100644 index 00000000..78100d10 --- /dev/null +++ b/_removed files/nw_s0_implosion.nss @@ -0,0 +1,80 @@ +//:://///////////////////////////////////////////// +//:: Implosion +//:: NW_S0_Implosion.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All persons within a 5ft radius of the spell must + save at +3 DC or die. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 13, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + effect eDeath = EffectDeath(TRUE); + effect eEffect; + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMult = d6(1); + int nTotalDmg = nMult * nCasterLvl; + eDeath = SupernaturalEffect(eDeath); + effect eImplode= EffectVisualEffect(VFX_FNF_IMPLOSION); + float fDelay; + //Apply the implose effect + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImplode, GetSpellTargetLocation()); + //Get the first target in the shape + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation()); + + while (GetIsObjectValid(oTarget)) + { + if (oTarget != OBJECT_SELF && spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPLOSION)); + fDelay = GetRandomDelay(0.4, 1.2); + //Make SR check + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Make Reflex save + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay)) + { + //Apply death effect and the VFX impact + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget)); + } + + //Apply Damage If spell is not resisted by magic... + eEffect = EffectDamage(nTotalDmg, DAMAGE_TYPE_DIVINE, DAMAGE_POWER_ENERGY); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f); + } + } + //Get next target in the shape + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation()); + } +} + diff --git a/_removed files/nw_s0_imprinvis.nss b/_removed files/nw_s0_imprinvis.nss new file mode 100644 index 00000000..d861e413 --- /dev/null +++ b/_removed files/nw_s0_imprinvis.nss @@ -0,0 +1,66 @@ +///:://///////////////////////////////////////////// +//:: Improved Invisibility +//:: NW_S0_ImprInvis.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Target creature can attack and cast spells while + invisible +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_MIND); + + effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_IMPROVED); + + effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eCover = EffectConcealment(55); + effect eLink = EffectLinkEffects(eDur, eCover); + eLink = EffectLinkEffects(eLink, eVis); + + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPROVED_INVISIBILITY, FALSE)); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oTarget, TurnsToSeconds(nDuration)); +} + + diff --git a/_removed files/nw_s0_incclouda.nss b/_removed files/nw_s0_incclouda.nss new file mode 100644 index 00000000..c8c7b7e7 --- /dev/null +++ b/_removed files/nw_s0_incclouda.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Incendiary Cloud +//:: NW_S0_IncCloud.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Person within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// +//:: March 2003: Removed movement speed penalty +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + // effect eSpeed = EffectMovementSpeedDecrease(50); + effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = eVis2; //EffectLinkEffects(eSpeed, eVis2); + + float fDelay; + //Capture the first target object in the shape. + oTarget = GetEnteringObject(); + //Declare the spell shape, size and the location. + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_INCENDIARY_CLOUD)); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + fDelay = GetRandomDelay(0.5, 2.0); + //Roll damage. + nDamage = d8(6) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 64;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage for Reflex Save, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + // ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget); + } +} diff --git a/_removed files/nw_s0_inccloudc.nss b/_removed files/nw_s0_inccloudc.nss new file mode 100644 index 00000000..3cf4999e --- /dev/null +++ b/_removed files/nw_s0_inccloudc.nss @@ -0,0 +1,80 @@ +//:://///////////////////////////////////////////// +//:: Incendiary Cloud +//:: NW_S0_IncCloudC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Objects within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// +//:: Updated By: GeorgZ 2003-08-21: Now affects doors and placeables as well +#include "X0_I0_SPELLS" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + + float fDelay; + //Capture the first target object in the shape. + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + + oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Declare the spell shape, size and the location. + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + fDelay = GetRandomDelay(0.5, 2.0); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) + { + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_INCENDIARY_CLOUD)); + //Roll damage. + nDamage = d8(4) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 50;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage for Reflex Save, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_removed files/nw_s0_knock.nss b/_removed files/nw_s0_knock.nss new file mode 100644 index 00000000..d4a54c67 --- /dev/null +++ b/_removed files/nw_s0_knock.nss @@ -0,0 +1,35 @@ +//:://///////////////////////////////////////////// +//:: Knock +//:: NW_S0_Knock +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Opens doors not locked by magical means. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 29, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk +//:: VFX Pass By: Preston W, On: June 22, 2001 +#include "nw_i0_spells" + +void main() +{ + object oTarget; + effect eVis = EffectVisualEffect(VFX_IMP_KNOCK); + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + float fDelay; + while(GetIsObjectValid(oTarget)) + { + fDelay = GetRandomDelay(0.5, 2.5); + if( GetLocked(oTarget)) + { + if (GetLockUnlockDC(oTarget) <= 30){ + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + AssignCommand(oTarget, ActionUnlockObject(oTarget)); + } + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_removed files/nw_s0_lghtnbolt.nss b/_removed files/nw_s0_lghtnbolt.nss new file mode 100644 index 00000000..51e19578 --- /dev/null +++ b/_removed files/nw_s0_lghtnbolt.nss @@ -0,0 +1,112 @@ +//:://///////////////////////////////////////////// +//:: Lightning Bolt +//:: NW_S0_LightnBolt +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Does 1d6 per level in a 5ft tube for 30m +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: March 8, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: May 2, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + + //Limit caster level + if (nCasterLevel > 15) + { + nCasterLevel = 15; + } + int nDamage; + int nMetaMagic = GetMetaMagicFeat(); + //Set the lightning stream to start at the caster's hands + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND); + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eDamage; + object oTarget = GetSpellTargetObject(); + location lTarget = GetLocation(oTarget); + object oNextTarget, oTarget2; + float fDelay; + int nCnt = 1; + + oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + while(GetIsObjectValid(oTarget2) && GetDistanceToObject(oTarget2) <= 30.0) + { + //Get first target in the lightning area by passing in the location of first target and the casters vector (position) + oTarget = GetFirstObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF)); + while (GetIsObjectValid(oTarget)) + { + //Exclude the caster from the damage effects + if (oTarget != OBJECT_SELF && oTarget2 == oTarget) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LIGHTNING_BOLT)); + //Make an SR check + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Roll damage + nDamage = d6(nCasterLevel); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + //Adjust damage based on Reflex Save, Evasion and Improved Evasion + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_ELECTRICITY); + //Set damage effect + eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + fDelay = GetSpellEffectDelay(GetLocation(oTarget), oTarget); + //Apply VFX impcat, damage effect and lightning effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget)); + } + } + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,1.0); + //Set the currect target as the holder of the lightning effect + oNextTarget = oTarget; + eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNextTarget, BODY_NODE_CHEST); + } + } + //Get the next object in the lightning cylinder + oTarget = GetNextObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF)); + } + nCnt++; + oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); + } +} + diff --git a/_removed files/nw_s0_lsplanar.nss b/_removed files/nw_s0_lsplanar.nss new file mode 100644 index 00000000..084dbf88 --- /dev/null +++ b/_removed files/nw_s0_lsplanar.nss @@ -0,0 +1,114 @@ +//:://///////////////////////////////////////////// +//:: Lesser Planar Binding +//:: NW_S0_LsPlanar.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an outsider dependant on alignment, or + holds an outsider if the creature fails a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 20, 2001 + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eGate; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + effect eLink = EffectLinkEffects(eDur, EffectParalyze()); + eLink = EffectLinkEffects(eLink, eDur2); + eLink = EffectLinkEffects(eLink, eDur3); + + object oTarget = GetSpellTargetObject(); + int nRacial = GetRacialType(oTarget); + if(nDuration == 0) + { + nDuration = 1; + } + + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Check to see if the target is valid + if (GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LESSER_PLANAR_BINDING)); + //Check to make sure the target is an outsider + if(nRacial == RACIAL_TYPE_OUTSIDER) + { + //Make a will save + if(!WillSave(oTarget, GetSpellSaveDC())) + { + //Apply the linked effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); + } + } + } + } + else + { + //Get the alignment of the caster + int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); + float fDelay = 3.0; + switch (nAlign) + { + //Set the summon effect based on alignment + case ALIGNMENT_EVIL: + { + eSummon = EffectSummonCreature("succubus01",VFX_FNF_SUMMON_GATE , fDelay); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + } + break; + case ALIGNMENT_GOOD: + { + eSummon = EffectSummonCreature("lantern01", 219 ,fDelay); + //eGate = EffectVisualEffect(219); + } + break; + case ALIGNMENT_NEUTRAL: + { + eSummon = EffectSummonCreature("slaad01", VFX_FNF_SUMMON_MONSTER_3); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3, ,1.0); + } + break; + } + //Apply the summon effect and the VFX impact + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + } +} + diff --git a/_removed files/nw_s0_metswarm.nss b/_removed files/nw_s0_metswarm.nss new file mode 100644 index 00000000..348b3d81 --- /dev/null +++ b/_removed files/nw_s0_metswarm.nss @@ -0,0 +1,94 @@ +//:://///////////////////////////////////////////// +//:: Meteor Swarm +//:: NW_S0_MetSwarm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Everyone in a 50ft radius around the caster + takes 20d6 fire damage. Those within 6ft of the + caster will take no damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 24 , 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 22, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic; + int nDamage; + effect eFire; + effect eMeteor = EffectVisualEffect(VFX_FNF_METEOR_SWARM); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Apply the meteor swarm VFX area impact + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMeteor, GetLocation(OBJECT_SELF)); + //Get first object in the spell area + float fDelay; + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + fDelay = GetRandomDelay(); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_METEOR_SWARM)); + //Make sure the target is outside the 2m safe zone + if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0) + { + //Make SR check + if (!MyResistSpell(OBJECT_SELF, oTarget, 0.5)) + { + //Roll damage + nDamage = d6(20); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 120;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_FIRE); + //Set the damage effect + eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply damage effect and VFX impact. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + } + //Get next target in the spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + } +} + diff --git a/_removed files/nw_s0_mordswrd.nss b/_removed files/nw_s0_mordswrd.nss new file mode 100644 index 00000000..f90e6f9b --- /dev/null +++ b/_removed files/nw_s0_mordswrd.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Mordenkainen's Sword +//:: NW_S0_MordSwrd.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a Helmed Horror to battle for the caster +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 29, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("mordsword01"); + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); +} + diff --git a/_removed files/nw_s0_negray.nss b/_removed files/nw_s0_negray.nss new file mode 100644 index 00000000..78bd0f32 --- /dev/null +++ b/_removed files/nw_s0_negray.nss @@ -0,0 +1,96 @@ +//:://///////////////////////////////////////////// +//:: Negative Energy Ray +//:: NW_S0_NegRay +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Fires a bolt of negative energy at the target + doing 1d6 damage. Does an additional 1d6 + damage for 2 levels after level 1 (3,5,7,9) to + a maximum of 5d6 at level 9. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Sept 13, 2001 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + + if(nCasterLevel > 20) + { + nCasterLevel = 20; + } + nCasterLevel = (nCasterLevel + 1) / 2; + int nDamage = d6(nCasterLevel); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLevel;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eRay; + if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEGATIVE_ENERGY_RAY)); + eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); + if (!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make a saving throw check + if(/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) + { + nDamage /= 2; + } + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + //Apply the VFX impact and effects + //DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + } + } + else + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEGATIVE_ENERGY_RAY, FALSE)); + eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); + effect eHeal = EffectHeal(nDamage); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); + } + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7); +} diff --git a/_removed files/nw_s0_planar.nss b/_removed files/nw_s0_planar.nss new file mode 100644 index 00000000..baf01289 --- /dev/null +++ b/_removed files/nw_s0_planar.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Planar Binding +//:: NW_S0_Planar.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an outsider dependant on alignment, or + holds an outsider if the creature fails a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eGate; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + effect eLink = EffectLinkEffects(eDur, EffectParalyze()); + eLink = EffectLinkEffects(eLink, eDur2); + eLink = EffectLinkEffects(eLink, eDur3); + + int nRacial = GetRacialType(oTarget); + int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); + if(nDuration == 0) + { + nDuration == 1; + } + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Check to make sure a target was selected + if (GetIsObjectValid(oTarget)) + { + //Check the racial type of the target + if(nRacial == RACIAL_TYPE_OUTSIDER) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PLANAR_BINDING)); + //Make a Will save + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+2)) + { + //Apply the linked effect + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); + } + } + } + } + else + { + //Set the summon effect based on the alignment of the caster + float fDelay = 3.0; + switch (nAlign) + { + case ALIGNMENT_EVIL: + eSummon = EffectSummonCreature("succubus02",VFX_FNF_SUMMON_GATE, fDelay); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); + break; + case ALIGNMENT_GOOD: + eSummon = EffectSummonCreature("hound02", VFX_FNF_SUMMON_CELESTIAL, fDelay); + //eGate = EffectVisualEffect(219); + break; + case ALIGNMENT_NEUTRAL: + eSummon = EffectSummonCreature("slaad02",VFX_FNF_SUMMON_MONSTER_3, 1.0); + //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //fDelay = 1.0; + break; + } + //Apply the summon effect and VFX impact + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + } +} + diff --git a/_removed files/nw_s0_pwkill.nss b/_removed files/nw_s0_pwkill.nss new file mode 100644 index 00000000..0d0d3905 --- /dev/null +++ b/_removed files/nw_s0_pwkill.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: Power Word, Kill +//:: NW_S0_PWKill +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// When power word, kill is uttered, you can either +// target a single creature or let the spell affect a +// group. +// If power word, kill is targeted at a single creature, +// that creature dies if it has 100 or fewer hit points. +// If the power word, kill is cast as an area spell, it +// kills creatures in a 15-foot-radius sphere. It only +// kills creatures that have 20 or fewer hit points, and +// only up to a total of 200 hit points of such +// creatures. The spell affects creatures with the lowest. +*/ +//::////////////////////////////////////////////// +//:: Created By: Noel Borstad +//:: Created On: Dec 18, 2000 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 22, 2001 +//:: Update Pass By: Preston W, On: Aug 3, 2001 +#include "X0_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nDamageDealt = 0; + int nHitpoints, nMin; + object oWeakest; + effect eDeath = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eWord = EffectVisualEffect(VFX_FNF_PWKILL); + float fDelay; + int bKill; + + //Apply the VFX impact + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWord, GetSpellTargetLocation()); + //Check for the single creature or area targeting of the spell + if (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_KILL)); + //Check the creatures HP + if ( GetCurrentHitPoints(oTarget) <= 200 ) + { + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Apply the death effect and the VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } + } + else + { + //Continue through the while loop while the damage deal is less than 200. + while (nDamageDealt < 200) + { + //Set nMin higher than the highest HP amount allowed + nMin = 25; + oWeakest = OBJECT_INVALID; + //Get the first target in the spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation()); + while (GetIsObjectValid(oTarget)) + { + //Make sure the target avoids all allies. + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + bKill = GetLocalInt(oTarget, "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF)); + //Get the HP of the current target + nHitpoints = GetCurrentHitPoints(oTarget); + //Check if the currently selected target is lower in HP than the weakest stored creature + if ((nHitpoints < nMin) && ((nHitpoints > 0) && (nHitpoints <= 20)) && bKill == FALSE) + { + nMin = nHitpoints; + oWeakest = oTarget; + } + } + //Get next target in the spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation()); + } + //If no weak targets are available then break out of the loop + if (!GetIsObjectValid(oWeakest)) + { + nDamageDealt = 250; + } + else + { + fDelay = GetRandomDelay(0.75, 2.0); + SetLocalInt(oWeakest, "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF), TRUE); + //Fire cast spell at event for the specified target + SignalEvent(oWeakest, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_KILL)); + if(!MyResistSpell(OBJECT_SELF, oWeakest, fDelay)) + { + //Apply the VFX impact and death effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oWeakest)); + if(!GetIsImmune(oWeakest, IMMUNITY_TYPE_DEATH)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oWeakest)); + } + //Add the creatures HP to the total + nDamageDealt = nDamageDealt + nMin; + string sTag = "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF); + DelayCommand(fDelay + 0.25, DeleteLocalInt(oWeakest, sTag)); + } + } + } + } +} diff --git a/_removed files/nw_s0_raisdead.nss b/_removed files/nw_s0_raisdead.nss new file mode 100644 index 00000000..4ee6f14c --- /dev/null +++ b/_removed files/nw_s0_raisdead.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: [Raise Dead] +//:: [NW_S0_RaisDead.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Brings a character back to life with 1 HP. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 31, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 22, 2001 + +void main() +{ + //Declare major variables + object oTarget = GetSpellTargetObject(); + object oPC = oTarget; + object oItem; + + //Remove the death token + object oDeath = GetItemPossessedBy(oPC, "death"); + DestroyObject(oDeath, 0.0f); + + effect eRaise = EffectResurrection(); + effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); + + if (GetLocalInt(GetArea(oTarget), "streamed")==2){ + return; + } + if(GetIsDead(oTarget)) + { + SetPlotFlag(oTarget, 0); + + SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC); + + + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE)); + //Apply raise dead effect and VFX impact + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget); + + } +} + diff --git a/_removed files/nw_s0_regen.nss b/_removed files/nw_s0_regen.nss new file mode 100644 index 00000000..c20c792c --- /dev/null +++ b/_removed files/nw_s0_regen.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Regenerate +//:: NW_S0_Regen +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Grants the selected target 6 HP of regeneration + every round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 22, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eRegen = EffectRegenerate(12, 6.0); + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects(eRegen, eDur); + + + int nMeta = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(OBJECT_SELF); + //Meta-Magic Checks + if (nMeta == METAMAGIC_EXTEND) + { + nLevel *= 2; + + } + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REGENERATE, FALSE)); + //Apply effects and VFX + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + +} diff --git a/_removed files/nw_s0_resserec.nss b/_removed files/nw_s0_resserec.nss new file mode 100644 index 00000000..115921f8 --- /dev/null +++ b/_removed files/nw_s0_resserec.nss @@ -0,0 +1,52 @@ +//:://///////////////////////////////////////////// +//:: [Ressurection] +//:: [NW_S0_Ressurec.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Brings a character back to life with full +//:: health. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 31, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 22, 2001 + +void main() +{ + //Get the spell target + object oTarget = GetSpellTargetObject(); + object oPC = oTarget; + object oItem; + object oDeath = GetItemPossessedBy(oPC, "death"); + DestroyObject(oDeath, 0.0f); + + if (!GetIsDead(oTarget)){return;} + + if (GetLocalInt(GetArea(oTarget), "streamed")==2){ + return; + } + + //Check to make sure the target is dead first + if (GetIsDead(oTarget)) + { + SetPlotFlag(oTarget, 0); + + //Remove the Death Logging from the player.. + SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE)); + //Declare major variables + int nHealed = GetMaxHitPoints(oTarget); + effect eRaise = EffectResurrection(); + effect eHeal = EffectHeal(nHealed + 10); + effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); + //Apply the heal, raise dead and VFX impact effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); + + } +} + diff --git a/_removed files/nw_s0_shadconj.nss b/_removed files/nw_s0_shadconj.nss new file mode 100644 index 00000000..8b569af4 --- /dev/null +++ b/_removed files/nw_s0_shadconj.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Shadow Conjuration +//:: NW_S0_ShadConj.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If the opponent is clicked on Shadow Bolt is cast. + If the caster clicks on himself he will cast + Mage Armor and Mirror Image. If they click on + the ground they will summon a Shadow. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +void ShadowBolt (object oTarget, int nMetaMagic); + +void main() +{ + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = GetSpellTargetObject(); + int nCast; + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eVis; + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + if (GetIsObjectValid(oTarget)) + { + if (oTarget == OBJECT_SELF) + { + nCast = 1; + } + else + { + nCast = 2; + } + } + else + { + nCast = 3; + } + + switch (nCast) + { + case 1: + { + eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); + effect eAC = EffectACIncrease(4, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL); + effect eMirror = EffectVisualEffect(VFX_DUR_BLUR); + effect eMiss = EffectConcealment(40); + effect eLink = EffectLinkEffects(eAC, eMirror); + eLink = EffectLinkEffects(eLink, eVis); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMiss, OBJECT_SELF, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, TurnsToSeconds(nDuration)); + } + case 2: + if (!ResistSpell(OBJECT_SELF, oTarget)) + { + ShadowBolt(oTarget, nMetaMagic); + } + case 3: + eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("shadfiend01"); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + } +} + +void ShadowBolt (object oTarget, int nMetaMagic) +{ + int nDamage; + int nBolts = GetCasterLevel(OBJECT_SELF)/5; + int nCnt; + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eDam; + for (nCnt = 0; nCnt < nBolts; nCnt++) + { + int nDam = d6(2); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 12;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage/2; //Damage/Healing is +50% + } + if (ReflexSave(oTarget, GetSpellSaveDC())) + { + nDamage = nDamage/2; + } + eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } +} + + diff --git a/_removed files/nw_s0_shades.nss b/_removed files/nw_s0_shades.nss new file mode 100644 index 00000000..265bae6c --- /dev/null +++ b/_removed files/nw_s0_shades.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Shades +//:: NW_S0_Shades.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If the opponent is clicked on Shadow Bolt is cast. + If the caster clicks on himself he will cast + Stoneskin and Mirror Image. If they click on + the ground they will summon a Shadow Lord. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +void ShadowBolt (object oTarget, int nMetaMagic); + +void main() +{ + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = GetSpellTargetObject(); + int nCast; + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eVis; + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + if (GetIsObjectValid(oTarget)) + { + if (oTarget == OBJECT_SELF) + { + nCast = 1; + } + else + { + nCast = 2; + } + } + else + { + nCast = 3; + } + + switch (nCast) + { + case 1: + { + eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN); + effect eStone = EffectDamageReduction(5, DAMAGE_POWER_PLUS_FIVE, nDuration * 10); + effect eMirror = EffectVisualEffect(VFX_DUR_BLUR); + effect eLink = EffectLinkEffects(eStone, eMirror); + effect eMiss = EffectConcealment(40); + eLink = EffectLinkEffects(eLink, eVis); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMiss, OBJECT_SELF, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration)); + } + case 2: + if (!ResistSpell(OBJECT_SELF, oTarget)) + { + ShadowBolt(oTarget, nMetaMagic); + } + case 3: + eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("shadlord01"); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + } +} + +void ShadowBolt (object oTarget, int nMetaMagic) +{ + int nDamage; + int nBolts = GetCasterLevel(OBJECT_SELF)/5; + int nCnt; + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + + for (nCnt = 0; nCnt < nBolts; nCnt++) + { + int nDam = d6(4); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 24;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage/2; //Damage/Healing is +50% + } + if (ReflexSave(oTarget, GetSpellSaveDC())) + { + nDamage = nDamage/2; + } + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } +} + + diff --git a/_removed files/nw_s0_slaylive.nss b/_removed files/nw_s0_slaylive.nss new file mode 100644 index 00000000..61809695 --- /dev/null +++ b/_removed files/nw_s0_slaylive.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: [Slay Living] +//:: [NW_S0_SlayLive.nss] +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +//:: Caster makes a touch attack and if the target +//:: fails a Fortitude save they die. +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: January 22nd / 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "NW_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = GetSpellTargetObject(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDamage; + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLAY_LIVING)); + //Make SR check + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Make melee touch attack + if(TouchAttackMelee(oTarget)) + { + //Make Fort save + if (!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH)) + { + //Apply the death effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + else + { + //Roll damage + nDamage = d6(3)+ nCasterLevel; + //Make metamagic checks + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 18 + nCasterLevel; + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + //Apply damage effect and VFX impact + eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + } + } + } +} diff --git a/_removed files/nw_s0_slow.nss b/_removed files/nw_s0_slow.nss new file mode 100644 index 00000000..67bd7fe0 --- /dev/null +++ b/_removed files/nw_s0_slow.nss @@ -0,0 +1,84 @@ +//:://///////////////////////////////////////////// +//:: Slow +//:: NW_S0_Slow.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Character can take only one partial action + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 29, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + effect eSlow = EffectSlow(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eSlow, eDur); + + effect eVis = EffectVisualEffect(VFX_IMP_SLOW); + effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30); + int nMetaMagic = GetMetaMagicFeat(); + //Determine spell duration as an integer for later conversion to Rounds, Turns or Hours. + int nDuration = GetCasterLevel(OBJECT_SELF); + int nLevel = nDuration; + int nCount = 0; + location lSpell = GetSpellTargetLocation(); + + //Metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation()); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell); + //Cycle through the targets within the spell shape until an invalid object is captured or the number of + //targets affected is equal to the caster level. + while(GetIsObjectValid(oTarget) && nCount < nLevel) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLOW)); + if (!MyResistSpell(OBJECT_SELF, oTarget) && !/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC())) + { + //Apply the slow effect and VFX impact + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + //Count the number of creatures affected + nCount++; + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell); + } +} + diff --git a/_removed files/nw_s0_splresis.nss b/_removed files/nw_s0_splresis.nss new file mode 100644 index 00000000..9afb25b0 --- /dev/null +++ b/_removed files/nw_s0_splresis.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Spell Resistance +//:: NW_S0_SplResis +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The target creature gains 12 + Caster Level SR. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: March 19, 2001 +//::////////////////////////////////////////////// +//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + int nLevel = GetCasterLevel(OBJECT_SELF); + + //Epic Spell Resistance Added + int nDC; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDC = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic Spell Resistance Bonus = + " + IntToString(nDC) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDC = 0; + } + + //Epic Resistance Added + int nBonus = 12 + nLevel + nDC; + effect eSR = EffectSpellResistanceIncrease(nBonus); + effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eDur2 = EffectVisualEffect(249); + effect eLink = EffectLinkEffects(eSR, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_RESISTANCE, FALSE)); + //Check for metamagic extension + if (nMetaMagic == METAMAGIC_EXTEND) + { + nLevel = nLevel *2; //Duration is +100% + } + //Apply VFX impact and SR bonus effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nLevel)); +} diff --git a/_removed files/nw_s0_stormvenc.nss b/_removed files/nw_s0_stormvenc.nss new file mode 100644 index 00000000..b2b89098 --- /dev/null +++ b/_removed files/nw_s0_stormvenc.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Storm of Vengeance: Heartbeat +//:: NW_S0_StormVenC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates an AOE that decimates the enemies of + the cleric over a 30ft radius around the caster +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 8, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + effect eAcid = EffectDamage(d8(5), DAMAGE_TYPE_ACID); + effect eElec = EffectDamage(d8(7), DAMAGE_TYPE_ELECTRICAL); + effect eStun = EffectStunned(); + effect eVisAcid = EffectVisualEffect(VFX_IMP_ACID_S); + effect eVisElec = EffectVisualEffect(VFX_IMP_LIGHTNING_M); + effect eVisStun = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eStun, eVisStun); + eLink = EffectLinkEffects(eLink, eDur); + + float fDelay; + //Get first target in spell area + object oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_STORM_OF_VENGEANCE)); + //Make an SR Check + fDelay = GetRandomDelay(0.5, 2.0); + if(MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay) == 0) + { + //Make a saving throw check + // * if the saving throw is made they still suffer acid damage. + // * if they fail the saving throw, they suffer Electrical damage too + if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY, GetAreaOfEffectCreator(), fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget)); + if (d2()==1) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget)); + } + } + else + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eElec, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2))); + } + } + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE); + } +} diff --git a/_removed files/nw_s0_summon.nss b/_removed files/nw_s0_summon.nss new file mode 100644 index 00000000..5f8a7740 --- /dev/null +++ b/_removed files/nw_s0_summon.nss @@ -0,0 +1,260 @@ +//:://///////////////////////////////////////////// +//:: Summon Creature Series +//:: NW_S0_Summon +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Carries out the summoning of the appropriate + creature for the Summon Monster Series of spells + 1 to 9 +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// + +effect SetSummonEffect(int nSpellID); + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nSpellID = GetSpellId(); + int nDuration = GetCasterLevel(OBJECT_SELF); + nDuration = 24; + if(nDuration == 1) + { + nDuration = 4; + } + effect eSummon = SetSummonEffect(nSpellID); + + //Make metamagic check for extend + int nMetaMagic = GetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); +} + + +effect SetSummonEffect(int nSpellID) +{ + int nFNF_Effect; + int nRoll = d3(); + string sSummon; + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) //WITH THE ANIMAL DOMAIN + { + if(nSpellID == SPELL_SUMMON_CREATURE_I) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_BOARDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_II) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_WOLFDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_III) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "direspider4"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IV) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "diretiger5"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_V) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "direbear6"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VI) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airelder7"; + break; + + case 2: + sSummon = "waterelder7"; + break; + + case 3: + sSummon = "fireelder7"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airgreat8"; + break; + + case 2: + sSummon = "watergreat8"; + break; + + case 3: + sSummon = "firegreat8"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VIII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "asummon9"; + break; + + case 2: + sSummon = "bsummon9"; + break; + + case 3: + sSummon = "csummon9"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IX) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "asummon9"; + break; + + case 2: + sSummon = "csummon9"; + break; + + case 3: + sSummon = "dsummon9"; + break; + } + } + } + else //WITOUT THE ANIMAL DOMAIN + { + if(nSpellID == SPELL_SUMMON_CREATURE_I) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_badgerdire"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_II) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_BOARDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_III) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; + sSummon = "NW_S_WOLFDIRE"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IV) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "direspider4"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_V) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "diretiger5"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VI) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; + sSummon = "direbear6"; + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airelder7"; + break; + + case 2: + sSummon = "waterelder7"; + break; + + case 3: + sSummon = "fireelder7"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_VIII) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "airgreat8"; + break; + + case 2: + sSummon = "watergreat8"; + break; + + case 3: + sSummon = "firegreat8"; + break; + } + } + else if(nSpellID == SPELL_SUMMON_CREATURE_IX) + { + nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; + switch (nRoll) + { + case 1: + sSummon = "asummon9"; + break; + + case 2: + sSummon = "bsummon9"; + break; + + case 3: + sSummon = "csummon9"; + break; + + } + } + } + //effect eVis = EffectVisualEffect(nFNF_Effect); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + effect eSummonedMonster = EffectSummonCreature(sSummon, nFNF_Effect); + return eSummonedMonster; +} + diff --git a/_removed files/nw_s0_summon4.nss b/_removed files/nw_s0_summon4.nss new file mode 100644 index 00000000..9beb093d --- /dev/null +++ b/_removed files/nw_s0_summon4.nss @@ -0,0 +1,54 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster IV +//:: NW_S0_Summon4 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a Sword Spider to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("direspider4"); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + eSummon = EffectSummonCreature("diretiger5"); + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} + diff --git a/_removed files/nw_s0_summon5.nss b/_removed files/nw_s0_summon5.nss new file mode 100644 index 00000000..9ea66ffc --- /dev/null +++ b/_removed files/nw_s0_summon5.nss @@ -0,0 +1,52 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster V +//:: NW_S0_Summon5 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a dire spider to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12 , 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("diretiger5"); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + eSummon = EffectSummonCreature("direbear6"); + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_removed files/nw_s0_summon6.nss b/_removed files/nw_s0_summon6.nss new file mode 100644 index 00000000..669b3b93 --- /dev/null +++ b/_removed files/nw_s0_summon6.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster VI +//:: NW_S0_Summon6 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a dire bear to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("direbear6"); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + int nRoll = d4(); + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airelder7"); + break; + + case 2: + eSummon = EffectSummonCreature("waterelder7"); + break; + + case 3: + eSummon = EffectSummonCreature("earthelder7"); + break; + + case 4: + eSummon = EffectSummonCreature("fireelder7"); + break; + } + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_removed files/nw_s0_summon7.nss b/_removed files/nw_s0_summon7.nss new file mode 100644 index 00000000..9c3ed080 --- /dev/null +++ b/_removed files/nw_s0_summon7.nss @@ -0,0 +1,90 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster VII +//:: NW_S0_Summon7 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a Minogon to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + int nRoll = d4(); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airegreat8"); + break; + + case 2: + eSummon = EffectSummonCreature("watergreat8"); + break; + + case 3: + eSummon = EffectSummonCreature("earthgreat8"); + break; + + case 4: + eSummon = EffectSummonCreature("firegreat8"); + break; + } + } + else + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airelder7"); + break; + + case 2: + eSummon = EffectSummonCreature("waterelder7"); + break; + + case 3: + eSummon = EffectSummonCreature("earthelder7"); + break; + + case 4: + eSummon = EffectSummonCreature("fireelder7"); + break; + } + } + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_removed files/nw_s0_summon8.nss b/_removed files/nw_s0_summon8.nss new file mode 100644 index 00000000..4b773f24 --- /dev/null +++ b/_removed files/nw_s0_summon8.nss @@ -0,0 +1,92 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster VIII +//:: NW_S0_Summon8 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a greater earth elemental to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + int nRoll = d4(); + if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("asummon9"); + break; + + case 2: + eSummon = EffectSummonCreature("bsummon9"); + break; + + case 3: + eSummon = EffectSummonCreature("csummon9"); + break; + + case 4: + eSummon = EffectSummonCreature("dsummon9"); + break; + + } + } + else + { + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("airgreat8"); + break; + + case 2: + eSummon = EffectSummonCreature("watergreat8"); + break; + + case 3: + eSummon = EffectSummonCreature("earthgreat8"); + break; + + case 4: + eSummon = EffectSummonCreature("firegreat8"); + break; + } + } + + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_removed files/nw_s0_summon9.nss b/_removed files/nw_s0_summon9.nss new file mode 100644 index 00000000..35fc9ea8 --- /dev/null +++ b/_removed files/nw_s0_summon9.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Summon Monster IX +//:: NW_S0_Summon9 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a elder elemental to fight for the character +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: April 12, 2001 +//::////////////////////////////////////////////// +//:: VFX Pass By: Preston W, On: June 25, 2001 + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon; + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + int nRoll = d4(); + switch (nRoll) + { + case 1: + eSummon = EffectSummonCreature("asummon9"); + break; + + case 2: + eSummon = EffectSummonCreature("bsummon9"); + break; + + case 3: + eSummon = EffectSummonCreature("csummon9"); + break; + + case 4: + eSummon = EffectSummonCreature("dsummon9"); + break; + } + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); +} diff --git a/_removed files/nw_s0_summshad.nss b/_removed files/nw_s0_summshad.nss new file mode 100644 index 00000000..6b9be3a3 --- /dev/null +++ b/_removed files/nw_s0_summshad.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Summon Shadow +//:: NW_S0_SummShad.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Spell powerful ally from the shadow plane to + battle for the wizard +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 26, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Set the summoned undead to the appropriate template based on the caster level + if (nCasterLevel <= 7) + { + eSummon = EffectSummonCreature("shadow01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 8) && (nCasterLevel <= 17)) + { + eSummon = EffectSummonCreature("shadhound01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 18) && (nCasterLevel <= 23)) + { + eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); // change later + } + else if ((nCasterLevel >= 24)) + { + eSummon = EffectSummonCreature("shadlord01",VFX_FNF_SUMMON_UNDEAD); + } + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); +} + diff --git a/_removed files/nw_s0_summshad02.nss b/_removed files/nw_s0_summshad02.nss new file mode 100644 index 00000000..ea3664fe --- /dev/null +++ b/_removed files/nw_s0_summshad02.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Summon Shadow +//:: NW_S0_SummShad02.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Spell powerful ally from the shadow plane to + battle for the wizard +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 26, 2001 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC); + effect eSummon; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + + //Set the summoned undead to the appropriate template based on the caster level + if (nCasterLevel <= 7) + { + eSummon = EffectSummonCreature("shadow01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 8) && (nCasterLevel <= 17)) + { + eSummon = EffectSummonCreature("shadhound01",VFX_FNF_SUMMON_UNDEAD); + } + else if ((nCasterLevel >= 18) && (nCasterLevel <= 23)) + { + eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); // change later + } + else if ((nCasterLevel >= 24)) + { + eSummon = EffectSummonCreature("shadlord01",VFX_FNF_SUMMON_UNDEAD); + } + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(24)); +} + diff --git a/_removed files/nw_s0_timestop.nss b/_removed files/nw_s0_timestop.nss new file mode 100644 index 00000000..e1723a53 --- /dev/null +++ b/_removed files/nw_s0_timestop.nss @@ -0,0 +1,158 @@ +//:://///////////////////////////////////////////// +//:: Time Stop +//:: NW_S0_TimeStop.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All persons in the Area are frozen in time + except the caster. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +// Place the following variable on an area to disable timestop in that area. +// NAME : TIMESTOP_DISABLED TYPE : Int VALUE : 1 + +// If set to zero, the duration will default to 1 + 1d4 rounds. Otherwise, the +// duration will be the number of seconds the variable is changed to. +const int TIME_STOP_OVERRIDE_DURATION = 13; +// ex. const int TIME_STOP_OVERRIDE_DURATION = 9; Timestop lasts 9 seconds. + +// Number of seconds before Timestop can be recast after being cast. Countdown +//messages are sent based on this time. Set to 0.0 if you dont want there to +//be any cooldown +const float TIME_STOP_COOLDOWN_TIME = 0.0; + +//If set to 1, Timestop will not be usable\ +const int TIME_STOP_DISABLE = 0; + +#include "x2_inc_spellhook" + +int DetermineDuration() +{ + int nDuration = 1 + d4(1); + float fDuration = RoundsToSeconds(nDuration); + int nSeconds = FloatToInt(fDuration); + if (TIME_STOP_OVERRIDE_DURATION != 0) nSeconds = TIME_STOP_OVERRIDE_DURATION; + return nSeconds; +} + +void TimeStopDelay(object oCaster) +{ + float Delay1 = TIME_STOP_COOLDOWN_TIME * 0.25; + string Message1 = IntToString(FloatToInt(Delay1)); + float Delay2 = TIME_STOP_COOLDOWN_TIME * 0.50; + string Message2 = IntToString(FloatToInt(Delay2)); + float Delay3 = TIME_STOP_COOLDOWN_TIME * 0.75; + string Message3 = IntToString(FloatToInt(Delay3)); + SetLocalInt(oCaster, "TIMESTOP_DELAY", 1); + DelayCommand(Delay1, FloatingTextStringOnCreature("Time Stop Recastable In " + Message3 + " seconds", oCaster, FALSE)); + DelayCommand(Delay2, FloatingTextStringOnCreature("Time Stop Recastable In " + Message2 + " seconds", oCaster, FALSE)); + DelayCommand(Delay3, FloatingTextStringOnCreature("Time Stop Recastable In " + Message1 + " seconds", oCaster, FALSE)); + DelayCommand(TIME_STOP_COOLDOWN_TIME, FloatingTextStringOnCreature("Time Stop Ready", oCaster, FALSE)); + DelayCommand(TIME_STOP_COOLDOWN_TIME, DeleteLocalInt(oCaster, "TIMESTOP_DELAY")); +} +void Timestop(object oCaster) +{ + object oArea = GetArea(oCaster); + + effect eParalyze = EffectCutsceneParalyze(); + int nDuration = DetermineDuration(); + float fDuration = IntToFloat(nDuration); + object oTarget = GetFirstObjectInArea(oArea); + + while (GetIsObjectValid(oTarget)) { + if (GetIsPC(oTarget) == TRUE || GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) { + if (GetIsDM(oTarget) == FALSE) { + if (oTarget != oCaster) { + FloatingTextStringOnCreature("Time Stopped", oTarget, FALSE); + AssignCommand(oTarget, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, fDuration)); } } } + + oTarget = GetNextObjectInArea(oArea); } +} + +void TimestopCheck(object oCaster, int nDuration) +{ + if (nDuration == 0) return; + + nDuration = nDuration - 1; + float fDuration = IntToFloat(nDuration); + object oArea = GetArea(oCaster); + location lCaster = GetLocation(oCaster); + + effect eParalyze = EffectCutsceneParalyze(); + object oTarget = GetFirstObjectInArea(oArea); + + while (GetIsObjectValid(oTarget)) { + if (GetIsPC(oTarget) == TRUE || GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) { + if (GetIsDM(oTarget) == FALSE) { + if (oTarget != oCaster) { + + effect eEffect = GetFirstEffect(oTarget); + while (GetIsEffectValid(eEffect)) { + if (GetEffectType(eEffect) == EFFECT_TYPE_CUTSCENE_PARALYZE) { + SetLocalInt(oTarget, "TIME_STOPPED", 1); } + eEffect = GetNextEffect(oTarget); } + + if (GetLocalInt(oTarget, "TIME_STOPPED") == 0) { + FloatingTextStringOnCreature("Time Stopped", oTarget, FALSE); + AssignCommand(oTarget, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, fDuration)); } + + DeleteLocalInt(oTarget, "TIME_STOPPED"); } } } + + oTarget = GetNextObjectInArea(oArea); } + + DelayCommand(1.0, TimestopCheck(oCaster, nDuration)); +} + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + string sName = GetName(OBJECT_SELF); + if (TIME_STOP_DISABLE == 1) { + FloatingTextStringOnCreature("Timestop is disabled on this server", OBJECT_SELF, FALSE); + return; } + + + if (GetLocalInt(GetArea(OBJECT_SELF), "TIMESTOP_DISABLED") == 1 && GetName(OBJECT_SELF) != "Archmage Jezebeth") { + FloatingTextStringOnCreature("Time Stop is not permitted in this area", OBJECT_SELF, FALSE); + return; } + + if (GetLocalInt(OBJECT_SELF, "TIMESTOP_DELAY") == 1) { + FloatingTextStringOnCreature("Timestop is not castable yet", OBJECT_SELF, FALSE); + return; } + + if (TIME_STOP_COOLDOWN_TIME != 0.0) { + string Message = IntToString(FloatToInt(TIME_STOP_COOLDOWN_TIME)); + FloatingTextStringOnCreature("Time Stop Recastable In " + Message + " seconds", OBJECT_SELF, FALSE); + DelayCommand(0.6, TimeStopDelay(OBJECT_SELF)); } + + //Declare major variables + location lTarget = GetSpellTargetLocation(); + effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP); + int nDuration = DetermineDuration(); + + //Fire cast spell at event for the specified target + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); + Timestop(OBJECT_SELF); + DelayCommand(1.0, TimestopCheck(OBJECT_SELF, nDuration)); + +} diff --git a/_removed files/nw_s0_timestop1.nss b/_removed files/nw_s0_timestop1.nss new file mode 100644 index 00000000..13a7119f --- /dev/null +++ b/_removed files/nw_s0_timestop1.nss @@ -0,0 +1,56 @@ +//:://///////////////////////////////////////////// +//:: Time Stop +//:: NW_S0_TimeStop.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All persons in the Area are frozen in time + except the caster. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +/*This is a modified version of kaltors PW friendly time stop script +It has been modified to do several new functions + +--It not will not dominate summoned units, to prevent them from becomine masterless +--It follows standard 9.0 second timestop with a .75 delay +--It applies a small visual affect to all units to show a timestop in effect +--It applies a knockdown effect to summoned units to prevent them doing anything(no summoned unit has + immune to knockdown to my knowledge +--it applies a Immobilize effect to prevent units from moving (an occasional bug with big PW's on high CPU load). +*/ + +void main() +{ + object oArea = GetArea(OBJECT_SELF); + location lLocation = GetLocation(OBJECT_SELF); + object oTG = GetFirstObjectInArea(oArea); + + int nRoll = 2 + d4(); + int bonus = ( (GetCasterLevel(OBJECT_SELF)-20) / 10 ); + if(bonus < 1 || bonus >40) + { bonus = 0; } + + SendMessageToPC(OBJECT_SELF, "Time stopped for " + IntToString(nRoll+bonus) + " rounds."); + + while (oTG != OBJECT_INVALID) + { + if(GetObjectType(oTG) == OBJECT_TYPE_CREATURE && oTG != OBJECT_SELF){ + if(!GetIsObjectValid(GetMaster(oTG))){ + DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneDominated(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); + } + else{ + DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectKnockdown(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); + } + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BLUR), oTG, 3.75f); + DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneImmobilize(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); + } + oTG = GetNextObjectInArea(oArea); + } + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), lLocation); +} diff --git a/_removed files/nw_s0_timestop3.nss b/_removed files/nw_s0_timestop3.nss new file mode 100644 index 00000000..6af4d98e --- /dev/null +++ b/_removed files/nw_s0_timestop3.nss @@ -0,0 +1,76 @@ +// Function to get creature(s) within radius and apply the alternate TimeStop + +int TestScrollUsage() +{ + int n = GetLevelByClass(CLASS_TYPE_BARD) + + GetLevelByClass(CLASS_TYPE_SORCERER) + + GetLevelByClass(CLASS_TYPE_WIZARD) + + GetLevelByClass(CLASS_TYPE_ROGUE); + return Random(15) < n; +} +// Begin Main Function +void main() + { + int fDur = 12+ d6(); + float dur = IntToFloat(fDur); + + if (!TestScrollUsage() && !GetIsDM(OBJECT_SELF) && GetRacialType(OBJECT_SELF) != RACIAL_TYPE_DRAGON) { + SendMessageToPC(OBJECT_SELF, "Casting from item failed"); + return; + } + int nRoll; + int nRoll2 = d4(); + if (nRoll2 == 1){nRoll = 2;} + if (nRoll2 == 2 || nRoll2 == 3){nRoll = 3;} + if (nRoll2 == 4){nRoll = 4;} + + object dragon = GetNearestCreature(CREATURE_TYPE_RACIAL_TYPE, RACIAL_TYPE_DRAGON); + object area = GetArea(dragon); + + string pc = GetPCPlayerName(OBJECT_SELF); + + object area2 = GetArea(OBJECT_SELF); + string busted = GetName(area2); + if (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON){ + area = GetArea(GetWaypointByTag("sage")); + fDur = 18+ d6();} + if (dragon != OBJECT_INVALID && area == area2){ + SendMessageToPC(OBJECT_SELF, "There is a disturbance in the time stream, and you cannot cast Time Stop."); + return; + } + + + if (GetLocalInt(GetArea(OBJECT_SELF), "streamed")==2) { + SendMessageToPC(OBJECT_SELF, "Time is already stopped"); + return; + } + + DelayCommand(1.0, SetLocalInt(GetArea(OBJECT_SELF), "streamed", 2)); + DelayCommand(dur, DeleteLocalInt(OBJECT_SELF, "streamed")); + //Signal event to start the TimeStop + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); + // Begin custom TimeStop + SendMessageToAllDMs("Timestop cast by " + pc + " in " + busted); + +float fDist = 200.0; + object oNearestC; // Define nearest creature + // Begin loop to find all creatures within the fDist meter radius + oNearestC = GetFirstObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE); + while(GetIsObjectValid(oNearestC)) + { + + + + // This makes sure the Caster is not Timestopped and skips any PC's/NPC's associates + if (oNearestC != OBJECT_SELF) { + AssignCommand(oNearestC, ClearAllActions()); + DelayCommand(0.01, SetCommandable( FALSE, oNearestC )); + DelayCommand(dur, SetCommandable( FALSE, oNearestC )); + + } + // Get the next creature in the fDist meter radius and continue loop + oNearestC = GetNextObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE); + } + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), GetSpellTargetLocation()); +} diff --git a/_removed files/nw_s0_vamptch.nss b/_removed files/nw_s0_vamptch.nss new file mode 100644 index 00000000..d81a1e42 --- /dev/null +++ b/_removed files/nw_s0_vamptch.nss @@ -0,0 +1,125 @@ +//:://///////////////////////////////////////////// +//:: Vampiric Touch +//:: NW_S0_VampTch +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + drain 1d6 + HP per 2 caster levels from the target. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 29, 2001 +//::////////////////////////////////////////////// + +/* +bugfix by Kovi 2002.07.22 +- did double damage with maximize +- temporary hp was stacked +2002.08.25 +- got temporary hp some immune creatures (Negative Energy Protection), lost +temporary hp against other resistant (SR, Shadow Shield) + +Georg 2003-09-11 +- Put in melee touch attack check, as the fixed attack bonus is now calculated correctly + +*/ + +#include "x0_I0_SPELLS" + + +#include "x2_inc_spellhook" + +void main() +{ + + //-------------------------------------------------------------------------- + /* Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + */ + //-------------------------------------------------------------------------- + + if (!X2PreSpellCastCode()) + { + return; + } + //-------------------------------------------------------------------------- + // End of Spell Cast Hook + //-------------------------------------------------------------------------- + + + object oTarget = GetSpellTargetObject(); + int nMetaMagic = GetMetaMagicFeat(); + + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDDice = nCasterLevel /2; + if ((nDDice) == 0) + { + nDDice = 1; + } + //-------------------------------------------------------------------------- + // GZ: Cap according to the book + //-------------------------------------------------------------------------- + else if (nDDice>20) + { + nDDice = 20; + } + + int nDamage = d6(nDDice); + + //-------------------------------------------------------------------------- + //Enter Metamagic conditions + //-------------------------------------------------------------------------- + + nDamage = MaximizeOrEmpower(6,nDDice,nMetaMagic); + int nDuration = nCasterLevel/2; + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration *= 2; + } + + //-------------------------------------------------------------------------- + //Limit damage to max hp + 10 + //-------------------------------------------------------------------------- + int nMax = GetCurrentHitPoints(oTarget) + 20; + if(nMax < nDamage) + { + nDamage = nMax; + } + + effect eHeal = EffectTemporaryHitpoints(nDamage); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eHeal, eDur); + + effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); + if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + if(!GetIsReactionTypeFriendly(oTarget) && + GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD && + GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && + !GetHasSpellEffect(SPELL_NEGATIVE_ENERGY_PROTECTION, oTarget)) + { + + + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, FALSE)); + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, TRUE)); + // GZ: * GetSpellCastItem() == OBJECT_INVALID is used to prevent feedback from showing up when used as OnHitCastSpell property + if (TouchAttackMelee(oTarget,GetSpellCastItem() == OBJECT_INVALID)>0) + { + if(MyResistSpell(OBJECT_SELF, oTarget) == 0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, OBJECT_SELF); + RemoveTempHitPoints(); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration)); + } + } + } + } +} diff --git a/_removed files/nw_s0_wallfirea.nss b/_removed files/nw_s0_wallfirea.nss new file mode 100644 index 00000000..03b09932 --- /dev/null +++ b/_removed files/nw_s0_wallfirea.nss @@ -0,0 +1,60 @@ +//:://///////////////////////////////////////////// +//:: Wall of Fire: On Enter +//:: NW_S0_WallFireA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Person within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Capture the first target object in the shape. + oTarget = GetEnteringObject(); + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE)); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + //Roll damage. + nDamage = d6(4) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 40;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + } +} diff --git a/_removed files/nw_s0_wallfirec.nss b/_removed files/nw_s0_wallfirec.nss new file mode 100644 index 00000000..fcf7c778 --- /dev/null +++ b/_removed files/nw_s0_wallfirec.nss @@ -0,0 +1,78 @@ +//:://///////////////////////////////////////////// +//:: Wall of Fire: Heartbeat +//:: NW_S0_WallFireA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Person within the AoE take 4d6 fire damage + per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + effect eDam; + object oTarget; + + //Declare and assign personal impact visual effect. + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + //Capture the first target object in the shape. + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. Its better to remove the barrier then + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Declare the spell shape, size and the location. + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE)); + //Make SR check, and appropriate saving throw(s). + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + //Roll damage. + nDamage = d6(4) + 16; + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 40;//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% + } + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, 1.0); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_removed files/nwnx_admin_t.nss b/_removed files/nwnx_admin_t.nss new file mode 100644 index 00000000..113ce5ef --- /dev/null +++ b/_removed files/nwnx_admin_t.nss @@ -0,0 +1,26 @@ +#include "nwnx_admin" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Administration unit test begin.."); + + string sString = "FuzzyKittens"; + + NWNX_Administration_SetPlayerPassword(sString); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}PlayerPassword", NWNX_Administration_GetPlayerPassword() == sString); + + NWNX_Administration_ClearPlayerPassword(); + NWNX_Tests_Report("NWNX_Administration", "ClearPlayerPassword", NWNX_Administration_GetPlayerPassword() == ""); + + NWNX_Administration_SetDMPassword(sString); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}DMPassword", NWNX_Administration_GetDMPassword() == sString); + + NWNX_Administration_SetPlayOption(NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS, TRUE); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}PlayOption", NWNX_Administration_GetPlayOption(NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS)); + + NWNX_Administration_SetDebugValue(NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED, TRUE); + NWNX_Tests_Report("NWNX_Administration", "{Set/Get}DebugValue", NWNX_Administration_GetDebugValue(NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED)); + + WriteTimestampedLogEntry("NWNX_Administration unit test end."); +} diff --git a/_removed files/nwnx_area_t.nss b/_removed files/nwnx_area_t.nss new file mode 100644 index 00000000..0cef05af --- /dev/null +++ b/_removed files/nwnx_area_t.nss @@ -0,0 +1,73 @@ +#include "nwnx_area" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Area unit test begin.."); + + object oArea = GetAreaFromLocation(GetStartingLocation()); + + if (GetIsObjectValid(oArea)) + { + WriteTimestampedLogEntry("Using starting area: " + GetName(oArea)); + + object oPC = GetFirstPC(); + + if (GetIsObjectValid(oPC) && GetArea(oPC) == oArea) + { + NWNX_Tests_Report("NWNX_Area", "GetNumberOfPlayersInArea", NWNX_Area_GetNumberOfPlayersInArea(oArea) == 1); + } + else + { + WriteTimestampedLogEntry("No player in area, skipping 'GetNumberOfPlayersInArea' test"); + } + + NWNX_Area_SetPVPSetting(oArea, NWNX_AREA_PVP_SETTING_PARTY_PVP); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}PVPSetting", NWNX_Area_GetPVPSetting(oArea) == NWNX_AREA_PVP_SETTING_PARTY_PVP); + + NWNX_Area_SetAreaSpotModifier(oArea, 25); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}AreaSpotModifier", NWNX_Area_GetAreaSpotModifier(oArea) == 25); + + NWNX_Area_SetAreaListenModifier(oArea, 25); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}AreaListenModifier", NWNX_Area_GetAreaListenModifier(oArea) == 25); + + NWNX_Area_SetNoRestingAllowed(oArea, TRUE); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}NoRestingAllowed", NWNX_Area_GetNoRestingAllowed(oArea)); + + NWNX_Area_SetWindPower(oArea, 2); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}WindPower", NWNX_Area_GetWindPower(oArea) == 2); + + NWNX_Area_SetWeatherChance(oArea, NWNX_AREA_WEATHER_CHANCE_LIGHTNING, 50); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}WeatherChance", NWNX_Area_GetWeatherChance(oArea, NWNX_AREA_WEATHER_CHANCE_LIGHTNING) == 50); + + NWNX_Area_SetFogClipDistance(oArea, 12.5f); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}FogClipDistance", NWNX_Area_GetFogClipDistance(oArea) == 12.5f); + + NWNX_Area_SetShadowOpacity(oArea, 75); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}ShadowOpacity", NWNX_Area_GetShadowOpacity(oArea) == 75); + + NWNX_Area_SetDayNightCycle(oArea, NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}DayNightCycle", NWNX_Area_GetDayNightCycle(oArea) == NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK); + + NWNX_Area_SetSunMoonColors(oArea, NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE, FOG_COLOR_GREEN); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}SunMoonColors", NWNX_Area_GetSunMoonColors(oArea, NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE) == FOG_COLOR_GREEN); + + vector vLoc = GetPositionFromLocation(GetStartingLocation()); + object oWP = CreateObject(OBJECT_TYPE_WAYPOINT, "nw_waypoint001", GetStartingLocation()); + object oAT = NWNX_Area_CreateTransition(oArea, oWP, vLoc.x, vLoc.y, vLoc.z); + NWNX_Tests_Report("NWNX_Area", "CreateTransition", oAT != OBJECT_INVALID); + + string sResult = NWNX_Area_GetTileModelResRef(oArea, vLoc.x, vLoc.y); + NWNX_Tests_Report("NWNX_Area", "GetTileModelResRef", sResult != ""); + + NWNX_Area_SetTileAnimationLoop(oArea, vLoc.x, vLoc.y, 1, FALSE); + NWNX_Tests_Report("NWNX_Area", "{Set/Get}TileAnimationLoop", NWNX_Area_GetTileAnimationLoop(oArea, vLoc.x, vLoc.y, 1) == FALSE); + } + else + { + WriteTimestampedLogEntry("No valid area found, aborting."); + } + + + WriteTimestampedLogEntry("NWNX_Area unit test end."); +} diff --git a/_removed files/nwnx_chat_t.nss b/_removed files/nwnx_chat_t.nss new file mode 100644 index 00000000..03c35cea --- /dev/null +++ b/_removed files/nwnx_chat_t.nss @@ -0,0 +1,20 @@ +#include "nwnx_chat" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Chat unit test begin.."); + + float fDefaultTalk = NWNX_Chat_GetChatHearingDistance(); + NWNX_Chat_SetChatHearingDistance(fDefaultTalk + 10.0f); + + NWNX_Tests_Report("NWNX_Chat", "SetChatHearingDistance Default", fDefaultTalk == NWNX_Chat_GetChatHearingDistance() - 10.0f); + + object oPC = GetFirstPC(); + float fPCWhisper = NWNX_Chat_GetChatHearingDistance(oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER); + NWNX_Chat_SetChatHearingDistance(fPCWhisper + 2.0f, oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER); + + NWNX_Tests_Report("NWNX_Chat", "SetChatHearingDistance Per PC", fPCWhisper == NWNX_Chat_GetChatHearingDistance(oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER) - 2.0f); + + WriteTimestampedLogEntry("NWNX_Chat unit test end."); +} diff --git a/_removed files/nwnx_creature_t.nss b/_removed files/nwnx_creature_t.nss new file mode 100644 index 00000000..ee192a66 --- /dev/null +++ b/_removed files/nwnx_creature_t.nss @@ -0,0 +1,256 @@ +#include "nwnx_creature" +#include "nwnx_tests" + +const int FEAT_BARBARIAN_RAGE_2 = 326; + +void main() +{ + WriteTimestampedLogEntry("NWNX_Creature unit test begin.."); + + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); + return; + } + + + // + // FEAT related functions + // + + int nFeatCountLvl1 = NWNX_Creature_GetFeatCountByLevel(oCreature, 1); + int nFeatCountTotal = NWNX_Creature_GetFeatCount(oCreature); + + NWNX_Tests_Report("NWNX_Creature", "GetKnowsFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 0); + + NWNX_Creature_AddFeat(oCreature, FEAT_PLAYER_TOOL_01); + NWNX_Tests_Report("NWNX_Creature", "AddFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 1); + + NWNX_Tests_Report("NWNX_Creature", "GetFeatCountByLevel", NWNX_Creature_GetFeatCountByLevel(oCreature, 1) == nFeatCountLvl1); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == (nFeatCountTotal+1)); + + NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == FEAT_PLAYER_TOOL_01); + + NWNX_Creature_RemoveFeat(oCreature, FEAT_PLAYER_TOOL_01); + NWNX_Tests_Report("NWNX_Creature", "RemoveFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 0); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == nFeatCountTotal); + NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == -1); + + NWNX_Creature_AddFeatByLevel(oCreature, FEAT_PLAYER_TOOL_01, 1); + NWNX_Tests_Report("NWNX_Creature", "AddFeatByLevel", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 1); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCountByLevel", NWNX_Creature_GetFeatCountByLevel(oCreature, 1) > nFeatCountLvl1); + NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == (nFeatCountTotal+1)); + NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == FEAT_PLAYER_TOOL_01); + + NWNX_Tests_Report("NWNX_Creature", "GetFeatByLevel", NWNX_Creature_GetFeatByLevel(oCreature, 1, nFeatCountLvl1) == FEAT_PLAYER_TOOL_01); + NWNX_Tests_Report("NWNX_Creature", "GetFeatGrantLevel", NWNX_Creature_GetFeatGrantLevel(oCreature, FEAT_PLAYER_TOOL_01) == 1); + + NWNX_Creature_AddFeat(oCreature, FEAT_BARBARIAN_RAGE); + NWNX_Tests_Report("NWNX_Creature", "GetHighestLevelOfFeat", NWNX_Creature_GetHighestLevelOfFeat(oCreature, FEAT_BARBARIAN_RAGE) == FEAT_BARBARIAN_RAGE); + NWNX_Creature_AddFeat(oCreature, FEAT_BARBARIAN_RAGE_2); + NWNX_Tests_Report("NWNX_Creature", "GetHighestLevelOfFeat", NWNX_Creature_GetHighestLevelOfFeat(oCreature, FEAT_BARBARIAN_RAGE) == FEAT_BARBARIAN_RAGE_2); + + NWNX_Creature_AddFeat(oCreature, FEAT_STUNNING_FIST); + NWNX_Tests_Report("NWNX_Creature", "GetFeatRemainingUses", NWNX_Creature_GetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST) == 1); + NWNX_Creature_SetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST, 0); + NWNX_Tests_Report("NWNX_Creature", "GetFeatRemainingUses", NWNX_Creature_GetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST) == 0); + + int uses = NWNX_Creature_GetFeatTotalUses(oCreature, FEAT_STUNNING_FIST); + WriteTimestampedLogEntry("Creature has " + IntToString(uses) + " total uses of STUNNING FIST left"); + + // + // SPECIAL ABILITY functions + // + struct NWNX_Creature_SpecialAbility ability; + ability.id = 1; ability.ready = 1; ability.level = 1; + + int nAbilityCount = NWNX_Creature_GetSpecialAbilityCount(oCreature); + NWNX_Creature_AddSpecialAbility(oCreature, ability); + NWNX_Tests_Report("NWNX_Creature", "AddSpecialAbility", NWNX_Creature_GetSpecialAbilityCount(oCreature) > nAbilityCount); + + ability = NWNX_Creature_GetSpecialAbility(oCreature, nAbilityCount); + NWNX_Tests_Report("NWNX_Creature", "GetSpecialAbility", ability.id == 1); + + NWNX_Creature_RemoveSpecialAbility(oCreature, nAbilityCount); + NWNX_Tests_Report("NWNX_Creature", "RemoveSpecialAbility", NWNX_Creature_GetSpecialAbilityCount(oCreature) == nAbilityCount); + + // + // SPELL functions + // + // TODO: Need a wizard. + + // + // MISC + // + + int nBaseAC = NWNX_Creature_GetBaseAC(oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetBaseAC", nBaseAC >= 0); + + NWNX_Creature_SetBaseAC(oCreature, nBaseAC + 5); + NWNX_Tests_Report("NWNX_Creature", "SetBaseAC", NWNX_Creature_GetBaseAC(oCreature) > nBaseAC); + + + int nOldStr = GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE); + NWNX_Creature_SetRawAbilityScore(oCreature, ABILITY_STRENGTH, 25); + NWNX_Tests_Report("NWNX_Creature", "SetAbilityScore", nOldStr != GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE)); + NWNX_Tests_Report("NWNX_Creature", "SetAbilityScore", 25 == GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE)); + + ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPolymorph(POLYMORPH_TYPE_BADGER), oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetPrePolymorphAbilityScore", 25 == NWNX_Creature_GetPrePolymorphAbilityScore(oCreature, ABILITY_STRENGTH)); + RemoveEffect(oCreature, GetFirstEffect(oCreature)); + + NWNX_Tests_Report("NWNX_Creature", "GetMovementRateFactor", 1.0 == NWNX_Creature_GetMovementRateFactor(oCreature)); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectMovementSpeedIncrease(25), oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetMovementRateFactor", 1.25 == NWNX_Creature_GetMovementRateFactor(oCreature)); + NWNX_Creature_SetMovementRateFactor(oCreature, 1.5); + NWNX_Tests_Report("NWNX_Creature", "SetMovementRateFactor", 1.5 == NWNX_Creature_GetMovementRateFactor(oCreature)); + + int nLvl1HP = NWNX_Creature_GetMaxHitPointsByLevel(oCreature, 1); + NWNX_Tests_Report("NWNX_Creature", "GetMaxHitPointsByLevel", nLvl1HP >= 0); + + NWNX_Creature_SetMaxHitPointsByLevel(oCreature, 1, nLvl1HP + 5); + NWNX_Tests_Report("NWNX_Creature", "SetMaxHitPointsByLevel", NWNX_Creature_GetMaxHitPointsByLevel(oCreature, 1) > nLvl1HP); + + + int nSkillRanks = GetSkillRank(SKILL_LISTEN, oCreature, TRUE); + NWNX_Creature_SetSkillRank(oCreature, SKILL_LISTEN, nSkillRanks + 5); + NWNX_Tests_Report("NWNX_Creature", "SetSkillRank", GetSkillRank(SKILL_LISTEN, oCreature, TRUE) > nSkillRanks); + + int nBAB = GetBaseAttackBonus(oCreature); + NWNX_Creature_SetBaseAttackBonus(oCreature, 6); + NWNX_Tests_Report("NWNX_Creature", "SetBaseAttackBonus", GetBaseAttackBonus(oCreature) == 6); + SetBaseAttackBonus(4, oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - base", NWNX_Creature_GetAttacksPerRound(oCreature, TRUE) == 2); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - override", NWNX_Creature_GetAttacksPerRound(oCreature, FALSE) == 4); + RestoreBaseAttackBonus(oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - base", NWNX_Creature_GetAttacksPerRound(oCreature, TRUE) == 2); + NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - override", NWNX_Creature_GetAttacksPerRound(oCreature, FALSE) == 2); + + int nGender = GetGender(oCreature); + NWNX_Creature_SetGender(oCreature, !nGender); + NWNX_Tests_Report("NWNX_Creature", "SetGender", GetGender(oCreature) != nGender); + + int nSize = GetCreatureSize(oCreature); + NWNX_Creature_SetSize(oCreature, nSize + 1); + NWNX_Tests_Report("NWNX_Creature", "SetSize", GetCreatureSize(oCreature) != nSize); + + int nSkillPointsRemaining = NWNX_Creature_GetSkillPointsRemaining(oCreature); + NWNX_Tests_Report("NWNX_Creature", "GetSkillPointsRemaining", nSkillPointsRemaining >= 0); + NWNX_Creature_SetSkillPointsRemaining(oCreature, nSkillPointsRemaining+1); + NWNX_Tests_Report("NWNX_Creature", "SetSkillPointsRemaining", NWNX_Creature_GetSkillPointsRemaining(oCreature) == nSkillPointsRemaining+1); + + int nGold = GetGold(oCreature); + NWNX_Creature_SetGold(oCreature, nGold + 100); + NWNX_Tests_Report("NWNX_Creature", "SetGold", GetGold(oCreature) == (nGold+100)); + + int nSave = NWNX_Creature_GetBaseSavingThrow(oCreature, SAVING_THROW_WILL); + NWNX_Creature_SetBaseSavingThrow(oCreature, SAVING_THROW_WILL, nSave + 10); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etBaseSavingThrow", NWNX_Creature_GetBaseSavingThrow(oCreature, SAVING_THROW_WILL) == nSave+10); + + + int cls = NWNX_Creature_GetClassByLevel(oCreature, 1); + NWNX_Creature_LevelUp(oCreature, cls, 10); + NWNX_Tests_Report("NWNX_Creature", "LevelUp", GetLevelByPosition(1, oCreature) == 11); + NWNX_Creature_LevelDown(oCreature, 10); + NWNX_Tests_Report("NWNX_Creature", "LevelDown", GetLevelByPosition(1, oCreature) == 1); + NWNX_Creature_SetClassByPosition(oCreature, 0, CLASS_TYPE_ROGUE); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); + NWNX_Tests_Report("NWNX_Creature", "LevelUp+SetLevelByPosition", GetLevelByPosition(1, oCreature) == 60); + + NWNX_Creature_SetLevelByPosition(oCreature, 0, 1); // Ugh, game uses 1-based indexing here.. + NWNX_Tests_Report("NWNX_Creature", "SetLevelByPosition", GetLevelByPosition(1, oCreature) == 1); + + float fCR = GetChallengeRating(oCreature); + NWNX_Creature_SetChallengeRating(oCreature, fCR + 1.0); + NWNX_Tests_Report("NWNX_Creature", "SetChallengeRating", GetChallengeRating(oCreature) == (fCR + 1.0)); + + int iOldBonus = NWNX_Creature_GetTotalEffectBonus(oCreature, NWNX_CREATURE_BONUS_TYPE_ABILITY, OBJECT_INVALID, 0, 0, -1, -1, -1, ABILITY_STRENGTH); + effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH,1); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStr, oCreature, 2.0f); + int iNewBonus = NWNX_Creature_GetTotalEffectBonus(oCreature, NWNX_CREATURE_BONUS_TYPE_ABILITY, OBJECT_INVALID, 0, 0, -1, -1, -1, ABILITY_STRENGTH); + NWNX_Tests_Report("NWNX_Creature", "GetTotalEffectBonus", iOldBonus+1 == iNewBonus); + + int iSR = GetSpellResistance(oCreature); + NWNX_Creature_SetSpellResistance(oCreature, iSR + 10); + NWNX_Tests_Report("NWNX_Creature", "SetSpellResistance", GetSpellResistance(oCreature) == (iSR + 10)); + + NWNX_Creature_SetAnimalCompanionCreatureType(oCreature, ANIMAL_COMPANION_CREATURE_TYPE_PANTHER); + NWNX_Tests_Report("NWNX_Creature", "SetAnimalCompanionCreatureType", GetAnimalCompanionCreatureType(oCreature) == ANIMAL_COMPANION_CREATURE_TYPE_PANTHER); + + NWNX_Creature_SetFamiliarCreatureType(oCreature, FAMILIAR_CREATURE_TYPE_PSEUDO_DRAGON); + NWNX_Tests_Report("NWNX_Creature", "SetFamiliarCreatureType", GetFamiliarCreatureType(oCreature) == FAMILIAR_CREATURE_TYPE_PSEUDO_DRAGON); + + NWNX_Creature_SetAnimalCompanionName(oCreature, "Fuzzles"); + NWNX_Tests_Report("NWNX_Creature", "SetAnimalCompanionName", GetAnimalCompanionName(oCreature) == "Fuzzles"); + + NWNX_Creature_SetFamiliarName(oCreature, "Fuzzles"); + NWNX_Tests_Report("NWNX_Creature", "SetFamiliarName", GetFamiliarName(oCreature) == "Fuzzles"); + + int bDisarmable = NWNX_Creature_GetDisarmable(oCreature); + NWNX_Creature_SetDisarmable(oCreature, !bDisarmable); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDisarmable", NWNX_Creature_GetDisarmable(oCreature) != bDisarmable); + + //Spawn a Wizard + oCreature = CreateObject(OBJECT_TYPE_CREATURE, "NW_ELFMAGE001", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); + return; + } + + //Test specialization functions on a class that has specialization + int nSchool = NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_WIZARD); + NWNX_Creature_SetSpecialization(oCreature, CLASS_TYPE_WIZARD, (nSchool+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_WIZARD) == (nSchool+1)%5); + + //Test old functions for compatibility (deprecated) + nSchool = NWNX_Creature_GetWizardSpecialization(oCreature); + NWNX_Creature_SetWizardSpecialization(oCreature, (nSchool+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etWizardSpecialization", NWNX_Creature_GetWizardSpecialization(oCreature) == (nSchool+1)%5); + + //Test domain functions on a class that doesn't have domains + int nDomain = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1); + NWNX_Tests_Report("NWNX_Creature", "GetDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1) == 0); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_WIZARD, 1, (nDomain+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1) == (nDomain+1)%5); + int nDomain2 = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2); + NWNX_Tests_Report("NWNX_Creature", "GetDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2) == 0); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_WIZARD, 2, (nDomain2+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2) == (nDomain2+1)%5); + + //Spawn a cleric + oCreature = CreateObject(OBJECT_TYPE_CREATURE, "NW_BANDIT004", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); + return; + } + + //Test specialization functions on a class that doesn't have specialization + nSchool = NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC); + NWNX_Tests_Report("NWNX_Creature", "GetSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC) == 0); + NWNX_Creature_SetSpecialization(oCreature, CLASS_TYPE_CLERIC, (nSchool+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC) == (nSchool+1)%5); + + //Test domain functions on a class that has domains + nDomain = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 1); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_CLERIC, 1, (nDomain+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 1) == (nDomain+1)%5); + nDomain2 = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 2); + NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_CLERIC, 2, (nDomain2+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 2) == (nDomain2+1)%5); + + //Test old functions for compatibility (deprecated) + nDomain = NWNX_Creature_GetClericDomain(oCreature, 1); + NWNX_Creature_SetClericDomain(oCreature, 1, (nDomain+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etClericDomain", NWNX_Creature_GetClericDomain(oCreature, 1) == (nDomain+1)%5); + nDomain2 = NWNX_Creature_GetClericDomain(oCreature, 2); + NWNX_Creature_SetClericDomain(oCreature, 2, (nDomain2+1)%5); + NWNX_Tests_Report("NWNX_Creature", "{S,G}etClericDomain", NWNX_Creature_GetClericDomain(oCreature, 2) == (nDomain2+1)%5); + + WriteTimestampedLogEntry("NWNX_Creature unit test end."); +} diff --git a/_removed files/nwnx_dialog_t.nss b/_removed files/nwnx_dialog_t.nss new file mode 100644 index 00000000..ff74404f --- /dev/null +++ b/_removed files/nwnx_dialog_t.nss @@ -0,0 +1,37 @@ +#include "nwnx_dialog" + +void _report() +{ + string sMessage = "NWNX_Dialog debug:"; + int id = NWNX_Dialog_GetCurrentNodeID(); + sMessage = "\nNode ID = " + IntToString(id); + + int type = NWNX_Dialog_GetCurrentNodeType(); + sMessage += "\nCurrent node type = " + IntToString(type) + " ("; + switch (type) + { + case NWNX_DIALOG_NODE_TYPE_INVALID: sMessage += "INVALID)"; break; + case NWNX_DIALOG_NODE_TYPE_STARTING_NODE: sMessage += "STARTING_NODE)"; break; + case NWNX_DIALOG_NODE_TYPE_ENTRY_NODE: sMessage += "ENTRY_NODE)"; break; + case NWNX_DIALOG_NODE_TYPE_REPLY_NODE: sMessage += "REPLY_NODE)"; break; + } + + int scripttype = NWNX_Dialog_GetCurrentScriptType(); + sMessage += "\nScript type = " + IntToString(scripttype) + " ("; + switch (scripttype) + { + case NWNX_DIALOG_SCRIPT_TYPE_OTHER: sMessage += "OTHER)"; break; + case NWNX_DIALOG_SCRIPT_TYPE_STARTING_CONDITIONAL: sMessage += "STARTING_CONDITIONAL)"; break; + case NWNX_DIALOG_SCRIPT_TYPE_ACTION_TAKEN: sMessage += "ACTION_TAKEN)"; break; + } + + int index = NWNX_Dialog_GetCurrentNodeIndex(); + sMessage += "\nNode index = " + IntToString(index); + + string text = NWNX_Dialog_GetCurrentNodeText(); + sMessage += "\nText = '" + text + "'"; + + NWNX_Dialog_SetCurrentNodeText(text + " [ADDED]"); + + SendMessageToPC(GetFirstPC(), sMessage); +} diff --git a/_removed files/nwnx_dialog_t1.nss b/_removed files/nwnx_dialog_t1.nss new file mode 100644 index 00000000..11f93fd7 --- /dev/null +++ b/_removed files/nwnx_dialog_t1.nss @@ -0,0 +1,7 @@ +#include "nwnx_dialog_t" + +int StartingConditional() +{ + _report(); + return FALSE; +} diff --git a/_removed files/nwnx_dialog_t2.nss b/_removed files/nwnx_dialog_t2.nss new file mode 100644 index 00000000..7249a40f --- /dev/null +++ b/_removed files/nwnx_dialog_t2.nss @@ -0,0 +1,7 @@ +#include "nwnx_dialog_t" + +int StartingConditional() +{ + _report(); + return TRUE; +} diff --git a/_removed files/nwnx_dialog_t3.nss b/_removed files/nwnx_dialog_t3.nss new file mode 100644 index 00000000..fb2a52e8 --- /dev/null +++ b/_removed files/nwnx_dialog_t3.nss @@ -0,0 +1,6 @@ +#include "nwnx_dialog_t" + +void main() +{ + _report(); +} diff --git a/_removed files/nwnx_effect_t.nss b/_removed files/nwnx_effect_t.nss new file mode 100644 index 00000000..52431842 --- /dev/null +++ b/_removed files/nwnx_effect_t.nss @@ -0,0 +1,80 @@ +#include "nwnx_effect" +#include "nwnx_tests" + +void printeff(struct NWNX_EffectUnpacked n) +{ + string s = "Unpacked effect: \n"; + s += "nType = " + IntToString(n.nType) + "\n"; + s += "nSubType = " + IntToString(n.nSubType) + "\n"; + + s += "fDuration = " + FloatToString(n.fDuration) + "\n"; + s += "nExpiryCalendarDay = " + IntToString(n.nExpiryCalendarDay) + "\n"; + s += "nExpiryTimeOfDay = " + IntToString(n.nExpiryTimeOfDay) + "\n"; + + s += "oCreator = " + ObjectToString(n.oCreator) + "\n"; + s += "nSpellId = " + IntToString(n.nSpellId) + "\n"; + s += "bExpose = " + IntToString(n.bExpose) + "\n"; + s += "bShowIcon = " + IntToString(n.bShowIcon) + "\n"; + s += "nCasterLevel = " + IntToString(n.nCasterLevel) + "\n"; + + s += "bLinkLeftValid = " + IntToString(n.bLinkLeftValid) + "\n"; + struct NWNX_EffectUnpacked link = NWNX_Effect_UnpackEffect(n.eLinkLeft); + s += "bLinkLeft (nType) = " + IntToString(link.nType) + "\n"; + s += "bLinkRightValid = " + IntToString(n.bLinkRightValid) + "\n"; + link = NWNX_Effect_UnpackEffect(n.eLinkRight); + s += "bLinkRight (nType) = " + IntToString(link.nType) + "\n"; + + s += "nNumIntegers = " + IntToString(n.nNumIntegers) + "\n"; + s += "nParam0 = " + IntToString(n.nParam0) + "\n"; + s += "nParam1 = " + IntToString(n.nParam1) + "\n"; + s += "nParam2 = " + IntToString(n.nParam2) + "\n"; + s += "nParam3 = " + IntToString(n.nParam3) + "\n"; + s += "nParam4 = " + IntToString(n.nParam4) + "\n"; + s += "nParam5 = " + IntToString(n.nParam5) + "\n"; + s += "nParam6 = " + IntToString(n.nParam6) + "\n"; + s += "nParam7 = " + IntToString(n.nParam7) + "\n"; + s += "fParam0 = " + FloatToString(n.fParam0) + "\n"; + s += "fParam1 = " + FloatToString(n.fParam1) + "\n"; + s += "fParam2 = " + FloatToString(n.fParam2) + "\n"; + s += "fParam3 = " + FloatToString(n.fParam3) + "\n"; + s += "sParam0 = " + "'" + n.sParam0 + "'" + "\n"; + s += "sParam1 = " + "'" + n.sParam1 + "'" + "\n"; + s += "sParam2 = " + "'" + n.sParam2 + "'" + "\n"; + s += "sParam3 = " + "'" + n.sParam3 + "'" + "\n"; + s += "sParam4 = " + "'" + n.sParam4 + "'" + "\n"; + s += "sParam5 = " + "'" + n.sParam5 + "'" + "\n"; + s += "oParam0 = " + ObjectToString(n.oParam0) + "\n"; + s += "oParam1 = " + ObjectToString(n.oParam1) + "\n"; + s += "oParam2 = " + ObjectToString(n.oParam2) + "\n"; + s += "oParam3 = " + ObjectToString(n.oParam3) + "\n"; + + s += "sTag = " + "'" + n.sTag + "'" + "\n"; + + WriteTimestampedLogEntry(s); +} + +void main() +{ + WriteTimestampedLogEntry("NWNX_Effect unit test begin.."); + + effect eCurse = EffectCurse(1, 2, 3, 4, 5, 6); + effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN); + effect e = EffectLinkEffects(eCurse, eVis); + e = TagEffect(e, "NWNX_EFFECT_TEST"); + + struct NWNX_EffectUnpacked unpacked = NWNX_Effect_UnpackEffect(e); + printeff(unpacked); + NWNX_Tests_Report("NWNX_Effect", "UnpackEffect", unpacked.sTag == "NWNX_EFFECT_TEST"); + + effect packed = NWNX_Effect_PackEffect(unpacked); + NWNX_Tests_Report("NWNX_Effect", "PackEffect", GetEffectTag(packed) == "NWNX_EFFECT_TEST"); + + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, packed, oCreature); + + e = NWNX_Effect_SetEffectExpiredScript(EffectDarkness(), "effect_test"); + unpacked = NWNX_Effect_UnpackEffect(e); + NWNX_Tests_Report("NWNX_Effect", "SetEffectExpiredScript", unpacked.sParam4 == "effect_test"); + + WriteTimestampedLogEntry("NWNX_Effect unit test end."); +} diff --git a/_removed files/nwnx_feedback_t.nss b/_removed files/nwnx_feedback_t.nss new file mode 100644 index 00000000..7a3edabc --- /dev/null +++ b/_removed files/nwnx_feedback_t.nss @@ -0,0 +1,34 @@ +#include "nwnx_feedback" +#include "nwnx_tests" + +const int NWNX_FEEDBACK_REST_BEGINNING_REST = 18; +const int NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE = 3; + +void main() +{ + WriteTimestampedLogEntry("NWNX_Feedback unit test begin.."); + + NWNX_Feedback_SetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, TRUE); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}FeedbackMessageHidden (Global)", NWNX_Feedback_GetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST)); + + NWNX_Feedback_SetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, TRUE); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}CombatMessageHidden (Global)", NWNX_Feedback_GetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE)); + + object oPC = GetFirstPC(); + + if( GetIsObjectValid(oPC) ) + { + NWNX_Feedback_SetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, TRUE, oPC); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}FeedbackMessageHidden (Personal)", NWNX_Feedback_GetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, oPC)); + + NWNX_Feedback_SetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, TRUE, oPC); + NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}CombatMessageHidden (Personal)", NWNX_Feedback_GetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, oPC)); + } + else + { + WriteTimestampedLogEntry("No valid PC found, skipping personal feedback state tests"); + } + + + WriteTimestampedLogEntry("NWNX_Feedback unit test end."); +} diff --git a/_removed files/nwnx_itemprop_t.nss b/_removed files/nwnx_itemprop_t.nss new file mode 100644 index 00000000..f7886565 --- /dev/null +++ b/_removed files/nwnx_itemprop_t.nss @@ -0,0 +1,42 @@ +#include "nwnx_itemprop" +#include "nwnx_tests" + +void printip(struct NWNX_IPUnpacked n) +{ + string s = "Unpacked IP: \n"; + s += "nProperty = " + IntToString(n.nProperty) + "\n"; + s += "nSubType = " + IntToString(n.nSubType) + "\n"; + s += "nCostTable = " + IntToString(n.nCostTable) + "\n"; + s += "nCostTableValue = " + IntToString(n.nCostTableValue) + "\n"; + s += "nParam1 = " + IntToString(n.nParam1) + "\n"; + s += "nParam1Value = " + IntToString(n.nParam1Value) + "\n"; + s += "nUsesPerDay = " + IntToString(n.nUsesPerDay) + "\n"; + s += "nChanceToAppear = " + IntToString(n.nChanceToAppear) + "\n"; + s += "bUsable = " + IntToString(n.bUsable) + "\n"; + s += "nSpellId = " + IntToString(n.nSpellId) + "\n"; + s += "sTag = " + "'" + n.sTag + "'" + "\n"; + + WriteTimestampedLogEntry(s); +} + +void main() +{ + WriteTimestampedLogEntry("NWNX_ItemProperty unit test begin.."); + + itemproperty ip = ItemPropertyDamageBonusVsRace(1,2,3); + ip = TagItemProperty(ip, "NWNX_ItemProperty_TEST"); + + struct NWNX_IPUnpacked unpacked = NWNX_ItemProperty_UnpackIP(ip); + printip(unpacked); + NWNX_Tests_Report("NWNX_ItemProperty", "UnpackIP", unpacked.sTag == "NWNX_ItemProperty_TEST"); + + itemproperty ip2 = NWNX_ItemProperty_PackIP(unpacked); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetIsItemPropertyValid(ip2)); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyTag(ip2) == "NWNX_ItemProperty_TEST"); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyCostTable(ip2) == unpacked.nCostTable); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyCostTableValue(ip2) == unpacked.nCostTableValue); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyParam1(ip2) == unpacked.nParam1); + NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyParam1Value(ip2) == unpacked.nParam1Value); + + WriteTimestampedLogEntry("NWNX_ItemProperty unit test end."); +} diff --git a/_removed files/nwnx_object_t.nss b/_removed files/nwnx_object_t.nss new file mode 100644 index 00000000..6bf99fda --- /dev/null +++ b/_removed files/nwnx_object_t.nss @@ -0,0 +1,121 @@ +#include "nwnx_object" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Object unit test begin.."); + + object o = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(o)) + { + WriteTimestampedLogEntry("NWNX_Object test: Failed to create creature"); + return; + } + + int nVarCount = NWNX_Object_GetLocalVariableCount(o); + SetLocalInt(o, "nwnx_object_test", 1); + NWNX_Tests_Report("NWNX_Object", "GetLocalVariableCount", NWNX_Object_GetLocalVariableCount(o) == (nVarCount+1)); + + struct NWNX_Object_LocalVariable lv = NWNX_Object_GetLocalVariable(o, nVarCount); + NWNX_Tests_Report("NWNX_Object", "GetLocalVariable", lv.key == "nwnx_object_test"); + NWNX_Tests_Report("NWNX_Object", "GetLocalVariable", lv.type == NWNX_OBJECT_LOCALVAR_TYPE_INT); + + string sObj = ObjectToString(o); + NWNX_Tests_Report("NWNX_Object", "StringToObject", NWNX_Object_StringToObject(sObj) == o); + NWNX_Tests_Report("NWNX_Object", "Negative: StringToObject", NWNX_Object_StringToObject("!@#!@#!@#!") == OBJECT_INVALID); + + vector vPos = GetPosition(o); + vPos.x += 1; + NWNX_Object_SetPosition(o, vPos); + NWNX_Tests_Report("NWNX_Object", "SetPosition", GetPosition(o).x == vPos.x); + + int nMaxHP = GetMaxHitPoints(o); + NWNX_Object_SetMaxHitPoints(o, nMaxHP + 1); + NWNX_Tests_Report("NWNX_Object", "SetMaxHitPoints", GetMaxHitPoints(o) == (nMaxHP + 1)); + + int nCurrHP = GetCurrentHitPoints(o); + NWNX_Object_SetCurrentHitPoints(o, nCurrHP + 1); + NWNX_Tests_Report("NWNX_Object", "SetCurrentHitPoints", GetCurrentHitPoints(o) == (nCurrHP + 1)); + + string dialog = "nwnxtest"; + NWNX_Object_SetDialogResref(o, dialog); + NWNX_Tests_Report("NWNX_Object", "SetDialogResRef/GetDialogResRef", NWNX_Object_GetDialogResref(o) == dialog); + + NWNX_Object_SetInt(o, "TestInt", 10, TRUE); + NWNX_Object_SetString(o, "TestString_1", "This is a string.", TRUE); + NWNX_Object_SetString(o, "TestString_2", "This is another string.", TRUE); + NWNX_Object_SetFloat(o, "TestFloat", 1.5f, TRUE); + NWNX_Tests_Report("NWNX_Object", "Set/GetInt", NWNX_Object_GetInt(o, "TestInt") == 10); + NWNX_Tests_Report("NWNX_Object", "Set/GetString #1", NWNX_Object_GetString(o, "TestString_1") == "This is a string."); + NWNX_Tests_Report("NWNX_Object", "Set/GetString #2", NWNX_Object_GetString(o, "TestString_2") == "This is another string."); + NWNX_Tests_Report("NWNX_Object", "Set/GetFloat", NWNX_Object_GetFloat(o, "TestFloat") == 1.5f); + + string sSerialized = NWNX_Object_Serialize(o); + NWNX_Tests_Report("NWNX_Object", "Serialize", sSerialized != ""); + WriteTimestampedLogEntry("Serialized chicken: " + sSerialized); + + object oDeserialized = NWNX_Object_Deserialize(sSerialized); + NWNX_Tests_Report("NWNX_Object", "Deserialize", GetIsObjectValid(oDeserialized)); + + NWNX_Object_DeleteInt(o, "TestInt"); + NWNX_Object_DeleteString(o, "TestString_1"); + NWNX_Object_DeleteString(o, "TestString_2"); + NWNX_Object_DeleteFloat(o, "TestFloat"); + NWNX_Tests_Report("NWNX_Object", "DeleteInt", NWNX_Object_GetInt(o, "TestInt") == 0); + NWNX_Tests_Report("NWNX_Object", "DeleteString #1", NWNX_Object_GetString(o, "TestString_1") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteString #2", NWNX_Object_GetString(o, "TestString_2") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteFloat", NWNX_Object_GetFloat(o, "TestFloat") == 0.0f); + + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetInt", NWNX_Object_GetInt(oDeserialized, "TestInt") == 10); + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetString #1", NWNX_Object_GetString(oDeserialized, "TestString_1") == "This is a string."); + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetString #2", NWNX_Object_GetString(oDeserialized, "TestString_2") == "This is another string."); + NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetFloat", NWNX_Object_GetFloat(oDeserialized, "TestFloat") == 1.5f); + + NWNX_Object_DeleteVarRegex(oDeserialized, ".*TestString.*"); + + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetInt(oDeserialized, "TestInt") == 10); + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetString(oDeserialized, "TestString_1") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetString(oDeserialized, "TestString_2") == ""); + NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetFloat(oDeserialized, "TestFloat") == 1.5f); + + WriteTimestampedLogEntry("Deserialized " + GetName(oDeserialized) + " in " + GetName(GetArea(oDeserialized))); + + object bag = CreateObject(OBJECT_TYPE_ITEM, "nw_it_contain006", GetStartingLocation()); // Bag of holding + CreateItemOnObject("x2_it_adaplate", bag, 1); + CreateItemOnObject("x2_it_adaplate", bag, 1); + CreateItemOnObject("x2_it_adaplate", bag, 1); + int iFits = NWNX_Object_CheckFit(bag, BASE_ITEM_ARROW); + NWNX_Tests_Report("NWNX_Object", "CheckFit", iFits == 1); + iFits = NWNX_Object_CheckFit(bag, BASE_ITEM_ARMOR); + NWNX_Tests_Report("NWNX_Object", "CheckFit", iFits == 0); + object oItem = GetFirstItemInInventory(bag); + while (oItem != OBJECT_INVALID) + { + DestroyObject(oItem); + oItem = GetNextItemInInventory(bag); + } + DestroyObject(bag); + + NWNX_Tests_Report("NWNX_Object", "GetDamageImmunity", NWNX_Object_GetDamageImmunity(o, DAMAGE_TYPE_FIRE) == 0); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 50), o); + NWNX_Tests_Report("NWNX_Object", "GetDamageImmunity", NWNX_Object_GetDamageImmunity(o, DAMAGE_TYPE_FIRE) == 50); + + object oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_defportal", GetStartingLocation()); + NWNX_Object_SetPlaceableIsStatic(oPlc, 1); + NWNX_Tests_Report("NWNX_Object", "SetPlaceableIsStatic 1", NWNX_Object_GetPlaceableIsStatic(oPlc) == 1); + DestroyObject(oPlc); + + oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_driftwd1", GetStartingLocation()); + NWNX_Object_SetPlaceableIsStatic(oPlc, 0); + NWNX_Tests_Report("NWNX_Object", "SetPlaceableIsStatic 2", NWNX_Object_GetPlaceableIsStatic(oPlc) == 0); + DestroyObject(oPlc); + + oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_driftwd1", GetStartingLocation()); + NWNX_Object_SetAutoRemoveKey(oPlc, 1); + NWNX_Tests_Report("NWNX_Object", "SetAutoRemoveKey", NWNX_Object_GetAutoRemoveKey(oPlc) == 1); + DestroyObject(oPlc); + + DestroyObject(o); + DestroyObject(oDeserialized); + WriteTimestampedLogEntry("NWNX_Object unit test end."); +} diff --git a/_removed files/nwnx_player_t.nss b/_removed files/nwnx_player_t.nss new file mode 100644 index 00000000..574431cb --- /dev/null +++ b/_removed files/nwnx_player_t.nss @@ -0,0 +1,16 @@ +#include "nwnx_player" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Player unit test begin.."); + + object oPC = GetFirstPC(); + if (!GetIsObjectValid(oPC)) + { + WriteTimestampedLogEntry("NWNX_Player test: No PC found"); + return; + } + + WriteTimestampedLogEntry("NWNX_Player unit test end."); +} diff --git a/_removed files/nwnx_race_t.nss b/_removed files/nwnx_race_t.nss new file mode 100644 index 00000000..48a15c79 --- /dev/null +++ b/_removed files/nwnx_race_t.nss @@ -0,0 +1,33 @@ +#include "nwnx_race" +#include "nwnx_tests" + +void main() +{ + WriteTimestampedLogEntry("NWNX_Race unit test begin.."); + + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + int iSR = GetSpellResistance(oCreature); + int iSkillRank = GetSkillRank(SKILL_HEAL, oCreature); + int iAC = GetAC(oCreature); + int iImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED); + DestroyObject(oCreature); + + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SRCHARGEN, 10); + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SKILL, SKILL_HEAL, 5); + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_AC, 1); + NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_IMMUNITY, IMMUNITY_TYPE_CURSED); + + oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + int iNewSR = GetSpellResistance(oCreature); + int iNewSkillRank = GetSkillRank(SKILL_HEAL, oCreature); + int iNewAC = GetAC(oCreature); + int iNewImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED); + DestroyObject(oCreature); + + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SR", iSR == iNewSR - 10); + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SkillRank", iSkillRank == iNewSkillRank - 5); + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier AC", iAC == iNewAC - 1); + NWNX_Tests_Report("NWNX_Race", "SetRacialModifier Immunity", iImmune != iNewImmune); + + WriteTimestampedLogEntry("NWNX_Race unit test end."); +} diff --git a/_removed files/nwnx_sql_t.nss b/_removed files/nwnx_sql_t.nss new file mode 100644 index 00000000..ffbb7306 --- /dev/null +++ b/_removed files/nwnx_sql_t.nss @@ -0,0 +1,249 @@ +#include "nwnx_sql" +#include "nwnx_object" +#include "nwnx_tests" + +void cleanup() +{ + NWNX_Tests_Report("NWNX_SQL", "Cleanup sql_test", NWNX_SQL_ExecuteQuery("DROP TABLE sql_test")); + NWNX_Tests_Report("NWNX_SQL", "Cleanup stress_test", NWNX_SQL_ExecuteQuery("DROP TABLE stress_test")); + NWNX_Tests_Report("NWNX_SQL", "Cleanup error_test", NWNX_SQL_ExecuteQuery("DROP TABLE error_test")); +} + +void main() +{ + WriteTimestampedLogEntry("NWNX_SQL unit test begin.."); + + string db_type = GetStringUpperCase(NWNX_SQL_GetDatabaseType()); + WriteTimestampedLogEntry("Testing database " + db_type); + + string sCreate = ""; + string sInsert = ""; + + /* MySQL and SQLite version */ + if (db_type == "MYSQL" || db_type == "SQLITE") + { + sCreate = "CREATE TABLE sql_test (" + + "colInt INT, colFloat FLOAT, colStr VARCHAR(256)," + + "colObjId INT, colObj TEXT(1000000) );"; + + sInsert = "INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(?, ?, ?, ?, ?)"; + } + + /* PostgreSQL version */ + if (db_type == "POSTGRESQL") + { + sCreate = "CREATE TABLE sql_test (" + + "colInt INT, colFloat FLOAT, colStr VARCHAR(256)," + + "colObjId INT, colObj TEXT );"; + + // Even though we're using 0 based parameter numbers, PostgreSQL requires the parameter + // numbers in the actual SQL string to be 1 based (e.g. $1, $2... not $0, $1... ) + sInsert = "INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES($1, $2, $3, $4, $5)"; + } + + int b = NWNX_SQL_ExecuteQuery(sCreate); + NWNX_Tests_Report("NWNX_SQL", "Create Table", b); + + object o = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(o)) + { + WriteTimestampedLogEntry("NWNX_SQL test: Failed to create creature"); + cleanup(); + return; + } + + vector v = Vector(5.0, 5.0, 0.0); // slightly different location. + + b = NWNX_SQL_PrepareQuery(sInsert); + NWNX_Tests_Report("NWNX_SQL", "Complex PrepareQuery", b); + NWNX_Tests_Report("NWNX_SQL", "GetPreparedQueryParamCount", NWNX_SQL_GetPreparedQueryParamCount() == 5); + + NWNX_SQL_PreparedInt(0, 42); + NWNX_SQL_PreparedFloat(1, 0.42); + NWNX_SQL_PreparedString(2, "FourtyTwooo"); + NWNX_SQL_PreparedObjectId(3, o); + NWNX_SQL_PreparedObjectFull(4, o); + + b = NWNX_SQL_ExecutePreparedQuery(); + NWNX_Tests_Report("NWNX_SQL", "Complex ExecutePreparedQuery", b); + + b = NWNX_SQL_ExecuteQuery("SELECT * FROM sql_test;"); + NWNX_Tests_Report("NWNX_SQL", "Select ExecuteQuery", b); + + if (b) + { + while (NWNX_SQL_ReadyToReadNextRow()) + { + NWNX_SQL_ReadNextRow(); + int n = StringToInt(NWNX_SQL_ReadDataInActiveRow(0)); + NWNX_Tests_Report("NWNX_SQL", "ReadInt", n == 42); + float f = StringToFloat(NWNX_SQL_ReadDataInActiveRow(1)); + NWNX_Tests_Report("NWNX_SQL", "ReadFloat", fabs(f - 0.42) < 0.01); + string s = NWNX_SQL_ReadDataInActiveRow(2); + NWNX_Tests_Report("NWNX_SQL", "ReadString", s == "FourtyTwooo"); + + string sObjId = NWNX_SQL_ReadDataInActiveRow(3); // In base 10 + object o2 = NWNX_Object_StringToObject(IntToHexString(StringToInt(sObjId))); + NWNX_Tests_Report("NWNX_SQL", "ReadObjectId", o == o2); + + object o3 = NWNX_SQL_ReadFullObjectInActiveRow(4, GetArea(o), v.x, v.y, v.z); + NWNX_Tests_Report("NWNX_SQL", "ReadFullObject", GetIsObjectValid(o3)); + // Alternatively: + // object o3 = NWNX_Object_Deserialize(NWNX_SQL_ReadDataInActiveRow(4)); + } + } + + + object oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_chestburd", GetStartingLocation()); + object oItem = CreateObject(OBJECT_TYPE_ITEM, "x0_it_mring013", GetStartingLocation()); + if (!GetIsObjectValid(oPlc) || !GetIsObjectValid(oItem)) + { + WriteTimestampedLogEntry("NWNX_SQL test: Failed to create objects.."); + } + else + { + object oTmp = GetFirstItemInInventory(oPlc); + while (GetIsObjectValid(oTmp)) + { + WriteTimestampedLogEntry("NWNX_SQL Destroying auto created object " + GetTag(oTmp)); + DestroyObject(oTmp); + oTmp = GetNextItemInInventory(oPlc); + } + + string test2 = ""; + if (db_type == "MYSQL" || db_type == "SQLITE") + { + test2="INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(1337,0.0,'xxx',1337,?)"; + } + if (db_type == "POSTGRESQL") + { + test2="INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(1337,0.0,'xxx',1337,$1)"; + } + + NWNX_SQL_PrepareQuery(test2); + + NWNX_SQL_PreparedObjectFull(0, oItem); + b = NWNX_SQL_ExecutePreparedQuery(); + NWNX_Tests_Report("NWNX_SQL", "Insert item full", b); + + b = NWNX_SQL_ExecuteQuery("SELECT colObj FROM sql_test WHERE colInt=1337"); + NWNX_Tests_Report("NWNX_SQL", "Select item", b); + + if (NWNX_SQL_ReadyToReadNextRow()) + { + NWNX_SQL_ReadNextRow(); + + object oItem2 = NWNX_SQL_ReadFullObjectInActiveRow(0, oPlc); + NWNX_Tests_Report("NWNX_SQL", "ReadFullObject Item", GetIsObjectValid(oItem2)); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to placeable's inventory", oItem2 == GetFirstItemInInventory(oPlc)); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to placeable's inventory - possessor", GetItemPossessor(oItem2) == oPlc); + + object oItem3 = NWNX_SQL_ReadFullObjectInActiveRow(0, GetArea(oPlc), v.x, v.y, v.z); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to area", GetArea(oItem3) == GetArea(oPlc)); + + object oItem4 = NWNX_SQL_ReadFullObjectInActiveRow(0, o); + NWNX_Tests_Report("NWNX_SQL", "Deserialized to creature's inventory - possessor", GetItemPossessor(oItem4) == o); + } + else + { + WriteTimestampedLogEntry("NWNX_SQL not ready to read item"); + } + + } + + int STRESS_CNT = 10; + + WriteTimestampedLogEntry("NWNX_SQL stress test."); + NWNX_SQL_ExecuteQuery("create table stress_test ( i_key int, i_int int, s_text varchar(8))"); + int i; + // Brute force some inserts + for ( i=1 ; i<=STRESS_CNT ; i++ ) // Generate 1000 rows. + { + // Simulates the existing NWNX2 ODBC way of generating SQL. + NWNX_SQL_ExecuteQuery("insert into stress_test values ( " + IntToString(i) + ", " + IntToString(i*2) + ", '" + IntToString(i*100) + "')"); + } + NWNX_SQL_ExecuteQuery("delete from stress_test where i_key > 0"); + int res = NWNX_SQL_GetAffectedRows(); + WriteTimestampedLogEntry("Deleted " + IntToString(res) + " rows."); + report ("Delete rows", res == STRESS_CNT); + + // now do some elegant inserts + string test3 = ""; + if (db_type == "MYSQL" || db_type == "SQLITE") + { + test3 = "insert into stress_test values ( ?, ?, ? )"; + } + if (db_type == "POSTGRESQL") + { + test3 = "insert into stress_test values ( $1, $2, $3 )"; + } + + NWNX_SQL_PrepareQuery(test3); + for ( i = 1 ; i <= STRESS_CNT ; i++ ) + { + NWNX_SQL_PreparedInt(0, i); + NWNX_SQL_PreparedInt(1, i*2); + NWNX_SQL_PreparedString(2, IntToString(i*100)); + b = NWNX_SQL_ExecutePreparedQuery(); + NWNX_Tests_Report("NWNX_SQL", "Elegant Looping ExecutePreparedQuery", b); + } + NWNX_SQL_ExecuteQuery("delete from stress_test where i_key > 0"); + res = NWNX_SQL_GetAffectedRows(); + WriteTimestampedLogEntry("Deleted " + IntToString(res) + " rows."); + NWNX_Tests_Report("Delete rows", res == STRESS_CNT); + + // Test some error output. + b = NWNX_SQL_ExecuteQuery("create table error_test (col varchar(10))"); + NWNX_Tests_Report("Test Table Create", b); + + b = NWNX_SQL_ExecuteQuery("insert into error_test values('abcdefghij')"); + NWNX_Tests_Report("good insert", b); + + if (db_type != "SQLITE") + {// SQLite doesn't care about size constraints of columns + b = NWNX_SQL_ExecuteQuery("insert into error_test values('abcde000fghij')"); + report ("bad insert", !b); + if (!b) { + WriteTimestampedLogEntry("There should be an error a couple rows up."); + } + } + + string test4 = ""; + if (db_type == "MYSQL" || db_type == "SQLITE") + { + test3 = "insert into error_test values ( ? )"; + } + if (db_type == "POSTGRESQL") + { + test3 = "insert into error_test values ( $1 )"; + } + NWNX_SQL_PrepareQuery(test3); + NWNX_SQL_PreparedString(100, "lala"); // out of bounds, must not crash. + + NWNX_Tests_Report("NWNX_SQL", "Negative prepare query", NWNX_SQL_PrepareQuery("not a valid query!") == 0); + NWNX_Tests_Report("NWNX_SQL", "GetLastError", NWNX_SQL_GetLastError() != ""); + + // Test with null values + NWNX_SQL_ExecuteQuery("INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(5121, null, null, null, null)"); + NWNX_Tests_Report("NWNX_SQL", "Select null", NWNX_SQL_ExecuteQuery("SELECT * FROM sql_test WHERE colInt=5121")); + if (NWNX_SQL_ReadyToReadNextRow()) + { + NWNX_SQL_ReadNextRow(); + int n = StringToInt(NWNX_SQL_ReadDataInActiveRow(0)); + NWNX_Tests_Report("NWNX_SQL", "ReadInt", n == 5121); + float f = StringToFloat(NWNX_SQL_ReadDataInActiveRow(1)); + NWNX_Tests_Report("NWNX_SQL", "ReadFloat", f == 0.0); + string s = NWNX_SQL_ReadDataInActiveRow(2); + NWNX_Tests_Report("NWNX_SQL", "ReadString", s == ""); + + string sObjId = NWNX_SQL_ReadDataInActiveRow(3); // In base 10 + NWNX_Tests_Report("NWNX_SQL", "ReadObjectId", sObjId == ""); + + object obj = NWNX_SQL_ReadFullObjectInActiveRow(4); + NWNX_Tests_Report("NWNX_SQL", "ReadFullObject", obj == OBJECT_INVALID); + } + + cleanup(); + WriteTimestampedLogEntry("Testing database " + db_type + " complete."); + WriteTimestampedLogEntry("NWNX_SQL unit tests end."); +} diff --git a/_removed files/old_thunderclap.nss b/_removed files/old_thunderclap.nss new file mode 100644 index 00000000..188e42a2 --- /dev/null +++ b/_removed files/old_thunderclap.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Great Thunderclap +//:: X2_S0_GrtThdclp +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// You create a loud noise equivalent to a peal of +// thunder and its acommpanying shock wave. The +// spell has three effects. First, all creatures +// in the area must make Will saves to avoid being +// stunned for 1 round. Second, the creatures must +// make Fortitude saves or be deafened for 1 minute. +// Third, they must make Reflex saves or fall prone. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 20, 2002 +//:: Updated On: Oct 20, 2003 - some nice Vfx:) +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" + +#include "x2_inc_spellhook" + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Epic DC Bonus Added + int nDB; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDB = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = +" + IntToString(nDB) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDB = 0; + } + + int nDamage = 0; + int nDC = GetSpellSaveDC(); + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eVis2 = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M); + effect eVis3 = EffectVisualEffect(VFX_IMP_STUN); + effect eDeaf = EffectDeaf(); + effect eKnock = EffectKnockdown(); + effect eStun = EffectStunned(); + effect eShake = EffectVisualEffect(356); + effect eDmg = EffectDamage(d8(3), DAMAGE_TYPE_SONIC, DAMAGE_POWER_ENERGY); + + location lTarget = GetSpellTargetLocation(); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eShake, OBJECT_SELF, 2.0f); + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE); + while (GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, RoundsToSeconds(10))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + } + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStun, oTarget, RoundsToSeconds(1))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget, 6.0f)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis3, oTarget,4.0f)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDmg, oTarget)); + } + } + } + + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE); + +} + diff --git a/_removed files/vat_stripdmfi.nss b/_removed files/vat_stripdmfi.nss new file mode 100644 index 00000000..0c14b6cb --- /dev/null +++ b/_removed files/vat_stripdmfi.nss @@ -0,0 +1,28 @@ +#include "inc_levelset" + +void main() +{ + object oTarget = GetPCSpeaker(); + int iFoundItemFlag = 0; + //for testing + //AssignCommand(oTarget, SpeakString("stripInventory fired")); + + //valid only for creatures + //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; + + // set the variables + int i; + object oItem = GetFirstItemInInventory(oTarget); + + // destroy unequipped items in inventory + while ( GetIsObjectValid(oItem) ) + { + if (GetIsDMFI(oItem)) + { + DestroyObject(oItem); + iFoundItemFlag = 1; + } + oItem = GetNextItemInInventory(oTarget); + } + if (iFoundItemFlag = 0) FloatingTextStringOnCreature("No DMFI items found.", oTarget, FALSE); +} diff --git a/_removed files/vat_stripflags.nss b/_removed files/vat_stripflags.nss new file mode 100644 index 00000000..0a557029 --- /dev/null +++ b/_removed files/vat_stripflags.nss @@ -0,0 +1,60 @@ +#include "inc_levelset" + +void main() +{ + object oTarget = GetPCSpeaker(); + int iFoundItemFlag = 0; + int i = 0; + //for testing + //AssignCommand(oTarget, SpeakString("stripInventory fired")); + + //valid only for creatures + //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; + + // set the variables + object oItem = GetFirstItemInInventory(oTarget); + + // unflag unequipped items in inventory + while ( GetIsObjectValid(oItem) ) + { + //SendMessageToPC(oTarget, "Evaluating " + GetName(oItem)); + + if (GetPlotFlag(oItem) == TRUE) + { + SetPlotFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Plot flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + + if (GetStolenFlag(oItem) == TRUE) + { + SetStolenFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Stolen flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + //else SendMessageToPC(oTarget, GetName(oItem) + " was not changed."); + + oItem = GetNextItemInInventory(oTarget); + } + + //unflag equipped items in slots + for ( i = 0; i < NUM_INVENTORY_SLOTS; i++ ) + { + oItem = GetItemInSlot(i, oTarget); + if (GetPlotFlag(oItem) == TRUE) + { + SetPlotFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Plot flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + + if (GetStolenFlag(oItem) == TRUE) + { + SetStolenFlag(oItem, FALSE); + SendMessageToPC(oTarget, "Stolen flag removed from " + GetName(oItem)); + iFoundItemFlag = 1; + } + } + + if (iFoundItemFlag == 0) SendMessageToPC(oTarget, "No Plot or Stolen items found."); +} diff --git a/_removed files/vat_stripnondrop.nss b/_removed files/vat_stripnondrop.nss new file mode 100644 index 00000000..08ae6aa0 --- /dev/null +++ b/_removed files/vat_stripnondrop.nss @@ -0,0 +1,51 @@ +#include "inc_levelset" + +void main() +{ + object oTarget = GetPCSpeaker(); + int iFoundItemFlag = 0; + int i = 0; + //for testing + //AssignCommand(oTarget, SpeakString("stripInventory fired")); + + //valid only for creatures + //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; + + // set the variables + object oItem = GetFirstItemInInventory(oTarget); + + // unflag unequipped items in inventory + while ( GetIsObjectValid(oItem) ) + { + //SendMessageToPC(oTarget, "Evaluating " + GetName(oItem)); + + if (GetIsDMFI(oItem) != TRUE) + { + if (GetItemCursedFlag(oItem) == TRUE) + { + + SetItemCursedFlag(oItem, FALSE); + SendMessageToPC(oTarget, GetName(oItem) + " changed to droppable."); + iFoundItemFlag = 1; + } + //else SendMessageToPC(oTarget, GetName(oItem) + " was not changed."); + } + else SendMessageToPC(oTarget, GetName(oItem) + " is a DMFI item."); + + oItem = GetNextItemInInventory(oTarget); + } + + //unflag equipped items in slots + for ( i = 0; i < NUM_INVENTORY_SLOTS; i++ ) + { + oItem = GetItemInSlot(i, oTarget); + if (GetItemCursedFlag(oItem) == TRUE) + { + SetItemCursedFlag(oItem, FALSE); + SendMessageToPC(oTarget, GetName(oItem) + " changed to droppable."); + iFoundItemFlag = 1; + } + } + + if (iFoundItemFlag == 0) SendMessageToPC(oTarget, "No cursed / non-droppable items found."); +} diff --git a/_removed files/x0_s0_bombard.nss b/_removed files/x0_s0_bombard.nss new file mode 100644 index 00000000..e42b51f4 --- /dev/null +++ b/_removed files/x0_s0_bombard.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Bombardment +//:: X0_S0_Bombard +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* +// Rocks fall from sky +// 1d8 damage/level to a max of 10d8 +// Reflex save for half +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 22 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 01, 2003 + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(VFX_FNF_METEOR_SWARM); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eDam; + + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 20) + { + nCasterLvl = 20; + } + + //Apply the fireball explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) == TRUE) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d8(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ALL); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING); + if(nDamage > 0) + { + + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + + + diff --git a/_removed files/x0_s0_enten.nss b/_removed files/x0_s0_enten.nss new file mode 100644 index 00000000..645796ad --- /dev/null +++ b/_removed files/x0_s0_enten.nss @@ -0,0 +1,24 @@ +//:://///////////////////////////////////////////// +//:: x0_s0_entEN +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Applies a miss chance to any enemies + of the area of effect creator. +*/ +//::////////////////////////////////////////////// +//:: Created By: +//:: Created On: +//::////////////////////////////////////////////// + +void main() +{ + object oTarget = GetEnteringObject(); + if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator())) + { + effect eMiss = EffectMissChance(40, MISS_CHANCE_TYPE_VS_RANGED); + + // * only leaving the area of effect removes the miss chance + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMiss, oTarget); + } +} diff --git a/_removed files/x0_s0_entrshield.nss b/_removed files/x0_s0_entrshield.nss new file mode 100644 index 00000000..24518009 --- /dev/null +++ b/_removed files/x0_s0_entrshield.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Entropic Shield +//:: x0_s0_entrshield.nss +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + 20% concealment to ranged attacks including + ranged spell attacks + + Duration: 1 turn/level + +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent Knowles +//:: Created On: July 18, 2002 +//::////////////////////////////////////////////// +//:: VFX Pass By: +#include "NW_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = OBJECT_SELF; + int nDuration = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100% + { + nDuration = nDuration * 2; + } + //Set the four unique armor bonuses + effect eShield = EffectConcealment(40, MISS_CHANCE_TYPE_VS_RANGED); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects(eShield, eDur); +// RemoveEffectsFromSpell(oTarget, GetSpellId()); + + //Apply the armor bonuses and the VFX impact + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); +} + diff --git a/_removed files/x0_s0_ether.nss b/_removed files/x0_s0_ether.nss new file mode 100644 index 00000000..9a44c6d6 --- /dev/null +++ b/_removed files/x0_s0_ether.nss @@ -0,0 +1,48 @@ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + effect eVis = EffectVisualEffect(VFX_DUR_SANCTUARY); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eSanc = EffectEthereal(); + + effect eLink = EffectLinkEffects(eVis, eSanc); + eLink = EffectLinkEffects(eLink, eDur); + + int nDuration = GetCasterLevel(OBJECT_SELF); + //Enter Metamagic conditions + int nMetaMagic = GetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ETHEREALNESS, FALSE)); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); +} diff --git a/_removed files/x0_s0_firebrand.nss b/_removed files/x0_s0_firebrand.nss new file mode 100644 index 00000000..92897881 --- /dev/null +++ b/_removed files/x0_s0_firebrand.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Firebrand +//:: x0_x0_Firebrand +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* +// * Fires a flame arrow to every target in a +// * colossal area +// * Each target explodes into a small fireball for +// * 1d6 damage / level (max = 15 levels) +// * Only nLevel targets can be affected +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 29 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + int nDamage = GetCasterLevel(OBJECT_SELF); + if (nDamage > 25) + nDamage = 25; + + DoMissileStorm(nDamage, 25, SPELL_FIREBRAND, VFX_IMP_MIRV_FLAME, VFX_IMP_FLAME_M, DAMAGE_TYPE_FIRE, TRUE, TRUE); +} + + + + diff --git a/_removed files/x0_s0_fleshsto.nss b/_removed files/x0_s0_fleshsto.nss new file mode 100644 index 00000000..67f5d2a9 --- /dev/null +++ b/_removed files/x0_s0_fleshsto.nss @@ -0,0 +1,57 @@ +//:://///////////////////////////////////////////// +//:: Flesh to Stone +//:: x0_s0_fleshsto +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* +//:: The target freezes in place, standing helpless. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent Knowles +//:: Created On: October 16, 2002 +//::////////////////////////////////////////////// +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +//Override in town, no casting! +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + + + if (MyResistSpell(OBJECT_SELF,oTarget) <1) + { + DoPetrification(nCasterLvl, OBJECT_SELF, oTarget, GetSpellId(), GetEpicSpellSaveDC()); + } +} + + diff --git a/_removed files/x0_s0_missstorm1.nss b/_removed files/x0_s0_missstorm1.nss new file mode 100644 index 00000000..21c2fdd0 --- /dev/null +++ b/_removed files/x0_s0_missstorm1.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Isaacs Lesser Missile Storm +//:: x0_s0_MissStorm1 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Up to 10 missiles, each doing 1d6 damage to all + targets in area. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 31, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + +//Epic Adjustment By Genisys +//I added a level adjustment to the spell +int nInt; +int nDD; +object oCaster = OBJECT_SELF; +int nCL = GetCasterLevel(oCaster); + +//If caster level is 9 or higher.. +if(nCL >8) +{ +int nEL = nCL - 6; +int nDiv = nEL / 3; +nInt = nDiv + 6; //6 missles + 1 missle every 3 levels over level 6 caster +//(16 Max total Missles) + +//end if Level Check +} +//If not level 9+, then 6 is the max # of missles / level +else +{ +nInt = 6; +} + + //SpawnScriptDebugger(); + DoMissileStorm(1, nInt, SPELL_ISAACS_LESSER_MISSILE_STORM); +} + + diff --git a/_removed files/x0_s0_missstorm2.nss b/_removed files/x0_s0_missstorm2.nss new file mode 100644 index 00000000..c30470db --- /dev/null +++ b/_removed files/x0_s0_missstorm2.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Isaacs Greater Missile Storm +//:: x0_s0_MissStorm2 +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* + Up to 20 missiles, each doing 3d6 damage to each + target in area. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: July 31, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: + +#include "X0_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + +//Epic Adjustment Added By Genisys +int nInt; +int nDD; +object oCaster = OBJECT_SELF; +int nCL = GetCasterLevel(oCaster); + +//If caster level is 22 or higher.. +if(nCL >21) +{ +int nEL = nCL - 20; +int nDiv = nEL / 2; +nInt = nDiv + 10; //10 + 1 / 2 levels over level 10 +//(25 Max Total Missles) + +//end if Level Check +} +//If not greater than level 21, then 10 is the max level cap +else +{ +nInt = 10; +} + + DoMissileStorm(2, nInt, SPELL_ISAACS_GREATER_MISSILE_STORM); +} + diff --git a/_removed files/x0_s0_truestrike.nss b/_removed files/x0_s0_truestrike.nss new file mode 100644 index 00000000..61bea73c --- /dev/null +++ b/_removed files/x0_s0_truestrike.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Truestrike +//:: x0_s0_truestrike.nss +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* ++20 attack bonus for 9 seconds. +CHANGE: Miss chance still applies, unlike rules. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent Knowles +//:: Created On: July 15, 2002 +//::////////////////////////////////////////////// +//:: VFX Pass By: +#include "NW_I0_SPELLS" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oTarget; + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_ODD); + + + // * determine the damage bonus to apply + effect eAttack = EffectAttackIncrease(20); + + + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = eAttack; + eLink = EffectLinkEffects(eLink, eDur); + + + oTarget = OBJECT_SELF; + + //Fire spell cast at event for target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 415, FALSE)); + //Apply VFX impact and bonus effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, 18.0); + +} + diff --git a/_removed files/x0_s0_woundwhis.nss b/_removed files/x0_s0_woundwhis.nss new file mode 100644 index 00000000..4389a182 --- /dev/null +++ b/_removed files/x0_s0_woundwhis.nss @@ -0,0 +1,69 @@ +//:://///////////////////////////////////////////// +//:: Wounding Whispers +//:: x0_s0_WoundWhis.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Magical whispers cause 1d8 sonic damage to attackers who hit you. + Made the damage slightly more than the book says because we cannot + do the +1 per level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 7, 2002 +//::////////////////////////////////////////////// +//:: Modified for wounding whispers, July 30 2002, Brent +//::////////////////////////////////////////////// +//:: Last Update By: Andrew Nobbs May 01, 2003 + +#include "x2_inc_spellhook" +#include "x0_i0_spells" +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_POSITIVE); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nBonus = nDuration; + int nMetaMagic = GetMetaMagicFeat(); + object oTarget = OBJECT_SELF; + effect eShield = EffectDamageShield(d6(3) + nBonus, 0, DAMAGE_TYPE_SONIC); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + //Link effects + effect eLink = EffectLinkEffects(eShield, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 441, FALSE)); + + if (GetHasSpellEffect(GetSpellId())) + { + RemoveSpellEffects(GetSpellId(),OBJECT_SELF,OBJECT_SELF); + } + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); +} diff --git a/_removed files/x2_m1_mindblast.nss b/_removed files/x2_m1_mindblast.nss new file mode 100644 index 00000000..ff8332f4 --- /dev/null +++ b/_removed files/x2_m1_mindblast.nss @@ -0,0 +1,118 @@ +//:://///////////////////////////////////////////// +//:: Cone: Mindflayer Mind Blast +//:: x2_m1_mindblast +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* + Anyone caught in the cone must make a + Will save (DC 17) or be stunned for 3d4 rounds +*/ +//::////////////////////////////////////////////// +//:: Created By: Keith Warner +//:: Created On: Dec 5/02 +//::////////////////////////////////////////////// + +#include "x2_i0_spells" + +void main() +{ + int nSaveDC = 14 +(GetHitDice(OBJECT_SELF)/2) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); + int nDC = (GetHitDice(OBJECT_SELF)-20)+ nSaveDC; + object oTarget = GetSpellTargetObject(); + object oCaster = OBJECT_SELF; + float fRange = 15.0f; + int nDuration = d4(1)+1; + //DoMindBlast(nSaveDC, d6(10), 15.0f); + + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(oCaster)) +{ + +//Make them stop what they are doing instantly! +AssignCommand(oCaster, ClearAllActions()); + +//Though the player may show animation, nothing happens! :) +//SetModuleOverrideSpellScriptFinished(); + +FloatingTextStringOnCreature("All spells fizzle in town.", oCaster); + +return; +} + +/////////////////////////////////////////////////////////////////////////////// +//Handle Jail... +//NO ITEMS WORK IN JAIL!!! +if(GetLocalInt(GetArea(oCaster), "JAIL")==1) +{ + AssignCommand(oCaster, ClearAllActions()); + //Though the player may show animation, nothing happens! :) + //SetModuleOverrideSpellScriptFinished(); + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + + { + int nStunTime; + float fDelay; + + location lTargetLocation = GetSpellTargetLocation(); + object oTarget; + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE); + + while(GetIsObjectValid(oTarget)) + { + int nApp = GetAppearanceType(oTarget); + int bImmune = FALSE; + //---------------------------------------------------------------------- + // Hack to make mind flayers immune to their psionic attacks... + //---------------------------------------------------------------------- + if (nApp == 413 ||nApp== 414 || nApp == 415) + { + bImmune = TRUE; + } + + if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF && !bImmune ) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + // already stunned + if (GetHasSpellEffect(GetSpellId(),oTarget)) + { + // only affects the targeted object + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_STUN), oTarget); + int nDamage; + if (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)>0) + { + nDamage = d6(GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/2); + } + else + { + nDamage = d6(GetHitDice(OBJECT_SELF)/2); + } + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BIGBYS_FORCEFUL_HAND), oTarget); + } + else if (WillSave(oTarget, nDC) < 1) + { + //Calculate the length of the stun + nStunTime = nDuration; + //Set stunned effect + eCone = EffectStunned(); + eCone = SupernaturalEffect(eCone); //Hack to make it bypass immunities :) + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCone, oTarget, RoundsToSeconds(nStunTime))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE); + } +} + +} + diff --git a/_removed files/x2_p_craftskills.dlg b/_removed files/x2_p_craftskills.dlg new file mode 100644 index 0000000000000000000000000000000000000000..4066ed93081b18cb1c6161e7f43f49a527062068 GIT binary patch literal 12806 zcmbuF37AvW`NpH{`@RYo0R;g8Srio&1VnV$kxdW+6ChQb;m1*uY33Mi{8aFU}`6&2pD#sL)C;|E$aF+U+iuW~Yla?j9FoHS~pxt8qN& zV(f-$GJyJ}Z%J(P4j?vfc}^qU6i;)Fr&-}N8h@Rq+2(0>IF07r<7w(*+~#UYta)lc zXJYd+%F|478kRX!;Aw7ld9C$&FTdU8HP$XKUzJHUZyjhzU~~0z`MTr>d-(#FuSb4? zmtW`d^~pc%<#!OP7D^56ad89UeV(Qb0@HLOpexi6`VpI->7J&@#f{J`^fdPq+aB9a ztZ_8&PM4?b&_PcV=7lm%Hy2CO&&BE+>|!npjq>tSh;6Qgo@Tk1-$1PEkHre|>T-pzv ziOoZv%WDrz^zv5_%YS27?&UWS>$O#%HLFwSiq(HP=2freR8y=z+lPAn)Z~+8OE>jl zIn)%SWvcQfzgiEim2`Ta)R^LSkY0Uyk5s?b>kd%A*61!!Ui01Uj#`U6(6y>xzNJ^q z_kmiIvO~E>r>5EH`b=Z~pCVtG|IKb3ja8MxGWoCO)=>Uy5u5+o#HvI7C+d2Tf70dN z>g$9S^wxlUW!{>gkuPz)(+AhKtJBC^4`TDyli0jXr_a3U^{{p8gGSA~na1YS`uEME z(LS(o24~S|51D3c7LE3wX=Y^6Xz!ZlvMd^THO)d#qfl$2y}XDM+Z&6CD_j4iXf&p{ z#p#3Vf2-4I{Z|p&`mZLo^*8iiKN2b@?f9}!np%cp3pmam;Y zSj#@AQ7!w4t(F7CR?ABItQNh;SuH=JQOi|JJ-taejpSBKeezaIW8%tcX^zHfY47yG zS~@t5YUxC5wdh&OYFSU8)uMi@r5hTxT($J~G=42-ySa294R?7rpt7QXyR*SB;S}sAOmaCSzp2n}mo+(vJ5t_fmPJmZS{4&q zElY^4mQD0oE&hGI42_y<@qJ$B#*xn(h%57X6B_fm*6D*j*Ex-R+B3BL-9z4dZsk0a z&j-+`1${n9UiHf7BgB>Yd>oDWeA?-QKA&+K`Fx(()^jVd`P@#Q`IOG~#x^u+wl~b% z%j7Hb_8J=V_KwpBy}j!+n)7{P^Y#I;dD}ssc~j23eS}6W=xq=A%DjDs#=Pxw`k=RO zoJQUb5SzE}iOt(C`plc2SIpZ_Xw-t<4w0|STNVCeHg64xr4M@3XE15xttqj2YesC| z_RweE^!#MrTA@)3dTUL-GH>nBn71xYAN1DMY2>X3v3cuBY~J?LXWkBbc0!{jZ~pz; zm%Qoy`~8e8`ZLLEUfoCMxNCDgZ=Z+8>Kftn!Ma8|jp`apY;}zzwz~GyXFmP9CZbUb z)-{Q|>HWHeXy2<)2NnWVyh)ZY_-^PyY`M>i$2e*1#2lK zpQ)BBv*@oPZ*^VmuFX}~5;RuVjZPn|>n5jBUAGZiT`P&Lu7+$Z#m%58u{`IRca0lU zbH79^eQ@4wPNR9Z6WhG65o@mIkniRSewKL?jhfw$mHBzg%_Tqjek7BhZ=6Pc4iKB4 z?}^P%!BN!ylN(2KoyA0%=IT#U{hDh4vCTD**ybwoYWLrZhG;;VU%UGK_tNoMG#Xp; z>b{wkMI%q9nV&_Yw`$W|n?aLnZ!ATxYsD?Zx;(fyZgm=YSw(E?vzpk}=UQ)lSn_f| zYc(LvU!Pol*15Ul=V4-99`v)>Y2@cQV)L_w*!-;U{P>?qU(|rK;JyDgd3EWvlRsO} z_p<1BIeo5LcB8Si-RtzhT0VCg)$%2=)$$dw)w0H`g><>MZ*@XD+O_=-z4@ua2W(v) z^wX5QH1gAu*!;92Hb3hC(dTjV4R(gmD8w}Z;7pz?})9Ion9?^M%0+vw?Cj!JKD89=;qS(HF=RTt!*pv>X)Ck#O9|R zvH98U`SJH{do*gkpWypI?+lt;YpA~y*cuKX&g6NZ)5!A>V)J}Hv3cI>c~-xz;e}|_ ze9yW3T;%4`^%ICQ`I+c6@-v0l{7fY_Kl*OU_M6qG*EE7g?P&eXaC2#lIB_OF38#^t zVq){7zpt2|gPtGlQCpt{Xw;6@PpO+r*Dof{rj^K%`s`KjtYduspq&+|8+ zQ9D{cE8JZ2vxYd6pWB^Ae(oeTKX(zEpSqqO{~7FFG-~q05~i=!_ssW^*Ic>w(nDzE zOFZfH!S@IKeM|lFwu#uhZ6-EvO);dn1=!zNwQg#Q!8^9Lp3^P&9oSBNvi&i9t6%U#dE2tPTFBYHc z&zWAj^3lrb_s1WbiX>C9_-vEZTF`6S%-FPOJij8+Y>PmDE7Sf_y9|bPDh!WJB$K7x z!ZS)z;X%pBEDaT&6DbbQh(_b#{8({hMnN<`oQQ{0b7IBe!bE;aL9|=AG*J>RjFg5; zilcNy!(&*4@bGB7B%De}6q{8Vj-{f7or=SeB3_|nBtA1*+&w*W`k#igc-5xOOvLkJ zdf6id>Fgl>^-cEXd{SVlQG>!0BJuq2{5i3ibHaFv#bqbSQ5z+ZEcK>IkE+|_r*UP4 z*C|_`Vy#-bGyPBfvh3_=N~TXe{Iu8Mr@aq9?Q{5P-||5<>mfI5c{0?%&6G&ZP88%% zJ6s;R*j^pGARzB!`SdM+Ol5K{Us;oxV=I&QGIe_NDwWAkJxpHp2>D^%)pB=N&)hBB zHL`cr%-&TidspquU5DANlS3m@b#wGBcRH#iQZ*v4VndocGftw|BUh zDY>l^=^J>|pzhvn(~w;nE1Xu8C@3vVB#Y+c+dhn@W<>INf0clD8E%+(B9cVoC+0^Z zMTzth)IVYg(&+{+?Ji1JtQ)W5Zm1Y;RwPzXlB{^c)XFx@JZz&Z!&clixrc3>dDtdd zhOM}}au3@y^RUgb3|ny*<{q|r=3!f88MfkXJ#tvBY0J#RX}i+vH>v;MX$`1>S{*s9 zy7WG%Cm? zpl>+!&13p0hGQ#e4aY$nXbZaEj)yRu0PUdzbc7S(B+#AQ8FYVjfv(UEP66FVJ)kFO z)%AjEuV@=;ho1(gLqE{{dM2C&{o!ml2Xy}rfPrux=s(86Fa*wrp>P2VgA3sz$b;c9 z0!G3p7!6}!ER2JTVLVKLi7*K!!zC~UroyE#4W>f`X249)Gm7rRSuh*sKn#8cb3y-w z7eX8ophvFDAPL2gf)bbq^FdEVrSNmO9Ik*X;VSqAEQCdHHT)8;fyJ-{eg)UUQdkDp z!E*RDTn{(E3iu7&2sgpaa0}cDx4}yIEv$moum*02J76uWgFE3axEt2PJ#a7F2lvAR z@E|+{55w=^5qK0fz+><@{2rcwKfoX1N!SQa!JpvIun9K9)9?&D3(vt8cpkRG3-BVm z1l!UJoOK1hH;W%gm zZJ{0LS5RR%0op?c=m;mmNze&ShAyCAMsQ=mou@5A=o8;B@E*XTX_o z7W9X+;T$*@2Eaf#4+g8vu7E4yD)!OH_zm0$H^I$t3)~8~ z!Akfotb*0B25yHtU@feJJK-+48`i@;a4*~k_rnA5AUp&Q!|&h`coa6kWAHfq9-e?d zz#rjB*a%O-pWx512{yyi@C-Z)&%qXW9=5^@@FKhf+u&t*1zv^i@EW`he}OmPO?V6b z3OnF$@OO9{cEUUGF1!c3;2-cld;q)QL-;3r1bg6P_yj(M&){G1Z}<=Fh0o!?@IUwh zzJ#yfYuE?hz_;)n?1uyJJ^TO%;Yauh4uSsjKL(D4Dxhy_szG(A0X3l()P_2sZ%*_} zDg7#{0W^e0pkGEc0eySX4D>6g7NBo1T0v_#4%$FlXa~nb7)}8FQmO-VgcIQ;&@ZF( zi>Q;K3+R_mr$FPfx2*K@N_FD;&3q02~LJ?&;xn_!=Ht}Z@>V|N$#20) + { + nStat =20; + } + + if (nStat <1) + { + nStat = 0; + } + } + + object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED); + // Make the blade require concentration + SetLocalInt(oSummon,"X2_L_CREATURE_NEEDS_CONCENTRATION",TRUE); + SetPlotFlag (oSummon,TRUE); + object oWeapon; + //Create item on the creature, epuip it and add properties. + oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oSummon); + if (nStat > 0) + { + IPSetWeaponEnhancementBonus(oWeapon, nStat); + } + SetDroppableFlag(oWeapon, FALSE); +} + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nDuration = GetCasterLevel(OBJECT_SELF); + effect eSummon = EffectSummonCreature("blackblade01"); + effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); + //Make metamagic check for extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2;//Duration is +100% + } + //Apply the VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); + DelayCommand(1.5, spellsCreateItemForSummoned()); +} diff --git a/_removed files/x2_s0_blckstff.nss b/_removed files/x2_s0_blckstff.nss new file mode 100644 index 00000000..b3254728 --- /dev/null +++ b/_removed files/x2_s0_blckstff.nss @@ -0,0 +1,89 @@ +//:://///////////////////////////////////////////// +//:: Blackstaff +//:: X2_S0_Blckstff +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Adds +4 enhancement bonus, On Hit: Dispel. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 29, 2002 +//::////////////////////////////////////////////// +//:: Updated by Andrew Nobbs May 07, 2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller +//:: 2003-07-15: Complete Rewrite to make use of Item Property System + +#include "nw_i0_spells" +#include "x2_i0_spells" + +#include "x2_inc_spellhook" + + +void AddBlackStaffEffectOnWeapon (object oTarget, float fDuration) +{ + IPSafeAddItemProperty(oTarget, ItemPropertyEnhancementBonus(8), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE, TRUE); + IPSafeAddItemProperty(oTarget, ItemPropertyOnHitProps(IP_CONST_ONHIT_DISPELMAGIC, IP_CONST_ONHIT_SAVEDC_16), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING ); + IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_EVIL), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE ); + return; +} + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + + object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon(); + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration * 2; //Duration is +100% + } + + if(GetIsObjectValid(oMyWeapon) ) + { + SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + if (GetBaseItemType(oMyWeapon) == BASE_ITEM_QUARTERSTAFF) + { + if (nDuration>0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration)); + AddBlackStaffEffectOnWeapon(oMyWeapon, RoundsToSeconds(nDuration)); + } + return; + } + else + { + FloatingTextStrRefOnCreature(83620, OBJECT_SELF); // not a qstaff + return; + } + } + else + { + FloatingTextStrRefOnCreature(83615, OBJECT_SELF); + return; + } +} diff --git a/_removed files/x2_s0_combust.nss b/_removed files/x2_s0_combust.nss new file mode 100644 index 00000000..12e304ed --- /dev/null +++ b/_removed files/x2_s0_combust.nss @@ -0,0 +1,214 @@ +//:://///////////////////////////////////////////// +//:: Combust +//:: X2_S0_Combust +//:: Copyright (c) 2000 Bioware Corp. +//::////////////////////////////////////////////// +/* + The initial eruption of flame causes 2d6 fire damage +1 + point per caster level(maximum +10) + with no saving throw. + + Further, the creature must make + a Reflex save or catch fire taking a further 1d6 points + of damage. This will continue until the Reflex save is + made. + + There is an undocumented artificial limit of + 10 + casterlevel rounds on this spell to prevent + it from running indefinitly when used against + fire resistant creatures with bad saving throws + +*/ +//::////////////////////////////////////////////// +// Created: 2003/09/05 Georg Zoeller +//::////////////////////////////////////////////// + +#include "x2_I0_SPELLS" +#include "x2_inc_toollib" +#include "x2_inc_spellhook" + +void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic); + +void main() +{ + + object oTarget = GetSpellTargetObject(); + object oCaster = OBJECT_SELF; + + //-------------------------------------------------------------------------- + // Spellcast Hook Code + // Added 2003-06-20 by Georg + // If you want to make changes to all spells, check x2_inc_spellhook.nss to + // find out more + //-------------------------------------------------------------------------- + if (!X2PreSpellCastCode()) + { + return; + } + // End of Spell Cast Hook + + //-------------------------------------------------------------------------- + // Calculate the save DC + //-------------------------------------------------------------------------- + //Epic DC Bonus Added + int nDB; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDB = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = + " + IntToString(nDB) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDB = 0; + } + int nDC = GetSpellSaveDC() + nDB; + int nLevel = GetCasterLevel(OBJECT_SELF); + + + //-------------------------------------------------------------------------- + // Calculate the damage, 2d6 + casterlevel, capped at +10 + //-------------------------------------------------------------------------- + int nDamage = GetCasterLevel(OBJECT_SELF); + if (nDamage > 20) + { + nDamage = 20; + } + int nMetaMagic = GetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage += 12;//Damage is at max + } + else + { + nDamage += d6(2); + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + } + + //-------------------------------------------------------------------------- + // Calculate the duration (we need a duration or bad things would happen + // if someone is immune to fire but fails his safe all the time) + //-------------------------------------------------------------------------- + int nDuration = 10 + GetCasterLevel(OBJECT_SELF); + if (nDuration < 1) + { + nDuration = 10; + } + + //-------------------------------------------------------------------------- + // Setup Effects + //-------------------------------------------------------------------------- + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + effect eDur = EffectVisualEffect(498); + + if(!GetIsReactionTypeFriendly(oTarget)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + //----------------------------------------------------------------------- + // Check SR + //----------------------------------------------------------------------- + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + + //------------------------------------------------------------------- + // Apply VFX + //------------------------------------------------------------------- + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + TLVFXPillar(VFX_IMP_FLAME_M, GetLocation(oTarget), 5, 0.1f,0.0f, 2.0f); + + //------------------------------------------------------------------ + // This spell no longer stacks. If there is one of that type, + // that's enough + //------------------------------------------------------------------ + if (GetHasSpellEffect(GetSpellId(),oTarget) || GetHasSpellEffect(SPELL_INFERNO,oTarget) ) + { + FloatingTextStrRefOnCreature(100775,OBJECT_SELF,FALSE); + return; + } + + //------------------------------------------------------------------ + // Apply the VFX that is used to track the spells duration + //------------------------------------------------------------------ + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration)); + + //------------------------------------------------------------------ + // Save the spell save DC as a variable for later retrieval + //------------------------------------------------------------------ + SetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST), nDC); + + //------------------------------------------------------------------ + // Tick damage after 6 seconds again + //------------------------------------------------------------------ + DelayCommand(6.0, RunCombustImpact(oTarget,oCaster,nLevel, nMetaMagic)); + } + } +} + +void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic) +{ + //-------------------------------------------------------------------------- + // Check if the spell has expired (check also removes effects) + //-------------------------------------------------------------------------- + if (GZGetDelayedSpellEffectsExpired(SPELL_COMBUST,oTarget,oCaster)) + { + return; + } + + if (GetIsDead(oTarget) == FALSE) + { + + int nDC = GetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST)); + + if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE)) + { + //------------------------------------------------------------------ + // Calculate the damage, 1d6 + casterlevel, capped at +10 + //------------------------------------------------------------------ + int nDamage = nLevel; + if (nDamage > 20) + { + nDamage = 20; + } + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage += 6; + } + else + { + nDamage += d6(); + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2); + } + } + + effect eDmg = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); + effect eVFX = EffectVisualEffect(VFX_IMP_FLAME_S); + + ApplyEffectToObject(DURATION_TYPE_INSTANT,eDmg,oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT,eVFX,oTarget); + + //------------------------------------------------------------------ + // After six seconds (1 round), check damage again + //------------------------------------------------------------------ + DelayCommand(6.0f,RunCombustImpact(oTarget,oCaster, nLevel,nMetaMagic)); + } + else + { + DeleteLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST)); + GZRemoveSpellEffects(SPELL_COMBUST, oTarget); + } + + } + +} + + + + + diff --git a/_removed files/x2_s0_crshadow.nss b/_removed files/x2_s0_crshadow.nss new file mode 100644 index 00000000..3b4e8e73 --- /dev/null +++ b/_removed files/x2_s0_crshadow.nss @@ -0,0 +1,63 @@ +//:://///////////////////////////////////////////// +//:: Create Undead +//:: x2_s0_CrShadow.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spell will summon a shadow - 20% of the time, + the shadow will be hostile to the summoner. +*/ +//::////////////////////////////////////////////// +//:: Created By: Keith Warner +//:: Created On: Jan 2/03 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + int nMetaMagic = GetMetaMagicFeat(); + int nCasterLevel = GetCasterLevel(OBJECT_SELF); + int nDuration = nCasterLevel; + nDuration = 24; + effect eSummon; + + //Check for metamagic extend + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Set the summoned undead to the appropriate template based on the caster level + if (d100() > 20) + { + eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); + } + else + { + eSummon = EffectSummonCreature("x2shfiendfoe",VFX_FNF_SUMMON_UNDEAD); + } + + + //Apply VFX impact and summon effect + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); +} + diff --git a/_removed files/x2_s0_dtharm.nss b/_removed files/x2_s0_dtharm.nss new file mode 100644 index 00000000..dc978748 --- /dev/null +++ b/_removed files/x2_s0_dtharm.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Death Armor +//:: X2_S0_DthArm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + You are surrounded with a magical aura that injures + creatures that contact it. Any creature striking + you with its body or handheld weapon takes 1d4 points + of damage +1 point per 2 caster levels (maximum +5). +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Jan 6, 2003 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs, 02/06/2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller + +#include "x2_inc_spellhook" +#include "x0_i0_spells" + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + object oTarget = GetSpellTargetObject(); + + int nDuration = GetCasterLevel(oTarget); + int nCasterLvl = GetCasterLevel(oTarget)/2; + if(nCasterLvl > 10) + { + nCasterLvl = 10; + } + int nMetaMagic = GetMetaMagicFeat(); + + effect eShield = EffectDamageShield(nCasterLvl, DAMAGE_BONUS_1d8, DAMAGE_TYPE_MAGICAL); + effect eDur = EffectVisualEffect(463); + + //Link effects + effect eLink = EffectLinkEffects(eShield, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + + //Stacking Spellpass, 2003-07-07, Georg + RemoveEffectsFromSpell(oTarget, GetSpellId()); + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); +} + diff --git a/_removed files/x2_s0_elecloop.nss b/_removed files/x2_s0_elecloop.nss new file mode 100644 index 00000000..72006fae --- /dev/null +++ b/_removed files/x2_s0_elecloop.nss @@ -0,0 +1,157 @@ +//:://///////////////////////////////////////////// +//:: Gedlee's Electric Loop +//:: X2_S0_ElecLoop +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + You create a small stroke of lightning that + cycles through all creatures in the area of effect. + The spell deals 1d6 points of damage per 2 caster + levels (maximum 5d6). Those who fail their Reflex + saves must succeed at a Will save or be stunned + for 1 round. + + Spell is standard hostile, so if you use it + in hardcore mode, it will zap yourself! + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: Oct 19 2003 +//::////////////////////////////////////////////// + + +#include "x2_I0_SPELLS" +#include "x2_inc_spellhook" + +void main() +{ + + //-------------------------------------------------------------------------- + // Spellcast Hook Code + // Added 2003-06-20 by Georg + // If you want to make changes to all spells, check x2_inc_spellhook.nss to + // find out more + //-------------------------------------------------------------------------- + if (!X2PreSpellCastCode()) + { + return; + } + // End of Spell Cast Hook + + + location lTarget = GetSpellTargetLocation(); + effect eStrike = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + int nMetaMagic = GetMetaMagicFeat(); + float fDelay; + effect eBeam; + int nDamage; + int nPotential; + effect eDam; + object oLastValid; + effect eStun = EffectLinkEffects(EffectVisualEffect(VFX_IMP_STUN),EffectStunned()); + + //Epic DC Bonus Added + int nDC; + int nAdjs; + nAdjs = GetCasterLevel(OBJECT_SELF) - 20; + if(GetCasterLevel(OBJECT_SELF)>=23) + { + nDC = nAdjs/3; + SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = +" + IntToString(nDC) + " DC"); + } + else if(GetCasterLevel(OBJECT_SELF) <=22) + { + nDC = 0; + } + + //-------------------------------------------------------------------------- + // Calculate Damage Dice. 1d per 2 caster levels, max 5d + //-------------------------------------------------------------------------- + int nNumDice = GetCasterLevel(OBJECT_SELF)/2; + if (nNumDice<1) + { + nNumDice = 1; + } + else if (nNumDice >10) + { + nNumDice = 10; + } + + //-------------------------------------------------------------------------- + // Loop through all targets + //-------------------------------------------------------------------------- + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE); + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + //------------------------------------------------------------------ + // Calculate delay until spell hits current target. If we are the + // first target, the delay is the time until the spell hits us + //------------------------------------------------------------------ + if (GetIsObjectValid(oLastValid)) + { + fDelay += 0.2f; + fDelay += GetDistanceBetweenLocations(GetLocation(oLastValid), GetLocation(oTarget))/20; + } + else + { + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + } + + //------------------------------------------------------------------ + // If there was a previous target, draw a lightning beam between us + // and iterate delay so it appears that the beam is jumping from + // target to target + //------------------------------------------------------------------ + if (GetIsObjectValid(oLastValid)) + { + eBeam = EffectBeam(VFX_BEAM_LIGHTNING, oLastValid, BODY_NODE_CHEST); + DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam,oTarget,1.5f)); + } + + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + + nPotential = MaximizeOrEmpower(6, nNumDice, nMetaMagic); + nDamage = GetReflexAdjustedDamage(nPotential, oTarget, GetSpellSaveDC() + nDC, SAVING_THROW_TYPE_ELECTRICITY); + + //-------------------------------------------------------------- + // If we failed the reflex save, we save vs will or are stunned + // for one round + //-------------------------------------------------------------- + if (nPotential == nDamage || (GetHasFeat(FEAT_IMPROVED_EVASION,oTarget) && nDamage == (nPotential/2))) + { + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay)) + { + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eStun,oTarget, RoundsToSeconds(1))); + } + + } + + + if (nDamage >0) + { + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eStrike, oTarget)); + } + } + + //------------------------------------------------------------------ + // Store Target to make it appear that the lightning bolt is jumping + // from target to target + //------------------------------------------------------------------ + oLastValid = oTarget; + + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE ); + } + +} + + diff --git a/_removed files/x2_s0_glphwardx.nss b/_removed files/x2_s0_glphwardx.nss new file mode 100644 index 00000000..8a29670d --- /dev/null +++ b/_removed files/x2_s0_glphwardx.nss @@ -0,0 +1,117 @@ +//:://///////////////////////////////////////////// +//:: Glyph of Warding Heartbet +//:: x2_o0_glyphhb +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Default Glyph of warding damage script + + This spellscript is fired when someone triggers + a player cast Glyph of Warding + + + Check x2_o0_hhb.nss and the Glyph of Warding + placeable object for details + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-09-02 +//::////////////////////////////////////////////// + +#include "x0_i0_spells" +#include "epicdc_inc" + +void DoDamage(int nDamage, object oTarget) +{ + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + if(nDamage > 0) + { + //Apply VFX impact and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } +} + +void main() +{ + + //Declare major variables + object oTarget = GetLocalObject(OBJECT_SELF,"X2_GLYPH_LAST_ENTER"); + location lTarget = GetLocation(OBJECT_SELF); + effect eDur = EffectVisualEffect(445); + int nDamage; + int nCasterLevel = GetLocalInt(OBJECT_SELF,"X2_PLC_GLYPH_CASTER_LEVEL"); + int nMetaMagic = GetLocalInt(OBJECT_SELF,"X2_PLC_GLYPH_CASTER_METAMAGIC"); + object oCreator = GetLocalObject(OBJECT_SELF,"X2_PLC_GLYPH_CASTER") ; + + if ( GetLocalInt (OBJECT_SELF,"X2_PLC_GLYPH_PLAYERCREATED") == 0 ) + { + oCreator = OBJECT_SELF; + } + + if (!GetIsObjectValid(oCreator)) + { + DestroyObject(OBJECT_SELF); + return; + } + + int nDice = nCasterLevel /2; + + if (nDice > 10) + nDice = 10; + else if (nDice <1 ) + nDice = 1; + + effect eDam; + effect eExplode = EffectVisualEffect(459); + + //Check the faction of the entering object to make sure the entering object is not in the casters faction + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Cycle through the targets in the explosion area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + while(GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,oCreator)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oCreator, GetSpellId())); + //Make SR check + if (!MyResistSpell(oCreator, oTarget)) + { + nDamage = d8(nDice); + //Enter Metamagic conditions + + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 8 * 10;//Damage is at max + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% + } + + //Change damage according to Reflex, Evasion and Improved Evasion +5 DC Added + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC() + 5, SAVING_THROW_TYPE_SONIC, oCreator); + + + //---------------------------------------------------------- + // Have the creator do the damage so he gets feedback strings + //---------------------------------------------------------- + if (oCreator != OBJECT_SELF) + { + AssignCommand(oCreator, DoDamage(nDamage,oTarget)); + } + else + { + DoDamage(nDamage,oTarget); + } + + } + } + //Get next target in the sequence + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} diff --git a/_removed files/x2_s0_grmagweap.nss b/_removed files/x2_s0_grmagweap.nss new file mode 100644 index 00000000..0086922b --- /dev/null +++ b/_removed files/x2_s0_grmagweap.nss @@ -0,0 +1,89 @@ +//:://///////////////////////////////////////////// +//:: Greater Magic Weapon +//:: X2_S0_GrMagWeap +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Grants a +1 enhancement bonus per 3 caster levels + (maximum of +5). + lasts 1 hour per level +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 28, 2002 +//::////////////////////////////////////////////// +//:: Updated by Andrew Nobbs May 08, 2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller +//:: 2003-07-17: Complete Rewrite to make use of Item Property System + + +#include "nw_i0_spells" +#include "x2_i0_spells" + +#include "x2_inc_spellhook" + +void AddGreaterEnhancementEffectToWeapon(object oMyWeapon, float fDuration, int nBonus) +{ + IPSafeAddItemProperty(oMyWeapon,ItemPropertyEnhancementBonus(nBonus), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + return; +} + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + + //Declare major variables + effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + int nDuration = GetCasterLevel(OBJECT_SELF); + int nCasterLvl = nDuration / 3; + int nMetaMagic = GetMetaMagicFeat(); + + //Limit nCasterLvl to 5, so it max out at +5 enhancement to the weapon. + if(nCasterLvl > 8) + { + nCasterLvl = 8; + } + + object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon(); + + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration * 2; //Duration is +100% + } + + if(GetIsObjectValid(oMyWeapon) ) + { + SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + if (nDuration>0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), HoursToSeconds(nDuration)); + AddGreaterEnhancementEffectToWeapon(oMyWeapon, (HoursToSeconds(nDuration)), nCasterLvl); + + } + return; + } + else + { + FloatingTextStrRefOnCreature(83615, OBJECT_SELF); + return; + } +} diff --git a/_removed files/x2_s0_horiboom.nss b/_removed files/x2_s0_horiboom.nss new file mode 100644 index 00000000..66be8d8f --- /dev/null +++ b/_removed files/x2_s0_horiboom.nss @@ -0,0 +1,90 @@ +//:://///////////////////////////////////////////// +//:: Horizikaul's Boom +//:: X2_S0_HoriBoom +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// You blast the target with loud and high-pitched +// sounds. The target takes 1d4 points of sonic +// damage per two caster levels (maximum 5d4) and +// must make a Will save or be deafened for 1d4 +// rounds. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 22, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs, 02/06/2003 + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) + object oTarget = GetSpellTargetObject(); + int nCasterLvl = GetCasterLevel(OBJECT_SELF)/2; + int nRounds = d4(1); + int nMetaMagic = GetMetaMagicFeat(); + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eDeaf = EffectDeaf(); + + //Minimum caster level of 1, maximum of 15. + if(nCasterLvl == 0) + { + nCasterLvl = 1; + } + else if (nCasterLvl > 5) + { + nCasterLvl = 5; + } + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + if(!MyResistSpell(OBJECT_SELF, oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Roll damage + int nDam = d4(nCasterLvl); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDam = 4 * nCasterLvl; //Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDam = nDam + nDam/2; //Damage/Healing is +50% + } + //Set damage effect + effect eDam = EffectDamage(nDam, DAMAGE_TYPE_SONIC); + //Apply the MIRV and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, RoundsToSeconds(nRounds)); + } + } + } +} diff --git a/_removed files/x2_s0_monregen.nss b/_removed files/x2_s0_monregen.nss new file mode 100644 index 00000000..55f82a65 --- /dev/null +++ b/_removed files/x2_s0_monregen.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Monstrous Regeneration +//:: X2_S0_MonRegen +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Grants the selected target 3 HP of regeneration + every round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 25, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 09, 2003 +//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller + +#include "x2_inc_spellhook" +#include "x0_i0_spells" + +void main() +{ + + + //-------------------------------------------------------------------------- + // Spellcast Hook Code + // Added 2003-06-20 by Georg + // If you want to make changes to all spells, check x2_inc_spellhook.nss to + // find out more + //-------------------------------------------------------------------------- + if (!X2PreSpellCastCode()) + { + return; + } + // End of Spell Cast Hook + + + object oTarget = GetSpellTargetObject(); + + /* Bug fix 21/07/03: Andrew. Lowered regen to 3 HP per round, instead of 10. */ + effect eRegen = EffectRegenerate(6, 6.0); + + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects(eRegen, eDur); + + int nMeta = GetMetaMagicFeat(); + int nLevel = (GetCasterLevel(OBJECT_SELF)/2)+1; + + if (nMeta == METAMAGIC_EXTEND) + { + nLevel *= 2; + } + + // Stacking Spellpass, 2003-07-07, Georg ... just in case + RemoveEffectsFromSpell(oTarget, GetSpellId()); + + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + + //Apply effects and VFX + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + +} diff --git a/_removed files/x2_s0_scntsphere.nss b/_removed files/x2_s0_scntsphere.nss new file mode 100644 index 00000000..a3593b37 --- /dev/null +++ b/_removed files/x2_s0_scntsphere.nss @@ -0,0 +1,105 @@ +//:://///////////////////////////////////////////// +//:: Scintillating Sphere +//:: X2_S0_ScntSphere +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* +// A scintillating sphere is a burst of electricity +// that detonates with a low roar and inflicts 1d6 +// points of damage per caster level (maximum of 10d6) +// to all creatures within the area. Unattended objects +// also take damage. The explosion creates almost no pressure. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 25 , 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs, 02/06/2003 + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + + //Declare major variables + object oCaster = OBJECT_SELF; + int nCasterLvl = GetCasterLevel(oCaster); + int nMetaMagic = GetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eExplode = EffectVisualEffect(459); + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eDam; + + //Get the spell target location as opposed to the spell target. + location lTarget = GetSpellTargetLocation(); + //Limit Caster level for the purposes of damage + if (nCasterLvl > 15) + { + nCasterLvl = 15; + } + //Apply the fireball explosion at the location captured above. + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + //Declare the spell shape, size and the location. Capture the first target object in the shape. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + //Cycle through the targets within the spell shape until an invalid object is captured. + while (GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Get the distance between the explosion and the target to calculate delay + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) + { + //Roll damage for each target + nDamage = d6(nCasterLvl); + //Resolve metamagic + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nDamage = 6 * nCasterLvl; + } + else if (nMetaMagic == METAMAGIC_EMPOWER) + { + nDamage = nDamage + nDamage / 2; + } + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } +} + diff --git a/_removed files/x2_s0_stneholda.nss b/_removed files/x2_s0_stneholda.nss new file mode 100644 index 00000000..9394692a --- /dev/null +++ b/_removed files/x2_s0_stneholda.nss @@ -0,0 +1,55 @@ +//:://///////////////////////////////////////////// +//:: Stonehold +//:: X2_S0_StneholdA +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates an area of effect that will cover the + creature with a stone shell holding them in + place. +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: August 2003 +//:: Updated : October 2003 +//::////////////////////////////////////////////// + + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + //Declare major variables + int nRounds; + effect eHold = EffectParalyze(); + effect eDur = EffectVisualEffect(476 ); + effect eFind; + object oTarget; + object oCreator; + float fDelay; + int nMetaMagic = GetMetaMagicFeat(); + + effect eLink = EffectLinkEffects(eDur,eHold); + //Get the first object in the persistant area + oTarget = GetEnteringObject(); + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STONEHOLD)); + //Make a SR check + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + //Make a Will Save + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_SPELL)) + { + nRounds = MaximizeOrEmpower(6, 1, nMetaMagic); + fDelay = GetRandomDelay(0.45, 1.85); + //Apply the VFX impact and linked effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nRounds))); + } + } + } +} diff --git a/_removed files/x2_s0_stneholdc.nss b/_removed files/x2_s0_stneholdc.nss new file mode 100644 index 00000000..b7669662 --- /dev/null +++ b/_removed files/x2_s0_stneholdc.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Stonehold +//:: X2_S0_StneholdC +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creates an area of effect that will cover the + creature with a stone shell holding them in + place. +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: May 04, 2002 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void main() +{ + + //Declare major variables + int nRounds; + int nMetaMagic = GetMetaMagicFeat(); + effect eHold = EffectParalyze(); + effect eDur = EffectVisualEffect(476 ); + eHold = EffectLinkEffects(eDur, eHold); + effect eFind; + object oTarget; + object oCreator; + float fDelay; + + //-------------------------------------------------------------------------- + // GZ 2003-Oct-15 + // When the caster is no longer there, all functions calling + // GetAreaOfEffectCreator will fail. + //-------------------------------------------------------------------------- + if (!GetIsObjectValid(GetAreaOfEffectCreator())) + { + DestroyObject(OBJECT_SELF); + return; + } + + oTarget = GetFirstInPersistentObject(); + while(GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STONEHOLD)); + if (!GetHasSpellEffect(SPELL_STONEHOLD,oTarget)) + { + if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) + { + if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_SPELL)) + { + nRounds = MaximizeOrEmpower(6, 1, nMetaMagic); + fDelay = GetRandomDelay(0.75, 1.75); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHold, oTarget, RoundsToSeconds(nRounds))); + } + } + } + } + oTarget = GetNextInPersistentObject(); + } +} diff --git a/_removed files/x2_s0_undeath.nss b/_removed files/x2_s0_undeath.nss new file mode 100644 index 00000000..706e3715 --- /dev/null +++ b/_removed files/x2_s0_undeath.nss @@ -0,0 +1,155 @@ +//:://///////////////////////////////////////////// +//:: Undeath to Death +//:: X2_S0_Undeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + + This spell slays 1d4 HD worth of undead creatures + per caster level (maximum 20d4). Creatures with + the fewest HD are affected first; + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: August 13,2003 +//::////////////////////////////////////////////// + + +#include "NW_I0_SPELLS" +#include "x0_i0_spells" +#include "x2_inc_toollib" +#include "x2_inc_spellhook" +#include "epicdc_inc" + +void DoUndeadToDeath(object oCreature) +{ + SignalEvent(oCreature, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + SetLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD", TRUE); + + if (!MySavingThrow(SAVING_THROW_WILL,oCreature, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_NONE,OBJECT_SELF)) + { + float fDelay = GetRandomDelay(0.2f,0.4f); + if (!MyResistSpell(OBJECT_SELF, oCreature, fDelay)) + { + effect eDeath = EffectDamage(GetCurrentHitPoints(oCreature),DAMAGE_TYPE_DIVINE,DAMAGE_POWER_ENERGY); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + DelayCommand(fDelay+0.5f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oCreature)); + DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oCreature)); + } + else + { + DelayCommand(1.0f,DeleteLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD")); + } + } + else + { + DelayCommand(1.0f,DeleteLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD")); + } +} + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-07-07 by Georg Zoeller + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + int nMetaMagic = GetMetaMagicFeat(); + + +// End of Spell Cast Hook + + // Impact VFX + location lLoc = GetSpellTargetLocation(); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_STRIKE_HOLY),lLoc); + TLVFXPillar(VFX_FNF_LOS_HOLY_20, lLoc,3,0.0f); + + + // build list with affected creatures + + // calculation + int nLevel = GetCasterLevel(OBJECT_SELF); + if (nLevel>30) + { + nLevel = 30; + } + + // calculate number of hitdice affected + int nLow = 9999; + object oLow; + int nHDLeft = nLevel *d4(); + //Enter Metamagic conditions + if (nMetaMagic == METAMAGIC_MAXIMIZE) + { + nHDLeft = 4 * GetCasterLevel(OBJECT_SELF);//Damage is at max + } + if (nMetaMagic == METAMAGIC_EMPOWER) + { + nHDLeft += (nHDLeft/2); //Damage/Healing is +50% + } + + int nCurHD; + object oFirst = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f,lLoc ); + + // Only start loop if there is a creature in the area of effect + if (GetIsObjectValid(oFirst)) + { + + object oTarget = oFirst; + while (GetIsObjectValid(oTarget) && nHDLeft >0) + { + + if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) + { + nCurHD = GetHitDice(oTarget); + if (nCurHD <= nHDLeft ) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + // ignore creatures already affected + if (GetLocalInt(oTarget,"X2_EBLIGHT_I_AM_DEAD") == 0 && !GetPlotFlag(oTarget) && !GetIsDead(oTarget)) + { + // store the creature with the lowest HD + if (GetHitDice(oTarget) <= nLow) + { + nLow = GetHitDice(oTarget); + oLow = oTarget; + } + } + } + } + } + + // Get next target + oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f ,lLoc); + + // End of cycle, time to kill the lowest creature + if (!GetIsObjectValid(oTarget)) + { + // we have a valid lowest creature we can affect with the remaining HD + if (GetIsObjectValid(oLow) && nHDLeft >= nLow) + { + DoUndeadToDeath(oLow); + // decrement remaining HD + nHDLeft -= nLow; + // restart the loop + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, GetSpellTargetLocation()); + } + // reset counters + oLow = OBJECT_INVALID; + nLow = 9999; + } + } + } + } diff --git a/_removed files/x2_s1_chaosspit.nss b/_removed files/x2_s1_chaosspit.nss new file mode 100644 index 00000000..0b5c097b --- /dev/null +++ b/_removed files/x2_s1_chaosspit.nss @@ -0,0 +1,90 @@ +//:://///////////////////////////////////////////// +//:: Slaad Chaos Spittle +//:: x2_s1_chaosspit +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. + + Damage is 20d4 for black slaad, 10d4 for white + slaad and hd/2 d4 for any other creature this + spell is assigned to + + A shifter will do his shifter level /3 d6 + points of damage + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: Sept 08 , 2003 +//::////////////////////////////////////////////// +#include "x0_i0_spells" +#include "NW_I0_SPELLS" +void main() +{ + //Declare major variables + object oTarget = GetSpellTargetObject(); + int nHD = GetHitDice(OBJECT_SELF); + effect eVis = EffectVisualEffect(VFX_IMP_ACID_L); + effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt; + int nCount; + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + if (GetIsPC(OBJECT_SELF)) + { + nCount = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3) + 2 ; + } + else if (GetAppearanceType(OBJECT_SELF) == 426) // black slaad = 20d6 + { + nCount = 20 ; + } + else if (GetAppearanceType(OBJECT_SELF) == 427) // white slaad = 10d6 + { + nCount = 10 ; + } + else + { + nCount = nHD /2; + } + + if (nCount == 0) + { + nCount = 1; + } + + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + int nDamage = d4(nCount); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } + } + } +} diff --git a/_removed files/x2_s1_petrgaze.nss b/_removed files/x2_s1_petrgaze.nss new file mode 100644 index 00000000..994ccd23 --- /dev/null +++ b/_removed files/x2_s1_petrgaze.nss @@ -0,0 +1,92 @@ +//:://///////////////////////////////////////////// +//:: Gaze attack for shifter forms +//:: x2_s1_petrgaze +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + + Petrification gaze for polymorph type + basilisk and medusa + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: July, 09, 2003 +//::////////////////////////////////////////////// + +#include "x0_i0_spells" +#include "x2_inc_shifter" + +void main() +{ +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + //-------------------------------------------------------------------------- + // Enforce artifical use limit on that ability + //-------------------------------------------------------------------------- + //Comment out to make unlimited! + if (ShifterDecrementGWildShapeSpellUsesLeft() <1 ) + { + FloatingTextStrRefOnCreature(83576, OBJECT_SELF); + return; + } + + //-------------------------------------------------------------------------- + // Make sure we are not blind + //-------------------------------------------------------------------------- + if( GZCanNotUseGazeAttackCheck(OBJECT_SELF)) + { + return; + } + + //-------------------------------------------------------------------------- + // Calculate Save DC + //-------------------------------------------------------------------------- + //Here we can adjust how hard the DC is on the Gaze Press the Constant buttn + int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_HARD); + + float fDelay; + object oTarget = GetSpellTargetObject(); + int nHitDice = GetCasterLevel(OBJECT_SELF); + int nSpellID = GetSpellId(); + object oSelf = OBJECT_SELF; + + //-------------------------------------------------------------------------- + // Loop through all available targets in spellcone + //-------------------------------------------------------------------------- + location lFinalTarget = GetSpellTargetLocation(); + vector vFinalPosition; + if ( lFinalTarget == GetLocation(OBJECT_SELF) ) + { + // Since the target and origin are the same, we have to determine the + // direction of the spell from the facing of OBJECT_SELF (which is more + // intuitive than defaulting to East everytime). + + // In order to use the direction that OBJECT_SELF is facing, we have to + // instead we pick a point slightly in front of OBJECT_SELF as the target. + vector lTargetPosition = GetPositionFromLocation(lFinalTarget); + vFinalPosition.x = lTargetPosition.x + cos(GetFacing(OBJECT_SELF)); + vFinalPosition.y = lTargetPosition.y + sin(GetFacing(OBJECT_SELF)); + lFinalTarget = Location(GetAreaFromLocation(lFinalTarget),vFinalPosition,GetFacingFromLocation(lFinalTarget)); + } + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lFinalTarget, TRUE); + while(GetIsObjectValid(oTarget)) + { + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + + if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF) + { + DelayCommand(fDelay, DoPetrification(nHitDice, oSelf, oTarget, nSpellID, nDC)); + //Get next target in spell area + } + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lFinalTarget, TRUE); + } + +} + + diff --git a/_removed files/x2_s1_wyrmbreath.nss b/_removed files/x2_s1_wyrmbreath.nss new file mode 100644 index 00000000..db31b9c1 --- /dev/null +++ b/_removed files/x2_s1_wyrmbreath.nss @@ -0,0 +1,153 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath for Wyrmling Shape +//:: x2_s1_wyrmbreath +//:: Copyright (c) 2003Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the power of the dragon breath + used by a player polymorphed into wyrmling + shape + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: June, 17, 2003 +//::////////////////////////////////////////////// +/* +-- Modified by Iznoghoud January 13 2004 +Made a fix for the way the damage is calculated. + +- Before, it would determine a number of dice and die type (d4, d6, d8, d10), throw +that die one time, and then multiply that number with the number of dice. +Also, every target got the same amount of damage. + +- Now, it determines a number of dice N and die type (d4, d6, d8, d10), throws that +die N times, and adds up the results. +This results in the damage being averaged out like all other spells, instead of +going into the low or high extremes so often. Also, every target can get a +different amount of damage, just like with other spells. +*/ +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +#include "x2_inc_shifter" + +void main() +{ + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + //-------------------------------------------------------------------------- + // Set up variables + //-------------------------------------------------------------------------- + int nType = GetSpellId(); + int nDamageType; + int nDamageDie; + int nVfx; + int nSave; + int nSpell; + int nDice; + + + //-------------------------------------------------------------------------- + // Decide on breath weapon type, vfx based on spell id + //-------------------------------------------------------------------------- + switch (nType) + { + case 663: //white + nDamageDie = 4; + nDamageType = DAMAGE_TYPE_COLD; + nVfx = VFX_IMP_FROST_S; + nSave = SAVING_THROW_TYPE_COLD; + nSpell = SPELLABILITY_DRAGON_BREATH_COLD; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; + break; + + case 664: //black + nDamageDie = 4; + nDamageType = DAMAGE_TYPE_ACID; + nVfx = VFX_IMP_ACID_S; + nSave = SAVING_THROW_TYPE_ACID; + nSpell = SPELLABILITY_DRAGON_BREATH_ACID; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; + break; + + case 665: //red + nDamageDie = 10; + nDamageType = DAMAGE_TYPE_FIRE; + nVfx = VFX_IMP_FLAME_M; + nSave = SAVING_THROW_TYPE_FIRE; + nSpell = SPELLABILITY_DRAGON_BREATH_FIRE; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /3)+1; + break; + + case 666: //green + nDamageDie = 6; + nDamageType = DAMAGE_TYPE_ACID; + nVfx = VFX_IMP_ACID_S; + nSave = SAVING_THROW_TYPE_ACID; + nSpell = SPELLABILITY_DRAGON_BREATH_GAS; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; + break; + + case 667: //blue + nDamageDie = 8; + nDamageType = DAMAGE_TYPE_ELECTRICAL; + nVfx = VFX_IMP_LIGHTNING_S; + nSave = SAVING_THROW_TYPE_ELECTRICITY; + nSpell = SPELLABILITY_DRAGON_BREATH_LIGHTNING; + nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /3)+1; + break; + + } + + //-------------------------------------------------------------------------- + // Calculate Save DC based on shifter level + //-------------------------------------------------------------------------- + int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_NORMAL); + + //-------------------------------------------------------------------------- + // Calculate Damage + //-------------------------------------------------------------------------- + + + int nDamage = 0; + int i; + int nDamStrike; + float fDelay; + object oTarget; + effect eVis, eBreath; + + //-------------------------------------------------------------------------- + //Loop through all targets and do damage + //-------------------------------------------------------------------------- + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpell)); + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + // Calculate damage for this target + nDamage = 0; + for (i = 0; i < nDice; i++) // Roll the damage die nDice times and add up the damage. + nDamage += (Random(nDamageDie)+1); + + nDamStrike = GetReflexAdjustedDamage(nDamage, oTarget, nDC); + if (nDamStrike > 0) + { + eBreath = EffectDamage(nDamStrike, nDamageType); + eVis = EffectVisualEffect(nVfx); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget)); + } + } + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + } +} diff --git a/_removed files/x2_s2_blindspd.nss b/_removed files/x2_s2_blindspd.nss new file mode 100644 index 00000000..237a274c --- /dev/null +++ b/_removed files/x2_s2_blindspd.nss @@ -0,0 +1,107 @@ +//:://///////////////////////////////////////////// +//:: Haste +//:: NW_S0_Haste.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Gives the targeted creature one extra partial + action per round. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 29, 2001 +//::////////////////////////////////////////////// +// Modified March 2003: Remove Expeditious Retreat effects + +#include "x0_i0_spells" + +#include "x2_inc_spellhook" + +void main() +{ + +/* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + + //Declare major variables + object oTarget = GetSpellTargetObject(); + + if (GetHasSpellEffect(SPELL_EXPEDITIOUS_RETREAT, oTarget) == TRUE) + { + RemoveSpellEffects(SPELL_EXPEDITIOUS_RETREAT, OBJECT_SELF, oTarget); + } + + if (GetHasSpellEffect(SPELL_HASTE, oTarget) == TRUE) + { + RemoveSpellEffects(SPELL_HASTE, OBJECT_SELF, oTarget); + } + + if (GetHasSpellEffect(SPELL_MASS_HASTE, oTarget) == TRUE) + { + RemoveSpellEffects(SPELL_MASS_HASTE, OBJECT_SELF, oTarget); + } + + if (GetHasSpellEffect(GetSpellId(), oTarget) == TRUE) + { + RemoveSpellEffects(GetSpellId(), OBJECT_SELF, oTarget); + } + + effect eHaste = EffectHaste(); + effect eVis = EffectVisualEffect(460); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eHaste, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Check for metamagic extension + + // Apply effects to the currently selected target. + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + +effect eEffect; +eEffect = EffectModifyAttacks(2); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectACIncrease(4, AC_DODGE_BONUS); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL, 4, SAVING_THROW_TYPE_ALL); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectAttackIncrease(2); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); + +eEffect = EffectDamageIncrease(DAMAGE_BONUS_1d8, DAMAGE_TYPE_BLUDGEONING); + +eEffect = SupernaturalEffect(eEffect); + +ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); +} + + diff --git a/_removed files/x2_s2_cursesong.nss b/_removed files/x2_s2_cursesong.nss new file mode 100644 index 00000000..bc7f8cab --- /dev/null +++ b/_removed files/x2_s2_cursesong.nss @@ -0,0 +1,417 @@ +//:://///////////////////////////////////////////// +//:: Curse Song +//:: X2_S2_CurseSong +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spells applies penalties to all of the + bard's enemies within 30ft for a set duration of + 10 rounds. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: May 16, 2003 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 20, 2003 + +#include "x2_i0_spells" + +void main() +{ + +//Override in town, no casting! +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left + return; + } + + if (GetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced + return; + } + + + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARD); + int nRanks = GetSkillRank(SKILL_PERFORM); + int nPerform = nRanks; + int nDuration = 10; //+ nChr; + + effect eAttack; + effect eDamage; + effect eWill; + effect eFort; + effect eReflex; + effect eHP; + effect eAC; + effect eSkill; + + int nAttack; + int nDamage; + int nWill; + int nFort; + int nReflex; + int nHP; + int nAC; + int nSkill; + //Check to see if the caster has Lasting Impression and increase duration. + if(GetHasFeat(870)) + { + nDuration *= 10; + } + + if(GetHasFeat(424)) // lingering song + { + nDuration += 5; + } + + if(nPerform >= 90 && nLevel >= 30) + { + nAttack = 4; + nDamage = 6; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 70; + nAC = 5; + nSkill = 20; + } + else if(nPerform >= 85 && nLevel >= 29) + { + nAttack = 4; + nDamage = 6; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 65; + nAC = 5; + nSkill = 18; + } + else if(nPerform >= 82 && nLevel >= 28) + { + nAttack = 3; + nDamage = 5; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 60; + nAC = 5; + nSkill = 16; + } + else if(nPerform >= 78 && nLevel >= 27) + { + nAttack = 3; + nDamage = 5; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 55; + nAC = 4; + nSkill = 14; + } + else if(nPerform >= 75 && nLevel >= 26) + { + nAttack = 3; + nDamage = 4; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 50; + nAC = 4; + nSkill = 14; + } + else if(nPerform >= 75 && nLevel >= 25) + { + nAttack = 2; + nDamage = 4; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 45; + nAC = 4; + nSkill = 13; + } + else if(nPerform >= 70 && nLevel >= 24) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 40; + nAC = 4; + nSkill = 12; + } + else if(nPerform >= 65 && nLevel >= 23) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 36; + nAC = 4; + nSkill = 11; + } + else if(nPerform >= 60 && nLevel >= 22) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 34; + nAC = 4; + nSkill = 10; + } + else if(nPerform >= 55 && nLevel >= 21) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 32; + nAC = 4; + nSkill = 9; + } + else if(nPerform >= 50 && nLevel >= 20) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 28; + nAC = 3; + nSkill = 8; + } + else if(nPerform >= 45 && nLevel >= 19) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 26; + nAC = 3; + nSkill = 7; + } + else if(nPerform >= 40 && nLevel >= 18) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 24; + nAC = 3; + nSkill = 6; + } + else if(nPerform >= 35 && nLevel >= 17) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 22; + nAC = 3; + nSkill = 5; + } + else if(nPerform >= 30 && nLevel >= 16) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 20; + nAC = 3; + nSkill = 4; + } + else if(nPerform >= 24 && nLevel >= 15) + { + nAttack = 2; + nDamage = 3; + nWill = 2; + nFort = 2; + nReflex = 2; + nHP = 16; + nAC = 3; + nSkill = 3; + } + else if(nPerform >= 21 && nLevel >= 14) + { + nAttack = 2; + nDamage = 3; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 16; + nAC = 3; + nSkill = 2; + } + else if(nPerform >= 18 && nLevel >= 12) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 2; + nSkill = 2; + } + else if(nPerform >= 15 && nLevel >= 8) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 12 && nLevel >= 6) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 0; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 9 && nLevel >= 3) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 6 && nLevel >= 2) + { + nAttack = 1; + nDamage = 1; + nWill = 1; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 3 && nLevel >= 1) + { + nAttack = 1; + nDamage = 1; + nWill = 0; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + + eAttack = EffectAttackDecrease(nAttack); + eDamage = EffectDamageDecrease(nDamage, DAMAGE_TYPE_SLASHING); + effect eLink = EffectLinkEffects(eAttack, eDamage); + + if(nWill > 0) + { + eWill = EffectSavingThrowDecrease(SAVING_THROW_WILL, nWill); + eLink = EffectLinkEffects(eLink, eWill); + } + if(nFort > 0) + { + eFort = EffectSavingThrowDecrease(SAVING_THROW_FORT, nFort); + eLink = EffectLinkEffects(eLink, eFort); + } + if(nReflex > 0) + { + eReflex = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nReflex); + eLink = EffectLinkEffects(eLink, eReflex); + } + if(nHP > 0) + { + //SpeakString("HP Bonus " + IntToString(nHP)); + eHP = EffectDamage(nHP, DAMAGE_TYPE_SONIC, DAMAGE_POWER_NORMAL); +// eLink = EffectLinkEffects(eLink, eHP); + } + if(nAC > 0) + { + eAC = EffectACDecrease(nAC, AC_DODGE_BONUS); + eLink = EffectLinkEffects(eLink, eAC); + } + if(nSkill > 0) + { + eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nSkill); + eLink = EffectLinkEffects(eLink, eSkill); + } + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(507); + eLink = EffectLinkEffects(eLink, eDur); + + effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC); + effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF)); + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + + eHP = ExtraordinaryEffect(eHP); + eLink = ExtraordinaryEffect(eLink); + + if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur2, OBJECT_SELF, RoundsToSeconds(nDuration)); + } + float fDelay; + while(GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song + if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget)) + { + if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget)) + { + if (nHP > 0) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SONIC), oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHP, oTarget)); + } + + if (!GetIsDead(oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + else + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); + } + } + + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + } + DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS); +} diff --git a/_removed files/x2_s2_dragknght.nss b/_removed files/x2_s2_dragknght.nss new file mode 100644 index 00000000..bb1757ba --- /dev/null +++ b/_removed files/x2_s2_dragknght.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Dragon Knight +//:: X2_S2_DragKnght +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons an adult red dragon for you to + command. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 07, 2003 +//::////////////////////////////////////////////// +#include "x2_inc_toollib" + +#include "x2_inc_spellhook" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + */ + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + + //Declare major variables + int nDuration = 20; + effect eSummon; + effect eVis = EffectVisualEffect(460); + eSummon = EffectSummonCreature("epicdragon1",481,0.0f,TRUE); + + // * make it so dragon cannot be dispelled + eSummon = ExtraordinaryEffect(eSummon); + //Apply the summon visual and summon the dragon. + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon,GetSpellTargetLocation(), RoundsToSeconds(nDuration)); + DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis,GetSpellTargetLocation())); +} + + diff --git a/_removed files/x2_s2_dthmsttch.nss b/_removed files/x2_s2_dthmsttch.nss new file mode 100644 index 00000000..77c97dd3 --- /dev/null +++ b/_removed files/x2_s2_dthmsttch.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: Deathless Master Touch +//:: X2_S2_dthmsttch +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Pale Master may use their undead arm to + kill their foes. + + -Requires melee Touch attack + -Save vs DC 17 to resist + + Epic: + -SaveDC raised by +1 for each 2 levels past 10th +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: July, 24, 2003 +//::////////////////////////////////////////////// + + +#include "NW_I0_SPELLS" +#include "X2_inc_switches" + +void main() +{ + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + //Declare major variables + object oTarget = GetSpellTargetObject(); + //object oCaster = GetCurrentHitPoints(OBJECT_SELF); + int nCasterLvl = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = GetMetaMagicFeat(); + + //Declare effects + effect eSlay = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH); + int nSave = 24; + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + + //* GZ: Handle Epic Save Progression + int nEpicMod = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF) - 10 ; + if (nEpicMod>0) + { + nSave += (nEpicMod/2); + } + + //Link effects + + if(TouchAttackMelee(oTarget,TRUE)>0) + { + //Signal spell cast at event + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 624)); + //Saving Throw + + if ((GetCreatureSize(oTarget)>CREATURE_SIZE_LARGE )&& (GetModuleSwitchValue(MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH) == TRUE)) + { + return; // creature too large to be affected. + } + + if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nSave, SAVING_THROW_TYPE_NEGATIVE)) + { + //Apply effects to target and caster + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } + } + +} diff --git a/_removed files/x2_s2_gwburn.nss b/_removed files/x2_s2_gwburn.nss new file mode 100644 index 00000000..8b2387f7 --- /dev/null +++ b/_removed files/x2_s2_gwburn.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Outsider Shape - Azer - Fire stream +//:: x2_s2_gwburn +//:: Copyright (c) 2003Bioware Corp. +//::////////////////////////////////////////////// +/* + + Azer shoot fire ability. The fire they breathe + is natural, so there is no SR check against it + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: July, 07, 2003 +//::////////////////////////////////////////////// + +#include "x2_inc_shifter" +void main() +{ + //-------------------------------------------------------------------------- + // Enforce artifical use limit on that ability + //-------------------------------------------------------------------------- + /* if (ShifterDecrementGWildShapeSpellUsesLeft() <1 ) + { + FloatingTextStrRefOnCreature(83576, OBJECT_SELF); + return; + } + */ + + //-------------------------------------------------------------------------- + // Create VFX + //-------------------------------------------------------------------------- + object oTarget = GetSpellTargetObject(); + int nTouch = TouchAttackRanged(oTarget); + effect eRay = EffectBeam(444,OBJECT_SELF,BODY_NODE_CHEST,(nTouch == 0)); + effect eDur = EffectVisualEffect(498); + + + float fDelay = GetDistanceBetween(oTarget, OBJECT_SELF)/14; + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eRay,oTarget,1.7f); + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + + if (nTouch > 0) + { + int nDamage = d4( GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3 ) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); + if (nTouch ==2) + { + nDamage += d4( GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3 ) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); + } + int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_NORMAL); + nDamage = GetReflexAdjustedDamage(nDamage,oTarget,nDC,SAVING_THROW_TYPE_FIRE,OBJECT_SELF); + effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); + effect eHit = EffectVisualEffect(VFX_IMP_FLAME_S); + + eHit = EffectLinkEffects(eDamage,eHit); + DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eDur,oTarget,3.0f)); + DelayCommand(fDelay+0.3f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eHit,oTarget,3.0f)); + } + + +} + + + diff --git a/_removed files/x2_s2_gwildshp.nss b/_removed files/x2_s2_gwildshp.nss new file mode 100644 index 00000000..0f668ba8 --- /dev/null +++ b/_removed files/x2_s2_gwildshp.nss @@ -0,0 +1,458 @@ +//:://///////////////////////////////////////////// +//:: Greater Wild Shape, Humanoid Shape +//:: x2_s2_gwildshp +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Allows the character to shift into one of these + forms, gaining special abilities + Credits must be given to mr_bumpkin from the NWN + community who had the idea of merging item properties + from weapon and armor to the creatures new forms. +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-07-02 +//::////////////////////////////////////////////// +//:: Modified By: Iznoghoud +/* +What this script changes: +- Tower shields now carry over their properties just like Small and Large +shields. (Which has been a bug I believe since the original script had 2 checks +for SMALLSHIELD in it, one probably should have been TOWERSHIELD) +- Melee Weapon properties now carry over to the unarmed forms' claws and bite +attacks. +- My last (and most complicated) changes: +1) Now, items with an AC bonus (or penalty) carry over to the shifted form as +the correct type. This means if you wear an amulet of natural armor +4, and a +cloak of protection +5, and you shift to a form that gets all item properties +carried over, you will have the +4 natural armor bonus from the ammy, as well as +the +5 deflection bonus from the cloak. No longer will the highest one override +all the other AC bonuses even if they are a different type. Note that some +forms, such as the dragon, get an inherent natural AC bonus, which may still +override your amulet of natural armor, if the inherent bonus is better. +2) Other "stackable" item properties, like ability bonuses, skill bonuses and +saving throw bonuses, now correctly add up in shifted form. This means if you +have a ring that gives +2 strength, and a ring with +3 strength, and you shift +into a drow warrior, you get +5 strength in shifted form, where you used to get +only +3. (the highest) + +-- Modified by StoneDK 2003.12.21 +Added saving of old equip to allow items to be applied without going +through normal shape, should now get item effects even when changing +directly from wyrm to kobold shape. +Added message to player about which items are merged. + +-- Modified by Iznoghoud 2003-12-26 +Added storing of Polymorph ID on the player for letting exportallchars() scripts +reapply polymorphing effects when saving + +-- Modified by Iznoghoud 2003-12-27 +Added regeneration as a stacking property, bracers now stored correctly for re-shifting, +Added constants for easy configuration. + +-- Modified by Iznoghoud January 13 2004 +The bulk of the handling of stacking item properties, as well as the constants +for configuration, are now in ws_inc_shifter, which is included +by this file, and the two druid polymorphing scripts, nw_s2_elemshape and nw_s2_wildshape. +Made the message about which items are merged more explicit. +*/ +//::////////////////////////////////////////////// + +#include "ws_inc_shifter" + +// Main function of the script +void main() +{ + +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) +{ + + FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); + + return; +} + //-------------------------------------------------------------------------- + // Declare major variables + //-------------------------------------------------------------------------- + object oPC = OBJECT_SELF; + int nSpell = GetSpellId(); + object oTarget = GetSpellTargetObject(); + effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH); + int nShifter = GetLevelByClass(CLASS_TYPE_SHIFTER); + effect ePoly; + int nPoly; + //-------------------------------------------------------------------------- + // Determine which form to use based on spell id, gender and level + //-------------------------------------------------------------------------- + switch (nSpell) + { + //----------------------------------------------------------------------- + // Greater Wildshape I - Wyrmling Shape + //----------------------------------------------------------------------- + case 658: nPoly = POLYMORPH_TYPE_WYRMLING_RED; break; + case 659: nPoly = POLYMORPH_TYPE_WYRMLING_BLUE; break; + case 660: nPoly = POLYMORPH_TYPE_WYRMLING_BLACK; break; + case 661: nPoly = POLYMORPH_TYPE_WYRMLING_WHITE; break; + case 662: nPoly = POLYMORPH_TYPE_WYRMLING_GREEN; break; + //----------------------------------------------------------------------- + // Greater Wildshape II - Minotaur, Gargoyle, Harpy + //----------------------------------------------------------------------- + case 672: if (nShifter < X2_GW2_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_HARPY; + else + nPoly = 97; + break; + case 678: if (nShifter < X2_GW2_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_GARGOYLE; + else + nPoly = 98; + break; + case 680: if (nShifter < X2_GW2_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_MINOTAUR; + else + nPoly = 96; + break; + //----------------------------------------------------------------------- + // Greater Wildshape III - Drider, Basilisk, Manticore + //----------------------------------------------------------------------- + case 670: if (nShifter < X2_GW3_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_BASILISK; + else + nPoly = 99; + break; + case 673: if (nShifter < X2_GW3_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_DRIDER; + else + nPoly = 100; + break; + case 674: if (nShifter < X2_GW3_EPIC_THRESHOLD) + nPoly = POLYMORPH_TYPE_MANTICORE; + else + nPoly = 101; + break; + //----------------------------------------------------------------------- + // Greater Wildshape IV - Dire Tiger, Medusa, MindFlayer + //----------------------------------------------------------------------- + case 679: nPoly = POLYMORPH_TYPE_MEDUSA; break; + case 691: nPoly = 68; break; // Mindflayer + case 694: nPoly = 69; break; // DireTiger + //----------------------------------------------------------------------- + // Humanoid Shape - Kobold Commando, Drow, Lizard Crossbow Specialist + //----------------------------------------------------------------------- + case 682: + if(nShifter< 17) + { + if (GetGender(OBJECT_SELF) == GENDER_MALE) //drow + nPoly = 59; + else + nPoly = 70; + } + else + { + if (GetGender(OBJECT_SELF) == GENDER_MALE) //drow + nPoly = 105; + else + nPoly = 106; + } + break; + case 683: + if(nShifter< 17) + { + nPoly = 82; break; // Lizard + } + else + { + nPoly =104; break; // Epic Lizard + } + case 684: if(nShifter< 17) + { + nPoly = 83; break; // Kobold Commando + } + else + { + nPoly = 103; break; // Kobold Commando + } + //----------------------------------------------------------------------- + // Undead Shape - Spectre, Risen Lord, Vampire + //----------------------------------------------------------------------- + case 704: nPoly = 75; break; // Risen lord + case 705: if (GetGender(OBJECT_SELF) == GENDER_MALE) // vampire + nPoly = 74; + else + nPoly = 77; + break; + case 706: nPoly = 76; break; /// spectre + //----------------------------------------------------------------------- + // Dragon Shape - Red Blue and Green Dragons + //----------------------------------------------------------------------- + case 707: nPoly = 72; break; // Ancient Red Dragon + case 708: nPoly = 71; break; // Ancient Blue Dragon + case 709: nPoly = 73; break; // Ancient Green Dragon + //----------------------------------------------------------------------- + // Outsider Shape - Rakshasa, Azer Chieftain, Black Slaad + //----------------------------------------------------------------------- + case 733: if (GetGender(OBJECT_SELF) == GENDER_MALE) //azer + nPoly = 85; + else // anything else is female + nPoly = 86; + break; + case 734: if (GetGender(OBJECT_SELF) == GENDER_MALE) //rakshasa + nPoly = 88; + else // anything else is female + nPoly = 89; + break; + case 735: nPoly =87; break; // slaad + //----------------------------------------------------------------------- + // Construct Shape - Stone Golem, Iron Golem, Demonflesh Golem + //----------------------------------------------------------------------- + case 738: nPoly =91; break; // stone golem + case 739: nPoly =92; break; // demonflesh golem + case 740: nPoly =90; break; // iron golem + } + //-------------------------------------------------------------------------- + // Determine which items get their item properties merged onto the shifters + // new form. + //-------------------------------------------------------------------------- + int bWeapon; + int bArmor; + int bItems; + int bCopyGlovesToClaws = FALSE; + + bWeapon = ShifterMergeWeapon(nPoly); + + if ( GW_ALWAYS_COPY_ARMOR_PROPS ) + bArmor = TRUE; + else + bArmor = ShifterMergeArmor(nPoly); + + if ( GW_ALWAYS_COPY_ITEM_PROPS ) + bItems = TRUE; + else + bItems = ShifterMergeItems(nPoly); + + // Send message to PC about which items get merged to this form + string sMerge; + sMerge = "Merged: "; // : This is a color code that makes the text behind it sort of light blue. + if(bArmor) sMerge += "Armor, Helmet, Shield"; + if(bItems) sMerge += ", Rings, Amulet, Cloak, Boots, Belt, Bracers"; + if( bWeapon || GW_COPY_WEAPON_PROPS_TO_UNARMED == 1 ) + sMerge += ", Weapon"; + else if ( GW_COPY_WEAPON_PROPS_TO_UNARMED == 2 ) + sMerge += ", Gloves to unarmed attacks"; + else if (GW_COPY_WEAPON_PROPS_TO_UNARMED == 3 ) + sMerge += ", Weapon (if you had one equipped) or gloves to unarmed attacks"; + else + sMerge += ", No weapon or gloves to unarmed attacks"; + SendMessageToPC(oTarget,sMerge + "."); + + // Store which items should transfer to this polymorph type. (For exportallchar scripts) + SetLocalInt(oTarget, "GW_PolyID", nPoly); + SetLocalInt(oTarget, "GW_bWeapon", bWeapon ); + SetLocalInt(oTarget, "GW_bArmor", bArmor ); + SetLocalInt(oTarget, "GW_bItems", bItems ); + + //-------------------------------------------------------------------------- + // Store the old objects so we can access them after the character has + // changed into his new form + //-------------------------------------------------------------------------- + object oWeaponOld; + object oArmorOld; + object oRing1Old ; + object oRing2Old; + object oAmuletOld; + object oCloakOld ; + object oBootsOld ; + object oBeltOld ; + object oHelmetOld; + object oShield ; + object oBracerOld; + object oHideOld; + //Assume the normal shape doesn't have a creature skin object. + //If using a subracesystem or something else that places a skin on the normal shape + //another condition is needed to decide whether or not to store current items. + //One way could be to scan all effects to see whether one is a polymorph effect. + int nPolyed = GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF)); + // If there is a creature armor see if it is a creature hide put + // on the unpolymorphed player by scanning for a polymorph effect. + if ( nPolyed ) + nPolyed = ( ScanForPolymorphEffect(OBJECT_SELF) != -2 ); + if(! nPolyed) + { + //if not polymorphed get items worn and store on player. + oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF); + oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF); + oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF); + oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF); + oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF); + oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF); + oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF); + oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF); + oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF); + oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF); + oBracerOld = GetItemInSlot(INVENTORY_SLOT_ARMS,OBJECT_SELF); + oHideOld = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF); + SetLocalObject(OBJECT_SELF,"GW_OldWeapon",oWeaponOld); + SetLocalObject(OBJECT_SELF,"GW_OldArmor",oArmorOld); + SetLocalObject(OBJECT_SELF,"GW_OldRing1",oRing1Old); + SetLocalObject(OBJECT_SELF,"GW_OldRing2",oRing2Old); + SetLocalObject(OBJECT_SELF,"GW_OldAmulet",oAmuletOld); + SetLocalObject(OBJECT_SELF,"GW_OldCloak",oCloakOld); + SetLocalObject(OBJECT_SELF,"GW_OldBoots",oBootsOld); + SetLocalObject(OBJECT_SELF,"GW_OldBelt",oBeltOld); + SetLocalObject(OBJECT_SELF,"GW_OldHelmet",oHelmetOld); + SetLocalObject(OBJECT_SELF,"GW_OldBracer",oBracerOld); + SetLocalObject(OBJECT_SELF,"GW_OldHide",oHideOld); + if (GetIsObjectValid(oShield)) + { + if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD && + GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD && + GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD) + { + oShield = OBJECT_INVALID; + } + } + SetLocalObject(OBJECT_SELF,"GW_OldShield",oShield); + + } + else + { + //if already polymorphed use items stored earlier. + oWeaponOld = GetLocalObject(OBJECT_SELF,"GW_OldWeapon"); + oArmorOld = GetLocalObject(OBJECT_SELF,"GW_OldArmor"); + oRing1Old = GetLocalObject(OBJECT_SELF,"GW_OldRing1"); + oRing2Old = GetLocalObject(OBJECT_SELF,"GW_OldRing2"); + oAmuletOld = GetLocalObject(OBJECT_SELF,"GW_OldAmulet"); + oCloakOld = GetLocalObject(OBJECT_SELF,"GW_OldCloak"); + oBootsOld = GetLocalObject(OBJECT_SELF,"GW_OldBoots"); + oBeltOld = GetLocalObject(OBJECT_SELF,"GW_OldBelt"); + oHelmetOld = GetLocalObject(OBJECT_SELF,"GW_OldHelmet"); + oShield = GetLocalObject(OBJECT_SELF,"GW_OldShield"); + oBracerOld = GetLocalObject(OBJECT_SELF,"GW_OldBracer"); + oHideOld = GetLocalObject(OBJECT_SELF,"GW_OldHide"); + } + + //-------------------------------------------------------------------------- + // Here the actual polymorphing is done + //-------------------------------------------------------------------------- + ePoly = EffectPolymorph(nPoly); + //-------------------------------------------------------------------------- + // Iznoghoud: Link the stackable properties as permanent bonuses to the + // Polymorph effect, instead of putting them on the creature hide. They will + // properly disappear as soon as the polymorph is ended. + //-------------------------------------------------------------------------- + ePoly = AddStackablePropertiesToPoly ( oPC, ePoly, bWeapon, bItems, bArmor, oArmorOld, oRing1Old, oRing2Old, oAmuletOld, oCloakOld, oBracerOld, oBootsOld, oBeltOld, oHelmetOld, oShield, oWeaponOld, oHideOld); + ePoly = ExtraordinaryEffect(ePoly); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF); + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //-------------------------------------------------------------------------- + // This code handles the merging of item properties + //-------------------------------------------------------------------------- + object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF); + object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF); + object oClawLeft = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,OBJECT_SELF); + object oClawRight = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,OBJECT_SELF); + object oBite = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,OBJECT_SELF); + //-------------------------------------------------------------------------- + // ...Weapons + //-------------------------------------------------------------------------- + if (bWeapon) + { + //---------------------------------------------------------------------- + // GZ: 2003-10-20 + // Sorry, but I was forced to take that out, it was confusing people + // and there were problems with updating the stats sheet. + //---------------------------------------------------------------------- + /* if (!GetIsObjectValid(oWeaponOld)) + { + //------------------------------------------------------------------ + // If we had no weapon equipped before, remove the old weapon + // to allow monks to change into unarmed forms by not equipping any + // weapon before polymorphing + //------------------------------------------------------------------ + DestroyObject(oWeaponNew); + } + else*/ + { + //------------------------------------------------------------------ + // Merge item properties... + //------------------------------------------------------------------ + WildshapeCopyWeaponProperties(oTarget, oWeaponOld,oWeaponNew); + } + } + else { + switch ( GW_COPY_WEAPON_PROPS_TO_UNARMED ) + { + case 1: // Copy over weapon properties to claws/bite + WildshapeCopyNonStackProperties(oWeaponOld,oClawLeft, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oClawRight, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oBite, TRUE); + break; + case 2: // Copy over glove properties to claws/bite + WildshapeCopyNonStackProperties(oBracerOld,oClawLeft, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oClawRight, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oBite, FALSE); + bCopyGlovesToClaws = TRUE; + break; + case 3: // Copy over weapon properties to claws/bite if wearing a weapon, otherwise copy gloves + if ( GetIsObjectValid(oWeaponOld) ) + { + WildshapeCopyNonStackProperties(oWeaponOld,oClawLeft, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oClawRight, TRUE); + WildshapeCopyNonStackProperties(oWeaponOld,oBite, TRUE); + } + else + { + WildshapeCopyNonStackProperties(oBracerOld,oClawLeft, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oClawRight, FALSE); + WildshapeCopyNonStackProperties(oBracerOld,oBite, FALSE); + bCopyGlovesToClaws = TRUE; + } + break; + default: // Do not copy over anything + break; + }; + } + //-------------------------------------------------------------------------- + // ...Armor + //-------------------------------------------------------------------------- + if (bArmor) + { + //---------------------------------------------------------------------- + // Merge item properties from armor and helmet... + //---------------------------------------------------------------------- + WildshapeCopyNonStackProperties(oArmorOld,oArmorNew); + WildshapeCopyNonStackProperties(oHelmetOld,oArmorNew); + WildshapeCopyNonStackProperties(oShield,oArmorNew); + WildshapeCopyNonStackProperties(oHideOld,oArmorNew); + } + //-------------------------------------------------------------------------- + // ...Magic Items + //-------------------------------------------------------------------------- + if (bItems) + { + //---------------------------------------------------------------------- + // Merge item properties from from rings, amulets, cloak, boots, belt + // Iz: And bracers, in case oBracerOld gets set to a valid object. + //---------------------------------------------------------------------- + WildshapeCopyNonStackProperties(oRing1Old,oArmorNew); + WildshapeCopyNonStackProperties(oRing2Old,oArmorNew); + WildshapeCopyNonStackProperties(oAmuletOld,oArmorNew); + WildshapeCopyNonStackProperties(oCloakOld,oArmorNew); + WildshapeCopyNonStackProperties(oBootsOld,oArmorNew); + WildshapeCopyNonStackProperties(oBeltOld,oArmorNew); + // Because Bracers can have On Hit Cast Spell type properties we should + // avoid copying the bracers twice. Otherwise the player can get that On + // Hit effect both when hitting, and getting hit. + if ( bCopyGlovesToClaws == FALSE ) + WildshapeCopyNonStackProperties(oBracerOld,oArmorNew); + } + //-------------------------------------------------------------------------- + // Set artificial usage limits for special ability spells to work around + // the engine limitation of not being able to set a number of uses for + // spells in the polymorph radial + //-------------------------------------------------------------------------- + ShifterSetGWildshapeSpellLimits(nSpell); +} + diff --git a/_removed files/x2_s2_hellball.nss b/_removed files/x2_s2_hellball.nss new file mode 100644 index 00000000..660a0a01 --- /dev/null +++ b/_removed files/x2_s2_hellball.nss @@ -0,0 +1,144 @@ +//:://///////////////////////////////////////////// +//:: Hellball +//:: X2_S2_HELLBALL +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Long range area of effect spell + 10d6 sonic, acid, fire and lightning damage to all + objects in the area + + 10d6 points of negative energy damage to caster + if MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER switch + was enabled on the module. + + This spell is supposed to hurt the caster if he + is stupid enough to stand in the area of effect + when all hell breaks loose. It will hurt other + players allied with the caster as well. These + effects are dependent on your difficulty setting + + Save is 20 + relevant ability score, or, when cast + by a placeable, equal to the placeables WILL Save + + There is no benefit from the evasion feats here + as the are of the spell is too large to avoid it + + +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Noobs, Georg Zoeller +//:: Created On: 2003-08-20 +//::////////////////////////////////////////////// + + +#include "X0_I0_SPELLS" +#include "x2_i0_spells" +#include "x2_inc_spellhook" + + +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + //Declare major variables + int nDamage1, nDamage2, nDamage3, nDamage4; + float fDelay; + effect eExplode = EffectVisualEffect(464); + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_L); + effect eVis3 = EffectVisualEffect(VFX_IMP_SONIC); + + int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF); + + // if this option has been enabled, the caster will take damage for casting + // epic spells, as descripbed in the ELHB + if (GetModuleSwitchValue( MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER) == TRUE) + { + effect eCast = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + int nDamage5 = d8(10); + effect eDam5 = EffectDamage(nDamage5, DAMAGE_TYPE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eCast, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam5, OBJECT_SELF); + } + + + + effect eDam1, eDam2, eDam3, eDam4, eDam5, eKnock; + eKnock= EffectKnockdown(); + + location lTarget = GetSpellTargetLocation(); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + + int nTotalDamage; + while (GetIsObjectValid(oTarget)) + { + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + + fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20 + 0.5f; + //Roll damage for each target + nDamage1 = d10(10) + 20; + nDamage2 = d10(10) + 20; + nDamage3 = d10(10) + 20; + nDamage4 = d10(10) + 20; + // no we don't care about evasion. there is no evasion to hellball + if (MySavingThrow(SAVING_THROW_REFLEX,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF,fDelay) >0) + { + nDamage1 /=2; + nDamage2 /=2; + nDamage3 /=2; + nDamage4 /=2; + } + nTotalDamage = nDamage1+nDamage2+nDamage3+nDamage4; + //Set the damage effect + eDam1 = EffectDamage(nDamage1, DAMAGE_TYPE_NEGATIVE); + eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_POSITIVE); + eDam3 = EffectDamage(nDamage3, DAMAGE_TYPE_FIRE); + eDam4 = EffectDamage(nDamage4, DAMAGE_TYPE_SONIC); + + if(nTotalDamage > 0) + { + if (nTotalDamage > 50) + { + DelayCommand(fDelay+0.3f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget,3.0f)); + } + + // Apply effects to the currently selected target. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam1, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam3, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam4, oTarget)); + //This visual effect is applied to the target object not the location as above. This visual effect + //represents the flame that erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay+0.2f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + DelayCommand(fDelay+0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget)); + } + } + //Select the next target within the spell shape. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); + } + + +} + diff --git a/_removed files/x2_s2_mghtyrage.nss b/_removed files/x2_s2_mghtyrage.nss new file mode 100644 index 00000000..350ec4d2 --- /dev/null +++ b/_removed files/x2_s2_mghtyrage.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Mighty Rage +//:: X2_S2_MghtyRage +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The Str and Con of the Barbarian increases, + Will Save are +2, AC -2. + Greater Rage starts at level 15. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: May 16, 2003 +//::////////////////////////////////////////////// +#include "x2_i0_spells" +void main() +{ + if(!GetHasFeatEffect(FEAT_BARBARIAN_RAGE)) + { + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARBARIAN); + PlayVoiceChat(VOICE_CHAT_BATTLECRY1); + //Determine the duration by getting the con modifier after being modified + int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + 8; + effect eStr = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8); + effect eCon = EffectAbilityIncrease(ABILITY_STRENGTH, 8); + effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, 4); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + //Added by Guile(This offsets the +12 Cap Some. + effect eAtk; + eAtk = EffectAttackIncrease(6); + eAtk = SupernaturalEffect(eAtk); + effect eDmg; + eDmg = EffectDamageIncrease(DAMAGE_BONUS_8, DAMAGE_TYPE_BLUDGEONING); + eDmg = SupernaturalEffect(eDmg); + effect eHP; + eHP = EffectTemporaryHitpoints(nLevel * 6); + eHP = SupernaturalEffect(eHP); + + effect eLink = EffectLinkEffects(eCon, eStr); + eLink = EffectLinkEffects(eLink, eSave); + eLink = EffectLinkEffects(eLink, eDur); + SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Make effect extraordinary + eLink = ExtraordinaryEffect(eLink); + effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX + + if (nCon > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nCon)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF) ; + //This part was added by Guile to offset +12 Cap. + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAtk, OBJECT_SELF, RoundsToSeconds(nCon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDmg, OBJECT_SELF, RoundsToSeconds(nCon)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, OBJECT_SELF, RoundsToSeconds(nCon)); + + // 2003-07-08, Georg: Rage Epic Feat Handling + CheckAndApplyEpicRageFeats(nCon); + } + } +} diff --git a/_removed files/x2_s2_mumdust.nss b/_removed files/x2_s2_mumdust.nss new file mode 100644 index 00000000..c596cc4d --- /dev/null +++ b/_removed files/x2_s2_mumdust.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Mummy Dust +//:: X2_S2_MumDust +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Summons a strong warrior mummy for you to + command. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 07, 2003 +//::////////////////////////////////////////////// + +#include "x2_inc_spellhook" +void main() +{ + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + + //Declare major variables + int nDuration = 24; + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + effect eSummon; + //Summon the appropriate creature based on the summoner level + //Warrior Mummy + eSummon = EffectSummonCreature("epicmummy1",496,1.0f); + eSummon = ExtraordinaryEffect(eSummon); + //Apply the summon visual and summon the undead. + //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); +} + + diff --git a/_removed files/x2_s2_ruin.nss b/_removed files/x2_s2_ruin.nss new file mode 100644 index 00000000..46c168f3 --- /dev/null +++ b/_removed files/x2_s2_ruin.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Greater Ruin +//:: X2_S2_Ruin +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* +// The caster deals 35d6 damage to a single target + fort save for half damage +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Nov 18, 2002 +//::////////////////////////////////////////////// + +#include "x2_I0_SPELLS" +#include "x2_inc_spellhook" +#include "x0_I0_SPELLS" +void main() +{ + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + object oTarget = GetSpellTargetObject(); + + + float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); + float fDelay = fDist/(3.0 * log(fDist) + 2.0); + + int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF); + + if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + //Roll damage + int nDam = d10(15) + 150; + //Set damage effect + + if (MySavingThrow(SAVING_THROW_FORT,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF) != 0 ) + { + nDam /=2; + } + + effect eDam = EffectDamage(nDam, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_PLUS_TWENTY); + ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(487), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_BONE_MEDIUM), oTarget); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + } +} diff --git a/_removed files/x2_s2_sumundead.nss b/_removed files/x2_s2_sumundead.nss new file mode 100644 index 00000000..111d3036 --- /dev/null +++ b/_removed files/x2_s2_sumundead.nss @@ -0,0 +1,72 @@ +//:://///////////////////////////////////////////// +//:: Summon Undead +//:: X2_S2_SumUndead +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The level of the Pale Master determines the + type of undead that is summoned. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 05, 2003 +//:: Updated By: Georg Zoeller, Oct 2003 +//::////////////////////////////////////////////// + +void PMUpgradeSummon(object oSelf, string sScript) +{ + object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED,oSelf); + ExecuteScript ( sScript, oSummon); +} + +void main() +{ + //Declare major variables + int nCasterLevel = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF); + int nDuration = 14 + nCasterLevel; + + + //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); + effect eSummon; + //Summon the appropriate creature based on the summoner level + if (nCasterLevel <= 6) + { + //Ghoul + eSummon = EffectSummonCreature("shadow01",VFX_IMP_HARM,0.0f,0); + } + else if (nCasterLevel <= 8) + { + //Shadow + eSummon = EffectSummonCreature("doomknight01",VFX_IMP_HARM,0.0f,0); + } + else if (nCasterLevel <= 10) + { + //Ghast + eSummon = EffectSummonCreature("shadfiend01",VFX_IMP_HARM,0.0f,1); + } + else if (nCasterLevel <= 14) + { + //Wight + eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD,0.0f,1); + } + else if (nCasterLevel >= 15) + { + //Wraith + eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD,0.0f,1); + } + // * Apply the summon visual and summon the two undead. + // * ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_LOS_EVIL_10),GetSpellTargetLocation()); + ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); + + // * If the character has a special pale master item equipped (variable set via OnEquip) + // * run a script on the summoned monster. + string sScript = GetLocalString(OBJECT_SELF,"X2_S_PM_SPECIAL_ITEM"); + if (sScript != "") + { + object oSelf = OBJECT_SELF; + DelayCommand(1.0,PMUpgradeSummon(oSelf,sScript)); + } +} + + diff --git a/_removed files/x2_s3_demitouch.nss b/_removed files/x2_s3_demitouch.nss new file mode 100644 index 00000000..f2464576 --- /dev/null +++ b/_removed files/x2_s3_demitouch.nss @@ -0,0 +1,96 @@ +//:://///////////////////////////////////////////// +//:: Demilich paralzying touch +//:: x2_s3_demitouch +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + On touch a demilich can paralyze an opponent. + Fort vs DC 38 + + Duration varies by game difficulty between + 1 and 5 rounds + (Sorry, no permanent paralyze, its just not fun) +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: 2003-08-27 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +void main() +{ + + object oItem; // The item casting triggering this spellscript + object oSpellTarget; // On a weapon: The one being hit. On an armor: The one hitting the armor + object oSpellOrigin; // On a weapon: The one wielding the weapon. On an armor: The one wearing an armor + + // fill the variables + oSpellOrigin = OBJECT_SELF; + oSpellTarget = GetSpellTargetObject(); + oItem = GetSpellCastItem(); + +object oCaster = OBJECT_SELF; +if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(oCaster)) +{ + +//Make them stop what they are doing instantly! +AssignCommand(oCaster, ClearAllActions()); + +//Though the player may show animation, nothing happens! :) +//SetModuleOverrideSpellScriptFinished(); + +FloatingTextStringOnCreature("All spells fizzle in town.", oCaster); + +return; +} + +/////////////////////////////////////////////////////////////////////////////// +//Handle Jail... +//NO ITEMS WORK IN JAIL!!! +if(GetLocalInt(GetArea(oCaster), "JAIL")==1) +{ + AssignCommand(oCaster, ClearAllActions()); + //Though the player may show animation, nothing happens! :) + //SetModuleOverrideSpellScriptFinished(); + + return; +} + +/////////////////////////////////////////////////////////////////////////////// + + + int nDuration = 3; + int nDiff = GetGameDifficulty(); + + if (nDiff == GAME_DIFFICULTY_CORE_RULES) + { + nDuration = 4; + } + else if (nDiff == GAME_DIFFICULTY_DIFFICULT) + { + nDuration = 6; + } + else if (nDiff == GAME_DIFFICULTY_VERY_EASY) + { + nDuration =2; + } + + if (GetIsObjectValid(oItem)) + { + SignalEvent(oSpellTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); + if(!GetHasSpellEffect(GetSpellId(),oSpellTarget)) + { + if(!MySavingThrow(SAVING_THROW_FORT, oSpellTarget,36 , SAVING_THROW_TYPE_ALL)) + { + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED); + effect ePara = EffectParalyze(); + ePara = SupernaturalEffect(ePara); + ePara = EffectLinkEffects(eDur,ePara); + ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oSpellTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePara,oSpellTarget,RoundsToSeconds(nDuration)); + } + } + } + +}