
Tudo que psychonaut postou
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
http://pastebin.com/Gi0x2tkK editei o errado... :x
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
No spells.xml põe isso aqui na sua magia: needtarget="1" Apaga isso aqui se tiver: casterTargetOrDirection="1" Ai tenta usar esse aqui: http://pastebin.com/wqKw6qAt Se der erro, manda junto a parte da spell que tu ta usando no spells.xml e o erro também...
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
Tá dando erro na linha 1? Vê se tu copiou direito
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
Se esse não funcionar, não sei mais o que fazer http://pastebin.com/ATCeYvnp
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
Sim, se da esse erro ai, quando ta sem a parte do cooldown, porque eu acho que isso ai é erro do seu script
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
O script funciona sem o cooldown? Isso parece um erro no addevent
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
Vamo la, é por causa da versão do TFS, tenta esse agora(coloquei no paste): #edit, Agora vai http://pastebin.com/GQNs6P00
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
local quant_hit = 4 -- quantidade de hits que ira dar no target local timeHit = 0.5 -- segundos de diferença para cada hit local quant_sqm = 1 -- sqms que ira empurrar o target local sqmTime = 0.01 -- segundos para empurrar após hitar, exemplo de meio segundo. local tempodecooldown = 5 --- COOLDOWN local playerEffect = 134 -- efeito no player. local tiles_exception = {8277,8283,410,459,6169,6130,411,369,1385,1394,1395,5260,9574,9573,5023,1387,470,4836} -- sqms que não podera ser criado os itens, ou seja, os buracos de escada. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_SPEED, -100) setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, tempodecooldown) function onCastSpell(cid, var) local target = getCreatureTarget(cid) if exhaustion.check(cid,288) then doPlayerSendCancel(cid, "Sua magia esta em "..exhaustion.get(cid, 288).." segundos de cooldown.") return false end if target > 0 then local position_target = nil local cont = 0 for i=-1, 1 do for j=-1,1 do position_target = {x=getCreaturePosition(target).x+i, y=getCreaturePosition(target).y+j, z=getCreaturePosition(target).z} if isWalkable(position_target) then cont = cont+1 break end end if cont > 0 then break end position_target = nil end local px = math.random(-1,1) local py = 0 if px == -1 or px == 1 then py = 0 elseif px == 0 then local n = {1,-1} py = n[math.random(1,#n)] end local poscentral = {x=getCreaturePosition(target).x+px, y=getCreaturePosition(target).y+py, z=getCreaturePosition(target).z} if isWalkable(poscentral) then position_target = poscentral end if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) <= 1 then position_target = getCreaturePosition(cid) end if position_target == nil then doPlayerSendCancel(cid, "Você não pode atravesar isso!") return false end local pos = position_target posTile1 = {{x=pos.x,y=pos.y,z=pos.z,stackpos=1}, 5579} -- embaixo do player posTile2 = {{x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1}, 5585} posTile3 = {{x=pos.x+1,y=pos.y,z=pos.z,stackpos=1}, 5580} posTile4 = {{x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1}, 5575} posTile5 = {{x=pos.x,y=pos.y-1,z=pos.z,stackpos=1}, 5574} posTile6 = {{x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1}, 5573} posTile7 = {{x=pos.x-1,y=pos.y,z=pos.z,stackpos=1}, 5578} posTile8 = {{x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1}, 5583} posTile9 = {{x=pos.x,y=pos.y+1,z=pos.z,stackpos=1}, 5584} posTile10 = {{x=pos.x,y=pos.y+2,z=pos.z,stackpos=1}, 5588} posTile11 = {{x=pos.x+1,y=pos.y+2,z=pos.z,stackpos=1}, 5589} posTile12 = {{x=pos.x+2,y=pos.y+1,z=pos.z,stackpos=1}, 5586} posTile13 = {{x=pos.x+2,y=pos.y,z=pos.z,stackpos=1}, 5581} posTile14 = {{x=pos.x+2,y=pos.y-1,z=pos.z,stackpos=1}, 5576} posTile15 = {{x=pos.x+1,y=pos.y-2,z=pos.z,stackpos=1}, 5571} posTile16 = {{x=pos.x,y=pos.y-2,z=pos.z,stackpos=1}, 5570} posTile17 = {{x=pos.x-1,y=pos.y-2,z=pos.z,stackpos=1}, 5569} posTile18 = {{x=pos.x-2,y=pos.y-1,z=pos.z,stackpos=1}, 5572} posTile19 = {{x=pos.x-2,y=pos.y,z=pos.z,stackpos=1}, 5577} posTile20 = {{x=pos.x-2,y=pos.y+1,z=pos.z,stackpos=1}, 5582} posTile21 = {{x=pos.x-1,y=pos.y+2,z=pos.z,stackpos=1}, 5587} posTile22 = {{x=pos.x,y=pos.y-3,z=pos.z,stackpos=1}, 5590} posTile23 = {{x=pos.x+2,y=pos.y-2,z=pos.z,stackpos=1}, 5592} posTile24 = {{x=pos.x-2,y=pos.y-2,z=pos.z,stackpos=1}, 5591} posTile25 = {{x=pos.x-3,y=pos.y,z=pos.z,stackpos=1}, 5593} posTile26 = {{x=pos.x-2,y=pos.y+2,z=pos.z,stackpos=1}, 5595} posTile27 = {{x=pos.x+3,y=pos.y,z=pos.z,stackpos=1}, 5594} posAllTeste = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8,posTile9,posTile10,posTile11,posTile12,posTile13,posTile14,posTile15,posTile16,posTile17,posTile18,posTile19,posTile20,posTile21,posTile22,posTile23,posTile24,posTile25,posTile26,posTile27} posAll = {} for i=1, #posAllTeste do if isWalkable2(posAllTeste[i][1]) then posAll[#posAll+1] = posAllTeste[i] end end if position_target ~= nil then doTeleportThing(cid, position_target) local tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(sendEffect813, tempo, cid, target) tempo = tempo + 500 end tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(hitTarget35, tempo, cid, target) tempo = tempo + (timeHit*1000) end local temp = tempo while (tempo ~= temp+quant_sqm*(sqmTime*1000)) do addEvent(empurrar2Target, tempo, cid, target, tempo, posAll) tempo = tempo + (sqmTime*1000) end doAddCondition(cid, condition) doAddCondition(target, condition) local mana_hit = (getPlayerLevel(cid)*2 + getPlayerMagLevel(cid)*2 + 24700) doCreatureAddMana(target, -mana_hit) for o=1, #posAll do local check = true for j=0, 255 do pos_stack = {x=posAll[o][1].x,y=posAll[o][1].y,z=posAll[o][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if isInArray(tiles_exception, removeTile.itemid) then check = false end end if check then if isWalkable2(posAll[o][1]) then doCreateItem(posAll[o][2], 1, posAll[o][1]) end end end exhaustion.set(cid,288,cooldown) return true else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else doPlayerSendCancel(cid, "Você precisa de um target!") end end function isWalkable(pos, creature, pz, proj) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function isWalkable2(pos, creature, pz, proj) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function hitTarget35(cid, target) if isCreature(target) and isPlayer(cid) then local effect813 = 9 -- efeito do hit na creatura. doAddCondition(target, condition) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -getHit35(cid), -getHit35(cid), effect813) end end function getHit35(cid) local hit35 = getPlayerLevel(cid)*1 + getPlayerMagLevel(cid)*1 + math.random(55000,56000) return hit35 end function empurrar2Target(cid, target, tempo, posAll) if isPlayer(cid) then doRemoveCondition(cid, CONDITION_PARALYZE) end if not isCreature(target) then for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end if isCreature(target) and isPlayer(cid) then local positions = nil doAddCondition(target, condition) if getPlayerLookDir(cid) == 0 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 1 then positions = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 2 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 3 then positions = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} end if positions ~= nil and isWalkable(positions) then doTeleportThing(target, positions) end local tp = sqmTime*1000*(quant_sqm-1)+quant_hit*timeHit*1000 if tempo == tp then doRemoveCondition(target, CONDITION_PARALYZE) for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end end end function sendEffect813(cid, target) local position1 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if isCreature(target) and isPlayer(cid) then doSendMagicEffect(position1, playerEffect) end end
-
Client tibia 9.6 sem vírus =/
O navegador vai acusar mas é falso positivo, é do site do remeres,se usa o chrome, vai em detalhes e clica "visitar este site" http://remeresmapeditor.com/rmedl.php?file=tibia960.exe #edit Também tem esse site: http://www.tibia.sx/ Muito bom também.
-
removido
deleta o topico
-
(Resolvido)Mudar Mensagem de BAN
<talkaction words="/ban" separator=" " script="ban.lua" />
-
(Resolvido)Mudar Mensagem de BAN
Testei agora, funcionando no meu TFS 1.2, tem que digitar tudo caso contrario não aparece function onSay(cid, words, param, channel) local player = Player(cid) if player:getGroup():getId() > 2 then local split = param:split(",") if split[1] ~= nil then local accountId = getAccountNumberByPlayerName(split[1]) if accountId > 0 then local comment = "" if split[2] == nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Use: /ban Nick, dias, razao\nExemplo: /ban Goku, 20, Abuso de bug") return false elseif isNumber(split[2]) == false then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Use: /ban Nick, dias, razao\nExemplo: /ban Goku, 20, Abuso de bug") return false end if split[3] ~= nil then comment = split[3] end else player:sendCancelMessage("Jogador com nome " .. split[1] .. " não existe.") return false end local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) if resultId ~= false then result.free(resultId) return false end local targetCid = getPlayerByName(split[1]) local timeNow = os.time() local queryBool = db:query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. accountId .. "," .. "'" .. tostring(split[3]) .. "'" ..", " .. timeNow .. ", " .. timeNow + (split[2] * 86400) .. ", " .. getPlayerGUIDByName(getCreatureName(cid)) .. ")") if queryBool == true then if targetCid ~= false then doRemoveCreature(targetCid) end else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Use: /ban Nick, dias, razao\nExemplo: /ban Goku, 20, Abuso de bug") end end end end
-
(Resolvido)Mudar Mensagem de BAN
Tenta esse: local banDays = 7 function onSay(cid, words, param) local player = Player(cid) if not player:getGroup():getAccess() then return true end local name = param local reason = '' local banInfo = '' local banTime = 0 local banMultiplier = 0 local params = param:split(',') if params ~= nil then name = params[1] reason = string.trim(params[2]) banInfo = string.trim(params[3]) end if banInfo then if banInfo:find('h') then banTime = banInfo:sub(0, banInfo:find('h') - 1) banMultiplier = 3600 elseif banInfo:find('d') then banTime = banInfo:sub(0, banInfo:find('d') - 1) banMultiplier = 86400 else banTime = banDays banMultiplier = 86400 end banTime = banTime * banMultiplier end local accountId = getAccountNumberByPlayerName(name) if accountId == 0 then return false end local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) if resultId ~= false then result.free(resultId) return false end local timeNow = os.time() db:query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. accountId .. ", " .. db.escapeString(reason) .. ", " .. timeNow .. ", " .. timeNow + banTime .. ", " .. player:getGuid() .. ")") local target = Player(name) if target ~= nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, target:getName() .. " foi banido.") target:remove() else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, name .. " foi banido.") end end /ban nome razão tempo horas = ex: 30h dias = ex: 30d Pra ban no ip tenho esse aqui perdido, mas não sei se vai funcionar no 1.0: local ipBanDays = 7 function onSay(cid, player, words, param) if getPlayerGroupId(cid) > 2 then local resultId = db.storeQuery("SELECT `account_id`, `lastip` FROM `players` WHERE `name` = " .. db.escapeString(param)) if resultId == false then return false end local ip = result.getNumber(resultId, "lastip") result.free(resultId) local targetPlayer = Player(param) if targetPlayer then ip = targetPlayer:getIp() targetPlayer:remove() end if ip == 0 then return false end resultId = db.storeQuery("SELECT 1 FROM `ip_bans` WHERE `ip` = " .. ip) if resultId ~= false then result.free(resultId) return false end local timeNow = os.time() db.query("INSERT INTO `ip_bans` (`ip`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. ip .. ", '', " .. timeNow .. ", " .. timeNow + (ipBanDays * 86400) .. ", " .. player:getGuid() .. ")") return false end end Eu teria que converter ele.
-
(Resolvido)[PEDIDO] Colocar cooldown em spell.
Tenta isso aqui. Ta aí local quant_hit = 4 -- quantidade de hits que ira dar no target local timeHit = 0.5 -- segundos de diferença para cada hit local quant_sqm = 1 -- sqms que ira empurrar o target local sqmTime = 0.01 -- segundos para empurrar após hitar, exemplo de meio segundo. local tempodecooldown = 5 --- COOLDOWN local playerEffect = 134 -- efeito no player. local tiles_exception = {8277,8283,410,459,6169,6130,411,369,1385,1394,1395,5260,9574,9573,5023,1387,470,4836} -- sqms que não podera ser criado os itens, ou seja, os buracos de escada. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_SPEED, -100) setConditionFormula(condition, 0, 0, 0, 0) setCombatCondition(combat, condition) local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, tempodecooldown) function onCastSpell(cid, var) local target = getCreatureTarget(cid) if exhaustion.check(cid,288) then doPlayerSendCancel(cid, "Sua magia esta em "..exhaustion.get(cid, 288).." segundos de cooldown.") return false if target > 0 then local position_target = nil local cont = 0 for i=-1, 1 do for j=-1,1 do position_target = {x=getCreaturePosition(target).x+i, y=getCreaturePosition(target).y+j, z=getCreaturePosition(target).z} if isWalkable(position_target) then cont = cont+1 break end end if cont > 0 then break end position_target = nil end local px = math.random(-1,1) local py = 0 if px == -1 or px == 1 then py = 0 elseif px == 0 then local n = {1,-1} py = n[math.random(1,#n)] end local poscentral = {x=getCreaturePosition(target).x+px, y=getCreaturePosition(target).y+py, z=getCreaturePosition(target).z} if isWalkable(poscentral) then position_target = poscentral end if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) <= 1 then position_target = getCreaturePosition(cid) end if position_target == nil then doPlayerSendCancel(cid, "Você não pode atravesar isso!") return false end local pos = position_target posTile1 = {{x=pos.x,y=pos.y,z=pos.z,stackpos=1}, 5579} -- embaixo do player posTile2 = {{x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1}, 5585} posTile3 = {{x=pos.x+1,y=pos.y,z=pos.z,stackpos=1}, 5580} posTile4 = {{x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1}, 5575} posTile5 = {{x=pos.x,y=pos.y-1,z=pos.z,stackpos=1}, 5574} posTile6 = {{x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1}, 5573} posTile7 = {{x=pos.x-1,y=pos.y,z=pos.z,stackpos=1}, 5578} posTile8 = {{x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1}, 5583} posTile9 = {{x=pos.x,y=pos.y+1,z=pos.z,stackpos=1}, 5584} posTile10 = {{x=pos.x,y=pos.y+2,z=pos.z,stackpos=1}, 5588} posTile11 = {{x=pos.x+1,y=pos.y+2,z=pos.z,stackpos=1}, 5589} posTile12 = {{x=pos.x+2,y=pos.y+1,z=pos.z,stackpos=1}, 5586} posTile13 = {{x=pos.x+2,y=pos.y,z=pos.z,stackpos=1}, 5581} posTile14 = {{x=pos.x+2,y=pos.y-1,z=pos.z,stackpos=1}, 5576} posTile15 = {{x=pos.x+1,y=pos.y-2,z=pos.z,stackpos=1}, 5571} posTile16 = {{x=pos.x,y=pos.y-2,z=pos.z,stackpos=1}, 5570} posTile17 = {{x=pos.x-1,y=pos.y-2,z=pos.z,stackpos=1}, 5569} posTile18 = {{x=pos.x-2,y=pos.y-1,z=pos.z,stackpos=1}, 5572} posTile19 = {{x=pos.x-2,y=pos.y,z=pos.z,stackpos=1}, 5577} posTile20 = {{x=pos.x-2,y=pos.y+1,z=pos.z,stackpos=1}, 5582} posTile21 = {{x=pos.x-1,y=pos.y+2,z=pos.z,stackpos=1}, 5587} posTile22 = {{x=pos.x,y=pos.y-3,z=pos.z,stackpos=1}, 5590} posTile23 = {{x=pos.x+2,y=pos.y-2,z=pos.z,stackpos=1}, 5592} posTile24 = {{x=pos.x-2,y=pos.y-2,z=pos.z,stackpos=1}, 5591} posTile25 = {{x=pos.x-3,y=pos.y,z=pos.z,stackpos=1}, 5593} posTile26 = {{x=pos.x-2,y=pos.y+2,z=pos.z,stackpos=1}, 5595} posTile27 = {{x=pos.x+3,y=pos.y,z=pos.z,stackpos=1}, 5594} posAllTeste = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8,posTile9,posTile10,posTile11,posTile12,posTile13,posTile14,posTile15,posTile16,posTile17,posTile18,posTile19,posTile20,posTile21,posTile22,posTile23,posTile24,posTile25,posTile26,posTile27} posAll = {} for i=1, #posAllTeste do if isWalkable2(posAllTeste[i][1]) then posAll[#posAll+1] = posAllTeste[i] end end if position_target ~= nil then doTeleportThing(cid, position_target) local tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(sendEffect813, tempo, cid, target) tempo = tempo + 500 end tempo = 0 while (tempo ~= quant_hit*(timeHit*1000)) do addEvent(hitTarget35, tempo, cid, target) tempo = tempo + (timeHit*1000) end local temp = tempo while (tempo ~= temp+quant_sqm*(sqmTime*1000)) do addEvent(empurrar2Target, tempo, cid, target, tempo, posAll) tempo = tempo + (sqmTime*1000) end doAddCondition(cid, condition) doAddCondition(target, condition) local mana_hit = (getPlayerLevel(cid)*2 + getPlayerMagLevel(cid)*2 + 24700) doCreatureAddMana(target, -mana_hit) for o=1, #posAll do local check = true for j=0, 255 do pos_stack = {x=posAll[o][1].x,y=posAll[o][1].y,z=posAll[o][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if isInArray(tiles_exception, removeTile.itemid) then check = false end end if check then if isWalkable2(posAll[o][1]) then doCreateItem(posAll[o][2], 1, posAll[o][1]) end end end exhaustion.set(cid,288,cooldown) return true else doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end else doPlayerSendCancel(cid, "Você precisa de um target!") end end function isWalkable(pos, creature, pz, proj) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function isWalkable2(pos, creature, pz, proj) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function hitTarget35(cid, target) if isCreature(target) and isPlayer(cid) then local effect813 = 9 -- efeito do hit na creatura. doAddCondition(target, condition) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -getHit35(cid), -getHit35(cid), effect813) end end function getHit35(cid) local hit35 = getPlayerLevel(cid)*1 + getPlayerMagLevel(cid)*1 + math.random(55000,56000) return hit35 end function empurrar2Target(cid, target, tempo, posAll) if isPlayer(cid) then doRemoveCondition(cid, CONDITION_PARALYZE) end if not isCreature(target) then for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end if isCreature(target) and isPlayer(cid) then local positions = nil doAddCondition(target, condition) if getPlayerLookDir(cid) == 0 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 1 then positions = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 2 then positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z} elseif getPlayerLookDir(cid) == 3 then positions = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z} end if positions ~= nil and isWalkable(positions) then doTeleportThing(target, positions) end local tp = sqmTime*1000*(quant_sqm-1)+quant_hit*timeHit*1000 if tempo == tp then doRemoveCondition(target, CONDITION_PARALYZE) for k=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[k][1].x,y=posAll[k][1].y,z=posAll[k][1].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == posAll[k][2] then doRemoveItem(removeTile.uid) end end end end end end function sendEffect813(cid, target) local position1 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if isCreature(target) and isPlayer(cid) then doSendMagicEffect(position1, playerEffect) end end #edit, mudei denovo pra mostrar os segundos. E lembra de na spells.xml deixar exhaustion="2000" Porquê tem um cooldown independente no script.
-
(Resolvido)Mudar Mensagem de BAN
Realmente não tem o /ban, tenta usar o script que eu mandei, você usa ele ingame.
-
(Resolvido)Mudar Mensagem de BAN
Crie um arquivo ban.lua la e coloque isso nele: local banDays = 7 function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local name = param local reason = '' local separatorPos = param:find(',') if separatorPos ~= nil then name = param:sub(0, separatorPos - 1) reason = string.trim(param:sub(separatorPos + 1)) end local accountId = getAccountNumberByPlayerName(name) if accountId == 0 then return false end local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) if resultId ~= false then result.free(resultId) return false end local timeNow = os.time() db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. accountId .. ", " .. db.escapeString(reason) .. ", " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") local target = Player(name) if target ~= nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, target:getName() .. " has been banned.") target:remove() else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, name .. " has been banned.") end end E depois vá em talkactions.xml(uma pasta antes) e coloque: <talkaction words="/ban" separator=" " script="ban.lua" Isso se você não tiver ele, se quiser ver antes, poste o conteúdo do talkactions.xml aqui para eu dar uma olhada. Opa, e que comando você ta usando pra banir?
-
(Resolvido)Mudar Mensagem de BAN
Vá em \data\talkactions\scripts ban.lua e coloque o conteúdo aqui.
-
Player passa por X tile
Tem vários por ai. http://www.tibiaking.com/forum/topic/15055-como-colocar-vip-por-um-item/
-
Não envia email
Tenho um tuto se quiser: http://www.tibiaking.com/forum/topic/59567-criando-um-site-para-seu-servidor-com-diferentes-sistemas/
-
erro na tabela news
Isso não é nada alarmante, tenta ir no seu index e coloca error_reporting(0); no começo do php. Isso não corrige o erro, apenas oculta ele, se você colocar essa pagina models/account_model.php aqui eu posso tentar resolver, mas deve ser algo faltando. Um isset ja resolveria, pode ocultar sem medo.
- Como mudar nome na aba do navegador?
-
Não envia email
Vai em C:\xampp\php la vai ter o php.ini, abre ele e edita igual no tutorial que te mandei ai, na parte que fala sobre ele.
-
Não envia email
Você ta usando o que? Wampp, Xampp?
-
erro na tabela news
Em que partes, ta mostrando algum erro php? As tabelas não iriam influenciar em nada nisso.
-
Não envia email
Aperta a tecla do windows + R / ou vai no Executar, e digita php.ini e da enter, ele é do apache e não do site.