Ir para conteúdo

Celulose

Membro
  • Registro em

  • Última visita

Tudo que Celulose postou

  1. Posta como está no items.xml
  2. olá .' abra a pasta movements/ abra movements.xml adiciona essa tag . edita onde está itemid="13630" pelo id da sua wand . sendo assim deixa o slot shield mesmo , ela vai reconhecer e dar os magic level .' <movevent type="Equip" itemid="13630" slot="shield" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="13630" slot="shield" event="function" value="onDeEquipItem"/>
  3. Abra o arquivo creaturescripts.xml E adicione: <event type=”think” name=”TiraBattle” event=”script” value=”tirabattle.lua”/> Abra a pasta “scripts” e abra o arquivo login.lua E adicione: registerCreatureEvent(cid, “TiraBattle”) ---------------------- Ainda na pasta scripts, crie o arquivo tirabattle.lua e adicione o seguinte: function onThink(cid, interval) if(getTilePzInfo(getCreaturePosition(cid))) then doRemoveCondition(cid, CONDITION_INFIGHT) end end Créditos: KekezitoLHP
  4. não to conseguindo não kkk , marca melhor resposta pra fecha topico . assim arruma te mando pv'
  5. foi erro meu no script esqueci do return false end. lembra onde está 2.0 voce coloca em segundos onde esta o 2 . exemplo 30 segundos 30.0. local tempo = 20 -- tempo em segundos. local effect = {29} -- effect no player, caso queira apenas 1, basta remover os outros numeros. local text = 'Skill Up!' local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1500) setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 165) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 160) 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*1500) setCombatCondition(combat, condition) function magicEffect3(tempo2,tempo3,cid) if (isCreature(cid)) then if getPlayerStorageValue(cid, 102053) ~= 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then for i=1, #effect do local position = {x=getPlayerPosition(cid).x+0, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect) doSendAnimatedText(getCreaturePos(cid), text, TEXTCOLOR_RED) end end end end function onCastSpell(cid, var) if exhaustion.check(cid, 15000) == TRUE then doPlayerSendCancel(cid, "Podera usar novamente dentro de 20 segundos.") return false end if getPlayerStorageValue(cid, 10569) == 1 then doSendAnimatedText((getCreaturePosition(cid)), "Socorro!", 255) doSendMagicEffect(getCreaturePosition(cid), 19) doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return false elseif getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doCombat(cid, combat, var) tempo2 = 0 while (tempo2 ~= (tempo*1500)) do addEvent(magicEffect3, tempo2, tempo2, tempo*1500, cid) tempo2 = tempo2 + 1500 exhaustion.set(cid, 15000, 20.0) end doCreatureSay(cid, "Exevo Grav", TALKTYPE_MONSTER) else doPlayerSendCancel(cid, "Desculpe, mais você ainda está no efeito da magia.") doSendMagicEffect(getCreaturePosition(cid), 2) end end testado.'
  6. exhaustion.set(cid, 15000, 2.0) 2.0 = 2 segundos.
  7. local tempo = 20 -- tempo em segundos. local effect = {29} -- effect no player, caso queira apenas 1, basta remover os outros numeros. local text = 'Skill Up!' local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1500) setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 165) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 160) 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*1500) setCombatCondition(combat, condition) function magicEffect3(tempo2,tempo3,cid) if (isCreature(cid)) then if getPlayerStorageValue(cid, 102053) ~= 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then for i=1, #effect do local position = {x=getPlayerPosition(cid).x+0, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect) doSendAnimatedText(getCreaturePos(cid), text, TEXTCOLOR_RED) end end end end function onCastSpell(cid, var) if exhaustion.check(cid, 15000) == TRUE then doPlayerSendCancel(cid, "Podera usar novamente dentro de 2 segundos.") return false end if getPlayerStorageValue(cid, 10569) == 1 then doSendAnimatedText((getCreaturePosition(cid)), "Socorro!", 255) doSendMagicEffect(getCreaturePosition(cid), 19) doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return false elseif getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doCombat(cid, combat, var) tempo2 = 0 while (tempo2 ~= (tempo*1500)) do addEvent(magicEffect3, tempo2, tempo2, tempo*1500, cid) tempo2 = tempo2 + 1500 exhaustion.set(cid, 15000, 2.0) end doCreatureSay(cid, "Exevo Grav", TALKTYPE_MONSTER) else doPlayerSendCancel(cid, "Desculpe, mais você ainda está no efeito da magia.") doSendMagicEffect(getCreaturePosition(cid), 2) end end edit : esqueci do return false'
  8. if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Olá Você Deseja Viajar?.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpa, ' .. getCreatureName(cid) .. '! Aguarde o outro membro!.') elseif focus == cid then talk_start = os.clock() no final se adicionaria function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Proximo...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end só sei pelo script será no script mais ou menos assim
  9. faça download do ObjectBuilder , e seleciona sua pasta onde está a SPR e só olhar o numero da looktype e alterar .
  10. <look type="57" corpse="22567"/> só você editar o look ..... "57" coloca qual você quer
  11. function onCastSpell(cid, var) local waittime = 7 -- Tempo de exhaustion em segundos local storage = 999991 -- Storage de Spell, nunca usar a mesma em outra spell, a menos que não queira usar duas spell juntas! if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local efepos = {x=targetpos.x+2, y=targetpos.y+1, z=targetpos.z} if not isPlayer(target) then doPlayerSendCancel(cid, "Você só pode usar essa técnica em Players.") return false end local tempo = 5 -- tempo em segundos. doCreatureSetNoMove(variantToNumber(var), true) addEvent(function() if isPlayer(variantToNumber(var)) then doCreatureSetNoMove(variantToNumber(var), false) end end, tempo * 1000) doSendMagicEffect(efepos, 221) -- Efeito do mokuton prision exhaustion.set(cid, storage, waittime) return true end
  12. aaah, alem da sua mana subir quem tiver na area sobe?
  13. Não tem como eu testar kk , nao vou garantir .. local config = { cooldown = 10, -- tempo entre uma magia e outra time = 10, -- tempo em segundos que ficará healando percent = 25, --- porcentagem da vida que cura storage = 19330, effect = 12, --- efeito que vai sair mana = 40 -- quanto custa de mana } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, 87) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETPLAYERSORSUMMONS, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr1) setCombatArea(combat, area) function onCastSpell(cid, var) if getCreatureMana(cid) >= config.mana then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then doPlayerSetStorageValue(cid, config.storage, os.time()) local i = 0 doCreatureAddMana(cid, -config.mana, 0) while i < config.time do i = i+1 addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect) return doCombat(cid, combat, var) end end end, 1000*i) end else doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") end else doPlayerSendCancel(cid, 36) end return false end
  14. local config = { cooldown = 10, -- tempo entre uma magia e outra time = 10, -- tempo em segundos que ficará healando percent = 25, --- porcentagem da vida que cura storage = 19330, effect = 12, --- efeito que vai sair mana = 40 -- quanto custa de mana } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -50.0, -1500, -30.0, -1800) function onCastSpell(cid, var) if getCreatureMana(cid) >= config.mana then if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then doPlayerSetStorageValue(cid, config.storage, os.time()) local i = 0 doCreatureAddMana(cid, -config.mana, 0) while i < config.time do i = i+1 addEvent(function() if isCreature(cid) then if getCreatureMaxMana(cid) ~= getCreatureMana(cid) then local manadraw = math.ceil(getCreatureMaxMana(cid) * (config.percent)/100) local pos = getPlayerPosition(cid) doCreatureAddMana(cid, manadraw, 1) doSendAnimatedText(pos, "+"..manadraw , TEXTCOLOR_GREEN) doSendMagicEffect(pos, config.effect) return doCombat(cid, combat, var) end end end, 1000*i) end else doPlayerSendCancel(cid, "Your Mass Healing is at cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.") end else doPlayerSendCancel(cid, 36) end return false end
  15. você quer tirar dano do target:?
  16. <instant name="NOME DA MAGIA" words="PALAVRAS PRA CONJURAR" lvl="40" mana="0" prem="1" aggressive="0" exhaustion="1500" needlearn="0" event="script" value="especiais/healingtime.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="4"/> <vocation id="8"/> </instant> ou tenta esse.. function onCastSpell(cid, item, fromPosition, itemEx, toPosition) local manamax = getCreatureMaxMana(cid) local min = 20.0 local max = 25.0 local mana_add = math.random((manamax * (min/100)), (manamax * (max/100))) if(hasCondition(cid, CONDITION_EXHAUST)) then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "You are exhausted") return true end doCreatureAddMana(cid, mana_add) doSendMagicEffect(getThingPos(cid), 32) doSendAnimatedText(getPlayerPosition(cid),"+"..mana_add.."", TEXTCOLOR_GREEN) return true end
  17. vamos fazer um test . local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -50.0, -1500, -30.0, -1800) function onCastSpell(cid, var) doCreatureAddMana(cid, math.ceil((getCreatureMaxMana(cid) * math.random(20, 25)) / 100)) doSendAnimatedText(getThingPosition(cid), "ManaDrain", 29) return doCombat(cid, combat, var) end
  18. local conf = { cooldown_key = 23066, cooldown_time = 10 -- em segundos } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -50.0, -1500, -30.0, -1800) function onCastSpell(cid, var) if(exhaustion.check(cid, conf.cooldown_key)) then doPlayerSendCancel(cid, "Golpe em cooldown por " .. exhaustion.get(cid, conf.cooldown_key) .. " segundo(s).") doSendMagicEffect(getThingPosition(cid), 2) return false end exhaustion.set(cid, conf.cooldown_key, conf.cooldown_time) addEvent(function() if(isPlayer(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "CD: Exevo Gran Mas Cold.") end end, conf.cooldown_time * 1000) doCreatureAddMana(cid, math.ceil((getCreatureMaxMana(cid) * math.random(20, 25)) / 100)) doSendAnimatedText(getThingPosition(cid), "ManaDrain", 29) return doCombat(cid, combat, var) end <instant name="Exevo Gran Mas Cold" words="exevo gran mas cold" lvl="200" mana="1000" aggressive="0" selftarget="1" exhaustion="0" needlearn="0" event="script" value="local.lua">
  19. Celulose postou uma resposta no tópico em Suporte Tibia OTServer
    já tem dono, verifica a DB
  20. $config['site']['serverPath'] = "C:/xampp/htdocs/christibia/"; << sua config.lua está aqui ? htdocs/christibia/ Agora que me toquei , faça teste no xampp 1.7.3 E me retorna
  21. $ret = @eval("return $value;"); é o correto. como coloco o caminho ?
  22. cara o correto da configlua.php é assim qual erro da usando essa? o config está normal
  23. testa..
  24. <?php if(!defined('INITIALIZED')) exit; class ConfigLUA extends Errors // NOT SAFE CLASS, LUA CONFIG CAN BE EXECUTED AS PHP CODE { private $config; public function __construct($path = false) { if($path) $this->loadFromFile($path); } public function loadFromFile($path) { if(Website::fileExists($path)) { $content = Website::getFileContents($path); $this->loadFromString($content); } else { new Error_Critic('#C-2', 'ERROR: <b>#C-2</b> : Class::ConfigLUA - LUA config file doesn\'t exist. Path: <b>' . $path . '</b>'); } } public function fileExists($path) { return Website::fileExists($path); } public function loadFromString($string) { $lines = explode("\n", $string); if(count($lines) > 0) foreach($lines as $ln => $line) { $tmp_exp = explode('=', $line, 2); if(count($tmp_exp) >= 2) { $key = trim($tmp_exp[0]); if(substr($key, 0, 2) != '--') { $value = trim($tmp_exp[1]); if(is_numeric($value)) $this->config[ $key ] = (float) $value; elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"'))) $this->config[ $key ] = (string) substr(substr($value, 1), 0, -1); elseif(in_array($value, array('true', 'false'))) $this->config[ $key ] = ($value == 'true') ? true : false; else { foreach($this->config as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull $value = str_replace($tmp_key, $tmp_value, $value); $ret = @eval("return $value;"); if((string) $ret == '') // = parser error { new Error_Critic('', 'ERROR: <b>#C-1</b> : Class::ConfigLUA - Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]'); } $this->config[ $key ] = $ret; } } } } } public function getValue($key) { if(isset($this->config[ $key ])) return $this->config[ $key ]; else new Error_Critic('#C-3', 'ERROR: <b>#C-3</b> : Class::ConfigLUA - Key <b>' . $key . '</b> doesn\'t exist.'); } public function isSetKey($key) { return isset($this->config[ $key ]); } public function getConfig() { return $this->config; } } esse testei e está OK . Versão gesior ?
  25. olá. configlua.php

Informação Importante

Confirmação de Termo