April 06, 2020, 04:21 am

Author Topic: Commonly used E2s  (Read 12315 times)

Offline Kgwilson

  • Admin
  • ByB Fanatic
  • *
  • Posts: 383
  • who am i again?
    • View Profile
Commonly used E2s
« on: January 23, 2014, 12:41 am »
Decided to rewrite the E2s you guys use often, as I am tired of seeing 800 op e2 doors...

E2 door:
Code: [Select]
@outputs Door Allow:array
@persist Allow:array
if(first()|duped()) {
    setName(owner():name()+"'s E2 Door")
    Allow[1,entity]=owner()
    runOnChat(1)
}
interval(500)
findInSphere(entity():pos(),25)
findClipToClass("player")
Target=findResult(1)
for(I=1,Allow:count()) {
    if(Target&Target:isAlive()) {
        if(Target==Allow[I,entity]) {
            Door=1
            break
        }else{Door=0}
    }else{Door=0}
    if(!Allow[I,entity]:isPlayer()) { Allow:remove(I) }
}
if(chatClk(owner())) {
    A=owner():lastSaid():explode(" ")
    if(A[1,string]=="-add") {
        hideChat(1)
        Already=0
        TargetPlayer=findPlayerByName(A[2,string])
        if(Allow:count()<15) {
            if(TargetPlayer:isPlayer()) {
                for(I=1,Allow:count()) {
                    if(TargetPlayer==Allow[I,entity]) {
                        Already=1
                        printColor(vec(255,0,0),""+TargetPlayer:name()+" is already allowed")
                        break
                    }
                }
                if(Already==0) {
                    Allow:pushEntity(TargetPlayer)
                    printColor(vec(0,255,0),"Added "+TargetPlayer:name()+" to allow list")
                }
            }else{print("Not a player")} 
        }else{
            print("Too full.")
        }
    }
    if(A[1,string]=="-rem") {
    hideChat(1)
    TargetPlayer=findPlayerByName(A[2,string])
    if(TargetPlayer:isPlayer()) {
        for(I=1,Allow:count()) {
            if(TargetPlayer==owner()) { print("Can't do that,sorry!") break }
                if(TargetPlayer==Allow[I,entity]) {
                    Allow:remove(I)
                    printColor(vec(255,0,0),"Removed "+TargetPlayer:name()+" from allow list")
                }
            }
        }
    }
    if(A[1,string]=="-removeall") {
        Allow:clear()
        Allow[1,entity]=owner()
        printColor(vec(255,0,0),"Cleared everybody but you")       
    }
    if(A[1,string]=="-list") {
        for(I=1,Allow:count()) {
            print(Allow[I,entity]:name())
        }
    }
}
How to use E2 door
Using your Fading Door (ByB) tool, place a non-toggle fading door on the legal door prop of your choice.
Pull out your Advanced Wire tool, wire the Fading Door prop to the E2.
Add players using -add <player> and -rem <player>.
Ranger tripwire alarm and EGP gang screen
(Must use in conjunction with my E2 door)
Code: [Select]
@name Alarm and Gang screen
@inputs Allow:array Ranger1:entity Ranger2:entity EGP:wirelink
@outputs Output
@persist Output Time Count
interval(500)
if(first()|duped()|changed(EGP)) {
    setName(owner():name()+"'s Alarm and Gang Screen")
    function drawscreen() {
        EGP:egpClear()
        EGP:egpBox(90,vec2(256,256),vec2(900,900))
        EGP:egpColor(90,vec(100,0,255))
        EGP:egpMaterial(90,"skybox/militia_hdrft")
        EGP:egpColor(96,vec(92,92,92))
        EGP:egpRoundedBox(98,vec2(252,70),vec2(445,72))
        EGP:egpColor(98,vec(92,92,92))
        EGP:egpRoundedBox(99,vec2(252,70),vec2(440,65))
        EGP:egpCircle(101,vec2(70,70),vec2(50,50))
        EGP:egpColor(101,vec(92,92,92))
        EGP:egpCircle(102,vec2(70,70),vec2(45,45))
        EGP:egpBox(9,vec2(70,70),vec2(125,85))
        EGP:egpAngle(9,Time)
        EGP:egpMaterial(9,"weapons/weapon_mad_admin")
        EGP:egpRoundedBox(93,vec2(278,295),vec2(384,357))
        EGP:egpColor(93,vec(92,92,92))
        EGP:egpRoundedBox(94,vec2(279,294),vec2(375,350))
        EGP:egpText(65, "Gang Members", vec2(135,43))
        EGP:egpColor(65,vec(0,0,0))
        EGP:egpSize(65, 50)
    }
    drawscreen()
    if(!changed(EGP)&(!->Allow|!->EGP|!->Output)) {
        print("Wire Allow to Kg's e2 door and sound emitter with your alarm sound to the E2.")
        print("Gang members can type !off to turn off the alarm.")
    }
    runOnChat(1)
}
if(Ranger1:isPlayer()|Ranger2:isPlayer()) {
    for(I=1,Allow:count()) {
        if(Ranger1==Allow[I,entity]) {
            Triggered=0
            break
    }else{Triggered=1}
        if(Ranger2==Allow[I,entity]) {
            Triggered=0
            break
    }else{Triggered=1}
}
}else{Triggered=0}
if(Triggered==1) { Output=1 }
Time+=2
EGP:egpAngle(9,Time)
for(I=1,Allow:count()) {
    if(chatClk(Allow[I,entity])&Allow[I,entity]:lastSaid()=="!off") {
        hideChat(1)
        Output=0
    }

        if(I<=8) {
            EGP:egpText(I,Allow[I,entity]:name():left(18),vec2(120,100+(40*I)))
            EGP:egpColor(I,vec(0,0,0))
            EGP:egpSize(I, 30)
        }

}
Count=Allow:count()
if(changed(Count)) {
    drawscreen()
}
How to wire Alarm
Using your Advanced Wire tool, wire Ranger1 and Ranger2 to rangers, be sure to check box Output Entity + Entity ID on the Q menu box under Ranger,then wire Allow to the E2 door
Locate the sound browser...

