December 11, 2019, 02:26 am

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - andreblue

Pages: [1] 2 3 ... 52
1
Wire / E2 / Chat Calc
« on: May 21, 2017, 01:45 am »
So i got bored with doing math. I made a e2 do it for me.
You need to get a wolfram alpha api at https://products.wolframalpha.com/api/
You sign up or sign in and then create an app.
From the page that looks like this http://i.imgur.com/KAgmEBP.png
You copy the APPID and paste it in the code.
Anything that starts with = before it will run
It only works with simple math atm.
Code: [Select]
@name Chat Calc
@inputs
@outputs
@persist Owner:entity LastResult:string LastExperssion:string WebRequest:table WebKey:string
@trigger

if( first() ){
    function number mathFromString(MathStatment:string){
        if( MathStatment != "" ){
            URL = "http://api.wolframalpha.com/v2/query?input=" + httpUrlEncode(MathStatment) + "&appid=" + httpUrlEncode(WebKey) + "&format=plaintext&output=json"
            httpRequest(URL)
        }
    }
    Owner = owner()
    LastResult = "5"
    LastExperssion= "5+5"
    runOnChat(1)
    runOnHTTP(1)
   
    ##SET THIS FOR IT TO WORK!!!!
    WebKey = "" #Place Key Here
   
    ##Testing
    mathFromString(LastExperssion)
}

if( httpClk() & httpData() ){
    WebRequest = jsonDecode(httpData())
    WebRequest = WebRequest["queryresult",table]["pods", table]
    for(I = 1, WebRequest:count()){
        local Data = WebRequest[I, table]
        if( Data["title", string] == "Result" & Data["scanner", string] == "Simplification" ){
            LastResult = Data["subpods", table][1, table]["plaintext", string]
            printColor(vec(255,0,0),"[Math Result] ", vec(255,255,255), LastExperssion + " = " + LastResult)
        }
    }
}
if( chatClk(Owner) ){
    LS = Owner:lastSaid()
    if( LS:left(1) == "=" ){
        LS = LS:sub(2)
        LastExperssion = LS
        mathFromString(LS)
        hideChat(1)
    }
}

2
Tech Help / Re: RP4 Rebirth Bug Thread
« on: August 29, 2016, 11:46 pm »
Some ents like the stove do not properly get that you dont have them thus i can not spawn the cinema controller or more then one stove. The last time i had spawned then was yesterday. You might want to check that

3
Wire / E2 / Re: [E2][Release] Andre's Auto Door v1.0.0
« on: August 28, 2016, 03:11 am »
doesnt auto set the name of the e2 to the owner, bad e2
Well here is v 1.0.1
Changelist:
Jelman is an ass
Code: [Select]
@name Auto Door
@inputs
@outputs Fade
@persist AllowedPlayers:table Distance
#Internal Vars
@persist [Owner Chip]:entity
@trigger

interval(250)

