Postado Julho 29, 2016 8 anos Bom nesse script, o player que pisar nessa area, todos do servidor ganham yellow skull, porém eu gostaria que apenas quem tivesse na area ganhasse o yellow skull. function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition) for posx = 1251,1259 do for posy = 716,724 do local pos = Position (posx, posy, 6) local creature = getTopCreature(pos).uid if isPlayer(creature) then player:setSkull(SKULL_YELLOW) return true end end end end Valeu Galera
Postado Julho 29, 2016 8 anos Não manjo dessa versão de TFS, mas tente assim: Spoiler function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition) for posx = 1251,1259 do for posy = 716,724 do local pos = Position (posx, posy, 6) local creature = getTopCreature(pos).uid if isPlayer(creature) then creature:setSkull(SKULL_YELLOW) return true end end end end
Postado Julho 29, 2016 8 anos function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition) local area = {{x=1251,y=716,z=6},{x=1259,y=724,z=6}} for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if m ~= 0 and isPlayer(m) then m:setSkull(SKULL_YELLOW) end end end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Julho 29, 2016 8 anos Autor @Vodkart Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/others/gh/ghskull.lua:onThink data/creaturescripts/scripts/others/gh/ghskull.lua:7: attempt to index local 'm' (a number value) stack traceback: [C]: in function '__index' data/creaturescripts/scripts/others/gh/ghskull.lua:7: in function <data/creaturescripts/scripts/others/gh/ghskull.lua:1>
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.