Author Topic: Time related **CLOSED**  (Read 712 times)

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« on: January 16, 2013, 07:04:48 am »


               I added a persistent time script like a recent post a few weeks ago. So I hope this is going to be somwhat familliar for someone.

What I want to do is set a value added property on an item each month.

I'm thinking like a 1d4 value added property.

It is for a stocks and bonds system.

Or most likely a merchant guild type thing.

You buy an item. It gets time stamped.

Over time value gets added to the item.

Of course there has to be risk so let's say a 1 on a d20 there is  a 1d4 value decrease.

I'm running NWNX2 and Leto. I don't know what Leto would have to do with it but I would be OK with using MySQL if necessary.

Thanks for any help. I'm stumped on the time thing.
               
               

               


                     Modifié par Supreme_Pizza, 21 janvier 2013 - 07:57 .
                     
                  


            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Time related **CLOSED**
« Reply #1 on: January 17, 2013, 05:05:57 am »


               Would this affect characters not logged in (can players potentially escape the effect by logging out)?  Is this a game month or real month?  There is an additional cost parameter already for items so, all you would have to do is define the parameter values in the 2da and replace the existing additional cost with an new one with a different cost parameter value.
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #2 on: January 17, 2013, 07:10:50 am »


               

WhiZard wrote...

Would this affect characters not logged in (can players potentially escape the effect by logging out)?  Is this a game month or real month?  There is an additional cost parameter already for items so, all you would have to do is define the parameter values in the 2da and replace the existing additional cost with an new one with a different cost parameter value.


Yes this would effect characters not logged in. Well specifically the item that belongs to the character would be effected.

This would be a game month.
I currently have module properties set at 5 minutes per hour.
That is 2 real hours per game day.
NWN has 28 days in a month right?
So that is 56 (4 days 8 hours) real hours per game  month.

I have been thinking about this for a while.
So far...
The easiest thing I can think to do is to have them store the item in a persistent chest.
Let's call it a safe deposit box.

Here is the create code for the DB so you know what is going on.

/*
CREATE TABLE `vault_items` (
`player` VARCHAR(21) NOT NULL DEFAULT '',
`tag` VARCHAR(21) NOT NULL DEFAULT '',
`container` VARCHAR(21) NOT NULL DEFAULT '',
`item` VARCHAR(21) NOT NULL DEFAULT '',
`count` INT(10) UNSIGNED NULL DEFAULT NULL,
`identified` TINYINT(4) NULL DEFAULT NULL,
PRIMARY KEY (`player`, `tag`, `container`, `item`)
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM;
*/

//: player is the login
//: tag is the character name
//: container is the tag of the chest
//: item is the tag of the item
//: count is the number of the item
//: and identified is just true or false 1 or 0

That way the character does not need to be logged in to reap the benefits.

Let's knock out one of the constants.
The name of the safe deposit box would be "chest_999"
Then the tag of the item.
(GetSubString(sString, 4, 10));
xxx_stock_xxx
(GetSubString(sString, 4, 9));
xxx_bond_xxx

This would keep players from trying to bug the system with odd items that aren't stocks or bonds.

What I need to do is go through each item "bonds" monthly and adjust the values.


#include "x2_inc_itemprop"

void main()
{
    object oTarget;
    object oItem;
    itemproperty ipAdd;

/*
Run once per month on bonds
random d20
1-2 is a 1d4 value decrease
3-8 is no change
9-18 is a 1d4 value increase
19-20 1d6 value increase
*/


    // Alter the "xxx_bond_xxx" possessed by "chest_999".
    oTarget = GetObjectByTag("chest_999");
    oItem = GetItemPossessedBy(oTarget, "xxx_bond_xxx");

/*
I threw in weight here because I don't kow how to adjust the value.
The Lexicon says
"Parameters
nAdditionalProperty
The itemproperty to create.



Description

Creates and returns a generic additional itemproperty. You
need to specify the additional property. The only additional properties
currently defined are Unknown and Cursed.
Remarks
IP_CONST_ADDITIONAL_* references the iprp_addcost.2da file (and so
is the cost table value for the item property).  This file currently sets all
costs to 0.  If you want the additional property to affect the cost of the item
then you need to modify the cost in the iprp_addcost.2da and place the modified
file in your override folder.

The cost value (which is also the
IP_CONST_ADDITIONAL_* constant) can also be used to look up a string reference
(strRef) for the name of the quality type in iprp_additional.2da. Known Bugs:
GetItemPropertyCostTable returns 30 for this property, but there is
no entry for 30 in iprp_costtable.2da (the last entry is 27).  You can add the
entry yourself (be sure to add lines 28 and 29 as well) and place your modified
iprp_costtable.2da in your override folder; or you can have any script that
tries to find the cost value associated with the quality type indicated catch
this value and use the correct cost table directly.  As noted above, the cost
table for the additional property is iprp_addcost.2da."
So I don't know how to change the value
*/
    ipAdd = ItemPropertyWeightIncrease(IP_CONST_WEIGHTINCREASE_5_LBS);
    IPSafeAddItemProperty(oItem, ipAdd, 60.0);
}


