《网络创世纪》(uo)- www.7lu.com网络游戏
当前位置:7LU UO站 > 辅助软件     加料赚分( 每次录用+5分 )
相关下载客户端辅助软件
自动喂鱼(养水族箱)
上传时间:12-14-2009 上传人员:FC
下载人次:7072
;==================================
; Script Name: Aqua Master (alpha)
; Author: Kal In Ex
; Version: 1.4
; Client Tested with: 5.0.1f
; EUO version tested with: 1.5.88 (EasyUO 1.5 Required)
; Shard OSI / FS: OSI
; Revision Date: September 11, 2006
; Public Release: September 7th 2005
; Purpose: Aquarium Maintainance
; Copyright: 2005 Kal In Ex
;==================================
 
set #lpc 1000 
gosub FeedFishAt #charposx #charposy #charposz 
halt 
 
sub FeedFishAt
if #charposx <> %1 || #charposy <> %2 || #charposz <> %3 
event pathfind %1 %2 %3 
while #charposx <> %1 || #charposy <> %2 || #charposz <> %3 
wait 
finditem igs_kgs g_2
for !tankIndex #findcnt 

finditem igs_kgs !tankIndex g_2
if #findz #charposz 

set !TankID #findid 
event property !TankID 
gosub _RemoveDead
gosub _GetReward
gosub _AddFood
gosub _AddWater
;gosub _TrashDead


ignoreitem reset feedfish
return 
 
sub _trashDead
finditem amw c_ #backpackid 
if #findkind = -
return 
finditem bkf g
if #findkind = -
return 
set !trashID #findid 
set !charposx #charposx 
set !charposy #charposy 
set !charposz #charposz 
event pathfind #findx #findy #findz 
while #finddist || #findz <> #charposz 
wait 
finditem amw c_ #backpackid 
for #findindex #findcnt 

exevent drag #findid #findstack 
exevent dropc !trashID 
wait 30 

event pathfind !charposx !charposy !charposz 
while #charposx <> !charposx || #charposy <> !charposy || #charposz <> !charposz 
wait 
return 
 
sub _removeDead
if $Dead #spc Creaturesnotin #property 
return 
set #lobjectid !tankID 
event macro 17 
while #contsize <> 400_373
wait 
set !TankX #contposx 
set !TankY #contposy 
wait 18 
for !i 28 

set !x !TankX 110 
set !y !TankY 345 
click !x !y f dmc

for !i 28 

removeDead
gosub _getFishState
if #result Dead

gosub _removeFish
if #result #false 
return 
goto removeDead

set !x !TankX 260 
set !y !TankY 345 
click !x !y f dmc
wait 10 

set !x !TankX 80 
set !y !TankY 80 
click !x !y r f dmc
return 
 
sub _removeFish
set !x !TankX 290 
set !y !TankY 255 
click !x !y f dmc
for !_ 

if #contsize <> 400_373
break 
wait 

if #contsize 400_373
return #false 
set #lobjectid !TankID 
event macro 17 
while #contsize <> 400_373
wait 
wait 16 
if !i 
return #true 
for !j !i 

set !x !TankX 260 
set !y !TankY 345 
click !x !y f dmc

wait 10 
return #true 
 
sub _getFishState
set !x !TankX 70 
set !y !TankY 302 
savepix !x !y 1  ; this is "white" pixel on gump
set !pc0 #pixcol 
set !x !TankX 86 
set !y !TankY 302 
savepix !x !y 
set !pc1 #pixcol 
set !x !TankX 86 
set !y !TankY 301 
savepix !x !y 
set !pc2 #pixcol 
if !pc0 4294967295 || !pc1 4294967295 || !pc2 4294967295 

display ok 
+$In order for the script to remove dead fish
+$it must be able to test certain pixels on
+$the gump for colorMinimize/Move any windows
+$that may be covering up the gump then press
+$play to restart the script
halt 

set #result n/a
if !pc0 !pc1 && !pc0 !pc2 
set #result Alive
if !pc0 <> !pc1 && !pc0 !pc2 
set #result Dead
if !pc0 <> !pc1 && !pc0 <> !pc2 
set #result Deco
return #result 
 
sub _GetReward
if $A #spc Reward #spc Is #spc Available!$ in #property 

exevent popup !TankID 
while #contname <> normal_gump || #contposx <> || #contposy <> 
wait 
click 25 54 f dmc
while #contname normal_gump && #contposx && #contposy 
wait 

return 
 
sub _AddWater
; CHECK THE "FOOD STATE"
gosub GetPropertyValue #property $ Water State
set !State #result 
; DONT FEED IF STATE IS NOT EXPECTED
if | , !State , | notin |Dead|Dying|Unhealthy|Healthy|Strong

display ok Aquarium "Water State!State , " Unrecognized!$Please post to script thread at www.easyuo.com
return 

; GET WATER VARIABLE VALUES
gosub GetPropertyLine #property Water Added
set !property #result 
gosub GetPropertyNumber !property Water Added
set !Added #result 
gosub GetPropertyNumber !property Maintain
set !Maintain #result 
gosub GetPropertyNumber !property Improve
set !Improve #result 
gosub GetPropertyNumber !property Needed
set !Needed #result 
; DETERMINE HOUSE MUCH WATER TO ADD
if | , !State , | in |Dead|Dying|Unhealthy|Healthy
set !Add !Improve !Added 
else 
set !Add !Maintain !Added 
if !Needed <> n/a ; "special case"
set !Add !Needed !Added 
; IF AQUARIUM IS ALREADY TAKEN CARE OF EXIT NOW
if !Add <= 
return 
; DROP FISH FOOD ONTO THE AQUARIUM
finditem wyf_vbm c_ #backpackid 
if #findkind = -

