Ir para conteúdo
Banner com Efeitos

PedroSTT

Banido
  • Registro em

  • Última visita

Solutions

  1. PedroSTT's post in (Resolvido)Erro Script was marked as the answer   
    function onStepIn(cid, item, position, fromPosition) local level = 500 if not isMonster(cid) then if getPlayerLevel(cid) <= level then doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) doPlayerSendCancel(cid,"Somente Vip Players level " .. level .. " ou mais podem passar aqui.") return true end end end  
  2. PedroSTT's post in (Resolvido)[CORREÇÃO] Não surfar enquanto usa bicicleta was marked as the answer   
    local outfit = 123 -- Id da outfit da bike if getCreatureOutfit(cid) == outfit then doPlayerSendCancel(cid, "Dismount to surf.") doTeleportThing(cid, fromPosition, false) return false end Tenta por pela outfit da bike ... se não der certo tente trocar de return false para return true
  3. PedroSTT's post in (Resolvido)Alavanca para minercoin was marked as the answer   
    local config = { diamond = 100, -- Diamonds necessarios small = 2344, -- id do small diamond item = 11192, -- ID do item que vai vender count = 1, -- Quantidade } function onUse(cid, item, fromPosition, itemEx, toPosition) pos = getCreaturePosition(cid) if item.itemid == 1945 then if getPlayerItemCount(cid, config.small) >= config.diamond then doPlayerAddItem(cid, config.item, config.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Você acaba de comprar "..config.count.." "..getItemNameById(config.item)..".") doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) doPlayerRemoveItem(cid, config.small, config.diamond) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Desculpe, mais você nao tem small diamonds suficiente.Custa 100 deles") doSendMagicEffect(pos, CONST_ME_POFF) end end end CORRIGIDO
  4. PedroSTT's post in (Resolvido)[SISTEMA]COOLDOWN SPELL was marked as the answer   
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_HITCOLOR, COLOR_RED) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -50.2, 1, -65.8, 1) function onCastSpell(cid, var) local waittime = 1.5 -- Tempo de exhaustion -- Lembre-se de na spells.xml deixar exhaustion = 0 local storage = 250002 local effect = 77 local PosTarget = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted") return false end doSendMagicEffect(PosTarget, effect) exhaustion.set(cid, storage, waittime) return doCombat(cid, combat, var) end  
  5. PedroSTT's post in (Resolvido)Fazer monstro sumir was marked as the answer   
    local function deSpawnOne(toPosition) if isCreature(toPosition) then doRemoveCreature(toPosition) doSendMagicEffect(toPosition, 225) doSendAnimatedText(toPosition, "FLW!!!", 210) key_uid = doCreateItem(10325, 1, toPosition) --ID da chave que voce recebe (crystal, woode, cooper, etc...) doItemSetAttribute(key_uid, "uid", 10760) --action ID da key que vc ganha na quest end end function onUse(cid, item, frompos, item2, toPosition) local min = 5 -- minutos que a creature vai sumir if item.uid == 10760 then doSendAnimatedText(toPosition, "HAAAAA!!!", 210) doSendMagicEffect(toPosition, 225) doRemoveItem(item.uid,1) doSummonCreature("Rato", toPosition) addEvent(deSpawnOne, min * 60000, cid) end end Testa ai
  6. PedroSTT's post in (Resolvido)Ao matar monstro, some item? was marked as the answer   
    Creaturescripts.xml
    <event type="death" name="Boss1" script="boss1.lua"/> Script
    function onDeath(cid, corpse, deathList) local item = 1233 -- id do item que sera removido local pos = {x=623, y=377, z=8, stackpos=1} -- pos do item que sera removido local time = 5 -- minutos em que a passagem ficara aberta local rmv = getThingfromPos(pos) doRemoveItem(rmv.uid, 1) doBroadcastMessage("A passagem secreta foi aberta" , 20) addEvent(criar_item, 60000 * time) end function criar_item() local item = 1233 -- id do item que sera removido local pos = {x=623, y=377, z=8, stackpos=1} -- pos do item que sera removido doCreateItem(item, 1, pos) doBroadcastMessage("A passagem secreta foi aberta" , 20) end Registre a tag na XML do monstro
    <script> <event name="Boss1"/> </script>  
  7. PedroSTT's post in (Resolvido)Boss no Broadcast was marked as the answer   
    Creaturescripts.xml
    <event type="death" name="Boss1" script="boss1.lua"/> Script
    function onDeath(cid, corpse, deathList) doBroadcastMessage("mensagem aqui", 20) return true end Registre a tag na XML do monstro
    <script> <event name="Boss1"/> </script>  
  8. PedroSTT's post in (Resolvido)[PEDIDO] Spells was marked as the answer   
    Spell 01
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -3.2, -0 , -2.2, -0) function onCastSpell(cid, var) local waittime = 0.5 -- Tempo de exhaustion local storage = 1000 local efeito = 3 -- efeito da spell if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "You are exhausted") return false end local position1 = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} local target = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, efeito) doTeleportThing(cid, target) exhaustion.set(cid, storage, waittime) return doCombat(cid, combat, var) end Spell 02 -- crédito xWhiteWolf
    local function doPushCreature(target, cid) if target > 0 then if not isNpc(target) then local position = getThingPosition(cid) local fromPosition = getThingPosition(target) local x = ((fromPosition.x - position.x) < 0 and -1 or ((fromPosition.x - position.x) == 0 and 0 or 1)) local y = ((fromPosition.y - position.y) < 0 and -1 or ((fromPosition.y - position.y) == 0 and 0 or 1)) local toPosition = {x = fromPosition.x + x, y = fromPosition.y + y, z = fromPosition.z} if doTileQueryAdd(target, toPosition) == 1 and getTileInfo(toPosition).house == false then doTeleportThing(target, toPosition, true) end end end end local spell = {} spell.config = { [3] = { damageType = 1, areaEffect = 2, area = { {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, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 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}, } }, [2] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 1, 0, 0, 0, 1, 0}, {0, 1, 0, 2, 0, 1, 0}, {0, 1, 0, 0, 0, 1, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } }, [1] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 2, 1, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } } } spell.combats = {} for _, config in ipairs(spell.config) do local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, config.damageType) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.areaEffect) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -4, 0, -4.7, 0) function onTargetCreature(cid, target) doPushCreature(target, cid) end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") setCombatArea(combat, createCombatArea(config.area)) table.insert(spell.combats, combat) end function onCastSpell(cid, var) for n = 1, #spell.combats do local alvo = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} addEvent(doCombat, (n * 120), cid, spell.combats[n], var) addEvent(doTeleportThing, 3000, cid, alvo) end return true end
    Spell 03
    Spell script
     
    Agora vá em creaturescripts
    Creaturescripts.xml e registre a tag
    <event type="think" name="Paralize" event="script" value="paralize.lua"/> Crie um arquivo.lua na pasta creaturescrips/scripts e cole isso dentro
    function onThink(cid, interval) local storage = 23432 -- deixe a mesma que na script da spell if getPlayerStorageValue(cid, storage) == 1 then doCreatureSetNoMove(cid, true) doPlayerSendTextMessage(cid, 22, "voce esta paralisado") return true end end Abra o login.lua na msm pasta e registre a tag.
    registerCreatureEvent(cid, "Paralize")  
  9. PedroSTT's post in (Resolvido)Update em script teleport was marked as the answer   
    function onUse(cid, item, frompos, item2, topos) pos = {x=547, y=332, z=7} local storage = 3425 -- storage if item.itemid == 4852 then doPlayerSendCancel(cid,"Parabéns! Você ganhou acesso a VIP 1.") doTeleportThing(cid,pos) setPlayerStorageValue(cid, storage, 1) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Fail !") end return 1 end  
  10. PedroSTT's post in (Resolvido)Magia na direção em que o player olhar was marked as the answer   
    Configure
    local x = { [0] = {x=p.x+1, y=p.y-1, z=p.z}, [1] = {x=p.x+7, y=p.y+1, z=p.z}, [2] = {x=p.x+1, y=p.y+7, z=p.z}, [3] = {x=p.x-1, y=p.y+1, z=p.z} } local y = { [0] = 172, [1] = 170, [2] = 173, [3] = 171  
  11. PedroSTT's post in (Resolvido)NPC DE TROCA was marked as the answer   
    XML
    <?xml version="1.0" encoding="UTF-8"?> <npc name="sensei" script="data/npc/scripts/npc.lua" walkinterval="2000" speed="0" floorchange="0"> <health now="100" max="100"/> <look type="45" head="19" body="113" legs="95" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="Olá , deseja trocar 5 item por 1 item ?? {yes}" /> </parameters> </npc> SCRIPT
     
  12. PedroSTT's post in (Resolvido)Algumas dúvidas sobre o(s) server(s) was marked as the answer   
    Primeira dúvida:
    Impedir a edição da sua própria ? Ninguem irá editar a sua proprio e sim copiar para o servidor dele , no caso é possivel você compilar elas , mas nada é seguro. Sim , se você compilar os arquivos , o client irá continuar lendo normalmente. Segunda dúvida:
    Source é um código fonte que quando compilada irá dar origem a distro ( Arquivo .exe nescessário para ligar o servidor) , que no caso temo 2 : TFS ( The forgotten server) : Uma source com a linguagem C++ só que no caso dela , reune bibliotecas e outros tipos de linguagem , sendo assim uma "gambiarra" , não é original do tibia global da CipSoft , usa 9 DLL's. OTx : Não sei a linguagem(nunca mechi) , é a original do Tibia global da CipSoft , usa 2 DLL's , por isso é mais leve que a TFS. Terceira dúvida:
    Sim , todo servidor tem sua source de acordo com a base que eles usam , mas alguns servidores não vem com sourcers , somente com o .exe , mas sim , existe uma source , só que não vem junto a base. Quarta dúvida:
    A source vem junto com a base , se a base não disponibilizou a source então não terá uma source , somente quem fez o .exe terá .  
    Quinta dúvida:
    Não entendi sua pergunta ;/  
  13. PedroSTT's post in (Resolvido)Como colocar para Mostrar os dias de premium? was marked as the answer   
    Ok , vamos lá .

    Vou fazer um que ao dar use em X item ganha Y days premium
     
    Na pasta actions :

    Crie um arquivo .lua chamado vip e cole isso dentro

    Vá em actions.xml e coloque a tag
     
    <action itemid="IDDOITEM" event="script" value="vip.lua"/>  
    Caso queira um comando para comprar o item , eu faço tbm.
  14. PedroSTT's post in (Resolvido)[pedido] Scroll que da lv was marked as the answer   
    Pode testar ? Não sei se vai funcionar pois não mecho muito com TFS 0.4

Informação Importante

Confirmação de Termo