Thread: Free Items
View Single Post
  #6  
Old 01-19-2004, 12:39 AM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Well, with the nodrop test, and a small factorisation :

Code:
update items set cost = 1000*(1+reclevel+reqlevel+hp +ac+mana+aagi+acha+asta+astr+adex+awis+aint+hasteproclvl*100+(cr+dr+pr+mr+fr) *10+100*(spellid+5)/(spellid+5)) where bagtype=0 and cost=0 and nodrop=0 and damage=0 and delay=0
this sets
1 pp
+ 1 pp per stat/ac point
+ 1 pp per mana/hp point
+ 1 pp per reclevel/reqlevel
+ 100 pp per %haste
+ 10 pp per resistance point
+ 100 pp if the item as a spell attached to it

for each item that
- isnt a bag
- costs 0
- isnt nodrop
- isnt a weapon

for the weapons, do the same, but add a calculation with the ratio damage/delay (i havn't added it since items that arent weapons have a delay of 0 which would raise an error in the division).

Code:
update items set cost = 1000*(1+reclevel+reqlevel+hp +ac+mana+aagi+acha+asta+astr+adex+awis+aint+hasteproclvl*100+(cr+dr+pr+mr+fr) *10+100*(spellid+5)/(spellid+5)+500*damage/delay) where cost=0 and nodrop=0 and damage>0 and delay>0
this sets
1 pp
+ 1 pp per stat/ac point
+ 1 pp per mana/hp point
+ 1 pp per reclevel/reqlevel
+ 100 pp per %haste
+ 10 pp per resistance point
+ 100 pp if the item as a spell attached to it
+ 1000pp * ratio damage/delay (ex : 9/18 = 500pp)

for each item that
- isnt a bag
- costs 0
- isnt nodrop
- isnt a weapon

calculation of the price linked to the ratio needs to be reworked, it's working for lowbie weapons, but totally inaccurate for high end ones (16/18 would cost 888 pp), tho, most of the weapons with such a ratio are nodrop.
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote