Скрипт выложен
Glotka в разделе "скрипты 54-55".
Скрипт event's засовываете куда угодно.
Код:
Код
[events e_taming]
on=@skillstart
if (<src.action>==35)||(<src.action>==skill_taming)
//Src.Sysmessage Start Taming
src.tag.tametarg=<src.act.uid>
//test for able to tame
if ( <src.act.distance> > 7 ) // check for distance to fishing point
src.consume 100 i_mem_tamingcounter_fail
src.consume 100 i_mem_tamingcounter_success
Src.Sysmessage Ближе
src.action = -1
return 1
elseif ( <src.act.brain>!=brain_monster )&&(<src.act.brain>!=brain_animal)&&(<src.act.brain>!=brain_dragon)
Src.Sysmessage ~Ты не можешь приручить это.
src.action = -1
return 1
elseif ( <src.act.taming>==0 )
Src.Sysmessage ~Это не может быть приручено.
src.action = -1
return 1
elseif ( !<src.act.canseelos> )
Src.Sysmessage Где оно?
consume 100 i_mem_tamingcounter_fail
consume 100 i_mem_tamingcounter_success
src.action = -1
return 1
elseif ( (<src.act.flags> & statf_war) && (<src.act.uid> != <src.uid> ) )
//remove taming while animal is attacking
Src.Sysmessage ~Ты в режиме войны, выйди из него.
consume 100 i_mem_tamingcounter_fail
consume 100 i_mem_tamingcounter_success
src.action = -1
return 1
endif
// can't tame those with higher taming skill with taming > 1000
//if <src.act.taming>>1000
if ( <src.act.taming> > <taming> ) && (<taming>!=1100)
Src.Sysmessage ~Твой навык приручения животины слишком мал.
src.action = -1
return 1
endif
//endif
//test for taming delay
if (<src.restest 1 i_mem_tamingcounter_fail>)||(<src.restest 1 i_mem_tamingcounter_success>)
Src.Sysmessage ~Ты еще не закончил приручать.
src.consume 100 i_mem_tamingcounter_fail
src.consume 100 i_mem_tamingcounter_success
src.action = -1
return 1
endif
if ( <src.act.flags> & statf_pet ) // faster via flag
Src.Sysmessage ~Эта живность не хочет уходить от своего хозяина.
src.consume 100 i_mem_tamingcounter_fail
src.consume 100 i_mem_tamingcounter_success
src.action = -1
return 1
endif
//if ( <src.act.memoryfind.<src.uid>.color> & 040 )
// if ( <src.act.memoryfind.<src.uid>.more1l> == 4 )
// Src.Sysmessage The Creature Remembers You
// f_tame_success
// return 1
// endif
// spoke, but didn't tame
//endif
src.tag.tamesuccess=0
//skillgain section, pet must not be previously tamed as well
if (<src.taming><1100)
if (<src.act.region.flags>&02000)||(<src.act.memoryfindtype.042.color>==042)
//no skillgain
else
Src.Sysmessage Ты начал приручать <src.Act.Name>
//start of skillgain
if (<src.taming> < 200)
if (<eval (rand(5))>==0)
src.tag.tamesuccess=1
endif
elseif (<src.taming> < 400)
if (<eval (rand(7))>==0)
if (<src.act.str>>20)
src.tag.tamesuccess=1
endif
endif
elseif (<src.taming> < 600)
if (<eval (rand(10))>==0)
if (<src.act.str>>40)
src.tag.tamesuccess=1
endif
endif
elseif (<src.taming> < 800)
if (<eval (rand(12))>==0)
if (<src.act.str>>70)
src.tag.tamesuccess=1
endif
endif
elseif (<src.taming> < 1000)
if (<eval (rand(15))>==0)
if (<src.act.str>>80)
src.tag.tamesuccess=1
endif
endif
elseif (<src.taming> < 1100)
if (<eval (rand(18))>==0)
if (<src.act.str>>200)
src.tag.tamesuccess=1
endif
endif
endif
//end of skillgain
endif
//end of region test
endif
//end of memory test
//end of skilgain section
//custom taming: test for whether animal becomes tamed
//rates for success
if (<src.taming><=1000) && (<src.act.taming><=1000)
//Src.Sysmessage Src Less Than Gm And Target Less Than Gm
if <src.taming><100
if <eval rand(30)>==0
f_taming_success
return 1
endif
elseif <src.taming><200
if <eval rand(20)>==0
f_taming_success
return 1
endif
elseif <src.taming><300
if <eval rand(12)>==0
f_taming_success
return 1
endif
elseif <src.taming><400
if <eval rand(11)>==0
f_taming_success
return 1
endif
elseif <src.taming><500
if <eval rand(10)>==0
f_taming_success
return 1
endif
elseif <src.taming><600
if <eval rand(9)>==0
f_taming_success
return 1
endif
elseif <src.taming><700
if <eval rand(8)>==0
f_taming_success
return 1
endif
elseif <src.taming><800
if <eval rand(7)>==0
f_taming_success
return 1
endif
elseif <src.taming><900
if <eval rand(6)>==0
f_taming_success
return 1
endif
else
if <eval rand(5)>==0
f_taming_success
return 1
endif
endif
else
//src greater than gm
//close of taming less than gm
//taming for creatures > gm taming: eg: dragons/zos/orns
if <src.act.taming>>1500
if <eval rand(<src.act.taming>/4)>==0
f_taming_success
return 1
endif
else
if <eval rand(5)>==0
f_taming_success
return 1
endif
endif
endif
f_taming_failure
return 1
endif
[function f_taming_failure]
src.newitem i_mem_tamingcounter_fail
src.act.equip
src.act.link=<src.tag.tametarg>
src.act.timer 1
return 0
[function f_taming_success]
src.newitem i_mem_tamingcounter_success
src.act.equip
src.act.link=<src.tag.tametarg>
src.act.timer 1
return 0
[itemdef i_mem_tamingcounter_success]
id=i_memory
NAME=Taming Delay
type=t_eq_script
layer=30
on=@create
attr=08
morex=4
on=@timer
if <morex>!=0
dorand 4
Cont.Say ~Я не трону тебя.
Cont.Say ~Мне никак без тебя <link.Name> .
Cont.Say ~Место <link.Name>
Cont.Say ~Хороший <link.Name>
enddo
timer 2
morex=<morex> +-1
return 1
else
cont.newitem=i_memory//add ownership
cont.act.color=042
cont.act.link=<cont.uid>
cont.act.cont <link.uid>
link.karma=0
link.flags=<link.flags>|statf_pet
link.flags=<link.flags>&~statf_war
link.findlayer(21).remove //remove pack
//link.events +e_pet
Cont.Sysmessage <link.Name> Приручилась
if <cont.tag.tamesuccess>==1
cont.taming=<cont.taming> +1
if <cont.taming>==1000
cont.try consume=uni_level_0_taminggain<name>_<mapplane>_<link.name>_<link.uid>_<cont.name>_<cont.uid>_<serv.rtimetext>
endif
cont.tag.tamesuccess=0
endif
remove
return 0
endif
return 1
CATEGORY=!Tds Script Items
SUBSECTION=Taming
DESCRIPTION=Taming Delay Success
[itemdef i_mem_tamingcounter_fail]
id=i_memory
NAME=Taming Delay
type=t_eq_script
layer=30
on=@create
attr=08
morex=4
on=@timer
if <morex>!=0
dorand 4
Cont.Say ~Я не трону тебя.
Cont.Say ~Мне никак без тебя <link.Name> .
Cont.Say ~Место <link.Name>
Cont.Say ~Хороший <link.Name>
enddo
timer 2
morex=<morex> +-1
return 1
else
if <cont.tag.tamesuccess>==1
cont.taming=<cont.taming> +1
if <cont.taming>==1000
cont.try consume=uni_level_0_taminggain<name>_<mapplane>_<link.name>_<link.uid>_<cont.name>_<cont.uid>_<serv.rtimetext>
endif
cont.tag.tamesuccess=0
endif
cont.sysmessage Приручение не удалось.
cont.action = -1
remove
return 0
endif
return 1
CATEGORY=!Tds Script Items
SUBSECTION=Taming
DESCRIPTION=Taming Delay Fail
А вот это в
spheretables.scp:
Код:
Код
on=@login
EVENTS -e_taming
EVENTS +e_taming