Added Skullkeep Mystic Forge / Combine system., modified to use a single forge and combine for all item types. Added new Magesmith shop & NPC in Town of Ascension. Full compile. Updated release archive.
177 lines
5.7 KiB
Plaintext
177 lines
5.7 KiB
Plaintext
/////::///////////////////////////////////////////////
|
|
/////:: forge_custtokens script - set custom tokens for forge conversation
|
|
/////:: Written by Winterknight on 2/17/06
|
|
/////:: This script also is used to set up the basics for the forge.
|
|
/////:: this script as necessary to change the basic type of forge.
|
|
/////::
|
|
/////:: Updated for Path of Ascension / PRC8 by Jaysyn
|
|
/////:://////////////////////////////////////////////
|
|
#include "prc_misc_const"
|
|
|
|
void main()
|
|
{
|
|
object oForge = GetNearestObjectByTag("forge_custom", OBJECT_SELF, 1);
|
|
object oItem = GetFirstItemInInventory(oForge);
|
|
|
|
// Store the forge name for display
|
|
SetCustomToken(101, GetName(oForge)); // Name of Forge
|
|
SetLocalString(OBJECT_SELF, "ForgeName", GetName(oForge));
|
|
|
|
string sTypes = "Unsupported Item Type"; // Default message
|
|
int nType = 0;
|
|
|
|
// Check the base item type of oItem and assign corresponding sTypes and nType
|
|
if (oItem != OBJECT_INVALID)
|
|
{
|
|
int nBaseItemType = GetBaseItemType(oItem);
|
|
|
|
switch (nBaseItemType)
|
|
{
|
|
case BASE_ITEM_BOOTS:
|
|
case BASE_ITEM_BELT:
|
|
sTypes = "Belts and Boots";
|
|
nType = 1;
|
|
break;
|
|
|
|
case BASE_ITEM_ARMOR:
|
|
case BASE_ITEM_BRACER:
|
|
case BASE_ITEM_HELMET:
|
|
case BASE_ITEM_LARGESHIELD:
|
|
case BASE_ITEM_SMALLSHIELD:
|
|
case BASE_ITEM_TOWERSHIELD:
|
|
sTypes = "Armor, Helms and Shields";
|
|
nType = 2;
|
|
break;
|
|
|
|
case BASE_ITEM_BASTARDSWORD:
|
|
case BASE_ITEM_BATTLEAXE:
|
|
case BASE_ITEM_CLUB:
|
|
case BASE_ITEM_DAGGER:
|
|
case BASE_ITEM_DIREMACE:
|
|
case BASE_ITEM_DOUBLEAXE:
|
|
case BASE_ITEM_DOUBLE_SCIMITAR:
|
|
case BASE_ITEM_DWARVENWARAXE:
|
|
case BASE_ITEM_EAGLE_CLAW:
|
|
case BASE_ITEM_ELVEN_COURTBLADE:
|
|
case BASE_ITEM_ELVEN_LIGHTBLADE:
|
|
case BASE_ITEM_ELVEN_THINBLADE:
|
|
case BASE_ITEM_FALCHION:
|
|
case BASE_ITEM_GLOVES:
|
|
case BASE_ITEM_GOAD:
|
|
case BASE_ITEM_GREATAXE:
|
|
case BASE_ITEM_GREATSWORD:
|
|
case BASE_ITEM_HALBERD:
|
|
case BASE_ITEM_HANDAXE:
|
|
case BASE_ITEM_HEAVYFLAIL:
|
|
case BASE_ITEM_HEAVY_MACE:
|
|
case BASE_ITEM_HEAVY_PICK:
|
|
case BASE_ITEM_KAMA:
|
|
case BASE_ITEM_KATANA:
|
|
case BASE_ITEM_KATAR:
|
|
case BASE_ITEM_KUKRI:
|
|
case BASE_ITEM_LIGHTFLAIL:
|
|
case BASE_ITEM_LIGHTHAMMER:
|
|
case BASE_ITEM_LIGHTMACE:
|
|
case BASE_ITEM_LIGHT_PICK:
|
|
case BASE_ITEM_LONGSWORD:
|
|
case BASE_ITEM_MAUL:
|
|
case BASE_ITEM_MORNINGSTAR:
|
|
case BASE_ITEM_NUNCHAKU:
|
|
case BASE_ITEM_QUARTERSTAFF:
|
|
case BASE_ITEM_RAPIER:
|
|
case BASE_ITEM_SAI:
|
|
case BASE_ITEM_SAP:
|
|
case BASE_ITEM_SCIMITAR:
|
|
case BASE_ITEM_SCYTHE:
|
|
case BASE_ITEM_SHORTSPEAR:
|
|
case BASE_ITEM_SHORTSWORD:
|
|
case BASE_ITEM_SICKLE:
|
|
case BASE_ITEM_SLING:
|
|
case BASE_ITEM_TRIDENT:
|
|
case BASE_ITEM_TWOBLADEDSWORD:
|
|
case BASE_ITEM_WARHAMMER:
|
|
case BASE_ITEM_WHIP:
|
|
sTypes = "Melee Weapons and Gloves";
|
|
nType = 3;
|
|
break;
|
|
|
|
case BASE_ITEM_CLOAK:
|
|
sTypes = "Cloaks";
|
|
nType = 4;
|
|
break;
|
|
|
|
case BASE_ITEM_AMULET:
|
|
case BASE_ITEM_RING:
|
|
sTypes = "Rings and Amulets";
|
|
nType = 5;
|
|
break;
|
|
|
|
case BASE_ITEM_SHORTBOW:
|
|
case BASE_ITEM_HEAVYCROSSBOW:
|
|
case BASE_ITEM_LIGHTCROSSBOW:
|
|
case BASE_ITEM_LONGBOW:
|
|
sTypes = "Bows and Crossbows";
|
|
nType = 6;
|
|
break;
|
|
|
|
case BASE_ITEM_ARROW:
|
|
case BASE_ITEM_BOLT:
|
|
case BASE_ITEM_BULLET:
|
|
case BASE_ITEM_GRENADE:
|
|
case BASE_ITEM_DART:
|
|
case BASE_ITEM_SHURIKEN:
|
|
case BASE_ITEM_THROWINGAXE:
|
|
sTypes = "Thrown Weapons and Ammunition";
|
|
nType = 7;
|
|
break;
|
|
|
|
case BASE_ITEM_MISCLARGE:
|
|
case BASE_ITEM_MISCMEDIUM:
|
|
case BASE_ITEM_MISCSMALL:
|
|
case BASE_ITEM_MISCTALL:
|
|
case BASE_ITEM_MISCTHIN:
|
|
case BASE_ITEM_MISCWIDE:
|
|
case BASE_ITEM_MAGICWAND:
|
|
case BASE_ITEM_MAGICSTAFF:
|
|
case BASE_ITEM_MAGICROD:
|
|
case BASE_ITEM_BOOK:
|
|
case BASE_ITEM_LARGEBOX:
|
|
sTypes = "Miscellaneous Items";
|
|
nType = 8;
|
|
break;
|
|
}
|
|
}
|
|
|
|
// Update tokens and local variables based on selected item type
|
|
SetCustomToken(102, sTypes); // Type of item that will work here.
|
|
SetLocalInt(OBJECT_SELF, "ItemType", nType);
|
|
SetLocalInt(OBJECT_SELF, "ItemCost", 0);
|
|
}
|
|
|
|
|
|
/* void main()
|
|
{
|
|
object oForge = GetNearestObjectByTag("forge_custom",OBJECT_SELF,1);
|
|
object oItem = GetFirstItemInInventory(oForge);
|
|
|
|
SetCustomToken(101,GetName(oForge)); // Name of Forge
|
|
SetLocalString(OBJECT_SELF, "ForgeName", GetName(oForge));
|
|
|
|
string sTypes;
|
|
int nType;
|
|
string sForgeLeft = GetStringLeft(GetName(oForge),6);
|
|
|
|
if (sForgeLeft == "Cobble") {sTypes = "Belts and Boots"; nType = 1;}
|
|
if (sForgeLeft == "Armour") {sTypes = "Armor, Helms and Shields"; nType = 2;}
|
|
if (sForgeLeft == "Weapon") {sTypes = "Melee Weapons and Gloves"; nType = 3;}
|
|
if (sForgeLeft == "Tailor") {sTypes = "Cloaks"; nType = 4;}
|
|
if (sForgeLeft == "Jewele") {sTypes = "Rings and Amulets"; nType = 5;}
|
|
if (sForgeLeft == "Bowyer") {sTypes = "Bows and Crossbows"; nType = 6;}
|
|
if (sForgeLeft == "Fletch") {sTypes = "Thrown Weapons and Ammunition"; nType = 7;}
|
|
if (sForgeLeft == "Common") {sTypes = "Common Items (not equipped)"; nType = 8;}
|
|
if (sForgeLeft == "Mystic") {sTypes = "any Magical Items"; nType = 9;}
|
|
|
|
SetCustomToken(102,sTypes); // Type of item that will work here.
|
|
SetLocalInt(OBJECT_SELF, "ItemType", nType);
|
|
SetLocalInt(OBJECT_SELF, "ItemCost", 0);
|
|
} */ |