Further file organization
Further file organization
This commit is contained in:
51
nwn/nwnprc/trunk/scripts/wol_sla_devious.nss
Normal file
51
nwn/nwnprc/trunk/scripts/wol_sla_devious.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @file
|
||||
* Spellscript for Devious SLAs
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prc_inc_template"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = OBJECT_SELF;
|
||||
int nCasterLevel, nDC, nSpell, nUses;
|
||||
int nSLA = GetSpellId();
|
||||
effect eNone;
|
||||
|
||||
object oWOL = GetItemPossessedBy(oPC, "WOL_Devious");
|
||||
|
||||
// You get nothing if you aren't wielding the weapon
|
||||
if(oWOL != GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)) return;
|
||||
|
||||
switch(nSLA){
|
||||
case WOL_DEVIOUS_DETECT_THOUGHTS:
|
||||
{
|
||||
nUses = 1;
|
||||
// Check uses per day.
|
||||
if (nUses > GetLegacyUses(oPC, nSLA))
|
||||
{
|
||||
SetLegacyUses(oPC, nSLA);
|
||||
effect eLink = EffectSkillIncrease(SKILL_BLUFF, 2);
|
||||
eLink = EffectLinkEffects(eLink, EffectSkillIncrease(SKILL_PERSUADE, 2));
|
||||
eLink = EffectLinkEffects(eLink, EffectSkillIncrease(SKILL_INTIMIDATE, 2));
|
||||
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGICAL_VISION);
|
||||
float fDuration = RoundsToSeconds(5);
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, fDuration, TRUE, -1, 5);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Check uses per day
|
||||
if (GetLegacyUses(oPC, nSLA) >= nUses)
|
||||
{
|
||||
FloatingTextStringOnCreature("You have used " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", nSLA))) + " the maximum amount of times today.", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user