October 14, 2024, 07:31:23 pm

Author Topic: Code  (Read 12350 times)

Lord Tony Spike

  • Lord Exodus
  • Prisoner
  • *****
  • Posts: 2979
  • Karma: +0/-0
Code
« on: December 15, 2020, 08:30:52 am »
Those of you who are into coding may post your code snippets here
Quote
"Give me a gun that never fires! Give me a sword that is ever blunt! Give me a weapon that deals no wound, so long as it always strikes fear!"

Lord Tony Spike

  • Lord Exodus
  • Prisoner
  • *****
  • Posts: 2979
  • Karma: +0/-0
Re: Code
« Reply #1 on: December 15, 2020, 08:36:08 am »
Single Entrance Code

Makes wrestlers enter from only 1 side of the arena

PLAYERS.BB

Quote
;default positions
  pOutTim(cyc)=0 : pFoc(cyc)=0
  If pRole(cyc)=0
   curtainSlot(pCurtain(cyc))=curtainSlot(pCurtain(cyc))+1
   If matchTeams=0
    slotter=(no_wrestlers-(no_wrestlers/2))-curtainSlot(pCurtain(cyc))
    If slotter<0 Then slotter=0
    If pCurtain(cyc)=1 Then pZ#(cyc)=410+(20*slotter) : pA#(cyc)=180
    slotter=(no_wrestlers/2)-curtainSlot(pCurtain(cyc))
    If slotter<0 Then slotter=0
    If pCurtain(cyc)=2 Then pZ#(cyc)=410+(20*slotter) : pA#(cyc)=180  ;changed -410- to + and 0 to 180
   Else
    If pCurtain(cyc)=1 Then pZ#(cyc)=390+(20*curtainSlot(pCurtain(cyc))) : pA#(cyc)=180
    ;If pCurtain(cyc)=2 Then pZ#(cyc)=-390-(20*curtainSlot(pCurtain(cyc))) : pA#(cyc)=0  ;changed
   If pCurtain(cyc)=2 Then pZ#(cyc)=-390+(20*curtainSlot(pCurtain(cyc))) : pA#(cyc)=180   
EndIf
   pX#(cyc)=0 : pY#(cyc)=wGround#
  EndIf
  If pRole(cyc)=1 
   Repeat
    pX#(cyc)=Rnd(-130,130) : pZ#(cyc)=Rnd(-130,130)
   Until InsideRing(pX#(cyc),pZ#(cyc),0)=0
   pY#(cyc)=wGround# : pA#(cyc)=Rnd(0,360)
   pOutTim(cyc)=100
  EndIf
  If pRole(cyc)=2
   If pZ#(pClient(cyc))>0 Then pZ#(cyc)=pZ#(pClient(cyc))+10 : pA#(cyc)=180 
   If pZ#(pClient(cyc))<0 Then pZ#(cyc)=pZ#(pClient(cyc))+10 : pA#(cyc)=180  ;changed to +10 and 0 to 180
   randy=Rnd(0,1)
   If randy=0 Then pX#(cyc)=pX#(pClient(cyc))+10 Else pX#(cyc)=pX#(pClient(cyc))+10 ;changed -10 to +10 first one
   pY#(cyc)=pY#(pClient(cyc))
  EndIf
Quote
"Give me a gun that never fires! Give me a sword that is ever blunt! Give me a weapon that deals no wound, so long as it always strikes fear!"