DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 21, 2013, 06:56:32 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Setting Stat on Weapon Purchase  (Read 172 times)
0 Members and 1 Guest are viewing this topic.
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« on: August 10, 2012, 10:05:58 PM »

I was wondering how I could set a user pref when a weapon is bought. The pref is a stat in which the value would be based off of the weapon damage. Basically, the idea is to have weapons be damaged at the end of battle, and the health/durability is based off the level(the damage the weapon can deal). I don't think this has been done, which is why I ask.
Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #1 on: August 11, 2012, 12:07:16 AM »

You could write a module, hook into the armor/weapon and check if a weapon is bought (evaluate the parameters "httpget()") and set a module pref accordingly.

Then go to the corresponding forest battle win/lose hooks and evaluate there what durability loss etc. you want to calculate and modify the user "atk" stat.
Logged
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #2 on: August 11, 2012, 12:45:17 AM »

Thank you! It works!
Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Pages: [1]   Go Up
  Print  
 
Jump to:  


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

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
33 Guests, 1 User
supermingo
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search