|
İçerde : 1 misafir, 0 üye : ---
|
on=@itemunequiptest => memoryyi kaybetmeden hemen önce çalışması lazım
if (<baseid> == i_memory)
if (<type> == memory_wartarg) => emin değilim wartarg dan ona defs.scp den bakarsın.
src.goto xx
endif
endif
on=@itemequip
if (<type> == memory_wartarg)
tag.p <p>
endif
on=@itemunequiptest
if (<baseid> == i_memory)
if (<type> == memory_wartarg) => emin değilim wartarg dan ona defs.scp den bakarsın.
src.goto <src.tag.p>
serv.newitem i_floor_marble
new.p <src.tag.p>
new.attr 090
new.tag.check <src.tag.check>
new.type t_check
endif
endif
[typedef t_check]
on=@step
src.goto <tag.check>
remove
if (<baseid> =(buraya NPC nin ID'sini giriyorum)= i_memory)
if (<type> =(burayı hiç anlamadım :))= memory_wartarg)
on=@itemunequiptest
if (<baseid> == i_memory)
if (<type> == memory_war_targ)
src.goto 2330,2201
endif
endif
//Npcnin create kismina
on = @create
timerf 1,f_yon eklersin bu mantık sildirip tekrar verdirebilrisin istediğin yöne gider.
[function f_yon]
serv.newitem i_control
new.equip
new.link <src>
new.timerd 2
new.update
[itemdef i_Control]
id = i_memory
name = control
type = t_eq_script
layer = layer_special
on = @create
attr attr_newbie | attr_decay
on = @timer
link.move n /// west,noth,east,south gibi verebilrsin.
timerd <R2,15>
RETURN 1
Soydan1903 :
Peki teşekkür ederim. bu bilgilerle ben bir deneme yapayım. Eksiklikler hatalar olursa buradan tekrar paylaşayım...
Şimdi NPC'lerden birinin scriptinin altına;
Kod:on=@itemunequiptest
if (<baseid> == i_memory)
if (<type> == memory_war_targ)
src.goto 2330,2201
endif
endif
Bunu ekledim. Fakat NPC'yi spawn ettiğimde herhangi birşey olmyor...
[itemdef i_memory_stuck]
id i_memory
name Stuck Memory
type t_eq_script
on=@equip
timer 3
on=@timer
if !(<tag.p>)
tag.p <cont.p>
return 1
endif
if (<tag.p> == <cont.p>)
cont.ifstucked
endif
[function ifstucked]
if !<canmove <dir>>
if (<dir> < 7)
dir +=1
else
dir 0
endif
return 1
endif
move <dir>
on=@create
goto <checkpoint psi>
ON=@Create
goto 2328,2223
COLOR=0470
STR={80 100}
DEX={81 95}
INT={50 60}
MAGICRESISTANCE={35.0 45.0}
TACTICS={70.0 90.0}
WRESTLING={40.0 55.0}
MACEFIGHTING={70.0 90.0}
NPC=BRAIN_HUMAN
KARMA={-3000 -4000}
FAME={2500 4000}
ITEMNEWBIE=i_hair_long
COLOR=005e5
on=@itemequip
if (<type> == memory_war_targ)
tag.p <p>
endif
on=@itemunequiptest
if (<baseid> == i_memory)
if (<type> == memory_war_targ)
src.goto <src.tag.p>
serv.newitem i_floor_marble
new.p <src.tag.p>
new.attr 090
new.tag.check <src.tag.check>
new.type t_check
endif
endif
[typedef t_check]
on=@step
src.goto 2328,2223
remove
on=@npcseenewplayer
if xx
attack <act.uid>
endif
[FUNCTION CheckLineOfSight]
IF <ARGV[0]>
REF1=<SERV.UID.<ARGV[0]>>
ENDIF
IF (<CANSEELOS <REF1.P.X>,<REF1.P.Y>,<REF1.P.Z>,<REF1.P.M>>)
RETURN 0
ELSE
RETURN 1
ENDIF
[EVENTS e_NPCBrains]
ON=@NPCSeeNewPlayer
TAG.LastLookedAt=<SRC.UID>
IF <CheckLineOfSight <SRC.UID>>
SAY I see <SRC.UID> and im gonna kill him
ATTACK
RETURN 0
ELSE
SAY I sense someone but i cannot see them
GO <HOME> // Go Home or Pathfind ????
RETURN 1
ENDIF
|