若是你卡在这里了,那么看看这个攻略吧
选择英雄和编程说话
选择装备
写中文注释
写代码
# Don't insult this tribe of peaceful ogres.
while True:
item = hero.findNearestItem()
if item:
# If item.type IS NOT EQUAL TO "gem"
if item.type != "gem":
# 然后跟从你的宠物。
hero.moveXY(pet.pos.x, pet.pos.y)
# 不然:
else:
# 移动到宝石的坐标。
hero.moveXY(item.pos.x, item.pos.y)
运行
写代码
// 不要欺侮这个和平食人魔部落
while(true) {
var item = hero.findNearestItem();
if(item) {
// 若是item.type不等于 "gem"
if(item.type != "gem") {
// 然后跟从你的宠物。
hero.moveXY(pet.pos.x, pet.pos.y);
}
// 不然:
else {
// 移动到宝石的坐标。
hero.moveXY(item.pos.x, item.pos.y);
}
}
}
运行
写代码
# Don't insult this tribe of peaceful ogres.
while true
item = hero.findNearestItem()
if item
# If item.type IS NOT EQUAL TO "gem"
if item.type != "gem"
# 然后跟从你的宠物。
hero.moveXY(pet.pos.x, pet.pos.y)
# 不然:
else
# 移动到宝石的坐标。
hero.moveXY(item.pos.x, item.pos.y)
运行
写代码
-- 不要欺侮这个和平食人魔部落
while true do
local item = hero:findNearestItem()
if item then
-- 若是item.type不等于 "gem"
if item.type ~= "gem" then
-- 然后跟从你的宠物。
hero:moveXY(pet.pos.x, pet.pos.y)
-- 不然:
else
-- 移动到宝石的坐标。
hero:moveXY(item.pos.x, item.pos.y)
end
end
end
运行
0 篇文章
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!