The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Taming help
Author Message
Van Glan Bloom
Journeyman
*

Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0



Post: #4
RE: Taming help
I go paste all my script in the forum, this is script is very old and work good in all the version of sphere exept in 0.56d. Pls try help me i cant find de error.

The scripts dont add the event e_pet_food

Code:
ON=@START
if (<src.taming><<src.act.taming>)
    src.sysmessage @09c1 You are not skilled anough to tame this creature.
return 1
elseif (<src.action>==30)||(<src.action>==skill_taming)
    src.tag.tametarg=<src.act.uid>
elseif ( <src.act.distance> > 5 ) // check for distance to fishing point
        src.consume 100 i_mem_tamingcounter_fail
        src.consume 100 i_mem_tamingcounter_success
    src.sysmessage  @09c1 I am too for away to tame that.
    src.action = -1
return 1
elseif ( <src.act.brain>!=brain_monster )&&(<src.act.brain>!=brain_animal)
    src.sysmessage @09c1 You cannot tame that!
    src.action = -1
return 1
elseif ( !<src.act.canseelos> )
        consume 100 i_mem_tamingcounter_fail
        consume 100 i_mem_tamingcounter_success
    src.sysmessage @09c1 I can not attempt to tame what I can not see.
    src.action = -1
return 1
elseif ( (<src.act.flags> & statf_war) && (<src.act.uid> != <src.uid> ) )
//remove taming while animal is attacking
        consume 100 i_mem_tamingcounter_fail
        consume 100 i_mem_tamingcounter_success
    src.sysmessage @09c1 You can't do that while they're fighting!
    src.action = -1
return 1
elseif (<flags> & (statf_dead|statf_freeze|statf_invisible|statf_sleeping|statf_polymorph|statf_st​one|statf_hidden))
        consume 100 i_mem_tamingcounter_fail
        consume 100 i_mem_tamingcounter_success
    src.sysmessage @09c1 I can not tame this in my current state.
    src.action = -1
return 1
endif
// can't tame those with higher taming skill with taming > 1500
if <src.act.taming>>1500
    if ( <src.act.taming> > <taming> )
        src.sysmessage @09c1 They are too wild for you to tame them.
        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.consume 100 i_mem_tamingcounter_fail
        src.consume 100 i_mem_tamingcounter_success
    src.sysmessage @09c1 You have to wait before taming again.
    src.action = -1
return 1
endif
if ( <src.act.flags> & statf_pet ) // faster via flag
        src.consume 100 i_mem_tamingcounter_fail
        src.consume 100 i_mem_tamingcounter_success
    src.sysmessage @09c1 That is already tame!
    src.action = -1
return 1
endif
if ( <src.act.memoryfind.<src.uid>.color> & 040 )
    if ( <src.act.memoryfind.<src.uid>.more1l> == 4 )
        src.sysmessage @09c1 The creature remembers you and accepts you once more as it's master!
    f_tame_success
return 1
endif
endif
src.tag.tamesuccess=0
//skillgain section, pet must not be previously tamed as well
if <src.taming><1000
if (<src.act.region.flags>&02000)||(<src.act.memoryfindtype.042.color>==042)
//no skillgain
else
src.sysmessage @09c1 You attempt to tame <src.act.name>
//start of skillgain
if (<src.taming> < 300)
if (<eval (rand(5))>==0)
src.tag.tamesuccess=1
endif
if (<src.taming> < 500)
if (<eval (rand(15))>==0)
src.tag.tamesuccess=1
endif
elseif (<src.taming> < 800)
if (<eval (rand(30))>==0)
src.tag.tamesuccess=1
endif
elseif (<src.taming> < 1000)
if (<eval (rand(50))>==0)
src.tag.tamesuccess=1
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(1)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 200)
if (<eval rand(5)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 300)
if (<eval rand(10)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 400)
if (<eval rand(15)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 500)
if (<eval rand(50)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 600)
if (<eval rand(60)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 700)
if (<eval rand(70)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 800)
if (<eval rand(80)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 900)
if (<eval rand(90)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 1000)
if (<eval rand(100)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 1100)
if (<eval rand(40)> == 0)
f_taming_success
return 1
endif
elseif (<src.taming> < 1200)
if (<eval rand(20)> == 0)
f_taming_success
return 1
endif
else
if (<eval rand(1)> == 0)
f_taming_success
return 1
endif
endif
else
if (<src.act.taming> > 1300)
if (<eval rand(<src.act.taming>/5)> == 0)
f_taming_success
return 1
endif
else
if (<eval rand(1)> == 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 I wont hurt you.
Cont.Say I always wanted a <link.name> like you.
Cont.Say Here <link.Name>
Cont.Say Good <link.Name>
enddo
timer 2
morex=<morex> +-1
return 1
else
dorand 4
Cont.sysmessage @09c1 It seems to accept you as master.
Cont.sysmessage @09c1 It seems to accept you as master.
Cont.sysmessage @09c1 It seems to accept you as master.
Cont.sysmessage @09c1 It seems to accept you as master.
enddo
cont.newitem=i_memory//add ownership
cont.act.color=042
cont.act.link=<cont.uid>
cont.act.cont <link.uid>
//cont.events e_pet_food
//cont.food 15
//cont.update
//link.events +e_pet_food
//link.food=15
link.flags=<link.flags>|statf_pet
link.flags=<link.flags>&~statf_war
link.findlayer(21).remove //remove pack
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>
src.sysmessage @09c1 Thou hast tamed <link.name>.
endif
cont.tag.tamesuccess=0
endif
remove
return 0
endif
return 1

[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 I wont hurt you.
Cont.Say I always wanted a <link.name> like you.
Cont.Say Here <link.Name>
Cont.Say Good <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
dorand 4
Cont.sysmessage @09c1 You fail to tame the creature.
Cont.sysmessage @09c1 You fail to tame the creature.
Cont.sysmessage @09c1 You fail to tame the creature.
Cont.sysmessage @09c1 You fail to tame the creature.
enddo
cont.action = -1
remove
return 0
endif
return 1
06-15-2017 08:13 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Taming help - Van Glan Bloom - 04-06-2017, 07:34 AM
RE: Taming help - Van Glan Bloom - 04-11-2017, 10:54 PM
RE: Taming help - escribano - 04-12-2017, 04:21 AM
RE: Taming help - Van Glan Bloom - 06-15-2017 08:13 AM
RE: Taming help - rastrero - 06-22-2017, 01:17 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)