Posted: Mon Mar 27, 2006 4:37 am Post subject: (POL096-2006-03-17) Lumberjacking/CreateItemInBackPack
Firstly I am not sure how much of a bug this is (only just started back with POL) but I thought it would be better write something about it and be wrong, then to not do anything.
When lumberjacking I recieve the following messages:
"
Select a tree to chop
Unable to create 0 -> a parameter was invalid
You stop lumberjacking
"
I have traced the problem down to the script: lumberJack.src, specifically:
if ( SkillCheck(who, LUMBERJACKING, difficulty) > 0 )
SendSysMessage(who, "debug1.");
var item := CreateItemInBackPack(who, wood_type, 1);
if ( item.errortext )
SendSysMessage(who, "Unable to create "+wood_type+" ->"+item.errortext);
SendSysMessage(who, "debug2. "+wood_type);
return 0;
else
SendSysMessage(who, "You place the log in your pack.");
return 1;
endif
endif
It appears as though the problem is with the creation of the wook in the backpack "CreateItemInBackPack(who, wood_type, 1);". The second debug line outputs "debug2 0" to the client. The variable wood_type may not be being set correctly. I have tried to find a fix but comming back to this after a few years I am not sure where to look (and grep'ing the source didn't help).
I am not sure, I believe that OSI UO has different wood types on their servers (smilar to different metals) but I am not sure with POL's distro. In any case the wood type is set in the lumberjacking.src file as:
var wood_type := LJ_GetWoodType(who.realm, targ.x, targ.y);
in your .src file or in an included .inc file.
I don't know that script but i am pretty sure that this function will point to a wood.cfg in the regions folder. Either the above function has failures or perhaps the wood or wood region where you lumber is not defined.