Lano
Apprentice
Posts: 28
Likes Given: 3
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0
|
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
|
|
10-09-2012 07:21 PM |
|
|
Anarch Cassius
Master
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 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 |
|
|