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
NPC/Pet Spawn
Author Message
Lano
Apprentice
*

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



Post: #1
NPC/Pet Spawn
Hi, i am trying to make a script that works like this:

ON=@hit
random chance of 10%
Summon for example a skelleton knight that is tame/belongs to the player
after 60 sec. the skeleton dies
while skeleton is active, player can not trigger another summon


I am at work right now, so i do not have the script i am working on handy, but it does not matter, i am failing utterly anyway.

The random chance of summoning and all that is no biggie, i can also get the server to spawn a new pet next to the player, its just not tame/belongs to him/her, and getting the timers equipped right, also seems to confuse me, please help Smile
10-09-2012 07:21 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #2
RE: NPC/Pet Spawn
Two options functions for you.

This first is a dispel-able summoning. The second makes an existing creature the pet of a player.

Code:
[function summon_pet]
SRC.newnpc=<ARGS>
SRC.act.p=<src.p>
SRC.act.tag.owner=<src.uid>
SRC.ACT.FIX
VAR.SUID=<ACT.UID>
SRC.act.flags=00c000000
SRC.act.newitem=i_memory
SRC.ACT.ACT.COLOR=02
SRC.act.act.cont=<VAR.SUID>
SRC.act.act.link=<SRC.uid>
SRC.act.act.more2=<SRC.uid>
SRC.act.act.timer=-1
SRC.ACT.NEWITEM=i_rune_summon_creature
SRC.ACT.ACT.LAYER=41
SRC.ACT.ACT.TYPE=t_spell
SRC.ACT.ACT.MORE2=1
SRC.ACT.ACT.MOREP=40,816
SRC.ACT.ACT.CONT=<VAR.SUID>
SRC.ACT.ACT.LINK=<SRC.UID>
SRC.ACT.ACT.TIMER=-1
SRC.ACT.ACT.ATTR=attr_decay


// <pet uid>.f_MakePetOf <owner uid>
[function f_MakePetOf]
serv.newitem i_memory
new.color = memory_ipet
new.more1 = 04
new.more2 = <serv.time>
new.morep = <p>
new.link = <args>
new.cont = <uid>

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
10-10-2012 04:08 AM
Find all posts by this user Like Post Quote this message in a reply
Lano
Apprentice
*

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



Post: #3
RE: NPC/Pet Spawn
Thanks, thats easy to work with
i'd never been able to figure that one out myself Wink
10-10-2012 04:58 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)