SphereCommunity
lumberjack problem - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: lumberjack problem (/Thread-lumberjack-problem--5894)



lumberjack problem - jexnico - 03-12-2018 02:38 AM

when i try to use an axe in a tree, i receive one message and my char does not hack the tree...
i know this is involved with the sphere_skills
how do i resolve this issue?

[Image: 9v8g05.png]

lumber:
Quote:ON=@PreStart
IF (<SRC.WEAPON.USESCUR>< 1)
SRC.SYSMESSAGE The tool is out of charges.
return 1
ENDIF

ON=@Success
SRC.WEAPON.USESCUR --
IF (<SRC.WEAPON.USESCUR>==0)
SRC.WEAPON.DESTROY 1
ENDIF



RE: lumberjack problem - Abuelox - 03-12-2018 04:05 AM

use
Code:
if !(<act.UsesMax> == 0)
ACT.MESSAGE @66,0,1 [Uses <act.UsesCur> / <act.UsesMax>]
endif

You need too make UsesMax on @create in any tool.

Example:

Code:
[ITEMDEF 0e85]
DEFNAME=i_pickaxe
TYPE=t_weapon_mace_pick
DAM=13,15
FLIP=1
SKILL=Swordsmanship
SPEED=44
//TAG.OVERRIDE.SPEED=30
VALUE=24
WEIGHT=5.0
TWOHANDS=N
RESOURCES=4 i_ingot_iron,1 i_log
SKILLMAKE=Tinkering 40.0,t_tinker_tools
CATEGORY=Provisions - Weapons
SUBSECTION=Swordsmanship
DESCRIPTION=PickAxe
ReqStr=30
TEVENTS=t_equipitem
DUPELIST=0e86
ON=@Create
   HITPOINTS={36 48}
   UsesMax=50



RE: lumberjack problem - jexnico - 03-12-2018 04:14 AM

(03-12-2018 04:05 AM)Abuelox Wrote:  use
Code:
if !(<act.UsesMax> == 0)
ACT.MESSAGE @66,0,1 [Uses <act.UsesCur> / <act.UsesMax>]
endif

You need too make UsesMax on @create in any tool.

Example:

Code:
[ITEMDEF 0e85]
DEFNAME=i_pickaxe
TYPE=t_weapon_mace_pick
DAM=13,15
FLIP=1
SKILL=Swordsmanship
SPEED=44
//TAG.OVERRIDE.SPEED=30
VALUE=24
WEIGHT=5.0
TWOHANDS=N
RESOURCES=4 i_ingot_iron,1 i_log
SKILLMAKE=Tinkering 40.0,t_tinker_tools
CATEGORY=Provisions - Weapons
SUBSECTION=Swordsmanship
DESCRIPTION=PickAxe
ReqStr=30
TEVENTS=t_equipitem
DUPELIST=0e86
ON=@Create
   HITPOINTS={36 48}
   UsesMax=50

where did i add that?
Quote:use
Code:
if !(<act.UsesMax> == 0)
ACT.MESSAGE @66,0,1 [Uses <act.UsesCur> / <act.UsesMax>]
endif



RE: lumberjack problem - Abuelox - 03-12-2018 10:40 AM

its a message from a item (@itemclick, if u want see it on all weapons/tools with uses)

You can make it from a event.


RE: lumberjack problem - jexnico - 03-13-2018 06:54 AM

solved
100% working
ty Abuelox!!! Big Grin