aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-13 19:31:35 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-13 19:31:35 +0800
commit957eed606234a4bc5e1b847580000a583ab9ee5b (patch)
tree52dc09298d0506e05f76ab82a3e1fea3bbcacf69
parent68129573d5412314b1fecf5b3e576e68bc150ce2 (diff)
downloadSoopyV2-957eed606234a4bc5e1b847580000a583ab9ee5b.tar.gz
SoopyV2-957eed606234a4bc5e1b847580000a583ab9ee5b.tar.bz2
SoopyV2-957eed606234a4bc5e1b847580000a583ab9ee5b.zip
-dungeon map border and background
-guild event lb command (sbg event only)
-rw-r--r--features/cosmetics/cosmetic/dragon/dragonWings.js56
-rw-r--r--features/dungeonMap/index.js14
-rw-r--r--features/hud/index.js2
-rw-r--r--features/lockedFeatures/index.js22
4 files changed, 68 insertions, 26 deletions
diff --git a/features/cosmetics/cosmetic/dragon/dragonWings.js b/features/cosmetics/cosmetic/dragon/dragonWings.js
index add23d1..0d7341f 100644
--- a/features/cosmetics/cosmetic/dragon/dragonWings.js
+++ b/features/cosmetics/cosmetic/dragon/dragonWings.js
@@ -35,7 +35,7 @@ class DragonWings extends Cosmetic {
onRenderEntity(ticks, isInGui){
- if(this.player.getPlayer()[m.isInvisibleToPlayer](Player.getPlayer())){
+ if(this.player.getPlayer()[m.isInvisibleToPlayer](Player.getPlayer()) || this.player.getPlayer()[m.isInvisible]()){
return
}
@@ -71,13 +71,16 @@ class DragonWings extends Cosmetic {
let wingBackAmount = 0
- if(this.player.getPlayer()[f.hurtResistantTime] > 15){ //damage tick
- this.animOffset += 15*timeSince
+ let shouldStandStillWingCurve = true
+
+ if(this.player.getPlayer()[f.hurtResistantTime] > 17){ //damage tick
+ this.animOffset += 25*timeSince
}
// if((this.player === Player &&this.player.getPlayer().field_71075_bZ.field_75100_b) || (this.player !== Player && Math.abs(verticleSpeed)<0.2 && !this.player.getPlayer().field_70122_E)){//playerCapabilities.isFlying
if(this.flying){ //flying
+ shouldStandStillWingCurve = false
this.animOffset += 5*timeSince //flap in mid air
flapAmountMultiplyer *= 1.75 //flap harder
@@ -174,6 +177,7 @@ class DragonWings extends Cosmetic {
if(this.player.getPlayer()[m.isSneaking.Entity]()){ //isSneaking
if(this.player.getPlayer()[f.rotationPitch] > 20){
shouldStandingStillWingThing = true
+ shouldStandStillWingCurve = false
changeStandingStillWingThing = Math.max(0,this.player.getPlayer()[f.rotationPitch]/600)
}
}
@@ -182,7 +186,6 @@ class DragonWings extends Cosmetic {
if(shouldStandingStillWingThing){
wing[f.rotateAngleY] = 0.25+(changeStandingStillWingThing)*3
}
-
if(this.player.getPlayer()[m.isPlayerSleeping]()){ //player in bed
try{ //try catch incase no bed at that location
@@ -209,26 +212,18 @@ class DragonWings extends Cosmetic {
}
// console.log(rotation)
// console.log(World.getBlockAt(this.player.getX(), this.player.getY(), this.player.getZ()).getState().func_177229_b(FACING))
- Tessellator.translate(0, 0.75-this.settings.scale*100,0)
Tessellator.rotate(rotation, 0, 1, 0)
+ }catch(e){}
+ Tessellator.translate(0, -this.settings.scale*25,0)
- wing[f.rotateAngleX] = 0; //rotateAngleX
+ wing[f.rotateAngleX] = 0; //rotateAngleX
- wing[f.rotateAngleZ] = (-0.5+Math.sin(this.animOffset/5)*0.1)*this.settings.scale*100; //rotateAngleZ
+ wing[f.rotateAngleZ] = (-0.45+Math.sin(this.animOffset/5)*0.03); //rotateAngleZ
-
- wingTip[f.rotateAngleZ] = -2.20+Math.sin(this.animOffset/5)*0.1
- }catch(e){}
+
+ wingTip[f.rotateAngleZ] = -2.5+Math.sin(this.animOffset/5)*0.03
}else if(wingBackAmount === 0){
//tilt
- let wing_tilt_offset = -Math.min(0.8, horisontalSpeed*3) //When go faster tilt wing back so its in direction of wind
-
-
- if(shouldStandingStillWingThing){
- wing_tilt_offset += (changeStandingStillWingThing)*4
- }
-
- wing[f.rotateAngleX] = 0.75 - Math.cos(this.animOffset) * 0.2+wing_tilt_offset; //rotateAngleX
let wing_goback_amount = 0.15/(Math.min(1, horisontalSpeed)*3+0.25)
@@ -241,6 +236,15 @@ class DragonWings extends Cosmetic {
temp_wing_thing += changeStandingStillWingThing*50
}
+ let wing_tilt_offset = -Math.min(0.8, horisontalSpeed*3)+0.3 //When go faster tilt wing back so its in direction of wind
+
+
+ if(shouldStandingStillWingThing){
+ wing_tilt_offset += (changeStandingStillWingThing)*4
+ }
+
+ wing[f.rotateAngleX] = 0.85 - Math.cos(this.animOffset) * 0.2+wing_tilt_offset-(flapAmountMultiplyer-1)/3; //rotateAngleX
+
let temp_horis_wingthing = 0
if(shouldStandingStillWingThing){
temp_horis_wingthing = -(changeStandingStillWingThing)*0.75
@@ -248,8 +252,9 @@ class DragonWings extends Cosmetic {
wing[f.rotateAngleZ] = (Math.sin(this.animOffset)/temp_wing_thing + 0.125) * wing_goback_amount*(1+(flapAmountMultiplyer-1)*1)*flapAmountMultiplyerNoEnd -0.4-wing_tilt_offset/3+temp_horis_wingthing+flapMainOffsetThing; //rotateAngleZ
-
- wingTip[f.rotateAngleZ] = -((Math.sin((this.animOffset+1.5+(1-temp_wing_thing)/8.5))/(1+(temp_wing_thing-1)/3) + 0.5)) * 0.75*(1+(flapAmountMultiplyer-1)*1)/(1+temp_horis_wingthing) - (1-flapAmountMultiplyer)*2-(1-temp_wing_thing)/10+wingEndOffsetThing; //rotateAngleZ
+ let standStillCurveThing = shouldStandStillWingCurve?(2-flapAmountMultiplyer)*0.5:0
+
+ wingTip[f.rotateAngleZ] = standStillCurveThing-((Math.sin((this.animOffset+1.5+(1-temp_wing_thing)/8.5))/(1+(temp_wing_thing-1)/3) + 0.5)) * 0.75*(1+(flapAmountMultiplyer-1)*1)/(1+temp_horis_wingthing) - (1-flapAmountMultiplyer)*2-(1-temp_wing_thing)/10+wingEndOffsetThing; //rotateAngleZ
}else{
//tilt
let wing_tilt_offset = -Math.min(0.8, horisontalSpeed*3) //When go faster tilt wing back so its in direction of wind
@@ -310,6 +315,8 @@ class DragonWings extends Cosmetic {
return
}
+ if(this.player.getPlayer()[m.isPlayerSleeping]()) return
+
let horisontalSpeed = Math.hypot((this.player.getPlayer()[f.posX.Entity]-this.player.getPlayer()[f.lastTickPosX]),(this.player.getPlayer()[f.posZ.Entity]-this.player.getPlayer()[f.lastTickPosZ]))
@@ -434,4 +441,11 @@ function getField(e, field){
field2.setAccessible(true)
return field2.get(e)
-} \ No newline at end of file
+}
+
+let a = 0
+
+register("command", (val)=>{
+ a = parseFloat(val)
+ ChatLib.chat("Set a to " + a)
+}).setName("seta", true) \ No newline at end of file
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js
index a76f665..f8abb4e 100644
--- a/features/dungeonMap/index.js
+++ b/features/dungeonMap/index.js
@@ -32,7 +32,7 @@ class DungeonMap extends Feature {
this.renderMap = new ToggleSetting("Render Map", "Toggles Rendering the map on the hud", false, "dmap_render", this)
this.mapLocation = new ImageLocationSetting("Map Location", "Sets the location of the map on the hud","dmap_location", this, [10,10, 1], new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/dungeonMap/map.png"))),100,100)
- this.mapBackground = new ToggleSetting("Map Background", "Puts a white background begind the map", false, "dmap_background", this)
+ this.mapBackground = new ToggleSetting("Map Background And Border", "Puts a grey background behind the map + Black border", false, "dmap_background", this)
this.brBox = new ToggleSetting("Box around doors in br", "In map category because it uses map to find location (no esp)", true, "dmap_door", this)
this.brBoxDisableWhenBloodOpened = new ToggleSetting("Disable blood rush box when blood open", "", true, "dmap_door_disable", this).requires(this.brBox)
this.spiritLeapOverlay = new ToggleSetting("Spirit leap overlay", "Cool overlay for the spirit leap menu", true, "spirit_leap_overlay", this)
@@ -177,6 +177,8 @@ class DungeonMap extends Feature {
drawMap(x, y, size, scale){
if(this.mapImage){
+ if(this.mapBackground.getValue()) Renderer.drawRect(Renderer.color(0,0,0,100), x, y, size, size)
+
if(this.boringMap){
this.mapImage.draw(x, y, size, size)
return
@@ -224,6 +226,12 @@ class DungeonMap extends Feature {
this.drawPlayersLocations(x+xOff, y+yOff, size, scale)
renderLibs.stopScizzor()
+
+
+ if(this.mapBackground.getValue()) Renderer.drawRect(Renderer.color(0,0,0), x, y, size, 2)
+ if(this.mapBackground.getValue()) Renderer.drawRect(Renderer.color(0,0,0), x, y, 2, size)
+ if(this.mapBackground.getValue()) Renderer.drawRect(Renderer.color(0,0,0), x+size-2, y, 2, size)
+ if(this.mapBackground.getValue()) Renderer.drawRect(Renderer.color(0,0,0), x, y+size-2, size, 2)
}
}
@@ -372,9 +380,9 @@ class DungeonMap extends Feature {
let graphics = this.renderImage.getGraphics()
- if(!this.mapBackground.getValue())graphics.setComposite(AlphaComposite.Clear);
+ graphics.setComposite(AlphaComposite.Clear);
graphics.fillRect(0,0,this.IMAGE_SIZE,this.IMAGE_SIZE)
- if(!this.mapBackground.getValue())graphics.setComposite(AlphaComposite.SrcOver);
+ graphics.setComposite(AlphaComposite.SrcOver);
let mapData
try {
diff --git a/features/hud/index.js b/features/hud/index.js
index b0995cb..823f489 100644
--- a/features/hud/index.js
+++ b/features/hud/index.js
@@ -520,7 +520,7 @@ class Hud extends Feature {
currentSong = "&cPaused"
}else{
if(song === "Spotify") song = "Advertisement"
- currentSong = "&a" + song.replace(" - "," &7-&b ")
+ currentSong = "&a" + song.replace(/&/g, "&⭍").replace(" - "," &7-&b ")
}
}
diff --git a/features/lockedFeatures/index.js b/features/lockedFeatures/index.js
index 0226859..ffe6faa 100644
--- a/features/lockedFeatures/index.js
+++ b/features/lockedFeatures/index.js
@@ -26,6 +26,8 @@ class LockedFeatures extends Feature {
.requires(this.guildEventLb))
this.hudElements.push(this.guildLbElement)
+ this.eventCommand = undefined
+
this.registerStep(true, 1, this.step)
this.registerEvent("renderOverlay", this.renderOverlay)
}
@@ -33,11 +35,29 @@ class LockedFeatures extends Feature {
step(){
if(!SoopyV2Server.lbdatathing){
this.guildEventLbPossible.set(false)
+ if(this.eventCommand){
+ this.unregisterCommand("eventlb")
+ this.eventCommand = undefined
+ }
return;
}
this.guildEventLbPossible.set(true)
+ if(!this.eventCommand){
+ this.eventCommand = this.registerCommand("eventlb", ()=>{
+ SoopyV2Server.lbdatathing.forEach((u, i)=>{
+ let text = ""
+ text += "§6#" + (i+1)
+ text += "§7 - "
+ text += "§e"+u.username
+ text += "&7: §r"+numberWithCommas(Math.round(parseFloat(u.startingAmount)))
+ if(u.progress) text += " §7("+ (u.progress>0?"+":"-")+Math.abs(Math.round(u.progress)) + "/h)"
+ ChatLib.chat(text)
+ })
+ })
+ }
+
if(!this.guildEventLb.getValue()) return
let text = ""
@@ -81,7 +101,7 @@ class LockedFeatures extends Feature {
text = "&d ^ in " + timeNumber2(timeTillIncrease) + "\n"+text
}
if((timeTillIncrease > timeTillDecrease || (timeTillDecrease>0))&&timeTillIncrease<0 && timeTillDecrease < 10000000000){
- text = "&d V in " + timeNumber2(timeTillDecrease) + "\n"+text
+ text = "&d v in " + timeNumber2(timeTillDecrease) + "\n"+text
}
this.guildLbElement.setText(text)