mirror of
http://prc.nwn.ee:3000/Jaysyn/PRC8.git
synced 2025-12-17 14:47:15 -05:00
Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
51
trunk/scripts/wol_sla_devious.nss
Normal file
51
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