Postado Janeiro 27, 2015 10 anos Talkaction: local cities = { --["city"] = town_id, ["enigma"] = 1, --Exemplo. } function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, 'Command: command "city') elseif getPlayerStorageValue(cid, 60191) < 1 then return doPlayerSendCancel(cid, "You can only teleport on the special floors.") elseif not cities[param:lower():sub(2)] then return doPlayerSendCancel(cid, "This city doesn't exist or you can't teleport there.") end local city = param:lower():sub(2) local toPos = getTownTemplePosition(cities[city]) doPlayerSendTextMessage(cid, 27, "You teleported to "..city..".") doTeleportThing(cid, toPos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) return true end Movement: function onStepIn(cid, item, position, fromPosition) setPlayerStorageValue(cid, 60191, 1) return true end function onStepOut(cid, item, position, fromPosition) setPlayerStorageValue(cid, 60191, -1) return true end Serão 2 tags: uma para StepIn e outra para StepOut. Em ambas você configura o mesmo actionid. Editado Janeiro 27, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Janeiro 27, 2015 10 anos Autor Talkaction: local cities = { --["city"] = town_id, ["enigma"] = 1, --Exemplo. } function onSay(cid, words, param) if not param or param == "" then return doPlayerSendCancel(cid, 'Command: command "city') elseif getPlayerStorageValue(cid, 60191) < 1 then return doPlayerSendCancel(cid, "You can only teleport on the special floors.") elseif not cities[param:lower():sub(2)] then return doPlayerSendCancel(cid, "This city doesn't exist or you can't teleport there.") end local city = param:lower():sub(2) local toPos = getTownTemplePosition(cities[city]) doPlayerSendTextMessage(cid, 27, "You teleported to "..city..".") doTeleportThing(cid, toPos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) return true end Movement: function onStepIn(cid, item, position, fromPosition) setPlayerStorageValue(cid, 60191, 1) return true end function onStepOut(cid, item, position, fromPosition) setPlayerStorageValue(cid, 60191, -1) return true end Serão 2 tags: uma para StepIn e outra para StepOut. Em ambas você configura o mesmo actionid. poderia colocar as tags prontas ? sem a ID do actionID ? Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Janeiro 27, 2015 10 anos <movevent type="StepIn" actionid="Numero" event="script" value="Arquivo.lua"/> <movevent type="StepOut" actionid="Numero" event="script" value="Arquivo.lua"/> <talkaction words="!palavra;/palavra" event="script" value="arquivo.lua"/> Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
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.