이해도 | 입문자 |
---|---|
게임버전 (JE) | 1.12.2 |
게임버전 (BE) | 1.12.x |
variables:
{%player%;힘} = 0
{%player%;모험} = 0
{%player%;민첩} = 0
{%player%;포인트} = 10
command /스텟 [<text>] [<player>] [<int>]:
trigger:
if arg 1 is not set:
open chest with 3 rows named "[스텟]" to player
set slot 4 of current inventory of player to player head named "&b&l[ &c&l스텟 &b&l] &7[스텟]" with lore "&b&l[ &c&l스텟 &b&l] &7힘: %{%player%;힘}%" and "&b&l[ &c&l스텟 &b&l] &7모험: %{%player%;모험}%" and "&b&l[ &c&l스텟 &b&l] &7민첩: %{%player%;민첩}%" and "&b&l[ &c&l스텟 &b&l] &7스텟 포인트: %{%player%;포인트}%"
set slot 10 of current inventory of player to iron sword named "&b&l[ &c&l스텟 &b&l] &7[힘]" with lore "&b&l[ &c&l스텟 &b&l] &7힘: %{%player%;힘}%"
set slot 13 of current inventory of player to apple named "&b&l[ &c&l스텟 &b&l] &7[모험]" with lore "&b&l[ &c&l스텟 &b&l] &7모험: %{%player%;모험}%"
set slot 16 of current inventory of player to feather named "&b&l[ &c&l스텟 &b&l] &7[민첩]" with lore "&b&l[ &c&l스텟 &b&l] &7민첩: %{%player%;민첩}%"
if arg 1 is "추가":
if player is op:
add arg 3 to {%arg 2%;포인트}
message "[스텟] %arg 2%님에게 스텟 포인트 %arg 3% 만큼 지급하였습니다." to player
if arg 1 is "초기화":
if player is op:
set {%arg 2%;힘} to 0
set {%arg 2%;모험} to 0
set {%arg 2%;민첩} to 0
set {%arg 2%;포인트} to 0
message "[스텟] %arg 2%님의 스텟을 초기화 하였습니다." to player
on inventory click:
if inventory name of player's current inventory is "[스텟]":
cancel event
if click item is iron sword:
if {%player%;포인트} > 0:
add 1 to {%player%;힘}
subtract 1 from {%player%;포인트}
execute player command "/스텟"
stop
on inventory click:
if inventory name of player's current inventory is "[스텟]":
cancel event
if click item is apple:
if {%player%;포인트} > 0:
add 1 to {%player%;모험}
subtract 1 from {%player%;포인트}
execute player command "/스텟"
stop
on inventory click:
if inventory name of player's current inventory is "[스텟]":
cancel event
if click item is feather:
if {%player%;포인트} > 0:
add 1 to {%player%;민첩}
subtract 1 from {%player%;포인트}
execute player command "/스텟"
stop
every 1 ticks:
loop all players:
set loop-player's walk speed to 0.2+{%loop-player%;민첩}*0.002
every 1 ticks:
loop all players:
set loop-player's max health to 10+{%loop-player%;모험}*0.7+{%loop-player%;힘}*0.4
on damage:
add {%attacker%;힘}*1.0 to damage
on damage:
add {%attacker%;모험}*0.25 to damage
on damage:
add {%attacker%;민첩}*0.5 to damage
이 위에 있는 게 제가 사용할려는 스텟 스크 스립트의 구문인데 저는 이 스크립트가 마크의 레벨이 1씩 오를때 마다 스텟을 얻을 수 있게 하고 싶은데 어떻게 해야하나요?
코코냐
2022.11.19https://docs.skunity.com/syntax/search/id:7555
단, 내려가는 경우에도 반응합니다.
Shuro
2022.11.19이걸 어떻게 사용해요?
qsef1256
2022.11.20이건 레벨이 올라갈 때 실행되는 이벤트 입니다. 그 밑에 스텟 변수 + 1 을 하는 구문을 적으면 되겠죠.
이벤트가 뭔지 모르셨다면 묻기 전에 먼저 기본적인 스크립트의 구조에 대해 알고 있으셔야 합니다.