Page 1 of 1
question on rebuilding all vendors at once...
Posted: Thu Feb 23, 2006 5:20 pm
by mijimoe
I know that the nodewipe command will delete all the vendors but is there a way to delete the ones standing and then recreate them all without having to go to each node and recreate them? The reason I ask is that I adjusted the costs of some items in game and when I restarted all the npc's (restartall command) and then rebooted the server afterwards the same prices remain - the only time they change is if i delete the vendor and rebuild them manually (which is a pain). Any ideas how to do this? any help would be appreciated.
Thanks!
Mijimoe
Posted: Thu Feb 23, 2006 9:31 pm
by FreeSoul
if you are talking about prices of items sold by merchants you have to:
.unloadcfg

KG:itemdesc //PKG is package name where is itemdesc.cfg with changed item price
then restartall
but if you thing about something else... please explain your problem again point by point.
one question more for clarification....
Posted: Fri Feb 24, 2006 7:07 am
by mijimoe
Ok I think I understand what you are saying. Here is an example listed below so that I can get a clear idea as to how to run this command:
I altered the costs for potions in the game. The potion costs are in the following location on the server running the shard:
c:\pol\pkg\skills\alchemy\itemdesc.cfg
Therefore, I have tried doing the following command to no avail:
.unloadcfg :alchemy:itemdesc
Is this the correct syntax or is there something here that I am missing?
In addition to this, I also would like to unload the config file that is located at:
c:\pol\config\itemdesc.cfg
What is the syntax for this if possible?
Any additional help would be greatly appreciated.
Thanks!
Posted: Fri Feb 24, 2006 7:20 am
by Tritan
To my knowledge with POL95 you can not unload the itemdesc.cfg files in game yet, even with the .unloadcfg command.
Maybe this has changed with 96 but I have not gotten that far with 96 yet.
Posted: Sun Feb 26, 2006 1:33 am
by FreeSoul
you can unload them, but only for ReadConfigFile
and about prices...
vendors have their stuff in their storageareas inv_fs
after unloading file destroy every item in this container and recreate items
Code: Select all
function RecreateMyStorage()
var storage, inv_fs, inv_pb, inv_1c;
storage := FindStorageArea( "Merchant Storage" );
if (!storage)
syslog( "Unable to FindStorageArea Merchant Storage" );
exit;
endif
inv_fs := find_or_create_item( storage, me.serial + " FS", UOBJ_METALCHEST );
foreach item in inv_fs
destroyitem(item);
endforeach
var merchant_type := GetObjProperty( Self(), "MerchantType" );
RestockInventory( merchant_type, inv_fs );
endfunction