diff --git a/.gitignore b/.gitignore index 4e1aeb7..7d2af44 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ veryold/ e2shared/ +_*.txt diff --git a/egp_playerlist_v1.txt b/egp_playerlist_v1.txt new file mode 100644 index 0000000..652d620 --- /dev/null +++ b/egp_playerlist_v1.txt @@ -0,0 +1,49 @@ +@name EGP PlayerList v1 +@inputs EGP:wirelink [P1, P2, P3, P4, P5, P6, P7, P8, P9, P10]:entity +@outputs +@persist [RED ORANGE YELLOW WHITE]:vector4 +@trigger + +interval(1000) + +# Constants +if(first()) { + RED = vec4(255, 0, 0, 255) + ORANGE = vec4(255, 128, 0, 255) + YELLOW = vec4(255, 255, 0, 255) + WHITE = vec4(0, 0, 0, 255) +} + +E = array(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +TextY = 0 +EGP:egpClear() +CHIP = entity() + +for(I = 0, E:count() - 1, 1) { + CurP = E[I, entity] + if(CurP != noentity()) { + # Distance and Weapon String calculations + Dist = round(toUnit("yd", CHIP:pos():distance(CurP:pos())), 1) + Weapon = CurP:weapon():type() + + # Color Calculations + if(Dist < 20) { + EGP:egpColor(I, RED) + } elseif(Dist < 60) { + EGP:egpColor(I, ORANGE) + } elseif(Dist < 80) { + EGP:egpColor(I, YELLOW) + } else { + EGP:egpColor(I, WHITE) + } + + # Differentiate nonexistent weapon + if(Weapon != "") { + Weapon = "holding '" + Weapon + "'" + } else { + Weapon = "and hasn't spawned in yet." + } + EGP:egpText(I, CurP:name() + " is " + Dist + " yards away " + Weapon , vec2(10, I + TextY)) + TextY += 30 + } +} diff --git a/egp_playerlist_v2.txt b/egp_playerlist_v2.txt new file mode 100644 index 0000000..019337e --- /dev/null +++ b/egp_playerlist_v2.txt @@ -0,0 +1,25 @@ +@name EGP PlayerList v2 +@inputs EGP:wirelink +@outputs +@persist ITEM_N ITEM_WIDTH ITEM_HEIGHT ITEM_XPAD ITEM_YPAD +@trigger + +interval(3000) + +# Drawing Constants +if(first()) { + ITEM_N = 10 + ITEM_WIDTH = 512 + ITEM_HEIGHT = 32 + ITEM_XPAD = 16 + ITEM_YPAD = 4 +} + +EGP:egpClear() +for(N = 0, ITEM_N, 1) { + EGP:egpBox( + N, + vec2(ITEM_XPAD + ((ITEM_WIDTH - (ITEM_XPAD * 2) / 2)), (ITEM_HEIGHT + ITEM_YPAD) * N), + vec2(ITEM_WIDTH - ITEM_XPAD, ITEM_HEIGHT) + ) +} diff --git a/holo_jet_above_head.txt b/holo_jet_above_head.txt new file mode 100644 index 0000000..e5c20b7 --- /dev/null +++ b/holo_jet_above_head.txt @@ -0,0 +1,268 @@ +@name Holo Jet Above Head +@outputs Fire +@inputs V:vector +@persist [E O]:entity Fire + +if(first()){ +E=entity() +O=owner() +M="phoenix_storms/metal_plate" +M2="phoenix_storms/metalbox2" +E:setAlpha(0) +runOnTick(1) +holoCreate(1) +holoPos(1,E:pos()) +holoModel(1,"hqcylinder2") +holoAng(1,ang(0,90,90)) +holoScale(1, vec(0.5 * S, .2 * S, 1 * S)) +holoParent(1,E) +holoMaterial(1,M) +holoCreate(2) +holoPos(2,E:pos()+vec(9,0,0)) +holoModel(2,"hqcone") +holoAng(2,ang(0,90,90)) +holoScale(2, vec(0.5 * S, .2 * S, .5 * S)) +holoParent(2,E) +holoMaterial(2,M) +holoCreate(3) +holoPos(3,E:pos()+vec(2,0,0)) +holoModel(3,"cube") +holoAng(3,ang(0,90,90)) +holoScale(3, vec(1.5 * S, .05 * S, .3 * S)) +holoParent(3,E) +holoMaterial(3,M2) +holoColor(3,vec(75,75,75)) +holoCreate(4) +holoPos(4,E:pos()+vec(2,-10.5,0)) +holoModel(4,"pyramid") +holoAng(4,ang(0,0,90)) +holoScale(4, vec(0.3 * S, .05 * S, .25 * S)) +holoParent(4,E) +holoMaterial(4,M2) +holoColor(4,vec(155,155,155)) +holoCreate(5) +holoPos(5,E:pos()+vec(2,10.5,0)) +holoModel(5,"pyramid") +holoAng(5,ang(0,180,90)) +holoScale(5, vec(0.3 * S, .05 * S, .25 * S)) +holoParent(5,E) +holoMaterial(5,M2) +holoColor(5,vec(155,155,155)) +holoCreate(6) +holoPos(6,E:pos()+vec(2,5,-1.2)) +holoModel(6,"hqcylinder2") +holoAng(6,ang(0,90,90)) +holoScale(6, vec(0.1 * S, .1 * S, .3 * S)) +holoParent(6,E) +holoMaterial(6,M) +holoCreate(7) +holoPos(7,E:pos()+vec(2,-5,-1.2)) +holoModel(7,"hqcylinder2") +holoAng(7,ang(0,90,90)) +holoScale(7, vec(0.1 * S, .1 * S, .3 * S)) +holoParent(7,E) +holoMaterial(7,M) +holoCreate(8) +holoPos(8,E:pos()+vec(2,-7,-1.6)) +holoModel(8,"hqcylinder2") +holoAng(8,ang(0,90,90)) +holoScale(8, vec(0.1 * S, .1 * S, .3 * S)) +holoParent(8,E) +holoMaterial(8,M) +holoCreate(9) +holoPos(9,E:pos()+vec(2,7,-1.6)) +holoModel(9,"hqcylinder2") +holoAng(9,ang(0,90,90)) +holoScale(9, vec(0.1 * S, .1 * S, .3 * S)) +holoParent(9,E) +holoMaterial(9,M) +holoCreate(10) +holoPos(10,E:pos()+vec(0.1,0,1)) +holoModel(10,"hqcylinder2") +holoAng(10,ang(0,90,90)) +holoScale(10, vec(0.2 * S, .2 * S, .42 * S)) +holoParent(10,E) +holoMaterial(10,M) +holoCreate(11) +holoPos(11,E:pos()+vec(-3.5,0,0.8)) +holoModel(11,"hqcylinder2") +holoAng(11,ang(0,90,80)) +holoScale(11, vec(0.2 * S, .2 * S, .3 * S)) +holoParent(11,E) +holoMaterial(11,M) +holoCreate(12) +holoPos(12,E:pos()+vec(4,0,0.8)) +holoModel(12,"hqcylinder2") +holoAng(12,ang(0,90,-80)) +holoScale(12, vec(0.2 * S, .2 * S, .3 * S)) +holoParent(12,E) +holoMaterial(12,M) +holoCreate(13) +holoPos(13,E:pos()+vec(6,0,0.8)) +holoModel(13,"dome2") +holoAng(13,ang(0,90,10)) +holoScale(13, vec(0.2 * S, .5 * S, .2 * S)) +holoColor(13,vec(0,0,255)) +holoAlpha(13,(225)) +holoParent(13,E) +holoCreate(14) +holoPos(14,E:pos()+vec(-7.7,0,0)) +holoModel(14,"hqcone") +holoAng(14,ang(0,90,-90)) +holoScale(14, vec(0.5 * S, .2 * S, .3 * S)) +holoParent(14,E) +holoMaterial(14,M) +holoCreate(15) +holoPos(15,E:pos()+vec(-7.7,0,1.1)) +holoModel(15,"prism") +holoAng(15,ang(45,0,180)) +holoScale(15, vec(0.5 * S, .05 * S, .3 * S)) +holoParent(15,E) +holoMaterial(15,M) +holoCreate(16) +holoPos(16,E:pos()+vec(-5,0,0.5)) +holoModel(16,"hqcylinder2") +holoAng(16,ang(0,90,80)) +holoScale(16, vec(0.2 * S, .2 * S, .3 * S)) +holoParent(16,E) +holoMaterial(16,M) +holoCreate(17) +holoPos(17,E:pos()+vec(4.3,5,-1.2)) +holoModel(17,"cone") +holoAng(17,ang(0,90,90)) +holoScale(17, vec(0.1 * S, .1 * S, .1 * S)) +holoParent(17,E) +holoMaterial(17,M) +holoCreate(18) +holoPos(18,E:pos()+vec(4.3,-5,-1.2)) +holoModel(18,"cone") +holoAng(18,ang(0,90,90)) +holoScale(18, vec(0.1 * S, .1 * S, .1 * S)) +holoParent(18,E) +holoMaterial(18,M) +holoCreate(19) +holoPos(19,E:pos()+vec(4.3,-7,-1.6)) +holoModel(19,"cone") +holoAng(19,ang(0,90,90)) +holoScale(19, vec(0.1 * S, .1 * S, .1 * S)) +holoParent(19,E) +holoMaterial(19,M) +holoCreate(20) +holoPos(20,E:pos()+vec(4.3,7,-1.6)) +holoModel(20,"cone") +holoAng(20,ang(0,90,90)) +holoScale(20, vec(0.1 * S, .1 * S, .1 * S)) +holoParent(20,E) +holoMaterial(20,M) +holoCreate(21) +holoPos(21,E:pos()+vec(2,5,-0.8)) +holoModel(21,"cube") +holoAng(21,ang(0,90,90)) +holoScale(21, vec(0.05 * S, .14 * S, .15 * S)) +holoParent(21,E) +holoMaterial(21,M) +holoCreate(22) +holoPos(22,E:pos()+vec(2,-5,-0.8)) +holoModel(22,"cube") +holoAng(22,ang(0,90,90)) +holoScale(22, vec(0.05 * S, .14 * S, .15 * S)) +holoParent(22,E) +holoMaterial(22,M) +holoCreate(23) +holoPos(23,E:pos()+vec(2,-7,-0.7)) +holoModel(23,"cube") +holoAng(23,ang(0,90,90)) +holoScale(23, vec(0.05 * S, .14 * S, .12 * S)) +holoParent(23,E) +holoMaterial(23,M) +holoCreate(24) +holoPos(24,E:pos()+vec(2,7,-0.7)) +holoModel(24,"cube") +holoAng(24,ang(0,90,90)) +holoScale(24, vec(0.05 * S, .14 * S, .12 * S)) +holoParent(24,E) +holoMaterial(24,M) +holoCreate(25) +holoPos(25,E:pos()+vec(-7,0,1)) +holoModel(25,"cube") +holoAng(25,ang(0,90,90)) +holoScale(25, vec(0.75 * S, .05 * S, .3 * S)) +holoParent(25,E) +holoMaterial(25,M2) +holoColor(25,vec(75,75,75)) +holoCreate(26) +holoPos(26,E:pos()+vec(-7,-5,1)) +holoModel(26,"pyramid") +holoAng(26,ang(0,0,90)) +holoScale(26, vec(0.3 * S, .05 * S, .1 * S)) +holoParent(26,E) +holoMaterial(26,M2) +holoColor(26,vec(155,155,155)) +holoCreate(27) +holoPos(27,E:pos()+vec(-7,5,1)) +holoModel(27,"pyramid") +holoAng(27,ang(0,180,90)) +holoScale(27, vec(0.3 * S, .05 * S, .1 * S)) +holoParent(27,E) +holoMaterial(27,M2) +} + +if(O:keyAttack2()){ +Fire=1 +}else{ +Fire=0 +} + +if(duped()){ +concmd("say Made by Tomo742 and you cannot haz naughty duper") +timer("selfdestruct",100) +} + +if(clk("selfdestruct")){ +selfDestruct() +} + + +############################## +if(->V){ +Target=V +}else{ +if(!O:keyUse()){ +#STABILISE +TarQ = quat(O:eyeAngles()) #Calculate quaternion for target orientation +CurQ = quat(E) #Calculate current orientation quaternion + +#TarQ/CurQ is a quaternion representing the rotation that will rotate the object from current orientation to the target one. +Q = TarQ/CurQ + +#applyTorque() works on intrinsic vectors! Get the rotation vector and transform it. +EP=E:pos() +TTV = E:toLocal(rotationVector(Q)+EP) +#Alternatively, can use "V = transpose(matrix(E))*rotationVector(Q)" + +#Apply torque. angVelVector() works like a delta term. +#Factors 150 and 12 can be adjusted to achieve best effect. +E:applyTorque((150*TTV - 12*E:angVelVector())*E:inertia()) + +Target=O:shootPos()+vec(0,0,100) # Above the owner's head. +}elseif(O:keyUse()){ +#STABILISE +TarQ = quat(O:eyeAngles()) #Calculate quaternion for target orientation +CurQ = quat(E) #Calculate current orientation quaternion + +#TarQ/CurQ is a quaternion representing the rotation that will rotate the object from current orientation to the target one. +Q = TarQ/CurQ + +#applyTorque() works on intrinsic vectors! Get the rotation vector and transform it. +EP=E:pos() +TTV = E:toLocal(rotationVector(Q)+EP) +#Alternatively, can use "V = transpose(matrix(E))*rotationVector(Q)" + +#Apply torque. angVelVector() works like a delta term. +#Factors 150 and 12 can be adjusted to achieve best effect. +E:applyTorque((150*TTV - 12*E:angVelVector())*E:inertia()) + +Target=O:aimPos()+vec(0,0,100) # Above where the owner is looking. +} +} +E:applyForce(((Target-E:pos())*10-E:vel())*E:mass()) diff --git a/kos_sign.txt b/kos_sign.txt new file mode 100644 index 0000000..57a0780 --- /dev/null +++ b/kos_sign.txt @@ -0,0 +1,80 @@ +@name KOS Sign +@inputs E:wirelink +@outputs + +timer("Reset",60000) +function mainScreen(){ +E:egpClear() + +E:egpBox(16,vec2(256,350),vec2(740,350)) +E:egpColor(16,vec(1,200,255)) +E:egpMaterial(16, "models/shadertest/shader3") + +E:egpBox(15,vec2(256,350),vec2(740,350)) +E:egpColor(15,vec(1,200,255)) +E:egpAlpha(15,55) + +E:egpText(1,owner():name():left(13)+"'s Base",vec2(256,220)) +E:egpFont(1,"coolvetica",75) +E:egpAlign(1,1,1) +E:egpColor(1,vec(0,0,0)) + +E:egpText(2,"You Are KOS Beyond This Point",vec2(256,275)) +E:egpFont(2,"coolvetica",50) +E:egpAlign(2,1,1) +E:egpColor(2,vec(255,0,0)) + +E:egpText(3,"You Are Also KOS If:",vec2(256,320)) +E:egpFont(3,"coolvetica",50) +E:egpAlign(3,1,1) +E:egpColor(3,vec(255,255,255)) + +E:egpText(4,"1. Holding Raiding Tools",vec2(256,360)) +E:egpFont(4,"coolvetica",50) +E:egpAlign(4,1,1) +E:egpColor(4,vec(255,255,255)) + +E:egpText(5,"2. Suspicious Actions",vec2(256,420)) +E:egpFont(5,"coolvetica",50) +E:egpAlign(5,1,1) +E:egpColor(5,vec(255,255,255)) + +E:egpText(6,"3. Preparing to raid",vec2(256,480)) +E:egpFont(6,"coolvetica",50) +E:egpAlign(6,1,1) +E:egpColor(6,vec(255,255,255)) + +E:egpBox(7,vec2(-100,346),vec2(35,393)) +E:egpColor(7,vec(200,0,0)) + +E:egpBox(8,vec2(610,346),vec2(35,393)) +E:egpColor(8,vec(200,0,0)) + +E:egpBox(9,vec2(256,525),vec2(700,35)) +E:egpColor(9,vec(200,0,0)) + +E:egpBox(10,vec2(256,167),vec2(700,35)) +E:egpColor(10,vec(200,0,0)) + +E:egpBox(11,vec2(256,167),vec2(710,5)) +E:egpColor(11,vec(1,200,255)) + +E:egpBox(12,vec2(256,525),vec2(710,5)) +E:egpColor(12,vec(1,200,255)) + +E:egpBox(13,vec2(610,346),vec2(5,362)) +E:egpColor(13,vec(1,200,255)) + +E:egpBox(14,vec2(-100,346),vec2(5,362)) +E:egpColor(14,vec(1,200,255)) +} + +if(first()){ +entity():createWire(entity():isWeldedTo(),"E","wirelink") +mainScreen() +} + +if(clk("Reset")){ +reset() +mainScreen() +} diff --git a/oscilloscope_circle.txt b/oscilloscope_circle.txt new file mode 100644 index 0000000..ef3f092 --- /dev/null +++ b/oscilloscope_circle.txt @@ -0,0 +1,14 @@ +@name Oscilloscope Circle +@outputs X:number Y:number +@persist I:number +@trigger + +interval(10) + +if(first()) { + I = 0 +} + +I += 10 + sin(I) +X = sin(I) +Y = cos(I) diff --git a/printer_bank_manager_v1.txt b/printer_bank_manager_v1.txt new file mode 100644 index 0000000..d8b9ca4 --- /dev/null +++ b/printer_bank_manager_v1.txt @@ -0,0 +1,141 @@ +@name Printer Bank Manager V1 +@inputs EGP:wirelink +@persist PRINTER_COSTS:table PRINTER_TYPE:string Selected:array +@trigger + +# Chat Commands +# &tax - Moves the tax to a certain level. 1.00 = +100%. Can be negative. +# &clearinv - Forcefully clear selected items +# &cleargui - Move to main menu +# &clearall - clearinv & cleargui combined +# &time - Set the current contract time (in hours). +# &sumcost - Print the raw cost of buying the selected items. +# &sumtax - Print the inflicted payment upon buying the select items. +# &sumcontract - The amount of money paid upon contract signature. + +# Begin program intervals, timers etc. +runOnChat(1) + +# Selected - An array of strings holding the names + +# Constants and other first-only executions +if (first()) { + EGP:egpClear() # Clear in-case E2 is repasted + PRINTER_TYPE = "none" # holds the changing menu type the user is currently on + PRINTER_COSTS = table() # holds the constant costs of printers + PRINTER_MAX = table() # holds constants concerning the maximum of each printer + PRINTER_UPGRADE = table() + + ### Configure printer costs (bitminer only) + # SERVER 7 x CPU ($2,000) = $14,000 + # S2 - + # S1 - 3 Cores ($50,000), 7 CPUs ($2,000) + + ## Configure printer price costs here in-case they change + # Bitminers + PRINTER_COSTS["bitminer_rack", number] = 100000 + PRINTER_COSTS["bitminer_server", number] = 50000 + PRINTER_COSTS["bitminer_s2", number] = 25000 + PRINTER_COSTS["bitminer_s1", number] = 5000 + PRINTER_COSTS["bitminer_extensionlead", number] = 500 + PRINTER_COSTS["bitminer_powerlead", number] = 500 + PRINTER_COSTS["bitminer_generator", number] = 6000 + PRINTER_COSTS["bitminer_fueltank", number] = 10000 + PRINTER_COSTS["bitminer_fuelline", number] = 1500 + + # Moneyprinters + PRINTER_COSTS["printer_sapphire", number] = 20000 + PRINTER_COSTS["printer_emerald", number] = 45000 + PRINTER_COSTS["printer_ruby", number] = 60000 + PRINTER_COSTS["printer_diamond", number] = 85000 + PRINTER_COSTS["printer_platinum", number] = 150000 + PRINTER_COSTS["printer_god", number] = 350000 + + ## Configure printer maximums here in-case they change + # Bitminers + PRINTER_MAX["bitminer_rack", number] = 2 + PRINTER_MAX["bitminer_server", number] = 16 + PRINTER_MAX["bitminer_s2", number] = 4 + PRINTER_MAX["bitminer_s1", number] = 4 + PRINTER_MAX["bitminer_extensionlead", number] = 8 + PRINTER_MAX["bitminer_powerlead", number] = 10 + PRINTER_MAX["bitminer_generator", number] = 3 + PRINTER_MAX["bitminer_fueltank", number] = 2 + PRINTER_MAX["bitminer_fuelline", number] = 2 + + # Moneyprinters + PRINTER_MAX["printer_sapphire", number] = 2 + PRINTER_MAX["printer_emerald", number] = 2 + PRINTER_MAX["printer_ruby", number] = 2 + PRINTER_MAX["printer_diamond", number] = 2 + PRINTER_MAX["printer_platinum", number] = 1 + PRINTER_MAX["printer_god", number] = 1 +} + +# Graphics Drawing +# Main Menu +function main_menu(){ + ### Center Gradients + ## Top Portion Gradient + EGP:egpBox(1,vec2(256,256),vec2(520,520)) + EGP:egpMaterial(1,"gui/gradient_up") + EGP:egpColor(1,vec(42,200,240)) + ## Bottom Portion Gradient + EGP:egpBox(2,vec2(256,256),vec2(520,520)) + EGP:egpMaterial(2,"gui/gradient_down") + EGP:egpColor(2,vec(1,70,90)) + ### Right/Left Lighter Boxes + ## Left + EGP:egpBox(3,vec2(15,256),vec2(35,550)) + EGP:egpColor(3,vec(1,110,140)) + ## Right + EGP:egpBox(4,vec2(495,256),vec2(35,550)) + EGP:egpColor(4,vec(1,110,140)) + ### Top/Bottom Underlying Dark Cyan + ## Bottom + EGP:egpBox(5,vec2(256,495),vec2(450,35)) + EGP:egpColor(5,vec(1,110,140)) + ## Top + EGP:egpBox(6,vec2(256,15),vec2(450,35)) + EGP:egpColor(6,vec(1,110,140)) + ### Top & Bottom Ultralight Trim Corners + ## Top + EGP:egpBox(7,vec2(256,18),vec2(485,5)) + EGP:egpColor(7,vec(1,200,255)) + ## Bottom + EGP:egpBox(8,vec2(256,493),vec2(485,5)) + EGP:egpColor(8,vec(1,200,255)) + ### Left and Right Vertical Trim + ## Right + EGP:egpBox(9,vec2(496,256),vec2(5,478)) + EGP:egpColor(9,vec(1,200,255)) + ## Left + EGP:egpBox(10,vec2(16,256),vec2(5,478)) + EGP:egpColor(10,vec(1,200,255)) + ### Top Title Text Box + ## Rounded Box w/ Shadow + EGP:egpRoundedBox(11,vec2(254,20),vec2(440,40)) + EGP:egpColor(11,vec(1,110,140)) + # Shadow Element + EGP:egpRoundedBox(12,vec2(254,20),vec2(434,34)) + EGP:egpColor(12,vec(1,200,255)) + ## Text + EGP:egpText(15,owner():name():left(13)+"'s Printer Bank",vec2(256,20)) + EGP:egpFont(15,"coolvetica",35) + EGP:egpAlign(15,1,1) + EGP:egpColor(15,vec(0,0,0)) + ### Bottom Subtitle Text Box + ## Rounded Box w/ Shadow + EGP:egpRoundedBox(13,vec2(254,490),vec2(440,40)) + EGP:egpColor(13,vec(1,110,140)) + # Shadow Element + EGP:egpRoundedBox(14,vec2(254,490),vec2(434,34)) + EGP:egpColor(14,vec(1,200,255)) + ## Text + EGP:egpText(16,"Select a Type of Printer to Sell",vec2(255,490)) + EGP:egpFont(16,"coolvetica",26) + EGP:egpAlign(16,1,1) + EGP:egpColor(16,vec(0,0,0)) +} + +main_menu() diff --git a/youtube_mp3_soundplayer_v1.txt b/youtube_mp3_soundplayer_v1.txt new file mode 100644 index 0000000..3f21891 --- /dev/null +++ b/youtube_mp3_soundplayer_v1.txt @@ -0,0 +1,14 @@ +@name YouTube MP3 Soundplayer V1 +@inputs +@outputs +@persist Radio:entity +@trigger + +if(first()) { + Radio = entity() + URL = "https://www.dropbox.com/s/7l6v3nync6cq575/oki doki boomer.mp3?dl=0&raw=1" +} + +if(streamCanStart()) { + Radio:streamStart(randint(0, 100), 100, URL) +}