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
Animal Ownership
Author Message
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #1
Animal Ownership
Hello, I'm trying to make a race ability "natural wonder". Once a player uses this, the server checks the distancetalk for animals and gives a memory to them thus giving the player ownership.

I had this working fine, but I'm wanting to add in a part so if their arent any animals with "brain_animal" it tells them. This is where it stopped working.



[function f_natural_wonder]
forchars <serv.distancetalk>
IF (<NPC> == 1)
makemypet
src.say Help me forest friends!
return 1
else
src.say There are no animals to help!
return 1
ENDFOR
ENDIF


[function MakeMyPet]
serv.newitem=i_memory
new.color=memory_ipet
new.link=<src>
new.cont=<uid>



I'd also like to add a timer on the animals so when it reaches zero the player no longer has ownership and they return to their spawn. I'm sure I could do this part but no harm in asking Tongue Thank you!

Of course as soon as I post this i realize i'm retarded.

I figured it out, nevermind
(This post was last modified: 02-06-2015 06:12 PM by Leonidas.)
02-06-2015 06:03 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like Leonidas's post
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #2
RE: Animal Ownership
lol
02-07-2015 01:35 AM
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: Animal Ownership
WHAT
hahaha lolĀ²

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.
02-07-2015 06:02 AM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #4
RE: Animal Ownership
I have one problem with my script.

Once the timer on the animals memory hits zero the player no longer has ownership and the animal goes on doing what it was doing.

But if the player uses this on a horse, and mounts the horse before the timer runs out, he now has a free horse.

How would I go about this? If there's even a way to disable a horse from being mounted when they use this skill, how would I do this?
02-11-2015 05:41 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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