Ore Smelter
//Ore2Frontv2 by Vlek (Bloodclan.org)
//Smelts, moves ore to ground, combines on ground, and moves based on facing direction
if not listexists 'oreonground'
@createlist 'oreonground'
else
@clearlist 'oreonground'
endif
if not listexists 'forgetypes'
createlist 'forgetypes'
pushlist 'forgetypes' 0xfb1 //Small Forge
pushlist 'forgetypes' 0x1996 //long mid east
pushlist 'forgetypes' 0x1992 //long billow east
pushlist 'forgetypes' 0x19a2 //long mid north
endif
for 0 in 'forgetypes'
if @findtype forgetypes[] 'any' 'ground' 1+ 2
headmsg 'Smelting!'
while @findtype 0x19b9 'any' 'ground'1 2 or @findtype 0x19b9 'any' 'backpack'
@useobject 'found'
pause 200
endwhile
stop
endif
endfor
if @findtype 0x19b9 0x0 'backpack'
pushlist 'oreonground' 'found'
if @findtype 0x19b9 0x0 'ground' 1 2
moveitem oreonground[0] 'found'
stop
endif
endif
while counttypeground 0x19b9 0x0 2 > 1
if @findtype 0x19b9 0x0 'ground' 1 2
pushlist 'oreonground' 'found'
@ignoreobject 'found'
endif
endwhile
@clearignorelist
while list 'oreonground' > 1
moveitem oreonground[0] oreonground[1]
poplist 'oreonground' 'front
pause 600
endwhile
if list 'oreonground' == 1
if direction == 0
moveitemoffset oreonground[0] 'ground' 0 -2 0
elseif direction == 1
moveitemoffset oreonground[0] 'ground' 2 -2 0
elseif direction == 2
moveitemoffset oreonground[0] 'ground' 2 0 0
elseif direction == 3
moveitemoffset oreonground[0] 'ground' 2 2 0
elseif direction == 4
moveitemoffset oreonground[0] 'ground' 0 2 0
elseif direction == 5
moveitemoffset oreonground[0] 'ground' -2 2 0
elseif direction == 6
moveitemoffset oreonground[0] 'ground' -2 0 0
elseif direction == 7
moveitemoffset oreonground[0] 'ground' -2 -2 0
endif
else
sysmsg "No iron ore was found"
endif
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Тот же скрипт, только без измененных "спец" символов. Правда, не всё у меня плавит.
//Ore2Frontv2 by Vlek (Bloodclan.org)
//Smelts, moves ore to ground, combines on ground, and moves based on facing direction
if not listexists 'oreonground'
@createlist 'oreonground'
else
@clearlist 'oreonground'
endif
if not listexists 'forgetypes'
createlist 'forgetypes'
pushlist 'forgetypes' 0xfb1 //Small Forge
pushlist 'forgetypes' 0x1996 //long mid east
pushlist 'forgetypes' 0x1992 //long billow east
pushlist 'forgetypes' 0x19a2 //long mid north
endif
for 0 in 'forgetypes'
if @findtype forgetypes[] 'any' 'ground' 1+ 2
headmsg 'Smelting!'
while @findtype 0x19b9 'any' 'ground'1 2 or @findtype 0x19b9 'any' 'backpack'
@useobject 'found'
pause 200
endwhile
stop
endif
endfor
if @findtype 0x19b9 0x0 'backpack'
pushlist 'oreonground' 'found'
if @findtype 0x19b9 0x0 'ground' 1 2
moveitem oreonground[0] 'found'
stop
endif
endif
while counttypeground 0x19b9 0x0 2 > 1
if @findtype 0x19b9 0x0 'ground' 1 2
pushlist 'oreonground' 'found'
@ignoreobject 'found'
endif
endwhile
@clearignorelist
while list 'oreonground' > 1
moveitem oreonground[0] oreonground[1]
poplist 'oreonground' 'front
pause 600
endwhile
if list 'oreonground' == 1
if direction == 0
moveitemoffset oreonground[0] 'ground' 0 -2 0
elseif direction == 1
moveitemoffset oreonground[0] 'ground' 2 -2 0
elseif direction == 2
moveitemoffset oreonground[0] 'ground' 2 0 0
elseif direction == 3
moveitemoffset oreonground[0] 'ground' 2 2 0
elseif direction == 4
moveitemoffset oreonground[0] 'ground' 0 2 0
elseif direction == 5
moveitemoffset oreonground[0] 'ground' -2 2 0
elseif direction == 6
moveitemoffset oreonground[0] 'ground' -2 0 0
elseif direction == 7
moveitemoffset oreonground[0] 'ground' -2 -2 0
endif
else
sysmsg "No iron ore was found"
endif
Последнее редактирование: 24 дек 2016 20:17 пользователем drussvill.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.