The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lumberjacking log types based on the type of tree
Author Message
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #1
Lumberjacking log types based on the type of tree
Here is an alternative lumberjacking system that returns logs based on the kind of tree you are chopping...

First, the Region and Resource related stuff:

Code:
[REGIONRESOURCE mr_tree]
SKILL=1.0,80.0
AMOUNT=9,30
REAPAMOUNT=3,9
REAP=i_log
REGEN=60*60*10
ON=@ResourceFound
   FOR <SRC.TARGP.STATICS>
      OBJ=<ARGO>
      LOCAL.TreeType=<SRC.TARGP.STATICS.<EVAL <LOCAL._FOR>-1>.DEFNAME>
      IF (<LOCAL.TreeType>==i_tree_cedar1_trunk) || (<LOCAL.TreeType>==i_tree_cedar2_trunk)
         OBJ.f_setresource mr_tree_cedar
      ELSEIF (<LOCAL.TreeType>==i_tree_oak1_trunk) || (<LOCAL.TreeType>==i_tree_oak2_trunk) || (<LOCAL.TreeType>==i_tree_oak3_trunk) || (<LOCAL.TreeType>==i_tree_oak4_trunk)
         OBJ.f_setresource mr_tree_oak
      ELSEIF (<LOCAL.TreeType>==i_tree_walnut1_trunk) || (<LOCAL.TreeType>==i_tree_walnut2_trunk)
         OBJ.f_setresource mr_tree_walnut
      ELSEIF (<LOCAL.TreeType>==i_tree_willow1_trunk) || (<LOCAL.TreeType>==i_tree_willow2_trunk) || (<LOCAL.TreeType>==i_tree_willow3_trunk)
         OBJ.f_setresource mr_tree_willow
      ELSEIF (<LOCAL.TreeType>==i_tree_cyprus1_trunk) || (<LOCAL.TreeType>==i_tree_cyprus2_trunk) || (<LOCAL.TreeType>==i_tree_cyprus3_trunk) || (<LOCAL.TreeType>==i_tree_cyprus4_trunk)
         OBJ.f_setresource mr_tree_cyprus
      ELSEIF (<LOCAL.TreeType>==i_tree_trunk_yew_1)
         OBJ.f_setresource mr_tree_yew
      ELSEIF (<LOCAL.TreeType>==i_tree_bamboo)
         OBJ.f_setresource mr_tree_bamboo
      ELSEIF (<LOCAL.TreeType>==i_tree_trunk_cherry)
         OBJ.f_setresource mr_tree_cherry
      ELSEIF (<LOCAL.TreeType>==i_tree_trunk_maple)
         OBJ.f_setresource mr_tree_maple
      ELSEIF (<LOCAL.TreeType>==i_tree1_trunk)
         OBJ.f_setresource mr_tree_regular
      ELSEIF (<LOCAL.TreeType>==i_tree2_trunk)
         OBJ.f_setresource mr_tree_regular
      ELSEIF (<LOCAL.TreeType>==i_tree3_trunk)
         OBJ.f_setresource mr_tree_regular
      ELSEIF (<LOCAL.TreeType>==i_tree4_trunk)
         OBJ.f_setresource mr_tree_regular
      ELSEIF (<LOCAL.TreeType>==i_tree5_trunk)
         OBJ.f_setresource mr_tree_regular
      ELSEIF (<LOCAL.TreeType>==i_tree6_trunk)
         OBJ.f_setresource mr_tree_regular
      ENDIF
   ENDFOR

[FUNCTION f_setresource]
FORITEMS 0
  IF (<BASEID>==i_worldgem_bit) && (<TYPE>==t_tree)
     MORE1=<ARGV[0]>
     AMOUNT={4 9}//This may not be necessary...
     RETURN 0
  ENDIF
ENDFOR
RETURN 1

[REGIONRESOURCE mr_tree_regular]
SKILL=80.0,100.0
AMOUNT=4,9
REAP=i_log
REGEN=60*60*10

[REGIONRESOURCE mr_tree_cedar]
SKILL=80.0,100.0
AMOUNT=4,9
REAP=i_log_cedar
REGEN=60*60*10

[REGIONRESOURCE mr_tree_oak]
SKILL=80.0,100.0
AMOUNT=4,9
REAP=i_log_oak
REGEN=60*60*10

[REGIONRESOURCE mr_tree_walnut]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_walnut
REGEN=60*60*10

[REGIONRESOURCE mr_tree_willow]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_willow
REGEN=60*60*10

[REGIONRESOURCE mr_tree_cyprus]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_cyprus
REGEN=60*60*10

[REGIONRESOURCE mr_tree_yew]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_yew
REGEN=60*60*10

