SphereCommunity
lumber (skill make) - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: lumber (skill make) (/Thread-lumber-skill-make)



lumber (skill make) - mrkarlo - 01-27-2013 09:25 AM

hello people. how can i make this - chop some sort of logs only with required
skill? for example ''test logs'' player can chop only wit 70.0 lumberjacking etc.


RE: lumber (skill make) - Crusader - 01-27-2013 10:40 PM

well....u have to do several things:

first in sphere_region.scp u have to add the following:
[REGIONTYPE r_default_tree t_tree]
// All tress produce wood by default.
RESOURCES=1.0 mr_tree
RESOURCES=50.0 ur_test // the number 50.0 means only the % of how many u find in a forest
RESOURCES=50.0 another_test


then u have to add the following items:

[ITEMDEF i_test_log]
NAME=test log
TYPE=t_log
ID=i_log
WEIGHT=1

ON=@CREATE
COLOR=012

[ITEMDEF i_another_log]
NAME=Another test log
TYPE=t_log
ID=i_log
WEIGHT=1

ON=@CREATE
COLOR=020


and finally the regionsource:

[REGIONRESOURCE ur_test]
// lumberjacking default
// t_tree
SKILL=1.0,70.0 // i can take this from 1 of skill, at 70.0 i will more likely take the highest amount (14)
AMOUNT=7,14
REAP=i_test_log
REGEN=60*60*10

[REGIONRESOURCE another_test]
// t_tree
SKILL=60.0,80.0 // i can take this from 60.0 of skill
AMOUNT=4,8
REAP=i_another_log
REGEN=60*60*10


Try Smile


RE: lumber (skill make) - mrkarlo - 01-28-2013 08:21 AM

Code:
SKILL=1.0,70.0
thanks but it doesnt work on 56b!


RE: lumber (skill make) - Crusader - 01-28-2013 09:44 AM

impossible Smile i'm using it atm Smile


RE: lumber (skill make) - Skul - 01-29-2013 02:09 PM

in sphere_region.scp you will see a block for mr_tree in [regionresource xxx], add in your desired logs and try choping some trees. It is possible to chop specific logs by tree types, this can be done by reading the statics.x of a position, for example:
Code:
on=@itemtargon_ground
if (<act.type>==t_weapon_sword) || (<act.type>==t_weapon_axe)
  for x 0 <eval <targp.statics> +-1>
    if (<targp.statics.<local.x>.id>==(id of the tree on the ground))
      if !(<targp.worldgembit t_tree>)
        serv.newitem=i_worldgem_bit
        new.attr=attr_move_never|attr_invis|attr_decay
        new.more1=mr_tree //resource you prefer to use
        new.amount=<eval {5 10}> //amount of logs
        new.timer=<serv.regionresource.mr_tree.delay>
        new.p=<targp>
      endif
    endif
  endfor
endif

[function worldgembit]
foritems 0
  if (<baseid>==i_worldgem_bit)
    if (<type>==<args>)
      local.return=1
    endif
  endif
endfor
return <dlocal.return>



RE: lumber (skill make) - mrkarlo - 01-30-2013 08:23 AM

thanks Skul! i w try it.


RE: lumber (skill make) - Ultima One - 01-31-2013 12:53 AM

Code:
[REGIONRESOURCE mr_gold]
SKILL=50.0 100.0
AMOUNT=3 6
REAP        = i_ore_gold
REGEN        = 60*60*10
ON=@ResourceFound
   IF !( <SRC.TAG0.MINESTONE> = 0 )
      OBJ = <ARGO.UID>
      OBJ.MORE1=rand_stone
   ENDIF

Skill works here.. 56b too. 50% minimum required.