Jump to content
  • -1

HOW TO] add default bonuses to equipments


Ulthar
Go to solution Solved by TMP4,

Question

Version of Files XXX

Dear community!

 

I wonder, why i didnt get the bonuses from my equipment.

 

I added the bonuses to my item, but when i equip it, the movements speed and def, etc still the same.

 

Sárkánybőr Cipő+9 = Dragonskin Shoes +9

Quote

MYSQL: 

15249    żëÇǽŹß+9    Sárkánybőr Cipő+9    2    4    0    1    0    0    4        500000    100    0    0    0    5    1    75    0    0    8    30    63    20    15    15    25    0    0    0    0    0    -1    -1    -1    -1    -1    -1    0    0    0

Quote

client item proto (pack-> locale_xx-> item_proto)

<!--AddonType="0"--><Item vnum="15249"  name="żëÇǽŹß+9" gb2312name="Sárkánybőr Cipő+9" type="2" subtype="4" weight="0" size="1" antiflag="0" flag="0" wearflag="4" immuneflag="0" gold="500000" buy_price="500000" limittype0="1" limitvalue0="75" limittype1="0" limitvalue1="0" applytype0="8" applyvalue0="30" applytype1="63" applyvalue1="20" applytype2="15" applyvalue2="15" value0="0" value1="25" value2="0" value3="0" value4="0" value5="0" socket0="0" socket1="0" socket2="0" socket3="0" socket4="0" socket5="0" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="0" />

Quote

and FTP (for me is FileZilla) (usr/game/db) item_proto.txt

15249    żëÇǽŹß+9    ITEM_ARMOR    ARMOR_FOOTS    1    NONE    NONE    WEAR_FOOTS    NONE    500000    100    0    0    5    LEVEL    75    LIMIT_NONE    0    APPLY_MOV_SPEED    30    APPLY_ATTBONUS_MONSTER    20    APPLY_CRITICAL_PCT    15    25    0    0    0    0    0    0    0    0

 

 

What did i wrong? Or i miss something?

 

Please help!

Link to post

3 answers to this question

Recommended Posts

  • 0
  • Solution

It is correct even with sql or txt.

 

So a guess: Do you have 15249 once in item_proto or do you have duplicate line?

If you don't have a duplicate, can you check to change bonus in another item? 

 

--------------------------


According to your private message

Spoiler

 

You can change avg damage in item_addon.cpp

	int iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30);
	int iNormalHitBonus = 0;
	if (abs(iSkillBonus) <= 20)
		iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4);
	else
		iNormalHitBonus = -2 * iSkillBonus + number(1, 5);

As you see it uses some kind of formula to calculate.

If you want to raise the number i would only extend it with

iNormalHitBonus += 10;

So for example if a player would have 30% avg, it will add 10 to it and he will get 40%.

But you can play with that formula if you don't want to do this way.

 

PS: I usually don't answer private messages.

 

 

Edited by TMP4 (see edit history)
Link to post
  • 0
8 minutes ago, TMP4 said:

It is correct even with sql or txt.

 

So a guess: Do you have 15249 once in item_proto or do you have duplicate line?

If you don't have a duplicate, can you check to change bonus in another item? 

 

--------------------------


According to your private message

  Reveal hidden contents

 

You can change avg damage in item_addon.cpp


	int iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30);
	int iNormalHitBonus = 0;
	if (abs(iSkillBonus) <= 20)
		iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4);
	else
		iNormalHitBonus = -2 * iSkillBonus + number(1, 5);

As you see it uses some kind of formula to calculate.

If you want to raise the number i would only extend it with


iNormalHitBonus += 10;

So for example if a player would have 30% avg, it will add 10 to it and he will get 40%.

But you can play with that formula if you don't want to do this way.

 

PS: I usually don't answer private messages.

 

 

 

 

spacer.png

 

It have only 1 line in item_list.txt    (filezilla)

 

 

And the same 1 line in sqlspacer.png

 

 

AAAANd i didnt try it with an another item. NOW, i will try it. (i think  cuz i didnt get the bonuses, its my fault. but if not, than i need to change this shoes .. :D

Link to post
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.