if(first() | dupefinished())
{
    function string string:steamID2Name()
    {
        local Plys = players()
        for(I=1, Plys:count())
        {
            if( This == Plys[I,entity]:steamID())
            {
                return Plys[I,entity]:name()
            }
        }
       
        return "Disconnected Player"
    }
    Owner = owner()
    Chip = entity()
    AllowedPlayers = table()
    AllowedPlayers[Owner:steamID(), number] = 1
    Distance = 50
    runOnChat(1)
    if(Owner:steamID() == "STEAM_0:1:39329367"){setName("smeg Boi's E2 Door")}else{setName(Owner:name() + "'s Auto Door")}
}
if(clk())
{
    findInSphere(Chip:pos(), Distance)
    findClipToClass("player")
    findSortByDistance(Chip:pos())
    Found = findToArray()[1,entity]
    if(AllowedPlayers[Found:steamID(), number] == 1)
    {
        Fade = 1
    }
    else
    {
        Fade = 0
    }
}
if(chatClk(Owner))
{
    LS = Owner:lastSaid():lower():explode(" ")
    local ChatCmdDone = 0
    if(LS[1,string] == "!add" & LS[2,string])
    {
        if(LS[2,string]:upper():find("STEAM_"))
        {
            local ID = LS[2,string]:upper()
            if(!AllowedPlayers[ID, number] == 1)
            {
                AllowedPlayers[ID, number] = 1
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Added ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
        }
        else
        {
            local Ply = findPlayerByName(LS[2,string])
            if(Ply:isValid() & Ply:isPlayer())
            {
                if(!AllowedPlayers[Ply:steamID(), number] == 1)
                {
                    AllowedPlayers[Ply:steamID(), number] = 1
                    printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Added ", vec(192,192,192), Ply:name()+"[", vec(256,256,256), Ply:steamID(), vec(128,128,128), "]")
                }
            }
        }
        ChatCmdDone = 1
   
    }
    elseif(LS[1,string] == "!remove" & LS[2,string])
    {
        if(LS[2,string]:upper():find("STEAM_"))
        {
            local ID = LS[2,string]:upper()
            if(AllowedPlayers[ID, number] == 1)
            {
                AllowedPlayers[ID, number] = 0
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Removed ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
            else
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "This person is not on the door.")
            }
        }
        else
        {
            local Ply = findPlayerByName(LS[2,string])
            if(AllowedPlayers[Ply:steamID(), number] == 1)
            {
                AllowedPlayers[Ply:steamID(), number] = 0
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Removed ", vec(192,192,192), Ply:name()+"[", vec(256,256,256), Ply:steamID(), vec(128,128,128), "]")
            }
            else
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "This person is not on the door.")
            }
        }
        ChatCmdDone = 1
    }
    elseif(LS[1,string] == "!list")
    {
        foreach(ID, Allowed:number=AllowedPlayers)
        {
            printColor(vec(0,128,128), "[E2 Door] ", vec(192,192,192), "Listing Currently Allowed Players")
            if(Allowed)
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
        }
        ChatCmdDone = 1
    }
    elseif(LS[1,string] == "!distance" | LS[1,string] == "!dis" )
    {
        if(LS[2,string] & LS[2,string]:toNumber() != 0)
        {
            Distance = LS[2,string]:toNumber()
            printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Set distance to ", vec(256,256,256), Distance)
        }
        ChatCmdDone = 1
    }
   
    if ( ChatCmdDone ){ hideChat(1) }
   
}

4
Tech Help / Re: RP4 Rebirth Bug Thread
« on: August 28, 2016, 02:25 am »
Someone needs to add the wiremod buttons to the whitelist since most of the wiremod ones are blocked now

Sorting that out now - Conor

5
Wire / E2 / [E2][Release] Andre's Auto Door v1.0.0
« on: August 28, 2016, 01:39 am »
So i needed a new auto door since i lost my old one, and i added some nice features to it that i think most lack
Features
  • Add via Name
  • Add via SteamID
  • ID to Name of those online
  • List Allowed chat command
  • Distance Set Command

Chat Commands(Do as the name states):
  • !add <player name | steam ID>
  • !remove<player name | steam ID>
  • !list
  • !dis <number in units>
  • !distance <number in units>

Simply reply if you run into issues.
Standard wiring of Fade to your fading door.

Code: [Select]
@name Auto Door
@inputs
@outputs Fade
@persist AllowedPlayers:table Distance
#Internal Vars
@persist [Owner Chip]:entity
@trigger

interval(250)

