brindeds
12-22-2015, 11:41 PM
Hello,
I'm in need of some stuff in self fish, but I did not understand the code that I found to make some adjustments.
The idea is when you have a certain amount of "maximumFish" he to the module, look for the label "leaveFishing" and turn the Walker. The problem I'm finding is that it seems that it continues in the same loop after the "breaks".
-----Inital Module fishing
local fishing = Module.New('fishing', function(fishing)
print("Fishing.")
Walker.Stop()
local WATER_FISH = {4597, 4598, 4599, 4600, 4601, 4602}
while (true) do
for x = -7, 7, 1 do
for y = -5, 5, 1 do
if(Self.ItemCount(3578) < maximumFish) then
local item = Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z)
if (table.contains(WATER_FISH, item.id)) then
Self.UseItemWithGround(3483, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1000, 2000)
end
else
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
if(Self.ItemCount(3578) >= maximumFish) then
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
end
if(Self.ItemCount(3578) >= maximumFish) then
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
if(Self.ItemCount(3578) >= maximumFish) then
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
end
end
end, false)
-----End Module fishing
I'm in need of some stuff in self fish, but I did not understand the code that I found to make some adjustments.
The idea is when you have a certain amount of "maximumFish" he to the module, look for the label "leaveFishing" and turn the Walker. The problem I'm finding is that it seems that it continues in the same loop after the "breaks".
-----Inital Module fishing
local fishing = Module.New('fishing', function(fishing)
print("Fishing.")
Walker.Stop()
local WATER_FISH = {4597, 4598, 4599, 4600, 4601, 4602}
while (true) do
for x = -7, 7, 1 do
for y = -5, 5, 1 do
if(Self.ItemCount(3578) < maximumFish) then
local item = Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z)
if (table.contains(WATER_FISH, item.id)) then
Self.UseItemWithGround(3483, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1000, 2000)
end
else
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
if(Self.ItemCount(3578) >= maximumFish) then
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
end
if(Self.ItemCount(3578) >= maximumFish) then
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
if(Self.ItemCount(3578) >= maximumFish) then
print("Done. Stop fishing.")
Walker.Goto("leaveFishing")
Walker.Start()
fishing:Stop()
checkPositionF:Stop()
break
end
end
end
end, false)
-----End Module fishing