event exmsg #charid Unable to change water you need a pitcher
return 

set !pitcherID #findid 
 
set !jindex #jindex 
for !Add !Add 

finditem !pitcherID c_ #backpackid 
while #findkind = -

wait 
finditem !pitcherID c_ #backpackid 

if #findtype wyf

finditem vee_qee_wee_tee
if #findkind = -

event exmsg #charid You need a water trough to refill your pitcher
return 

set #lobjectid !pitcherID 
event macro 17 
target 
set #ltargetkind 
set #ltargetid #findid 
event macro 22 
wait 18 

exevent drag !pitcherID 
exevent dropc !TankID 
while #true 

if #jindex !jindex 

set !jindex !jindex 
scanjournal !jindex 
if #journal 1_unit(s)_of_water_have_been_added_to_the_aquarium
break 

wait 

wait 18 

return 
 
sub _AddFood
; CHECK THE "FOOD STATE"
gosub GetPropertyValue #property $ Food State
set !State #result 
; DONT FEED IF STATE IS NOT EXPECTED
if | , !State , | notin |Dead|Starving|Hungry|Full|Overfed

display ok Aquarium "Food State!State , " Unrecognized!$Please post to script thread at www.easyuo.com
return 

; GET FOOD VARIABLE VALUES
gosub GetPropertyLine #property Food Added
set !property #result 
gosub GetPropertyNumber !property Food Added
set !Added #result 
gosub GetPropertyNumber !property Feed
set !Feed #result 
gosub GetPropertyNumber !property Improve
set !Improve #result 
gosub GetPropertyNumber !property Needed
set !Needed #result 
; DETERMINE HOUSE MUCH FOOD TO ADD
if | , !State , | in |Dead|Starving|Hungry
set !Add !Improve !Added 
else 
set !Add !Feed !Added 
if !Needed <> n/a ; "special case"
set !Add !Needed !Added 
; IF AQUARIUM IS ALREADY TAKEN CARE OF EXIT NOW
if !Add <= 
return 
; FIND AND LIST ALL FISH FOOD FOUND IN BACKPACK (OR A SUB-CONTAINER OF IT)
set !FoodIDs 
while #true 

finditem gpf c
if #findkind = -
break 
ignoreitem #findid findfood
set !findid #findid 
while #findbagid <> #backpackid && #findkind <> -
finditem #findbagid 
if #findbagid #backpackid 
set !FoodIDs !FoodIDs !findid _

ignoreitem reset findfood
; DROP FISH FOOD ONTO THE AQUARIUM
set !jindex #jindex 
for !Add !Add 

finditem !FoodIDs 
if #findkind = -

event exmsg #charid Ran Out Of Aquarium Food
break 

ignoreitem #findid feedfish
exevent drag
#findid 
exevent dropc !TankID 
while #true 

if #jindex !jindex 

set !jindex !jindex 
scanjournal !jindex 
if #journal 1_unit(s)_of_food_have_been_added_to_the_aquarium
break 

wait 

wait 18 

return 
 
; GRAB A VALUE FROM A CHARACTER STRING
sub GetPropertyLine
set %2 $ %2 
if %0 

for !_ %0 

set %2 %2 #spc !_ 


str pos %1 %2 
if #strres 
return n/a
str del %1 #strres 
set !_ #strres 
str pos !_ $
str left !_ #strres 
return #strres 
 
; GRAB A LINE FROM A CHARACTER STRING
sub GetPropertyValue
if %0 

for !_ %0 

set %3 %3 #spc !_ 


str len %3 
set !_ #strres 
str pos %1 %3 
if #strres 
return n/a
set #strres #strres !_ 
str del %1 #strres 
set !_ #strres 
str pos !_ %2 
set #strres #strres 
str left !_ #strres 
return #strres 
 
; GRAB A LINE FROM A CHARACTER STRING
sub GetPropertyNumber
if %0 

for !_ %0 

set %2 %2 #spc !_ 


str len %2 
set !_ #strres 
str pos %1 %2 
if #strres 
return n/a
set #strres #strres !_ 
str del %1 #strres 
set !_ #strres 
str mid !_ 
while #strres notin 0123456789 

str del !_ 
set !_ #strres 
str mid !_ 

set #result 
while #strres in 0123456789 

set #result #result #strres 
str del !_ 
set !_ #strres 
str mid !_ 

return #result
 
UO资料
任务资料神器物品
心得技巧怪物资料
职业技能资料程序
特色资料世界设定
黑金系统工匠制作
相关下载
客户端辅助软件
本类推荐
本类热门
获取物品ID
自动喂鱼(养水族箱)
死后自动装备
自动捡钱
自动捡钱,皮,恶魔骨==的...
开锁
uo命令机--按键操作
自动HELPSUB
CEOMeic 1.31 --EUO脚本
自动复活SUB 7LU专用
Ultima Online 网络创世纪 UO.7LU.COM RunUO模拟器   |   第七大陆UO专题网   |   粤ICP备12087766号-2   |  

粤公网安备 44139902100106号