Added ACP v4.1
Added ACP v4.1. Full compile. Updated module name. Updated release archive.
This commit is contained in:
105
_module/nss/_clone_info_list.nss
Normal file
105
_module/nss/_clone_info_list.nss
Normal file
@@ -0,0 +1,105 @@
|
||||
//Creator: Unknown
|
||||
//Revised By: Genisys (Guile)
|
||||
//Revised On: 8/12/08
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
|
||||
///Delete Var to start fresh\\\\
|
||||
object oPC = GetFirstPC();
|
||||
|
||||
while(GetIsPC(oPC)==TRUE)
|
||||
{
|
||||
DeleteLocalInt(oPC,"bootlist");
|
||||
DeleteLocalString(oPC,"playerinfo");
|
||||
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
|
||||
////Get Info of each Player and Store it on them\\\\
|
||||
int nLoop = 8999;
|
||||
SetCustomToken(9000,"Empty");
|
||||
SetCustomToken(9001,"Empty");
|
||||
SetCustomToken(9002,"Empty");
|
||||
SetCustomToken(9003,"Empty");
|
||||
SetCustomToken(9004,"Empty");
|
||||
SetCustomToken(9005,"Empty");
|
||||
SetCustomToken(9006,"Empty");
|
||||
SetCustomToken(9007,"Empty");
|
||||
SetCustomToken(9008,"Empty");
|
||||
SetCustomToken(9009,"Empty");
|
||||
|
||||
string sMessage;
|
||||
object oTarget;
|
||||
//object oPC = GetLastUsedBy();
|
||||
string sArea;
|
||||
string sAreaTag;
|
||||
string sLevel;
|
||||
int class, pos;
|
||||
string cname;
|
||||
|
||||
// Clear Message
|
||||
sMessage = "";
|
||||
|
||||
// First Line
|
||||
|
||||
sMessage = "<c<01>>---------------------------------";
|
||||
|
||||
// Get First Player
|
||||
oTarget = GetFirstPC();
|
||||
|
||||
|
||||
// Check if valid
|
||||
while(GetIsPC(oTarget)==TRUE)
|
||||
{
|
||||
|
||||
sLevel = "<c<><63><EFBFBD>>";
|
||||
nLoop++;
|
||||
string Name = GetName(oTarget);
|
||||
int Hitpoints = GetMaxHitPoints(oTarget);
|
||||
int AC = GetAC(oTarget);
|
||||
string PCPlayerName = GetPCPlayerName(oTarget);
|
||||
string sAreaName = GetName(GetArea(oTarget));
|
||||
for(pos=1; pos<4; pos++)
|
||||
{
|
||||
class = GetClassByPosition(pos, oTarget);
|
||||
if (class != CLASS_TYPE_INVALID)
|
||||
{
|
||||
cname = Get2DAString("classes", "Label", class);
|
||||
if (cname == "") cname = "unknown (" + IntToString(class) + ")";
|
||||
sLevel = sLevel + cname +"<c<><63><EFBFBD>> "+"<c<><63><EFBFBD>>(<c<01>>"+ IntToString(GetLevelByClass(class, oTarget))+"<c<><63><EFBFBD>>)" + " <c<><63><EFBFBD>>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Display Name
|
||||
sMessage = " ";
|
||||
|
||||
sMessage = "<c<01>>:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:";
|
||||
|
||||
sMessage +="\n"+"<c<01>>"+Name;
|
||||
|
||||
sMessage +="\n"+sLevel;
|
||||
|
||||
sMessage +="\n"+"AC:<c<01>> "+IntToString(AC);
|
||||
|
||||
sMessage +="\n"+"<c<><63><EFBFBD>>HP: <c<01>>"+IntToString(Hitpoints);
|
||||
|
||||
|
||||
// Set Token and Info//
|
||||
|
||||
SetLocalString(oTarget,"playerinfo",sMessage);
|
||||
SetLocalInt(oTarget,"bootlist",nLoop);
|
||||
int Token = GetLocalInt(oTarget,"bootlist");
|
||||
string Info = GetLocalString(oTarget,"playerinfo");
|
||||
SetCustomToken(Token,Info);
|
||||
|
||||
//Continue the loop
|
||||
oTarget = GetNextPC();
|
||||
}
|
||||
|
||||
//Main Script End
|
||||
}
|
9
_module/nss/always_false.nss
Normal file
9
_module/nss/always_false.nss
Normal file
@@ -0,0 +1,9 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if ((2+2) == 5)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
21
_module/nss/cannot_relevel.nss
Normal file
21
_module/nss/cannot_relevel.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName cannot_relevel
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 3/9/2009 7:33:09 PM
|
||||
//:://////////////////////////////////////////////
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
// Restrict based on the player's class
|
||||
int iPassed = 0;
|
||||
if(GetLevelByClass(CLASS_TYPE_PALE_MASTER, GetPCSpeaker()) >= 1)
|
||||
iPassed = 1;
|
||||
if((iPassed == 0) && (GetLevelByClass(CLASS_TYPE_DRAGON_DISCIPLE, GetPCSpeaker()) >= 1))
|
||||
iPassed = 1;
|
||||
if(iPassed == 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
8
_module/nss/changeportrait.nss
Normal file
8
_module/nss/changeportrait.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
int nPortraitType = GetPortraitId(oTarget) - 1;
|
||||
SetPortraitId(oTarget, nPortraitType);
|
||||
}
|
6
_module/nss/color_chat_off.nss
Normal file
6
_module/nss/color_chat_off.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
string sStop = "CHAT_OFF";
|
||||
SetLocalInt(oPC, sStop, 1);
|
||||
}
|
6
_module/nss/color_chat_on.nss
Normal file
6
_module/nss/color_chat_on.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
string sStop = "CHAT_OFF";
|
||||
SetLocalInt(oPC, sStop, 0);
|
||||
}
|
9
_module/nss/dm_only.nss
Normal file
9
_module/nss/dm_only.nss
Normal file
@@ -0,0 +1,9 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
if(GetIsDM(oPC))
|
||||
return TRUE;
|
||||
|
||||
else
|
||||
return FALSE;
|
||||
}
|
11
_module/nss/dm_reads_line.nss
Normal file
11
_module/nss/dm_reads_line.nss
Normal file
@@ -0,0 +1,11 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
object oSpeaker = GetPCSpeaker();
|
||||
|
||||
//Show this line in the conversation ONLY if it's a DM!
|
||||
if(GetIsDM(oSpeaker))
|
||||
return TRUE;
|
||||
|
||||
//Otherwise Don't show the line to anyone else!
|
||||
return FALSE;
|
||||
}
|
117
_module/nss/do_partyroll.nss
Normal file
117
_module/nss/do_partyroll.nss
Normal file
@@ -0,0 +1,117 @@
|
||||
//Script Name: do_partyroll
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/25/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
ALL Of the functions within were taken
|
||||
from the DMFI Project By FunkySwerve's
|
||||
fky_chat includes, awesome stuff!
|
||||
*/
|
||||
//::////////////////////////////////////////////////////////////////////////:://
|
||||
//:: Functions from Higher Ground's fky_chat/ dmfi Project
|
||||
//:: Designed By: FunkySwerve :://
|
||||
//:: Designed On: April 4 2006
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const string ESCAPE_STRING = "&&";
|
||||
|
||||
const string COLOR_END = "</c>";
|
||||
const string COLOR_GREEN = "<c <20>d>"; //tells - acid
|
||||
const string COLOR_RED = "<c<><<>";
|
||||
const string COLOR_RED2 = "<c<>>"; //fire damage
|
||||
const string COLOR_WHITE = "<c<><63><EFBFBD>>";
|
||||
const string COLOR_BLUE = "<c!}<7D>>"; //electrical damage
|
||||
const string COLOR_PURPLE = "<c<><EFBFBD>>"; //names
|
||||
const string COLOR_LT_PURPLE = "<c<><EFBFBD>>";
|
||||
const string COLOR_LT_GREEN = "<c<><63>d>";
|
||||
const string COLOR_ORANGE = "<c<><63>2>";
|
||||
const string COLOR_GOLD = "<c<><63>P>"; //shouts
|
||||
const string COLOR_YELLOW = "<c<><63>>"; //send message to pc default (server messages)
|
||||
const string COLOR_LT_BLUE = "<c<10><>>"; //dm channel
|
||||
const string COLOR_LT_BLUE2 = "<c<><63><EFBFBD>>"; //cold damage
|
||||
const string NEWLINE = "\n";
|
||||
|
||||
const string ROLL1 = " rolled a [";
|
||||
const string ROLL2 = "] and got a: [";
|
||||
const string ROLLGOOD = "Wow! Nice roll!";
|
||||
|
||||
int GetHighestItemFromArray(object oPC, int nNumberInArray)
|
||||
{
|
||||
|
||||
string sString, sInt, sAdd;
|
||||
int nInt, nNum;
|
||||
int nHighest = -1;
|
||||
int nArrayNum = 0;
|
||||
for (nInt = 1; nInt <= nNumberInArray; nInt++)
|
||||
{
|
||||
sInt = IntToString(nInt);
|
||||
sString = GetLocalString(oPC, "PRMember"+sInt);
|
||||
if (sString != "")
|
||||
{
|
||||
nNum = StringToInt(GetStringLeft(sString, 2));
|
||||
if (nNum > nHighest)
|
||||
{
|
||||
nHighest = nNum;
|
||||
nArrayNum = nInt;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nArrayNum;
|
||||
}
|
||||
void DoPartyRoll(object oPlayer)
|
||||
{
|
||||
object oLeader = GetFactionLeader(oPlayer);
|
||||
object oPartymember;
|
||||
int nRoll, nInt, nNumberItemsInArray, nNumBase, nTopRoller;
|
||||
int nCount = 0;
|
||||
string sInt, sBase, sNumBase, sLine, sRoll, sName;
|
||||
string sMessage = "";
|
||||
if (oPlayer == oLeader)//only leader can roll
|
||||
{
|
||||
oPartymember = GetFirstFactionMember(oPlayer);
|
||||
//oPartymember = GetFirstItemInInventory(oPlayer);
|
||||
while (GetIsObjectValid(oPartymember))//generate the 'array'
|
||||
{
|
||||
nCount++;//get number in party
|
||||
nRoll = Random(100);
|
||||
sRoll = IntToString(nRoll);
|
||||
if (GetStringLength(sRoll) == 1) sRoll = "0" + sRoll;//ensure that string length is consistent
|
||||
sInt = IntToString(nCount);
|
||||
SetLocalString(oPlayer, "PRMember"+sInt, sRoll+GetName(oPartymember));
|
||||
oPartymember = GetNextFactionMember(oPlayer);
|
||||
//oPartymember = GetNextItemInInventory(oPlayer);
|
||||
}
|
||||
nNumberItemsInArray = nCount;
|
||||
for (nInt = 1; nInt <= nCount; nInt++) //once through for each member of the party
|
||||
{
|
||||
//find the highest number
|
||||
nTopRoller = GetHighestItemFromArray(oPlayer, nNumberItemsInArray);
|
||||
//add it to the string along with their name
|
||||
sBase = GetLocalString(oPlayer, "PRMember"+IntToString(nTopRoller));
|
||||
nNumBase = StringToInt(GetStringLeft(sBase, 2));
|
||||
nNumBase++;//add 1 to simulate 1 to 100 roll instead of 0 to 99
|
||||
sNumBase = IntToString(nNumBase);
|
||||
sName = GetStringRight(sBase, (GetStringLength(sBase) - 2));
|
||||
//sLine = sName + " rolled a " + sNumBase + ".\n";
|
||||
sLine = COLOR_WHITE+sName+ROLL1+COLOR_END+COLOR_GREEN+"D100"+COLOR_END+COLOR_WHITE+ROLL2+COLOR_END+COLOR_GOLD+sNumBase+COLOR_END+COLOR_WHITE+"].\n";
|
||||
sMessage += sLine;
|
||||
//delete that array entry, no need to pack it
|
||||
DeleteLocalString(oPlayer, "PRMember"+IntToString(nTopRoller));
|
||||
}
|
||||
//Send the final message to the party
|
||||
AssignCommand(oPlayer, SpeakString(COLOR_GOLD + "Party Roll: "+ COLOR_END + sMessage));
|
||||
oPartymember = GetFirstFactionMember(oPlayer);
|
||||
while (GetIsObjectValid(oPartymember))
|
||||
{
|
||||
SendMessageToPC(oPartymember, sMessage);
|
||||
oPartymember = GetNextFactionMember(oPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
DoPartyRoll(oPC);
|
||||
}
|
18
_module/nss/dye_cloth1.nss
Normal file
18
_module/nss/dye_cloth1.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Cloth 1
|
||||
//:: dye_cloth1.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the material to be died to Cloth 1.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "MaterialToDye", ITEM_APPR_ARMOR_COLOR_CLOTH1);
|
||||
}
|
18
_module/nss/dye_cloth2.nss
Normal file
18
_module/nss/dye_cloth2.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Cloth 2
|
||||
//:: dye_cloth2.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the material to be died to Cloth 2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "MaterialToDye", ITEM_APPR_ARMOR_COLOR_CLOTH2);
|
||||
}
|
20
_module/nss/dye_color0.nss
Normal file
20
_module/nss/dye_color0.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 0
|
||||
//:: dye_color0.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 0.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 0);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color1.nss
Normal file
20
_module/nss/dye_color1.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 1
|
||||
//:: dye_color1.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 1.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 1);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color2.nss
Normal file
20
_module/nss/dye_color2.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 2
|
||||
//:: dye_color2.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 2);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color3.nss
Normal file
20
_module/nss/dye_color3.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 3
|
||||
//:: dye_color3.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 3.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 3);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color4.nss
Normal file
20
_module/nss/dye_color4.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 4
|
||||
//:: dye_color4.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 4.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 4);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color5.nss
Normal file
20
_module/nss/dye_color5.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 5
|
||||
//:: dye_color5.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 5.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 5);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color6.nss
Normal file
20
_module/nss/dye_color6.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 6
|
||||
//:: dye_color6.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 6.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 6);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
20
_module/nss/dye_color7.nss
Normal file
20
_module/nss/dye_color7.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Color 7
|
||||
//:: dye_color7.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color to 7.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorToDye", 7);
|
||||
|
||||
ExecuteScript("dye_dyeitem", oPC);
|
||||
}
|
18
_module/nss/dye_group0.nss
Normal file
18
_module/nss/dye_group0.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 0
|
||||
//:: dye_group0.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 0.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 0);
|
||||
}
|
18
_module/nss/dye_group1.nss
Normal file
18
_module/nss/dye_group1.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 1
|
||||
//:: dye_group1.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 1.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 1);
|
||||
}
|
6
_module/nss/dye_group10.nss
Normal file
6
_module/nss/dye_group10.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 10);
|
||||
}
|
6
_module/nss/dye_group11.nss
Normal file
6
_module/nss/dye_group11.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 11);
|
||||
}
|
6
_module/nss/dye_group12.nss
Normal file
6
_module/nss/dye_group12.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 12);
|
||||
}
|
6
_module/nss/dye_group13.nss
Normal file
6
_module/nss/dye_group13.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 13);
|
||||
}
|
6
_module/nss/dye_group14.nss
Normal file
6
_module/nss/dye_group14.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 14);
|
||||
}
|
6
_module/nss/dye_group15.nss
Normal file
6
_module/nss/dye_group15.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 15);
|
||||
}
|
6
_module/nss/dye_group16.nss
Normal file
6
_module/nss/dye_group16.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 16);
|
||||
}
|
6
_module/nss/dye_group17.nss
Normal file
6
_module/nss/dye_group17.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 17);
|
||||
}
|
6
_module/nss/dye_group18.nss
Normal file
6
_module/nss/dye_group18.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 18);
|
||||
}
|
6
_module/nss/dye_group19.nss
Normal file
6
_module/nss/dye_group19.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 19);
|
||||
}
|
18
_module/nss/dye_group2.nss
Normal file
18
_module/nss/dye_group2.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 2
|
||||
//:: dye_group2.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 2);
|
||||
}
|
6
_module/nss/dye_group20.nss
Normal file
6
_module/nss/dye_group20.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 20);
|
||||
}
|
6
_module/nss/dye_group21.nss
Normal file
6
_module/nss/dye_group21.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 21);
|
||||
}
|
18
_module/nss/dye_group3.nss
Normal file
18
_module/nss/dye_group3.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 3
|
||||
//:: dye_group3.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 3.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 3);
|
||||
}
|
18
_module/nss/dye_group4.nss
Normal file
18
_module/nss/dye_group4.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 4
|
||||
//:: dye_group4.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 4.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 4);
|
||||
}
|
18
_module/nss/dye_group5.nss
Normal file
18
_module/nss/dye_group5.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 5
|
||||
//:: dye_group5.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 5.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 5);
|
||||
}
|
18
_module/nss/dye_group6.nss
Normal file
18
_module/nss/dye_group6.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 6
|
||||
//:: dye_group6.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 6.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 6);
|
||||
}
|
18
_module/nss/dye_group7.nss
Normal file
18
_module/nss/dye_group7.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Group 7
|
||||
//:: dye_group7.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sets the color group to 7.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 7);
|
||||
}
|
6
_module/nss/dye_group8.nss
Normal file
6
_module/nss/dye_group8.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 8);
|
||||
}
|
6
_module/nss/dye_group9.nss
Normal file
6
_module/nss/dye_group9.nss
Normal file
@@ -0,0 +1,6 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ColorGroup", 9);
|
||||
}
|
473
_module/nss/dye_itemchest.nss
Normal file
473
_module/nss/dye_itemchest.nss
Normal file
@@ -0,0 +1,473 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Item = Chest
|
||||
//:: dye_itemchest.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the item to be died to the chest slot.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 9, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
string ClothColor(int iColor);
|
||||
string MetalColor(int iColor);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ItemToDye", INVENTORY_SLOT_CHEST);
|
||||
|
||||
object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
|
||||
|
||||
if (GetIsObjectValid(oItem)) {
|
||||
int iLeather1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_LEATHER1);
|
||||
int iLeather2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_LEATHER2);
|
||||
int iCloth1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_CLOTH1);
|
||||
int iCloth2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_CLOTH2);
|
||||
int iMetal1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_METAL1);
|
||||
int iMetal2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_METAL2);
|
||||
|
||||
string sOutput = "Leather 1: " + ClothColor(iLeather1);
|
||||
sOutput += "\n" + "Leather 2: " + ClothColor(iLeather2);
|
||||
sOutput += "\n" + "Cloth 1: " + ClothColor(iCloth1);
|
||||
sOutput += "\n" + "Cloth 2: " + ClothColor(iCloth2);
|
||||
sOutput += "\n" + "Metal 1: " + MetalColor(iMetal1);
|
||||
sOutput += "\n" + "Metal 2: " + MetalColor(iMetal2);
|
||||
|
||||
SendMessageToPC(oPC, sOutput);
|
||||
}
|
||||
}
|
||||
|
||||
string ClothColor(int iColor) {
|
||||
switch (iColor) {
|
||||
case 00: return "Lightest Tan/Brown";
|
||||
case 01: return "Light Tan/Brown";
|
||||
case 02: return "Dark Tan/Brown";
|
||||
case 03: return "Darkest Tan/Brown";
|
||||
|
||||
case 04: return "Lightest Tan/Red";
|
||||
case 05: return "Light Tan/Red";
|
||||
case 06: return "Dark Tan/Red";
|
||||
case 07: return "Darkest Tan/Red";
|
||||
|
||||
case 08: return "Lightest Tan/Yellow";
|
||||
case 09: return "Light Tan/Yellow";
|
||||
case 10: return "Dark Tan/Yellow";
|
||||
case 11: return "Darkest Tan/Yellow";
|
||||
|
||||
case 12: return "Lightest Tan/Grey";
|
||||
case 13: return "Light Tan/Grey";
|
||||
case 14: return "Dark Tan/Grey";
|
||||
case 15: return "Darkest Tan/Grey";
|
||||
|
||||
case 16: return "Lightest Olive";
|
||||
case 17: return "Light Olive";
|
||||
case 18: return "Dark Olive";
|
||||
case 19: return "Darkest Olive";
|
||||
|
||||
case 20: return "White";
|
||||
case 21: return "Light Grey";
|
||||
case 22: return "Dark Grey";
|
||||
case 23: return "Charcoal";
|
||||
|
||||
case 24: return "Light Blue";
|
||||
case 25: return "Dark Blue";
|
||||
|
||||
case 26: return "Light Aqua";
|
||||
case 27: return "Dark Aqua";
|
||||
|
||||
case 28: return "Light Teal";
|
||||
case 29: return "Dark Teal";
|
||||
|
||||
case 30: return "Light Green";
|
||||
case 31: return "Dark Green";
|
||||
|
||||
case 32: return "Light Yellow";
|
||||
case 33: return "Dark Yellow";
|
||||
|
||||
case 34: return "Light Orange";
|
||||
case 35: return "Dark Orange";
|
||||
|
||||
case 36: return "Light Red";
|
||||
case 37: return "Dark Red";
|
||||
|
||||
case 38: return "Light Pink";
|
||||
case 39: return "Dark Pink";
|
||||
|
||||
case 40: return "Light Purple";
|
||||
case 41: return "Dark Purple";
|
||||
|
||||
case 42: return "Light Violet";
|
||||
case 43: return "Dark Violet";
|
||||
|
||||
case 44: return "Shiny White";
|
||||
case 45: return "Shiny Black";
|
||||
|
||||
case 46: return "Shiny Blue";
|
||||
case 47: return "Shiny Aqua";
|
||||
|
||||
case 48: return "Shiny Teal";
|
||||
case 49: return "Shiny Green";
|
||||
|
||||
case 50: return "Shiny Yellow";
|
||||
case 51: return "Shiny Orange";
|
||||
|
||||
case 52: return "Shiny Red";
|
||||
case 53: return "Shiny Pink";
|
||||
|
||||
case 54: return "Shiny Purple";
|
||||
case 55: return "Shiny Violet";
|
||||
|
||||
case 56: return "Hidden: Silver";
|
||||
case 57: return "Hidden: Obsidian";
|
||||
case 58: return "Hidden: Gold";
|
||||
case 59: return "Hidden: Copper";
|
||||
case 60: return "Hidden: Grey";
|
||||
case 61: return "Hidden: Mirror";
|
||||
case 62: return "Hidden: Pure White";
|
||||
case 63: return "Hidden: Pure Black";
|
||||
|
||||
case 64: return "Metallic Mauve";
|
||||
case 65: return "Greyed Metallic Mauve";
|
||||
case 66: return "Metallic Gold";
|
||||
case 67: return "Greyed Metallic Gold";
|
||||
case 68: return "Metallic Green";
|
||||
case 69: return "Greyed Metallic Green";
|
||||
case 70: return "Metallic Indigo";
|
||||
case 71: return "Greyed Metallic Indigo";
|
||||
|
||||
case 72: return "Metallic Violet";
|
||||
case 73: return "Greyed Metallic Violet";
|
||||
case 74: return "Metallic Brown";
|
||||
case 75: return "Greyed Metallic Brown";
|
||||
case 76: return "Metallic Teal";
|
||||
case 77: return "Greyed Metallic Teal";
|
||||
case 78: return "Metallic Blue";
|
||||
case 79: return "Greyed Metallic Blue";
|
||||
|
||||
case 80: return "Metallic Olive";
|
||||
case 81: return "Greyed Metallic Olive";
|
||||
case 82: return "Metallic Aqua";
|
||||
case 83: return "Greyed Metallic Aqua";
|
||||
case 84: return "Greyed Metallic Fern Green";
|
||||
case 85: return "Metallic Marshland";
|
||||
case 86: return "Greyed Metallic Marshland";
|
||||
case 87: return "Metallic Fern Green";
|
||||
|
||||
case 88: return "Lightest Metallic Red";
|
||||
case 89: return "Light Metallic Red";
|
||||
case 90: return "Metallic Red";
|
||||
case 91: return "Dark Metallic Red";
|
||||
case 92: return "Lightest Metallic Yellow";
|
||||
case 93: return "Light Metallic Yellow";
|
||||
case 94: return "Metallic Yellow";
|
||||
case 95: return "Dark Metallic Yellow";
|
||||
|
||||
case 96: return "Lightest Mauve";
|
||||
case 97: return "Light Mauve";
|
||||
case 98: return "Mauve";
|
||||
case 99: return "Dark Mauve";
|
||||
case 100: return "Lightest Sangria";
|
||||
case 101: return "Light Sangria";
|
||||
case 102: return "Sangria";
|
||||
case 103: return "Dark Sangria";
|
||||
|
||||
case 104: return "Lightest Forest Green";
|
||||
case 105: return "Light Forest Green";
|
||||
case 106: return "Forest Green";
|
||||
case 107: return "Dark Forest Green";
|
||||
case 108: return "Lightest Clover";
|
||||
case 109: return "Light Clover";
|
||||
case 110: return "Clover";
|
||||
case 111: return "Dark Clover";
|
||||
|
||||
case 112: return "Lightest Marshland";
|
||||
case 113: return "Light Marshland";
|
||||
case 114: return "Marshland";
|
||||
case 115: return "Dark Marshland";
|
||||
case 116: return "Lighest Sienna";
|
||||
case 117: return "Light Sienna";
|
||||
case 118: return "Sienna";
|
||||
case 119: return "Dark Sienna";
|
||||
|
||||
case 120: return "Lightest Acorn";
|
||||
case 121: return "Light Acorn";
|
||||
case 122: return "Acorn";
|
||||
case 123: return "Dark Acorn";
|
||||
case 124: return "Lightest Gondola";
|
||||
case 125: return "Light Gondola";
|
||||
case 126: return "Gondola";
|
||||
case 127: return "Dark Gondola";
|
||||
|
||||
case 128: return "Lightest Ash Brown";
|
||||
case 129: return "Light Ash Brown";
|
||||
case 130: return "Ash Brown";
|
||||
case 131: return "Dark Ash Brown";
|
||||
case 132: return "Lightest Mirage";
|
||||
case 133: return "Light Mirage";
|
||||
case 134: return "Mirage";
|
||||
case 135: return "Dark Mirage";
|
||||
|
||||
case 136: return "Lightest Midnight Blue";
|
||||
case 137: return "Light Midnight Blue";
|
||||
case 138: return "Midnight Blue";
|
||||
case 139: return "Dark Midnight Blue";
|
||||
case 140: return "Lightest Dull Teal";
|
||||
case 141: return "Light Dull Teal";
|
||||
case 142: return "Dull Teal";
|
||||
case 143: return "Dark Dull Teal";
|
||||
|
||||
case 144: return "Lightest Magenta";
|
||||
case 145: return "Light Magenta";
|
||||
case 146: return "Magenta";
|
||||
case 147: return "Dark Magenta";
|
||||
case 148: return "Light Sky Blue";
|
||||
case 149: return "Sky Blue";
|
||||
case 150: return "Light Mosque";
|
||||
case 151: return "Mosque";
|
||||
|
||||
case 152: return "Light Sap Green";
|
||||
case 153: return "Sap Green";
|
||||
case 154: return "Light Buttered Rum";
|
||||
case 155: return "Buttered Rum";
|
||||
case 156: return "Light Burnt Sienna";
|
||||
case 157: return "Burnt Sienna";
|
||||
case 158: return "Light Cherrywood";
|
||||
case 159: return "Cherrywood";
|
||||
|
||||
case 160: return "Light Blackberry";
|
||||
case 161: return "Blackberry";
|
||||
case 162: return "Firebrick";
|
||||
case 163: return "Flirt";
|
||||
case 164: return "Pale Sky";
|
||||
case 165: return "Raincloud";
|
||||
case 166: return "Snow";
|
||||
case 167: return "Pine Tree";
|
||||
|
||||
case 168: return "Light Black Bean";
|
||||
case 169: return "Black Bean";
|
||||
case 170: return "Valentino";
|
||||
case 171: return "Ebony Clay";
|
||||
case 172: return "Black Forest";
|
||||
case 173: return "Dark Cedar";
|
||||
case 174: return "Wood Brown";
|
||||
case 175: return "Speckled Gold";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
string MetalColor(int iColor) {
|
||||
switch (iColor) {
|
||||
case 00: return "Lightest Shiny Silver";
|
||||
case 01: return "Light Shiny Silver";
|
||||
case 02: return "Dark Shiny Obsidian";
|
||||
case 03: return "Darkest Shiny Obsidian";
|
||||
|
||||
case 04: return "Lightest Dull Silver";
|
||||
case 05: return "Light Dull Silver";
|
||||
case 06: return "Dark Dull Obsidian";
|
||||
case 07: return "Darkest Dull Obsidian";
|
||||
|
||||
case 08: return "Lightest Gold";
|
||||
case 09: return "Light Gold";
|
||||
case 10: return "Dark Gold";
|
||||
case 11: return "Darkest Gold";
|
||||
|
||||
case 12: return "Lightest Celestial Gold";
|
||||
case 13: return "Light Celestial Gold";
|
||||
case 14: return "Dark Celestial Gold";
|
||||
case 15: return "Darkest Celestial Gold";
|
||||
|
||||
case 16: return "Lightest Copper";
|
||||
case 17: return "Light Copper";
|
||||
case 18: return "Dark Copper";
|
||||
case 19: return "Darkest Copper";
|
||||
|
||||
case 20: return "Lightest Brass";
|
||||
case 21: return "Light Brass";
|
||||
case 22: return "Dark Brass";
|
||||
case 23: return "Darkest Brass";
|
||||
|
||||
case 24: return "Light Red";
|
||||
case 25: return "Dark Red";
|
||||
case 26: return "Light Dull Red";
|
||||
case 27: return "Dark Dull Red";
|
||||
|
||||
case 28: return "Light Purple";
|
||||
case 29: return "Dark Purple";
|
||||
case 30: return "Light Dull Purple";
|
||||
case 31: return "Dark Dull Purple";
|
||||
|
||||
case 32: return "Light Blue";
|
||||
case 33: return "Dark Blue";
|
||||
case 34: return "Light Dull Blue";
|
||||
case 35: return "Dark Dull Blue";
|
||||
|
||||
case 36: return "Light Teal";
|
||||
case 37: return "Dark Teal";
|
||||
case 38: return "Light Dull Teal";
|
||||
case 39: return "Dark Dull Teal";
|
||||
|
||||
case 40: return "Light Green";
|
||||
case 41: return "Dark Green";
|
||||
case 42: return "Light Dull Green";
|
||||
case 43: return "Dark Dull Green";
|
||||
|
||||
case 44: return "Light Olive";
|
||||
case 45: return "Dark Olive";
|
||||
case 46: return "Light Dull Olive";
|
||||
case 47: return "Dark Dull Olive";
|
||||
|
||||
case 48: return "Light Prismatic";
|
||||
case 49: return "Dark Prismatic";
|
||||
|
||||
case 50: return "Lightest Rust";
|
||||
case 51: return "Light Rust";
|
||||
case 52: return "Dark Rust";
|
||||
case 53: return "Darkest Rust";
|
||||
|
||||
case 54: return "Light Aged Metal";
|
||||
case 55: return "Dark Aged Metal";
|
||||
|
||||
case 56: return "Hidden: Silver";
|
||||
case 57: return "Hidden: Obsidian";
|
||||
case 58: return "Hidden: Gold";
|
||||
case 59: return "Hidden: Copper";
|
||||
case 60: return "Hidden: Grey";
|
||||
case 61: return "Hidden: Mirror";
|
||||
case 62: return "Hidden: Pure White";
|
||||
case 63: return "Hidden: Pure Black";
|
||||
|
||||
case 64: return "Shiny Mauve";
|
||||
case 65: return "Greyed Shiny Mauve";
|
||||
case 66: return "Shiny Gold";
|
||||
case 67: return "Greyed Shiny Gold";
|
||||
case 68: return "Shiny Green";
|
||||
case 69: return "Greyed Shiny Green";
|
||||
case 70: return "Shiny Indigo";
|
||||
case 71: return "Greyed Shiny Indigo";
|
||||
|
||||
case 72: return "Shiny Violet";
|
||||
case 73: return "Greyed Shiny Violet";
|
||||
case 74: return "Shiny Brown";
|
||||
case 75: return "Greyed Shiny Brown";
|
||||
case 76: return "Shiny Teal";
|
||||
case 77: return "Greyed Shiny Teal";
|
||||
case 78: return "Shiny Blue";
|
||||
case 79: return "Greyed Shiny Blue";
|
||||
|
||||
case 80: return "Shiny Olive";
|
||||
case 81: return "Greyed Shiny Olive";
|
||||
case 82: return "Shiny Aqua";
|
||||
case 83: return "Greyed Shiny Aqua";
|
||||
case 84: return "Greyed Shiny Fern Green";
|
||||
case 85: return "Shiny Marshland";
|
||||
case 86: return "Greyed Shiny Marshland";
|
||||
case 87: return "Shiny Fern Green";
|
||||
|
||||
case 88: return "Lightest Shiny Red";
|
||||
case 89: return "Light Shiny Red";
|
||||
case 90: return "Shiny Red";
|
||||
case 91: return "Dark Shiny Red";
|
||||
case 92: return "Lightest Shiny Yellow";
|
||||
case 93: return "Light Shiny Yellow";
|
||||
case 94: return "Shiny Yellow";
|
||||
case 95: return "Dark Shiny Yellow";
|
||||
|
||||
case 96: return "Lightest Mauve";
|
||||
case 97: return "Light Mauve";
|
||||
case 98: return "Mauve";
|
||||
case 99: return "Dark Mauve";
|
||||
case 100: return "Lightest Sangria";
|
||||
case 101: return "Light Sangria";
|
||||
case 102: return "Sangria";
|
||||
case 103: return "Dark Sangria";
|
||||
|
||||
case 104: return "Lightest Forest Green";
|
||||
case 105: return "Light Forest Green";
|
||||
case 106: return "Forest Green";
|
||||
case 107: return "Dark Forest Green";
|
||||
case 108: return "Lightest Clover";
|
||||
case 109: return "Light Clover";
|
||||
case 110: return "Clover";
|
||||
case 111: return "Dark Clover";
|
||||
|
||||
case 112: return "Lightest Marshland";
|
||||
case 113: return "Light Marshland";
|
||||
case 114: return "Marshland";
|
||||
case 115: return "Dark Marshland";
|
||||
case 116: return "Lighest Sienna";
|
||||
case 117: return "Light Sienna";
|
||||
case 118: return "Sienna";
|
||||
case 119: return "Dark Sienna";
|
||||
|
||||
case 120: return "Lightest Acorn";
|
||||
case 121: return "Light Acorn";
|
||||
case 122: return "Acorn";
|
||||
case 123: return "Dark Acorn";
|
||||
case 124: return "Lightest Gondola";
|
||||
case 125: return "Light Gondola";
|
||||
case 126: return "Gondola";
|
||||
case 127: return "Dark Gondola";
|
||||
|
||||
case 128: return "Lightest Ash Brown";
|
||||
case 129: return "Light Ash Brown";
|
||||
case 130: return "Ash Brown";
|
||||
case 131: return "Dark Ash Brown";
|
||||
case 132: return "Lightest Mirage";
|
||||
case 133: return "Light Mirage";
|
||||
case 134: return "Mirage";
|
||||
case 135: return "Dark Mirage";
|
||||
|
||||
case 136: return "Lightest Midnight Blue";
|
||||
case 137: return "Light Midnight Blue";
|
||||
case 138: return "Midnight Blue";
|
||||
case 139: return "Dark Midnight Blue";
|
||||
case 140: return "Lightest Dull Teal";
|
||||
case 141: return "Light Dull Teal";
|
||||
case 142: return "Dull Teal";
|
||||
case 143: return "Dark Dull Teal";
|
||||
|
||||
case 144: return "Lightest Magenta";
|
||||
case 145: return "Light Magenta";
|
||||
case 146: return "Magenta";
|
||||
case 147: return "Dark Magenta";
|
||||
case 148: return "Light Sky Blue";
|
||||
case 149: return "Sky Blue";
|
||||
case 150: return "Light Mosque";
|
||||
case 151: return "Mosque";
|
||||
|
||||
case 152: return "Light Sap Green";
|
||||
case 153: return "Sap Green";
|
||||
case 154: return "Light Buttered Rum";
|
||||
case 155: return "Buttered Rum";
|
||||
case 156: return "Light Burnt Sienna";
|
||||
case 157: return "Burnt Sienna";
|
||||
case 158: return "Light Cherrywood";
|
||||
case 159: return "Cherrywood";
|
||||
|
||||
case 160: return "Light Blackberry";
|
||||
case 161: return "Blackberry";
|
||||
case 162: return "Firebrick";
|
||||
case 163: return "Flirt";
|
||||
case 164: return "Pale Sky";
|
||||
case 165: return "Raincloud";
|
||||
case 166: return "Snow";
|
||||
case 167: return "Pine Tree";
|
||||
|
||||
case 168: return "Light Black Bean";
|
||||
case 169: return "Black Bean";
|
||||
case 170: return "Valentino";
|
||||
case 171: return "Ebony Clay";
|
||||
case 172: return "Black Forest";
|
||||
case 173: return "Dark Cedar";
|
||||
case 174: return "Wood Brown";
|
||||
case 175: return "Speckled Gold";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
473
_module/nss/dye_itemcloak.nss
Normal file
473
_module/nss/dye_itemcloak.nss
Normal file
@@ -0,0 +1,473 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Item = Chest
|
||||
//:: dye_itemchest.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the item to be died to the chest slot.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 9, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
string ClothColor(int iColor);
|
||||
string MetalColor(int iColor);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ItemToDye", INVENTORY_SLOT_CLOAK);
|
||||
|
||||
object oItem = GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC);
|
||||
|
||||
if (GetIsObjectValid(oItem)) {
|
||||
int iLeather1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_LEATHER1);
|
||||
int iLeather2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_LEATHER2);
|
||||
int iCloth1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_CLOTH1);
|
||||
int iCloth2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_CLOTH2);
|
||||
int iMetal1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_METAL1);
|
||||
int iMetal2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_METAL2);
|
||||
|
||||
string sOutput = "Leather 1: " + ClothColor(iLeather1);
|
||||
sOutput += "\n" + "Leather 2: " + ClothColor(iLeather2);
|
||||
sOutput += "\n" + "Cloth 1: " + ClothColor(iCloth1);
|
||||
sOutput += "\n" + "Cloth 2: " + ClothColor(iCloth2);
|
||||
sOutput += "\n" + "Metal 1: " + MetalColor(iMetal1);
|
||||
sOutput += "\n" + "Metal 2: " + MetalColor(iMetal2);
|
||||
|
||||
SendMessageToPC(oPC, sOutput);
|
||||
}
|
||||
}
|
||||
|
||||
string ClothColor(int iColor) {
|
||||
switch (iColor) {
|
||||
case 00: return "Lightest Tan/Brown";
|
||||
case 01: return "Light Tan/Brown";
|
||||
case 02: return "Dark Tan/Brown";
|
||||
case 03: return "Darkest Tan/Brown";
|
||||
|
||||
case 04: return "Lightest Tan/Red";
|
||||
case 05: return "Light Tan/Red";
|
||||
case 06: return "Dark Tan/Red";
|
||||
case 07: return "Darkest Tan/Red";
|
||||
|
||||
case 08: return "Lightest Tan/Yellow";
|
||||
case 09: return "Light Tan/Yellow";
|
||||
case 10: return "Dark Tan/Yellow";
|
||||
case 11: return "Darkest Tan/Yellow";
|
||||
|
||||
case 12: return "Lightest Tan/Grey";
|
||||
case 13: return "Light Tan/Grey";
|
||||
case 14: return "Dark Tan/Grey";
|
||||
case 15: return "Darkest Tan/Grey";
|
||||
|
||||
case 16: return "Lightest Olive";
|
||||
case 17: return "Light Olive";
|
||||
case 18: return "Dark Olive";
|
||||
case 19: return "Darkest Olive";
|
||||
|
||||
case 20: return "White";
|
||||
case 21: return "Light Grey";
|
||||
case 22: return "Dark Grey";
|
||||
case 23: return "Charcoal";
|
||||
|
||||
case 24: return "Light Blue";
|
||||
case 25: return "Dark Blue";
|
||||
|
||||
case 26: return "Light Aqua";
|
||||
case 27: return "Dark Aqua";
|
||||
|
||||
case 28: return "Light Teal";
|
||||
case 29: return "Dark Teal";
|
||||
|
||||
case 30: return "Light Green";
|
||||
case 31: return "Dark Green";
|
||||
|
||||
case 32: return "Light Yellow";
|
||||
case 33: return "Dark Yellow";
|
||||
|
||||
case 34: return "Light Orange";
|
||||
case 35: return "Dark Orange";
|
||||
|
||||
case 36: return "Light Red";
|
||||
case 37: return "Dark Red";
|
||||
|
||||
case 38: return "Light Pink";
|
||||
case 39: return "Dark Pink";
|
||||
|
||||
case 40: return "Light Purple";
|
||||
case 41: return "Dark Purple";
|
||||
|
||||
case 42: return "Light Violet";
|
||||
case 43: return "Dark Violet";
|
||||
|
||||
case 44: return "Shiny White";
|
||||
case 45: return "Shiny Black";
|
||||
|
||||
case 46: return "Shiny Blue";
|
||||
case 47: return "Shiny Aqua";
|
||||
|
||||
case 48: return "Shiny Teal";
|
||||
case 49: return "Shiny Green";
|
||||
|
||||
case 50: return "Shiny Yellow";
|
||||
case 51: return "Shiny Orange";
|
||||
|
||||
case 52: return "Shiny Red";
|
||||
case 53: return "Shiny Pink";
|
||||
|
||||
case 54: return "Shiny Purple";
|
||||
case 55: return "Shiny Violet";
|
||||
|
||||
case 56: return "Hidden: Silver";
|
||||
case 57: return "Hidden: Obsidian";
|
||||
case 58: return "Hidden: Gold";
|
||||
case 59: return "Hidden: Copper";
|
||||
case 60: return "Hidden: Grey";
|
||||
case 61: return "Hidden: Mirror";
|
||||
case 62: return "Hidden: Pure White";
|
||||
case 63: return "Hidden: Pure Black";
|
||||
|
||||
case 64: return "Metallic Mauve";
|
||||
case 65: return "Greyed Metallic Mauve";
|
||||
case 66: return "Metallic Gold";
|
||||
case 67: return "Greyed Metallic Gold";
|
||||
case 68: return "Metallic Green";
|
||||
case 69: return "Greyed Metallic Green";
|
||||
case 70: return "Metallic Indigo";
|
||||
case 71: return "Greyed Metallic Indigo";
|
||||
|
||||
case 72: return "Metallic Violet";
|
||||
case 73: return "Greyed Metallic Violet";
|
||||
case 74: return "Metallic Brown";
|
||||
case 75: return "Greyed Metallic Brown";
|
||||
case 76: return "Metallic Teal";
|
||||
case 77: return "Greyed Metallic Teal";
|
||||
case 78: return "Metallic Blue";
|
||||
case 79: return "Greyed Metallic Blue";
|
||||
|
||||
case 80: return "Metallic Olive";
|
||||
case 81: return "Greyed Metallic Olive";
|
||||
case 82: return "Metallic Aqua";
|
||||
case 83: return "Greyed Metallic Aqua";
|
||||
case 84: return "Greyed Metallic Fern Green";
|
||||
case 85: return "Metallic Marshland";
|
||||
case 86: return "Greyed Metallic Marshland";
|
||||
case 87: return "Metallic Fern Green";
|
||||
|
||||
case 88: return "Lightest Metallic Red";
|
||||
case 89: return "Light Metallic Red";
|
||||
case 90: return "Metallic Red";
|
||||
case 91: return "Dark Metallic Red";
|
||||
case 92: return "Lightest Metallic Yellow";
|
||||
case 93: return "Light Metallic Yellow";
|
||||
case 94: return "Metallic Yellow";
|
||||
case 95: return "Dark Metallic Yellow";
|
||||
|
||||
case 96: return "Lightest Mauve";
|
||||
case 97: return "Light Mauve";
|
||||
case 98: return "Mauve";
|
||||
case 99: return "Dark Mauve";
|
||||
case 100: return "Lightest Sangria";
|
||||
case 101: return "Light Sangria";
|
||||
case 102: return "Sangria";
|
||||
case 103: return "Dark Sangria";
|
||||
|
||||
case 104: return "Lightest Forest Green";
|
||||
case 105: return "Light Forest Green";
|
||||
case 106: return "Forest Green";
|
||||
case 107: return "Dark Forest Green";
|
||||
case 108: return "Lightest Clover";
|
||||
case 109: return "Light Clover";
|
||||
case 110: return "Clover";
|
||||
case 111: return "Dark Clover";
|
||||
|
||||
case 112: return "Lightest Marshland";
|
||||
case 113: return "Light Marshland";
|
||||
case 114: return "Marshland";
|
||||
case 115: return "Dark Marshland";
|
||||
case 116: return "Lighest Sienna";
|
||||
case 117: return "Light Sienna";
|
||||
case 118: return "Sienna";
|
||||
case 119: return "Dark Sienna";
|
||||
|
||||
case 120: return "Lightest Acorn";
|
||||
case 121: return "Light Acorn";
|
||||
case 122: return "Acorn";
|
||||
case 123: return "Dark Acorn";
|
||||
case 124: return "Lightest Gondola";
|
||||
case 125: return "Light Gondola";
|
||||
case 126: return "Gondola";
|
||||
case 127: return "Dark Gondola";
|
||||
|
||||
case 128: return "Lightest Ash Brown";
|
||||
case 129: return "Light Ash Brown";
|
||||
case 130: return "Ash Brown";
|
||||
case 131: return "Dark Ash Brown";
|
||||
case 132: return "Lightest Mirage";
|
||||
case 133: return "Light Mirage";
|
||||
case 134: return "Mirage";
|
||||
case 135: return "Dark Mirage";
|
||||
|
||||
case 136: return "Lightest Midnight Blue";
|
||||
case 137: return "Light Midnight Blue";
|
||||
case 138: return "Midnight Blue";
|
||||
case 139: return "Dark Midnight Blue";
|
||||
case 140: return "Lightest Dull Teal";
|
||||
case 141: return "Light Dull Teal";
|
||||
case 142: return "Dull Teal";
|
||||
case 143: return "Dark Dull Teal";
|
||||
|
||||
case 144: return "Lightest Magenta";
|
||||
case 145: return "Light Magenta";
|
||||
case 146: return "Magenta";
|
||||
case 147: return "Dark Magenta";
|
||||
case 148: return "Light Sky Blue";
|
||||
case 149: return "Sky Blue";
|
||||
case 150: return "Light Mosque";
|
||||
case 151: return "Mosque";
|
||||
|
||||
case 152: return "Light Sap Green";
|
||||
case 153: return "Sap Green";
|
||||
case 154: return "Light Buttered Rum";
|
||||
case 155: return "Buttered Rum";
|
||||
case 156: return "Light Burnt Sienna";
|
||||
case 157: return "Burnt Sienna";
|
||||
case 158: return "Light Cherrywood";
|
||||
case 159: return "Cherrywood";
|
||||
|
||||
case 160: return "Light Blackberry";
|
||||
case 161: return "Blackberry";
|
||||
case 162: return "Firebrick";
|
||||
case 163: return "Flirt";
|
||||
case 164: return "Pale Sky";
|
||||
case 165: return "Raincloud";
|
||||
case 166: return "Snow";
|
||||
case 167: return "Pine Tree";
|
||||
|
||||
case 168: return "Light Black Bean";
|
||||
case 169: return "Black Bean";
|
||||
case 170: return "Valentino";
|
||||
case 171: return "Ebony Clay";
|
||||
case 172: return "Black Forest";
|
||||
case 173: return "Dark Cedar";
|
||||
case 174: return "Wood Brown";
|
||||
case 175: return "Speckled Gold";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
string MetalColor(int iColor) {
|
||||
switch (iColor) {
|
||||
case 00: return "Lightest Shiny Silver";
|
||||
case 01: return "Light Shiny Silver";
|
||||
case 02: return "Dark Shiny Obsidian";
|
||||
case 03: return "Darkest Shiny Obsidian";
|
||||
|
||||
case 04: return "Lightest Dull Silver";
|
||||
case 05: return "Light Dull Silver";
|
||||
case 06: return "Dark Dull Obsidian";
|
||||
case 07: return "Darkest Dull Obsidian";
|
||||
|
||||
case 08: return "Lightest Gold";
|
||||
case 09: return "Light Gold";
|
||||
case 10: return "Dark Gold";
|
||||
case 11: return "Darkest Gold";
|
||||
|
||||
case 12: return "Lightest Celestial Gold";
|
||||
case 13: return "Light Celestial Gold";
|
||||
case 14: return "Dark Celestial Gold";
|
||||
case 15: return "Darkest Celestial Gold";
|
||||
|
||||
case 16: return "Lightest Copper";
|
||||
case 17: return "Light Copper";
|
||||
case 18: return "Dark Copper";
|
||||
case 19: return "Darkest Copper";
|
||||
|
||||
case 20: return "Lightest Brass";
|
||||
case 21: return "Light Brass";
|
||||
case 22: return "Dark Brass";
|
||||
case 23: return "Darkest Brass";
|
||||
|
||||
case 24: return "Light Red";
|
||||
case 25: return "Dark Red";
|
||||
case 26: return "Light Dull Red";
|
||||
case 27: return "Dark Dull Red";
|
||||
|
||||
case 28: return "Light Purple";
|
||||
case 29: return "Dark Purple";
|
||||
case 30: return "Light Dull Purple";
|
||||
case 31: return "Dark Dull Purple";
|
||||
|
||||
case 32: return "Light Blue";
|
||||
case 33: return "Dark Blue";
|
||||
case 34: return "Light Dull Blue";
|
||||
case 35: return "Dark Dull Blue";
|
||||
|
||||
case 36: return "Light Teal";
|
||||
case 37: return "Dark Teal";
|
||||
case 38: return "Light Dull Teal";
|
||||
case 39: return "Dark Dull Teal";
|
||||
|
||||
case 40: return "Light Green";
|
||||
case 41: return "Dark Green";
|
||||
case 42: return "Light Dull Green";
|
||||
case 43: return "Dark Dull Green";
|
||||
|
||||
case 44: return "Light Olive";
|
||||
case 45: return "Dark Olive";
|
||||
case 46: return "Light Dull Olive";
|
||||
case 47: return "Dark Dull Olive";
|
||||
|
||||
case 48: return "Light Prismatic";
|
||||
case 49: return "Dark Prismatic";
|
||||
|
||||
case 50: return "Lightest Rust";
|
||||
case 51: return "Light Rust";
|
||||
case 52: return "Dark Rust";
|
||||
case 53: return "Darkest Rust";
|
||||
|
||||
case 54: return "Light Aged Metal";
|
||||
case 55: return "Dark Aged Metal";
|
||||
|
||||
case 56: return "Hidden: Silver";
|
||||
case 57: return "Hidden: Obsidian";
|
||||
case 58: return "Hidden: Gold";
|
||||
case 59: return "Hidden: Copper";
|
||||
case 60: return "Hidden: Grey";
|
||||
case 61: return "Hidden: Mirror";
|
||||
case 62: return "Hidden: Pure White";
|
||||
case 63: return "Hidden: Pure Black";
|
||||
|
||||
case 64: return "Shiny Mauve";
|
||||
case 65: return "Greyed Shiny Mauve";
|
||||
case 66: return "Shiny Gold";
|
||||
case 67: return "Greyed Shiny Gold";
|
||||
case 68: return "Shiny Green";
|
||||
case 69: return "Greyed Shiny Green";
|
||||
case 70: return "Shiny Indigo";
|
||||
case 71: return "Greyed Shiny Indigo";
|
||||
|
||||
case 72: return "Shiny Violet";
|
||||
case 73: return "Greyed Shiny Violet";
|
||||
case 74: return "Shiny Brown";
|
||||
case 75: return "Greyed Shiny Brown";
|
||||
case 76: return "Shiny Teal";
|
||||
case 77: return "Greyed Shiny Teal";
|
||||
case 78: return "Shiny Blue";
|
||||
case 79: return "Greyed Shiny Blue";
|
||||
|
||||
case 80: return "Shiny Olive";
|
||||
case 81: return "Greyed Shiny Olive";
|
||||
case 82: return "Shiny Aqua";
|
||||
case 83: return "Greyed Shiny Aqua";
|
||||
case 84: return "Greyed Shiny Fern Green";
|
||||
case 85: return "Shiny Marshland";
|
||||
case 86: return "Greyed Shiny Marshland";
|
||||
case 87: return "Shiny Fern Green";
|
||||
|
||||
case 88: return "Lightest Shiny Red";
|
||||
case 89: return "Light Shiny Red";
|
||||
case 90: return "Shiny Red";
|
||||
case 91: return "Dark Shiny Red";
|
||||
case 92: return "Lightest Shiny Yellow";
|
||||
case 93: return "Light Shiny Yellow";
|
||||
case 94: return "Shiny Yellow";
|
||||
case 95: return "Dark Shiny Yellow";
|
||||
|
||||
case 96: return "Lightest Mauve";
|
||||
case 97: return "Light Mauve";
|
||||
case 98: return "Mauve";
|
||||
case 99: return "Dark Mauve";
|
||||
case 100: return "Lightest Sangria";
|
||||
case 101: return "Light Sangria";
|
||||
case 102: return "Sangria";
|
||||
case 103: return "Dark Sangria";
|
||||
|
||||
case 104: return "Lightest Forest Green";
|
||||
case 105: return "Light Forest Green";
|
||||
case 106: return "Forest Green";
|
||||
case 107: return "Dark Forest Green";
|
||||
case 108: return "Lightest Clover";
|
||||
case 109: return "Light Clover";
|
||||
case 110: return "Clover";
|
||||
case 111: return "Dark Clover";
|
||||
|
||||
case 112: return "Lightest Marshland";
|
||||
case 113: return "Light Marshland";
|
||||
case 114: return "Marshland";
|
||||
case 115: return "Dark Marshland";
|
||||
case 116: return "Lighest Sienna";
|
||||
case 117: return "Light Sienna";
|
||||
case 118: return "Sienna";
|
||||
case 119: return "Dark Sienna";
|
||||
|
||||
case 120: return "Lightest Acorn";
|
||||
case 121: return "Light Acorn";
|
||||
case 122: return "Acorn";
|
||||
case 123: return "Dark Acorn";
|
||||
case 124: return "Lightest Gondola";
|
||||
case 125: return "Light Gondola";
|
||||
case 126: return "Gondola";
|
||||
case 127: return "Dark Gondola";
|
||||
|
||||
case 128: return "Lightest Ash Brown";
|
||||
case 129: return "Light Ash Brown";
|
||||
case 130: return "Ash Brown";
|
||||
case 131: return "Dark Ash Brown";
|
||||
case 132: return "Lightest Mirage";
|
||||
case 133: return "Light Mirage";
|
||||
case 134: return "Mirage";
|
||||
case 135: return "Dark Mirage";
|
||||
|
||||
case 136: return "Lightest Midnight Blue";
|
||||
case 137: return "Light Midnight Blue";
|
||||
case 138: return "Midnight Blue";
|
||||
case 139: return "Dark Midnight Blue";
|
||||
case 140: return "Lightest Dull Teal";
|
||||
case 141: return "Light Dull Teal";
|
||||
case 142: return "Dull Teal";
|
||||
case 143: return "Dark Dull Teal";
|
||||
|
||||
case 144: return "Lightest Magenta";
|
||||
case 145: return "Light Magenta";
|
||||
case 146: return "Magenta";
|
||||
case 147: return "Dark Magenta";
|
||||
case 148: return "Light Sky Blue";
|
||||
case 149: return "Sky Blue";
|
||||
case 150: return "Light Mosque";
|
||||
case 151: return "Mosque";
|
||||
|
||||
case 152: return "Light Sap Green";
|
||||
case 153: return "Sap Green";
|
||||
case 154: return "Light Buttered Rum";
|
||||
case 155: return "Buttered Rum";
|
||||
case 156: return "Light Burnt Sienna";
|
||||
case 157: return "Burnt Sienna";
|
||||
case 158: return "Light Cherrywood";
|
||||
case 159: return "Cherrywood";
|
||||
|
||||
case 160: return "Light Blackberry";
|
||||
case 161: return "Blackberry";
|
||||
case 162: return "Firebrick";
|
||||
case 163: return "Flirt";
|
||||
case 164: return "Pale Sky";
|
||||
case 165: return "Raincloud";
|
||||
case 166: return "Snow";
|
||||
case 167: return "Pine Tree";
|
||||
|
||||
case 168: return "Light Black Bean";
|
||||
case 169: return "Black Bean";
|
||||
case 170: return "Valentino";
|
||||
case 171: return "Ebony Clay";
|
||||
case 172: return "Black Forest";
|
||||
case 173: return "Dark Cedar";
|
||||
case 174: return "Wood Brown";
|
||||
case 175: return "Speckled Gold";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
221
_module/nss/dye_itemhead.nss
Normal file
221
_module/nss/dye_itemhead.nss
Normal file
@@ -0,0 +1,221 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Item = Head
|
||||
//:: dye_itemhead.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the item to be died to the head slot.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 9, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
string ClothColor(int iColor);
|
||||
string MetalColor(int iColor);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "ItemToDye", INVENTORY_SLOT_HEAD);
|
||||
|
||||
object oItem = GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);
|
||||
|
||||
if (GetIsObjectValid(oItem)) {
|
||||
int iLeather1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_LEATHER1);
|
||||
int iLeather2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_LEATHER2);
|
||||
int iCloth1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_CLOTH1);
|
||||
int iCloth2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_CLOTH2);
|
||||
int iMetal1 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_METAL1);
|
||||
int iMetal2 = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, ITEM_APPR_ARMOR_COLOR_METAL2);
|
||||
|
||||
string sOutput = "Leather 1: " + ClothColor(iLeather1);
|
||||
sOutput += "\n" + "Leather 2: " + ClothColor(iLeather2);
|
||||
sOutput += "\n" + "Cloth 1: " + ClothColor(iCloth1);
|
||||
sOutput += "\n" + "Cloth 2: " + ClothColor(iCloth2);
|
||||
sOutput += "\n" + "Metal 1: " + MetalColor(iMetal1);
|
||||
sOutput += "\n" + "Metal 2: " + MetalColor(iMetal2);
|
||||
|
||||
SendMessageToPC(oPC, sOutput);
|
||||
}
|
||||
}
|
||||
|
||||
string ClothColor(int iColor) {
|
||||
switch (iColor) {
|
||||
case 00: return "Lightest Tan/Brown";
|
||||
case 01: return "Light Tan/Brown";
|
||||
case 02: return "Dark Tan/Brown";
|
||||
case 03: return "Darkest Tan/Brown";
|
||||
|
||||
case 04: return "Lightest Tan/Red";
|
||||
case 05: return "Light Tan/Red";
|
||||
case 06: return "Dark Tan/Red";
|
||||
case 07: return "Darkest Tan/Red";
|
||||
|
||||
case 08: return "Lightest Tan/Yellow";
|
||||
case 09: return "Light Tan/Yellow";
|
||||
case 10: return "Dark Tan/Yellow";
|
||||
case 11: return "Darkest Tan/Yellow";
|
||||
|
||||
case 12: return "Lightest Tan/Grey";
|
||||
case 13: return "Light Tan/Grey";
|
||||
case 14: return "Dark Tan/Grey";
|
||||
case 15: return "Darkest Tan/Grey";
|
||||
|
||||
case 16: return "Lightest Olive";
|
||||
case 17: return "Light Olive";
|
||||
case 18: return "Dark Olive";
|
||||
case 19: return "Darkest Olive";
|
||||
|
||||
case 20: return "White";
|
||||
case 21: return "Light Grey";
|
||||
case 22: return "Dark Grey";
|
||||
case 23: return "Charcoal";
|
||||
|
||||
case 24: return "Light Blue";
|
||||
case 25: return "Dark Blue";
|
||||
|
||||
case 26: return "Light Aqua";
|
||||
case 27: return "Dark Aqua";
|
||||
|
||||
case 28: return "Light Teal";
|
||||
case 29: return "Dark Teal";
|
||||
|
||||
case 30: return "Light Green";
|
||||
case 31: return "Dark Green";
|
||||
|
||||
case 32: return "Light Yellow";
|
||||
case 33: return "Dark Yellow";
|
||||
|
||||
case 34: return "Light Orange";
|
||||
case 35: return "Dark Orange";
|
||||
|
||||
case 36: return "Light Red";
|
||||
case 37: return "Dark Red";
|
||||
|
||||
case 38: return "Light Pink";
|
||||
case 39: return "Dark Pink";
|
||||
|
||||
case 40: return "Light Purple";
|
||||
case 41: return "Dark Purple";
|
||||
|
||||
case 42: return "Light Violet";
|
||||
case 43: return "Dark Violet";
|
||||
|
||||
case 44: return "Shiny White";
|
||||
case 45: return "Shiny Black";
|
||||
|
||||
case 46: return "Shiny Blue";
|
||||
case 47: return "Shiny Aqua";
|
||||
|
||||
case 48: return "Shiny Teal";
|
||||
case 49: return "Shiny Green";
|
||||
|
||||
case 50: return "Shiny Yellow";
|
||||
case 51: return "Shiny Orange";
|
||||
|
||||
case 52: return "Shiny Red";
|
||||
case 53: return "Shiny Pink";
|
||||
|
||||
case 54: return "Shiny Purple";
|
||||
case 55: return "Shiny Violet";
|
||||
|
||||
case 56: return "Hidden: Silver";
|
||||
case 57: return "Hidden: Obsidian";
|
||||
case 58: return "Hidden: Gold";
|
||||
case 59: return "Hidden: Copper";
|
||||
case 60: return "Hidden: Grey";
|
||||
case 61: return "Hidden: Mirror";
|
||||
case 62: return "Hidden: Pure White";
|
||||
case 63: return "Hidden: Pure Black";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
string MetalColor(int iColor) {
|
||||
switch (iColor) {
|
||||
case 00: return "Lightest Shiny Silver";
|
||||
case 01: return "Light Shiny Silver";
|
||||
case 02: return "Dark Shiny Obsidian";
|
||||
case 03: return "Darkest Shiny Obsidian";
|
||||
|
||||
case 04: return "Lightest Dull Silver";
|
||||
case 05: return "Light Dull Silver";
|
||||
case 06: return "Dark Dull Obsidian";
|
||||
case 07: return "Darkest Dull Obsidian";
|
||||
|
||||
case 08: return "Lightest Gold";
|
||||
case 09: return "Light Gold";
|
||||
case 10: return "Dark Gold";
|
||||
case 11: return "Darkest Gold";
|
||||
|
||||
case 12: return "Lightest Celestial Gold";
|
||||
case 13: return "Light Celestial Gold";
|
||||
case 14: return "Dark Celestial Gold";
|
||||
case 15: return "Darkest Celestial Gold";
|
||||
|
||||
case 16: return "Lightest Copper";
|
||||
case 17: return "Light Copper";
|
||||
case 18: return "Dark Copper";
|
||||
case 19: return "Darkest Copper";
|
||||
|
||||
case 20: return "Lightest Brass";
|
||||
case 21: return "Light Brass";
|
||||
case 22: return "Dark Brass";
|
||||
case 23: return "Darkest Brass";
|
||||
|
||||
case 24: return "Light Red";
|
||||
case 25: return "Dark Red";
|
||||
case 26: return "Light Dull Red";
|
||||
case 27: return "Dark Dull Red";
|
||||
|
||||
case 28: return "Light Purple";
|
||||
case 29: return "Dark Purple";
|
||||
case 30: return "Light Dull Purple";
|
||||
case 31: return "Dark Dull Purple";
|
||||
|
||||
case 32: return "Light Blue";
|
||||
case 33: return "Dark Blue";
|
||||
case 34: return "Light Dull Blue";
|
||||
case 35: return "Dark Dull Blue";
|
||||
|
||||
case 36: return "Light Teal";
|
||||
case 37: return "Dark Teal";
|
||||
case 38: return "Light Dull Teal";
|
||||
case 39: return "Dark Dull Teal";
|
||||
|
||||
case 40: return "Light Green";
|
||||
case 41: return "Dark Green";
|
||||
case 42: return "Light Dull Green";
|
||||
case 43: return "Dark Dull Green";
|
||||
|
||||
case 44: return "Light Olive";
|
||||
case 45: return "Dark Olive";
|
||||
case 46: return "Light Dull Olive";
|
||||
case 47: return "Dark Dull Olive";
|
||||
|
||||
case 48: return "Light Prismatic";
|
||||
case 49: return "Dark Prismatic";
|
||||
|
||||
case 50: return "Lightest Rust";
|
||||
case 51: return "Light Rust";
|
||||
case 52: return "Dark Rust";
|
||||
case 53: return "Darkest Rust";
|
||||
|
||||
case 54: return "Light Aged Metal";
|
||||
case 55: return "Dark Aged Metal";
|
||||
|
||||
case 56: return "Hidden: Silver";
|
||||
case 57: return "Hidden: Obsidian";
|
||||
case 58: return "Hidden: Gold";
|
||||
case 59: return "Hidden: Copper";
|
||||
case 60: return "Hidden: Grey";
|
||||
case 61: return "Hidden: Mirror";
|
||||
case 62: return "Hidden: Pure White";
|
||||
case 63: return "Hidden: Pure Black";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
18
_module/nss/dye_leather1.nss
Normal file
18
_module/nss/dye_leather1.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Leather 1
|
||||
//:: dye_leather1.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the material to be died to Leather 1.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "MaterialToDye", ITEM_APPR_ARMOR_COLOR_LEATHER1);
|
||||
}
|
18
_module/nss/dye_leather2.nss
Normal file
18
_module/nss/dye_leather2.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Leather 2
|
||||
//:: dye_leather2.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the material to be died to Leather 2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "MaterialToDye", ITEM_APPR_ARMOR_COLOR_LEATHER2);
|
||||
}
|
18
_module/nss/dye_metal1.nss
Normal file
18
_module/nss/dye_metal1.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Metal 1
|
||||
//:: dye_metal1.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the material to be died to Metal 1.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "MaterialToDye", ITEM_APPR_ARMOR_COLOR_METAL1);
|
||||
}
|
18
_module/nss/dye_metal2.nss
Normal file
18
_module/nss/dye_metal2.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dye Kit - Metal 2
|
||||
//:: dye_metal2.nss
|
||||
//:: Copyright (c) 2003 Jake E. Fitch
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Set the material to be died to Metal 2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||||
//:: Created On: Dec. 10, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(oPC, "MaterialToDye", ITEM_APPR_ARMOR_COLOR_METAL2);
|
||||
}
|
40
_module/nss/ew_act_drunk.nss
Normal file
40
_module/nss/ew_act_drunk.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: ew_drunk
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Drunk emote script.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Samius Maximus
|
||||
//:: Created On:
|
||||
//:: Modified By: Genisys
|
||||
//:: Modified On: 8/12/07
|
||||
//:://////////////////////////////////////////////
|
||||
#include "inc_emotewand"
|
||||
|
||||
void GetWasted(object oTarget)
|
||||
{
|
||||
DelayCommand(0.1, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_DRINK)));
|
||||
|
||||
DelayCommand(1.0, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, 5.0)));
|
||||
|
||||
DelayCommand(6.0, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_DEAD_BACK, 1.0, 5.0)));
|
||||
|
||||
DelayCommand(9.1, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_DRINK)));
|
||||
|
||||
DelayCommand(13.0, AssignCommand(oPlayer, ClearAllActions()));
|
||||
|
||||
DelayCommand(12.8, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_DRINK)));
|
||||
|
||||
DelayCommand(13.7, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, 5.0)));
|
||||
|
||||
DelayCommand(18.8, AssignCommand(oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_DEAD_FRONT, 1.0, 5.0)));
|
||||
|
||||
}
|
||||
void main()
|
||||
{
|
||||
GetWasted(oPlayer);
|
||||
DelayCommand(25.0, GetWasted(oPlayer));
|
||||
DelayCommand(49.0, GetWasted(oPlayer));
|
||||
}
|
32
_module/nss/ew_ani_armsup.nss
Normal file
32
_module/nss/ew_ani_armsup.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
//-- reset routine to string anims
|
||||
//-- note, will remove all vfx!
|
||||
SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
effect eFX = GetFirstEffect(oTarget);
|
||||
|
||||
while (GetIsEffectValid(eFX))
|
||||
{
|
||||
if(GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
|
||||
{
|
||||
RemoveEffect(oTarget, eFX);
|
||||
}
|
||||
eFX = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
//-- anim started and frozen. target frozen (not commandable)
|
||||
|
||||
effect eFreeze = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
|
||||
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_CONJURE2, 1.0, 3.0));
|
||||
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFreeze, oTarget));
|
||||
//DelayCommand(1.2, SetCommandable(FALSE, oTarget));
|
||||
|
||||
|
||||
}
|
32
_module/nss/ew_ani_bowdown.nss
Normal file
32
_module/nss/ew_ani_bowdown.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
//-- reset routine to string anims
|
||||
//-- note, will remove all vfx!
|
||||
SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
effect eFX = GetFirstEffect(oTarget);
|
||||
|
||||
while (GetIsEffectValid(eFX))
|
||||
{
|
||||
if(GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
|
||||
{
|
||||
RemoveEffect(oTarget, eFX);
|
||||
}
|
||||
eFX = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
//-- anim started and frozen. target frozen (not commandable)
|
||||
|
||||
effect eFreeze = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
|
||||
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_WORSHIP, 2.0, 6.0));
|
||||
|
||||
DelayCommand(2.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFreeze, oTarget));
|
||||
//DelayCommand(2.5, SetCommandable(FALSE, oTarget));
|
||||
|
||||
|
||||
}
|
32
_module/nss/ew_ani_crouch.nss
Normal file
32
_module/nss/ew_ani_crouch.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
//-- reset routine to string anims
|
||||
//-- note, will remove all vfx!
|
||||
SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
effect eFX = GetFirstEffect(oTarget);
|
||||
|
||||
while (GetIsEffectValid(eFX))
|
||||
{
|
||||
if(GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
|
||||
{
|
||||
RemoveEffect(oTarget, eFX);
|
||||
}
|
||||
eFX = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
//-- anim started and frozen. target frozen (not commandable)
|
||||
|
||||
effect eFreeze = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
|
||||
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 3.0));
|
||||
|
||||
DelayCommand(1.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFreeze, oTarget));
|
||||
//DelayCommand(1.5, SetCommandable(FALSE, oTarget));
|
||||
|
||||
|
||||
}
|
32
_module/nss/ew_ani_kneelout.nss
Normal file
32
_module/nss/ew_ani_kneelout.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
//-- reset routine to string anims
|
||||
//-- note, will remove all vfx!
|
||||
SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
effect eFX = GetFirstEffect(oTarget);
|
||||
|
||||
while (GetIsEffectValid(eFX))
|
||||
{
|
||||
if(GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
|
||||
{
|
||||
RemoveEffect(oTarget, eFX);
|
||||
}
|
||||
eFX = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
//-- anim started and frozen. target frozen (not commandable)
|
||||
|
||||
effect eFreeze = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
|
||||
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_WORSHIP, 2.0, 6.0));
|
||||
|
||||
DelayCommand(1.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFreeze, oTarget));
|
||||
//DelayCommand(1.8, SetCommandable(FALSE, oTarget));
|
||||
|
||||
|
||||
}
|
32
_module/nss/ew_ani_kneelup.nss
Normal file
32
_module/nss/ew_ani_kneelup.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
//-- reset routine to string anims
|
||||
//-- note, will remove all vfx!
|
||||
SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
effect eFX = GetFirstEffect(oTarget);
|
||||
|
||||
while (GetIsEffectValid(eFX))
|
||||
{
|
||||
if(GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
|
||||
{
|
||||
RemoveEffect(oTarget, eFX);
|
||||
}
|
||||
eFX = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
//-- anim started and frozen. target frozen (not commandable)
|
||||
|
||||
effect eFreeze = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
|
||||
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_WORSHIP, 2.0, 6.0));
|
||||
|
||||
DelayCommand(2.8, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFreeze, oTarget));
|
||||
//DelayCommand(3.3, SetCommandable(FALSE, oTarget));
|
||||
|
||||
|
||||
}
|
19
_module/nss/ew_ani_reset.nss
Normal file
19
_module/nss/ew_ani_reset.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
void main()
|
||||
{
|
||||
object oTarget = OBJECT_SELF;
|
||||
|
||||
SetCommandable(TRUE, oTarget);
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
effect eFX = GetFirstEffect(oTarget);
|
||||
|
||||
while (GetIsEffectValid(eFX))
|
||||
{
|
||||
if(GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
|
||||
{
|
||||
RemoveEffect(oTarget, eFX);
|
||||
}
|
||||
eFX = GetNextEffect(oTarget);
|
||||
}
|
||||
|
||||
}
|
17
_module/nss/ew_back.nss
Normal file
17
_module/nss/ew_back.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: ew_nap
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Nap emote script.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Samius Maximus
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
#include "inc_emotewand"
|
||||
|
||||
void main()
|
||||
{
|
||||
FallBack();
|
||||
}
|
15
_module/nss/ew_bluffchecko.nss
Normal file
15
_module/nss/ew_bluffchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetSkillRank (SKILL_BLUFF, oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Bluff";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
7
_module/nss/ew_cheer1.nss
Normal file
7
_module/nss/ew_cheer1.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC=GetLastSpeaker();
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1));
|
||||
DelayCommand(2.5, AssignCommand( oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1)));
|
||||
}
|
7
_module/nss/ew_cheer2.nss
Normal file
7
_module/nss/ew_cheer2.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC=GetLastSpeaker();
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2));
|
||||
DelayCommand(2.5, AssignCommand( oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2)));
|
||||
}
|
7
_module/nss/ew_cheer3.nss
Normal file
7
_module/nss/ew_cheer3.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC=GetLastSpeaker();
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3));
|
||||
DelayCommand(2.5, AssignCommand( oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3)));
|
||||
}
|
15
_module/nss/ew_concchecko.nss
Normal file
15
_module/nss/ew_concchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetSkillRank (SKILL_CONCENTRATION, oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Concentration";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
@@ -1,17 +1,29 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: ew_dance
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Dance emote script.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Samius Maximus
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
#include "inc_emotewand"
|
||||
void DoDance(object oTarget);
|
||||
|
||||
void main()
|
||||
{
|
||||
Dance();
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//Do the dance 3 times!
|
||||
DoDance(oPC);
|
||||
DelayCommand(23.0, DoDance(oPC));
|
||||
DelayCommand(44.0, DoDance(oPC));
|
||||
|
||||
}
|
||||
|
||||
void DoDance(object oTarget)
|
||||
{
|
||||
object oPC = oTarget;
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW));
|
||||
DelayCommand(2.0, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3)));
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT)));
|
||||
DelayCommand(6.0, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 3.0)));
|
||||
DelayCommand(9.1, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3)));
|
||||
DelayCommand(11.4, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 3.0)));
|
||||
DelayCommand(14.5, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, 2.0, 3.0)));
|
||||
DelayCommand(17.6, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_DODGE_SIDE)));
|
||||
DelayCommand(18.2, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_DODGE_DUCK)));
|
||||
DelayCommand(19.2, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3)));
|
||||
DelayCommand(21.3, AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_GREETING)));
|
||||
}
|
||||
|
7
_module/nss/ew_fast_spasm.nss
Normal file
7
_module/nss/ew_fast_spasm.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_SPASM, 5.0f, 20.0f));
|
||||
|
||||
}
|
22
_module/nss/ew_follow.nss
Normal file
22
_module/nss/ew_follow.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Emote Wand: Follow pc
|
||||
//:: onConv emotewand
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: bloodsong
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oOther = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oPC);
|
||||
|
||||
AssignCommand(oPC, ActionForceFollowObject(oOther, 1.0));
|
||||
|
||||
|
||||
}
|
15
_module/nss/ew_fortchecko.nss
Normal file
15
_module/nss/ew_fortchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetFortitudeSavingThrow(oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Fortitude";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
8
_module/nss/ew_getclose.nss
Normal file
8
_module/nss/ew_getclose.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneGhost (), oPC, 600.00);
|
||||
}
|
17
_module/nss/ew_getlow.nss
Normal file
17
_module/nss/ew_getlow.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: ew_getlow
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Talk forceful emote script.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Samius Maximus
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
#include "inc_emotewand"
|
||||
|
||||
void main()
|
||||
{
|
||||
GetLow();
|
||||
}
|
17
_module/nss/ew_getmid.nss
Normal file
17
_module/nss/ew_getmid.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: ew_getmid
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Talk forceful emote script.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Samius Maximus
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
#include "inc_emotewand"
|
||||
|
||||
void main()
|
||||
{
|
||||
GetMid();
|
||||
}
|
15
_module/nss/ew_hidechecko.nss
Normal file
15
_module/nss/ew_hidechecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetSkillRank (SKILL_HIDE, oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Hide";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
15
_module/nss/ew_intimchecko.nss
Normal file
15
_module/nss/ew_intimchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetSkillRank (SKILL_INTIMIDATE, oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Intimidate";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
87
_module/nss/ew_lapsit0.nss
Normal file
87
_module/nss/ew_lapsit0.nss
Normal file
@@ -0,0 +1,87 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Emote Wand: Lap Sit 0 degrees
|
||||
//:: onConv emotewand
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
1: find nearest chair/seat in use.
|
||||
2: create lap and sit on it
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//-- ripped from:
|
||||
// chair sitting script by Jhenne
|
||||
// script modified to allow sitting on laps
|
||||
// with Sittable Objects v2.0 by Ranot
|
||||
//
|
||||
//-- by bloodsong
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void DestroyLap(object oLap)
|
||||
{
|
||||
object oSitter = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oSitter))
|
||||
{ //-- no sitter, blow it up
|
||||
DestroyObject(oLap);
|
||||
return;
|
||||
}
|
||||
//-- else someone is still sitting on it, wait
|
||||
|
||||
DelayCommand(300.0, DestroyLap(oLap));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//-- Step One: find the nearest chair/seat and a lap in it
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
object oChair = GetNearestObjectByTag("Chair");
|
||||
object oSeat = GetNearestObjectByTag("Seat");
|
||||
float fDistanceChair = GetDistanceToObject(oChair);
|
||||
float fDistanceSeat = GetDistanceToObject(oSeat);
|
||||
|
||||
//-- if non existant (-1) change to vast distance
|
||||
if(fDistanceChair == -1.0) { fDistanceChair = 1000.0; }
|
||||
if(fDistanceSeat == -1.0) { fDistanceSeat = 1000.0; }
|
||||
|
||||
object oLap;
|
||||
|
||||
if(fDistanceChair > fDistanceSeat)
|
||||
{ //-- chair is further, use seat
|
||||
oLap = oSeat;
|
||||
}
|
||||
else
|
||||
{ //-- note, chair selected over seat when same dist
|
||||
oLap = oChair;
|
||||
}
|
||||
|
||||
object oLapper = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oLapper))
|
||||
{ //-- nobody sitting in that chair/seat
|
||||
SendMessageToPC(oPC, "No nearby laps found.");
|
||||
return;
|
||||
}
|
||||
|
||||
//-- Step Two: Create the Lap and Sit In It
|
||||
|
||||
vector vSit = GetPosition(oLap);
|
||||
float fDir=GetFacing(oLap);
|
||||
|
||||
float fLapLength = -0.3 ;
|
||||
float fSitterFacing = GetFacing(oLap);
|
||||
vector vPosition = GetPositionFromLocation(GetLocation(oLap)) ;
|
||||
float fPosX = vPosition.x + cos(fSitterFacing)*fLapLength;
|
||||
float fPosY = vPosition.y + sin(fSitterFacing)*fLapLength;
|
||||
vector vLapPosition = Vector(fPosX, fPosY, 0.0) ;
|
||||
|
||||
|
||||
location lSit = Location(GetArea(oLap),vLapPosition,fDir);
|
||||
object oSit = CreateObject(OBJECT_TYPE_PLACEABLE, "invisiblelap", lSit,FALSE);
|
||||
|
||||
DelayCommand(16.0, DestroyLap(oSit));
|
||||
ActionSit(oSit);
|
||||
|
||||
}
|
102
_module/nss/ew_lapsit180.nss
Normal file
102
_module/nss/ew_lapsit180.nss
Normal file
@@ -0,0 +1,102 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Emote Wand: Lap Sit 180 degrees
|
||||
//:: onConv emotewand
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
1: find nearest chair/seat in use.
|
||||
2: create lap and sit on it
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//-- ripped from:
|
||||
// chair sitting script by Jhenne
|
||||
// script modified to allow sitting on laps
|
||||
// with Sittable Objects v2.0 by Ranot
|
||||
//
|
||||
//-- by bloodsong
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void DestroyLap(object oLap)
|
||||
{
|
||||
object oSitter = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oSitter))
|
||||
{ //-- no sitter, blow it up
|
||||
DestroyObject(oLap);
|
||||
return;
|
||||
}
|
||||
//-- else someone is still sitting on it, wait
|
||||
|
||||
DelayCommand(300.0, DestroyLap(oLap));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//-- Step One: find the nearest chair/seat and a lap in it
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
object oChair = GetNearestObjectByTag("Chair");
|
||||
object oSeat = GetNearestObjectByTag("Seat");
|
||||
float fDistanceChair = GetDistanceToObject(oChair);
|
||||
float fDistanceSeat = GetDistanceToObject(oSeat);
|
||||
|
||||
//-- if non existant (-1) change to vast distance
|
||||
if(fDistanceChair == -1.0) { fDistanceChair = 1000.0; }
|
||||
if(fDistanceSeat == -1.0) { fDistanceSeat = 1000.0; }
|
||||
|
||||
object oLap;
|
||||
|
||||
if(fDistanceChair > fDistanceSeat)
|
||||
{ //-- chair is further, use seat
|
||||
oLap = oSeat;
|
||||
}
|
||||
else
|
||||
{ //-- note, chair selected over seat when same dist
|
||||
oLap = oChair;
|
||||
}
|
||||
|
||||
object oLapper = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oLapper))
|
||||
{ //-- nobody sitting in that chair/seat
|
||||
SendMessageToPC(oPC, "No nearby laps found.");
|
||||
return;
|
||||
}
|
||||
|
||||
//-- Step Two: Create the Lap and Sit In It
|
||||
|
||||
vector vSit = GetPosition(oLap);
|
||||
float fDir = 0.0;
|
||||
if (GetFacing(oLap) >= 0.0 && GetFacing(oLap) <= 90.0)
|
||||
{
|
||||
fDir = 180.0 + GetFacing(oLap);
|
||||
}
|
||||
if (GetFacing(oLap) > 90.0 && GetFacing(oLap) <= 180.0)
|
||||
{
|
||||
fDir = 180.0 + GetFacing(oLap);
|
||||
}
|
||||
if (GetFacing(oLap) > 180.0 && GetFacing(oLap) <= 270.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) - 180.0;
|
||||
}
|
||||
if (GetFacing(oLap) > 270.0 && GetFacing(oLap) <= 360.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) - 180.0;
|
||||
}
|
||||
|
||||
//--SD's position calculation
|
||||
float fLapLength = -0.3 ;
|
||||
float fSitterFacing = GetFacing(oLap);
|
||||
vector vPosition = GetPositionFromLocation(GetLocation(oLap)) ;
|
||||
float fPosX = vPosition.x + cos(fSitterFacing)*fLapLength;
|
||||
float fPosY = vPosition.y + sin(fSitterFacing)*fLapLength;
|
||||
vector vLapPosition = Vector(fPosX, fPosY, 0.0) ;
|
||||
|
||||
//--siddown!
|
||||
location lSit = Location(GetArea(oLap),vLapPosition,fDir);
|
||||
object oSit = CreateObject(OBJECT_TYPE_PLACEABLE, "invisiblelap", lSit,FALSE);
|
||||
|
||||
DelayCommand(16.0, DestroyLap(oSit));
|
||||
ActionSit(oSit);
|
||||
}
|
102
_module/nss/ew_lapsit270.nss
Normal file
102
_module/nss/ew_lapsit270.nss
Normal file
@@ -0,0 +1,102 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Emote Wand: Lap Sit 270 degrees
|
||||
//:: onConv emotewand
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
1: find nearest chair/seat in use.
|
||||
2: create lap and sit on it
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//-- ripped from:
|
||||
// chair sitting script by Jhenne
|
||||
// script modified to allow sitting on laps
|
||||
// with Sittable Objects v2.0 by Ranot
|
||||
//
|
||||
//-- by bloodsong
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void DestroyLap(object oLap)
|
||||
{
|
||||
object oSitter = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oSitter))
|
||||
{ //-- no sitter, blow it up
|
||||
DestroyObject(oLap);
|
||||
return;
|
||||
}
|
||||
//-- else someone is still sitting on it, wait
|
||||
|
||||
DelayCommand(300.0, DestroyLap(oLap));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//-- Step One: find the nearest chair/seat and a lap in it
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
object oChair = GetNearestObjectByTag("Chair");
|
||||
object oSeat = GetNearestObjectByTag("Seat");
|
||||
float fDistanceChair = GetDistanceToObject(oChair);
|
||||
float fDistanceSeat = GetDistanceToObject(oSeat);
|
||||
|
||||
//-- if non existant (-1) change to vast distance
|
||||
if(fDistanceChair == -1.0) { fDistanceChair = 1000.0; }
|
||||
if(fDistanceSeat == -1.0) { fDistanceSeat = 1000.0; }
|
||||
|
||||
object oLap;
|
||||
|
||||
if(fDistanceChair > fDistanceSeat)
|
||||
{ //-- chair is further, use seat
|
||||
oLap = oSeat;
|
||||
}
|
||||
else
|
||||
{ //-- note, chair selected over seat when same dist
|
||||
oLap = oChair;
|
||||
}
|
||||
|
||||
object oLapper = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oLapper))
|
||||
{ //-- nobody sitting in that chair/seat
|
||||
SendMessageToPC(oPC, "No nearby laps found.");
|
||||
return;
|
||||
}
|
||||
|
||||
//-- Step Two: Create the Lap and Sit In It
|
||||
|
||||
vector vSit = GetPosition(oLap);
|
||||
float fDir = 0.0;
|
||||
if (GetFacing(oLap) >= 0.0 && GetFacing(oLap) <= 90.0)
|
||||
{
|
||||
fDir = 270.0 + GetFacing(oLap);
|
||||
}
|
||||
if (GetFacing(oLap) > 90.0 && GetFacing(oLap) <= 180.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) - 90.0;
|
||||
}
|
||||
if (GetFacing(oLap) > 180.0 && GetFacing(oLap) <= 270.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) - 90.0;
|
||||
}
|
||||
if (GetFacing(oLap) > 270.0 && GetFacing(oLap) <= 360.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) - 90.0;
|
||||
}
|
||||
|
||||
//--SD's position calculation
|
||||
float fLapLength = -0.3 ;
|
||||
float fSitterFacing = GetFacing(oLap);
|
||||
vector vPosition = GetPositionFromLocation(GetLocation(oLap)) ;
|
||||
float fPosX = vPosition.x + cos(fSitterFacing)*fLapLength;
|
||||
float fPosY = vPosition.y + sin(fSitterFacing)*fLapLength;
|
||||
vector vLapPosition = Vector(fPosX, fPosY, 0.0) ;
|
||||
|
||||
//--siddown!
|
||||
location lSit = Location(GetArea(oLap),vLapPosition,fDir);
|
||||
object oSit = CreateObject(OBJECT_TYPE_PLACEABLE, "invisiblelap", lSit,FALSE);
|
||||
|
||||
DelayCommand(16.0, DestroyLap(oSit));
|
||||
ActionSit(oSit);
|
||||
}
|
102
_module/nss/ew_lapsit90.nss
Normal file
102
_module/nss/ew_lapsit90.nss
Normal file
@@ -0,0 +1,102 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Emote Wand: Lap Sit 90 degrees
|
||||
//:: onConv emotewand
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
1: find nearest chair/seat in use.
|
||||
2: create lap and sit on it
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//-- ripped from:
|
||||
// chair sitting script by Jhenne
|
||||
// script modified to allow sitting on laps
|
||||
// with Sittable Objects v2.0 by Ranot
|
||||
//
|
||||
//-- by bloodsong
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void DestroyLap(object oLap)
|
||||
{
|
||||
object oSitter = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oSitter))
|
||||
{ //-- no sitter, blow it up
|
||||
DestroyObject(oLap);
|
||||
return;
|
||||
}
|
||||
//-- else someone is still sitting on it, wait
|
||||
|
||||
DelayCommand(300.0, DestroyLap(oLap));
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//-- Step One: find the nearest chair/seat and a lap in it
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
object oChair = GetNearestObjectByTag("Chair");
|
||||
object oSeat = GetNearestObjectByTag("Seat");
|
||||
float fDistanceChair = GetDistanceToObject(oChair);
|
||||
float fDistanceSeat = GetDistanceToObject(oSeat);
|
||||
|
||||
//-- if non existant (-1) change to vast distance
|
||||
if(fDistanceChair == -1.0) { fDistanceChair = 1000.0; }
|
||||
if(fDistanceSeat == -1.0) { fDistanceSeat = 1000.0; }
|
||||
|
||||
object oLap;
|
||||
|
||||
if(fDistanceChair > fDistanceSeat)
|
||||
{ //-- chair is further, use seat
|
||||
oLap = oSeat;
|
||||
}
|
||||
else
|
||||
{ //-- note, chair selected over seat when same dist
|
||||
oLap = oChair;
|
||||
}
|
||||
|
||||
object oLapper = GetSittingCreature(oLap);
|
||||
|
||||
if(!GetIsObjectValid(oLapper))
|
||||
{ //-- nobody sitting in that chair/seat
|
||||
SendMessageToPC(oPC, "No nearby laps found.");
|
||||
return;
|
||||
}
|
||||
|
||||
//-- Step Two: Create the Lap and Sit In It
|
||||
//-- jhenne's facing calculations
|
||||
vector vSit = GetPosition(oLap);
|
||||
float fDir = 0.0;
|
||||
if (GetFacing(oLap) >= 0.0 && GetFacing(oLap) <= 90.0)
|
||||
{
|
||||
fDir = 90 + GetFacing(oLap);
|
||||
}
|
||||
if (GetFacing(oLap) > 90.0 && GetFacing(oLap) <= 180.0)
|
||||
{
|
||||
fDir = 90.0 + GetFacing(oLap);
|
||||
}
|
||||
if (GetFacing(oLap) > 180.0 && GetFacing(oLap) <= 270.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) + 90.0;
|
||||
}
|
||||
if (GetFacing(oLap) > 270.0 && GetFacing(oLap) <= 360.0)
|
||||
{
|
||||
fDir = GetFacing(oLap) - 270.0;
|
||||
}
|
||||
|
||||
//--SD's position calculation
|
||||
float fLapLength = -0.3 ;
|
||||
float fSitterFacing = GetFacing(oLap);
|
||||
vector vPosition = GetPositionFromLocation(GetLocation(oLap)) ;
|
||||
float fPosX = vPosition.x + cos(fSitterFacing)*fLapLength;
|
||||
float fPosY = vPosition.y + sin(fSitterFacing)*fLapLength;
|
||||
vector vLapPosition = Vector(fPosX, fPosY, 0.0) ;
|
||||
|
||||
//--siddown!
|
||||
|
||||
location lSit = Location(GetArea(oLap),vLapPosition,fDir);
|
||||
object oSit = CreateObject(OBJECT_TYPE_PLACEABLE, "invisiblelap", lSit,FALSE);
|
||||
DelayCommand(16.0, DestroyLap(oSit));
|
||||
ActionSit(oSit);
|
||||
}
|
7
_module/nss/ew_norm_spasm.nss
Normal file
7
_module/nss/ew_norm_spasm.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_SPASM, 2.5f, 20.0f));
|
||||
|
||||
}
|
15
_module/nss/ew_ppchecko.nss
Normal file
15
_module/nss/ew_ppchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetSkillRank (SKILL_PICK_POCKET, oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Pick Pocket";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
15
_module/nss/ew_reflchecko.nss
Normal file
15
_module/nss/ew_reflchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetReflexSavingThrow(oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Reflex";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
7
_module/nss/ew_slow_spasm.nss
Normal file
7
_module/nss/ew_slow_spasm.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_SPASM, 1.1f, 20.0f));
|
||||
|
||||
}
|
15
_module/nss/ew_tumblechecko.nss
Normal file
15
_module/nss/ew_tumblechecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetSkillRank (SKILL_TUMBLE, oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Tumble";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
15
_module/nss/ew_willchecko.nss
Normal file
15
_module/nss/ew_willchecko.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastSpeaker();
|
||||
int nRoll=d20();
|
||||
int nRank=GetWillSavingThrow(oPC);
|
||||
int nResult=nRoll+nRank;
|
||||
string sRoll=IntToString(nRoll);
|
||||
string sRank=IntToString(nRank);
|
||||
string sResult=IntToString(nResult);
|
||||
string sAbility="Will";
|
||||
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
AssignCommand( oPC, SpeakString(sAbility+" Check, Roll: "+sRoll+" Modifier: "+sRank+" = "+sResult));
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
////::///////////////////////////////////////////////
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: ew_worship
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
|
359
_module/nss/exc_speedcast.nss
Normal file
359
_module/nss/exc_speedcast.nss
Normal file
@@ -0,0 +1,359 @@
|
||||
//Script Name: exc_speedcast
|
||||
//////////////////////////////////////////
|
||||
// Created By: Genisys (Guile)
|
||||
// Created On: 8/13/08
|
||||
// Updated On: 4/05/09
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script must be executed from another
|
||||
script, utilizing the ExecuteScript("exc_speedcast", oPC);
|
||||
function, basically this script will,
|
||||
if PC is a spell caster, they
|
||||
will cast all of their buffs instantly, if
|
||||
they have the spells to cast.
|
||||
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "prc_class_const"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//PROTOTYPE DEFINED
|
||||
int GetHasBetter(object oTarget, int nInt)
|
||||
{
|
||||
int b = 0;
|
||||
|
||||
//If the current spell (which might be cast) is the lesser,
|
||||
//then lets see if they have a great version!
|
||||
|
||||
if(nInt ==10) //Bulls' Strength
|
||||
{
|
||||
if(GetHasSpell(SPELL_GREATER_BULLS_STRENGTH, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt == 12) //Cat Grace
|
||||
{
|
||||
//Improved Invisibility has 50% concealment!
|
||||
if(GetHasSpell(SPELL_GREATER_CATS_GRACE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt == 19) //Displacement
|
||||
{
|
||||
//Improved Invisibility has 50% concealment!
|
||||
if(GetHasSpell(SPELL_IMPROVED_INVISIBILITY, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt == 22) //Eagle's Splender
|
||||
{
|
||||
//Improved Invisibility has 50% concealment!
|
||||
if(GetHasSpell(SPELL_GREATER_EAGLE_SPLENDOR, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt == 24) //Endurance
|
||||
{
|
||||
//Improved Invisibility has 50% concealment!
|
||||
if(GetHasSpell(SPELL_GREATER_ENDURANCE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==27) //SPELL_EXPEDITIOUS_RETREAT
|
||||
{
|
||||
if(GetHasSpell(SPELL_HASTE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
else if(nInt ==30) //SPELL_EXPEDITIOUS_RETREAT
|
||||
{
|
||||
if(GetHasSpell(SPELL_HASTE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt == 32) //Fox Cunning
|
||||
{
|
||||
//Improved Invisibility has 50% concealment!
|
||||
if(GetHasSpell(SPELL_GREATER_FOXS_CUNNING, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==45)//SPELL_GREATER_STONESKIN
|
||||
{
|
||||
if(GetHasSpell(SPELL_PREMONITION, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==46) //SPELL_HASTE
|
||||
{
|
||||
if(GetHasSpell(SPELL_MASS_HASTE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==50)//SPELL_INVISIBILITY
|
||||
{
|
||||
if(GetHasSpell(SPELL_IMPROVED_INVISIBILITY, oTarget) ||
|
||||
GetHasSpell(SPELL_INVISIBILITY_SPHERE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==51)//SPELL_INVISIBILITY_SPHERE
|
||||
{
|
||||
if(GetHasSpell(SPELL_IMPROVED_INVISIBILITY, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==53)//SPELL_LESSER_MIND_BLANK
|
||||
{
|
||||
if(GetHasSpell(SPELL_MIND_BLANK, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==54)//SPELL_LESSER_SPELL_MANTLE
|
||||
{
|
||||
if(GetHasSpell(SPELL_SPELL_MANTLE, oTarget) ||
|
||||
GetHasSpell(SPELL_GREATER_SPELL_MANTLE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==60)//SPELL_MAGIC_WEAPON
|
||||
{
|
||||
if(GetHasSpell(SPELL_GREATER_MAGIC_WEAPON, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==65)//SPELL_MINOR_GLOBE_OF_INVULNERABILITY
|
||||
{
|
||||
if(GetHasSpell(SPELL_GLOBE_OF_INVULNERABILITY, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt == 69) //Owl's Wisdom
|
||||
{
|
||||
//Improved Invisibility has 50% concealment!
|
||||
if(GetHasSpell(SPELL_GREATER_OWLS_WISDOM, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==81)//SPELL_SEE_INVISIBILITY
|
||||
{
|
||||
if(GetHasSpell(SPELL_TRUE_SEEING, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==87)//SPELL_SPELL_MANTLE
|
||||
{
|
||||
if(GetHasSpell(SPELL_GREATER_SPELL_MANTLE, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
|
||||
else if(nInt ==90)//SPELL_STONESKIN
|
||||
{
|
||||
if(GetHasSpell(SPELL_GREATER_STONESKIN, oTarget) ||
|
||||
GetHasSpell(SPELL_PREMONITION, oTarget))
|
||||
b = 1;
|
||||
}
|
||||
//Otherwise, if it's not a spell in one of these categories
|
||||
//Tell the script to have the player cast the spell...
|
||||
else
|
||||
{
|
||||
b = 2;
|
||||
}
|
||||
|
||||
return b;
|
||||
|
||||
/*
|
||||
//If they have a better spell don't allow them to cast this spell
|
||||
if(b==1)
|
||||
{ return 1;}
|
||||
|
||||
//Otherwise allow them to cast the spell..
|
||||
else
|
||||
{ return 2;}
|
||||
*/
|
||||
|
||||
//PROTOTYPE END
|
||||
}
|
||||
|
||||
void CastSpell(int nSpell, int i, object oPC)
|
||||
{
|
||||
//If they have the spell memorized make them cast quickly!
|
||||
if(GetHasSpell(nSpell, oPC)>0)
|
||||
{
|
||||
int nGs = GetHasBetter(oPC, i);
|
||||
//If the user doesn't have a better spell memorized...
|
||||
if(nGs==2)
|
||||
{
|
||||
AssignCommand(oPC, ActionCastSpellAtObject
|
||||
(nSpell, oPC
|
||||
, METAMAGIC_ANY
|
||||
, FALSE
|
||||
, 0
|
||||
, PROJECTILE_PATH_TYPE_DEFAULT
|
||||
, TRUE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Buff()
|
||||
{
|
||||
object oPC;
|
||||
int nSpellId;
|
||||
int nSpell;
|
||||
int i;
|
||||
int nGs;
|
||||
|
||||
oPC = OBJECT_SELF;
|
||||
|
||||
//They must be a caster to use the item!
|
||||
if ((GetLevelByClass(CLASS_TYPE_BARD, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_CLERIC, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_DRUID, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_PALADIN, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_RANGER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SORCERER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_BLACKGUARD, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_OCULAR, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_HEALER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_CULTIST_SHATTERED_PEAK, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_KNIGHT_CHALICE, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_VIGILANT, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_VASSAL, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SOLDIER_OF_LIGHT, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_KNIGHT_MIDDLECIRCLE, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SOHEI, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SHADOWLORD, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SLAYER_OF_DOMIEL, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_NENTYAR_HUNTER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_BLIGHTER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_WIZARD, oPC)>0))
|
||||
{
|
||||
// for(i = 0; i<87; i++)
|
||||
{
|
||||
//This tells us which spell we are looking at..
|
||||
//We look at each one in turn, and IF the caster can cast it
|
||||
//then we assign them a command to cast it at thier level..
|
||||
// switch (i)
|
||||
{
|
||||
CastSpell(SPELL_AID, 1, oPC);
|
||||
CastSpell(SPELL_AMPLIFY, 2, oPC);
|
||||
CastSpell(SPELL_AURA_OF_VITALITY, 3, oPC);
|
||||
CastSpell(SPELL_AURAOFGLORY, 4, oPC);
|
||||
CastSpell(SPELL_BARKSKIN, 5, oPC);
|
||||
CastSpell(SPELL_BATTLETIDE, 6, oPC);
|
||||
CastSpell(SPELL_BLESS, 7, oPC);
|
||||
CastSpell(SPELL_BLESS_WEAPON, 8, oPC);
|
||||
CastSpell(SPELL_BLOOD_FRENZY, 9, oPC);
|
||||
CastSpell(SPELL_BULLS_STRENGTH, 10, oPC);
|
||||
CastSpell(SPELL_CAMOFLAGE, 11, oPC);
|
||||
CastSpell(SPELL_CATS_GRACE, 12, oPC);
|
||||
CastSpell(SPELL_CLAIRAUDIENCE_AND_CLAIRVOYANCE, 13, oPC);
|
||||
CastSpell(SPELL_CLARITY, 14, oPC);
|
||||
CastSpell(SPELL_DARKFIRE, 15, oPC);
|
||||
CastSpell(SPELL_DARKVISION, 16, oPC);
|
||||
CastSpell(SPELL_DEATH_ARMOR, 17, oPC);
|
||||
CastSpell(SPELL_DEATH_WARD, 18, oPC);
|
||||
CastSpell(SPELL_DISPLACEMENT, 19, oPC);
|
||||
CastSpell(SPELL_DIVINE_FAVOR, 20, oPC);
|
||||
CastSpell(SPELL_DIVINE_POWER, 21, oPC);
|
||||
CastSpell(SPELL_EAGLE_SPLEDOR, 22, oPC);
|
||||
CastSpell(SPELL_ELEMENTAL_SHIELD, 23, oPC);
|
||||
CastSpell(SPELL_ENDURANCE, 24, oPC);
|
||||
CastSpell(SPELL_ENDURE_ELEMENTS, 25, oPC);
|
||||
CastSpell(SPELL_ENERGY_BUFFER, 26, oPC);
|
||||
CastSpell(SPELL_ENTROPIC_SHIELD, 27, oPC);
|
||||
CastSpell(SPELL_ETHEREAL_VISAGE, 28, oPC);
|
||||
CastSpell(SPELL_ETHEREALNESS, 29, oPC);
|
||||
CastSpell(SPELL_EXPEDITIOUS_RETREAT, 30, oPC);
|
||||
CastSpell(SPELL_FLAME_WEAPON, 31, oPC);
|
||||
CastSpell(SPELL_FOXS_CUNNING, 32, oPC);
|
||||
CastSpell(SPELL_FREEDOM_OF_MOVEMENT, 33, oPC);
|
||||
CastSpell(SPELL_GHOSTLY_VISAGE, 34, oPC);
|
||||
CastSpell(SPELL_GLOBE_OF_INVULNERABILITY, 35, oPC);
|
||||
CastSpell(SPELL_GREATER_BULLS_STRENGTH, 36, oPC);
|
||||
CastSpell(SPELL_GREATER_CATS_GRACE, 37, oPC);
|
||||
CastSpell(SPELL_GREATER_DISPELLING, 38, oPC);
|
||||
CastSpell(SPELL_GREATER_EAGLE_SPLENDOR, 39, oPC);
|
||||
CastSpell(SPELL_GREATER_ENDURANCE, 40, oPC);
|
||||
CastSpell(SPELL_GREATER_FOXS_CUNNING, 41, oPC);
|
||||
CastSpell(SPELL_GREATER_MAGIC_WEAPON, 42, oPC);
|
||||
CastSpell(SPELL_GREATER_OWLS_WISDOM, 43, oPC);
|
||||
CastSpell(SPELL_GREATER_SPELL_MANTLE, 44, oPC);
|
||||
CastSpell(SPELL_GREATER_STONESKIN, 45, oPC);
|
||||
CastSpell(SPELL_HASTE, 46, oPC);
|
||||
CastSpell(SPELL_HOLY_AURA, 47, oPC);
|
||||
CastSpell(SPELL_HOLY_SWORD, 48, oPC);
|
||||
CastSpell(SPELL_IMPROVED_INVISIBILITY, 49, oPC);
|
||||
CastSpell(SPELL_INVISIBILITY, 50, oPC);
|
||||
CastSpell(SPELL_INVISIBILITY_SPHERE, 51, oPC);
|
||||
CastSpell(SPELL_KEEN_EDGE, 52, oPC);
|
||||
CastSpell(SPELL_LESSER_MIND_BLANK, 53, oPC);
|
||||
CastSpell(SPELL_LESSER_SPELL_MANTLE, 54, oPC);
|
||||
CastSpell(SPELL_LIGHT, 55, oPC);
|
||||
CastSpell(SPELL_MAGE_ARMOR, 56, oPC);
|
||||
CastSpell(SPELL_MAGIC_CIRCLE_AGAINST_CHAOS, 57, oPC);
|
||||
CastSpell(SPELL_MAGIC_CIRCLE_AGAINST_EVIL, 58, oPC);
|
||||
CastSpell(SPELL_MAGIC_VESTMENT, 59, oPC);
|
||||
CastSpell(SPELL_MAGIC_WEAPON, 60, oPC);
|
||||
CastSpell(SPELL_MASS_CAMOFLAGE, 61, oPC);
|
||||
CastSpell(SPELL_MASS_HASTE, 62, oPC);
|
||||
CastSpell(SPELL_MESTILS_ACID_SHEATH, 63, oPC);
|
||||
CastSpell(SPELL_MIND_BLANK, 64, oPC);
|
||||
CastSpell(SPELL_MINOR_GLOBE_OF_INVULNERABILITY, 65, oPC);
|
||||
CastSpell(SPELL_NEGATIVE_ENERGY_PROTECTION, 66, oPC);
|
||||
CastSpell(SPELL_ONE_WITH_THE_LAND, 67, oPC);
|
||||
CastSpell(SPELL_OWLS_INSIGHT, 68, oPC);
|
||||
CastSpell(SPELL_OWLS_WISDOM, 69, oPC);
|
||||
CastSpell(SPELL_PRAYER, 70, oPC);
|
||||
CastSpell(SPELL_PREMONITION, 71, oPC);
|
||||
CastSpell(SPELL_PROTECTION__FROM_CHAOS, 72, oPC);
|
||||
CastSpell(SPELL_PROTECTION_FROM_ELEMENTS, 73, oPC);
|
||||
CastSpell(SPELL_PROTECTION_FROM_EVIL, 74, oPC);
|
||||
CastSpell(SPELL_PROTECTION_FROM_SPELLS, 75, oPC);
|
||||
CastSpell(SPELL_REGENERATE, 76, oPC);
|
||||
CastSpell(SPELL_RESIST_ELEMENTS, 77, oPC);
|
||||
CastSpell(SPELL_RESISTANCE, 78, oPC);
|
||||
CastSpell(SPELL_SEE_INVISIBILITY, 79, oPC);
|
||||
CastSpell(SPELL_SHADES_STONESKIN, 80, oPC);
|
||||
CastSpell(SPELL_SHADOW_CONJURATION_INIVSIBILITY, 81, oPC);
|
||||
CastSpell(SPELL_SHADOW_CONJURATION_MAGE_ARMOR, 82, oPC);
|
||||
CastSpell(SPELL_SHADOW_SHIELD, 83, oPC);
|
||||
CastSpell(SPELL_SHIELD, 84, oPC);
|
||||
CastSpell(SPELL_SHIELD_OF_FAITH, 85, oPC);
|
||||
CastSpell(SPELL_SHIELD_OF_LAW, 86, oPC);
|
||||
CastSpell(SPELL_SPELL_MANTLE, 87, oPC);
|
||||
CastSpell(SPELL_SPELL_RESISTANCE, 88, oPC);
|
||||
CastSpell(SPELL_SPELLSTAFF, 89, oPC);
|
||||
CastSpell(SPELL_STONESKIN, 90, oPC);
|
||||
CastSpell(SPELL_TRUE_SEEING, 91, oPC);
|
||||
CastSpell(SPELL_TRUE_STRIKE, 92, oPC);
|
||||
CastSpell(SPELL_UNHOLY_AURA, 93, oPC);
|
||||
CastSpell(SPELL_VINE_MINE_CAMOUFLAGE, 94, oPC);
|
||||
CastSpell(SPELL_VIRTUE, 95, oPC);
|
||||
CastSpell(SPELL_WOUNDING_WHISPERS, 96, oPC);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//Otherwise Tell the PC why they can't use the item..
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("You must be a Spell Caster to use this option!", oPC, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
|
||||
Buff();
|
||||
|
||||
}
|
||||
|
||||
/////////////THE END, WOOHOO!!!///////////
|
||||
|
9
_module/nss/fake_conditional.nss
Normal file
9
_module/nss/fake_conditional.nss
Normal file
@@ -0,0 +1,9 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
int i = 3;
|
||||
|
||||
if(i==1)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
74
_module/nss/gc_ac_is_ok.nss
Normal file
74
_module/nss/gc_ac_is_ok.nss
Normal file
@@ -0,0 +1,74 @@
|
||||
#include "prc_misc_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nType = GetLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
//If the item they are trying to craft is not legal show this line..
|
||||
//If the item they are trying to craft is not legal show this line..
|
||||
if(nType== BASE_ITEM_BASTARDSWORD ||
|
||||
nType== BASE_ITEM_BATTLEAXE ||
|
||||
nType== BASE_ITEM_CLUB ||
|
||||
nType== BASE_ITEM_DAGGER ||
|
||||
nType== BASE_ITEM_DIREMACE ||
|
||||
nType== BASE_ITEM_DOUBLEAXE ||
|
||||
nType== BASE_ITEM_DWARVENWARAXE ||
|
||||
nType== BASE_ITEM_GREATAXE ||
|
||||
nType== BASE_ITEM_GREATSWORD ||
|
||||
nType== BASE_ITEM_HALBERD ||
|
||||
nType== BASE_ITEM_HANDAXE ||
|
||||
nType== BASE_ITEM_HEAVYFLAIL ||
|
||||
nType== BASE_ITEM_KAMA ||
|
||||
nType== BASE_ITEM_KATANA ||
|
||||
nType== BASE_ITEM_KUKRI ||
|
||||
nType== BASE_ITEM_LIGHTFLAIL ||
|
||||
nType== BASE_ITEM_LIGHTHAMMER ||
|
||||
nType== BASE_ITEM_LIGHTMACE ||
|
||||
nType== BASE_ITEM_LONGSWORD ||
|
||||
nType== BASE_ITEM_MORNINGSTAR ||
|
||||
nType== BASE_ITEM_QUARTERSTAFF ||
|
||||
nType== BASE_ITEM_RAPIER ||
|
||||
nType== BASE_ITEM_SCIMITAR ||
|
||||
nType== BASE_ITEM_SCYTHE ||
|
||||
nType== BASE_ITEM_SHORTSPEAR ||
|
||||
nType== BASE_ITEM_SHORTSWORD ||
|
||||
nType== BASE_ITEM_SICKLE ||
|
||||
nType== BASE_ITEM_TRIDENT ||
|
||||
nType== BASE_ITEM_TWOBLADEDSWORD ||
|
||||
nType== BASE_ITEM_WARHAMMER ||
|
||||
nType== BASE_ITEM_WHIP ||
|
||||
nType== BASE_ITEM_ARROW ||
|
||||
nType== BASE_ITEM_BOLT ||
|
||||
nType== BASE_ITEM_BULLET ||
|
||||
nType== BASE_ITEM_DART ||
|
||||
nType== BASE_ITEM_SHURIKEN ||
|
||||
nType== BASE_ITEM_THROWINGAXE ||
|
||||
nType== BASE_ITEM_HEAVYCROSSBOW ||
|
||||
nType== BASE_ITEM_LIGHTCROSSBOW ||
|
||||
nType== BASE_ITEM_LONGBOW ||
|
||||
nType== BASE_ITEM_SHORTBOW ||
|
||||
nType== BASE_ITEM_SLING ||
|
||||
nType== BASE_ITEM_LIGHT_LANCE ||
|
||||
nType== BASE_ITEM_HEAVY_PICK ||
|
||||
nType== BASE_ITEM_LIGHT_PICK ||
|
||||
nType== BASE_ITEM_SAI ||
|
||||
nType== BASE_ITEM_NUNCHAKU ||
|
||||
nType== BASE_ITEM_FALCHION ||
|
||||
nType== BASE_ITEM_SAP ||
|
||||
nType== BASE_ITEM_KATAR ||
|
||||
nType== BASE_ITEM_HEAVY_MACE ||
|
||||
nType== BASE_ITEM_MAUL ||
|
||||
nType== BASE_ITEM_DOUBLE_SCIMITAR ||
|
||||
nType== BASE_ITEM_GOAD ||
|
||||
nType== BASE_ITEM_EAGLE_CLAW ||
|
||||
nType== BASE_ITEM_ELVEN_LIGHTBLADE ||
|
||||
nType== BASE_ITEM_ELVEN_THINBLADE ||
|
||||
nType== BASE_ITEM_ELVEN_COURTBLADE)
|
||||
|
||||
//If it's a weapon don't show the line!
|
||||
return FALSE;
|
||||
|
||||
//Otherwise show them the line
|
||||
return TRUE;
|
||||
}
|
63
_module/nss/gc_add_ability.nss
Normal file
63
_module/nss/gc_add_ability.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
//Script Name: gc_add_ability
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nAbility = GetLocalInt(oPC, "CRAFT_ABILITY");
|
||||
int nBonus = GetLocalInt(oPC, "CRAFT_SPELL_BONUS");
|
||||
|
||||
//Define what the property is to be added
|
||||
itemproperty ipAddAC=ItemPropertyAbilityBonus(nAbility, nBonus);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, FALSE, FALSE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
||||
|
66
_module/nss/gc_add_ac.nss
Normal file
66
_module/nss/gc_add_ac.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//Script Name: gc_add_ac
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//Determine how much AC we are adding..
|
||||
int nAC = GetLocalInt(oPC, "CRAFT_SPELL_BONUS");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyACBonus(nAC);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_AC_BONUS, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, TRUE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
||||
|
66
_module/nss/gc_add_attk_bon.nss
Normal file
66
_module/nss/gc_add_attk_bon.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//Script Name: gc_add_attk_bon
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//Determine how many Attack Bonuses we are adding..
|
||||
int nAmount = GetLocalInt(oPC, "CRAFT_REGEN_TOTAL");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyAttackBonus(nAmount);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_ENHANCEMENT_BONUS, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, TRUE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
||||
|
95
_module/nss/gc_add_bon_spell.nss
Normal file
95
_module/nss/gc_add_bon_spell.nss
Normal file
@@ -0,0 +1,95 @@
|
||||
//Script Name: gc_add_bon_spell
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
//PROTOTYPE DECLARED
|
||||
int GetBonusCount(object oItem);
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
int nBonus = GetLocalInt(oPC, "CRAFT_SPELL_BONUS");
|
||||
int nClass = GetLocalInt(oPC, "CRAFT_CLASS");
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
//Stop EVERYTHING!
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//First let's count the # of spell bonuses that are on the item! (8 = Max!)
|
||||
if(GetBonusCount(oCraft)>=8)
|
||||
{
|
||||
FloatingTextStringOnCreature("The item has too many bonuses!!", oPC, FALSE);
|
||||
//Stop EVERYTHING!
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
return;
|
||||
}
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyBonusLevelSpell(nClass, nBonus);
|
||||
|
||||
//Finally add the Property
|
||||
AddItemProperty(DURATION_TYPE_PERMANENT, ipAddAC, oCraft);
|
||||
|
||||
DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
||||
|
||||
//PROTOTYPE DEFINED
|
||||
|
||||
int GetBonusCount(object oItem)
|
||||
{
|
||||
itemproperty iProp;
|
||||
int i = 0;
|
||||
|
||||
iProp = GetFirstItemProperty(oItem);
|
||||
while(GetIsItemPropertyValid(iProp))
|
||||
{
|
||||
if(GetItemPropertyType(iProp) == ITEM_PROPERTY_BONUS_SPELL_SLOT_OF_LEVEL_N)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
||||
iProp = GetNextItemProperty(oItem);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
67
_module/nss/gc_add_dmg_bonus.nss
Normal file
67
_module/nss/gc_add_dmg_bonus.nss
Normal file
@@ -0,0 +1,67 @@
|
||||
//Script Name: gc_add_dmg_bonus
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
//Find out how much we are suppose to put on the item..
|
||||
int nBonus = GetLocalInt(oPC, "CRAFT_DMG_BONUS");
|
||||
int nType = GetLocalInt(oPC, "CRAFT_DAMAGE_TYPE");
|
||||
int nIPType = GetLocalInt(oPC, "DI_TYPE");
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
//SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyDamageBonus(nIPType, nBonus);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_DAMAGE_BONUS, DURATION_TYPE_PERMANENT, nIPType);
|
||||
|
||||
//Finally add the Prior AC + 1
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, FALSE, FALSE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
||||
|
65
_module/nss/gc_add_dmg_imm.nss
Normal file
65
_module/nss/gc_add_dmg_imm.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
//Script Name: gc_add_dmg_imm
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 9/11/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nDmg = GetLocalInt(oPC, "CRAFT_DAMAGE_TYPE");
|
||||
int nAmount = GetLocalInt(oPC, "DI_AMMOUNT");
|
||||
int nType = GetLocalInt(oPC, "DI_TYPE");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyDamageImmunity(nType, nAmount);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE, DURATION_TYPE_PERMANENT, nType);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
|
||||
}
|
||||
|
64
_module/nss/gc_add_dmg_red.nss
Normal file
64
_module/nss/gc_add_dmg_red.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
//Script Name: gc_add_dmg_red
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nPower = GetLocalInt(oPC, "CRAFT_DR_POWER");
|
||||
int nAmount = GetLocalInt(oPC, "CRAFT_DR_AMOUNT");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyDamageReduction(nPower, nAmount);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_DAMAGE_REDUCTION, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, TRUE);
|
||||
|
||||
|
||||
}
|
||||
|
62
_module/nss/gc_add_ench_bon.nss
Normal file
62
_module/nss/gc_add_ench_bon.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
//Script Name: gc_add_ench_bon
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
add an item property the user selected
|
||||
to the item, if it's actually in the
|
||||
slot they chose.
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
//Let's make sure the items is actually on them!
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
int nAmount = GetLocalInt(oPC, "CRAFT_SPELL_BONUS");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyEnhancementBonus(nAmount);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_ENHANCEMENT_BONUS, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, TRUE);
|
||||
|
||||
}
|
||||
|
60
_module/nss/gc_add_evade.nss
Normal file
60
_module/nss/gc_add_evade.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//Script Name: gc_add_evade
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyImprovedEvasion();
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_IMPROVED_EVASION, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
|
||||
}
|
63
_module/nss/gc_add_feat.nss
Normal file
63
_module/nss/gc_add_feat.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
//Script Name: gc_add_feat
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nType = GetLocalInt(oPC, "CRAFT_FEAT");
|
||||
int nIPType = GetLocalInt(oPC, "CRAFT_IP_FEAT");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyBonusFeat(nType);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_BONUS_FEAT, DURATION_TYPE_PERMANENT, nIPType);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
}
|
||||
|
60
_module/nss/gc_add_freedom.nss
Normal file
60
_module/nss/gc_add_freedom.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//Script Name: gc_add_freedom
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyFreeAction();
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_FREEDOM_OF_MOVEMENT, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
|
||||
}
|
61
_module/nss/gc_add_haste.nss
Normal file
61
_module/nss/gc_add_haste.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
//Script Name: gc_add_haste
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyHaste();
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_HASTE, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
|
||||
}
|
||||
|
64
_module/nss/gc_add_immunity.nss
Normal file
64
_module/nss/gc_add_immunity.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
//Script Name: gc_add_imm_crit
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nType = GetLocalInt(oPC, "CRAFT_IMMUNE");
|
||||
|
||||
itemproperty ipAddAC=ItemPropertyImmunityMisc(nType);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS, DURATION_TYPE_PERMANENT, nType);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
||||
|
59
_module/nss/gc_add_keen.nss
Normal file
59
_module/nss/gc_add_keen.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
//Script Name: gc_add_keen
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
itemproperty ipAddAC=ItemPropertyKeen();
|
||||
|
||||
//Remove the Existing FIRST, so they cannot stack!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_KEEN, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
}
|
||||
|
63
_module/nss/gc_add_massv_crt.nss
Normal file
63
_module/nss/gc_add_massv_crt.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
//Script Name: gc_add_massv_crt
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nPower = GetLocalInt(oPC, "CRAFT_DMG_BONUS");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyMassiveCritical(nPower);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_MASSIVE_CRITICALS, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Prior AC + 1
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, FALSE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
64
_module/nss/gc_add_mighty.nss
Normal file
64
_module/nss/gc_add_mighty.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
//Script Name: gc_add_mighty
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/30/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the ActionTaken
|
||||
Event of a Conversation line, it will
|
||||
Add AC to the item we are looking at
|
||||
which an item the PC possessoses has
|
||||
in it..
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nSlot = GetLocalInt(oPC, "CRAFT_SLOT");
|
||||
object oCraft = GetItemInSlot(nSlot ,oPC);
|
||||
|
||||
if (!GetIsObjectValid(oCraft))
|
||||
{
|
||||
FloatingTextStringOnCreature("Your not wearing the item!!", oPC, FALSE);
|
||||
SetLocalInt(oPC, "CRAFT_FAILED", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
int nCost = GetLocalInt(oPC, "CRAFT_PAYMENT");
|
||||
effect eEffect;
|
||||
|
||||
if(GetGold(oPC)<nCost)
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold!", oPC, FALSE);
|
||||
AssignCommand(oPC, ClearAllActions()); //End the conversation!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Take the cost to craft..
|
||||
TakeGoldFromCreature(nCost, oPC, TRUE);
|
||||
eEffect = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC, 0.0f);
|
||||
|
||||
FloatingTextStringOnCreature("Your item has been crafted.", oPC, FALSE);
|
||||
}
|
||||
|
||||
int nPower = GetLocalInt(oPC, "CRAFT_SPELL_BONUS");
|
||||
|
||||
//What we are adding is AC
|
||||
itemproperty ipAddAC=ItemPropertyMaxRangeStrengthMod(nPower);
|
||||
|
||||
//Remove the Existing FIRST!
|
||||
IPRemoveMatchingItemProperties(oCraft, ITEM_PROPERTY_MIGHTY, DURATION_TYPE_PERMANENT, -1);
|
||||
|
||||
//Finally add the Property
|
||||
IPSafeAddItemProperty(oCraft, ipAddAC, 0.0f, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING, TRUE, TRUE);
|
||||
|
||||
//We don't want to delete this intergal because we can change it later..
|
||||
//DeleteLocalInt(oPC, "CRAFT_TYPE");
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user