首先,如果有一个问题同样的问题,我很抱歉,但我找不到它。
好吧,我目前正处于批量RPG的计划阶段。除了故事情节和所有这些,我还计划功能。其中一个我正在考虑的是任务,但我不知道如何在游戏中放置任务。我先问雅虎的答案,但有人告诉我,我会在这里得到更好的答案,所以如果有人能告诉我怎么做,也许可以输入一个简单的例子,那将非常感激。谢谢。
答案 0 :(得分:2)
批量创建任务几乎是不可能的,但对于逐级工作的RPG,您需要执行以下操作:
:level1
set health=100
echo quest-level-1.
pause
goto level2
:level2
set health=80
echo quest-level-2
if health=80 goto finish
:finish
You have completed the quest!
pause
goto start
这将是一个很好的任务类型。如果你想让它更逼真,你也可以添加一个能量棒。
答案 1 :(得分:0)
很简单,尽管你可能认为很难。我会告诉你我的批量RPG代码(如果你使用它,那就好了!)
:questsC
cls
if %Q% LEQ 0 goto quests
if %GQ% GEQ 1 goto GQuestC
if %PQ% GEQ 1 goto PQuestC
if %WQ% GEQ 1 goto WQuestC
if %CPQ% GEQ 1 goto CPQuestC
:quests
set GK=0
set PK=0
cls
echo Select a quest
echo.
echo 1) Kill 5 Goblins (+50 Gold!)
echo 2) Kill 5 Evil Pizzas (+75 Gold!)
echo 3) Kill 5 Wolfs (+150 Gold!)
echo 4) Kill 5 Chili Peppers (+200 Gold!)
echo 5) Go back home
set /p quest=
if %quest% == 1 goto QGS
if %quest% == 2 goto QPS
if %quest% == 3 goto QWS
if %quest% == 4 goto CPWS
if %quest% == 5 goto begin
:CPWS
set CPK=0
set CPQ=1
set Q=1
goto begin
:CPQuestC
if %CPK% GEQ 5 goto CPQuest
if %CPK% LSS 5 goto QuestCP
:QuestCP
cls
echo Quest not complete. You only have %CPK% kills.
pause
goto begin
:CPQuest
Start Levelup.mp3
cls
set CPQ=0
set /a Gold=%Gold%+200
set /a EXP=%EXP%+200
cls
echo Quest Complete! You got 200 gold and 200 exp!
pause
goto begin
:QWS
set WK=0
set WQ=1
set Q=1
goto begin
:QGS
set GK=0
set GQ=1
set Q=1
goto begin
:QPS
set PK=0
set PQ=1
set Q=1
goto begin
:GQuestC
if %GK% GEQ 5 goto GQuest
if %GK% LSS 5 goto QuestG
:WQuestC
if %WK% GEQ 5 goto WQuest
if %WK% LSS 5 goto QuestW
:WQuest
Start Levelup.mp3
cls
set WQ=0
set /a Gold=%Gold%+150
set /a EXP=%EXP%+150
cls
echo Quest Complete! You got 150 gold and 150 exp!
pause
goto begin
:QuestW
cls
echo Quest not complete. You only have %WK% kills.
pause
goto begin
:GQuest
Start Levelup.mp3
cls
set GQ=0
set /a Gold=%Gold%+50
set /a EXP=%EXP%+50
cls
echo Quest Complete! You got 50 gold and 50 exp!
pause
goto begin
:QuestG
cls
echo Quest not complete. You only have %GK% kills.
pause
goto begin
:QuestP
cls
echo echo Quest not complete. You only have %PK% kills.
pause
goto begin
:PQuestC
if %PK% GEQ 5 goto PQuest
if %PK% LSS 5 goto QuestP
:PQuest
Start Levelup.mp3
cls
set PQ=0
set /a Gold=%Gold%+75
set /a EXP=%EXP%+100
echo Quest Complete! You got 75 gold and 100 exp!
pause
goto begin
OK!所以首先它看起来是一个Q,告诉计算机是否正在进行任务。如果是这样,它会检查你有哪一个。然后检查您是否符合要求。然后,完成!!!好像馅饼吧?研究这段代码!如果您有兴趣,这里是我游戏的链接!我也在我的youtube频道(mineit909)上有教程,告诉你如何制作这个游戏。这是游戏链接。 http://www.mediafire.com/?c87yz2hqawx43下载每个文件!!!如果一个声音文件没有工作,那么在代码中开始(SOUND FILENAME)!把所有东西放在同一个文件夹里!!!
答案 2 :(得分:0)
如果%quest1%greq 1转到questcomplete 当他们完成所述任务时,请执行:
设置quest1 = 1
:questcomplete CLS 回声耶!你做了任务!