Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
270 lines
6.8 KiB
Plaintext
270 lines
6.8 KiB
Plaintext
#include "prc_x2_itemprop"
|
|
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetPCSpeaker();
|
|
|
|
AssignCommand(oPC, ActionSpeakString("May this weapon be blessed by Gond, the Wonderbringer, Lord of All Smiths!", TALKVOLUME_TALK));
|
|
AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_WORSHIP, 1.0, 8.0));
|
|
|
|
object oAnvil = GetNearestObjectByTag("ANVIL_GOND", OBJECT_SELF, 1);
|
|
location locAnvil = GetLocation (oAnvil);
|
|
object oFirstItem = GetFirstItemInInventory(oAnvil);
|
|
object oSecondItem = GetNextItemInInventory(oAnvil);
|
|
object oGem;
|
|
object oWeapon;
|
|
string sNewWeapon;
|
|
int nIsGem = 0;
|
|
int nIsWeapon = 0;
|
|
|
|
if (oSecondItem == OBJECT_INVALID)
|
|
{
|
|
SendMessageToPC(oPC, "Nothing happens. There seems to be something missing to perform the ritual correctly.");
|
|
return;
|
|
}
|
|
if (GetTag(oFirstItem) == "NW_IT_GEM009")
|
|
{
|
|
oGem = oFirstItem;
|
|
oWeapon = oSecondItem;
|
|
nIsGem = 1;
|
|
}
|
|
else if (GetTag(oSecondItem) == "NW_IT_GEM009")
|
|
{
|
|
oGem = oSecondItem;
|
|
oWeapon = oFirstItem;
|
|
nIsGem = 1;
|
|
}
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "Nothing happens. There seems to be something missing to perform the ritual correctly.");
|
|
return;
|
|
}
|
|
|
|
//Greataxe
|
|
if (GetTag(oWeapon) == "NW_WAXGR001")
|
|
{
|
|
sNewWeapon = "NW_WAXMGR002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Handaxe
|
|
else if (GetTag(oWeapon) == "NW_WAXHN001")
|
|
{
|
|
sNewWeapon = "NW_WAXMHN002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Battleaxe
|
|
else if (GetTag(oWeapon) == "NW_WAXBT001")
|
|
{
|
|
sNewWeapon = "NW_WAXMBT002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Bastard Sword
|
|
else if (GetTag(oWeapon) == "NW_WSWBS001")
|
|
{
|
|
sNewWeapon = "NW_WSWMBS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Longsword
|
|
else if (GetTag(oWeapon) == "NW_WSWLS001")
|
|
{
|
|
sNewWeapon = "NW_WSWMLS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Dagger
|
|
else if (GetTag(oWeapon) == "NW_WSWDG001")
|
|
{
|
|
sNewWeapon = "NW_WSWMDG002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Greatsword
|
|
else if (GetTag(oWeapon) == "NW_WSWGS001")
|
|
{
|
|
sNewWeapon = "NW_WSWMGS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Katana
|
|
else if (GetTag(oWeapon) == "NW_WSWKA001")
|
|
{
|
|
sNewWeapon = "NW_WSWMKA002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Rapier
|
|
else if (GetTag(oWeapon) == "NW_WSWRP001")
|
|
{
|
|
sNewWeapon = "NW_WSWMRP002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Scimitar
|
|
else if (GetTag(oWeapon) == "NW_WSWSC001")
|
|
{
|
|
sNewWeapon = "NW_WSWMSC002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Short Sword
|
|
else if (GetTag(oWeapon) == "NW_WSWSS001")
|
|
{
|
|
sNewWeapon = "NW_WSWMSS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Club
|
|
else if (GetTag(oWeapon) == "NW_WBLCL001")
|
|
{
|
|
sNewWeapon = "NW_WBLMCL002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Heavy Flail
|
|
else if (GetTag(oWeapon) == "NW_WBLFH001")
|
|
{
|
|
sNewWeapon = "NW_WBLMFH002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Light Flail
|
|
else if (GetTag(oWeapon) == "NW_WBLFL001")
|
|
{
|
|
sNewWeapon = "NW_WBLMFL002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Light Hammer
|
|
else if (GetTag(oWeapon) == "NW_WBLHL001")
|
|
{
|
|
sNewWeapon = "NW_WBLMHL002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Warhammer
|
|
else if (GetTag(oWeapon) == "NW_WBLHW001")
|
|
{
|
|
sNewWeapon = "NW_WBLMHW002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Mace
|
|
else if (GetTag(oWeapon) == "NW_WBLML001")
|
|
{
|
|
sNewWeapon = "NW_WBLMML002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Morningstar
|
|
else if (GetTag(oWeapon) == "NW_WBLMS001")
|
|
{
|
|
sNewWeapon = "NW_WBLMMS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Dire Mace
|
|
else if (GetTag(oWeapon) == "NW_WDBMA001")
|
|
{
|
|
sNewWeapon = "NW_WDBMMA002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Double Axe
|
|
else if (GetTag(oWeapon) == "NW_WDBAX001")
|
|
{
|
|
sNewWeapon = "NW_WDBMAX002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Quarterstaff
|
|
else if (GetTag(oWeapon) == "NW_WDBQS001")
|
|
{
|
|
sNewWeapon = "NW_WDBMQS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Two-Bladed Sword
|
|
else if (GetTag(oWeapon) == "NW_WDBSW001")
|
|
{
|
|
sNewWeapon = "NW_WDBMSW002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Kama
|
|
else if (GetTag(oWeapon) == "NW_WSPKA001")
|
|
{
|
|
sNewWeapon = "NW_WSPMKA002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Kukri
|
|
else if (GetTag(oWeapon) == "NW_WSPKU001")
|
|
{
|
|
sNewWeapon = "NW_WSPMKU002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Sickle
|
|
else if (GetTag(oWeapon) == "NW_WSPSC001")
|
|
{
|
|
sNewWeapon = "NW_WSPMSC002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Halberd
|
|
else if (GetTag(oWeapon) == "NW_WPLHB001")
|
|
{
|
|
sNewWeapon = "NW_WPLMHB002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Scythe
|
|
else if (GetTag(oWeapon) == "NW_WPLSC001")
|
|
{
|
|
sNewWeapon = "NW_WPLMSC002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Spear
|
|
else if (GetTag(oWeapon) == "NW_WPLSS001")
|
|
{
|
|
sNewWeapon = "NW_WPLMSS002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Heavy Crossbow
|
|
else if (GetTag(oWeapon) == "NW_WBWXH001")
|
|
{
|
|
sNewWeapon = "NW_WBWMXH002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Light Crossbow
|
|
else if (GetTag(oWeapon) == "NW_WBWXL001")
|
|
{
|
|
sNewWeapon = "NW_WBWMXL002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Longbow
|
|
else if (GetTag(oWeapon) == "NW_WBWLN001")
|
|
{
|
|
sNewWeapon = "NW_WBWMLN002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Shortbow
|
|
else if (GetTag(oWeapon) == "NW_WBWSH001")
|
|
{
|
|
sNewWeapon = "NW_WBWMSH002";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Sling
|
|
else if (GetTag(oWeapon) == "NW_WBWSL001")
|
|
{
|
|
sNewWeapon = "NW_WBWMSL001";
|
|
nIsWeapon = 1;
|
|
}
|
|
//Composite Longbow
|
|
else if (GetTag(oWeapon) == "nk_wp_complbow")
|
|
{
|
|
sNewWeapon = "NW_WBWMLN010"; //wbwmln011
|
|
nIsWeapon = 1;
|
|
}
|
|
//Composite Shortbow
|
|
else if (GetTag(oWeapon) == "nk_wp_compsbow")
|
|
{
|
|
sNewWeapon = "NW_WBWMSH010"; //wbwmsh011
|
|
nIsWeapon = 1;
|
|
}
|
|
|
|
//Create +1 weapon *************************************************************************
|
|
if (nIsWeapon == 1)
|
|
{
|
|
DelayCommand(10.0, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), locAnvil));
|
|
DelayCommand(12.0, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), locAnvil));
|
|
DestroyObject(oGem, 0.0);
|
|
DestroyObject(oWeapon, 0.0);
|
|
CreateItemOnObject(sNewWeapon, oAnvil);
|
|
}
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "Nothing happens. You seem to have placed the wrong items upon the anvil.");
|
|
}
|
|
|
|
}
|