Ir para conteúdo

Sanieg

Membro
  • Registro em

  • Última visita

Tudo que Sanieg postou

  1. Bem lembrado ... Estava um pouco sem atenção ...
  2. <event type="statschange" name="damageeffect" event="script" value="EXEMPLO.lua"/> O nome do evento "name=" tem que ser o mesmo que registrou em login.lua ...
  3. local function getPlayFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)} return size.day + size.week + size.month end function onUse(cid, fromPos, item, toPos) local item = 2160 --IDDOITEM if getPlayerStorageValue(cid, 19245) >= 1 then doPlayerSendCancel(cid, "Voce ja completou a quest.") return LUA_ERROR end if getPlayFrags(cid) < 100 then doPlayerSendCancel(cid, "Voce precisa possuir 100 frags.") return false end doPlayerAddItem(cid, item, 1) doPlayerSendTextMessage(cid, 19, "Voce recebeu seu premio.") setPlayerStorageValue(cid, 19245, 1) return true end
  4. Seguinte não tenho experiência nenhuma com código sql... function onSay(cid, words, param) doSetGameState(GAMESTATE_CLOSED) db.executeQuery("UPDATE `players` SET `level` = "1" WHERE `group_id` < 6") db.executeQuery("DELETE FROM `player_depotitems` , `player_items` WHERE `group_id` < 6 AND (IGNORE INTO `player_items` WHERE `itemtype` = "IDDOITEM" OR `itemtype` = "IDDOITEM")") addEvent(doSetGameState, 1*60*1000, GAMESTATE_NORMAL) return true end no caso a tag seria: <talkaction log="yes" words="/reset" access="6" event="script" value="EXEMPLO.lua"/>
  5. Sanieg postou uma resposta no tópico em Playground (Off-topic)
    Resumindo... Seu servidor era bom. Ok, mais a nenhum momento eu quis ridicularizar seu projeto apenas achei que se "você/qualquer pessoa" que venha a por um OT online que possua um minimo de players esse servidor tem algo de novo para mostrar. Mas de qualquer forma sua própria opinião sobre o servidor na maioria das vezes seria positiva... Ou seja pode ser tanto: (Está bom, porém pode ficar melhor) do que: (Isso ficou horrível, por que eu coloquei esse negocio online ?!)
  6. Pronto, agora está completo... Demorei para encontrar a função porém encontrei...
  7. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Poste seu creaturescripts.xml por favor... ...
  8. Sanieg postou uma resposta no tópico em Playground (Off-topic)
    O que ?
  9. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Ok, aguardando o resultado..
  10. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Sim, creio que seja necessário...
  11. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Editado *Não sabia que era necessário 1 sqm de distancia porém já editei
  12. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Em data/creaturescripts/scripts crie punch.lua function onCombat(cid, target) local effect = 10 --Id do efeito if isPlayer(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) >= 1 then doSendMagicEffect(getCreaturePosition(cid), effect) end return true end tag: <event type="combat" name="punch" event="script" value="punch.lua"/>
  13. Sanieg postou uma resposta no tópico em Playground (Off-topic)
    | | VOCÊ | | NÃO VIU | | ISSO | |
  14. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Precisa, isso que ele postou é uma spell é necessário que ele diga Soco...
  15. Certamente ... O único que não se deveria registrar seria caso ele fosse onLogin ...
  16. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    Olha, eu não sei ao certo o que esta errado. Porém eu me pergunto: Como algum número pode ser menor que 0 ... if getGlobalStorageValue(STORAGE_EVENT) < 0 then return true end E caso seja um erro seria return false ou seja o mesmo que 0 e LUA_ERROR
  17. function onSay(cid, words, param) local onlines = getCreatureOufit(getOnlinePlayers()).looktype == 332 if onlines ~= true then doPlayerSendCancel(cid, "Ninguem com essa outfit encontrado.") end doCreatureChangeOutfit(onlines, 128) return true end
  18. Sanieg postou uma resposta no tópico em Suporte Tibia OTServer
    O servidor só retorna essa mensagem ? ...
  19. function onStatsChange(cid, target, combat, value) local pos1 = {x=1050,y=1050,z=7} --Superior esquerdo da area de pvp local pos2 = {x=1050,y=1050,z=7} --Inferior direito da area de pvp if getCreatureTarget(cid) and isPlayer(target) and math.abs(value) >= getCreatureHealth(target) and isInRange(getPlayerPosition(target), pos1, pos2) or getTileInfo(getCreaturePosition(target)).pvp then doSendTextMessage(cid, MESSAGE_EXPERIENCE, "Your ".. getCreatureSummons(cid) .." deals ".. math.abs(value) .." damage to ".. getCreatureName(target) ..".") end return true end
  20. Sanieg postou uma resposta no tópico em Sprites
    Você mudou conforme a versão que o client dele utiliza ? exemplo: caso você utilize o 10.56 e as sprites que ele disponibilizou forem do 8.54 não irá funcionar possivelmente com esse resultado...
  21. local tempo = 120 -- tempo em segundos. local effect = {208} -- effect no player, caso queira apenas 1, basta remover os outros numeros. local ml = 70 -- quantos ira aumentar o skill de ML local skillfist = 15 -- quantos ira aumentar o skill de Fist local skillsword = 35 -- quantos ira aumentar o skill de Sword local skillaxe = 35 -- quantos ira aumentar o skill de Axe local skillclub = 35 -- quantos ira aumentar o skill de Club local skilldistance = 35 -- quantos ira aumentar o skill de Distance local skillshield = 35 -- quantos ira aumentar o skill de Shield local health = 250 -- A cada 1 segundo quantos aumentar de vida local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 250) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000) setCombatCondition(combat, condition) function magicEffect2522(tempo2,tempo3,cid) if (isCreature(cid)) then if getPlayerStorageValue(cid, 102056) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then for i=1, #effect do local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect[i]) -- parte modificada local summons = getCreatureSummons(cid) if #summons > 0 then for k = 1, #summons do local pos = getCreaturePosition(summons[k]) local positions = {x = pos.x, y = pos.y, z = pos.z} doSendMagicEffect(positions, effect[i]) end end -- fim da parte modificada end end end end function onCastSpell(cid, var) local position129 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if getPlayerStorageValue(cid, 102056) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doPlayerSendTextMessage(cid,27,'Shiki esta ativado.') doCombat(cid, combat, var) tempo2 = 0 while (tempo2 ~= (tempo*1000)) do addEvent(magicEffect2522, tempo2, tempo2, tempo*1000, cid) tempo2 = tempo2 + 300 end setPlayerStorageValue(cid, 102056,1) -- storage verifica transformado, quando = 1 player esta transformado. doCreatureSay(cid, "Shiki ", TALKTYPE_MONSTER) doSendMagicEffect(position129, 226) else doPlayerSendCancel(cid, "O buff ja está ativo.") end end
  22. Reinicia o servidor e utiliza a spell de novo, só para eu verificar uma coisa...

Informação Importante

Confirmação de Termo