Then:

Paste your sound emitter, then wire A to Output on the alarm e2.
Please note that gang members cannot trigger the alarm.
Printer Counter
Code: [Select]
@outputs TotalScreen TotalTextScreen:string Printers:array
@persist SuitZoom Total
interval(500)
if(first()) {
    print("Use Suit Zoom while looking at your printer to begin counting.\nThen wire a Screen to the E2.")
}
setName(owner():name()+"'s Printer Counter\n$"+Total+"("+Printers:count()+")")
SuitZoom=owner():keyZoom()
Total=0
if(($SuitZoom&SuitZoom)==1) {
    AimEnt=owner():aimEntity()
    if(AimEnt:type()=="money_printer") {
        if(Printers:count()!=0) {
            Already=0
            for(I=1,Printers:count()) {
                if(AimEnt==Printers[I,entity]) {
                    Already=1
                    break
                }
            }
            if(Already==0) {
                print("Adding a "+AimEnt:printerType()+" printer to the list.")
                Printers:pushEntity(AimEnt)
            }else{
                print("Already exists.")
            }
        }else{
                print("Adding a "+AimEnt:printerType()+" printer to the list.")
                Printers:pushEntity(AimEnt)
            }
    }
}
for(I=1,Printers:count()){
    if(Printers[I,entity]:isPrinter()) {
        Total += Printers[I,entity]:printedMoney()
        TotalScreen=Total
        PrinterCount=Printers:count()
        TotalTextScreen="Total:<br>$"+Total
    }else{
        Printers:remove(I)
    }
}
How to use the Printer Counter
Bind a key to Suit Zoom, using your options menu.


Pull out your Screen or Text Screen tool, of your choice
Advanced wire A of the screen or String of your text screen to the respective E2 output.

To begin tracking a printer, hover your crosshairs over it, and press your suit zoom key.
Please note - putting this printer counter on the OUTSIDE of your base is illegal!
Anybody found baiting police (via having this printer counter facing externally) will be punished accordingly.
PD Door
Code: [Select]
@outputs Door
interval(400)
if(first()|duped()) {
    setName(owner():name()+"'s PD Door")
}
findInSphere(entity():pos(),25)
findClipToClass("player")
Target=findResult(1)
if(Target:isAuthorisedPersonnel()|Target:isMayorAssistant()|Target:isPoliceDeputy()) {
    Door=1
}else{
    Door=0
}
How to wire the PD door
Please view the E2 door instructions.
« Last Edit: July 16, 2014, 08:50 pm by Kgwilson »

Offline Deluxe

  • ByB Champion
  • *****
  • Posts: 1628
    • View Profile
Re: Commonly used E2s
« Reply #1 on: January 23, 2014, 03:26 am »
Thanks for the releases KG :)
Peace love and positvity.

Offline Custom

  • Supporter
  • ByB Rookie
  • *
  • Posts: 128
  • ignorance is bliss.
    • View Profile
Re: Commonly used E2s
« Reply #2 on: January 23, 2014, 04:56 am »
Thanks KG!

Offline Mariuss

  • Supporter
  • ByB Fanatic
  • *
  • Posts: 309
  • ಥ_ಥI actually enjoy ByB ಥ_ಥ
    • View Profile
    • http://steamcommunity.com/profiles/76561198033814455/
Re: Commonly used E2s
« Reply #3 on: January 23, 2014, 07:13 am »
wow, i really needed tripwire e2, thanks man:)



<3

Offline Leonard Potato

  • Supporter
  • ByB Fanatic
  • *
  • Posts: 441
  • Insert clever text here!
    • View Profile
Re: Commonly used E2s
« Reply #4 on: January 23, 2014, 11:43 am »
Kg, too kind <3


Offline Esrever

  • ByB Newbie
  • *
  • Posts: 20
  • Ain't no reason running after somthin already gone
    • View Profile
Re: Commonly used E2s
« Reply #5 on: January 23, 2014, 08:52 pm »
thanks so much Kg! time to test these out!
-- Signature removed, invalid dimensions & unreasonable size --

Offline Jelman

  • Jelmani
  • ByB Champion
  • *
  • Posts: 1679
    • View Profile
Re: Commonly used E2s
« Reply #6 on: January 24, 2014, 08:08 pm »
500-3000 OPS? NOT ENOUGH!


Seriously though, thanks very much Kg.






His Grace Snoop of House Dogg, first in his name; Kushleesi; The Unblazed; Brother of Green Dragon Sativas; embarks on a quest to reclaim Weedsteros

Offline jacbeck

  • ByB Newbie
  • *
  • Posts: 14
  • Master Of Illusion
    • View Profile
Re: Commonly used E2s
« Reply #7 on: July 21, 2014, 10:33 pm »
you don't realize how many n00bs you have helped xD

Offline supetpetter10

  • ByB Newbie
  • *
  • Posts: 4
  • Lemme get that ass
    • View Profile
Re: Commonly used E2s
« Reply #8 on: August 14, 2014, 09:10 am »
nice thx alot

Offline Call Me Cake

  • Supporter
  • ByB Newbie
  • *
  • Posts: 4
  • Master Of Illusion
    • View Profile
Re: Commonly used E2s
« Reply #9 on: April 24, 2015, 08:47 pm »
Nice Job Kgwilson This Will Help A Lot Of New Supporters









Member Of Byb For 2 1/2 Years

Offline JayusWooshus

  • Admin
  • ByB Fanatic
  • *
  • Posts: 890
  • The Supreme Overlord.
    • View Profile
Re: Commonly used E2s
« Reply #10 on: April 26, 2015, 03:34 am »
Please don't necro posts. Call Me Cake (This means replying to posts that were long dead in the depths of a forum). The last post on this thread was nearly a year ago.
[On the subject of Chas offering sexual favors for money]
Nightmare: Does he take chocolate coins?
Jelman: Hell, I'll take chocolate coins!.. wait, don't quote me on that..

Offline StupidWeasel

  • Supporter
  • ByB Champion
  • *
  • Posts: 2646
    • View Profile
    • Moustaches through the ages: A Historial Account of Facial Hair
Re: Commonly used E2s
« Reply #11 on: April 26, 2015, 06:55 am »
Please don't necro posts. Call Me Cake (This means replying to posts that were long dead in the depths of a forum). The last post on this thread was nearly a year ago.
Not really an issue as this topic is stickied.

FunnyClaps

Offline JayusWooshus

  • Admin
  • ByB Fanatic
  • *
  • Posts: 890
  • The Supreme Overlord.
    • View Profile
Re: Commonly used E2s
« Reply #12 on: April 26, 2015, 09:03 am »
Please don't necro posts. Call Me Cake (This means replying to posts that were long dead in the depths of a forum). The last post on this thread was nearly a year ago.
Not really an issue as this topic is stickied.

His post was still unnecessary, but mkay :3
[On the subject of Chas offering sexual favors for money]
Nightmare: Does he take chocolate coins?
Jelman: Hell, I'll take chocolate coins!.. wait, don't quote me on that..

Offline StupidWeasel

  • Supporter
  • ByB Champion
  • *
  • Posts: 2646
    • View Profile
    • Moustaches through the ages: A Historial Account of Facial Hair
Re: Commonly used E2s
« Reply #13 on: April 26, 2015, 03:53 pm »
His post was still unnecessary, but mkay :3
No more unnecessary then any other post. Certainly more necessary then this discussion about the necessity of posts.

FunnyClaps