Questo script è una versione modificata dello script "Ending's Logs2Boards", reperibile presso il sito di EasyUO.
Come si usa:
- mettete tutti i logs in un container (in casa o in bank) assieme ad un bel pò di carpentry tools (io uso seghe).
- avviate lo script e targettate il container.
- guardate lo script che lavora al posto vostro
Di questo script non mi piaceva il fatto che (non per cattiva programmazione, ma per cattivo concepimento) impiegasse il doppio del tempo effettivamente richiesto per convertire i logs.
Cosa faceva la vecchia versione:
- Sposta logs da container a backpack
- Eventualmente, sposta carpentry tools da container a backpack
- Usa carpentry tools da dentro il backpack
- Sposta boards da backpack a container
Ecco cosa fa la nuova versione:
- Sposta logs da container a backpack
- Lascia i carpentry tools nel container
- Usa i carpentry tools da dentro il container
- (le boards sono automaticamente generate nel container: nessun bisogno di spostarle!)
All'inizio avevo fatto una correzione molto rapida, ma poi ci ho rimesso mano e ho rimaneggiato il codice parecchio, nonché corretto un paio di errori ereditati dal vecchio governo... ehm... codice
Spero che vi piaccia, che sia utile e che non vi siano errori.
Se avete ulteriori suggerimenti fatemi sapere (sono sicuro che il codice si possa ancora migliorare leggermente qua e la).
Come si usa:
- mettete tutti i logs in un container (in casa o in bank) assieme ad un bel pò di carpentry tools (io uso seghe).
- avviate lo script e targettate il container.
- guardate lo script che lavora al posto vostro

Di questo script non mi piaceva il fatto che (non per cattiva programmazione, ma per cattivo concepimento) impiegasse il doppio del tempo effettivamente richiesto per convertire i logs.
Cosa faceva la vecchia versione:
- Sposta logs da container a backpack
- Eventualmente, sposta carpentry tools da container a backpack
- Usa carpentry tools da dentro il backpack
- Sposta boards da backpack a container
Ecco cosa fa la nuova versione:
- Sposta logs da container a backpack
- Lascia i carpentry tools nel container
- Usa i carpentry tools da dentro il container
- (le boards sono automaticamente generate nel container: nessun bisogno di spostarle!)
All'inizio avevo fatto una correzione molto rapida, ma poi ci ho rimesso mano e ho rimaneggiato il codice parecchio, nonché corretto un paio di errori ereditati dal vecchio governo... ehm... codice

Spero che vi piaccia, che sia utile e che non vi siano errori.
Se avete ulteriori suggerimenti fatemi sapere (sono sicuro che il codice si possa ancora migliorare leggermente qua e la).
codice:
;================================================== ; Script Name: Endings Logs2Boards ; Author: ending - Modified by Radagast ; Version: 2.5 ; Client Tested with: 5.0.1c ; EUO version tested with: 1.5 TV62 ; Shard OSI / FS: OSI ; Revision Date: 18Oct05 ; Public Release: 12Jan05 ; Purpose: Converts logs to boards in a container. ;=========Updates================================== ;v2.5 - Skipped setting of board type if drawn from the same stack ;v2.4 - Fixed stability issues. ;v2.1 - Fixed a minor error causing the script to stop ; Line85:goto stashBoards:goto grabLogs ;v2.0 - Rewritten for ML woods and EUO 1.5 exevents ;v1.0 - Main Construction. ;================================================== gosub Main halt sub Main gosub initConstants gosub selectContainer gosub cleanBP while #true ; Uscita tramite istruzioni halt { gosub grabLogs gosub openGump gosub convert } return sub grabLogs set %lastWood %curWood finditem ZLK C_ , %supplyBag if #findkind = -1 { display ok Done, halting. halt } set %grabAmt ( 550 - #weight ) / 2 exevent drag #findid %grabAmt exevent dropc #backpackid set %curWood #findcol wait 1s return sub openGump finditem %currentTool C_ , %supplyBag if #findkind = -1 { findItem %carpentryTools C_ , %supplyBag if #findkind = -1 { display ok Cannot find carpentry tools. The script is halting. halt } set %currentTool #findid } set #lobjectid %currentTool event macro 17 0 gosub gumpWait return sub convert gosub calcClicks if %curWood <> %lastWood { click %woodtypex %woodtypey wait 5 if %curWood = %normalCol click %woodx %woody if %curWood = %oakCol click %woodx %oaky if %curWood = %ashCol click %woodx %ashy if %curWood = %yewCol click %woodx %yewy if %curWood = %heartCol click %woodx %hearty if %curWood = %bloodCol click %woodx %bloody if %curWood = %frostCol click %woodx %frosty gosub gumpWait click %othermenux %othermenuy gosub gumpWait } click %boardmenux %boardmenuy gosub gumpWait return sub selectContainer event exmsg #charid 3 0 Target the container with the logs. set #targCurs 1 while ( #targCurs = 1 ) { } set %supplyBag #lTargetID set #lobjectid %supplyBag event macro 17 0 wait 1s return sub cleanBP _cleanBP: finditem ZLK C_ , #backpackid if #findkind = -1 return exevent drag #findid #findstack exevent dropc %supplyBag wait 15 goto _cleanBP return sub gumpWait set %curTime #scnt _gumpWait: if %curTime < ( #scnt - 5 ) return if worn in #journal || worn in #sysmsg return if #CONTSIZE <> 530_437 goto _gumpWait wait 5 return sub calcClicks set %woodtypex #contposx + 30 set %woodtypey #contposy + 375 set %woodx #contposx + 235 set %woody #contposy + 70 set %oaky #contposy + 90 set %ashy #contposy + 110 set %yewy #contposy + 130 set %hearty #contposy + 150 set %bloody #contposy + 170 set %frosty #contposy + 190 set %othermenux #contposx + 28 set %othermenuy #contposy + 90 set %boardmenux #contposx + 233 set %boardmenuy #contposy + 70 set %exitmenux #contposx + 30 set %exitmenuy #contposy + 413 return sub initConstants set %normalCol 0 set %oakCol 2010 set %ashCol 1191 set %yewCol 1192 set %heartCol 1193 set %bloodCol 1194 set %frostCol 1151 set %carpentryTools KGG_EGG_AGG_IGG_BIG_ZHG_WFG_YFG_XFG return
Commenta