SphereCommunity
[split] Never hungry players - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: [split] Never hungry players (/Thread-split-Never-hungry-players)



[split] Never hungry players - AmpereJoule - 01-11-2013 05:19 AM

Thanks, it worked.

Now I need that the players never get hungry, because I want
that any type of food recover Health instead of feeding.

Can you help me?


RE: [split] Never hungry players - Mordaunt - 01-11-2013 08:20 AM

On=@Hunger
RETURN 1

Same as for NPCs


RE: [split] Never hungry players - Extreme - 01-12-2013 10:03 PM

PHP Code:
[TYPEDEF T_FOOD]
ON=@DCLICK
SRC
.HITS += 5
IF <SRC.HITS> > <SRC.MAXHITS>
 
SRC.HITS <SRC.MAXHITS>
ENDIF 



RE: [split] Never hungry players - AmpereJoule - 01-14-2013 11:26 AM

(01-11-2013 08:20 AM)Mordaunt Wrote:  On=@Hunger
RETURN 1

Same as for NPCs

I changed it in:
C:\sphere\scripts\add-on\sphere_events_players.scp
C:\sphere\scripts\add-on\sphere_jail.scp
C:\sphere\scripts\add-on\sphere_vendor_system.scp

let me test it.

(01-12-2013 10:03 PM)Extreme Wrote:  
PHP Code:
[TYPEDEF T_FOOD]
ON=@DCLICK
SRC
.HITS += 5
IF <SRC.HITS> > <SRC.MAXHITS>
 
SRC.HITS <SRC.MAXHITS>
ENDIF 


But I need that any kind of food recovers differents ammounts of "hits".
(I tried to change it at "sphere_item_profession_chef.scp" at "C:\sphere\scripts\items\profession"
here:
Code:
...
[ITEMDEF 01608]
DEFNAME=i_chicken_leg
NAME=Chicken Leg
TYPE=T_FOOD
SKILLMAKE=COOKING 10.1
RESOURCES=1 i_chicken_leg_raw
WEIGHT=1
CATEGORY=Items by Professions
SUBSECTION=Cook
DESCRIPTION=Chicken Leg (Cooked)

ON=@DCLICK
SRC.HITS += 15
IF <SRC.HITS> > <SRC.MAXHITS>
SRC.HITS <SRC.MAXHITS>
ENDIF
...
)

And The player can't get stuffed, he needs to be always at the "fed" level of food.(so he will be able to eat forever and recover health)
(then I will only need to put a delay between the meals)