Thread Rating:
- 2 Votes - 5 Average
- 1
- 2
- 3
- 4
- 5
XuN
Sphere Developer
Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30
|
|
02-17-2015 07:39 PM |
|
|
Van Glan Bloom
Journeyman
Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0
|
RE: Makemypet
I have add the makemypet function in the script, but him dont work =/ I hvae this :
Code:
serv.newnpc c_mound_maggots
new.MakeMyPet
endif
new.flags |= statf_conjured
new.maxhits=(<eval <local.casterability>/50>)
new.hits=<new.maxhits>
new.karma=-2500
new.fame=0
new.p=<src.p>
new.color=<color>
new.events +e_animate_dead
serv.newitem i_animate_checker
new.timer=1
new.update
new.MakeMyPet
cont.targ.remove
remove
return 1
endif
[function MakeMyPet]
serv.newitem=i_memory
new.color=memory_ipet
new.link=<src>
new.cont=<uid>
[ITEMDEF i_animate_checker]
ID=i_memory
TYPE=t_eq_script
NAME=Animate Checker
ON=@Timer
finduid.<cont.tag.owner>.sysmessage @07a1 Your revenant succeeded!
else
cont.hits -= 1
cont.maxhits -= 1
if (<cont.hits> < 0)
cont.hits=0
cont.remove
endif
timer=120 // 2 minutos
return 1
[events e_animate_dead]
ON=@NPCLookAtChar
IF (<OWNER>)
IF (<MAGERY>) && ((<NPC> == brain_monster) || (<NPC> == brain_dragon) || (<NPC> == brain_human) || (<NPC> == brain_berserk))
attack
return 1
endif
endif
On=@Click
Message @0035 [Summon]
ON=@Death
src.remove
|
|
02-18-2015 02:06 AM |
|
|
Anarch Cassius
Master
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
|
RE: Makemypet
I am having similar problems. None of the old scripts to generate summons manually are working and the revisions log is so jumbled as to make telling exactly what has changed almost impossible.
My versions seem to work somewhat, at least the summoning versions sometimes obey orders... but sometimes not. Also summons tend to fight each other... and if those summons belong to a GM the entire server crashes in some kind of reputation system infinite loop.
Code:
[function summon_pet]
SRC.newnpc=<ARGS>
//SRC.ACT.EVENTS -e_npc_wars
SRC.ACT.TAG.NPCAI.RACE=
SRC.act.brain=0
SRC.act.tag.owner=<src.uid>
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
SRC.act.p=<src.p>
SRC.ACT.FIX
SRC.ACT.action=-1
[function f_MakeMyPet]
serv.newitem i_memory
new.color = memory_ipet
new.more1 = 04
new.more2 = <serv.time>
new.morep = <p>
new.link = <src.uid>
new.cont = <uid>
// <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>
Has anyone actually got any working summon scripts for current Sphere?
UPDATE
Got this working as well as any of my AI work... they still fail to attack often enough but I'm tracing that bug still.
Quote:[function summon_pet]
SRC.newnpc=<ARGS>
SRC.act.tag.owner=<src.uid>
SRC.act.p=<p.POS>
//examples of "neutralizing" npc if need be
//SRC.ACT.EVENTS -e_npc_wars
//SRC.ACT.TAG0.NPCAI.RACE=
//src.act.brain=11
VAR.SUID=<ACT.UID>
//make pet
SRC.act.newitem=i_memory
SRC.act.act.color = memory_ipet
SRC.act.act.more1 = 04
SRC.act.act.more2=<serv.time>
SRC.act.act.morep=<p>
SRC.act.act.cont=<VAR.SUID>
SRC.act.act.link=<SRC.uid>
SRC.act.act.timer=-1
//make summoned
SRC.ACT.Flags |StatF_Conjured
SRC.ACT.NEWITEM=i_rune_summon_creature
SRC.ACT.ACT.LAYER=layer_spell_summon
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=<eval <src.spiritspeak>/15>+{180 240}
SRC.ACT.ACT.ATTR=attr_decay
src.act.action=-1
SRC.ACT.FIX
RETURN
The "SRC.ACT.Flags |StatF_Conjured" line gives an error but it works, it's needed to make them actually summoned. This probably has odd or unnessicary lines but it makes them act like proper summons and doesn't result in weird reputation loops breaking the world.
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
03-18-2016 06:37 AM |
|
|
Khaos
Master
Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11
|
RE: Makemypet
(03-18-2016 06:37 AM)Anarch Cassius Wrote: I am having similar problems. None of the old scripts to generate summons manually are working and the revisions log is so jumbled as to make telling exactly what has changed almost impossible.
My versions seem to work somewhat, at least the summoning versions sometimes obey orders... but sometimes not. Also summons tend to fight each other... and if those summons belong to a GM the entire server crashes in some kind of reputation system infinite loop.
Code:
[function summon_pet]
SRC.newnpc=<ARGS>
//SRC.ACT.EVENTS -e_npc_wars
SRC.ACT.TAG.NPCAI.RACE=
SRC.act.brain=0
SRC.act.tag.owner=<src.uid>
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
SRC.act.p=<src.p>
SRC.ACT.FIX
SRC.ACT.action=-1
[function f_MakeMyPet]
serv.newitem i_memory
new.color = memory_ipet
new.more1 = 04
new.more2 = <serv.time>
new.morep = <p>
new.link = <src.uid>
new.cont = <uid>
// <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>
Has anyone actually got any working summon scripts for current Sphere?
UPDATE
Got this working as well as any of my AI work... they still fail to attack often enough but I'm tracing that bug still.
Quote:[function summon_pet]
SRC.newnpc=<ARGS>
SRC.act.tag.owner=<src.uid>
SRC.act.p=<p.POS>
//examples of "neutralizing" npc if need be
//SRC.ACT.EVENTS -e_npc_wars
//SRC.ACT.TAG0.NPCAI.RACE=
//src.act.brain=11
VAR.SUID=<ACT.UID>
//make pet
SRC.act.newitem=i_memory
SRC.act.act.color = memory_ipet
SRC.act.act.more1 = 04
SRC.act.act.more2=<serv.time>
SRC.act.act.morep=<p>
SRC.act.act.cont=<VAR.SUID>
SRC.act.act.link=<SRC.uid>
SRC.act.act.timer=-1
//make summoned
SRC.ACT.Flags |StatF_Conjured
SRC.ACT.NEWITEM=i_rune_summon_creature
SRC.ACT.ACT.LAYER=layer_spell_summon
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=<eval <src.spiritspeak>/15>+{180 240}
SRC.ACT.ACT.ATTR=attr_decay
src.act.action=-1
SRC.ACT.FIX
RETURN
The "SRC.ACT.Flags |StatF_Conjured" line gives an error but it works, it's needed to make them actually summoned. This probably has odd or unnessicary lines but it makes them act like proper summons and doesn't result in weird reputation loops breaking the world.
May I ask why you keep using act on the NewNpc?! It doesn't make a lot of sense.
Code:
Serv.NewNPC=<ArgS>
New.EVENTS -e_npc_wars
New.TAG.NPCAI.RACE=
New.brain=0// Player brain?! Why? Use defaults and use your AI over defaults
New.tag.owner=<src.uid>
Local.SUID=<New.UID>
New.Flags=00c000000
Serv.newitem=i_memory
New.COLOR=02
New.cont=<Local.SUID>
New.link=<SRC.uid>
New.more2=<SRC.uid>
New.timer=-1
Serv.NEWITEM=i_rune_summon_creature
//New.LAYER=41
New.TYPE=t_spell
New.MORE2=1
New.MOREP=40,816
New.CONT=<Local.SUID>
New.LINK=<SRC.UID>
New.TIMER=-1
New.ATTR=attr_decay
New.p=<src.p>
New.FIX
New.action=-1
Not sure what you were trying to do, but this removes all those silly ACT and those yucky global vars
|
|
03-20-2016 06:16 AM |
|
|
Anarch Cassius
Master
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
|
RE: Makemypet
Quote:May I ask why you keep using act on the NewNpc?! It doesn't make a lot of sense.
I don't have a good reason, but it technically works when done in that way.
The way you used NEW in the current version of your script isn't working...
I'm getting
Quote:13:31:ERROR:(System_Necromancy.scp,47)Undefined keyword 'Flags'
13:31:ERROR:(System_Necromancy.scp,52)Non container uid=0400035fb,id=041b6
The error is in this section.
Code:
New.Flags=00c000000
Local.SUID=<New.UID>
Serv.newitem=i_memory
New.COLOR=02
New.cont=<Local.SUID>
Not sure why... those lines SHOULD work from what I can tell. New Sphere is pickier about syntax but I can't see an error.
I do want to clean this up but Sphere is being really finicky about it in the current version. I also need to look up what those MORE values actually mean if anything
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
03-20-2016 06:35 AM |
|
|
Anarch Cassius
Master
Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2
|
RE: Makemypet
Quote:You have done this long enough to know how to fix your syntax. Not trying to sound mean, but we went over this years ago.
New Sphere is incredibly picky about syntax to the point I'm not sure what is a bug and what is a feature. If something doesn't work in New Sphere I can't necessarily count on the old rules to be helpful.
For example, I ran some more tests... the trouble is apparently NEW gets cleared very easily. The lines in question work when they immediately follow the NEWNPC command but a call to SRC.ACT in between was somehow making NEW fail. There's no good reason that should be; I didn't make any new items. That sort of thing makes me nervous and I start second guessing every bit of codes and sticking with bizarre syntaxes just because I know they work. I happen to like the versatility and multiple nature of ACT but this does really seem like a place for NEW: I just had no idea why it wasn't working, that isn't a syntax issue I've ever seen before.
Now a lot of the syntax fixes seem logical... I had some QVAL/EVAL nests that started giving a division by zero warning because they started looking more deeply in all cases as they probably should have been all along. Other ones leave me baffled though.
I'm catching up on several years of changes all at once and if I knew how the syntax was broken I wouldn't ask.
Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
|
|
03-25-2016 02:07 PM |
|
|
User(s) browsing this thread: 2 Guest(s)