Module commit

Module commit.
This commit is contained in:
Jaysyn904
2024-06-14 10:48:20 -04:00
parent 079830314c
commit f5ffe7d0b9
11110 changed files with 4747686 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
//::///////////////////////////////////////////////
//:: Name: pv_set_prc_db
//:://////////////////////////////////////////////
/*
Saves the new item info in the database
after listening to the price.
*/
//:://////////////////////////////////////////////
#include "pv_db_functions"
void main()
{
object oNPCMerchant = OBJECT_SELF;
object oPC = GetLocalObject(oNPCMerchant, "PV_MERCHANT_OWNER");
string strItemName = GetLocalString(oNPCMerchant, "PV_ITEM_NAME");
int iItemPrice = GetLocalInt(oNPCMerchant, "PV_SPOKEN_PRICE");
// Put the price in the DB
SaveItemPriceToDatabase(oPC, iItemPrice, strItemName);
// Set the price in local varaibles as well
SetLocalInt(oNPCMerchant, "PV_ITEM_PRICE" + strItemName, iItemPrice);
}