DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • July 17, 2019, 03:51:13 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Keeping things after dragon kill  (Read 4516 times)
0 Members and 1 Guest are viewing this topic.
Hooker
Guest
« on: August 18, 2004, 03:10:07 AM »

Hey,
i was wondering if  someone can help me.. im trying to allow my players to keep there gold and the stats they have earned before slaying the dragon after slaying the dragon, my players keep messaging me telling me how pointless the game is if you just keep doing the same thing over and over (even though i personaly enjoy the game) so im working on a system to add unique items and some kind of trading system but first of all i need people to be able to retain there money and stats just to keep my players.. playing.
Thanks,
Hooker
Logged
Spider
Guest
« Reply #1 on: August 18, 2004, 10:53:27 AM »

I believe there is a dragon kill hook that allows you to do this without editing the core code.

I haven't used it, and I'm not going searching for an example right now, but you should really be using the hook for this.

Edit:
a quick glance showed me that the hook is called "dragonkill", and there is an example in dag and drinks, although I'm not sure how helpful they are as they both reset values.
« Last Edit: August 18, 2004, 10:59:30 AM by Spider » Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5484



View Profile WWW
« Reply #2 on: August 18, 2004, 09:16:13 PM »

Trust me...this idea is patently bad.  You will remove all challenge from your game...you'd be equally well served by starting all new players out with 100,000 gold and max weaponry!
Logged

Play the latest beta version here on DragonPrime
Kendaer
Guest
« Reply #3 on: August 19, 2004, 12:46:30 AM »

Talisman is correct that this is patently bad.

Spider is incorrect in that you could use the dragonkill hook to preserve those things.

Since those things are (usually) fields on the accounts table they aren't something a module can/should control and thus they cannot be.

If you *really* needed to do this, the proper way to do this modularly would be
1) create a new hook (for instance dk-preserve)
2) add  $nochange = modulehook('dk-preserve', $nochange)
3) in your module, addhook("dk-preserve") to your module_install
4) in your module_dohook, on the dk-preserve hook
     do things like $args['gold'] = 1; $args['goldinbank'] = 1;
5) make sure your module_dohook returns $args.

That would allow you to modify the items which were preserved via the modules (and stop certain things too by setting them to 0 Smiley)

I will be adding that dk-preserve hook call to prerelease.4
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

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