DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • December 13, 2017, 06:31:15 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: bonus specialty uses  (Read 2919 times)
0 Members and 1 Guest are viewing this topic.
Justin
Guest
« on: April 04, 2005, 08:09:54 PM »

I'm writing a High Elf race and since there's no "mana" system in LOGD I thought I'd give players an extra specialty use (sort of like letting them cast more spells).

Well after poking my nose through a lot of code I still can't figure a way to do this.

I know for turns its easy to just add a
Code:
$session['user']['turns']++;
under "newday" in my race module file, but I suppose there's no similar way for specialty uses.

Just throw me any ideas please... I'm not very good at this but I'm willing to try any solution.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #1 on: April 04, 2005, 08:16:27 PM »

Code:
case "newday":
$specialties = modulehook("specialtymodules");
$spec = $specialties[$session['user']['specialty']];
$uses =  get_module_pref("uses", $spec);
$uses++;
set_module_pref("uses",$uses,$spec);
break;

That is about it. Your code snippet, would just add a FF.
« Last Edit: April 04, 2005, 08:17:31 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Justin
Guest
« Reply #2 on: April 04, 2005, 08:25:23 PM »

i know that's for FF. I was trying to say its so easy to add a FF but not other things.

thanks for the quick reply Cheesy now if I scale up spec uses throughout the game, I can almost have a mana system.

edit:

okay if i wanted to make it a multiplier (lets say 20% more) I should just change $uses++ to $uses = $uses * 1.2 right?

Sorry for the newbish questions.
« Last Edit: April 04, 2005, 08:28:45 PM by Justin » Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: April 04, 2005, 08:30:18 PM »

i know that's for FF. I was trying to say its so easy to add a FF but not other things.

That is because Specialties were moved out into modules, rather than a core accounts table column. You used to be able to go:
Code:
$session['user']['darkartuses']++;

You would want to go:
Code:
$new = round($uses*1.2);
set_module_pref("uses",$new,$spec);
« Last Edit: April 04, 2005, 08:31:16 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Justin
Guest
« Reply #4 on: April 04, 2005, 08:35:26 PM »

ah okay its starting to make sense.

Another round of successfully muddling through PHP!
I really should go read up.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

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