admin phoenix
Master
Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3
|
Skill Camping
If you ignite the Kindling and step in a special Radius around the Kindling, you stats will be healing over the time.
Which stats will be healed are depended from your camping skill when you ignite the kindling.
[ITEMDEF 0de1]
NAME=Kindling
DEFNAME=i_kindling
TYPE=T_KINDLING
RESOURCES=1 i_log_normal
SKILLMAKE=BOWCRAFT 0.0
REPLICATE=1
WEIGHT=1
CATEGORY=Provisions - Miscellaneous
SUBSECTION=Campfires
DESCRIPTION=Kindling
DUPELIST=0de2
ON=@DClick
IF (<SRC.CAMPING> > 50.0)
IF (<distance> > 1)
src.smsg You are too far away from <name>!
ELSEIF !(<canseelos>)
src.smsg You can not see <name>!
ELSEIF ( <topobj.uid> == <src.uid> )
src.smsg You can not ignite the fire in your backpack!
ELSEIF (<amount> > 1)
src.smsg You want to ignite a major fire?
ELSEIF (<SRC.CAMPING> > 90.0)
f_ignit_fire 1
ELSEIF (<SRC.CAMPING> > 80.0)
f_ignit_fire 2
ELSEIF (<SRC.CAMPING> > 70.0)
f_ignit_fire 3
ENDIF
RETURN 1
ENDIF
[FUNCTION f_ignit_fire]
src.smsg @0,3 You ignite a camp fire.
serv.newitem=i_campfire
new.more1=<eval <SRC.CAMPING>/10>)
new.tag.camping_level=<dargs>
new.timer=3
new.p=<p>
remove
[ITEMDEF 0de2] //kindling
DUPEITEM=0de1
[ITEMDEF 0de3] //campfire
DEFNAME=i_campfire
TYPE=T_CAMPFIRE
RESOURCES=i_kindling
CATEGORY=Provisions - Miscellaneous
SUBSECTION=Campfires
DESCRIPTION=Campfire
DUPELIST=0de4,0de5,0de6,0de7,0de8
ON=@CREATE
MORE1=12
ON=@PICKUP_GROUND
IF !(<src.isgm>)
MOVABLE=0
SRC.RESEND
return 1
ENDIF
ON=@STEP
IF !(<src.isgm>)
IF (<src.isplayer>)
src.smsg @0,3 You burn your feet.
src.damage=<eval {5 10}>
ENDIF
ENDIF
RETURN 1
ON=@TIMER
IF (<dmore1> > 1)
local.camping_level=<tag.camping_level>
FORCHARS 3
IF !(<findid.i_memory_campheal>) && !(0<hasfullstats>)
serv.newitem i_memory_campheal
new.tag.camping_level=<dlocal.camping_level>
new.tag.koordinaten_x=<p.x>
new.tag.koordinaten_y=<p.y>
new.tag.koordinaten_z=<p.z>
new.timer=1 new.cont=<uid>
ENDIF
ENDFOR
TIMER=1
MORE1 -= 1
ELSE serv.newitem i_ember
new.p=<p>
new.attr=02
new.timer=60
FORCHARS 3 I
F (<findid.i_memory_campheal>)
findid.i_memory_campheal.remove
ENDIF
ENDFOR
REMOVE
ENDIF
RETURN 1
[ITEMDEF 0de4] //campfire DUPEITEM=0de3
[ITEMDEF 0de5] //campfire DUPEITEM=0de3
[ITEMDEF 0de6] //campfire DUPEITEM=0de3
[ITEMDEF 0de7] //campfire DUPEITEM=0de3
[ITEMDEF 0de8] //campfire DUPEITEM=0de3
[ITEMDEF i_memory_campheal]
ID=i_memory
TYPE=t_eq_script
NAME=Campheal
LAYER=90
ON=@TIMER
IF (<dtag.koordinaten_x> > <cont.p.x>+3) || (<dtag.koordinaten_x> < <cont.p.x>+-3)
cont.smsg You leave the healing heat.
remove
ELSEIF (<dtag.koordinaten_y> > <cont.p.y>+3) || (<dtag.koordinaten_y> < <cont.p.y>+-3)
cont.smsg You leave the healing heat.
remove
ELSEIF (<dtag.koordinaten_z> > <cont.p.z>+3) || (<dtag.koordinaten_z> < <cont.p.z>+-3)
cont.smsg You leave the healing heat.
remove
ELSEIF (0<cont.hasfullstats>)
remove
ELSEIF (<dtag0.camping_level> == 1) // heal all stats
cont.hits += 1
cont.stamina += 1
cont.mana += 1
cont.f_check_stats
cont.f_check_maxstats
timer = 1
ELSEIF (<dtag0.camping_level> == 2) // heal 2 stats
cont.hits += 1
cont.stamina += 1
cont.f_check_stats
cont.f_check_maxstats
timer = 1
ELSEIF (<dtag0.camping_level> == 3) // heal 1 stats
cont.hits += 1
cont.f_check_stats
cont.f_check_maxstats
timer = 1
ENDIF
RETURN 1
[FUNCTION hasfullstats]
IF (<hits> >= <str>) && (<stamina> >= <dex>) && (<mana> >= <int>)
RETURN 1
ENDIF
[FUNCTION f_check_stats]
IF (<hits> > <ostr>)
hits=<ostr>
ENDIF
IF (<mana> > <oint>)
mana=<oint>
ENDIF
IF (<stamina> > <odex>)
stamina=<odex>
ENDIF
[FUNCTION f_check_maxstats]
IF (<maxhits> < <ostr>)
hits=<maxhits>
ENDIF
IF (<maxmana> < <oint>)
mana=<maxmana>
ENDIF
IF (<maxstam> < <odex>)
stam=<maxstam>
ENDIF
[EOF]
|
|
08-12-2014 07:49 PM |
|
The following 4 users Like admin phoenix's post:4 users Like admin phoenix's post
(06-19-2015), Berkley (11-19-2015), darksun84 (08-12-2014), horadryn (08-12-2014)
|