Sareus

Member
While messing around with Daat's99Tokens I've completely stopped using the TokenLedger as the MasterLooterBackpack has one built in. However LadyLuck and VendorStone Don't recognize this as a proper TokenLedger.

So The only problem I have yet to fix to rectify this problem is:

How would I recode this to search the purchaser's backpack for the amount of Tokens and avoid checking for a Ledger as a whole? The work around I used for the Stone doesn't work in this case.
Code:
Item[] items = m_From.Backpack.FindItemsByType( typeof( Tokens ) ); //TokenLedger

                                                        foreach( Tokens tl in items ) //TokenLedger
                                                        {
                                                                if ( tl.Owner == m_From.Serial )
                                                                {
                                                                        if ( tl.Tokens >= (i_BuyTickets * i_TicketCost) )
                                                                        {
                                                                                if (!(tl.Deleted))
                                                                                {
                                                                                        tl.Tokens = ( tl.Tokens - (i_BuyTickets * i_TicketCost) );
                                                                                               
                                                                                        LotteryTicket lottery = new LotteryTicket();
                                                                                        lottery.DrawingNumber = i_Drawing;
                                                                                        lottery.StartTicketNumber = i_Ticket;
                                                                                        lottery.EndTicketNumber = (i_Ticket + i_BuyTickets - 1);
                                                                                        m_From.AddToBackpack( lottery );
                                                                                               
                                                                                        i_Ticket = (i_Ticket + i_BuyTickets);
                                                                                        m_From.CloseGump( typeof( LadyLuckSellingGump ) );
                                                                                        m_From.SendMessage("You bought {0} lottery tickets.", i_BuyTickets);
                                                                                        i_Reward = ( i_Reward + ( i_BuyTickets * (i_TicketCost/2) ) );
                                                                                }
                                                                                else
                                                                                {
                                                                                        m_From.PlaySound(1069); //play Hey!! sound
                                                                                        m_From.SendMessage("Hey, don't try to rob the bank!!!");
                                                                                        m_From.SendGump( new LadyLuckSellingGump( m_From ) );
                                                                                }
                                                                                return;
                                                                        }
                                                                }
                                                        }
 
Are the tokens an actual item in the backpack? And if so, are they each a separate item or is it one item with an amount?
 
With the MasterLooter system AKA Master Storage from OWLTR, the tokens are virtual until removed from the storage pack. LadyLuck & the Vendor Stone that were with the MasterLooter system were configured to work with it. Which is why I'm thinking they be older versions. His is looking for the TokenLedger, which doesnt exist in the MasterLooter/MasterStorage systems any more.
 
Are the tokens an actual item in the backpack? And if so, are they each a separate item or is it one item with an amount?

They are basically Daat99'sTokens (Copied and Rehued Gold coins basically). So they act like coins.

Are you using LadyLuck & the Vendor Stone from the Master Looter system? Or older ones?

I was using the ones that came with my MasterLooterBackpack.rar. However, the were default set up to be using the Ledger separated out so I guess I have a version from before the built in was fully implemented.

With the MasterLooter system AKA Master Storage from OWLTR, the tokens are virtual until removed from the storage pack. LadyLuck & the Vendor Stone that were with the MasterLooter system were configured to work with it. Which is why I'm thinking they be older versions. His is looking for the TokenLedger, which doesnt exist in the MasterLooter/MasterStorage systems any more.

Sorry had to do a lot of running between posting that and now. You are correct They were both searching for the old unsupported tokenledger. As a fix i was just commenting out the tokenstone's #usage tokens at the top of the script so it just searched for the Tokens.cs (Which are stackable amount items [rehued gold coins]) in the backpacks of the users the same it was doing for gold. However sicne the LadyLuck is actually a currency exchanger for tokens to gold and vice-versa she can not be so easily fix.

The true problem seems to be as Hammerhand pointed out I must be using an older version.
 
Last edited:
Are the tokens an actual item in the backpack? And if so, are they each a separate item or is it one item with an amount?
A more recent version. See if this helps.

Line 21: "using daat99;"
Code:
Errors:
+ Custom Systems/My Additions/NEW/Token System.cs:
    CS0246: Line 21: The type or namespace name 'daat99' could not be found (are
you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Try commenting
using daat99;
out & see if that helps. Its just looking got the whole Daat99/OWLTR system. The rest of the token system doesn't require it.
 
Try commenting
using daat99;
out & see if that helps. Its just looking got the whole Daat99/OWLTR system. The rest of the token system doesn't require it.

That throws a whole group of new errors.


Code:
Errors:
+ Custom Systems/My Additions/NEW/Lady Luck.cs:
    CS0103: Line 472: The name 'Daat99' does not exist in the current context
+ Custom Systems/My Additions/NEW/Safe Trash 4 Tokens Backpack.cs:
    CS0246: Line 49: The type or namespace name 'Daat99Tokens' could not be foun
d (are you missing a using directive or an assembly reference?)
    CS0246: Line 78: The type or namespace name 'Daat99Tokens' could not be foun
d (are you missing a using directive or an assembly reference?)
+ Custom Systems/My Additions/NEW/Token System.cs:
    CS0103: Line 31: The name 'MasterStorageUtils' does not exist in the current
context
    CS0103: Line 40: The name 'MasterStorageUtils' does not exist in the current
context
    CS0103: Line 239: The name 'MasterStorageUtils' does not exist in the curren
t context
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Then add the
using daat99;
to the other files & see if that works. Unfortunately, I don't have a copy of the MasterLooter system at this time, so I cant go through everything. I'm checking using the MasterStorage system w/ tokens in a blank server.
 
Ok, this version of MasterStorage is setup to work without OWLTR now. Along with the looting, token & gold storage, it will also allow players to store resources & tools virtually. No added item counts. The deeds for the storage can be given out, put on a vendor or made craftable (if you choose to use them). If not, the storage backpack will only act like the looter backpack (gold & tokens ledger) & as a looter. If you do choose to use the storage deeds & want to make them craftable, let me know & I'll post the coding needed. The deeds are resource hogs (take large amounts of resources, some that are harder to get) which makes them more valuable. Your call. :)
 

Attachments

  • MasterStorage.rar
    33.4 KB · Views: 41
Ok, this version of MasterStorage is setup to work without OWLTR now. Along with the looting, token & gold storage, it will also allow players to store resources & tools virtually. No added item counts. The deeds for the storage can be given out, put on a vendor or made craftable (if you choose to use them). If not, the storage backpack will only act like the looter backpack (gold & tokens ledger) & as a looter. If you do choose to use the storage deeds & want to make them craftable, let me know & I'll post the coding needed. The deeds are resource hogs (take large amounts of resources, some that are harder to get) which makes them more valuable. Your call. :)

I sincerely apologize I'm usually more present for these kind of things. But with it being October I'm constantly having to drive my Fiance around to many different stores for material for her commissions as shes a seamstress.

On point however, THANK YOU Hammerhand to no end as you are trying greatly to help me with this and I appreciate that to no end.

Ill download the attached file and get back to you.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back