Same would go for stocks but it would run daily.

Run once per day on stocks
random d20
1-3 is a 1d6 value decrease
4-6 is a 1d4 value decrease
6-9 is a 1d2 value decrease
10-12 is no change
13-17 is a 1d4 value increase
18-19 is a 1d6 value increase
20 is a 2d4 value increase

So I don't know how to call a script based on day 1 of the calender day and I don't know how to change the value property of an item.

I hate to bug people with stuff but this really has me stumped.
               
               

               


                     Modifié par Supreme_Pizza, 17 janvier 2013 - 07:23 .
                     
                  


            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #3 on: January 17, 2013, 09:26:03 am »


               I had a thought.

I create 50 blueprints of each with tags

ATS_stock_001 (value added property of 1)
through
ATS_stock_050 (value added property of 2)

ATS_bond_001 (value added property of 1)
through
ATS_bond_050 (value added property of 2)

I use a no-pick-up script and it is already set to checks the first 4 of the tag ATS_

anyway

I fetch the item tag from the database.

Then perform the math functions on the tag.

Write the new tag to the DB.

That would work around the value property if we need to do so.

I still have no idea how to run something once a day or once a month though.
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Time related **CLOSED**
« Reply #4 on: January 17, 2013, 11:41:08 pm »


               Are you married to the idea of having the bonds be sold to a store? If not there's a lower-tech way to do this. Have the PC exchange the bonds for gold with an NPC via conversation. Then you can just calculate the value of the bond at the time of sale rather than having to constantly update it or fiddle with blueprints.
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #5 on: January 18, 2013, 02:35:51 am »


               Conversation leads to duping. I don't want to get into the exploit but that could ruin the economy.

However I am interested in your approach to adjusting the value through conversation.

There may be a way to put the item in a container and have it lock itself before the conversation.

I am also interested in your approach to setting the script to fire once a day or once a month.

I can't believe I can't find something here on that already.
               
               

               


                     Modifié par Supreme_Pizza, 18 janvier 2013 - 02:38 .
                     
                  


            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Time related **CLOSED**
« Reply #6 on: January 18, 2013, 05:04:41 am »


               Then you can use the ATM machine model.  Put the bonds into a plot chest. Close the chest. When you reopen the chest the bonds are replaced with gold pieces.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Time related **CLOSED**
« Reply #7 on: January 18, 2013, 06:01:16 pm »


               I would suggest just using two ints, stored on the item. The first is a timestamp, with the last time the value was calculated. The next is the net change in value. When a player interacts in whatever way you want to trigger a value check, check item's timestamp against the current system one (using UNIX_TIMESTAMP() in MySQL, store it on the mod on modload if you don't want to check it every time, though this is a really fast query) and perform a number of value iterations on the item based on the difference between the current and the last time it was updated. Say you only want to iterate once a real-time day - you would subract the original timestamp value from the current one, then divide by your time period, in this example 24*3600, the number of seconds in a day. If the result is > 0 (you would want integers only here), do that many value iterations, and update the item's timestamp with the current one, and store the value changes in the other int. Pretty simple, non-exploitable, and non-breakable (is why I'm advocating realtime not gametime). Of course, the 'value' int could store net, rather than change in value - it all depends on what you want to do.

Note that use of ints on items will make them non-storable in resref-based banking systems (as opposed to object-based ones).

By the way, there's absolutely nothing inherent in the nature of conversations that leads to duping, or exploits in general - IF you know what you're doing. Admittedly, there are some troublesome quirks, but that's no reason not to use convos for this. I can help you design failsafe checks, if you need.

Funky
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #8 on: January 19, 2013, 09:53:59 pm »


               Thanks for the reply FS 'B)'


