Ir para conteúdo

gabrielzika

Membro
  • Registro em

  • Última visita

Tudo que gabrielzika postou

  1. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    só é usar a função doMoveCreature em addEvent e doCreatureSetNoMove para o player não sair correndo é claro rs, a segunda parte seria colocar para o player não poder deslogar nessa condição e se a caso o jogo caia ou desligue com ele encima só colocar pra na hora do login verificar e mandar o player para o cp
  2. @Christinacsa doBroadcastMessage("[Castle Of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!", MESSAGE_INFO_DESCR)
  3. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 vai na sua DB e olha o Promotion de alguem q seja Reborn e manda aqui...
  4. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 mano, essas reborn são quais promotion exemplo... sou um treinador e viro treinador de elite = Promotion 1 sou treinador de elite e viro treinador mestre = Promotion 2 Tendeu??
  5. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 essas Reborns são acima de quis vocations?? elas são apartir de Promotion qual??
  6. @hallanehallex da uma revisada em todos <event type="login"
  7. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 Quantas são as vocs que podem usar o npc?
  8. @hallanehallex manda seu creaturescripts.xml
  9. @hallanehallex local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if getPlayerSlotItem(cid, 2).itemid == 11396 then doPlayerSetExperienceRate(cid, 2) end local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) exhaustion.set(cid, 102053, -1) setPlayerStorageValue(cid, 40008, -1) setPlayerStorageValue(cid, 47002, -1) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ShinobiWarCombat") registerCreatureEvent(cid, "ShinobiWarDeath") registerCreatureEvent(cid, "Arena") registerCreatureEvent(cid, "Izanami") registerCreatureEvent(cid, "Izanagi") registerCreatureEvent(cid, "AntiMc") registerCreatureEvent(cid, "UP") registerCreatureEvent(cid, "VocationIn") registerCreatureEvent(cid, "VocationOut") registerCreatureEvent(cid, "Protect") registerCreatureEvent(cid, "AmuletoDeath") registerCreatureEvent(cid, "AmuletoKill") registerCreatureEvent(cid, "Attack2") registerCreatureEvent(cid, "Attack") registerCreatureEvent(cid, "NonGuild") registerCreatureEvent(cid, "PvpNoPoison") registerCreatureEvent(cid, "ExameJouninDead") registerCreatureEvent(cid, "ExameJouninBoss") registerCreatureEvent(cid, "ExameChuninDead") registerCreatureEvent(cid, "ExameChuninBoss") registerCreatureEvent(cid, "Desbugar") registerCreatureEvent(cid, "Outfit") registerCreatureEvent(cid, "ProtDeath") registerCreatureEvent(cid, "Trocar Voc") registerCreatureEvent(cid, "Recompensa") registerCreatureEvent(cid, "showVoc") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") ---------------------------------------------------------- local config = { "itachi", "kisame", "minato", "raikage", "madara", "pain", "kakuzo", "hashirama", } for i = 1, #config do if getVocationInfo(getPlayerVocation(cid)).name:lower() == config:lower() then if getPlayerStorageValue(cid, 5) < 1 then setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+80000) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+80000) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setPlayerStorageValue(cid, 5, 1) end break end end ----------------------------------------------------------- return true end
  10. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 sim.. local vocation5 = 440 getPlayerVocation(cid) ~= vocation5
  11. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 assim? local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local items = { item1 = {6527, 2205}, -- item1 item que será pedido e que será dado na primeira troca } local counts = { count1 = {30, 1}, -- count1 quantidade que será pedido e que será dado na primeira troca } local vocation = 5 -- vocation proibida.. local vocation1 = 6 -- vocation proibida.. local vocation2 = 7 -- vocation proibida.. local vocation3 = 8 -- vocation proibida.. function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'vocation cabba') then selfSay('Voce deseja trocar '.. counts.count1[1] ..' '.. getItemNameById(items.item1[1]) ..' por '.. counts.count1[2] ..' '.. getItemNameById(items.item1[2]) ..'?',cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') then if getPlayerVocation(cid) ~= vocation and getPlayerVocation(cid) ~= vocation1 and getPlayerVocation(cid) ~= vocation2 and getPlayerVocation(cid) ~= vocation3 then if getPlayerItemCount(cid, items.item1[1]) >= counts.count1[1] then doPlayerRemoveItem(cid, items.item1[1], counts.count1[1]) doPlayerAddItem(cid, items.item1[2], counts.count1[2]) selfSay('Voce acaba de trocar '.. counts.count1[1] ..' '.. getItemNameById(items.item1[1]) ..' por '.. counts.count1[2] ..' '.. getItemNameById(items.item1[2]) ..'.', cid) talkState[talkUser] = 0 else selfSay('Voce precisa de '.. counts.count1[1] ..' '.. getItemNameById(items.item1[1]) ..'.', cid) end else selfSay('Voce está proibido de comprar aqui.', cid) end end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  12. @Gnius tenta assim.. talvez essa storage sua ai esteja sendo usada em outra coisa.. function onSay(cid, words, param, channel) local exausted = 30 --Tempo em segundos. if exhaustion.check(cid, 928111) then return doPlayerSendCancel(cid, "Aguarde "..exhaustion.get(cid, 928111).." segundo(s) para salvar seu personagem novamente.") end doPlayerSave(cid) exhaustion.set(cid, 928111, exausted) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Seu personagem foi salvo com sucesso.") return true end
  13. gabrielzika postou uma resposta no tópico em Suporte Tibia OTServer
    @douglasfamil1 veja se é isso local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local items = { item1 = {6527, 2205}, -- item1 item que será pedido e que será dado na primeira troca } local counts = { count1 = {30, 1}, -- count1 quantidade que será pedido e que será dado na primeira troca } local vocation = 5 -- vocation proibida.. function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'vocation cabba') then selfSay('Voce deseja trocar '.. counts.count1[1] ..' '.. getItemNameById(items.item1[1]) ..' por '.. counts.count1[2] ..' '.. getItemNameById(items.item1[2]) ..'?',cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') then if getPlayerVocation(cid) ~= vocation then if getPlayerItemCount(cid, items.item1[1]) >= counts.count1[1] then doPlayerRemoveItem(cid, items.item1[1], counts.count1[1]) doPlayerAddItem(cid, items.item1[2], counts.count1[2]) selfSay('Voce acaba de trocar '.. counts.count1[1] ..' '.. getItemNameById(items.item1[1]) ..' por '.. counts.count1[2] ..' '.. getItemNameById(items.item1[2]) ..'.', cid) talkState[talkUser] = 0 else selfSay('Voce precisa de '.. counts.count1[1] ..' '.. getItemNameById(items.item1[1]) ..'.', cid) end else selfSay('Voce está proibido de comprar aqui.', cid) end end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  14. @Gabrielk bom, não entendi muito bem... mas ve se tá certo local min, max = 630,720 --Ataque mínino e ataque máximo local w = { [1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE}, [2] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE}, [3] = {ef = 46, sh = 38, dmg = COMBAT_POISONDAMAGE}, [4] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE}, [5] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE}, [6] = {ef = 36, sh = 31, dmg = COMBAT_PHYSICALDAMAGE}, [7] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE} } function onUseWeapon(cid, var) local effect = getPlayerStorageValue(cid, 4561) local target = getCreatureTarget(cid) if target ~= 0 then local wx = w[effect] or w[6] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) end return true end
  15. @Gabrielk sobre como por mais wands, agora a outra eu não entendi, me explica! function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 12601 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 12429 ItemPoison = 12599 ItemDeath = 12367 ItemEnergy = 12383 ItemPhysical = 13748 ItemHoly = 12602 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wandid1 = 7735 -- ID da Wand 1 local wandid2 = 12671 -- ID da Wand 2 local wandid3 = 12672 -- ID da Wand 3 local wandid4 = 12673 -- ID da Wand 4 local wandid5 = 12674 -- ID da Wand 5 local wandid6 = 12675 -- ID da Wand 6 local wandid7 = 12676 -- ID da Wand 7 local wandid8 = 12677 -- ID da Wand 8 local wandid9 = 12678 -- ID da Wand 9 local wandid10 = 12679 -- ID da Wand 10 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1 local wands2 = wand_left ~= wandid2 and wand_right ~= wandid2 local wands3 = wand_left ~= wandid3 and wand_right ~= wandid3 local wands4 = wand_left ~= wandid4 and wand_right ~= wandid4 local wands5 = wand_left ~= wandid5 and wand_right ~= wandid5 local wands6 = wand_left ~= wandid6 and wand_right ~= wandid6 local wands7 = wand_left ~= wandid7 and wand_right ~= wandid7 local wands8 = wand_left ~= wandid8 and wand_right ~= wandid8 local wands9 = wand_left ~= wandid9 and wand_right ~= wandid9 local wands10 = wand_left ~= wandid10 and wand_right ~= wandid10 if wands1 and wands2 and wands3 and wands4 and wands5 and wands6 and wands7 and wands8 and wands9 and wands10 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
  16. @Gabrielk function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local id = 7735 -- ID da Wand 1 local id2 = 7736 -- ID da Wand 2 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid if wand_left ~= id and wand_right ~= id and wand_left ~= id2 and wand_right ~= id2 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
  17. @Gnius local pos = {x = 1037, y = 1036, z = 7} -- Onde sera teleportado local level = 300 -- level necessario local healthMax = getCreatureMaxHealth(cid) function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerLevel(cid) < level then return true end doPlayerAddLevel(cid, -30) doCreatureAddHealth(cid, -1800) setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)-1800)) doPlayerAddExperience(cid, -25650) doTeleportThing(cid, pos) return true end
  18. @Gabrielk testa agora function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local id = 7735 -- ID da Wand 1 local id2 = 7736 -- ID da Wand 2 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid if (wand_left ~= id and wand_right ~= id) or (wand_left ~= id2 and wand_right ~= id2) then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
  19. @Gabrielk Test, tenta com essas duas... function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local id = 7735 -- ID da Wand 1 local id2 = 7736 -- ID da Wand 2 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid if wand_left ~= id and wand_right ~= id or wand_left ~= id2 and wand_right ~= id2 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
  20. @hallanehallex a Distro Crash ou o Client que Fecha?
  21. @hallanehallex to falando magic effect e não sprites...
  22. @Gabrielk tenta assim, se funcionar eu coloco pra por em outras wands... function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local id = 7735 -- ID da Wand 1 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid if wand_left ~= id and wand_right ~= id then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
  23. @hallanehallex Pra quanto você aumentou o limite??

Informação Importante

Confirmação de Termo