Andragh'on
Apprentice
Posts: 14
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2017
Reputation: 0
|
Meditation
Greetings,
Any of you guys know why this original script below aint working as it should be?
I mean i get the sound that i start to meditate, exept my mana wont raise faster then normal.
I've set the most working skills like focus, magery, meditation and evel to Gm skill to be sure that aint the problem.
VERSION=0.56b
[SKILL 46]
DEFNAME=SKILL_MEDITATION
KEY=Meditation
TITLE=Stoic
DELAY=10.0,1.0
STAT_STR=10
STAT_INT=100
STAT_DEX=10
BONUS_STR=5
BONUS_DEX=90
BONUS_INT=5
BONUS_STATS=20
ADV_RATE=10.0,200.0,800.0
on=@wait
if <def.scp.NewSkills_Meditation> == 1
if <action> != -1
sysmessage <def.scp.meditation_activeskill>
f_skill_delay <getargv 3 <def.skill.46.waittime>>
elif <mana> >= <maxmana>
sysmessage <def.scp.meditation_maxmana>
f_skill_delay <getargv 2 <def.skill.46.waittime>>
elif <medi_armorpenalty>
sysmessage <def.scp.meditation_armorpenalty>
f_skill_delay <getargv 2 <def.skill.46.waittime>>
else
if <medi_weaponholding 1>
findlayer(1).bounce
elif <medi_weaponholding 2>
findlayer(2).bounce
endif
local.chance <eval (500 + ((<meditation> - ((<maxmana> - <mana>) * 10)) * 2))>
if <local.chance> > <r>
skillgain meditation <min 100,<eval (<meditation> / 10)>>
sysmessage <def.scp.meditation_success>
f_skill_delay <getargv 1 <def.skill.46.waittime>>
//f_AddBuff ActiveMeditation,-1 // Can't find the clilocs
addbuff <def.bufficon_activemeditation>,1075657,1075658,0,0
tag.meditation.active = 1
if <isplayer>
sfx 0f9
endif
EVENTS=+e_medi_active
f_PlayerCheckStats
TIMERF 2,trigger @meditationtick
else
sysmessage <def.scp.meditation_fail>
skillgain meditation <eval (<meditation> / 7) + 1>
f_skill_delay <getargv 2 <def.skill.46.waittime>>
endif
endif
return 1
endif
on=@select
f_skill_delay <getargv 0 <def.skill.46.waittime>>
ON=@START
addbuff <def.bufficon_activemeditation>,1075657,1075658,0,0
ON=@success
if <mana> >= <maxmana>
f_skill_delay <getargv 1 <def.skill.46.waittime>>
RemoveBuff <DEF.bufficon_activemeditation>
tag.meditation.active
endif
ON=@fail
f_skill_delay <getargv 2 <def.skill.46.waittime>>
SRC.SYSMESSAGE <def.scp.meditation_fail>
RemoveBuff <DEF.bufficon_activemeditation>
tag.meditation.active
on=@abort
f_skill_delay <getargv 2 <def.skill.46.waittime>>
src.sysmessage <def.scp.meditation_abort>
RemoveBuff <DEF.bufficon_activemeditation>
tag.meditation.active
[function f_medi_false]
EVENTS -e_medi_active
tag.meditation.active
RemoveBuff <DEF.bufficon_activemeditation>
f_PlayerCheckStats
[EVENTS e_medi_active]
ON=@meditationtick
if <mana> >= <maxmana>
sysmessage <def.scp.meditation_maxmana>
f_medi_false
else
skillgain meditation <eval (<meditation> / 7) + 1>
TIMERF 2,trigger @meditationtick
endif
ON=@skillwait
if (<argn>!=46)
sysmessage <def.scp.meditation_stop>
f_medi_false
endif
ON=@skillstart
sysmessage <def.scp.meditation_stop>
f_medi_false
ON=@itemEQUIP
if ((<ACT.layer> <= 24) && (<ACT.layer> >= 1))
sysmessage <def.scp.meditation_stop>
f_medi_false
endif
ON=@itemPICKUP_SELF
sysmessage <def.scp.meditation_stop>
f_medi_false
ON=@itemPICKUP_GROUND
sysmessage <def.scp.meditation_stop>
f_medi_false
ON=@UserStats
if <mana> >= <maxmana>
sysmessage <def.scp.meditation_maxmana>
f_medi_false
endif
[function medi_armorpenalty]
for 1 24
if <findlayer(<dlocal._for>).tag0.penalty.meditation> && !<findlayer(<dlocal._for>).tag0.magearmor>
return 1
endif
endfor
return 0
[function medi_weaponholding]
if <findlayer(<args>).uid> && (<findlayer(<args>).isweapon> || <findlayer(<args>).type> == t_shield) && !<findlayer(<args>).tag0.spellchanneling>
return 1
endif
return 0
[eof]
|
|
03-07-2017 10:30 PM |
|
|
Andragh'on
Apprentice
Posts: 14
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2017
Reputation: 0
|
RE: Meditation
Any way your able to help out what to put where?
tried it myself yesterday but i kept on failing
My intention is that %of meditation/10 is gain per second
So if you had like 56 meditation your gaining 5 mana per second
(This post was last modified: 03-08-2017 10:32 PM by Andragh'on.)
|
|
03-08-2017 10:31 PM |
|
|