Initial commit. Updated release archive.
This commit is contained in:
94
_module/nss/at_damasc_sword.nss
Normal file
94
_module/nss/at_damasc_sword.nss
Normal file
@@ -0,0 +1,94 @@
|
||||
/*BLACKSMITH SCRIPT
|
||||
Created by
|
||||
Lilac Soul's NWN Script Generator, v. 1.6
|
||||
for download info please visit
|
||||
http://lilacsoul.revility.com
|
||||
*/
|
||||
|
||||
int lsn=1;
|
||||
//lsstype=3
|
||||
|
||||
void SetItemLocals()
|
||||
{
|
||||
SetLocalString(OBJECT_SELF, "lsn1", "damascanlongswor");
|
||||
SetLocalInt(OBJECT_SELF, "lsc_damascanlongswor", 3);
|
||||
SetLocalString(OBJECT_SELF, "lsi1_damascanlongswor", "NW_IT_MSMLMISC17");
|
||||
SetLocalString(OBJECT_SELF, "lsi2_damascanlongswor", "x2_it_cmat_adam");
|
||||
SetLocalString(OBJECT_SELF, "lsi3_damascanlongswor", " gold 8000");
|
||||
SetLocalInt(OBJECT_SELF, "lss_damascanlongswor", -10);
|
||||
SetLocalInt(OBJECT_SELF, "lsv_damascanlongswor", VFX_IMP_FLAME_M);
|
||||
|
||||
}
|
||||
|
||||
void CreateGold(object oTarget, int nAmount)
|
||||
{
|
||||
CreateItemOnObject("nw_it_gold001", oTarget, nAmount);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oOwner=GetPCSpeaker();
|
||||
|
||||
SetItemLocals();
|
||||
|
||||
if (lsn==0) return;
|
||||
|
||||
object oItem;
|
||||
int bOkay, nGold, nCount, nNum, nLoop, nLoops, nHasGold, nVis;
|
||||
string sCur, sReq;
|
||||
|
||||
for (nLoop=1; nLoop<=lsn; nLoop++)
|
||||
{
|
||||
sCur=GetLocalString(OBJECT_SELF, "lsn"+IntToString(nLoop));
|
||||
|
||||
nNum=GetLocalInt(OBJECT_SELF, "lsc_"+sCur);
|
||||
|
||||
for (nLoops=1; nLoops<=nNum; nLoops++)
|
||||
{
|
||||
|
||||
sReq=GetLocalString(OBJECT_SELF, "lsi"+IntToString(nLoops)+"_"+sCur);
|
||||
if (GetStringLeft(sReq, 8)==" gold ")
|
||||
{
|
||||
nGold=StringToInt(GetStringRight(sReq, GetStringLength(sReq)-8));
|
||||
if (GetGold(oOwner)>=nGold) nCount++;
|
||||
|
||||
}
|
||||
else if (GetItemPossessedBy(oOwner, sReq)!=OBJECT_INVALID)
|
||||
{
|
||||
SetLocalObject(OBJECT_SELF, "ls__"+IntToString(nLoops), GetItemPossessedBy(oOwner, sReq));
|
||||
|
||||
nCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF, "lss_"+sCur)==-10) bOkay=TRUE;
|
||||
else if (GetLastSpell()==GetLocalInt(OBJECT_SELF, "lss_"+sCur)) bOkay=TRUE;
|
||||
else bOkay=FALSE;
|
||||
|
||||
if (bOkay && (nCount==nNum)) bOkay=TRUE;
|
||||
else bOkay=FALSE;
|
||||
if (bOkay==TRUE)
|
||||
{
|
||||
|
||||
if (nGold>0)
|
||||
TakeGoldFromCreature(nGold, oOwner, TRUE);
|
||||
for (nLoops=1; nLoops<=nNum; nLoops++)
|
||||
{
|
||||
oItem=GetLocalObject(OBJECT_SELF, "ls__"+IntToString(nLoops));
|
||||
DestroyObject(oItem);
|
||||
}
|
||||
CreateItemOnObject(sCur, oOwner);
|
||||
int nVis=GetLocalInt(OBJECT_SELF, "lsv_"+sCur);
|
||||
if (nVis!=-10) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nVis), oOwner);
|
||||
}
|
||||
|
||||
oItem=OBJECT_INVALID;
|
||||
bOkay=FALSE;
|
||||
nGold=0;
|
||||
nCount=0;
|
||||
sCur="";
|
||||
sReq="";
|
||||
nNum=0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user