Ir para conteúdo

Adriano SwaTT

Membro
  • Registro em

  • Última visita

Tudo que Adriano SwaTT postou

  1. Olá, Estou contratando Programador/Dev (C++ & LUA) para um projeto de grande porte e alto investimento, com remuneração fixa e freelancers. Somos empresa com CNPJ, escritório físico e temos QG. Caso tenham alguma dúvida ou queira entrar em contato para mais detalhes, segue meu whatsapp (12) 99203-1126. Temos urgência. Grato.
  2. Adriano SwaTT postou uma resposta no tópico em Playground (Off-topic)
    Coroi, não fui notificado sobre a marcação. Eu sou Corretor de Imóveis e eventualmente faço alguns códigos porque ainda amo a área. \o/ Saudades do tempo de programação fiel a Tibia, tenho projetos congelados que devo por em prática ainda este ano. Abraços a todos.
  3. Boa tarde, @Phineasz. Não consegui identificar o erro no vídeo. Tente explicar um pouco melhor o que acontece e tento te ajudar.
  4. Boa tarde, Em resumo quer que funcione como uma porta na vida real. Ao usar a chave ela destranca e abre, ao usar a chave nela aberta ela fecha e tranca, ao fechá-la clicando diretamente nela, ela fecha mas não precisa usar chave para abrir novamente, ao usar chave nela fechada e destrancada, apenas trancá-la.. Segue o code. local function checkStackpos(item, position) position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE local thing = getThingFromPos(position) position.stackpos = STACKPOS_TOP_FIELD local field = getThingFromPos(position) return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0) end local function doorEnter(cid, item, toPosition) doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) end function onUse(cid, item, fromPosition, itemEx, toPosition) if (doors[itemEx.itemid]) then if item.actionid > 0 then g = getItemAttribute(item.uid, "charges") if g == 1 then doTransformItem(item.uid, doors[item.itemid]) return TRUE end end end if(fromPosition.x ~= CONTAINER_POSITION and isPlayerPzLocked(cid) and getTileInfo(fromPosition).protection) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) return true end if(getItemLevelDoor(item.itemid) > 0) then if(item.actionid == 189) then if(not isPremium(cid)) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.") return true end doorEnter(cid, item, toPosition) return true end local gender = item.actionid - 186 if(isInArray({PLAYERSEX_FEMALE, PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then if(gender ~= getPlayerSex(cid)) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.") return true end doorEnter(cid, item, toPosition) return true end local skull = item.actionid - 180 if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then if(skull ~= getCreatureSkullType(cid)) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.") return true end doorEnter(cid, item, toPosition) return true end local group = item.actionid - 150 if(group >= 0 and group < 30) then if(group > getPlayerGroupId(cid)) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.") return true end doorEnter(cid, item, toPosition) return true end local vocation = item.actionid - 100 if(vocation >= 0 and vocation < 50) then local playerVocationInfo = getVocationInfo(getPlayerVocation(cid)) if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.") return true end doorEnter(cid, item, toPosition) return true end if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then doorEnter(cid, item, toPosition) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.") end return true end if(isInArray(specialDoors, item.itemid)) then if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then doorEnter(cid, item, toPosition) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.") end return true end if(isInArray(keys, item.itemid)) then if(itemEx.actionid > 0) then if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then if getItemAttribute(itemEx.uid, "charges") == 1 then doItemSetAttribute(itemEx.uid, "charges", 0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been locked up a closed door.") return true else doTransformItem(itemEx.uid, doors[itemEx.itemid]) return true end end doPlayerSendCancel(cid, "The key does not match.") return true end get = getDoorOpenBySwatt(cid, toPosition) if get > 0 then porta = getTileItemById(toPosition, get).uid act = getThing(porta).actionid if(item.actionid == act) then doItemSetAttribute(porta, "charges", 0) doTransformItem(porta, getThing(porta).itemid - 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been locked up this door.") return true else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This key isn't of this door.") return true end end return false end if(isInArray(horizontalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then local newPosition = toPosition newPosition.y = newPosition.y + 1 local doorPosition = fromPosition doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE local doorCreature = getThingfromPos(doorPosition) if(doorCreature.itemid ~= 0) then local pzDoorPosition = getTileInfo(doorPosition).protection local pzNewPosition = getTileInfo(newPosition).protection if((pzDoorPosition and not pzNewPosition and doorCreature.uid ~= cid) or (not pzDoorPosition and pzNewPosition and doorCreature.uid == cid and isPlayerPzLocked(cid))) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) else doTeleportThing(doorCreature.uid, newPosition) if(not isInArray(closingDoors, item.itemid)) then doTransformItem(item.uid, item.itemid - 1) end end return true end doItemSetAttribute(item.uid, "charges", 1) doTransformItem(item.uid, item.itemid - 1) return true end if(isInArray(verticalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then local newPosition = toPosition newPosition.x = newPosition.x + 1 local doorPosition = fromPosition doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE local doorCreature = getThingfromPos(doorPosition) if(doorCreature.itemid ~= 0) then if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) else doTeleportThing(doorCreature.uid, newPosition) if(not isInArray(closingDoors, item.itemid)) then doTransformItem(item.uid, item.itemid - 1) end end return true end doItemSetAttribute(item.uid, "charges", 1) doTransformItem(item.uid, item.itemid - 1) return true end if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then if(item.actionid == 0) then doTransformItem(item.uid, doors[item.itemid]) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.") end return true end return false end function getDoorOpenBySwatt(cid, pos) value = 0 for x = 1, #verticalOpenDoors do if getTileItemById(pos, verticalOpenDoors[x]).uid > 0 then value = verticalOpenDoors[x] end end if value == 0 then for y = 1, #horizontalOpenDoors do if getTileItemById(pos, horizontalOpenDoors[y]).uid > 0 then value = horizontalOpenDoors[y] end end end return value end function getDoorClosedBySwatt(cid, pos) value = 0 for x = 1, #closingDoors do if getTileItemById(pos, closingDoors[x]).uid > 0 then value = closingDoors[x] end end return value end Boa sorte.
  5. Estranho, tem certeza que está colocando o nome do destinatário corretamente?
  6. O que o NPC fala depois que você tenta transferir? Da mensagem de que transferiu? Não sei o que acontece com seu servidor, mas esse NPC é quase padrão para todos.
  7. A parte do Deposit All já existe: Basta falar: Hi / Deposit / all / yes. Boa sorte.
  8. Cara, tem que ver se está ativo o Bank no seu config.lua, se da algum erro na distro ao tentar depositar e também se no seu servidor é essa função mesmo: doPlayerDepositMoney(cid,n) Somente alguns testes poderão dizer.
  9. Boa noite, Cada sala precisa de suas próprias storages nessas variáveis: local gstrg = 12129 -- Não Mexa, Storage de Controle Item Global. local gstrg_control = 12130 -- Não Mexa, Storage de Controle Jogo em Execução. local istrg = {12131, 12132, 12133} -- Não Mexa, Storage de Itens. Ex: 1ª Sala: local gstrg = 12129 -- Não Mexa, Storage de Controle Item Global. local gstrg_control = 12130 -- Não Mexa, Storage de Controle Jogo em Execução. local istrg = {12131, 12132, 12133} -- Não Mexa, Storage de Itens. 2ª Sala: local gstrg = 12135 -- Não Mexa, Storage de Controle Item Global. local gstrg_control = 12136 -- Não Mexa, Storage de Controle Jogo em Execução. local istrg = {12137, 12138, 12139} -- Não Mexa, Storage de Itens. Sucessivamente sem cessar. Boa sorte.
  10. Certo, no final de tudo no script, abaixo do último END, adicione o código abaixo: function doCassinoRemoveLuckyItem(cid) if isPlayer(cid) then for i = 0, #items do g = getTileItemById(iluck_pos, items[i][1]) if g.uid > 0 then doRemoveItem(g.uid) doSendMagicEffect(iluck_pos, CONST_ME_POFF) end end end return true end Agora procure por: setPlayerStorageValue(cid, gstrg, 0) No script e abaixo disso adicione a linha: doCassinoRemoveLuckyItem(cid) Agora só testar e postar o feed. Boa sorte.
  11. Até teria, mas estou sem pc para fazer esse code agora.. Sobre o problema do item ficar na mesa, não interfere em nada, pois quando clica para jogar novamente o item só muda para o próximo, não cria outro (que eu me lembre). Teste e dê um feed. Boa sorte.
  12. Editado: Há maneira de teleportar o player sim: setPlayerStorageValue(cid, gstrg, 0) -- Abaixo disso no CODE / Que fica bem no final. doTeleportThing(cid, {x=000, y=000, z=0}, true) -- Adicione isso e altere para a coordenada que deseja. Boa sorte.
  13. Vê se não acusa erro na distro, manda print para analisarmos. E check a posição onde os itens devem estar, se está de acordo com a imagem do dono do tópico, porque tem posição certa do item com base na posição atual do NPC (se bem me lembro desse code).
  14. Bro, realmente é um code meio grande para eu conseguir ler agora, tenta dar uma olhada no tópico de onde pegou o script. Por se tratar de um NPC, veja se não está dando erro na distro e/ou se configurou as coordenadas corretamente, ou criou as posições certas de onde ele irá pegar os itens. Boa sorte.
  15. Sim, esse erro não é do code, seu actions.xml que está com algum erro de fechamento de tag. Tente adicionar a tag novamente mas com cautela.
  16. Opa, Como assim não tem vocações? Ou as vocações são diferentes das costumeiras? Em resumo, seu servidor tem a pasta spells, não tem? Se sim, basta instalar e por a vocação - que pode ser numérica - que seu servidor usa para identificar os players. Boa sorte.
  17. Ok, apesar de já ter no tópico o código, fiz uma pequena alteração no mesmo. Registre o evento em movements.xml. <movevent type="DeEquip" itemid="1212" slot="ring" event="script" value="bikesystem.lua"/> E o bikesystem.lua será o abaixo: local strg = 12120 -- Montado na Bike function onDeEquip(cid, item) if getPlayerStorageValue(cid, strg) > 0 then doPlayerSendCancel(cid, "You can't take out this item while you are monted.") return false end return true end Boa sorte.
  18. É que está faltando o script do "onEquip" (ao equipar) no seu script "bikeremove.lua". Caso esse script não precise da função "onEquip" (palpite por causa do nome do arquivo do script ser "bikeremove") então remova a tag onEquip do movements.xml. Boa sorte.
  19. Boa noite, Criei uma função para você, seu code ficará assim: local tpId = 1387 local tps = { ["RB Goku SSJ4"] = {pos = {x=389, y=250, z=15}, toPos = {x=400, y=250, z=15}, time = 60}, ["RB Vegeta SSJ4"] = {pos = {x=412, y=250, z=15}, toPos = {x=426, y=250, z=15}, time = 60}, ["RB Gohan SSJ4"] = {pos = {x=438, y=250, z=15}, toPos = {x=449, y=250, z=15}, time = 60}, ["RB Trunks SSJ4"] = {pos = {x=461, y=250, z=15}, toPos = {x=377, y=271, z=15}, time = 60}, ["RB Raditz SSJ4"] = {pos = {x=389, y=271, z=15}, toPos = {x=400, y=271, z=15}, time = 60}, ["RB Broly SSJ4"] = {pos = {x=412, y=271, z=15}, toPos = {x=426, y=271, z=15}, time = 60}, ["RB Turles SSJ4"] = {pos = {x=438, y=271, z=15}, toPos = {x=449, y=271, z=15}, time = 60}, ["RB Bardock SSJ4"] = {pos = {x=461, y=271, z=15}, toPos = {x=419, y=232, z=15}, time = 60}, ["RB Gogeta SSJ4"] = {pos = {x=419, y=220, z=15}, toPos = {x=419, y=316, z=15}, time = 60}, ["Porunga"] = {pos = {x=419, y=295, z=15}, toPos = {x=419, y=400, z=13}, time = 60}, ["Fire Guardian1"] = {pos = {x=642, y=718, z=6}, toPos = {x=638, y=718, z=6}, time = 60}, ["Fire Guardian2"] = {pos = {x=636, y=730, z=5}, toPos = {x=636, y=732, z=5}, time = 60}, ["Fire Guardian3"] = {pos = {x=636, y=707, z=5}, toPos = {x=636, y=705, z=5}, time = 60}, ["Hawk"] = {pos = {x=648, y=841, z=3}, toPos = {x=646, y=841, z=3}, time = 60}, ["Warlock"] = {pos = {x=637, y=837, z=3}, toPos = {x=641, y=831, z=1}, time = 60}, ["Titanius"] = {pos = {x=459, y=1080, z=6}, toPos = {x=361, y=1107, z=5}, time = 300}, } function removeTp(tp) local t = getTileItemById(tp.pos, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(tp.pos, CONST_ME_POFF) end end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeTp, tp.time*1000, tp) addEvent(doCreateMonster, tp.time*1001, getCreatureName(cid), tp.pos) doRemainCount(tp.pos, tp.time, "Respawn", math.random(1,255)) end return TRUE end function doRemainCount(pos, tempo, texto, color) -- Created By Adriano Swatt for x = 0, tempo do addEvent(function() if x < tempo then doSendAnimatedText(pos, ""..(tempo - x).."", color) else doSendAnimatedText(pos, ""..texto.."", color) end end, 1000*x) end end Boa sorte.
  20. Boa tarde, Sua database está faltando colunas, tente outra database (banco de dados), preferencialmente a que veio com o servidor. Para isso, você usa MySQL (site) ou SQL normal? Aguardando retorno.
  21. Tente assim: Registre em movements.xml como equip e deequip como abaixo (mudando apenas a ID do item): <movevent type="Equip" itemid="1294" slot="head" event="script" value="buffHelmet.lua"/> <movevent type="DeEquip" itemid="1294" slot="head" event="script" value="buffHelmet.lua"/> E o script em .LUA como de costume e use esse buffHelmet.lua. local cfg = { lifePercent = 40, -- value in percent } function onEquip(cid, item, slot) if isPlayer(cid) then maxHealth = getCreatureMaxHealth(cid) healthValue = (maxHealth + math.ceil((maxHealth / 100) * cfg.lifePercent)) setCreatureMaxHealth(cid, healthValue) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have equiped your '..getItemNameById(item.itemid)..' and your life points was buffed in '..cfg.lifePercent..'%.') return true end end function onDeEquip(cid, item, slot) if isPlayer(cid) then maxHealth = getCreatureMaxHealth(cid) healthValue = (maxHealth - math.ceil((maxHealth / 100) * cfg.lifePercent)) setCreatureMaxHealth(cid, healthValue) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Your buff of life points was removed.') return true end end ______________________________________________________________________________________________________________________ Ao @Ribeiro Foda Use o mesmo esquema no movements.xml e use esse script em seu respectivo .LUA. local cfg = { lifeAmount = 150, -- Amount of Life } function onEquip(cid, item, slot) if isPlayer(cid) then maxHealth = getCreatureMaxHealth(cid) healthValue = (maxHealth + cfg.lifeAmount) setCreatureMaxHealth(cid, healthValue) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have equiped your '..getItemNameById(item.itemid)..' and buffed in '..cfg.lifeAmount..' life points.') return true end end function onDeEquip(cid, item, slot) if isPlayer(cid) then maxHealth = getCreatureMaxHealth(cid) healthValue = (maxHealth - cfg.lifeAmount) setCreatureMaxHealth(cid, healthValue) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Your buff of life points was removed.') return true end end Boa sorte para ambos.
  22. Boa tarde, Poderia ser criado em movements o code para tal ação. Não creio ser difícil, caso ainda não tenha conseguido, me avise e posso te ajudar. Boa sorte.
  23. Lembrou de registrar em actions.xml e por a actionID na alavanca? Para não ocorrer nem mensagem ingame, nem erro na distro, provavelmente o script não esteja corretamente instalado. Verifique e, se possível, poste imagens do script instalado. Aguardando.

Informação Importante

Confirmação de Termo