April 07, 2020, 12:16 am

Author Topic: Give me some E2 ideas!  (Read 40986 times)

Offline Spoofzor

  • ByB Fanatic
  • ****
  • Posts: 902
  • What do you mean that's as loud as it can go!?!
    • View Profile
Re: Give me some E2 ideas!
« Reply #15 on: August 30, 2011, 11:10 pm »
Make a target finder that I can set to: players, npcs or models.
To lazy to do it myself and it keeps you rollin' :3

Wouldn't this just be something like:

@persist Tracking:array Distance:array Z
runOnChat(1)

A = owner():lastSaid():explode(" ")
if(A[1,string]==".track" & A[2,string]=="players" & chatClk(owner()){

Tracking = players()
}

Z = 0
while(Z < Tracking:count()+1){
if(Z < Tracking:count()+1){
Distance[Z,number] = (Tracking[Z,entity]:pos() - owner():pos()):length
}
Z++
}

if you wanted to do NPC/model you could just do findByModel("").

Right?
#You could use owner() or entity() here if depending on what you wanted the distance from

Offline Spoofzor

  • ByB Fanatic
  • ****
  • Posts: 902
  • What do you mean that's as loud as it can go!?!
    • View Profile
Re: Give me some E2 ideas!
« Reply #16 on: August 31, 2011, 12:38 am »
I've pretty much finished the BlackJack game.
Has 4 players, each with their own button which gives them another card.
Each Player has their own screen which tells them the last card they were dealt, and their total.
If you go over 21 you bust, obviously.

Gonna change/add a couple things then I'll post it here.
Then I guess I'll finish Bouche's target finder.

Keep the ideas coming.

Edit: After realizing that Aces have to be dynamic (DOH!) I decided to recode it from scratch.
« Last Edit: August 31, 2011, 01:18 am by Spoofzor »

Offline Destro

  • ByB Fanatic
  • ****
  • Posts: 872
    • View Profile
Re: Give me some E2 ideas!
« Reply #17 on: August 31, 2011, 03:03 am »
Make an e2 that generates Rp money.







>Jokes<

Offline Spoofzor

  • ByB Fanatic
  • ****
  • Posts: 902
  • What do you mean that's as loud as it can go!?!
    • View Profile
Re: Give me some E2 ideas!
« Reply #18 on: August 31, 2011, 09:17 pm »
Finished Blackjack, starting on the target finder.

Will post the dupe.txt file here in a minute.

Offline Spoofzor

  • ByB Fanatic
  • ****
  • Posts: 902
  • What do you mean that's as loud as it can go!?!
    • View Profile
Re: Give me some E2 ideas!
« Reply #19 on: August 31, 2011, 09:36 pm »
Code: [Select]
@name Blackjack
@inputs P1Hit P1:wirelink Reset
@outputs
@persist [Cards P1Cards]:array P1count Z X C
@trigger
#Created By: [email protected]
#Created For: ByB Community
#bybservers.co.uk
 
if(first() | Reset){
    Cards[1,string] = "Ace of Hearts"
    Cards[2,string] = "2 of Hearts"
    Cards[3,string] = "3 of Hearts"
    Cards[4,string] = "4 of Hearts"
    Cards[5,string] = "5 of Hearts"
    Cards[6,string] = "6 of Hearts"
    Cards[7,string] = "7 of Hearts"
    Cards[8,string] = "8 of Hearts"
    Cards[9,string] = "9 of Hearts"
    Cards[10,string] = "10 of Hearts"
    Cards[11,string] = "Jack of Hearts"
    Cards[12,string] = "Queen of Hearts"
    Cards[13,string] = "King of Hearts"
    Cards[14,string] = "Ace of Diamonds"
    Cards[15,string] = "2 of Diamonds"
    Cards[16,string] = "3 of Diamonds"
    Cards[17,string] = "4 of Diamonds"
    Cards[18,string] = "5 of Diamonds"
    Cards[19,string] = "6 of Diamonds"
    Cards[20,string] = "7 of Diamonds"
    Cards[21,string] = "8 of Diamonds"
    Cards[22,string] = "9 of Diamonds"
    Cards[23,string] = "10 of Diamonds"
    Cards[24,string] = "Jack of Diamonds"
    Cards[25,string] = "Queen of Diamonds"
    Cards[26,string] = "King of Diamonds"
    Cards[27,string] = "Ace of Spades"
    Cards[28,string] = "2 of Spades"
    Cards[29,string] = "3 of Spades"
    Cards[30,string] = "4 of Spades"
    Cards[31,string] = "5 of Spades"
    Cards[32,string] = "6 of Spades"
    Cards[33,string] = "7 of Spades"
    Cards[34,string] = "8 of Spades"
    Cards[35,string] = "9 of Spades"
    Cards[36,string] = "10 of Spades"
    Cards[37,string] = "Jack of Spades"
    Cards[38,string] = "Queen of Spades"
    Cards[39,string] = "King of Spades"
    Cards[40,string] = "Ace of Clubs"
    Cards[41,string] = "2 of Clubs"
    Cards[42,string] = "3 of Clubs"
    Cards[43,string] = "4 of Clubs"
    Cards[44,string] = "5 of Clubs"
    Cards[45,string] = "6 of Clubs"
    Cards[46,string] = "7 of Clubs"
    Cards[47,string] = "8 of Clubs"
    Cards[48,string] = "9 of Clubs"
    Cards[49,string] = "10 of Clubs"
    Cards[50,string] = "Jack of Clubs"
    Cards[51,string] = "Queen of Clubs"
    Cards[52,string] = "King of Clubs"
    P1count = 0
    P1[2041] = 1
    Z = 1
}
if(P1Hit & P1count < 21){
    Z = 1
    A = round(random(Cards:count()-1)+1)
    B = Cards[A,string]:explode(" ")
    P1Cards:pushString(Cards[A,string])
    P1:writeString("                 ",1,2,999,0)
    P1:writeString(Cards[A,string],1,2,999,0)
   
            Cards:remove(A)
            while(X <= P1Cards:count()){
                if(X <= P1Cards:count()){
                E = P1Cards[X,string]:explode(" ")
                if(E[1,string]=="2"){
                    Value = 2
                    P1count = P1count + Value
                }elseif(E[1,string]=="3"){
                    Value = 3
                    P1count = P1count + Value
                }elseif(E[1,string]=="4"){
                    Value = 4
                    P1count = P1count + Value
                }elseif(E[1,string]=="5"){
                    Value = 5
                    P1count = P1count + Value
                }elseif(E[1,string]=="6"){
                    Value = 6
                    P1count = P1count + Value
                }elseif(E[1,string]=="7"){
                    Value = 7
                    P1count = P1count + Value
                }elseif(E[1,string]=="8"){
                    Value = 8
                    P1count = P1count + Value
                }elseif(E[1,string]=="9"){
                    Value = 9
                    P1count = P1count + Value
                }elseif(E[1,string]=="10"){
                    Value = 10
                    P1count = P1count + Value
                }elseif(E[1,string]=="Jack"){
                    Value = 10
                    P1count = P1count + Value
                }elseif(E[1,string]=="Queen"){
                    Value = 10
                    P1count = P1count + Value
                }elseif(E[1,string]=="King"){
                    Value = 10
                    P1count = P1count + Value
                }elseif(E[1,string]=="Ace"){
                        Value = 11
                        P1count = P1count + Value
                    }
            }
        X++

}
   
}elseif(P1count > 21){

while(C <= P1Cards:count()){
            if(C <= P1Cards:count()){
                F = P1Cards[C,string]:explode(" ")
                if(F[1,string]=="Ace" & P1count > 21){
                    P1count = P1count - 10
                }
        }
        C++
    }
    if(P1count > 21){
        P11count = P1count
}
}elseif(P1count == 21){
    P1:writeString("You Win!",1,8,999,0)
}
if(P11count > 21){
    P1:writeString("You Busted!",1,8,999,0)
}



P1:writeString("Last Card Dealt To You: ",1,1,999,0)

P1:writeString("Your Total Is: "+P1count,1,5,999,0)

Wire P1hit to a button Reset to a button and P1 to a console screen.

Keep the ideas coming.

Offline Hitori the Lone Wolf

  • ByB Champion
  • *****
  • Posts: 2270
  • Cake is so utterly delightful.
    • View Profile
    • Used to own a website and several private servers. Closed them all. Took up sorcery.
Re: Give me some E2 ideas!
« Reply #20 on: August 31, 2011, 09:40 pm »
You could always add Double Down to the blackjack.

What are the rules? Dealer to Soft 17, to 16 then fold? Or just basic?

Offline Moosaphine

  • Root of all Evil
  • ByB Champion
  • *
  • Posts: 3145
  • I am amazing xo
    • View Profile
Re: Give me some E2 ideas!
« Reply #21 on: August 31, 2011, 09:45 pm »
Poker.

Now.

Lol jokes im not that rude,

but serisouly that would be cool.
Jamie : Oli we are so having a LAN party soon
... wait, Oli can you get up stairs?
*Facepalm*


Offline Stormbringer

  • ByB Newbie
  • *
  • Posts: 0
  • That was lefthanded.
    • View Profile
Re: Give me some E2 ideas!
« Reply #22 on: August 31, 2011, 09:49 pm »
Actually, I'd like to play some Poker/Black Jack. Casino de Broyal?

Offline Spoofzor

  • ByB Fanatic
  • ****
  • Posts: 902
  • What do you mean that's as loud as it can go!?!
    • View Profile
Re: Give me some E2 ideas!
« Reply #23 on: August 31, 2011, 09:55 pm »
The blackjack I made is just basic, 1 player - goal is to reach 21.
I'll add multiplayer where you play against the dealer and bet at a later point, but I had to recode it all a couple times due to the aces giving me a big problem, but in the end I got it.
Edit: But BlackJack pissed me off a bit so im gonna come back to it.


Poker would be extremely cool.
5 card draw or texas hold'em?

Either way I think it would be insanely hard to code, but I could give it a shot.

Gonna try the target finder for Bouche first though.

Offline Hitori the Lone Wolf

  • ByB Champion
  • *****
  • Posts: 2270
  • Cake is so utterly delightful.
    • View Profile
    • Used to own a website and several private servers. Closed them all. Took up sorcery.
Re: Give me some E2 ideas!
« Reply #24 on: August 31, 2011, 10:13 pm »
The Blackjack works a charm. When/if you update it, a betting function utilizing our Money Pots would be great!

Offline Spoofzor

  • ByB Fanatic
  • ****
  • Posts: 902
  • What do you mean that's as loud as it can go!?!
    • View Profile
Re: Give me some E2 ideas!
« Reply #25 on: September 01, 2011, 02:00 am »
The Blackjack works a charm. When/if you update it, a betting function utilizing our Money Pots would be great!

Yeah, I'll probably do that if I don't get any other ideas before I finish this 5card draw poker.

Bouche:
Code: [Select]
@name Target Finder
@inputs
@outputs
@persist NPCA:array PropA:array
@trigger
#Created By: [email protected]
#Created For: Bouche [email protected] + ByB Community
#www.bybservers.co.uk
runOnChat(1)

A = owner():lastSaid():explode(" ")
if(A[1,string]==".track" & chatClk(owner())){
    if(A[2,string]=="player"){
    Player = findPlayerByName(A[3,string])
    PlayerDis = (owner():pos() - Player:pos()):length()
    if(PlayerDis > 1 & PlayerDis < 10000){
        print(PlayerDis)
        print(Player:id())
    }else{
        print("Player not in range")}
    }elseif(A[2,string]=="npc"){
    findByModel(A[3,string])
    NPCA = findToArray()
    NPCDis = (owner():pos() - NPCA[1,entity]:pos()):length()
    if(NPCDis > 1 & NPCDis < 10000){
        print(NPCDis)
        print(NPCA[1,entity]:id())
    }else{
        print("NPC not in range")}
    }elseif(A[2,string]=="prop"){
    findByModel(A[3,string])
    PropA = findToArray()
    PropDis = (owner():pos() - PropA[1,entity]:pos()):length()
    if(PropDis > 1 & PropDis < 10000){
        print(PropDis)
        print(PropA[1,entity]:id())
    }else{
        print("Prop not in range")
    }
    }
}

Not sure if this is exactly what you wanted but that's my first stab at it.
Let me know.

5 Card Poker Status:

Code: [Select]
@name 5 Card Draw Poker
@inputs Deal Reset [P1 P2 P3 Dealer]:wirelink
@outputs
@persist Cards:array [P1Cards P2Cards P3Cards DCards]:array
@trigger
if(first() | Reset){
    Cards[1,string] = "Ace of Hearts"
    Cards[2,string] = "2 of Hearts"
    Cards[3,string] = "3 of Hearts"
    Cards[4,string] = "4 of Hearts"
    Cards[5,string] = "5 of Hearts"
    Cards[6,string] = "6 of Hearts"
    Cards[7,string] = "7 of Hearts"
    Cards[8,string] = "8 of Hearts"
    Cards[9,string] = "9 of Hearts"
    Cards[10,string] = "10 of Hearts"
    Cards[11,string] = "Jack of Hearts"
    Cards[12,string] = "Queen of Hearts"
    Cards[13,string] = "King of Hearts"
    Cards[14,string] = "Ace of Diamonds"
    Cards[15,string] = "2 of Diamonds"
    Cards[16,string] = "3 of Diamonds"
    Cards[17,string] = "4 of Diamonds"
    Cards[18,string] = "5 of Diamonds"
    Cards[19,string] = "6 of Diamonds"
    Cards[20,string] = "7 of Diamonds"
    Cards[21,string] = "8 of Diamonds"
    Cards[22,string] = "9 of Diamonds"
    Cards[23,string] = "10 of Diamonds"
    Cards[24,string] = "Jack of Diamonds"
    Cards[25,string] = "Queen of Diamonds"
    Cards[26,string] = "King of Diamonds"
    Cards[27,string] = "Ace of Spades"
    Cards[28,string] = "2 of Spades"
    Cards[29,string] = "3 of Spades"
    Cards[30,string] = "4 of Spades"
    Cards[31,string] = "5 of Spades"
    Cards[32,string] = "6 of Spades"
    Cards[33,string] = "7 of Spades"
    Cards[34,string] = "8 of Spades"
    Cards[35,string] = "9 of Spades"
    Cards[36,string] = "10 of Spades"
    Cards[37,string] = "Jack of Spades"
    Cards[38,string] = "Queen of Spades"
    Cards[39,string] = "King of Spades"
    Cards[40,string] = "Ace of Clubs"
    Cards[41,string] = "2 of Clubs"
    Cards[42,string] = "3 of Clubs"
    Cards[43,string] = "4 of Clubs"
    Cards[44,string] = "5 of Clubs"
    Cards[45,string] = "6 of Clubs"
    Cards[46,string] = "7 of Clubs"
    Cards[47,string] = "8 of Clubs"
    Cards[48,string] = "9 of Clubs"
    Cards[49,string] = "10 of Clubs"
    Cards[50,string] = "Jack of Clubs"
    Cards[51,string] = "Queen of Clubs"
    Cards[52,string] = "King of Clubs"
    P1[2041] = 1
    P2[2041] = 1
    P3[2041] = 1
    Dealer[2041] = 1
    Z = 0
}
if(Deal){
    while(Z <= DCards:count()){
        if(DCards:count()!=5){
    B = randint(1,Cards:count())
    P1Cards:pushString(Cards[B,string])
    Cards:remove(B)
    if(P1Cards:count()==Z+1){
        C = randint(1,Cards:count())
        P2Cards:pushString(Cards[C,string])
        Cards:remove(C)
        if(P2Cards:count()==Z+1){
            D = randint(1,Cards:count())
            P3Cards:pushString(Cards[D,string])
            Cards:remove(D)
            if(P3Cards:count()==Z+1){
                E = randint(1,Cards:count())
                DCards:pushString(Cards[E,string])
                Cards:remove(E)
            }
        }
    }
   
}
Z++
}
}
P1:writeString("Your Hand:",1,1,999,0)
P2:writeString("Your Hand:",1,1,999,0)
P3:writeString("Your Hand:",1,1,999,0)
Dealer:writeString("Your Hand:",1,1,999,0)

if(P1Cards:count()==5){
    P1:writeString(P1Cards[1,string],1,2,999,0)
    P1:writeString(P1Cards[2,string],1,3,999,0)
    P1:writeString(P1Cards[3,string],1,4,999,0)
    P1:writeString(P1Cards[4,string],1,5,999,0)
    P1:writeString(P1Cards[5,string],1,6,999,0)
   
}
if(P2Cards:count()==5){
    P2:writeString(P2Cards[1,string],1,2,999,0)
    P2:writeString(P2Cards[2,string],1,3,999,0)
    P2:writeString(P2Cards[3,string],1,4,999,0)
    P2:writeString(P2Cards[4,string],1,5,999,0)
    P2:writeString(P2Cards[5,string],1,6,999,0)
}
if(P3Cards:count()==5){
    P3:writeString(P3Cards[1,string],1,2,999,0)
    P3:writeString(P3Cards[2,string],1,3,999,0)
    P3:writeString(P3Cards[3,string],1,4,999,0)
    P3:writeString(P3Cards[4,string],1,5,999,0)
    P3:writeString(P3Cards[5,string],1,6,999,0)
}
if(DCards:count()==5){
    Dealer:writeString(DCards[1,string],1,2,999,0)
    Dealer:writeString(DCards[2,string],1,3,999,0)
    Dealer:writeString(DCards[3,string],1,4,999,0)
    Dealer:writeString(DCards[4,string],1,5,999,0)
    Dealer:writeString(DCards[5,string],1,6,999,0)
}

Currently just deals each player 5 cards.
Working on a way to have players turn cards in and get the same number back.

Offline Destro

  • ByB Fanatic
  • ****
  • Posts: 872
    • View Profile
Re: Give me some E2 ideas!
« Reply #26 on: September 01, 2011, 04:06 am »
Im actualy Looking forward to this e2. I myself have an account on tigergaming "blackjack""poker" and I have setup my bank account to the site and I started low like 10 cents winner gets like 1$ but Ive mad a total profit of 184$ and lost 24$.

Offline b0unty

  • ByB Novice
  • ***
  • Posts: 278
  • I banned Dan for no reason!
    • View Profile

Offline Hitori the Lone Wolf

  • ByB Champion
  • *****
  • Posts: 2270
  • Cake is so utterly delightful.
    • View Profile
    • Used to own a website and several private servers. Closed them all. Took up sorcery.
Re: Give me some E2 ideas!
« Reply #28 on: September 01, 2011, 09:57 am »
Our pro coder http://www.wiremod.com/forum/expression-2-discussion-help/27296-e2-blackjack.html

So...what? He asked for help, like everyone else has at one point or another.

Offline Moosaphine

  • Root of all Evil
  • ByB Champion
  • *
  • Posts: 3145
  • I am amazing xo
    • View Profile
Re: Give me some E2 ideas!
« Reply #29 on: September 01, 2011, 10:28 am »
Our pro coder http://www.wiremod.com/forum/expression-2-discussion-help/27296-e2-blackjack.html

He still coded it himself, he just asked help on one minor thing,

C'mon Bounty ;/
Jamie : Oli we are so having a LAN party soon
... wait, Oli can you get up stairs?
*Facepalm*