Postado Setembro 11, 2017 7 anos O script é basicamente assim, você passa em um tile com um UID, e ele sumona um boss. Porém antes eu usava tfs 1.0 e agora to usando tfs 1.2. data/movements/scripts/custom/ver.lua:5: attempt to index global 'thing' (a nil value) function onStepIn(cid, item, frompos, item2, topos) gatepos = {x=1320, y=512, z=15, stackpos=1} if item.uid == 60233 and isPlayer(cid) then thing = getThingfromPos(gatepos) doRemoveItem(thing.uid,1) doSendMagicEffect(gatepos, 15) doCreatureSay(cid, "You have awaken Vermush, now fight!", TALKTYPE_ORANGE_2, getCreaturePosition(cid)) doSendMagicEffect({x=1320, y=509, z=15},14) doSendMagicEffect({x=1320, y=512, z=15},14) doSummonCreature("vermush",{x=1320, y=509, z=15}) fixed; local t = { storage = 60233, --storageid interval = 60, --how many seconds until next monster = {"Vermush", {x=747, y=1602, z=10}}, -- monster and coords msg = "It's too quiet here..." -- message players get } function onStepIn(cid, item, position, fromPosition) if os.difftime(os.time(), getGlobalStorageValue(t.storage)) >= t.interval then doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1) doSummonCreature(t.monster[1], t.monster[2]) setGlobalStorageValue(t.storage, os.time()) end end
Postado Setembro 11, 2017 7 anos local config = { storage = 60233, -- storage interval = 60, -- interval monster = {name = 'Vermush', position= Position(747, 1602, 10)}, message = "It's too quiet here...", } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local globalStorage = Game.getStorageValue(config.storage) if (os.difftime(os.time(), globalStorage) < config.interval) then return true end local monster = Game.createMonster(config.monster.name, config.monster.position, false, true) if not monster then return true end player:say(config.message, TALKTYPE_SAY) Game.setStorageValue(config.storage, os.time()) return true end Discord: vankk #7765 Precisando de ajuda? Entre em contato comigo via Discord. Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.
Postado Setembro 11, 2017 7 anos Autor 25 minutos atrás, vankk disse: local config = { storage = 60233, -- storage interval = 60, -- interval monster = {name = 'Vermush', position= Position(747, 1602, 10)}, message = "It's too quiet here...", } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local globalStorage = Game.getStorageValue(config.storage) if (os.difftime(os.time(), globalStorage) < config.interval) then return true end local monster = Game.createMonster(config.monster.name, config.monster.position, false, true) if not monster then return true end player:say(config.message, TALKTYPE_SAY) Game.setStorageValue(config.storage, os.time()) return true end valeu mestre dos mestres haha
Postado Março 3, 2019 6 anos Em 11/09/2017 em 11:11, vankk disse: local config = { storage = 60233, -- storage interval = 60, -- interval monster = {name = 'Vermush', position= Position(747, 1602, 10)}, message = "It's too quiet here...", } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local globalStorage = Game.getStorageValue(config.storage) if (os.difftime(os.time(), globalStorage) < config.interval) then return true end local monster = Game.createMonster(config.monster.name, config.monster.position, false, true) if not monster then return true end player:say(config.message, TALKTYPE_SAY) Game.setStorageValue(config.storage, os.time()) return true end VANK BOA NOITE .. CONSEGUI POR PRA REMOVER OS PLAYERS EM X TIME ? FICARIA GRATO
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.