Batch Battle System

Questions about programming languages and debugging
Post Reply
PopPooB
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 236
Joined: 16 May 2007, 16:00
16
Location: CandyLand
Contact:

Batch Battle System

Post by PopPooB »

my battle system for my game dont work

heres the battle system

Code: Select all

call %benemy%
echo You are in a battle.
echo enemy name is %enename%.
echo exp from enemy is %eneexp%.
echo enemys hp is %enehealth%
pause
cls
:battleboa
echo Battle begin
:battlestart
set /a %enehealth%-%plyra1%
echo Dealt %plyra1%dmg on the %enename%
echo %enename% has %enehealth%hp left
set /a %plyrhealth%-%enea1%
echo %enename% Dealt %enea1%dmg on you
echo you have %plyrhealth%hp left
if %enehealth% LEQ 0 goto battlewin
if %plyrhealth% LEQ 0 goto battlelose
echo.
set /a %enehealth%-%plyra2%
echo Dealt %plyra2%dmg on the %enename%
echo %enename% has %enehealth%hp left
set /a %plyrhealth%-%enea2%
echo %enename% Dealt %enea2%dmg on you
echo you have %plyrhealth%hp left
if %enehealth% LEQ 0 goto battlewin
if %plyrhealth% LEQ 0 goto battlelose
echo.
set /a %enehealth%-%plyra3%
echo Dealt %plyra3%dmg on the %enename%
echo %enename% has %enehealth%hp left
set /a %plyrhealth%-%enea3%
echo %enename% Dealt %enea3%dmg on you
echo you have %plyrhealth%hp left
if %enehealth% LEQ 0 goto battlewin
if %plyrhealth% LEQ 0 goto battlelose
echo.
set /a %enehealth%-%plyra4%
echo Dealt %plyra4%dmg on the %enename%
echo %enename% has %enehealth%hp left
set /a %plyrhealth%-%enea4%
echo %enename% Dealt %enea4%dmg on you
echo you have %plyrhealth%hp left
if %enehealth% LEQ 0 goto battlewin
if %plyrhealth% LEQ 0 goto battlelose
echo.
set /a %enehealth%-%plyra5%
echo Dealt %plyra5%dmg on the %enename%
echo %enename% has %enehealth%hp left
set /a %plyrhealth%-%enea5%
echo %enename% Dealt %enea5%dmg on you
echo you have %plyrhealth%hp left
if %enehealth% LEQ 0 goto battlewin
if %plyrhealth% LEQ 0 goto battlelose
echo.
set /a %enehealth%-%plyra6%
echo Dealt %plyra6%dmg on the %enename%
echo %enename% has %enehealth%hp left
set /a %plyrhealth%-%enea6%
echo %enename% Dealt %enea6%dmg on you
echo you have %plyrhealth%hp left
if %enehealth% LEQ 0 goto battlewin
if %plyrhealth% LEQ 0 goto battlelose
echo.
pause
:battlehalf
cls
echo Continue Battle or go Back?
set /p battlechoi=Choice:
if %battlechoi%==Continue goto battlestart
if %battlechoi%==Back goto battleover
if %battlechoi%== goto battlehalf

:battlelose
echo You lose
pause
goto battleover

:battlewin
echo You win
set /a %plyrexp%+%eneexp%
you gained %eneexp%exp
pause
goto battleover

:battleover
echo Battle Over.
pause
and heres my player file

Code: Select all

set plyrname=PopPooB
set plyrexp=999999
set plyrsofar=0
set plyrhealth=40
set lbattle=no
set plyra1=2
set /a %plyra1%*%plyrexp%
set plyra2=3
set /a %plyra2%*%plyrexp%
set plyra3=3
set /a %plyra3%*%plyrexp%
set plyra4=2
set /a %plyra4%*%plyrexp%
set plyra5=2
set /a %plyra5%*%plyrexp%
set plyra6=3
set /a %plyra6%*%plyrexp%
if %plyrname%== goto error2
and heres my enemy file

Code: Select all

set enename=Battle Dummy
set eneexp=20
set enehealth=20
set enea1=0
set enea2=0
set enea3=0
set enea4=0
set enea5=0
set enea6=0

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

wow...very creative indeed :) i will have a look
"The best place to hide a tree, is in a forest"

PopPooB
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 236
Joined: 16 May 2007, 16:00
16
Location: CandyLand
Contact:

Post by PopPooB »

neo130 wrote:wow...very creative indeed :) i will have a look
its part of my based batch game it uses seperate bach files and the call command so i dont have to keep tryping the same thing in

shamir
Computer Manager
Computer Manager
Posts: 853
Joined: 01 Mar 2007, 17:00
17
Location: NY
Contact:

Post by shamir »

looks nice game :lol:

PopPooB
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 236
Joined: 16 May 2007, 16:00
16
Location: CandyLand
Contact:

BUMP

Post by PopPooB »

bump ](*,)

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: BUMP

Post by ayu »

PopPooB wrote:bump ](*,)
oh shit...i forgot to check it...sorry!! :oops:

just need some breakfast then i am checking lol
"The best place to hide a tree, is in a forest"

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

hmmm, i asume this isn't all of the game? =/

I mean i see no connections between the files, also what is the problem you have with it?
"The best place to hide a tree, is in a forest"

PopPooB
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 236
Joined: 16 May 2007, 16:00
16
Location: CandyLand
Contact:

Post by PopPooB »

neo130 wrote:hmmm, i asume this isn't all of the game? =/

I mean i see no connections between the files, also what is the problem you have with it?
the rest of game has nothing to do with it

the files have everything to do with each other

to make them work call the really big one "battle.bat" call the one with my name in it "slot1.bat" and the one with battle dummy in it "en1.bat"

then run a bat file like this

Code: Select all

:battlelearn
cls
set benemy=en1.bat
call slot1.bat
call battle.bat
goto battlelearn
the problem i have is that when the battle begins nobody gets hurt

Post Reply