Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- color 0e
- title Array RPG Offline
- :start
- cls
- echo ---------------------------
- echo Array RPG Offline
- echo ---------------------------
- echo 1) Start Game
- echo 2) Options
- echo 0) Exit
- echo ---------------------------
- choice /c 120 /n >nul
- if %errorlevel% == 1 (
- call :playerPartyData
- call :getCurrentPartyMems
- set /p partyData[0].Name=Enter your Name:
- goto game
- )
- if %errorlevel% == 2 (
- goto options
- )
- if %errorlevel% == 3 (
- exit
- )
- goto start
- :playerPartyData
- set f=1
- set h=0
- set hires=0
- set hired=0
- set hireSelect=0
- set partySelect=0
- set partySize=0
- set partyData[0].Name=Player
- set partyData[0].Armor=Cloth Rags
- set partyData[0].Weapon=Bare Fists
- set partyData[0].Level=1
- set partyData[0].Kills=0
- set partyData[0].Gold=0
- set partyData[0].Class=No Class
- set partyData[0].ID=0
- set hireGen[0].Class=No Class
- set hireGen[0].ID=0
- goto:eof
- :game
- cls
- echo -------------------------------------------------------------------------------------
- echo Name:%partyData[0].Name% /\ Level:%partyData[0].Level% /\ Armor:%partyData[0].Armor% /\ Weapon:%partyData[0].Weapon%
- echo -------------------------------------------------------------------------------------
- echo 1) Explore
- echo 2) Party Menu
- echo 3) Hire Board
- echo --------------------
- choice /c 123 /n >nul
- if %errorlevel% == 1 (
- goto game
- )
- if %errorlevel% == 2 (
- goto PartyMenu
- )
- if %errorlevel% == 3 (
- goto HireBoard
- )
- goto game
- :hireClasses
- if %ranClass% EQU 1 (
- set randomClass=Samurai
- )
- if %ranClass% EQU 2 (
- set randomClass=Marksmen
- )
- if %ranClass% EQU 3 (
- set randomClass=Beserker
- )
- if %ranClass% EQU 4 (
- set randomClass=Mage
- )
- if %ranClass% EQU 5 (
- set randomClass=Assassin
- )
- goto:eof
- :createHire
- set /a ranCost=%random%%%1500+500
- set /a ranLevel=%random%%%5+1
- call set hireGen[%hires%].Class=%randomClass%
- call set /a hireGen[%hires%].ID=%hires%
- call set /a hireGen[%hires%].Level=%ranLevel%
- call set /a hireGen[%hires%].Cost=%ranCost%*%ranLevel%
- set /a hires+=1
- goto:eof
- :HireBoard
- cls
- echo ---------------------------------
- echo Hiring Board
- echo ---------------------------------
- echo 1) Search Hiring Papers
- echo 2) Inspect Hires %hires%
- echo 3) Deny Papers
- echo 0) Return
- echo ---------------------------------
- echo Results:
- choice /c 1230 /n >nul
- if %errorlevel% == 1 (
- set /a ranClass=%random%%%5+1
- call :hireClasses
- call :createHire
- goto HireBoard
- )
- if %errorlevel% == 2 (
- goto inspectHire
- )
- if %errorlevel% == 3 (
- for /l %%j in (0 1 %hires%) do (
- set hireGen[%%j].ID=
- set hireGen[%%j].Level=
- set hireGen[%%j].Class=
- set hireGen[%%j].Cost=
- )
- set /a hires=0
- )
- if %errorlevel% == 4 (
- goto game
- )
- goto HireBoard
- :inspectHire
- cls
- echo --------------------------
- echo Inspect List
- echo Hire ID Selected:%hireSelect%
- echo --------------------------
- echo 1) Select Which to Hire
- echo 2) Hire Selected
- echo 0) Return
- echo --------------------------
- for /l %%j in (0 1 %hires%) do (
- call echo ID = %%hireGen[%%j].ID%%
- call echo Class = %%hireGen[%%j].Class%%
- call echo Level = %%hireGen[%%j].Level%%
- call echo Asking Price = %%hireGen[%%j].Cost%% Gold
- call echo --------------------------
- )
- echo --------------------------
- choice /c 120 /n >nul
- if %errorlevel% == 1 (
- set /p hireSelect=Input Hire ID:
- goto inspectHire
- )
- if %errorlevel% == 2 (
- call :createHired
- goto inspectHire
- )
- if %errorlevel% == 3 (
- goto HireBoard
- )
- :createHired
- set /a hired+=1
- set /a hires-=1
- call set partyData[%hired%].Class=%%hireGen[%hireSelect%].Class%%
- call set partyData[%hired%].ID=%hired%
- call set partyData[%hired%].Name=Nameless
- call set partyData[%hired%].Level=%%hireGen[%hireSelect%].Level%%
- set hireGen[%hireSelect%].Class=
- set hireGen[%hireSelect%].Level=
- set hireGen[%hireSelect%].ID=
- set hireGen[%hireSelect%].Cost=
- call :getCurrentPartyMems
- goto:eof
- goto inspectHire
- :getCurrentPartyMems
- if defined partyData[%f%].ID (
- set /a partySize+=1
- ) else (
- set partyDataName=No Other Members.
- )
- goto:eof
- :PartyMenu
- cls
- echo ---------------------------------
- echo Name:%partyDataName%
- echo ---------------------------------
- echo 1) Speak to Party Member
- echo 2) View Party List %partySize%
- echo 3) Load Characters
- echo 4) Save Characters
- echo 0) Return
- echo ---------------------------------
- echo. %error%
- choice /c 12340 /n >nul
- if %errorlevel% == 1 (
- set /p partySelect=Party Member ID:
- if not defined partyData[%partySelect%].ID (
- set error=Not a Valid ID!
- goto PartyMenu
- ) else (set error=)
- call :memberDialogue
- call :dialogueSet
- goto partyDialogue
- )
- if %errorlevel% == 2 (
- goto partyList
- )
- if %errorlevel% == 3 (
- call :partyLoad
- goto PartyMenu
- )
- if %errorlevel% == 4 (
- call :partySave
- )
- if %errorlevel% == 5 (
- goto game
- )
- goto PartyMenu
- :dialogueSet
- set memberDialogue[1]=Yes sir?
- set memberDialogue[2]=Something you need?
- set memberDialogue[3]=What do you want to ask?
- set memberDialogue[4]=You wanted to talk?
- set memberDialogue[5]=What's on your mind?
- if %dialogueSet% EQU 1 (
- set dialogue[1]=%memberDialogue[1]%
- )
- if %dialogueSet% EQU 2 (
- set dialogue[1]=%memberDialogue[2]%
- )
- if %dialogueSet% EQU 3 (
- set dialogue[1]=%memberDialogue[3]%
- )
- if %dialogueSet% EQU 4 (
- set dialogue[1]=%memberDialogue[4]%
- )
- if %dialogueSet% EQU 5 (
- set dialogue[1]=%memberDialogue[5]%
- )
- goto:eof
- :memberDialogue
- set /a dialogueSet=%random%%%5+1
- call set partyDataName=%%partyData[%partySelect%].Name%%
- call set partyDataLevel=%%partyData[%partySelect%].Level%%
- call set partyDataID=%%partyData[%partySelect%].ID%%
- goto:eof
- :partyDialogue
- cls
- echo ---------------------------------
- echo %dialogue[1]%
- echo ---------------------------------
- echo Name: %partyDataName%
- echo Level: %partyDataLevel%
- echo ID: %partyDataID%
- echo ---------------------------------
- echo 1) Inspect Gear
- echo 2) Change Name
- echo 0) Return
- echo ---------------------------------
- choice /c 120 /n >nul
- if %errorlevel% == 1 (
- call :getPartyEquipment
- goto memberEquipment
- )
- if %errorlevel% == 2 (
- set /p partyData[%partySelect%].Name=Change Name to:
- goto partyDialogue
- )
- if %errorlevel% == 3 (
- goto PartyMenu
- )
- pause>nul
- goto partyMenu
- :partySave
- (
- for /l %%a in (0 1 %partySize%) do (
- call echo set partyData[%%a].Name=%%partyData[%%a].Name%%
- call echo set partyData[%%a].Level=%%partyData[%%a].Level%%
- call echo set partyData[%%a].Class=%%partyData[%%a].Class%%
- call echo set partyData[%%a].ID=%%partyData[%%a].ID%%
- )
- call echo set /a partySize=%partySize%
- ) > saveData.bat
- set error=Data Saved.
- goto:eof
- :partyLoad
- if exist saveData.bat (
- call saveData.bat
- set error=Party Data Loaded.
- ) else (
- set error=No Such Data Found!
- )
- set /a partySize=%partySize%
- goto:eof
- :getPartyEquipment
- call set memberArmor=%%partyData[%partySelect%].Armor%%
- call set memberWeapon=%%partyData[%partySelect%].Weapon%%
- goto:eof
- :memberEquipment
- cls
- echo ---------------------------
- echo Inspecting %partyDataName%
- echo ---------------------------
- echo Weapon:%memberWeapon%
- echo Armor:%memberArmor%
- echo ---------------------------
- echo 1) Outfit Weapon
- echo 2) Outfit Armor
- echo 0) Return
- choice /c 120 /n >nul
- if %errorlevel% == 1 (
- goto weaponOutfitter
- )
- if %errorlevel% == 2 (
- goto armorOutfitter
- )
- if %errorlevel% == 3 (
- set dialogue[1]=Anything else?
- goto partyDialogue
- )
- goto memberEquipment
- :partyList
- cls
- echo --------------------------
- echo Party ID List
- echo --------------------------
- for /l %%j in (0 1 %partySize%) do (
- call echo Name = %%partyData[%%j].Name%%
- call echo Class = %%partyData[%%j].Class%%
- call echo Level = %%partyData[%%j].Level%%
- call echo ID = %%partyData[%%j].ID%%
- call echo --------------------------
- )
- echo --------------------------
- pause>nul
- goto PartyMenu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement