Ir para conteúdo

Sekk

Membro
  • Registro em

  • Última visita

Tudo que Sekk postou

  1. @KotZletY pode ser a flag tbm n pode?
  2. mano, vc entendeu errado o 'usar' q ele quer. Ele quer dar 'use' no item e ativar a aura. nada de equipar
  3. Sekk postou uma resposta no tópico em Suporte Tibia OTServer
    Gente, não sei de quando é o tópico que eu vi, mas enfim, preciso da ajuda de vcs! To querendo um sistema tipo !transfer Player, 10 -- esse comando abre um trade direto com o Player pra trocar 10 premium points. No trade, aparece um item que eu escolho em um código, ai o cara aceita, eu perco 10 premium points na DB e o cara recebe esses 10 points. No tópico que eu vi, o cara falou pra adicionar isso na source: luascript.h static int32_t luaDoStartTrade(lua_State* L); luascript.cpp //doStartTrade(cid, target, item) lua_register(m_luaState, "doStartTrade", LuaInterface::luaDoStartTrade); int32_t LuaInterface::luaDoStartTrade(lua_State* L) { ScriptEnviroment* env = getEnv(); Item* item = env->getItemByUID(popNumber(L)); if(!item) { errorEx(getError(LUA_ERROR_ITEM_NOT_FOUND)); lua_pushboolean(L, false); return 1; } Player* target = env->getPlayerByUID(popNumber(L)); Player* player = env->getPlayerByUID(popNumber(L)); if(!player || !target) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); return 1; } if(g_game.internalStartTrade(player, target, item)) { lua_pushboolean(L, true); return 1; } return 1; } Adicionei e compilei, deu certo, nenhum erro, blz, ai os scripts são esses q ele passou: talkaction creaturescripts Eu não sei o que registrar no creaturescripts.xml e nem se precisa registrar no login.lua '-' alguem me ajuda pfv? Obs.: Eu acho que não tenho as funções doPlayerRemoveVipPoints(cid) doPlayerAddVipPoints(target) Qual eu posso usar no lugar q tem o mesmo objetivo? uahaush, me ajudem pfv @Fir3element @Vodkart @xWhiteWolf
  4. na vdd é <event type="advance" name="MaxLvl" event="script" value="arquivo.lua"/> adiciona no login.lua isso aqui registerCreatureEvent(cid, "MaxLvl")
  5. na vdd, se vc notar bem, vc está transformando 1 hora em 1 segundo, pois config.time(1) * 1000 = 1000ms = 1s Então o certo é deixar setPlayerStorageValue(cid, config.storage, os.time() + config.time * 60 * 1000) addEvent(endExpRate, config.time * 60 * 1000, cid)
  6. creaturescripts
  7. Sekk postou uma resposta no tópico em Suporte Tibia OTServer
    actions/scripts/arquivo.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local s = 291921 local v = 'Vip 2' local pos = getCreaturePosition(cid) if getPlayerStorageValue(cid, s) <= 0 then doSendPlayerTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations, now you have your "..v.." and got access to new areas!") setPlayerStorageValue(cid, s, 1) doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) else doSendPlayerCancel(cid, "Sorry, you have already used this item.") doSendMagicEffect(pos, CONST_ME_POFF) end return true end actions.xml <action itemid="7439" event="script" value="arquivo.lua"/> ainda em actions, crie outro arquivo, dessa vez pro baú da quest vip2 arquivo2.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local s = 2222222 local pos = getCreaturePosition(cid) local i = 7439 if getPlayerStorageValue(cid, s) <= 0 then doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) setPlayerStorageValue(cid, s, 1) doPlayerAddItem(cid, i, 1) doSendPlayerTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations, you have just finished the Vip2 quest!") else doSendMagicEffect(pos, CONST_ME_POFF) doSendPlayerCancel(cid, "Sorry, you have already done this quest.") end return true end actions.xml <action actionid="9313" event="script" value="arquivo2.lua"/> No RME, coloque a actionid 9313 no baú da quest. movements/scripts/arquivo.lua function onStepIn(cid, item, position, fromPosition) local s = 291921 local v = 'escreve o nome do lugar aqui' if getPlayerStorageValue(cid, s) <= 0 then doPlayerSendCancel(cid, "Sorry, you cannot pass.") doTelportThing(cid, fromPosition, true) doSendMagicEffect(getCreaturePostion(cid), CONST_ME_POFF) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Welcome to "..v.."!") end return true end movements.xml <movevent type="StepIn" actionid="23424" event="script" value="arquivo.lua" /> Pelo RME, coloca a actionid 23424 em todos os tiles que vc quer que somente quem tem o VIP 2 tenha acesso. Lembrando, vc pode editar as storages, pode mudar o item do arquivo2(local i), e se mudar o item nesse local i, deve mudar também na tag do actions.xml do arquivo.lua, ambos tem que ser iguais.
  8. Sekk postou uma resposta no tópico em Suporte Tibia OTServer
    @alisoncelso se vc n sabe existe gente q n joga baiak. o cara acabou de pedir detalhes, se vc n der, n ajudamos, simples
  9. em casa eu vejo, to na facul n to conseguindo baixar, ta dando erro
  10. cara, acho que é outro processo, n tenho certeza. Mas, se for o mesmo, tem que baixar outras libs provavelmente
  11. nn, n coloca no lugar do outro. jaja eu revejo o script !! desculpa a demora
  12. Sekk postou uma resposta no tópico em Suporte Tibia OTServer
    e eu tinha esquecido das aspas uahsuahsa testei o meu script aqui, ele n ta teleportando pro fromPosition se o cara ta com a storage == 1 kct
  13. up oq? vc falou o negocio e n deu feedback dps ue
  14. Sekk postou uma resposta no tópico em Suporte Tibia OTServer
    function onStepIn(cid, item, position, fromPosition) local s = 19001 -- storage, n mexa local t = 1 * 24 * 60 * 60 * 1000 -- tempo em horas pra entrar no tp dnv local o = os.time() local h = -- escreve aqui o nome do local pra mandar a mensagem de boas vindas ao player local pos = getCreaturePosition(cid) if getPlayerStorageValue(cid, s) > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can enter again in "..s.." hours.") doTeleportThing(cid, fromPosition) doSendMagicEffect(pos, CONST_ME_POFF) else setPlayerStorageValue(cid, s, o + t) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome to "..h.."!") doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) end return true end <movevent type="StepIn" actionid="19544" event="script" value="extile.lua" />
  15. Acho que assim ta certo, testa ai @Breaky function onUse(cid, item, itemEx, toPosition, fromPosition) local s = 89745 local outfitF = 136 -- outfit Female citizen local outfitM = 128 -- outfit Male citizen local condo = createConditionObject(CONDITION_OUTFIT) if getPlayerStorageValue(cid, s) == 4 then doPlayerRemoveItem(cid, item.uid, 1) if getPlayerSex(cid) == 0 then addOutfitCondition(condo, {lookType = outfitF, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}) -- escolhe a cor de cada membro do outfit ai doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Now, you cannot change your outfit!") else addOutfitCondition(condo, {lookType = outfitM, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Now, you cannot change your outfit!") end else doPlayerSendCancel(cid, "Sorry, you can't use this item yet.") end return true end
  16. blz então vou tentar aqui, vlw @topic Consegui ligar o server... mudei o ip do client pra 127.0.0.1 e coloquei NULL nos caracteres restantes que tinha no client, vi um tutorial disso no otland e funciona, mas é o seguinte.. Criei a conta normal, mas quando eu vou criar um character da erro/warning falando que preciso arrumar no config.php as possíveis vocations de newchar, chequei la e está "Rook Sample", normal la. Chequei a database, o rook sample ta criado normal la, n faço ideia pq n consigo criar. outra coisa, no client, quando vou logar da "Invalid Account id", n consigo entrar mds uhuahsuahs quero testar esse 7.40
  17. eu ja te ensinei la no seu outro topico cara edit. ja vi pq o script n tava te satisfazendo, é pq o script de aura q vc tem, pede que a storage esta com valor == 2 se eu soubesse disso antes kkkk ai ta o script do item function onUse(cid, item, fromPosition, itemEx, toPosition) local s = 25950 -- storage aura local x = 25951 -- storage on/off local pos = getCreaturePosition(cid) -- n mexa local exh = 25952 -- storage exhaust local texh = 5 -- tempo de exhaust em segundos if exhaustion.check(cid, exh) then doPlayerSendCancel(cid, "You can use it again in "..exhaustion.get(cid, exh).." seconds.") return true end if getPlayerStorageValue(cid, x) <= 0 and getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, x, 1) setPlayerStorageValue(cid, s, 2) exhaustion.set(cid, exh, texh) doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua aura foi ativada.") elseif getPlayerStorageValue(cid, x) == 1 and getPlayerStorageValue(cid, s) == 2 then setPlayerStorageValue(cid, x, 0) setPlayerStorageValue(cid, s, 0) exhaustion.set(cid, exh, texh) doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua aura foi desativada.") end return true end
  18. creaturescripts/scripts/aura.lua local config = { tempo = 1, -- tempo em segundos efeito = 15, -- efeito q vc quer } local stor = 25950 function aura(cid) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(aura, config.tempo*1000, cid) end function onThink(cid, interval) if getPlayerStorageValue(cid, stor) == 1 then aura(cid) end return true end creaturescripts.xml <event type="think" name="AuraS" event="script" value="aura.lua"/> e registra isso no login.lua registerCreatureEvent(cid, "AuraS")
  19. Bom pessoal, to querendo entender toda a linguagem lua, sei que vai demorar, ja sei algumas coisas e no momento quero aprender sobre pairs e ipairs. Alguém experiente em scripting poderia me ajudar? Quero que criem algumas situações em que eu preciso usar pairs ou ipairs para resolver o caso, mas só me digam a resposta certa depois de eu postar o que eu achar que é. Pode ser? obs. não mandem situações dificeis, não sei usar isso ainda, então... obg gente, quero ter experiência com isso pra poder ajudar a comunidade futuramente, fixando códigos ou criando sistemas e eventos obg gente @xWhiteWolf @Fir3element @Vodkart @zipter98
  20. vc pode passar as libs q vc usou pra compilar? e as dlls do otx tbm, nunca usei otx '-' eu só uso tfs 0.4 e qual msvc vc usou? eu tenho o 15
  21. acho que eu n entendi direito ainda, dsclp kkkk

Informação Importante

Confirmação de Termo