Exedion
Active Member
- Joined
- Jun 11, 2007
- Messages
- 629
- Reaction score
- 30
Well a friend made this function for me, but not work like i expect, because this return the "max value" of a serie of storages, and i need the "max KEY" of a serie of storages, example:
i have storage's 11000 to 11008, with value 0, i need return the max value of the serie 11000 to 11010 (11008)
this can be do?
see the function
i have storage's 11000 to 11008, with value 0, i need return the max value of the serie 11000 to 11010 (11008)
this can be do?
see the function
LUA:
function getMaxStorageValue(cid, storage_start, storage_end)
local max = -1
for i = storage_start, storage_end do
local tmp = getCreatureStorage(cid, i)
if(tmp > max) then
max = tmp
end
return max
end
end
Last edited: