Ir para conteúdo

luciano01

Membro
  • Registro em

  • Última visita

Tudo que luciano01 postou

  1. Eu tinha substituído errado, funcionou 100%. Obrigado!!
  2. __picif = {} function Creature:onChangeOutfit(outfit) return true end function Creature:onAreaCombat(tile, isAggressive) return true end -- Prey slots consumption local function preyTimeLeft(player, slot) local timeLeft = player:getPreyTimeLeft(slot) / 60 local monster = player:getPreyCurrentMonster(slot) if (timeLeft > 0) then local playerId = player:getId() local currentTime = os.time() local timePassed = currentTime - nextPreyTime[playerId][slot] if timePassed > 59 then timeLeft = timeLeft - 1 nextPreyTime[playerId][slot] = currentTime + 60 else timeLeft = 0 end -- Expiring prey as there's no timeLeft if (timeLeft == 0) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("Your %s's prey has expired.", monster:lower())) player:setPreyCurrentMonster(slot, "") end -- Setting new timeLeft player:setPreyTimeLeft(slot, timeLeft * 60) else -- Expiring prey as there's no timeLeft player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("Your %s's prey has expired.", monster:lower())) player:setPreyCurrentMonster(slot, "") end return player:sendPreyData(slot) end local function removeCombatProtection(cid) local player = Player(cid) if not player then return true end local time = 0 if player:isMage() then time = 10 elseif player:isPaladin() then time = 20 else time = 30 end player:setStorageValue(Storage.combatProtectionStorage, 2) addEvent(function(cid) local player = Player(cid) if not player then return end player:setStorageValue(Storage.combatProtectionStorage, 0) player:remove() end, time * 1000, cid) end -- Increase Stamina when Attacking Trainer local staminaBonus = { target = 'Training Monk', period = 120000, -- time on miliseconds bonus = 1, -- gain stamina events = {} } local function addStamina(name) local player = Player(name) if not player then staminaBonus.events[name] = nil else local target = player:getTarget() if not target or target:getName() ~= staminaBonus.target then staminaBonus.events[name] = nil else player:setStamina(player:getStamina() + staminaBonus.bonus) staminaBonus.events[name] = addEvent(addStamina, staminaBonus.period, name) end end end function Creature:onTargetCombat(target) if not self then if self:isPlayer() then if target and target:getName() == staminaBonus.target then local name = self:getName() if not staminaBonus.events[name] then staminaBonus.events[name] = addEvent(addStamina, staminaBonus.period, name) end end end return true end if not __picif[target.uid] then if target:isMonster() then target:registerEvent("RewardSystemSlogan") __picif[target.uid] = {} end end if target:isPlayer() then if self:isMonster() then local protectionStorage = target:getStorageValue(Storage.combatProtectionStorage) if target:getIp() == 0 then -- If player is disconnected, monster shall ignore to attack the player if target:isPzLocked() then end if protectionStorage <= 0 then addEvent(removeCombatProtection, 30 * 1000, target.uid) target:setStorageValue(Storage.combatProtectionStorage, 1) elseif protectionStorage == 1 then self:searchTarget() return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end return true end if protectionStorage >= os.time() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end if ((target:isMonster() and self:isPlayer() and target:getType():isPet() and target:getMaster() == self) or (self:isMonster() and target:isPlayer() and self:getType():isPet() and self:getMaster() == target)) then return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE end if PARTY_PROTECTION ~= 0 then if self:isPlayer() and target:isPlayer() then local party = self:getParty() if party then local targetParty = target:getParty() if targetParty and targetParty == party then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end end if ADVANCED_SECURE_MODE ~= 0 then if self:isPlayer() and target:isPlayer() then if self:hasSecureMode() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end return true end function Creature:onDrainHealth(attacker, typePrimary, damagePrimary, typeSecondary, damageSecondary, colorPrimary, colorSecondary) if (not self) then return typePrimary, damagePrimary, typeSecondary, damageSecondary, colorPrimary, colorSecondary end if (not attacker) then return typePrimary, damagePrimary, typeSecondary, damageSecondary, colorPrimary, colorSecondary end -- New prey => Bonus damage if (attacker:isPlayer()) then if (self:isMonster() and not self:getMaster()) then for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do if (attacker:getPreyCurrentMonster(slot) == self:getName() and attacker:getPreyBonusType(slot) == CONST_BONUS_DAMAGE_BOOST) then damagePrimary = damagePrimary + math.floor(damagePrimary * (attacker:getPreyBonusValue(slot) / 100)) break end end end -- New prey => Damage reduction elseif (attacker:isMonster()) then if (self:isPlayer()) then for slot = CONST_PREY_SLOT_FIRST, CONST_PREY_SLOT_THIRD do if (self:getPreyCurrentMonster(slot) == attacker:getName() and self:getPreyBonusType(slot) == CONST_BONUS_DAMAGE_REDUCTION) then damagePrimary = damagePrimary - math.floor(damagePrimary * (self:getPreyBonusValue(slot) / 100)) break end end end end return typePrimary, damagePrimary, typeSecondary, damageSecondary, colorPrimary, colorSecondary end Apareceu esse erro Lua Script Error: [Event Interface] data/events/scripts/creature.lua:Creature@onTargetCombat data/events/scripts/creature.lua:92: attempt to index local 'self' (a nil value) stack traceback: [C]: in function '__index' data/events/scripts/creature.lua:92: in function [C]: in function 'doTargetCombatHealth'
  3. Alguém poderia, porfavor, me ajudar a colocar os traning monk para dar 1 de stamina a cada 2 minutos pro tsf 1.2? Já existe em outros ots esse sistema.
  4. É possivel tirar essa parte de creature:stopLiveCast() dessa script? eu só quero que mande a msg quando passa pelo piso. function onStepIn(creature, item, position, fromPosition) if creature:isPlayer() then creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Attack the Monk and you will win 1 of stamina every 2 minutes training here.') creature:stopLiveCast() end return true end Aparece esse erro sempre que alguém pisa Lua Script Error: [MoveEvents Interface] data/movements/scripts/treinon.lua:onStepIn data/movements/scripts/treinon.lua:4: attempt to call method 'stopLiveCast' (a nil value) stack traceback: [C]: in function 'stopLiveCast' data/movements/scripts/treinon.lua:4: in function
  5. Olá, eu tô querendo postar um lastnews bonito no meu gesior mas eu não sei mexer muito lá. Existe algum tutorial aqui que explique??
  6. Meu ot está com o acesso a yalahar, eu gostaria de saber como eu colocaria pra ficar na missão 10. Porfavor, me ajudem! Farmine do mesmo jeito :C
  7. Bem, eu sei que ele é bem complicadinho por isso preciso de ajuda de vcs, eu tive uma ideia um dia desses de fazer tipo um moba no meu ot. Mas pra isso eu preciso muito de um sistema desse! Tipo, eu gostaria que o player falasse algo (talkaction) e entrasse numa fila (correspondente ao level dele 10 + 10 - ) ai quando chegasse os 20 player (10 em cada lado, lados aleatórios.) eles ganhavam uma storage (Storage já criada de dois times com caveiras. essa parte já existe!) ai o objetivo é clicar numa bandeira (inimiga) e levar o item até o outro lado onde terá um piso que vai fazer o time ganhar. PS':O local onde o player é teletransportado tem q ser gravado pela database, pra ele voltar p o mesmo local (e só pode iniciar o comando em area pz, pra não ter chance de bug's) PS'':Se o player morrer lá dentro não perde nada, mas volta p o canto onde ele tava (por exemplo no dp) PS''':Quando o time ganhar até os que morreram ganha uns golds e exp ( depende da média de lvl do seu grupo ) PS'''':Todas as storages ganhadas nesse evento tem q sumir após o evento acabar e ter os vencedores. Porq os players podem participar infinitas vezes. Bem, eu sei q é mt complicado, mas eu tô faço de td pra ter esse script. Rep+ por 1 semana em tds os post da pessoa q me ajudar Obrigado por ler !
  8. Bem, no titulo eu já disse tudo, kk É tipo assim, eu gostaria que um npc desse 2 itens diferentes para cada vocação, por exemplo um knight chega nele e ele pergunta se quer (a sword, o shield ou a armor. Um sorcerer chega ele pergunta se quer o spellbook, a wand ou a armor... etc) ai depois ele mandasse matar uns bixos e quando voltar ganhasse uns golds. Obrigado desde já! Rep +
  9. @Alexy Brocanello Eu copiei 3 vezes com bem calma, mas não tá dando sempre aparece esse erro
  10. Só falta esse erro do movements
  11. @Alexy Brocanello Apareceu esses erros aqui amigo
  12. Bem, eu gostaria de um piso que teletransportasse a pessoa (se tivesse lvl 100) E uma action que se o player clicasse numa arvore ele tbm se teletransportava (se tiver lvl 100) Obrigado desde já!! Rep ++
  13. Bem é meio simples, mas não sou muito bom em programação! eu queria um npc que quando o player falasse com ele "historia" ele falava uma historia e se o player falasse "missão" ele dava uma storage e mandava falar com outro npc, e quando tivesse outra storage (13500) ele mandasse matar uns monstros e depois de ter matado ganhava uns golds
  14. Meu pensamento é complicado, mas espero que vcs me ajudem Eu gostaria que existisse dois times no meu ot, quando um player falasse com o npc e escolhesse o time dele ele ganharia uma storage (a storage de seu time), com essa storage deixasse ele "inimigo" do outro time e poderia matar o pessoal inimigo sem abrir pk (Nessa parte eu pensei em por yellow skull pras storages que só a outra storage consegue ver) ps: meu pensamento é tipo um warsystem, mas não tem nada a ver com guild! São só duas storages diferentes. E fica pra sempre! Espero que vcs me ajudem !! Obrigado desde já Vale 10 rep + :*
  15. Tipo se me ajudarem a tirar a parte de criar o char pelo Create Account tbm seria muito bom Quando eu crio o Character pelo Create Account ele vem sem itens mas, Quando eu crio no Account Mananger na conta ele vem normal! Todos os Samples estão normais! Se me ajudarem a tirar o Create Character do Create Account tbm ia servi. Porfavor me ajudem !! Não sei mais oq fazer ! Estou usando o Hollister Ot e o Hollister Website http://www.tibiaking.com/forum/topic/16709-exclusivo-hollister-baiak-official-860-site-db/
  16. Queria tirar a parte de criar o char do createaccount.php, Alguém pode me ajudar ?
  17. luciano01 respondeu ao post em um tópico de luciano01 em Suporte Tibia OTServer
    tem sim, ja pedi pra testarem !!
  18. luciano01 postou uma resposta no tópico em Suporte Tibia OTServer
    Os LOGOS das Guilds não aparecem no Most powerfull guilds como resolver isso ?
  19. Como tirar o UpTime do meu site ? Ai está meu layout.php layout.php Porfavor me ajudem !! obg desde já! UP@ ​UP@
  20. Eu tento enviar pontos pra os players no site, pelo SHOP ADMIN Aparece q enviou 200 Premium Points added to the account of [god]lucce ! Mas não chega, alguém pode me ajudar nisso ? porfavor UP@ UP@
  21. Maninho, aparece isso quando eu tento executar a DB no phpmyadmin Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampp\phpMyAdmin\libraries\dbi\mysqli.dbi.lib.php on line 176 Séra q vc poderia me ajudar ?

Informação Importante

Confirmação de Termo