Cdt.
Chiedo perchè ho visto che è circa 1327* volte più veloce di EasyUO
*: e non stò scherzando...è l'esatto numero.
					Chiedo perchè ho visto che è circa 1327* volte più veloce di EasyUO

*: e non stò scherzando...è l'esatto numero.
|  | .                                         . . . . . . . . . . . . . . . . .                                         . . . . . . . . . . . . . . . .  | 
| GM Kriegstreiber Käse® | |
| Discord: Jack___#9551 | 

 : algander#6292
: algander#6292
loop:
onhotkey F10
    gosub type
goto loop
sub type
set #targcurs 1
while #targcurs = 1
        {
        }
finditem #ltargetid
event sysmessage Type: #findtype Stack: #findstack
return
_printkey = "F10"     [COLOR=Lime]<==> set %hotkey F10[/COLOR]
--[[ NON MODIFICARE OLTRE ]]
   
local function target()         [COLOR=Lime]<==> sub target (il "local" è come se in EUO [/COLOR][COLOR=Lime]si dichiarasse[/COLOR]
[COLOR=Lime] automaticamente tutta la sub racchiudendola in un namespace)[/COLOR]
UO.TargCurs = true                  [COLOR=Lime]<==>    set #targcurs 1[/COLOR]
while UO.TargCurs == true do     [COLOR=Lime]<==>[/COLOR][COLOR=Lime]    while #targcurs = 1[/COLOR]
      wait (50)                                   [COLOR=Lime]{[/COLOR]
      end                                      [COLOR=Lime]"wait 50ms"[/COLOR]
return UO.LTargetID                          [COLOR=Lime]}[/COLOR]
end
          
local function printinfo(col) [COLOR=Lime]<==> sub printinfo[/COLOR]
_ID = target()     [COLOR=Lime]<==> gosub "target"
                               set %_ID #result[/COLOR] 
[COLOR=Cyan]da qui in poi è la parte del finditem, molto differente in OEUO, guarda qualche post sotto[/COLOR]
local _itemname = UO.Property(_ID)
local _itemcnt = UO.ScanItems(false)
for _itemindex = 1 , _itemcnt do 
local ID,Type,Kind,ContID,X,Y,Stack,Rep,Col = UO.GetItem(_itemindex)
if ID == _ID then
     _Type = Type
     break
     end
end
UO.SysMessage ( _itemname .. " OEUO Type: " .. _Type, col)[COLOR=Lime]<==> event sysmessage %nomeitem EUOTYPE %type[/COLOR]
UO.SysMessage ( "OEUO ID: " .. _ID , 233)  [COLOR=Lime]<==> event sysmessage %_ID[/COLOR]
end
repeat                                                  [COLOR=Lime]<==>[/COLOR] [COLOR=Lime]repeat[/COLOR]
if getkey(_printkey) then printinfo (68) end [COLOR=Lime]<==> onhotkey %hotkey
                                                                      gosub "printinfo"
[/COLOR] until false == true [COLOR=Lime]<==> until #false = #true[/COLOR]
 
							
						
 : algander#6292
: algander#6292local _itemname = UO.Property(_ID)
local _itemcnt = UO.ScanItems(false)
for _itemindex = 1 , _itemcnt do 
local ID,Type,Kind,ContID,X,Y,Stack,Rep,Col = UO.GetItem(_itemindex)
if ID == _ID then
     _Type = Type
     break
     end
dofile(getinstalldir().."FileAccess.lua") 
dofile(getinstalldir().."FindItems.lua") [COLOR="Lime"] 
-- carica le librerie (simile a un call ma usi le funzioni degli altri file senza uscire dallo script)[/COLOR]
t = ScanItems(true,{_ID}) [COLOR="Lime"]<--- assegni il risultato della funzione ScanItems a t, 
in pratica come se avessi fatto: set %t gosub finditem %ID :O[/COLOR]



 : algander#6292
: algander#6292 
							
						
 : algander#6292
: algander#6292 
							
						


Commenta