PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Problem with GetHarvestDifficulty & HarvestResource func

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
Harley



Joined: 18 Mar 2006
Posts: 92
Location: World Earth

PostPosted: Thu Apr 03, 2008 12:38 pm    Post subject: Problem with GetHarvestDifficulty & HarvestResource func Reply with quote

I want modiffy my script bladed.src. I have get thoose code from ZH 095:

Code:

function CarveTree(who, blade, use_on)
  blade := blade;
  if(abs(who.x-use_on.x)>2 || abs(who.y-use_on.y)>2)
    SendSysMessage(who, "You are not close enough");
    return;
  endif
  PrintTextAbove(who, "*Trying to get some kindlings*",_DEFAULT_TEXT_FONT,52);
   if(GetStamina(who)<= 1)
                      SetStamina(who, 0);
                      SendSysMessage(who, "You have to rest a while!",3,33);
                      return;
               else
                      SetStamina(who, GetStamina(who) - 1);
      endif
  sleep(1);
        CheckToolWear (who, blade, SKILLID_LUMBERJACKING);
  var count := GetHarvestDifficulty("wood", use_on.x, use_on.y, use_on.objtype);
    if((count == error) or (!count))
      SendSysMessage(who, "There's not enough kindling here to chip.");
      return 1;
  endif
  var wood_amount := HarvestResource( "wood", use_on.x, use_on.y, 1, 5 );
  if((wood_amount == 0) or (!wood_amount))
        SendSysMessage(who, "There's not enough kindling here to chip.");
        return 1;
  endif
  CreateItemInBackpack(who, UOBJ_KINDLING, 1);
  DestroyItem(use_on);
  SendSysMessage(who, "You chip off some kindling and put it in your backpack");
endfunction


WHen I try chip some kindling, I always get thoose frase:
Quote:
There's not enough kindling here to chip.


If I disable first function check GetHarvestDifficulty, I have problem with second function HarvestResource.

Please, if have some one thoose problem, or know how to enable thoose functions that they will working pretty, helpme.

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 259

PostPosted: Wed Apr 23, 2008 7:56 am    Post subject: Reply with quote

It sounds that there is no wood where you try to carve.

You have to take a look inside the wood.cfg in the regions folder.
You should put a few wood on every tree in the world. Something like:

Code:

Region The Whole World
{
    UnitsPerArea        5
    SecondsPerRegrow    3600
    Capacity            200000
    Range               0 0 6143 4095
}

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty