Home

[Package Index | Mudlib Index | Effect Index]

File /std/room/parcel_inherit.c

Post Office Delivery Inheritable

Written by Terano

Started 28 December, 1998

Inherits

This class inherits the following classes /std/room/basic_room.c

Includes

This class includes the following files /include/playtesters.h, /include/player.h, /include/player_handler.h, /include/shops/bank.h, /include/money.h and /include/mail.h

Method index

  • deposit_parcel(object *, string, int)
    This method is used by outside objects to send parcels (if they should need to do so).
  • do_collect()
    Collects a parcel if any are here Mask to do interesting things
  • do_deposit(object *, string, int)
    Do deposit function, mask to do interesting things
  • make_shelf(string, string)
    Makes a shelf and moves it to the room, if there is a shelf, items collected will be moved to it, otherwise they just get moved to the floor
  • query_shelf()
  • set_cost(int)
    Sets the cost to send a parcel, in default money units 400 = $1AM
  • set_currency(string)
    What currency to use
  • set_location(string)
    Sets the location of the parcel office This is a directory in /save/parcels ie /save/parcels/teranotest/
  • set_shelf(object)

Public Functions

These are functions that everyone can access.

.

    deposit_parcel
    int deposit_parcel(object * obs,
                       string name,
                       int show_sender)
    

    This method is used by outside objects to send parcels (if they should need to do so).
    • Parameters:
      obs - Objects to deposit (required)
      name - Name to go to (required)
      show_sender - non-zero to show name of sender in automail (optional)
    do_collect
    int do_collect()
    

    Collects a parcel if any are here Mask to do interesting things
    • Returns:
      1 if there are parcels, and 0 if there arent
        do_deposit
        varargs int do_deposit(object * obs,
                               string name,
                               int show_sender)
        

        Do deposit function, mask to do interesting things
        • Parameters:
          *obs - Objects to deposit (required)
          name - Name to go to (required)
          show_sender - non-zero to show name of sender in automail (optional)
        • Returns:
          -7 if user is inactive, -5 if user is not allowed to recieve parcels, -4 if sender is not allowed to send parcels, -3 if sender and user are the same person, -2 if no such user, -1 if not enough money, 0 if missing arguments or failed for unknown reason and 1 if successful
            make_shelf
            void make_shelf(string short,
                            string long)
            

            Makes a shelf and moves it to the room, if there is a shelf, items collected will be moved to it, otherwise they just get moved to the floor
            • Parameters:
              short - The short desc of the shelf
              long - The long desc of the shelf
                query_shelf
                object query_shelf()
                
                  set_cost
                  void set_cost(int _cost)
                  

                  Sets the cost to send a parcel, in default money units 400 = $1AM
                  • Parameters:
                    _cost - The cost
                      set_currency
                      void set_currency(string temp)
                      

                      What currency to use
                      • Parameters:
                        temp - The type of currency (ie "Ankh-Morpork")
                          set_location
                          void set_location(string _loc)
                          

                          Sets the location of the parcel office This is a directory in /save/parcels ie /save/parcels/teranotest/
                          • Parameters:
                            _loc - location of the post office
Valid HTML 4.01 Transitional
Valid CSS!
Read More