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






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Never hungry players
Author Message
AmpereJoule
Journeyman
*

Posts: 59
Likes Given: 7
Likes Received: 0 in 0 posts
Joined: Dec 2012
Reputation: 0



Post: #1
[split] Never hungry players
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?
(This post was last modified: 01-11-2013 08:15 AM by Mordaunt.)
01-11-2013 05:19 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: [split] Never hungry players
On=@Hunger
RETURN 1

Same as for NPCs

[Image: 2nis46r.jpg]
01-11-2013 08:20 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #3
RE: [split] Never hungry players
PHP Code:
[TYPEDEF T_FOOD]
ON=@DCLICK
SRC
.HITS += 5
IF <SRC.HITS> > <SRC.MAXHITS>
 
SRC.HITS <SRC.MAXHITS>
ENDIF 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
01-12-2013 10:03 PM
Find all posts by this user Like Post Quote this message in a reply
AmpereJoule
Journeyman
*

Posts: 59
Likes Given: 7
Likes Received: 0 in 0 posts
Joined: Dec 2012
Reputation: 0



Post: #4
RE: [split] Never hungry players
(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)
(This post was last modified: 01-14-2013 11:46 AM by AmpereJoule.)
01-14-2013 11:26 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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