Postado Outubro 23, 2018 6 anos Esse script esta dando esse erro aki Spoiler [Error - TalkAction Interface] data/talkactions/scripts/eventexp.lua Description: data/talkactions/scripts/eventexp.lua:24: attempt to index global 'Position' (a nil value) [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/eventexp.lua) o Script e esse aki Spoiler local config = { items = {{13205,1}}, interval = 1000, -- time between checks areas = { [1] = { waves = 10, interval = 10000, chancePerTile = 10, -- % maxItemsPerWave = 15, from = {x = 1043, y = 1041, z = 7}, to = {x = 1073, y = 1058, z = 7} }, [2] = { waves = 10, interval = 10000, chancePerTile = 10, maxItemsPerWave = 15, from = {x = 1043, y = 1041, z = 7}, to = {x = 1073, y = 1058, z = 7} } } } function Position.isPathable(pos) local tile = Tile(pos) if tile == nil then return false end return not tile:hasFlag(TILESTATE_BLOCKSOLID) end function rainWave(arena) local from = config.areas[arena].from local to = config.areas[arena].to local items_spawned = 0 for x = from.x, to.x do for y = from.y, to.y do for z = from.z, to.z do if math.random(1, 100) < config.areas[arena].chancePerTile and items_spawned < config.areas[arena].maxItemsPerWave then local pos = {x = x, y = y, z = z} if Position(pos):isPathable() then local item = math.random(1, #config.items) doCreateItem(config.items[item][1], math.random(1, config.items[item][2]), pos) Position(pos):sendMagicEffect(CONST_ME_MAGIC_RED) items_spawned = items_spawned + 1 end end end end end end function startRain(arena) broadcastMessage("Evento Exp EM saffron!") for i = 1, config.areas[arena].waves do if i == 1 then rainWave(arena) else addEvent(rainWave, config.areas[arena].interval * (i - 1), arena) end end addEvent(broadcastMessage, config.areas[arena].interval * (config.areas[arena].waves - 1), "Rain items event ended.") end function onSay(player, words, param) if not player:getGroup():getAccess() then return false end if tonumber(param) then startRain(tonumber(param)) else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, words .. " eventid") end return false end Como Funciona? Esse script ele vai criar varios item em determinado lugares . ou seja os item que ele vão criar vai ser item de exp ... sera que alguem tem um script que funcione da mesma maneira ou que consiga arrumar esse ai. REP ++ Desenvolvedor DO Script : CONDE
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.