I wouldn't have a clue how to do that. I would love to learn how to do that if you could esplain in terms of scripting for dummies. Actuall I'd probably understand what you were saying if you told me in code rather than pseudo code. ':crying:'

Anyway I'm knee deep in probably the most inefficient way of doing this.
I don't know though.

What I'm in the process of doing is.

=================================================================

Create a temp DB
then

insert into temp_vault (
player, tag,
container,
item,
count,
identified
)

SELECT * FROM vault_items Where container = 'chest_999'

then

DELETE FROM vault_items Where container = 'chest_999'


// START LOOP

Then I pull the item and count from temp_vault by AUTO_INCREMENT value.
(one row at a time for MAX(columnid) FROM temp_vault )

Split the item tag into 2 parts:

"ATS_STOCK_" and "001"

Remove the zero(es) as necessary and convert to Int.

Manipulate the tag end by d20 rules described above

Put the zero(es) back in as necessary.

Put the tag back together.

put my insert into vault_items query together from info in temp_vault and the new tag.

Write new item to original DB

// END LOOP

DROP TABLE temp_vault

===========================================================================

Am I crazy or what?
               
               

               


                     Modifié par Supreme_Pizza, 19 janvier 2013 - 09:56 .
                     
                  


            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #9 on: January 20, 2013, 10:40:01 am »


               I changed the d20 table

How does this look?

Bonds:
1-2 is a 1d4 value decrease  10% *
3-8 is no change             30% *       
9-18 is a 1d4 value increase 50% *
19-20 1d6 value increase     10% *

Stocks
1 is a 2d4 value decrease    5% *
2-3 is a 1d6 value decrease 10% *
4-5 is a 1d4 value decrease 10% *
6-9 is a 1d2 value decrease 20% *
10-11 is no change            10% *
12-14 is a 1d2 value increase 15% *
15-16 is a 1d4 value increase 10% *
17-18 is a 1d6 value increase 10%
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #10 on: January 20, 2013, 10:52:29 am »


               I'm stuck for a minute and need rest.

nwnx_odbc.text blurb

o Got request: SELECT item, count, identified FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' limit 0,1
o Sent response (17 bytes): ats_stock_001¬1¬1
o Got request: SELECT item, count, identified FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' limit 1,1
o Sent response (0 bytes):
o Got request: SELECT * FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999'
o Sent response (45 bytes): Supreme_Pizza¬Eli¬chest_999¬ats_stock_001¬1¬1
o Got request: DELETE FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999'
o Got request: SELECT * FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' AND item='ats_stock_002' AND identified=1
o Sent response (0 bytes):
o Got request: INSERT INTO vault_items (player,tag,container,item,count,identified) VALUES ('Supreme_Pizza','Eli','chest_999','ats_stock_002',1,1)
o Got request: SELECT * FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' AND item='ats_stock_002' AND identified=1
o Sent response (45 bytes): Supreme_Pizza¬Eli¬chest_999¬ats_stock_002¬1¬1
o Got request: UPDATE vault_items SET count=2 WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' AND item='ats_stock_002' AND identified=1
o Got request: SELECT * FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' AND item='ats_stock_002' AND identified=1
o Sent response (45 bytes): Supreme_Pizza¬Eli¬chest_999¬ats_stock_002¬2¬1
o Got request: UPDATE vault_items SET count=3 WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' AND item='ats_stock_002' AND identified=1
o Got request: SELECT * FROM vault_items WHERE player='Supreme_Pizza' AND tag='Eli' AND container='chest_999' AND item='ats_stock_001' AND identified=1
o Sent response (0 bytes):
o Got request: INSERT INTO vault_items (player,tag,container,item,count,identified) VALUES ('Supreme_Pizza','Eli','chest_999','ats_stock_001',1,1)
o Got request: CREATE TABLE IF NOT EXISTS `temp_vault` (`columnid` INT(9) NOT NULL AUTO_INCREMENT, `player` VARCHAR(22) NOT NULL DEFAULT '',`tag` VARCHAR(22) NOT NULL DEFAULT '',`container` VARCHAR(22) NOT NULL DEFAULT '',`item` VARCHAR(22) NOT NULL DEFAULT '',`count` INT(10) UNSIGNED NULL DEFAULT NULL,`identified` TINYINT(4) NULL DEFAULT NULL,PRIMARY KEY (`columnid`, `player`, `tag`, `container`, `item`))COLLATE='utf8_general_ci'ENGINE=MyISAM;
o Got request: insert into temp_vault (player, tag, container, item, count, identified) SELECT * FROM vault_items Where container = 'chest_999'
o Got request: DELETE FROM vault_items Where container = 'chest_999'
o Got request: SELECT MAX(columnid) FROM temp_vault
o Sent response (1 bytes): 2
o Got request: SELECT `item`, `count` FROM temp_vault Where columnid = '0'
o Got request: DROP TABLE temp_vault

