CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Forum
  • Accueil
  • Actus
  • Tests
  • Vidéos
  • Images
  • Soluces
  • Forum
Liste des sujets

[E2] Mon EGP

[-_Dannyssj4_-]
[-_Dannyssj4_-]
Niveau 4
30 octobre 2010 à 22:49:54

Salut à tous,
Ce code est pour SB3 et les serveurs de Space age, comme je doute que quelqu'un utilise les deux, je partage quand même mon code source de mon écran EGP V3 qui affiche toute les ressources disponibles, avec la gravité, l'o2, etc... C'est pas une version complete car il y a encore quelques trucs à fixé, en fait, je le poste surtout pour que tous le monde puisse voir que le E2 c'est pas si dûr que ça.

Voici mon code :
@name Ice Mining Ship
@inputs E:wirelink Energy MaxEnergy Water MaxWater Oxygen MaxOxygen Cycle Mineral
@inputs Steam MaxSteam Nitrogen MaxNitrogen Laser Freezer TotalMass Kmph O2 CO2 Temperature Gravity WaterPump

@inputs DarkGlitter MaxDarkGlitter

@outputs ClimateRegulator FusionGenerator H2OSplitter SteamTurbines
@persist EnergyPercent WaterPercent OxygenPercent SteamPercent NitrogenPercent

@persist DarkGlitterValue
@trigger

  1. Begin
  2. Very important, with that, you just have to spawn the E2
  3. On the EGP 3 Screen and it works.

if(first()){
entity():isWeldedTo():makeWirelink()
E=entity():isWeldedTo():getWirelink()
E:egpClear()
}

    1. #########################################
    2. #########################################
    3. Titles - Begin
    4. #########################################
    5. #########################################
  1. Creating the box 1

E:egpBox(3,vec2(225,175),vec2(700,150))
E:egpColor(3,vec(140,140,140))

  1. Creating the box 2

E:egpBox(6,vec2(225,320),vec2(700,80))
E:egpColor(6,vec(140,140,140))

  1. Creating the box 3

E:egpBox(9,vec2(225,453),vec2(700,410))
E:egpColor(9,vec(140,140,140))

    1. #########
  1. Main title
    1. #########
  2. Gradient effect

E:egpBox(1,vec2(265,20),vec2(430,40))
E:egpAngle(1,0)
E:egpColor(1,vec(160,0,0))

  1. Text of the title

E:egpText(2,"Ice Mining Ship EGP ", vec2(130,3))
E:egpFont(2, "arial", 34)

    1. #########
  1. Resources Informations
    1. #########
  1. Gradient effect

E:egpBox(4,vec2(240,85),vec2(700,32))
E:egpAngle(4,0)
E:egpColor(4,vec(160,0,0))

  1. Text of the title

E:egpText(5,"Resources Informations ", vec2(120,70))
E:egpFont(5, "arial", 30)

    1. #########
  1. Other Informations
    1. #########
  1. Gradient effect

E:egpBox(7,vec2(240,230),vec2(700,32))
E:egpAngle(7,0)
E:egpColor(7,vec(160,0,0))

  1. Text of the title

E:egpText(8,"Other Informations ", vec2(165,215))
E:egpFont(8, "arial", 30)

    1. #########################################
    2. #########################################
    3. Titles - End
    4. #########################################
    5. #########################################
    1. #########################################
    2. #########################################
    3. Resources Informations - Begin
    4. #########################################
    5. #########################################
    1. #########
  1. Conditions + Automatism
    1. #########
  1. It makes a box RED or GREEN for show if enabled/disabled

if(ClimateRegulator == 1) {
E:egpText(23,"Climate ", vec2(380,108))
E:egpBox(12,vec2(490,115),vec2(40,25))
E:egpColor(12,vec(0,160,0))

}

else{

E:egpText(23,"Climate ", vec2(380,108))
E:egpBox(12,vec2(490,115),vec2(40,25))
E:egpColor(12,vec(160,0,0))

}

    1. ##########

if(Laser == 1) {
E:egpText(26,"Laser ", vec2(380,142))
E:egpBox(13,vec2(490,150),vec2(40,25))
E:egpColor(13,vec(0,160,0))

}

else{

E:egpText(26,"Laser ", vec2(380,142))
E:egpBox(13,vec2(490,150),vec2(40,25))
E:egpColor(13,vec(160,0,0))

}

    1. ##########

if(Freezer == 1) {
E:egpText(27,"Freezer ", vec2(380,170))
E:egpBox(14,vec2(490,185),vec2(40,25))
E:egpColor(14,vec(0,160,0))

}

else{

E:egpText(27,"Freezer ", vec2(380,170))
E:egpBox(15,vec2(490,185),vec2(40,25))
E:egpColor(15,vec(160,0,0))

}

    1. #########
  1. Converting resources to percent
    1. #########

