Postado Março 9, 2015 10 anos Dúvida sanada. Editado Março 9, 2015 10 anos por ScythePhantom (veja o histórico de edições)
Postado Março 9, 2015 10 anos Tenta esse: function onUse(cid, item, topos) local doors = { [8651] = {vocation = {1, 5, 9}, messageFail = "Sorry, you need to be a Sorcerer, Master Sorcerer or Hell Wizard to pass."}, [8652] = {vocation = {2, 6, 10}, messageFail = "Sorry, you need to be a Druid, Elder Druid or High Saintess to pass."}, [8653] = {vocation = {3, 7, 11}, messageFail = "Sorry, you need to be a Paladin, Royal Paladin or Force Archer to pass."}, [8654] = {vocation = {4, 8, 12}, messageFail = "Sorry, you need to be a Knight, Elite Knight or Titan Blader to pass."}, } if (isInArray(doors[item.actionid].vocation, getPlayerVocation(cid))) then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendTextMessage(cid,22,'Stand in front of the door.') return 1 end else doPlayerSendCancel(cid, doors[item.actionid].messageFail) end end return true Editado Março 9, 2015 10 anos por Wakon (veja o histórico de edições) ➥ Regras | Seções OTServ | Seções BOT
Postado Março 9, 2015 10 anos Autor Tenta esse: function onUse(cid, item, topos) local doors = { [8651] = {vocation = {1, 5, 9}, messageFail = "Sorry, you need to be a Sorcerer, Master Sorcerer or Hell Wizard to pass."}, [8652] = {vocation = {2, 6, 10}, messageFail = "Sorry, you need to be a Druid, Elder Druid or High Saintess to pass."}, [8653] = {vocation = {3, 7, 11}, messageFail = "Sorry, you need to be a Paladin, Royal Paladin or Force Archer to pass."}, [8654] = {vocation = {4, 8, 12}, messageFail = "Sorry, you need to be a Knight, Elite Knight or Titan Blader to pass."}, } if (isInArray(doors[item.actionid].vocation, getPlayerVocation(cid))) then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendTextMessage(cid,22,'Stand in front of the door.') return 1 end else doPlayerSendCancel(cid, doors[item.actionid].messageFail) end end return true Não... nada acontece ao clicar na porta.
Postado Março 9, 2015 10 anos É o meu também tava parando no do Paladin, testa assim: function onUse(cid, item, topos) local doors = { [8651] = {vocation = {1, 5, 9}, messageFail = "Sorry, you need to be a Sorcerer, Master Sorcerer or Hell Wizard to pass."}, [8652] = {vocation = {2, 6, 10}, messageFail = "Sorry, you need to be a Druid, Elder Druid or High Saintess to pass."}, [8653] = {vocation = {3, 7, 11}, messageFail = "Sorry, you need to be a Paladin, Royal Paladin or Force Archer to pass."}, [8654] = {vocation = {4, 8, 12}, messageFail = "Sorry, you need to be a Knight, Elite Knight or Titan Blader to pass."}, } if (isInArray(doors[item.actionid].vocation, getPlayerVocation(cid))) then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end else doPlayerSendTextMessage(cid,22,'Stand in front of the door.') doSendMagicEffect(topos,3) end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendCancel(cid, doors[item.actionid].messageFail) end return true end @Edit, o player tem que estar na frente da porta, adicionei a mensagem de volta, acho que agora ta 100%! Editado Março 9, 2015 10 anos por Wakon (veja o histórico de edições) ➥ Regras | Seções OTServ | Seções BOT
Postado Março 9, 2015 10 anos Autor É o meu também tava parando no do Paladin, testa assim: function onUse(cid, item, topos) local doors = { [8651] = {vocation = {1, 5, 9}, messageFail = "Sorry, you need to be a Sorcerer, Master Sorcerer or Hell Wizard to pass."}, [8652] = {vocation = {2, 6, 10}, messageFail = "Sorry, you need to be a Druid, Elder Druid or High Saintess to pass."}, [8653] = {vocation = {3, 7, 11}, messageFail = "Sorry, you need to be a Paladin, Royal Paladin or Force Archer to pass."}, [8654] = {vocation = {4, 8, 12}, messageFail = "Sorry, you need to be a Knight, Elite Knight or Titan Blader to pass."}, } if (isInArray(doors[item.actionid].vocation, getPlayerVocation(cid))) then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) end else doPlayerSendCancel(cid, doors[item.actionid].messageFail) end return true end Mesma coisa... nada acontece.
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.