Mimic Enemy Help - UltimaAku - 02-22-2013 09:30 AM
Howdy all i was hoping someone could help me out, im making an NPC which copies the look and name of it's opponent (sort of like a double) but i cant seem to get the horse copied. any help?
IF (<SRC.FINDLAYER(layer_light)> )
NEWITEM=<SRC.FINDLAYER(layer_light).ID>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_pack)> )
FINDLAYER(layer_pack).COLOR=<SRC.FINDLAYER(layer_pack).COLOR>
ENDIF
IF (<SRC.FINDLAYER(21)> ) <--------- PROBLEM STARTS HERE
FINDLAYER(21).COLOR=<SRC.FINDLAYER(21).COLOR>
RE: Mimic Enemy Help - RanXerox - 02-22-2013 09:54 AM
Code:
//author unknown
[CHARDEF c_dopple_ganger]
ID=c_man
NAME=Clone
CAN=MT_WALK|MT_RUN|MT_EQUIP|MT_USEHANDS
DESIRES=i_gold
CATEGORY=Monsters
SUBSECTION=Miscellaneous
DESCRIPTION=Doppleganger
ON=@Create
NPC=brain_human
STR=100
ON=@NPCSeeNewPlayer
FINDLAYER(layer_hand1).REMOVE
FINDLAYER(layer_hand2).REMOVE
FINDLAYER(layer_shoes).REMOVE
FINDLAYER(layer_pants).REMOVE
FINDLAYER(layer_shirt).REMOVE
FINDLAYER(layer_helm).REMOVE
FINDLAYER(layer_gloves).REMOVE
FINDLAYER(layer_ring).REMOVE
FINDLAYER(layer_light).REMOVE
FINDLAYER(layer_collar).REMOVE
FINDLAYER(layer_hair).REMOVE
FINDLAYER(layer_half_apron).REMOVE
FINDLAYER(layer_chest).REMOVE
FINDLAYER(layer_wrist).REMOVE
FINDLAYER(layer_beard).REMOVE
FINDLAYER(layer_tunic).REMOVE
FINDLAYER(layer_ears).REMOVE
FINDLAYER(layer_arms).REMOVE
FINDLAYER(layer_cape).REMOVE
FINDLAYER(layer_robe).REMOVE
FINDLAYER(layer_skirt).REMOVE
FINDLAYER(layer_legs).REMOVE
FINDLAYER(layer_light).REMOVE
IF (<SRC.FINDLAYER(layer_hand1)> )
NEWITEM=<SRC.FINDLAYER(layer_hand1).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_hand1).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_hand2)> )
NEWITEM=<SRC.FINDLAYER(layer_hand2).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_hand2).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_shoes)> )
NEWITEM=<SRC.FINDLAYER(layer_shoes).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_shoes).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_pants)> )
NEWITEM=<SRC.FINDLAYER(layer_pants).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_pants).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_shirt)> )
NEWITEM=<SRC.FINDLAYER(layer_shirt).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_shirt).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_helm)> )
NEWITEM=<SRC.FINDLAYER(layer_helm).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_helm).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_gloves)> )
NEWITEM=<SRC.FINDLAYER(layer_gloves).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_gloves).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_ring)> )
NEWITEM=<SRC.FINDLAYER(layer_ring).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_ring).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_collar)> )
NEWITEM=<SRC.FINDLAYER(layer_collar).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_collar).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_hair)> )
NEWITEM=<SRC.FINDLAYER(layer_hair).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_hair).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_half_apron)> )
NEWITEM=<SRC.FINDLAYER(layer_half_apron).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_half_apron).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_chest)> )
NEWITEM=<SRC.FINDLAYER(layer_chest).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_chest).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_wrist)> )
NEWITEM=<SRC.FINDLAYER(layer_wrist).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_wrist).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_beard)> )
NEWITEM=<SRC.FINDLAYER(layer_beard).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_beard).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_tunic)> )
NEWITEM=<SRC.FINDLAYER(layer_tunic).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_tunic).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_arms)> )
NEWITEM=<SRC.FINDLAYER(layer_arms).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_arms).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_cape)> )
NEWITEM=<SRC.FINDLAYER(layer_cape).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_cape).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_robe)> )
NEWITEM=<SRC.FINDLAYER(layer_robe).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_robe).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_skirt)> )
NEWITEM=<SRC.FINDLAYER(layer_skirt).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_skirt).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_legs)> )
NEWITEM=<SRC.FINDLAYER(layer_legs).ID>
ACT.COLOR=<SRC.FINDLAYER(layer_legs).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_light)> )
NEWITEM=<SRC.FINDLAYER(layer_light).ID>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
IF (<SRC.FINDLAYER(layer_pack)> )
FINDLAYER(layer_pack).COLOR=<SRC.FINDLAYER(layer_pack).COLOR>
ENDIF
STR=<SRC.OSTR>*2
DEX=<SRC.ODEX> + 50
INT=(<SRC.OINT>*2)
HITS=<SRC.MAXHITS>
STAMINA=<SRC.MAXSTAM>
MANA=<SRC.MAXMANA>
MACEFIGHTING=<SRC.MACEFIGHTING>
MAGERY=<SRC.MAGERY>
MAGICRESISTANCE=<SRC.MAGICRESISTANCE>
ARCHERY=<SRC.ARCHERY>
ANATOMY=<SRC.ANATOMY>
TACTICS=<SRC.TACTICS>
WRESTLING=<SRC.WRESTLING>
PARRYING=<SRC.PARRYING>
SWORDSMANSHIP=<SRC.SWORDSMANSHIP>
COLOR=<SRC.COLOR>
NAME=<SRC.NAME>
TITLE=the doppleganger
FAME=<SRC.FAME>
BODY=<SRC.BODY>
OBODY=<SRC.OBODY>
ON=@NPCRestock
ITEM={ random_gold_pile 1 0 2 }
ITEM=rich_undead_backpack
[EOF]
RE: Mimic Enemy Help - admin phoenix - 02-22-2013 07:37 PM
use for/endfor to check the layer
it will be a little bit smaller from the code 
and also serv.newitem (old code) *g*
RE: Mimic Enemy Help - UltimaAku - 02-22-2013 08:38 PM
RanXerox has the script very similar to mine, only in a different order, all of it was working apart from the mount, i wasnt sure on the layer.
Phoenix thanks for the advice, just for if anyone wants to know, the horse is Layer 25. ill add my edit now 
IF (<SRC.FINDLAYER(25)> ) ////Layer 25 is the horse
NEWITEM=<SRC.FINDLAYER(25).ID>
ACT.COLOR=<SRC.FINDLAYER(25).COLOR>
ACT.ATTR=attr_newbie
ACT.CONT=<UID>
ENDIF
Now here's the hard part. When the NPC dies, i want it to create the Llama or horse or orn that the player was on so it can be tamed. Don't even know where to start with this XD
RE: Mimic Enemy Help - admin phoenix - 02-22-2013 09:14 PM
I don“t know. maybe the id of the pet is stored in the memory item (layer 25), so you can do it like
maybe in more1?
ON=@DEATH
serv.newnpc=<findlayer(25).more1>
new.p=<p>
RE: Mimic Enemy Help - UltimaAku - 02-23-2013 12:06 AM
all done, i did a few extras ontop but you put me on the right line there phoenix, thanks ^^ +1 rep for you
|