rotxeein0
Teşekkürler.20-30 dakikaya atarım...
0mustafa
# The0Felon tarafından yapılmıştır.
# dc: 0mustafa
options:
toolType: golden axe # eşyanın türü (örn: diamond sword, diamond axe, iron axe...)
toolName: "<#00ffcc>ᴛʜᴏʀ'ᴜɴ ʙᴀʟᴛᴀѕɪ" # Eşyanın ismi.
toolDesc: "<#CDCDCD>Kullanıldığı yere tanrısal bir yıldırım fırlatır!" # Eşyanın açıklamasını (lore) ayarlar.
cooldown: 10 # Eşyanın ne kadar aralıkla kullanılabileceğini ayarlar. (saniye cinsinden)
strikeArea: 3 # 3 olursa 3x3'lük bir alanda rastgele lokasyon seçerek yıldırım yollar...
on load:
set {thunderStrikeTool.tool} to {@toolType} named {@toolName} with lore ({@toolDesc})
delete {thunderStrikeTool.noLightningDamage::*}
delete {thunderStrikeToolLastUsage::*}
on right click:
if held item of player is {thunderStrikeTool.tool}:
set {_t} to now
remove 5 days from {_t}
set {thunderStrikeToolLastUsage::%player%} to {_t} if {thunderStrikeToolLastUsage::%player%} isn't set
if (difference between {thunderStrikeToolLastUsage::%player%} and now > ("{@cooldown} seconds" parsed as a time span)):
set item cooldown of {thunderStrikeTool.tool} for player to ("{@cooldown} seconds" parsed as a time span)
#
strike(player)
set {thunderStrikeToolLastUsage::%player%} to now
else:
set {_sec} to seconds of (difference between {thunderStrikeToolLastUsage::%player%} and now)
set {_toolName} to {@toolName}
# cooldown uyarı mesajı.
send "" to player
send "<#ff462a>%{_toolName}% <#ff462a>eşyasını %{@cooldown} - {_sec}% saniye sonra kullanabilirsin." to player
play sound "block.note_block.bass" at pitch 0.5 to player
send "" to player
local function strike(p: player):
set {_minLoc} to location of {_p}
set {_maxLoc} to location of {_p}
remove {@strikeArea} from x-coord of {_minLoc}
remove {@strikeArea} from z-coord of {_minLoc}
add {@strikeArea} to x-coord of {_maxLoc}
add {@strikeArea} to z-coord of {_maxLoc}
set {_minX} to x-coord of {_minLoc}
set {_maxX} to x-coord of {_maxLoc}
set {_minZ} to z-coord of {_minLoc}
set {_maxZ} to z-coord of {_maxLoc}
set {_loc} to location(random number between {_minX} and {_maxX}, y-coord of location of {_p}, random number between {_minZ} and {_maxZ} , world of {_p})
while block under {_loc} isn't solid:
remove 0.5 from y-coord of {_loc}
if y-coord of {_loc} < -60:
stop loop
wait a tick
set {thunderStrikeTool.noLightningDamage::%{_p}%} to true
strike lightning at {_loc}
createParticlesOnUsage({_p})
wait 1 second
delete {thunderStrikeTool.noLightningDamage::%{_p}%}
local function createParticlesOnUsage(p: player):
loop 360 times:
if mod(loop-number, 20) is 0:
set {_loc} to location of {_p}
add cos(loop-number) * {@strikeArea} to x-coord of {_loc}
add sin(loop-number) * {@strikeArea} to z-coord of {_loc}
add 1 to y-coord of {_loc}
draw 20 of soul_fire_flame at {_loc} with extra 0
on damage:
if damage cause is lightning:
cancel event if {thunderStrikeTool.noLightningDamage::%victim%} is true
else if damage cause is fire:
extinguish victim if {thunderStrikeTool.noLightningDamage::%victim%} is true
cancel event if {thunderStrikeTool.noLightningDamage::%victim%} is true
command /getThunderStrikeTool:
permission: op
permission message: &cBu komuta iznin yok.
trigger:
give 1 of {thunderStrikeTool.tool} to player
rotxeein0
Bu kadar uğraştığın için çok teşekkür ediyorum, işimi çok daha kolaylaştırdın ellerine sağlık skripti test ediyorum hemenPython:# The0Felon tarafından yapılmıştır. # dc: 0mustafa options: toolType: golden axe # eşyanın türü (örn: diamond sword, diamond axe, iron axe...) toolName: "<#00ffcc>ᴛʜᴏʀ'ᴜɴ ʙᴀʟᴛᴀѕɪ" # Eşyanın ismi. toolDesc: "<#CDCDCD>Kullanıldığı yere tanrısal bir yıldırım fırlatır!" # Eşyanın açıklamasını (lore) ayarlar. cooldown: 10 # Eşyanın ne kadar aralıkla kullanılabileceğini ayarlar. (saniye cinsinden) strikeArea: 3 # 3 olursa 3x3'lük bir alanda rastgele lokasyon seçerek yıldırım yollar... on load: set {thunderStrikeTool.tool} to {@toolType} named {@toolName} with lore ({@toolDesc}) delete {thunderStrikeTool.noLightningDamage::*} delete {thunderStrikeToolLastUsage::*} on right click: if held item of player is {thunderStrikeTool.tool}: set {_t} to now remove 5 days from {_t} set {thunderStrikeToolLastUsage::%player%} to {_t} if {thunderStrikeToolLastUsage::%player%} isn't set if (difference between {thunderStrikeToolLastUsage::%player%} and now > ("{@cooldown} seconds" parsed as a time span)): set item cooldown of {thunderStrikeTool.tool} for player to ("{@cooldown} seconds" parsed as a time span) # strike(player) set {thunderStrikeToolLastUsage::%player%} to now else: set {_sec} to seconds of (difference between {thunderStrikeToolLastUsage::%player%} and now) set {_toolName} to {@toolName} # cooldown uyarı mesajı. send "" to player send "<#ff462a>%{_toolName}% <#ff462a>eşyasını %{@cooldown} - {_sec}% saniye sonra kullanabilirsin." to player play sound "block.note_block.bass" at pitch 0.5 to player send "" to player local function strike(p: player): set {_minLoc} to location of {_p} set {_maxLoc} to location of {_p} remove {@strikeArea} from x-coord of {_minLoc} remove {@strikeArea} from z-coord of {_minLoc} add {@strikeArea} to x-coord of {_maxLoc} add {@strikeArea} to z-coord of {_maxLoc} set {_minX} to x-coord of {_minLoc} set {_maxX} to x-coord of {_maxLoc} set {_minZ} to z-coord of {_minLoc} set {_maxZ} to z-coord of {_maxLoc} set {_loc} to location(random number between {_minX} and {_maxX}, y-coord of location of {_p}, random number between {_minZ} and {_maxZ} , world of {_p}) while block under {_loc} isn't solid: remove 0.5 from y-coord of {_loc} if y-coord of {_loc} < -60: stop loop wait a tick set {thunderStrikeTool.noLightningDamage::%{_p}%} to true strike lightning at {_loc} createParticlesOnUsage({_p}) wait 1 second delete {thunderStrikeTool.noLightningDamage::%{_p}%} local function createParticlesOnUsage(p: player): loop 360 times: if mod(loop-number, 20) is 0: set {_loc} to location of {_p} add cos(loop-number) * {@strikeArea} to x-coord of {_loc} add sin(loop-number) * {@strikeArea} to z-coord of {_loc} add 1 to y-coord of {_loc} draw 20 of soul_fire_flame at {_loc} with extra 0 on damage: if damage cause is lightning: cancel event if {thunderStrikeTool.noLightningDamage::%victim%} is true else if damage cause is fire: extinguish victim if {thunderStrikeTool.noLightningDamage::%victim%} is true cancel event if {thunderStrikeTool.noLightningDamage::%victim%} is true command /getThunderStrikeTool: permission: op permission message: &cBu komuta iznin yok. trigger: give 1 of {thunderStrikeTool.tool} to player
Biraz uğraştırdı fakat çok güzel bir şey çıktı ortaya :)
Önemli Notlar:
- Skript 2.9.5 ile test edildi. (Daha üstü/altı için garanti vermiyorum. Varsa, hataları yolla çözelim.)
- SKBee şart. (Partiküller için.)
- 1.20.6 Paper bir sunucuda test edildi.
- /getThunderStrikeTool komutuyla eşyayı alabilirsin. (OP'lere özel bir komut.)
0mustafa
Kod işini gördüyse konuyu bulundu/çözüldü olarak işaretleyebilir misin?Bu kadar uğraştığın için çok teşekkür ediyorum, işimi çok daha kolaylaştırdın ellerine sağlık skripti test ediyorum hemen
Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!