DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • November 20, 2018, 05:29:43 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: dragonkill hook problem  (Read 2321 times)
0 Members and 1 Guest are viewing this topic.
WebPixie
Guest
« on: November 13, 2004, 07:30:15 PM »

I've run accross a problem with the dragonkill hook. I was about to share my orc race when I went to test it one more time and poof...bug.

My orc race mod was supposed to remove the extra blood the orc gets when he kills the dragon. I hooked into dragonkilltext and dragonkill without luck. Problem is it looks like it is deleting the race in stats before the hook has a chance to say "if race = Orc then subtract the extra", because he is no longer orc it doesn't do it.

Can someone give me an idea how to work this so I can upload it Sad I thought it was all done but I didn't notice this "little bug" hehe

Thanks

Logged
Booger
Captain of the Guard
***
Offline Offline

Posts: 126


I'm a llama!


View Profile
« Reply #1 on: November 14, 2004, 02:49:47 AM »

you could track the extra  hp with a pref and

Code:
$session['user']['hitpoints']-= $extrahp;
if ($session['user']['hitpoints'] < 1) $session['user']['hitpoints'] = 1;
$session['user']['maxhitpoints']-= $extrahp;
$extrahp = 0:

you might also want to add this to the newday in case the player decides to change the race:

Code:
if ($extrahp && $session['user']['race'} != "Orc"){
    $session['user']['hitpoints']-= $extrahp;
    if ($session['user']['hitpoints'] < 1) $session['user']['hitpoints'] = 1;
    $session['user']['maxhitpoints']-= $extrahp;
    $extrahp = 0:
}

then just increase $extrahp every time you raise hp
« Last Edit: November 14, 2004, 02:55:09 AM by Booger » Logged
WebPixie
Guest
« Reply #2 on: November 14, 2004, 02:52:43 AM »

Good idea, let me work on that and see what everyone thinks... and the change of races didn't even cross my mind, good looking out Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

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