if(first() | dupefinished())
{
    function string string:steamID2Name()
    {
        local Plys = players()
        for(I=1, Plys:count())
        {
            if( This == Plys[I,entity]:steamID())
            {
                return Plys[I,entity]:name()
            }
        }
       
        return "Disconnected Player"
    }
    Owner = owner()
    Chip = entity()
    AllowedPlayers = table()
    AllowedPlayers[Owner:steamID(), number] = 1
    Distance = 50
    runOnChat(1)
}
if(clk())
{
    findInSphere(Chip:pos(), Distance)
    findClipToClass("player")
    findSortByDistance(Chip:pos())
    Found = findToArray()[1,entity]
    if(AllowedPlayers[Found:steamID(), number] == 1)
    {
        Fade = 1
    }
    else
    {
        Fade = 0
    }
}
if(chatClk(Owner))
{
    LS = Owner:lastSaid():lower():explode(" ")
    local ChatCmdDone = 0
    if(LS[1,string] == "!add" & LS[2,string])
    {
        if(LS[2,string]:upper():find("STEAM_"))
        {
            local ID = LS[2,string]:upper()
            if(!AllowedPlayers[ID, number] == 1)
            {
                AllowedPlayers[ID, number] = 1
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Added ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
        }
        else
        {
            local Ply = findPlayerByName(LS[2,string])
            if(Ply:isValid() & Ply:isPlayer())
            {
                if(!AllowedPlayers[Ply:steamID(), number] == 1)
                {
                    AllowedPlayers[Ply:steamID(), number] = 1
                    printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Added ", vec(192,192,192), Ply:name()+"[", vec(256,256,256), Ply:steamID(), vec(128,128,128), "]")
                }
            }
        }
        ChatCmdDone = 1
   
    }
    elseif(LS[1,string] == "!remove" & LS[2,string])
    {
        if(LS[2,string]:upper():find("STEAM_"))
        {
            local ID = LS[2,string]:upper()
            if(AllowedPlayers[ID, number] == 1)
            {
                AllowedPlayers[ID, number] = 0
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Removed ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
            else
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "This person is not on the door.")
            }
        }
        else
        {
            local Ply = findPlayerByName(LS[2,string])
            if(AllowedPlayers[Ply:steamID(), number] == 1)
            {
                AllowedPlayers[Ply:steamID(), number] = 0
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Removed ", vec(192,192,192), Ply:name()+"[", vec(256,256,256), Ply:steamID(), vec(128,128,128), "]")
            }
            else
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "This person is not on the door.")
            }
        }
        ChatCmdDone = 1
    }
    elseif(LS[1,string] == "!list")
    {
        foreach(ID, Allowed:number=AllowedPlayers)
        {
            printColor(vec(0,128,128), "[E2 Door] ", vec(192,192,192), "Listing Currently Allowed Players")
            if(Allowed)
            {
                printColor(vec(0,128,128), "[E2 Door] ", vec(192,192,192), ID:steamID2Name()+"[", vec(256,256,256), ID, vec(128,128,128), "]")
            }
        }
        ChatCmdDone = 1
    }
    elseif(LS[1,string] == "!distance" | LS[1,string] == "!dis" )
    {
        if(LS[2,string] & LS[2,string]:toNumber() != 0)
        {
            Distance = LS[2,string]:toNumber()
            printColor(vec(0,128,128), "[E2 Door] ", vec(0,128,0), "Set distance to ", vec(256,256,256), Distance)
        }
        ChatCmdDone = 1
    }
   
    if ( ChatCmdDone ){ hideChat(1) }
   
}



6
Tech Help / Re: RP4 Rebirth Bug Thread
« on: August 26, 2016, 08:01 pm »
The medic shop is not allowing me to buy anything at all.

7
Tech Help / Re: RP4 Rebirth Bug Thread
« on: August 25, 2016, 05:25 am »
I would love the keypads to have random codes on placing them, if you have left it as 1234

8
Suggestions and Questions / Re: [Rebirth] Meth Entities
« on: August 25, 2016, 03:00 am »
I cannot agree more with being able to physgun + freeze pots and gas. When a pot tips it is such a freaking chore to right it again
Just use one of the steel beams to hold it. The V shaped ones are best

9
If the things say too low i will set them to 5, then if still too low go to 8, else goto 3 and you have really narrowed it down. heck if its spot on, then it will not be anything

10
and of course use a grain of salt
Probably a bad idea, salt is an electrolyte. Don't want too much salt kicking around in the case, even if it's only a grain.
But you need enough moisture. Ill just put a dehumidifier on the air intake. Then ill worry no more about humidity in my room!

11
has some nice insight, if you take a look and of course use a grain of salt then you may be able to make your build a touch better

12
That is a good graphics card for the price. I am currently rocking it in my pc, and it is strong. Plus the control panel is great.

13
Wire / E2 / Re: Help with this code
« on: September 17, 2015, 08:37 pm »
you need to place escaped quotes around what you want say to say
ie concmd("say \"I love cats\"") would work

14
I've noticed currently when you are lockpicking or keypad cracking you cannot hear the sound of the lockpick or keypad but everyone else can. I don't know if this is intentional or just a glitch but It would be great if you could be able to hear the sounds everyone else hears while your raiding.

Thanks!
-Cyanide

-support It's not really necessary. You know when you're cracking/lockpicking anyway when the hint pops up.
yes but if it does make a sound you want to know to be more alert. It would be really nice to hear it again.

15
Wire / E2 / Re: [REQUEST]E2 EGP HELP
« on: August 06, 2015, 11:51 pm »
Code: [Select]
function number wirelink:button(ID:number,Cursor:vector2){
    local BPos = This:egpPos(ID)
    local BSize = This:egpSize(ID)/2
    local Pressed = inrange(Cursor,BPos-BSize,BPos+BSize)
    return Pressed
}
This is one way of doing it which you can find in http://www.bybservers.co.uk/index.php?topic=15360.0 EGPLib file. You can look at his e2 on how to use it. His egplib also has some nice functions for egp screens

Pages: [1] 2 3 ... 52