//:://///////////////////////////////////////////// //:: Name(ASG_RULE) Open Store //:: FileName //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* This is a important script for it handles all of the stores functions. You must get the full name of the Vender (the person you are talking to) and the name of the shop he opens. */ //::////////////////////////////////////////////// //:: Created By: Donny Wilbanks //:: Created On: 06/30/02 //::////////////////////////////////////////////// /* void main() { object oStore = GetObjectByTag("STORE_TAG_HERE"); if (GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_ELF) { OpenStore(oStore, GetPCSpeaker(), 100); } else OpenStore(oStore, GetPCSpeaker()); } */ void main() { // going to make one script to open ALL stores // get name of Object (this will be unique to each shop keeper // compare name and then open store accordingly. string sNPCname = GetName(OBJECT_SELF); // DBug code - speak NPC's name on screen. object oPC = GetPCSpeaker(); ActionSpeakString(sNPCname); // Got NPC name, then compare and open up the shop int vSellPrice; // These two are for the BUY & Sell fucntions int vBuyPrice; // object oStore; // Store object object oStore_Watcher; // Ivisible Store Ghost - used to monitor the cash flow. float vDist; int vSTORELIMITS = GetLocalInt(GetModule(),"ASGC_STORELIMITS"); // ** Shop Located In South Side. if (sNPCname =="William" ) { oStore = GetObjectByTag("MOD_SHOP_WILLIAMSARCANE"); if (GetIsObjectValid(oStore)&& vSTORELIMITS==TRUE) { vSellPrice = 0; SetLocalInt(oStore,"SHOP_SELLPRICE",vSellPrice); vBuyPrice = 35; SetLocalInt(oStore,"SHOP_BUYPRICE",vBuyPrice); OpenStore(oStore, GetPCSpeaker(),vSellPrice,vBuyPrice); SetLocalInt(oStore,"SHOP_MAXGOLD",2000); SetLocalObject(oStore,"StoreOwner",OBJECT_SELF); // the store ghost collects extra money - spill over from sold items. } } // // ** Shop Located In South Side. if (sNPCname =="Beldizar") { oStore = GetObjectByTag("MOD_SHOP_BELDIZARGENERALSTORE"); if (GetIsObjectValid(oStore)&& vSTORELIMITS==TRUE) { vSellPrice = 40; SetLocalInt(oStore,"SHOP_SELLPRICE",vSellPrice); vBuyPrice = 40; SetLocalInt(oStore,"SHOP_BUYPRICE",vBuyPrice); OpenStore(oStore, GetPCSpeaker(),vSellPrice,vBuyPrice); SetLocalInt(oStore,"SHOP_MAXGOLD",300); SetLocalObject(oStore,"StoreOwner",OBJECT_SELF); // the store ghost collects extra money - spill over from sold items. } }//MOD_SHOP_BACCOBTEMPLE1 if (sNPCname =="Grathus") { oStore = GetObjectByTag("MOD_SHOP_BACCOBTEMPLE1"); if (GetIsObjectValid(oStore)&& vSTORELIMITS==TRUE) { vSellPrice = 40; SetLocalInt(oStore,"SHOP_SELLPRICE",vSellPrice); vBuyPrice = 40; SetLocalInt(oStore,"SHOP_BUYPRICE",vBuyPrice); OpenStore(oStore, GetPCSpeaker(),vSellPrice,vBuyPrice); SetLocalInt(oStore,"SHOP_MAXGOLD",500); SetLocalObject(oStore,"StoreOwner",OBJECT_SELF); // the store ghost collects extra money - spill over from sold items. } } if (sNPCname =="Vellian") { oStore = GetObjectByTag("MOD_SHOP_MASTERBOYWER"); if (GetIsObjectValid(oStore)&& vSTORELIMITS==TRUE) { vSellPrice = 40; SetLocalInt(oStore,"SHOP_SELLPRICE",vSellPrice); vBuyPrice = 40; SetLocalInt(oStore,"SHOP_BUYPRICE",vBuyPrice); OpenStore(oStore, GetPCSpeaker(),vSellPrice,vBuyPrice); SetLocalInt(oStore,"SHOP_MAXGOLD",500); SetLocalObject(oStore,"StoreOwner",OBJECT_SELF); // the store ghost collects extra money - spill over from sold items. } } if (GetIsObjectValid(oStore)) { OpenStore(oStore, GetPCSpeaker()); } // }