Include file
string sVaultTag ="chest_999";
string sTempVaultTag = "chest_998";

string sStock1 = "ats_stock_001";
string sStock2 = "ats_stock_002";
string sStock3 = "ats_stock_003";
string sStock4 = "ats_stock_004";
string sStock5 = "ats_stock_005";
string sStock6 = "ats_stock_006";
string sStock7 = "ats_stock_007";
string sStock8 = "ats_stock_008";
string sStock9 = "ats_stock_009";
string sStock10 = "ats_stock_010";
string sStock11 = "ats_stock_011";
string sStock12 = "ats_stock_012";
string sStock13 = "ats_stock_013";
string sStock14 = "ats_stock_014";
string sStock15 = "ats_stock_015";
string sStock16 = "ats_stock_016";
string sStock17 = "ats_stock_017";
string sStock18 = "ats_stock_018";
string sStock19 = "ats_stock_019";
string sStock20 = "ats_stock_020";
string sStock21 = "ats_stock_021";
string sStock22 = "ats_stock_022";
string sStock23 = "ats_stock_023";
string sStock24 = "ats_stock_024";
string sStock25 = "ats_stock_025";
string sStock26 = "ats_stock_026";
string sStock27 = "ats_stock_027";
string sStock28 = "ats_stock_028";
string sStock29 = "ats_stock_029";
string sStock30 = "ats_stock_030";
string sStock31 = "ats_stock_031";
string sStock32 = "ats_stock_032";
string sStock33 = "ats_stock_033";
string sStock34 = "ats_stock_034";
string sStock35 = "ats_stock_035";
string sStock36 = "ats_stock_036";
string sStock37 = "ats_stock_037";
string sStock38 = "ats_stock_038";
string sStock39 = "ats_stock_039";
string sStock40 = "ats_stock_040";
string sStock41 = "ats_stock_041";
string sStock42 = "ats_stock_042";
string sStock43 = "ats_stock_043";
string sStock44 = "ats_stock_044";
string sStock45 = "ats_stock_045";
string sStock46 = "ats_stock_046";
string sStock47 = "ats_stock_047";
string sStock48 = "ats_stock_048";
string sStock49 = "ats_stock_049";
string sStock50 = "ats_stock_050";

string sBond1 = "ats_bond_001";
string sBond2 = "ats_bond_002";
string sBond3 = "ats_bond_003";
string sBond4 = "ats_bond_004";
string sBond5 = "ats_bond_005";
string sBond6 = "ats_bond_006";
string sBond7 = "ats_bond_007";
string sBond8 = "ats_bond_008";
string sBond9 = "ats_bond_009";
string sBond10 = "ats_bond_010";
string sBond11 = "ats_bond_011";
string sBond12 = "ats_bond_012";
string sBond13 = "ats_bond_013";
string sBond14 = "ats_bond_014";
string sBond15 = "ats_bond_015";
string sBond16 = "ats_bond_016";
string sBond17 = "ats_bond_017";
string sBond18 = "ats_bond_018";
string sBond19 = "ats_bond_019";
string sBond20 = "ats_bond_020";
string sBond21 = "ats_bond_021";
string sBond22 = "ats_bond_022";
string sBond23 = "ats_bond_023";
string sBond24 = "ats_bond_024";
string sBond25 = "ats_bond_025";
string sBond26 = "ats_bond_026";
string sBond27 = "ats_bond_027";
string sBond28 = "ats_bond_028";
string sBond29 = "ats_bond_029";
string sBond30 = "ats_bond_030";
string sBond31 = "ats_bond_031";
string sBond32 = "ats_bond_032";
string sBond33 = "ats_bond_033";
string sBond34 = "ats_bond_034";
string sBond35 = "ats_bond_035";
string sBond36 = "ats_bond_036";
string sBond37 = "ats_bond_037";
string sBond38 = "ats_bond_038";
string sBond39 = "ats_bond_039";
string sBond40 = "ats_bond_040";
string sBond41 = "ats_bond_041";
string sBond42 = "ats_bond_042";
string sBond43 = "ats_bond_043";
string sBond44 = "ats_bond_044";
string sBond45 = "ats_bond_045";
string sBond46 = "ats_bond_046";
string sBond47 = "ats_bond_047";
string sBond48 = "ats_bond_048";
string sBond49 = "ats_bond_049";
string sBond50 = "ats_bond_050";
               
               

               


                     Modifié par Supreme_Pizza, 20 janvier 2013 - 10:54 .
                     
                  


            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #11 on: January 20, 2013, 10:55:41 am »


               script running from switch for now

