Git Product home page Git Product logo

Comments (8)

Ankoki avatar Ankoki commented on August 16, 2024

Hmm that is weird, i'll give it a look. Could you send me your skript?

from skjade.

Baezor1 avatar Baezor1 commented on August 16, 2024

Code is super ugly just because I'm just messing around, but yeah.

function createDeathHolo(player: player, loc: location, bones: number = 0, crystals: number = 0):
	set {_rand} to random integer between 1 and 99999
	create a hologram at {_loc} with the id "%{_rand}%"
	hide the hologram with id "%{_rand}%" from players
	show hologram with id "%{_rand}%" to {_player}
	add line "&f&nKill Summary" to the hologram with id "%{_rand}%"
	add line "" to the hologram with id "%{_rand}%"
	add line "&a+ &7%{_bones}% Bone(s)" to the hologram with id "%{_rand}%"
	add line "&a+ &d%{_crystals}% Crystal(s)" to the hologram with id "%{_rand}%"
	broadcast "%{_rand}%"
	sklib_playExperienceOrb({_player})
	wait 2 second
	if (hologram with the id "%{_rand}%") is a hologram:
		delete the hologram with the id "%{_rand}%"
# this is under an on damage event

	set {_loc} to location (random number between 1.6 and 2) above (location of victim)
	set {_loc} to location {_rand} {_newDir} of {_loc}
	delete the hologram with the id "%{_randID}%"
	create a hologram at {_loc} with the id "%{_randID}%"
	hide the hologram with id "%{_randID}%" from players
	show hologram with id "%{_randID}%" to attacker
	add line "&c- %damage%" to the hologram with id "%{_randID}%"
	broadcast "%{_randID}%"
	wait 2 second
	delete the hologram with the id "%{_randID}%"

from skjade.

Baezor1 avatar Baezor1 commented on August 16, 2024

Also, I'm running this on a SUPER slow server (old 2011 mac mini w/ a 2.2GHz processor), that might be an issue? I haven't noticed any mspt or tps drops though.

Edit: I also want to mention that the code works perfectly fine, just spams console.

from skjade.

Ankoki avatar Ankoki commented on August 16, 2024

that could be the cause, however this shouldn't happen anyway x) i'll give it a test in a bit :)

from skjade.

Baezor1 avatar Baezor1 commented on August 16, 2024

It just has some unrelated stuff but yeah. Code is super messy but yeah.

on damage:
	if victim is a mob:
		add "{NoAI:0}" to nbt of victim
		attacker is a player
		set path target of victim to attacker
	attacker is a player
	set {_randID} to random integer between 1 and 99999
	set {_rand} to random number between 0.6 and 1.3
	set {_newRand} to random integer between 1 and 2

	set {_loc} to location (random number between 1.2 and 2) above (location of victim)

	delete the hologram with the id "%{_randID}%"
	create a hologram at {_loc} with the id "%{_randID}%"
	hide the hologram with id "%{_randID}%" from players
	show hologram with id "%{_randID}%" to attacker
	add line "&c- %damage%" to the hologram with id "%{_randID}%"
	wait 2 second
	delete the hologram with the id "%{_randID}%"

from skjade.

Ankoki avatar Ankoki commented on August 16, 2024

ill give it a look:) i was able to recreate it unfortunately so it isn't your device which is good:D i'll fix it asap:)

from skjade.

Baezor1 avatar Baezor1 commented on August 16, 2024

Rip, at least the code works, just sends errors, gl fixing this. This addon is pretty awesome!

from skjade.

Ankoki avatar Ankoki commented on August 16, 2024

Thank you! am glad you like it:D

from skjade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.