Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Animal Taming Old Style.
|
Author |
Message |
amonvangrell
Banned
Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012
britannia shard
|
Animal Taming Old Style.
Hello everyone! Am posting this because someone may need this one day.
This script overwrite the Animal Taming skill that now its an osi style to an old model of the skill.
With this script, the skill will no use any osi ~animal remembers you~
also you will need to have an item ~tame harp~ to be able to tame any animal.
The skill is set to easy, wich means will gain skill every time it succeed or fail.
You will need to add this to your animal trainer so they will sell the tame harp:
Code:
[TEMPLATE VENDOR_S_TRAINER]
CATEGORY=Vendor Templates
SUBSECTION=Sell Templates
DESCRIPTION=Animal Trainer
SELL=tame_harp, {10}
and this is the current script:
Code:
[DEFNAME def_Taming]
Taming_Delay = 1//guarda tempo numa variavel
///////////////////////////////////////////////////////
[EVENTS e_taming]
ON=@LogOut //se o char der logout
IF (<FINDID.i_taming>)//se encontrar tag
FINDID.i_taming.REMOVE// remove a tag
ENDIF
ON=@SkillStart //qndo comecar uma skill
IF (<src.ACTION>==SKILL_Taming)// se for skill taming
if !(<SRC.RESTEST 1 tame_harp> ) //se nao tiver harpa
SRC.SYSMESSAGE @0790 Voce precisa de uma Tame Harp para domesticar animais.
RETURN 1 // para msg
ENDIF
else
return 0// se nao for taming nao faz nada.
endif
IF (<FINDID.i_taming>)// se encontrar tag taming
action -1 // para acao
SYSMESSAGE You must wait to perform another action // espera
return 1
ELSE
Taming_TAME // funcao taming
RETURN 1
ENDIF
IF !(<fixaction_is_combat>)//se n estiver no combat
IF (<FINDID.i_taming.TIMER> == -1)//se o tempo da tag for infinito
FINDID.i_taming.REMOVE// remove tag
ENDIF
ENDIF
[FUNCTION Taming_TAME]// funcao taming
IF !(<ACT.CanSeeLOS>)// se nao puder ver o animal
MESSAGE I can not attempt to tame what I can not see.
ELIF (<ACT.NPC> != brain_animal) && (<ACT.NPC> != brain_dragon) && (<ACT.NPC> != brain_monster) && (<ACT.NPC> != brain_undead)
MESSAGE I can not tame this.
ELIF !(<ACT.TAMING>)
MESSAGE I can not tame this.
ELIF (<EVAL <TAMING> + 30.0> < <ACT.TAMING>)
MESSAGE I could not begin to tame this!
ELIF (<FLAGS> & (statf_dead|statf_freeze|statf_invisible|statf_sleeping|statf_polymorph|statf_stone|statf_hidden))
MESSAGE I can not tame this in my current state.
ELIF (<ACT.MEMORYFINDTYPE.memory_ipet>)
MESSAGE That is already tame.
ELIF (<ACT.MEMORYFINDTYPE.memory_fight>)
MESSAGE The creature is too enraged.
ELIF (<ACT.DISTANCE> > 5)
MESSAGE I am too far away to tame that.
ELSE
NEWITEM i_taming
ACT.LINK <TARG.UID>
ACT.CONT <UID>
ACT.TIMER <EVAL Taming_Delay>
ENDIF
[ITEMDEF i_taming]
ID=i_memory
TYPE=t_eq_script
NAME=Taming
ON=@Create
ATTR attr_decay
MORE1 {3 7}
ON=@Timer
IF (<CONT.ISGM>) && !(<LINK.MEMORYFINDTYPE.memory_ipet>)
Taming_SUCCESS
RETURN 0
ENDIF
CONT.CHECKS <LINK.UID>
IF !(<VAR.SEE>)
CONT.SYSMESSAGE I can no longer see my target.
ELIF (<LINK.NPC> != brain_animal) && (<LINK.NPC> != brain_dragon) && (<LINK.NPC> != brain_monster) && (<LINK.NPC> != brain_undead)
CONT.SYSMESSAGE I can not tame this.
ELIF !(<LINK.TAMING>)
CONT.SYSMESSAGE I can not tame this.
ELIF (<EVAL <CONT.TAMING> + 30.0> < <LINK.TAMING>)
CONT.SYSMESSAGE I could not begin to tame this!
ELIF (<CONT.FLAGS> &(statf_dead|statf_freeze|statf_invisible|statf_sleeping|statf_polymorph|statf_stone|statf_hidden))
CONT.SYSMESSAGE I can not continue taming in my current state.
ELIF (<LINK.MEMORYFINDTYPE.memory_ipet>)
CONT.SYSMESSAGE !! Someone tamed it before I could!
ELIF (<LINK.MEMORYFINDTYPE.memory_fight>)
CONT.SYSMESSAGE The creature is too enraged.
ELIF (<VAR.DIST> > 5)
CONT.SYSMESSAGE The <LINK.NAME> is too far away.
ELSE
IF (<MORE1>)
cont.sound 045
DORAND 4
CONT.SAY Good <LINK.NAME>
CONT.SAY I won't hurt you.
CONT.SAY Here <LINK.NAME>
CONT.SAY I always wanted a <LINK.NAME> like you
//CONT.SAY Bom <LINK.NAME>
//CONT.SAY Nao vou te machucar.
//CONT.SAY Aqui <LINK.NAME>
//CONT.SAY Eu sempre quis um <LINK.NAME> como voce.
ENDDO
MORE1 <EVAL <MORE1> - 1>
TIMER {<EVAL Taming_Delay> <EVAL <EVAL Taming_Delay> + 2>}
RETURN 1
ELSE
IF (<EVAL <LINK.TAMING> - <CONT.TAMING>> <= 0)
IF (RAND(<EVAL ((<CONT.TAMING> - <LINK.TAMING>) / 20) + 3>))
Taming_SUCCESS
ELSE
Taming_FAILURE
ENDIF
ELIF !(RAND(<EVAL ((<LINK.TAMING> - <CONT.TAMING>) / 20) + 3>))
Taming_SUCCESS
ELSE
Taming_FAILURE
ENDIF
ENDIF
ENDIF
endif
[FUNCTION checks]
NEWITEM i_checks
ACT.LINK <ARGN>
EQUIP <ACT.UID>
[ITEMDEF i_checks]
ID=i_memory
TYPE=t_eq_script
NAME=Checks
ON=@Equip
VAR.DIST <LINK.DISTANCE>
VAR.SEE <LINK.CanSeeLOS>
REMOVE
[FUNCTION Taming_SUCCESS]
CONT.NEWITEM i_memory
CONT.ACT.ATTR attr_newbie
CONT.ACT.COLOR memory_ipet
CONT.ACT.MORE1 04
CONT.ACT.LINK <CONT.UID>
CONT.ACT.MORE2 <SERV.TIME>
CONT.ACT.MOREP <LINK.P>
CONT.ACT.CONT <LINK.UID>
LINK.FOOD 50
LINK.KARMA 2000
CONT.SYSMESSAGE It seems to accept you as its master.
CONT.Taming_SKILLGAIN 10
if (<cont.taming> >= 1000)
return 0
else
cont.Taming= <cont.Taming> +1>
cont.animallore= <cont.animallore> +1>
[FUNCTION Taming_FAILURE]
CONT.SYSMESSAGE You fail to tame the creature.
CONT.Taming_SKILLGAIN 5
if (<cont.taming> >= 1000)
return 0
else
cont.Taming= <cont.Taming> +1>
[FUNCTION Taming_SKILLGAIN]
IF (<Taming> < 1000)
TAG.Taming_Fudge <EVAL 0<TAG.Taming_Fudge> + <ARGN>>
IF (<TAG.Taming_Fudge> > <TAMING>)
TAG.Taming_Fudge
src.Taming= <src.taming> +1
ENDIF
ENDIF
[FUNCTION fixaction_is_combat]
IF (<FIXACTION> == Skill_Archery)
RETURN 1
ELIF (<FIXACTION> == Skill_Fencing)
RETURN 1
ELIF (<FIXACTION> == Skill_Macefighting)
RETURN 1
ELIF (<FIXACTION> == Skill_Parrying)
RETURN 1
ELIF (<FIXACTION> == Skill_Swordsmanship)
RETURN 1
ELIF (<FIXACTION> == Skill_Wrestling)
RETURN 1
else
RETURN 0
endif
[itemdef tame_harp]
id=0eb2
DEFNAME=tame_harp
name=Tame Harp
TYPE=T_MUSICAL
TDATA1=045
TDATA2=046
WEIGHT=10
value=299
CATEGORY=Items by Professions
SUBSECTION=Bard
DESCRIPTION=Tame Harp
RESOURCES=7 i_log, 2 i_wire_iron
SKILLMAKE=TINKERING 100.0, MUSICIANSHIP 80.0,t_tinker_tools
on=@create
color=0480
[eof]
Hope this will help you!
Cya!
(This post was last modified: 04-01-2013 09:24 AM by amonvangrell.)
|
|
04-01-2013 09:23 AM |
|
The following 1 user Likes amonvangrell's post:1 user Likes amonvangrell's post
jexnico (09-13-2018)
|
User(s) browsing this thread: 1 Guest(s)