EnergyPercent = floor(Energy/MaxEnergy*100)
WaterPercent = floor(Water/MaxWater*100)
OxygenPercent = floor(Oxygen/MaxOxygen*100)
SteamPercent = floor(Steam/MaxSteam*100)
NitrogenPercent = floor(Nitrogen/MaxNitrogen*100)

    1. #########
  1. Show informations
    1. #########

E:egpText(20,"Energy : "+EnergyPercent+" % - "+Energy+"/"+MaxEnergy, vec2(5,100))
E:egpText(21,"Water : "+WaterPercent+" % - "+Water+"/"+MaxWater, vec2(5,120))
E:egpText(22,"Oxygen : "+OxygenPercent+" % - "+Oxygen+"/"+MaxOxygen, vec2(5,140))
E:egpText(24,"Nitrogen : "+NitrogenPercent+" % - "+Nitrogen+"/"+MaxNitrogen, vec2(5,160))
E:egpText(25,"Steam : "+SteamPercent+" % - "+Steam+"/"+MaxSteam, vec2(5,180))

    1. #########
  1. Changing FONT
    1. #########

E:egpFont(20, "arial", 25)
E:egpFont(21, "arial", 25)
E:egpFont(22, "arial", 25)
E:egpFont(24, "arial", 25)
E:egpFont(25, "arial", 25)

    1. #######################

E:egpFont(23, "arial", 21)
E:egpFont(26, "arial", 21)
E:egpFont(27, "arial", 21)

    1. #########################################
    2. #########################################
    3. Resources Informations - End
    4. #########################################
    5. #########################################
    1. #########################################
    2. #########################################
    3. Other Informations - Begin
    4. #########################################
    5. #########################################
    1. #########
  1. Credits value
    1. #########

DarkGlitterValue = floor(DarkGlitter*7.78)

    1. #########
  1. Show informations
    1. #########

E:egpText(29,"Total mass of your ship : "+TotalMass, vec2(5,250))
E:egpText(30,"Kmph : "+Kmph, vec2(5,270))
E:egpText(31,"Dark Glitter : "+DarkGlitter+"/"+MaxDarkGlitter, vec2(5,290))
E:egpText(32,"O2 : "+O2, vec2(5,310))
E:egpText(33,"CO2 : "+CO2, vec2(5,330))
E:egpText(34,"Cycle : "+Cycle+"%", vec2(5,350))
E:egpText(35,"Mineral: "+Mineral, vec2(5,370))

E:egpText(28,"Credit you will got for your actual mining : "+DarkGlitterValue+" Millions", vec2(5,490))

    1. #########
  1. Changing FONT
    1. #########

E:egpFont(28, "arial", 21)
E:egpFont(29, "arial", 22)
E:egpFont(30, "arial", 22)
E:egpFont(31, "arial", 22)
E:egpFont(32, "arial", 22)
E:egpFont(33, "arial", 22)
E:egpFont(34, "arial", 22)
E:egpFont(35, "arial", 22)
E:egpFont(36, "arial", 22)
E:egpFont(37, "arial", 22)

    1. #########################################
    2. #########################################
    3. Other Informations - End
    4. #########################################
    5. #########################################
    1. #########################################
    2. #########################################
    3. Automatism - Begin
    4. #########################################
    5. #########################################

if(WaterPercent == 100) { FusionGenerator = 1 } else { FusionGenerator = 0}
if(OxygenPercent > 10 & EnergyPercent > 60){ ClimateRegulator = 1 } else { ClimateRegulator = 0 }
if(WaterPump == 1) { FusionGenerator = 1 }
if(WaterPercent >= 40 & WaterPump == 1) { H2OSplitter = 1 } else { H2OSplitter = 0 }
if(WaterPercent >= 10 & WaterPump == 1) { SteamTurbines = 1 } else { SteamTurbines = 0 }

    1. #########################################
    2. #########################################
    3. Automatism - End
    4. #########################################
    5. #########################################
  1. Credits

E:egpText(80,"By Dannyssj4", vec2(10,40))
E:egpFont(80, "arial", 22)

  1. End

Et mon topic dédié sur le forum SA :
http://spaceage.eu/index.php?/topic/778-ice-mining-e2-egp/

Enjoy :)

Solid_avanger
Solid_avanger
Niveau 7
30 octobre 2010 à 23:11:51

J'ai tout lu et franchement .. rien compris O_o
Et je vais pas faire mon gamin a copier coller bêtement, nan j'ai rien compris au code ><

[-_Dannyssj4_-]
[-_Dannyssj4_-]
Niveau 4
31 octobre 2010 à 00:19:32

Mon premier code étais une grosse tache ou je m'y retrouvais pas, là je m'y retrouve ultra facilement, dés que tu sais le truc, tu peux faire un code comme ça, mais c'est pas le plus gros, d'autres de mon serveur ont des codes de genre 500 lignes. :oui:

Solid_avanger
Solid_avanger
Niveau 7
31 octobre 2010 à 02:40:18

My gad O_o

seikay
seikay
Niveau 10
01 novembre 2010 à 16:59:50

Il est pas de toi ce code :ok:

Sous forums
  • DarkRP et dérivés.
La vidéo du moment