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-nmm6 (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-nmm6 (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-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom AI Events
Author Message
Extreme
Grandmaster Poster
***

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

SphereCommunity

Post: #11
RE: Custom AI Events
(08-22-2012 06:30 AM)Skul Wrote:  
(08-21-2012 03:30 PM)admin phoenix Wrote:  very nice
one idea from me aboot laying eggs.
one day the world will be over spawn with eggs.
maybe the chicken will lay a new egg if the old one was pickup from ground?
or maybe the chick lay 3 eggs and then if a player pick up one of the egg the chicken will lay another one after x seconds.

Decay timer? <serv.decaytimer>, pretty sure it's set to 15 for 15 minutes
Code:
serv.newitem=i_eggs_fresh
new.attr |= attr_decay
new.p=<p>
new.timer=<eval <serv.decaytimer> *60>
emote lay eggs
I fixed it, set timerf 120~180 to remove
And the chickens and snakes will lay eggs in the same time, 120~180 seconds
Its okay now.

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.
08-22-2012 06:49 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #12
RE: Custom AI Events
timerf is ok Extreme, but what if a player picks up the eggs (for cooking purposes?), it is then removed, should use TIMER and attr_decay to simulate 'server decay'. Just a heads up.

also, here's a simple code to add to all npcs and players to 'crush the eggs' when stepped on
Code:
[events e_eggshells]
on=@itemstep
if (<act.baseid>==i_eggs_fresh)
  emote crush <act.name>
  act.sound 01c3 //skeletal crush sound
  act.dispid=i_eggshells
  act.update
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 08-22-2012 09:09 AM by Skul.)
08-22-2012 09:06 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: #13
RE: Custom AI Events
Updated! 21/08/2012 21:41PM
Script updated in main post.

@Skul
I did the changes that you suggested.
Thank you.

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.
08-22-2012 10:43 AM
Find all posts by this user Like Post Quote this message in a reply
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #14
RE: Custom AI Events
u could add a check to see if its tamed b4 the function works on them.... as if the animal gets tammed it goes wild it dont listen to its owner..

[Image: htid.jpg]
08-23-2012 08:50 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

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



Post: #15
RE: Custom AI Events
You probably also ought to check if the REGION that it is in has the region_flag_nodecay turned on, and if so, don't drop anything on the ground...
08-23-2012 10:25 AM
Find all posts by this user Like Post Quote this message in a reply
Pollo
Apprentice
*

Posts: 22
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0



Post: #16
RE: Custom AI Events
wow, great script , perfect for RP servs
11-05-2012 11:33 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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