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:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fetch Command
Author Message
Saint
Apprentice
*

Posts: 14
Likes Given: 3
Likes Received: 4 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #1
Fetch Command
Looking for a brain type to add to certain animals that when under your control can fetch one item.

has to check to make sure its moveable and not over a certain weight.
07-12-2015 06:58 PM
Find all posts by this user Like Post Quote this message in a reply
Diathim
Apprentice
*

Posts: 10
Likes Given: 13
Likes Received: 1 in 1 posts
Joined: Oct 2015
Reputation: -3



Post: #2
RE: Fetch Command
Really, I am not too sure if this will work or not. I did it super quick in NP++ without testing. If not, let me know what is wrong or not working and I can try to fix it as soon as possible for you. Smile

Code:
[speech spk_pets]
on=*fetch*
src.targetf f_pet_fetch What do you want your pet to fetch?
return 1

[function f_pet_fetch]
on=@TargOn_Item
if (<src.targ.attr> &attr_move_never) || (<src.targ.attr> &attr_static)
src.msg Your pet cannot retrieve that.
return 1
endif

if (<src.targ.weight> > 10)
src.msg This will be too heavy for the pet to pickup.
return 1
endif

ref1=<src.targ.uid>
ref2=<uid>
ref3=<src.uid>
run <src.targ.p>
timerf 5,f_pet_pickup
return 1

[function f_pet_pickup]
if (<p> != <src.targ.p>)
timerf 5,f_pet_pickup
return 1
endif

for <ref1> 1 10
if (<uid> == <ref1>)
  ref1.bounce <ref2>
  run <ref3.p>
endif
endfor
retutn 1
10-21-2015 03:03 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)