#include "x3_inc_string"
#include "iof_include"
#include "stocks_inc_const"

void main()
{
    int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
    // * Play Appropriate Animation
    if (!nActive)
    {
      ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
    }
    else
    {
      ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
    }
    // * Store New State
    SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",!nActive);

//Create new table for items from "chest_999" with auto index
        // :: CREATE TABLE "temp_vault" (
        // ::   `columnid` INT(6) NOT NULL AUTO_INCREMENT,
        // ::   `player` VARCHAR(21) NOT NULL DEFAULT '',
        // ::   `tag` VARCHAR(21) NOT NULL DEFAULT '',
        // ::   `container` VARCHAR(9) NOT NULL DEFAULT 'chest_998',
        // ::   `item` VARCHAR(21) NOT NULL DEFAULT '',
        // ::   `count` INT(10) UNSIGNED NULL DEFAULT NULL,
        // ::   `identified` TINYINT(4) NULL DEFAULT NULL,
        // ::   PRIMARY KEY (`columnid`,`player`, `tag`, `container`, `item`)
        // :: )
        // :: COLLATE='utf8_general_ci'
        // :: ENGINE=MyISAM;
    string sSQL = "CREATE TABLE IF NOT EXISTS `temp_vault` (`columnid` INT(9) NOT NULL AUTO_INCREMENT, `player` VARCHAR(22) NOT NULL DEFAULT '',`tag` VARCHAR(22) NOT NULL DEFAULT '',`container` VARCHAR(22) NOT NULL DEFAULT '',`item` VARCHAR(22) NOT NULL DEFAULT '',`count` INT(10) UNSIGNED NULL DEFAULT NULL,`identified` TINYINT(4) NULL DEFAULT NULL,PRIMARY KEY (`columnid`, `player`, `tag`, `container`, `item`))COLLATE='utf8_general_ci'ENGINE=MyISAM;";
    SQLExecDirect(sSQL);

    //insert items into the temp database from vault_items database
    //insert into temp_vault (player, tag, container, item, count, identified)
    //SELECT * FROM vault_items Where container = 'chest_999'"
    string sSQLa = "insert into temp_vault (player, tag, container, item, count, identified) SELECT * FROM vault_items Where container = 'chest_999'";
    SQLExecDirect(sSQLa);


    //Delete items inserted into "temp_table" from "vault_items"
    string sSQLb = "DELETE FROM vault_items Where container = 'chest_999'";
    SQLExecDirect(sSQLb);

    //Get the number of rows in "temp_table"
    string sSQLd ="SELECT MAX(columnid) FROM temp_vault";
    SQLExecDirect(sSQLd);
    //convert to integer
    int iNumRows = SQLFetch();

    //loop through each row
    int iRowCount;
    while (iRowCount < iNumRows)
    {
        string sRowCount = IntToString(iRowCount);
        //retreive "item" from the column
        string sSQLc = "SELECT `item`, `count` FROM temp_vault Where columnid = '" + sRowCount + "'";
        SQLExecDirect(sSQLc);
        string sItemTagValue = SQLGetData(1);
        int iNumItems = StringToInt(SQLGetData(2));

        //retreive "count" from the column
        //string sSQLc = "SELECT `count` FROM temp_vault Where columnid = '" + sRowCount + "'";
        //SQLExecDirect(sSQLc);
        //int iNumItems = StringToInt(SQLGetData(1));

        //loop through each item
        int iItemCount;
        string sNoZeroes;
        while (iItemCount < iNumItems)
        {

            //Get the last 3 of the tag string
            string sItemTagNumber = GetStringRight(sItemTagValue, 3);

            //Remove the zeroes
            // Get the local string variable's contents.
            string sItemTagNumberNoZero = GetLocalString(OBJECT_SELF, "sItemTagNumber");
            // Change all the zeroes in it to nul.
            sItemTagNumberNoZero = StringReplace(sItemTagNumberNoZero, "0", "");
            // Save the result back in the local string variable.
            SetLocalString(OBJECT_SELF, "sItemTagNumber", sItemTagNumberNoZero);


            //Convert to integer so we can use it
            int iItemInteger = StringToInt(sItemTagNumberNoZero);

            //Roll Dice
            int iRoll = d20(1);
            int iDTwoNegTagSum = iItemInteger - d2(1);
            int iDTwoPosTagSum = iItemInteger + d2(1);
            int iDFourNegTagSum = iItemInteger - d4(1);
            int iDFourPosTagSum = iItemInteger + d4(1);
            int iDSixNegTagSum = iItemInteger - d6(1);
            int iDSixPosTagSum = iItemInteger + d6(1);
            int iDDFourNegTagSum = iItemInteger - d4(2);
            int iDDFourPosTagSum = iItemInteger + d4(2);

            //Convert to string
            string sDTwoNegTagSum = IntToString(iDTwoNegTagSum);
            string sDTwoPosTagSum = IntToString(iDTwoPosTagSum);
            string sDFourNegTagSum = IntToString(iDFourNegTagSum);
            string sDFourPosTagSum = IntToString(iDFourPosTagSum);
            string sDSixNegTagSum = IntToString(iDSixNegTagSum);
            string sDSixPosTagSum = IntToString(iDSixPosTagSum);
            string sDDFourNegTagSum = IntToString(iDDFourNegTagSum);
            string sDDFourPosTagSum = IntToString(iDDFourPosTagSum);


            //Check tag string center value for "Stock" or "Bond"
            //If not it gets thrown out with the trash when temp_vault is deleted
            string sStockCheckString = GetSubString(sItemTagValue, 4, 9);
            string sBondCheckString = GetSubString(sItemTagValue, 4, 8);

            //Calculate to new item
            if (iRoll == 1)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDDFourNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDDFourNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 2)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDSixNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDSixNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 3)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDSixNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDSixNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 4)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDFourNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 5)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDFourNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 6)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stoc
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #12 on: January 20, 2013, 10:57:25 am »


                                       string sItem = "sStock" + "sDTwoNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 7)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));
                    //Put the new item in "vault_items"

                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDTwoNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 8)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDTwoNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 9)
           {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDTwoNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 10)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
            }
            else if (iRoll == 11)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    //Generate new item tag from list at stocks_inc_const
                    string sItem = sItemTagValue;

                    //get "player" and "tag" from "temp_vault"
                    string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                    SQLExecDirect(sSQLx);
                    string sPlayerLoginID = SQLGetData(1);
                    string sPlayerCharacterName = (SQLGetData(2));

                    //Put the new item in "vault_items"
                    string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                    SQLExecDirect(sSQLw);
                }
            }
            else if (iRoll == 12)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
       &
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #13 on: January 20, 2013, 10:59:04 am »


                                   }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoNegTagSum <= 0)
                    {
                        return;
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDTwoNegTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 13)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDTwoPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 14)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDTwoPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDTwoPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 15)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 16)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        s
               
               

               
            

