Postado Junho 8, 2015 10 anos Boa noite galera, axei um script pronto de abrir a griff flower em dia e hora marcado e depois fechar. Então adicionei em global events assim: <globalevent name="griffinclawFlower" type="start" script="griffinclawFlower.lua"/> e o script é esse: local flowerPosition = Position(32024, 32830, 4) function decayFlower() local tile = flowerPosition:getTile() if tile then local thing = tile:getItemById(5659) if thing then thing:transform(5687) end end end local function bloom() if math.random(7) ~= 1 then addEvent(bloom, 60 * 60 * 1000) return end local tile = flowerPosition:getTile() if tile then local thing = tile:getItemById(5687) if thing then thing:transform(5659) thing:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) end end local bloomHours = math.random(2, 6) addEvent(decayFlower, bloomHours * 60 * 60 * 1000) addEvent(bloom, bloomHours * 60 * 60 * 1000) end function onStartup() bloom() return true end Só que apareceu esse erro: [20:21:31.213] The Forgotten Server, version 0.3.7_SVN (Crying Damson) [20:21:31.213] Compiled with GNU C++ version 3.4.5 (mingw special) (x86_64: 0) a t Apr 3 2013, 16:46:30. [20:21:31.213] A server developed by Elf, Talaturen, Dalkon, BeniS, Tryller and Kornholijo. [20:21:31.213] Visit our forum for updates, support and resources: http://otland .net. [20:21:31.213] >> Loading config (config.lua) [20:21:31.213] > Opening logs [20:21:31.213] > Using SHA1 encryption [20:21:31.213] >> Checking software version... [20:21:31.213] > Ignoring version check, using SVN [20:21:31.343] >> Loading RSA key [20:21:31.343] > Calculating dmp1, dmq1 and iqmp for RSA... done [20:21:31.343] >> Starting SQL connection [20:21:31.343] >> Running Database Manager [20:21:31.813] > Optimized database. [20:21:31.813] >> Loading items (OTB) [20:21:31.833] >> Loading items (XML) [20:21:32.093] >> Loading groups [20:21:32.103] >> Loading vocations [20:21:32.103] >> Loading outfits [20:21:32.103] >> Loading chat channels [20:21:32.103] >> Loading script systems [!] -> Checking demon oak lib... [!] -> 0 problems loaded in 0.01 seconds. [!] -> Demon Oak Lib loaded in 0.01 seconds. [20:21:32.253] > Loading weapons... done. [20:21:32.253] > Preparing weapons... done. [20:21:33.995] > Loading spells... done. [20:21:45.167] > Loading actions... done. [20:21:45.977] > Loading talkactions... done. [20:21:52.827] > Loading movements... done. [20:21:53.317] > Loading creaturescripts... done. [20:21:53.487] > Loading globalscripts... done. [20:21:53.487] >> Loading mods... [20:21:53.487] > Loading firstitems.xml... done, but disabled. [20:21:53.517] > Loading ZaoShard.xml... done. [20:21:53.517] > 2 mods were loaded (1 disabled). [20:21:53.517] >> Loading experience stages [20:21:53.517] >> Loading skills stages [20:21:53.517] >> Loading quests [20:21:53.517] >> Loading monsters [20:21:54.017] >> Loading raids [20:21:54.027] >> Loading map and spawns... [20:21:56.621] > Map size: 33536x33024. [20:21:56.621] > Map descriptions: [20:21:56.621] "Saved with Remere's Map Editor 2.2" [20:21:56.621] "" [20:22:17.651] > Loading time: 23.624 seconds. [20:22:19.233] > Parsing time: 1.582 seconds. [20:23:39.103] > Synchronization time: 79.86 seconds. [20:23:39.153] > Unserialization time: 0.05 seconds. [20:23:39.153] >> Checking world type... Optional PvP [20:23:39.153] >> Starting to dominate the world... done. [20:23:39.153] >> Initializing game state and binding services... [20:23:40.353] [Error - GlobalEvent Interface] [20:23:40.353] data/globalevents/scripts/griffinclawFlower.lua:onStartup [20:23:40.353] Description: [20:23:40.353] data/globalevents/scripts/griffinclawFlower.lua:19: attempt to ca ll method 'getTile' (a nil value) [20:23:40.353] stack traceback: [20:23:40.353] data/globalevents/scripts/griffinclawFlower.lua:19: in function 'bloom' [20:23:40.353] data/globalevents/scripts/griffinclawFlower.lua:34: in function <data/globalevents/scripts/griffinclawFlower.lua:33> [20:23:40.513] > Global IP address(es): 189.35.62.61 [20:23:40.513] > Local IP address(es): 192.168.1.100 [20:23:40.523] > Bound ports: 7171 7172 [20:23:40.523] >> Everything smells good, server is starting up... [20:23:40.833] > Saving server... [20:23:41.523] >> Server Online! [20:23:42.213] > SAVE: Complete in 1.38 seconds using binary house storage. Eu tenho que mecher em mais algum lugar pra não dar esse erro?? help me plz!
Postado Junho 9, 2015 10 anos Não entendo muito de script mas se eu nao me engano isso é erro na distro, ou seja, sua distro nao tem onStartup, GetTile, antes de pegar o script veja se ele é compativel com seu TFS. Diga a versão do seu TFS e qual source usou.
Postado Junho 9, 2015 10 anos local tile = flowerPosition:getTile() flowerposition:getile() é para versão 1.0 '' Uma ideia é apenas uma ideia, até ser desenvolvida, mastigada, retratada, analisada e por fim se tornar uma boa ideia. ''
Postado Junho 9, 2015 10 anos Autor @Alienbear, essa parte do script se refere a posição da flower no mapa, para minha versão teria que usar qual função sera?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.