+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: i need help with my os

  1. #1
    Wire Noob hacky720's Avatar
    Join Date
    Oct 2009
    Location
    ohio
    Posts
    12

    Cool i need help with my os

    hi i need help with projekt xana so far id like to add a ui and a way to input console commands here's the current code e2 console screen

    Code:
    @name hacky's os XANA
    @inputs S:wirelink Keyboard On  Restart
    @outputs P_light Door Light Led1 Led2 Led3
    @persist String:string Already_on OS LINE Col ENTER
    @trigger all
    
    if (first()) {S:writeCell(2041,1)
    Array=String:explode(" ")
    }
    if(Keyboard==13){ENTER=1}else{ENTER=0}
    if(Keyboard==127){Back=1}else{Back=0}
    #if(Back==1){String=String-String:explode(""):string(String:length())}
    
    S:writeString("Projekt XANA",0,0,999,0,0)
    S:writeString("_____________________",0,1,999,0,0)
    if(On==1){
        Led1=1
        Light=1
        P_light=1
                if(first()) {
                LINE=2
            S:writeCell(2041,1)
                String=""
            }
            if(Keyboard & ~Keyboard & Back==0 & Back==0) {
                String += toChar(Keyboard)
            }
            S:writeString(">>"+String+"                                                                                                                                                                                                                                                                                                                                                            ",0,LINE,999,0,0)
    }
    if(Back==1){String = String:left(String:length()-1)}
    
    
    if(On==0){
        Led1=0
        Light=0
        P_light=0
        S:writeCell(2041,1)
        String=""
        LINE=2
    }
    
    
    if(Restart) {String=""
    
            S:writeCell(2041,1)
    
        LINE=2}
    
    if(ENTER){soundPlay(2,0,"Friends/message.wav")
        if(String=="shutdown"){
            LINE+=1
            S:writeString("Unable to shutdown.",0,LINE,900,0,0)
            LINE+=1
            String=""
        }
        
        
        
        
        
    elseif(String=="opendoor") {Door=138
        ,0,LINE+=1,String=""}
        
    elseif(String=="closedoor") {Door=0
        ,0,LINE+=1,String=""}
    
    
    
    
        
        
        elseif(String=="so1")
        {soundPlay(2,0,"music/hl2_song1.mp3")
        ,0,LINE+=1,String=""}
        
           elseif(String=="so2")
        {soundPlay(2,0,"music/hl2_song2.mp3")
        ,0,LINE+=1,String=""}
        
           elseif(String=="so3")
        {soundPlay(2,0,"music/hl2_song3.mp3")
        ,0,LINE+=1,String=""}
    
    
       elseif(String=="so4")
        {soundPlay(2,0,"music/hl2_song4.mp3")
        ,0,LINE+=1,String=""}
        
        
           elseif(String=="so5")
        {soundPlay(2,0,"music/hl2_song16.mp3")
        ,0,LINE+=1,String=""}
        
          elseif(String=="so6")
        {soundPlay(2,0,"music/hl2_song17.mp3")
        ,0,LINE+=1,String=""}
        
          elseif(String=="so7")
        {soundPlay(2,0,"ravebreak.mp3")
        ,0,LINE+=1,String=""}
        
           elseif(String=="hazard")
        {soundPlay(2,0,"music/HL1_song11.mp3")
        ,0,LINE+=1,String=""}
        
         elseif(String=="kool")
        {soundPlay(2,0,"music/HL1_song25_remix3.mp3")
        ,0,LINE+=1,String=""}
        
         elseif(String=="hl1-2")
        {soundPlay(2,0,"music/hl1_song15")
        ,0,LINE+=1,String=""}
        
         elseif(String=="hl-s")
        {soundPlay(2,0,"music/hl2_song23_suitsong3")
        ,0,LINE+=1,String=""}
        
        
          elseif(String=="creepy")
        {soundPlay(2,0,"music/radio1.mp3")
        ,0,LINE+=1,String=""}
        
        
        elseif(String=="so8")
        {soundPlay(2,0,"bennyhill_v2.mp3")
        ,0,LINE+=1,String=""}
        
        elseif(String=="so9")
        {soundPlay(2,0,"aprilondynasty/hamster.wav")
        ,0,LINE+=1,String=""}
    
    
    
    
    
    
    
     elseif(String=="vo1")
        {soundPlay(2,0,"vo/gman_misc/gman_riseshine.wav")
        ,0,LINE+=1,String=""}
        
        elseif(String=="vo2")
        {soundPlay(2,0,"vo/gman_misc/gman_02.wav")
        ,0,LINE+=1,String=""}
        
        
        elseif(String=="vo3")
        {soundPlay(2,0,"vo/gman_misc/gman_03.wav")
        ,0,LINE+=1,String=""}
        
        
        
        elseif(String=="vo4")
        {soundPlay(2,0,"vo/gman_misc/gman_04.wav")
        ,0,LINE+=1,String=""}
        
         elseif(String=="vo5")
        {soundPlay(2,0,"vo/heavy_no03.wav")
        ,0,LINE+=1,String=""}
        
    
    
    elseif(String=="text")
      {concmd("say hello world")
    ,0,LINE,String=""}
    
    
    elseif(String=="cmd ")
    {concmd("Array:string(2)")
    ,0,LINE,String=""}
    
    
    
    elseif(String:explode(" "):string(1):lower()=="play")
    {soundPlay(1,999,String:explode(" "):string(2):lower()),LINE+=1,String=""}
    	
        elseif(String=="restart"){
            String=""
            S:writeCell(2041,1)
            LINE=2
        }
        elseif(String=="help"){
            LINE+=1
            S:writeString("shutdown > SHUTDOWN OS",0,LINE,999,0,0),LINE+=1
            S:writeString("restart > os restart",0,LINE,999,0,0),LINE+=1
    		      S:writeString("cheats/off>turns cheats on and off",0,LINE,999,0,0),LINE+=1
    		      S:writeString("opendoor/closedoor>what it says",0,LINE,999,0,0),LINE+=1
            S:writeString("sl> opens songlist",0,LINE,999,0,0), LINE+=1
            String=""
        }
        
        
         elseif(String=="sl"){
            LINE+=1
            S:writeString("hazard>valve opening",0,LINE,999,0,0),LINE+=1
            S:writeString("so2> hl2 song 2",0,LINE,999,0,0),LINE+=1
          S:writeString("so3> hl2 song 3",0,LINE,999,0,0),LINE+=1
          S:writeString("so4> hl2 song 4",0,LINE,999,0,0),LINE+=1
            S:writeString("so5> hl2 song 16",0,LINE,999,0,0), LINE+=1
            S:writeString("so6> hl2 song 17",0,LINE,999,0,0), LINE+=1
            S:writeString("so7> ravebreak",0,LINE,999,0,0), LINE+=1
            S:writeString("so8> Bennyhill",0,LINE,999,0,0), LINE+=1
            S:writeString("so9> hampster dance",0,LINE,999,0,0), LINE+=1
            S:writeString("kool> lol song",0,LINE,999,0,0), LINE+=1
            
            String=""
        }
        
        
         elseif(String=="vm"){
            LINE+=1
            S:writeString("vo1>hl2 gman speech 1",0,LINE,999,0,0),LINE+=1
            S:writeString("vo2> hl2 song 2",0,LINE,999,0,0),LINE+=1
          S:writeString("vo3> hl2 song 3",0,LINE,999,0,0),LINE+=1
          S:writeString("vo4> hl2 song 4",0,LINE,999,0,0),LINE+=1
            String=""
        }
        
        
        
        else{
            Led3=1,0,1,0,1,0,1
            LINE+=1
            S:writeString("thats not a command!",0,LINE,200,90,905),LINE+=1
            String=""
        }
    }
    if(~Keyboard) {Led2=1,soundPlay(1,5,"ambient/machines/keyboard"+randint(1,2)+"_clicks.wav")}
    sorry its so long and it has 228 lines it just plays audio and opens a door or somthin hydrolic it has a restart comand and button im going to code more to be a base master comp
    i also would like a boot loader
    Last edited by hacky720; 01-03-2010 at 12:56 PM.

  2. #2
    Wire Sofaking ryland's Avatar
    Join Date
    Oct 2009
    Location
    Card bord box next to wal-mart.
    Posts
    594

    Default Re: i need help with my os

    I don't get what you are saying...
    Do you want us to help you with your OS or build a part of your OS, I would be glad to help you learn how to make your OS, but not build it.
    "I like pie"-Jat Goodwin

    <Azrael-> ryland: LOL is such a noobish thing to say.
    <ryland> LOL
    <Fox682> LOLLOL
    <Fox682> LOL
    <ryland> LOL

  3. #3
    Success: An illusion turck3's Avatar
    Join Date
    Jun 2007
    Location
    USA
    Posts
    1,744
    Blog Entries
    4

    Default Re: i need help with my os

    1. Nobody's going to write your OS for you.
    2. Your OS's code looks poorly planned out and cluttered. Make your code such that you can use it universally, reusing as much of your code as you can, rather than writing out redundant bits of code for each command.
    3. If you don't have a good idea how to make an OS, don't. There's a reason why only a few have ever been made, and that's because they're not easy. They require you to think critically, which is a skill, that quite frankly, most people who struggle with E2 lack.

  4. #4
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: i need help with my os

    if(Keyboard & ~Keyboard & Back==0 & Back==0) {

    ???


    Yeah, its all right if you know what your doing. Just be sure to have a main page.
    .siht daer ot gniyrt emit detsaw ev'uoY

  5. #5
    Wire Sofaking ryland's Avatar
    Join Date
    Oct 2009
    Location
    Card bord box next to wal-mart.
    Posts
    594

    Default Re: i need help with my os

    Quote Originally Posted by hacky720 View Post
    hi i need help with projekt xana so far id like to add a ui and a way to input console commands here's the current code e2 console screen

    Code:
    @name hacky's os XANA
    @inputs S:wirelink Keyboard On  Restart
    @outputs P_light Door Light Led1 Led2 Led3
    @persist String:string Already_on OS LINE Col ENTER
    @trigger all
    
    if (first()) {S:writeCell(2041,1)
    Array=String:explode(" ")
    }
    if(Keyboard==13){ENTER=1}else{ENTER=0}
    if(Keyboard==127){Back=1}else{Back=0}
    #if(Back==1){String=String-String:explode(""):string(String:length())}
    
    S:writeString("Projekt XANA",0,0,999,0,0)
    S:writeString("_____________________",0,1,999,0,0)
    if(On==1){
        Led1=1
        Light=1
        P_light=1
                if(first()) {
                LINE=2
            S:writeCell(2041,1)
                String=""
            }
            if(Keyboard & ~Keyboard & Back==0 & Back==0) {
                String += toChar(Keyboard)
            }
            S:writeString(">>"+String+"                                                                                                                                                                                                                                                                                                                                                            ",0,LINE,999,0,0)
    }
    if(Back==1){String = String:left(String:length()-1)}
    
    
    if(On==0){
        Led1=0
        Light=0
        P_light=0
        S:writeCell(2041,1)
        String=""
        LINE=2
    }
    
    
    if(Restart) {String=""
    
            S:writeCell(2041,1)
    
        LINE=2}
    
    if(ENTER){soundPlay(2,0,"Friends/message.wav")
        if(String=="shutdown"){
            LINE+=1
            S:writeString("Unable to shutdown.",0,LINE,900,0,0)
            LINE+=1
            String=""
        }
        
        
        
        
        
    elseif(String=="opendoor") {Door=138
        ,0,LINE+=1,String=""}
        
    elseif(String=="closedoor") {Door=0
        ,0,LINE+=1,String=""}
    
    
    
    
        
        
        elseif(String=="so1")
        {soundPlay(2,0,"music/hl2_song1.mp3")
        ,0,LINE+=1,String=""}
        
           elseif(String=="so2")
        {soundPlay(2,0,"music/hl2_song2.mp3")
        ,0,LINE+=1,String=""}
        
           elseif(String=="so3")
        {soundPlay(2,0,"music/hl2_song3.mp3")
        ,0,LINE+=1,String=""}
    
    
       elseif(String=="so4")
        {soundPlay(2,0,"music/hl2_song4.mp3")
        ,0,LINE+=1,String=""}
        
        
           elseif(String=="so5")
        {soundPlay(2,0,"music/hl2_song16.mp3")
        ,0,LINE+=1,String=""}
        
          elseif(String=="so6")
        {soundPlay(2,0,"music/hl2_song17.mp3")
        ,0,LINE+=1,String=""}
        
          elseif(String=="so7")
        {soundPlay(2,0,"ravebreak.mp3")
        ,0,LINE+=1,String=""}
        
           elseif(String=="hazard")
        {soundPlay(2,0,"music/HL1_song11.mp3")
        ,0,LINE+=1,String=""}
        
         elseif(String=="kool")
        {soundPlay(2,0,"music/HL1_song25_remix3.mp3")
        ,0,LINE+=1,String=""}
        
         elseif(String=="hl1-2")
        {soundPlay(2,0,"music/hl1_song15")
        ,0,LINE+=1,String=""}
        
         elseif(String=="hl-s")
        {soundPlay(2,0,"music/hl2_song23_suitsong3")
        ,0,LINE+=1,String=""}
        
        
          elseif(String=="creepy")
        {soundPlay(2,0,"music/radio1.mp3")
        ,0,LINE+=1,String=""}
        
        
        elseif(String=="so8")
        {soundPlay(2,0,"bennyhill_v2.mp3")
        ,0,LINE+=1,String=""}
        
        elseif(String=="so9")
        {soundPlay(2,0,"aprilondynasty/hamster.wav")
        ,0,LINE+=1,String=""}
    
    
    
    
    
    
    
     elseif(String=="vo1")
        {soundPlay(2,0,"vo/gman_misc/gman_riseshine.wav")
        ,0,LINE+=1,String=""}
        
        elseif(String=="vo2")
        {soundPlay(2,0,"vo/gman_misc/gman_02.wav")
        ,0,LINE+=1,String=""}
        
        
        elseif(String=="vo3")
        {soundPlay(2,0,"vo/gman_misc/gman_03.wav")
        ,0,LINE+=1,String=""}
        
        
        
        elseif(String=="vo4")
        {soundPlay(2,0,"vo/gman_misc/gman_04.wav")
        ,0,LINE+=1,String=""}
        
         elseif(String=="vo5")
        {soundPlay(2,0,"vo/heavy_no03.wav")
        ,0,LINE+=1,String=""}
        
    
    
    elseif(String=="text")
      {concmd("say hello world")
    ,0,LINE,String=""}
    
    
    elseif(String=="cmd ")
    {concmd("Array:string(2)")
    ,0,LINE,String=""}
    
    
    
    elseif(String:explode(" "):string(1):lower()=="play")
    {soundPlay(1,999,String:explode(" "):string(2):lower()),LINE+=1,String=""}
    	
        elseif(String=="restart"){
            String=""
            S:writeCell(2041,1)
            LINE=2
        }
        elseif(String=="help"){
            LINE+=1
            S:writeString("shutdown > SHUTDOWN OS",0,LINE,999,0,0),LINE+=1
            S:writeString("restart > os restart",0,LINE,999,0,0),LINE+=1
    		      S:writeString("cheats/off>turns cheats on and off",0,LINE,999,0,0),LINE+=1
    		      S:writeString("opendoor/closedoor>what it says",0,LINE,999,0,0),LINE+=1
            S:writeString("sl> opens songlist",0,LINE,999,0,0), LINE+=1
            String=""
        }
        
        
         elseif(String=="sl"){
            LINE+=1
            S:writeString("hazard>valve opening",0,LINE,999,0,0),LINE+=1
            S:writeString("so2> hl2 song 2",0,LINE,999,0,0),LINE+=1
          S:writeString("so3> hl2 song 3",0,LINE,999,0,0),LINE+=1
          S:writeString("so4> hl2 song 4",0,LINE,999,0,0),LINE+=1
            S:writeString("so5> hl2 song 16",0,LINE,999,0,0), LINE+=1
            S:writeString("so6> hl2 song 17",0,LINE,999,0,0), LINE+=1
            S:writeString("so7> ravebreak",0,LINE,999,0,0), LINE+=1
            S:writeString("so8> Bennyhill",0,LINE,999,0,0), LINE+=1
            S:writeString("so9> hampster dance",0,LINE,999,0,0), LINE+=1
            S:writeString("kool> lol song",0,LINE,999,0,0), LINE+=1
            
            String=""
        }
        
        
         elseif(String=="vm"){
            LINE+=1
            S:writeString("vo1>hl2 gman speech 1",0,LINE,999,0,0),LINE+=1
            S:writeString("vo2> hl2 song 2",0,LINE,999,0,0),LINE+=1
          S:writeString("vo3> hl2 song 3",0,LINE,999,0,0),LINE+=1
          S:writeString("vo4> hl2 song 4",0,LINE,999,0,0),LINE+=1
            String=""
        }
        
        
        
        else{
            Led3=1,0,1,0,1,0,1
            LINE+=1
            S:writeString("thats not a command!",0,LINE,200,90,905),LINE+=1
            String=""
        }
    }
    if(~Keyboard) {Led2=1,soundPlay(1,5,"ambient/machines/keyboard"+randint(1,2)+"_clicks.wav")}
    sorry its so long and it has 228 lines it just plays audio and opens a door or somthin hydrolic it has a restart comand and button im going to code more to be a base master comp
    i also would like a boot loader
    Wait, is that even your OS?
    It looks a lot like a modified version of t_larson911's old OS, I know cause I scripted for it.

    Also...
    Array=String:explode(" ")
    Where is 'Array' defined at?

    I don't think that this code would run at all.
    "I like pie"-Jat Goodwin

    <Azrael-> ryland: LOL is such a noobish thing to say.
    <ryland> LOL
    <Fox682> LOLLOL
    <Fox682> LOL
    <ryland> LOL

  6. #6
    Spucatum Tauri Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    6,009

    Default Re: i need help with my os

    Array=String:explode(" ")
    Where is 'Array' defined at?
    Array=String:explode(" ") <- There.

    Wait, is that even your OS?
    It looks a lot like a modified version of t_larson911's old OS, I know cause I scripted for it.
    Provide some evidence for that.
    Last edited by Bull; 01-03-2010 at 03:41 AM.
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

    Quote Originally Posted by Anticept View Post
    By the way, Bull is in charge.

  7. #7
    Wire Sofaking SatansSimon's Avatar
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    513

    Default Re: i need help with my os

    Ryland: you don't have to define a variable as a persistent variable if you don't want to use it after the current execution.

  8. #8
    Wire Noob hacky720's Avatar
    Join Date
    Oct 2009
    Location
    ohio
    Posts
    12

    Default

    it is a modifyied version of simplicity os i wanted to add a way to input console commands frome it and add a g.u.i. and any one who wants to help me with it or give me suggestions

    the array is supposed to make the console work with what i tiype such as "cmd kill" where cmd is before what console command i want to exicute

    p.s. sillygoose helped me add a way to use backspase

    Quote Originally Posted by ryland View Post
    I don't get what you are saying...
    Do you want us to help you with your OS or build a part of your OS, I would be glad to help you learn how to make your OS, but not build it.
    yea i need help im not making aney one build the code i just need help
    Last edited by turck3; 01-03-2010 at 03:22 PM.

  9. #9
    Banned Nicolai1's Avatar
    Join Date
    Nov 2008
    Location
    Denmark.
    Posts
    1,251

    Default Re: i need help with my os

    Am I late or what the hell does
    Code:
    Led3=1,0,1,0,1,0,1
    Do?

  10. #10
    Wire Noob hacky720's Avatar
    Join Date
    Oct 2009
    Location
    ohio
    Posts
    12

    Lightbulb Re: i need help with my os

    It is to make a light blink but it doesent workso i need to delet it

+ Reply to Thread
Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots