DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • December 12, 2017, 02:20:20 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: 1 2 [3]   Go Down
  Print  
Author Topic: dragonpoint spending strategy  (Read 8637 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #30 on: May 11, 2005, 06:34:26 AM »

ok, so next step...
I attached a module that makes forest fights cost more than 1 DKpoint, and just as i was finishing it, i realized, they aren't able to save up their dkpoints because everynew day they are directed to spend points.

so now i am thinking that we need a module that gives a nav to "don't spend points this time around", but somehow doesnt make them spend points everynewday, but gives them the option again after a DK, i *think* it can't modify $session['user']['dragonpoints'] either...

too much work than what it's worth?
Logged

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #31 on: May 11, 2005, 06:39:31 AM »

ehm... simply set their current dkpoint to 'save'. And after a DK (header-newday, $session['user']['age'] == 0 !) count the 'save'd dragonpoints.

if there are two or more -> make your nav available...
Logged

Running for more than three years now:
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #32 on: May 11, 2005, 07:26:13 AM »

yeah, hmmm, i guess that would work to save them there.  I was thinking that all the dkpoints had to go to what you spent them on, but i guess just the last one does...

but how do you set saved dkpoints to 0 after spending them on something else?  in other words, how do we manipulate the already spent dragonpoints?

would it be better/worse to use module_prefs on this, adding to both the module_pref and dragonpoints when they save points, and just setting the module_pref to 0 when they spend saved points, and basing the check to see if they have enough saved points off the module-pref
Logged

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #33 on: May 11, 2005, 09:11:46 AM »

Hmmm yes... making a modulepref would be the right way...

Let's say we have the "save" option. And we have a counter for each player, how many of those saved points are already spent.

and on header-newday we check if ($savecount - get_module_pref("spentsave") > $whatevervaluewewant)...
Logged

Running for more than three years now:
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #34 on: May 11, 2005, 09:24:06 AM »

Just check this file for how to do it... (Yes, I've done it again...)

http://dragonprime.net/users/XChrisX/dksave.zip
Logged

Running for more than three years now:
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #35 on: May 11, 2005, 10:48:11 AM »

NNOOOOOOO!!!!! i actually did it myself this time!!  Smiley

give me a sec to upload and post the modules
Logged

Pages: 1 2 [3]   Go Up
  Print  
 
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
24 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search