help zuly fix on paknpcsell

How do you use the forum? Also Technical News.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Forum rules
This forum is NOT a forum where you post a technical questions about osRose, osiRose or ospRose. Use the dedicated forum for that!

Re: help zuly fix on paknpcsell

Postby hoegarden31 on Mon Nov 06, 2017 9:21 pm

Hmmm

I tried on multiple lines (like in the code of PurpleYouko) --> No success.
I tried to make it in a single line (same has the client code) --> No sucess.
The price is still not correct... I have to put the 102 on 150 to get something pretty close. But then when I test with a total other item, bam it is all broken again... I must miss something.

  1. price = (int) (basePrice *
  2.                                (40+thisitem.refine) *
  3.                                (200+ thisitem.durability) *
  4.                                (150) *
  5.                                (1 + skillValue * 0.01f) / 1000000.f *
  6.                                ( (4000+thisitem.lifespan) / 14000.f ) +
  7.                                (thisitem.appraised * gemValue * 0.2f)
  8.                                );

skillValue = thisclient->cskills[i].thisskill->value2[0]
gemValue = (EquipList[7].Index[thisitem.gem]->price
basePrice = EquipList[thisitem.itemtype].Index[thisitem.itemnum]->price
I'm the one and only. In heaven and on earth.
Image
hoegarden31
Rackie
Rackie
 
Posts: 150
Joined: Sun Nov 13, 2011 7:13 pm

Re: help zuly fix on paknpcsell

Postby PurpleYouko on Wed Nov 08, 2017 4:13 pm

note that "thisitem.appraised" is a boolean in our servers so can't be directly used in a mathematical equation.

It's also possible that something has changed in the client since the client source code that came from version 137. If that is the case then it's going to be difficult to get it exactly right without using a client that we can control completely.

Next time I get the time I will fire up my servers and see if i can get to the bottom of it.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4600
Joined: Fri Aug 10, 2007 2:05 pm

Re: help zuly fix on paknpcsell

Postby hoegarden31 on Wed Nov 08, 2017 7:35 pm

You can use Boolean in equations. It will be 1 or 0.
Problem is the durability i think. On dropped items it is above 100000...
And yes, I tried this on the REV 4... so probably something has changed in the client. We will never know :(
I'm the one and only. In heaven and on earth.
Image
hoegarden31
Rackie
Rackie
 
Posts: 150
Joined: Sun Nov 13, 2011 7:13 pm

Re: help zuly fix on paknpcsell

Postby PurpleYouko on Wed Nov 08, 2017 11:07 pm

I thought so to but It refused to compile when I tried it.
Gave me an error saying that I couldn't multiply by a boolean. that's why I put it in a conditional.
Maybe I have a weird compiler setting :?
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4600
Joined: Fri Aug 10, 2007 2:05 pm

Re: help zuly fix on paknpcsell

Postby hoegarden31 on Thu Nov 09, 2017 8:29 am

Hehe, anyways, AnimalCrackerz found out that if you do 0.4 x Base price, you get the correct amount.
(but that only works for items bought from an npc.)
I'm the one and only. In heaven and on earth.
Image
hoegarden31
Rackie
Rackie
 
Posts: 150
Joined: Sun Nov 13, 2011 7:13 pm

Previous

Return to Some Help / News

Who is online

Users browsing this forum: No registered users and 2 guests