working on asgard (ackadia/wod) 098 scripts. merchant sold armor and weapons have super duper AR.
.created items are fine, haven't tested crafted stuff
Anyone know what would cause this? Would the SEND_AOS_TOOLTIP flag that is on vendors cause this?
vendor sold armor and weapons have super AR
-
rainmaker24
- New User
- Posts: 12
- Joined: Sun Feb 27, 2011 11:24 am
Re: vendor sold armor and weapons have super AR
AR depends on:
- quality
- HP/MaxHp ratio (maxhp_mod is also involved in some way)
Check their hp. If it's more then maxhp AR would be higher.
- quality
- HP/MaxHp ratio (maxhp_mod is also involved in some way)
Check their hp. If it's more then maxhp AR would be higher.
Re: vendor sold armor and weapons have super AR
This problem has to do with the items' quality. In the Ackadia and WoD scripts there is a section where the quality of the vendor items is being set to a random number between 50 and 99, and this becomes a "multiplier", so an item with quality 50 is 50 times as powerful as one with quality 1.
Here is the culprit:
\pkg\npcs\townfolk\merchants\mrcspawn.inc:
Here is the culprit:
\pkg\npcs\townfolk\merchants\mrcspawn.inc:
Code: Select all
function RestockInventory (merchanttype, byref inventory)
UnloadConfigFile (":merchants:mrcspawn");
var mrcspawn_cfg := ReadConfigFile(":merchants:mrcspawn");
foreach item in ListRootItemsInContainer (inventory)
DestroyItem (item);
endforeach
foreach productgroup in ProductGroups (mrcspawn_cfg, merchanttype)
Restock (mrcspawn_cfg, inventory, productgroup);
endforeach
// REMOVE EVERYTHING AFTER THIS AND BEFORE THE NEXT COMMENT
foreach item in ListRootItemsInContainer ( inventory )
if ( item.quality )
item.quality := randomint (50) + 50;
item.hp := item.maxhp;
endif
endforeach
// REMOVE EVERYTHING BEFORE THIS AND AFTER THE PREVIOUS COMMENT
endfunction