[REGIONRESOURCE mr_tree_bamboo]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_bamboo
REGEN=60*60*10

[REGIONRESOURCE mr_tree_cherry]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_cherry
REGEN=60*60*10

[REGIONRESOURCE mr_tree_maple]
SKILL=70.0,95.0
AMOUNT=4,9
REAP=i_log_maple
REGEN=60*60*10

Now the log and board items...

Code:
[DEFNAME colors_resources_wood]
color_o_ash        0157
color_o_bamboo     098
color_o_bloodwood  04aa
color_o_cedar      0157
color_o_cherry     0676
color_o_cyprus     0235
color_o_frostwood  04ab
color_o_heartwood  04a9
color_o_maple      06c0
color_o_oak        04a6
color_o_sunwood    04ac
color_o_walnut     0473
color_o_willow     02e9
color_o_yew        04a8

[ITEMDEF i_log_ash]
ID=i_log
NAME=ash log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Ash Log
ON=@Create
   COLOR=color_o_ash

[ITEMDEF i_board_ash]
ID=i_board
NAME=ash board%s
TYPE=t_board
VALUE=5
WEIGHT=1.0
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Ash Board
ON=@Create
   COLOR=color_o_ash

[ITEMDEF i_log_cedar]
ID=i_log
NAME=cedar log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Cedar Log
ON=@Create
   COLOR=color_o_cedar

[ITEMDEF i_board_cedar]
ID=i_board
NAME=cedar board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Cedar Board
ON=@Create
   COLOR=color_o_cedar

[ITEMDEF i_log_oak]
ID=i_log
NAME=oak log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Oak Log
ON=@Create
   COLOR=color_o_oak

[ITEMDEF i_board_oak]
ID=i_board
NAME=oak board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Oak Board
ON=@Create
   COLOR=color_o_oak

[ITEMDEF i_log_walnut]
ID=i_log
NAME=walnut log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Walnut Log
ON=@Create
   COLOR=color_o_walnut

[ITEMDEF i_board_walnut]
ID=i_board
NAME=walnut board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Walnut Board
ON=@Create
   COLOR=color_o_walnut

[ITEMDEF i_log_willow]
ID=i_log
NAME=willow log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Willow Log
ON=@Create
   COLOR=color_o_willow

[ITEMDEF i_board_willow]
ID=i_board
NAME=willow board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Willow Board
ON=@Create
   COLOR=color_o_willow

[ITEMDEF i_log_cyprus]
ID=i_log
NAME=cyprus log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Cyprus Log
ON=@Create
   COLOR=color_o_cyprus

[ITEMDEF i_board_cyprus]
ID=i_board
NAME=cyprus board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Cyprus Board
ON=@Create
   COLOR=color_o_cyprus

[ITEMDEF i_log_yew]
ID=i_log
NAME=yew log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Yew Log
ON=@Create
   COLOR=color_o_yew

[ITEMDEF i_board_yew]
ID=i_board
NAME=yew board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Yew Board
ON=@Create
   COLOR=color_o_yew

[ITEMDEF i_log_bamboo]
ID=i_log
NAME=bamboo
TYPE=t_log
VALUE=2
WEIGHT=1.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Bamboo Log
ON=@Create
   COLOR=color_o_bamboo

[ITEMDEF i_board_bamboo]
ID=i_board
NAME=bamboo board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Bamboo Board
ON=@Create
   COLOR=color_o_bamboo

[ITEMDEF i_log_cherry]
ID=i_log
NAME=cherry log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Cherry Log
ON=@Create
   COLOR=color_o_cherry

[ITEMDEF i_board_cherry]
ID=i_board
NAME=cherry board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Cherry Board
ON=@Create
   COLOR=color_o_cherry

[ITEMDEF i_log_maple]
ID=i_log
NAME=maple log%s
TYPE=t_log
VALUE=2
WEIGHT=2.0
CATEGORY=Resources
SUBSECTION=Wood
DESCRIPTION=Maple Log
ON=@Create
   COLOR=color_o_maple

[ITEMDEF i_board_maple]
ID=i_board
NAME=maple board%s
TYPE=t_board
VALUE=5
WEIGHT=1
CATEGORY=Resources
SUBSECTION=Boards
DESCRIPTION=Maple Board
ON=@Create
   COLOR=color_o_maple

Note: If there are problems, check the DEFNAME's for your tree trunks...
09-27-2012 02:43 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes RanXerox's post
Post Reply 


Messages In This Thread
Lumberjacking log types based on the type of tree - RanXerox - 09-27-2012 02:43 PM

Forum Jump:


User(s) browsing this thread: 5 Guest(s)