Legacy_Supreme_Pizza

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Time related **CLOSED**
« Reply #14 on: January 20, 2013, 11:00:02 am »


                                       string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 17)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDSixPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDSixPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 18)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDSixPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDSixPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else if (iRoll == 19)
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDSixPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDSixPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
                //If item is a stock
                else if (sStockCheckString == "stock")
                {
                    if (iDDFourPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDDFourPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                }
            }
            else
            {
                //If item is a bond
                if (sBondCheckString == "bond")
                {
//check for date here
                    if (iDSixPosTagSum >= 50)
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = sStock50;

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                        //Put the new item in "vault_items"
                        string sSQLw = "insert into vault_items (player, tag, container, item, count, identified)VALUES("+ sPlayerLoginID +","+ sPlayerCharacterName +"," + sVaultTag +"," + sItem +", 1, 1)";
                        SQLExecDirect(sSQLw);
                    }
                    else
                    {
                        //Generate new item tag from list at stocks_inc_const
                        string sItem = "sStock" + "sDSixPosTagSum";

                        //get "player" and "tag" from "temp_vault"
                        string sSQLx = "SELECT `player`, `tag` , FROM temp_vault Where columnid = '" + sRowCount + "'";
                        SQLExecDirect(sSQLx);
                        string sPlayerLoginID = SQLGetData(1);
                        string sPlayerCharacterName = (SQLGetData(2));

                      &