Postado Janeiro 20, 2015 10 anos Administrador Galera fiz esse scripts para um sistema pro meu servidor. era para ele checar a outfit do player e se ele nao tiver a outfit =14021 ele mandar a msg "you need a garden outfit to pass" se alguém souber oque ta errado. function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getCreatureOutfit(cid) == 14021 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 18, 'you need a garden outfit to pass') doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) end return true end TibiaKing Team- KingTópicos www.tibiaking.com
Postado Janeiro 20, 2015 10 anos Não testei. Eu acho que entendi, eu coloquei pra que se o cara não estiver usando a outfit do lookType (14021), ele não pode entrar. local cfg = { lookType = 14021, failMsg = "you need a garden outfit to pass", } function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) then if getCreatureOutfit(cid).lookType =~ cfg.lookType then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, cfg.failMsg) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) end end return true end Tony Araújo
Postado Janeiro 20, 2015 10 anos Autor Administrador ao iniciar teve esse erro [20/01/2015 00:27:10] [Error - LuaScriptInterface::loadFile] data/movements/scripts/Garden Strike Tile/Garden Strike Tile Rank 1.lua:8: 'then' expected near '=' [20/01/2015 00:27:10] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/Garden Strike Tile/Garden Strike Tile Rank 1.lua) [20/01/2015 00:27:10] data/movements/scripts/Garden Strike Tile/Garden Strike Tile Rank 1.lua:8: 'then' expected near '=' TibiaKing Team- KingTópicos www.tibiaking.com
Postado Janeiro 20, 2015 10 anos Troca: if getCreatureOutfit(cid).lookType =~ cfg.lookType then por: if getCreatureOutfit(cid).lookType ~= cfg.lookType then não respondo pms solicitando suporte em programação/scripting
Postado Janeiro 20, 2015 10 anos Autor Administrador Troca: if getCreatureOutfit(cid).lookType =~ cfg.lookType then por: if getCreatureOutfit(cid).lookType ~= cfg.lookType then Vlw funcionou poderia me dizer oque fiz de errado no primeiro script ? TibiaKing Team- KingTópicos www.tibiaking.com
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.