DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • March 25, 2019, 02:55:06 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: Questions about module storage  (Read 3768 times)
0 Members and 1 Guest are viewing this topic.
« on: August 29, 2004, 08:14:36 PM »

I've got an idea for a module but it would require the ability to hold a particular piece of information between user logins.  I know it can be done in SQL by adding a table and then tracking everything but I'm just curious if their is another way?  Wish the hooks and calls were documented some place Smiley.
Mod God
Offline Offline

Posts: 5483

View Profile WWW
« Reply #1 on: August 29, 2004, 08:48:38 PM »

Perhaps you should be a bit more specific about what you want to do.  If you mean something along the lines of keeping track that someone has used a feature that day, take a look at something like Saucywench's kitchen.php to see how that's done.

Any piece of information created by a module can be placed in one of the module arrays - just take a look at the assorted options available to you and use the one most appropriate to your needs.

Hooks and calls are documented in the code  Wink

Play the latest beta version here on DragonPrime
« Reply #2 on: August 30, 2004, 07:07:26 AM »

I was looking at building a blacksmith shop where you could take a weapon, ask for a modification (at a price).  The blacksmith would take your existing weapon and tell you to come back in x days.  At the end you could pickup your weapons if he didn't forget it (% chance setup my admin) or maby would tell you he needed more suplies and have you go buy something else that he would then take and "use" also.

Since their really isn't an inventory and radom drop I planned on using the existing items rather then try to figure out how to make nugets and such drop upon kills.  But that would be a better idea Smiley.
« Reply #3 on: August 30, 2004, 07:58:29 AM »

Check out the battle-victory hook.
« Reply #4 on: August 30, 2004, 09:58:46 AM »

Ok I'm guessing that the session variable is searilized for storage between actuall user sessions, so if I store my info in it I shouldn't have to put it in the Database right?  It always bothers me to create tables if I don't have to Smiley.  Considering I run MySQL 4 to 5 the code doesn't always translate between them (5 has support for triggers and StoredProcedures thus allows some scripting that 4 freaks about).
« Reply #5 on: August 30, 2004, 02:42:40 PM »

Sessions expire after a time.. it is not universally persistant.
You cannot rely on the session except for short stretches.

You should be using
set_module_pref for most things and in fact for the things you are contemplating here it is the right solution.
« Reply #6 on: August 30, 2004, 03:07:38 PM »

Thanks Kendaer got that just before I read your post Smiley.  Tried the session thing first and found the problem then noticed that in crazyaudrey that was the storage medium used Smiley.
Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
20 Guests, 1 User
Home Forums News Downloads Login Register Advanced Search