Ir para conteúdo
  • Cadastre-se

Agaka

Membro
  • Total de itens

    170
  • Registro em

  • Última visita

  • Dias Ganhos

    4

Histórico de Curtidas

  1. Obrigado
    Agaka recebeu reputação de TheKronOs em (Resolvido)AJUDA NESSA SPELL KAMUI IN   
    @leozincorsair Foi mal, realmente foi erro meu. Bom, pra fazer com que quem entre possa sair, vai ser preciso criar um novo movement. Por que? Simples, quando o player casta a spell a posição dele fica salva. Já o player que entrar no portal do mundo normal não vai ter suas posições salvas, logo não poderá retornar. Mas vamos lá.
     
    Spell
     
    Portal do mundo normal (Esse script vai salvar a posição dos outros players.)
     
    Portal para sair do kamui
     
    Tags dos movements
    Portal do mundo normal <movevent type="StepIn" actionid="5560" event="script" value="step.lua"/> Portal no kamui <movevent type="StepIn" actionid="5506" event="script" value="step2.lua"/>  
  2. Curtir
    Agaka deu reputação a Cat em Nolis Show Off   
  3. Curtir
    Agaka deu reputação a Cat em Nolis Show Off   
  4. Curtir
    Agaka deu reputação a DdJs em [8.60] Mining Cave   
    Mining Cave
    V 8.60
     
    [pequena area para evento mining]
     
    Download:
    Mining_Cave8.60.rar
     
    Position: [X: 1010 Y: 1031 Z: 8]
     
    Imagens:
     
  5. Curtir
    Agaka deu reputação a Pedro. em Auction System   
    Olá!

    È um sistema bem simples e útil para servidores 8.60 que não tem market, para trade de itens do player.

    Algumas informações gerais:
    O script deve funcionar perfeito para as versões 1x+
    Informações sobre o script:
     
    O jogador pode fornecer itens para o banco de dados de itens (exibição na página) Outro jogador pode comprá-lo usando o AuctionID O jogador pode remover nossos leilões usando o AuctionID  

     
    SQL:
    CREATE TABLE `auction_system` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL, `item_name` varchar(255) NOT NULL, `item_id` smallint(6) NOT NULL, `count` smallint(5) NOT NULL, `value` int(7) NOT NULL, `date` int(11) NOT NULL, PRIMARY KEY (`id`), FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;  
    PHP:
     
    Code on pastebin: https://pastebin.com/U5mkGncs
     
     
    Créditos ao meu cria que fortaleceu no code @Coltera
  6. Gostei
    Agaka deu reputação a nyedsonnyel em BUG Personagem Deletado   
    Eu estava com o mesmo problema em um Gesior, descobri que o motivo era porque o jogo interpretava a coluna Deletion e não a Deleted para definir se o player está deletado ou não.
    OU SEJA, SÓ FUNCIONARÁ SE VOCÊ FOR NA TABELA PLAYERS, COLOCAR DELETION = 1 E NÃO APARECER O CHARACTER NA LISTA DO JOGO.
     
    Como não sei mudar isso (qual coluna o jogo deveria ler para definir se o player está deletado ou não).
    No meu accountmanager.php, ele definia deleted = 1 quando o character era deletado e deleted = 0 quanto estava normal.
    E todo o sistema de character.php, accountmanager.php usava isso como parâmetro (o deleted).
     
    Por isso, para não ficar muito complicado, eu fiz isso para ajeitar:
    No meu accountmanager.php tem essa parte
     
     
    Eu adicionei essa linha embaixo do  $player->set('deleted', 1);
    e assim ficando:
     
    fazendo o mesmo, só que com valor diferente, no undelet.
    Antes era:
     

    só deixar:
     
     
    Após isso, funcionou de boas.
  7. Haha
    Agaka deu reputação a DouGlaS Mapper em [PEDIDO] Script de critical com 2 pedras   
    @JoviM 
    Vc leu minha mente, eu ia falar como que faz pra por um efeito quando o critical falha, eu tentei por aki mais cada vez que mecho eu bugo mais a script ;/
    Ah mano deculpa é que eu sou meio perdido com script to aprendendo ainda kkkk
    Eu tinha colocado fora do on login por isso do erro, agora ta funcionando certinho obg REP +
     
     
  8. Curtir
    Agaka recebeu reputação de DouGlaS Mapper em [PEDIDO] Script de critical com 2 pedras   
    @DouGlaS Mapper
    actions/actions.xml
    <action itemid="300;400" event="script" value="file.lua"/> actions/scripts
     
    creaturescripts/scripts/login.lua
    if (getCreatureStorage(cid, STORAGE_DO_CRITICO) == -1) then doCreatureSetStorage(cid, STORAGE_DO_CRITICO, 0) end Esse código do login.lua serve pra iniciar o level de crítico do player com o valor que você escolher.
    As actions são simples. Só criar o arquivo, registrar e configurar.
  9. Curtir
    Agaka recebeu reputação de DouGlaS Mapper em [PEDIDO] Script de critical com 2 pedras   
    @DouGlaS Mapper Estranho esse erro ai, você colocou o trecho que mandei dentro da função onLogin() ?
    Sobre como mostrar o nível de crítico no look, aqui no fórum tem tópicos ensinando a fazer, tente dar uma olhada.
     
    Como o primeiro script ficou meio tosco, dei uma organizada melhor (eu acho ^^). Só não sabia se o efeito era pra todas as ações com o item ou só para as que funcionassem, mas isso você organiza UHEUHE
     
  10. Curtir
    Agaka deu reputação a Movie em NPC comprando flasks/vial por storage   
    Fala pessoal, hoje venho trazer um sisteminha básico que eu fiz pro meu OT e achei bacana e resolvi postar aqui.
    Ele está baseado no 1.3, porém em breve posso postar para 0.x.
     
    Como ele funciona?
    Ao usar uma poção, você não irá receber o vial ou a flask, e ao invés disso você irá ganhar uma storage. Ao chega no NPC e falar vial ou flasks ele irá te perguntar se você gostaria de receber pelo preço das poções utilizadas.
    O sistema é baseado na storage 75123.
     
    Em actions, ache o arquivo potions.lua
    Como era:
    local berserk = Condition(CONDITION_ATTRIBUTES) berserk:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) berserk:setParameter(CONDITION_PARAM_SKILL_MELEE, 5) berserk:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) berserk:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local mastermind = Condition(CONDITION_ATTRIBUTES) mastermind:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) mastermind:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 3) mastermind:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local bullseye = Condition(CONDITION_ATTRIBUTES) bullseye:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) bullseye:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 5) bullseye:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) bullseye:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local potions = { [6558] = {transform = {7588, 7589}, effect = CONST_ME_DRAWBLOOD}, [7439] = {condition = berserk, vocations = {4, 8}, effect = CONST_ME_MAGIC_RED, description = "Only knights may drink this potion.", text = "You feel stronger."}, [7440] = {condition = mastermind, vocations = {1, 2, 5, 6}, effect = CONST_ME_MAGIC_BLUE, description = "Only sorcerers and druids may drink this potion.", text = "You feel smarter."}, [7443] = {condition = bullseye, vocations = {3, 7}, effect = CONST_ME_MAGIC_GREEN, description = "Only paladins may drink this potion.", text = "You feel more accurate."}, [7588] = {health = {250, 350}, vocations = {3, 4, 7, 8}, level = 50, flask = 7634, description = "Only knights and paladins of level 50 or above may drink this fluid."}, [7589] = {mana = {115, 185}, vocations = {1, 2, 3, 5, 6, 7}, level = 50, flask = 7634, description = "Only sorcerers, druids and paladins of level 50 or above may drink this fluid."}, [7590] = {mana = {150, 250}, vocations = {1, 2, 5, 6}, level = 80, flask = 7635, description = "Only druids and sorcerers of level 80 or above may drink this fluid."}, [7591] = {health = {425, 575}, vocations = {4, 8}, level = 80, flask = 7635, description = "Only knights of level 80 or above may drink this fluid."}, [7618] = {health = {125, 175}, flask = 7636}, [7620] = {mana = {75, 125}, flask = 7636}, [8472] = {health = {250, 350}, mana = {100, 200}, vocations = {3, 7}, level = 80, flask = 7635, description = "Only paladins of level 80 or above may drink this fluid."}, [8473] = {health = {650, 850}, vocations = {4, 8}, level = 130, flask = 7635, description = "Only knights of level 130 or above may drink this fluid."}, [8474] = {antidote = true, flask = 7636}, [8704] = {health = {60, 90}, flask = 7636}, [26029] = {mana = {425, 575}, vocations = {1, 2, 5, 6}, level = 130, flask = 7635, description = "Only druids and sorcerers of level 130 or above may drink this fluid."}, [26030] = {health = {420, 580}, mana = {250, 350}, vocations = {3, 7}, level = 130, flask = 7635, description = "Only paladins of level 130 or above may drink this fluid."}, [26031] = {health = {875, 1125}, vocations = {4, 8}, level = 200, flask = 7635, description = "Only knights of level 200 or above may drink this fluid."} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if type(target) == "userdata" and not target:isPlayer() then return false end local potion = potions[item:getId()] if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getId()) then player:say(potion.description, TALKTYPE_MONSTER_SAY) return true end if potion.condition then player:addCondition(potion.condition) player:say(potion.text, TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(potion.effect) elseif potion.transform then item:transform(potion.transform[math.random(#potion.transform)]) item:getPosition():sendMagicEffect(potion.effect) return true else if potion.health then doTargetCombatHealth(0, target, COMBAT_HEALING, potion.health[1], potion.health[2]) end if potion.mana then doTargetCombatMana(0, target, potion.mana[1], potion.mana[2]) end if potion.antidote then target:removeCondition(CONDITION_POISON) end player:addItem(potion.flask) target:say("Aaaah...", TALKTYPE_MONSTER_SAY) target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end item:remove(1) return true end Como ficou:
    local berserk = Condition(CONDITION_ATTRIBUTES) berserk:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) berserk:setParameter(CONDITION_PARAM_SKILL_MELEE, 5) berserk:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) berserk:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local mastermind = Condition(CONDITION_ATTRIBUTES) mastermind:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) mastermind:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 3) mastermind:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local bullseye = Condition(CONDITION_ATTRIBUTES) bullseye:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) bullseye:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 5) bullseye:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) bullseye:setParameter(CONDITION_PARAM_BUFF_SPELL, true) local potions = { [6558] = {transform = {7588, 7589}, effect = CONST_ME_DRAWBLOOD}, [7439] = {condition = berserk, vocations = {4, 8, 12}, effect = CONST_ME_MAGIC_RED, description = "Only knights may drink this potion.", text = "You feel stronger."}, [7440] = {condition = mastermind, vocations = {1, 2, 5, 6, 9, 10}, effect = CONST_ME_MAGIC_BLUE, description = "Only sorcerers and druids may drink this potion.", text = "You feel smarter."}, [7443] = {condition = bullseye, vocations = {3, 7, 11}, effect = CONST_ME_MAGIC_GREEN, description = "Only paladins may drink this potion.", text = "You feel more accurate."}, [7588] = {health = {250, 350}, vocations = {3, 4, 7, 8, 11, 12}, level = 50, flask = 7634, description = "Only knights and paladins of level 50 or above may drink this fluid."}, [7589] = {mana = {115, 185}, vocations = {1, 2, 3, 5, 6, 7, 9, 10, 11}, level = 50, flask = 7634, description = "Only sorcerers, druids and paladins of level 50 or above may drink this fluid."}, [7590] = {mana = {150, 250}, vocations = {1, 2, 5, 6, 9, 10}, level = 80, flask = 7635, description = "Only druids and sorcerers of level 80 or above may drink this fluid."}, [7591] = {health = {425, 575}, vocations = {4, 8, 12}, level = 80, flask = 7635, description = "Only knights of level 80 or above may drink this fluid."}, [7618] = {health = {125, 175}, flask = 7636}, [7620] = {mana = {75, 125}, flask = 7636}, [8472] = {health = {250, 350}, mana = {100, 200}, vocations = {3, 7, 11}, level = 80, flask = 7635, description = "Only paladins of level 80 or above may drink this fluid."}, [8473] = {health = {650, 850}, vocations = {4, 8, 12}, level = 130, flask = 7635, description = "Only knights of level 130 or above may drink this fluid."}, [8474] = {antidote = true, flask = 7636}, [8704] = {health = {60, 90}, flask = 7636}, [26029] = {mana = {425, 575}, vocations = {1, 2, 5, 6, 9, 10}, level = 130, flask = 7635, description = "Only druids and sorcerers of level 130 or above may drink this fluid."}, [26030] = {health = {420, 580}, mana = {250, 350}, vocations = {3, 7, 11}, level = 130, flask = 7635, description = "Only paladins of level 130 or above may drink this fluid."}, [26031] = {health = {875, 1125}, vocations = {4, 8, 12}, level = 200, flask = 7635, description = "Only knights of level 200 or above may drink this fluid."} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if type(target) == "userdata" and not target:isPlayer() then return false end local potion = potions[item:getId()] if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getId()) then player:say(potion.description, TALKTYPE_MONSTER_SAY) return true end if potion.condition then player:addCondition(potion.condition) player:say(potion.text, TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(potion.effect) elseif potion.transform then item:transform(potion.transform[math.random(#potion.transform)]) item:getPosition():sendMagicEffect(potion.effect) return true else if potion.health then doTargetCombatHealth(0, target, COMBAT_HEALING, potion.health[1], potion.health[2]) end if potion.mana then doTargetCombatMana(0, target, potion.mana[1], potion.mana[2]) end if potion.antidote then target:removeCondition(CONDITION_POISON) end player:setStorageValue(75132, (player:getStorageValue(75132) + 1)) target:say("Aaaah...", TALKTYPE_MONSTER_SAY) target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) end item:remove(1) return true end  
    Em creaturescripts, ache o arquivo login.lua
     
    Após 
    if player:getLastLoginSaved() <= 0 then Adicione
    player:setStorageValue(75132, 0) -- Vial/Flask System  
    Agora vamos para a parte do NPC. Irei deixar baseado no Eryn, um NPC que é comum.
    Na pasta npc/scripts, ache o arquivo que relaciona com seu NPC mágico.
    Estou me baseando nesse script: https://github.com/nekiro/forgottenserver/blob/8.6-downgrade/data/npc/scripts/runes.lua
     
    Antes
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook') shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 'magic lightwand') shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion') shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion') shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion') shopModule:addBuyableItem({'strong health'}, 7588, 100, 1, 'strong health potion') shopModule:addBuyableItem({'strong mana'}, 7589, 80, 1, 'strong mana potion') shopModule:addBuyableItem({'great health'}, 7591, 190, 1, 'great health potion') shopModule:addBuyableItem({'great mana'}, 7590, 120, 1, 'great mana potion') shopModule:addBuyableItem({'great spirit'}, 8472, 190, 1, 'great spirit potion') shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 1, 'ultimate health potion') shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion') shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask') shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask') shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask') shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune') shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune') shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune') shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune') shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune') shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune') shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune') shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune') shopModule:addBuyableItem({'sudden death'}, 2268, 350, 3, 'sudden death rune') shopModule:addBuyableItem({'death arrow'}, 2263, 300, 3, 'death arrow rune') shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune') shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune') shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune') shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune') shopModule:addBuyableItem({'desintegrate'}, 2310, 80, 3, 'desintegreate rune') shopModule:addBuyableItemContainer({'bp ap'}, 2002, 8378, 2000, 1, 'backpack of antidote potions') shopModule:addBuyableItemContainer({'bp slhp'}, 2000, 8610, 400, 1, 'backpack of small health potions') shopModule:addBuyableItemContainer({'bp hp'}, 2000, 7618, 900, 1, 'backpack of health potions') shopModule:addBuyableItemContainer({'bp mp'}, 2001, 7620, 1000, 1, 'backpack of mana potions') shopModule:addBuyableItemContainer({'bp shp'}, 2000, 7588, 2000, 1, 'backpack of strong health potions') shopModule:addBuyableItemContainer({'bp smp'}, 2001, 7589, 1600, 1, 'backpack of strong mana potions') shopModule:addBuyableItemContainer({'bp ghp'}, 2000, 7591, 3800, 1, 'backpack of great health potions') shopModule:addBuyableItemContainer({'bp gmp'}, 2001, 7590, 2400, 1, 'backpack of great mana potions') shopModule:addBuyableItemContainer({'bp gsp'}, 1999, 8376, 3800, 1, 'backpack of great spirit potions') shopModule:addBuyableItemContainer({'bp uhp'}, 2000, 8377, 6200, 1, 'backpack of ultimate health potions') shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex') shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 'wand of dragonbreath') shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay') shopModule:addBuyableItem({'wand of draconia', 'draconia'}, 8921, 7500, 'wand of draconia') shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 10000, 'wand of cosmic energy') shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno') shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm') shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo') shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod') shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod') shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod') shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod') shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod') shopModule:addBuyableItem({'hailstorm rod', 'hailstorm'}, 2183, 15000, 'hailstorm rod') shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod') shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000, 'underworld rod') shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 250, 'wand of vortex') shopModule:addSellableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 500, 'wand of dragonbreath') shopModule:addSellableItem({'wand of decay', 'decay'}, 2188, 2500, 'wand of decay') shopModule:addSellableItem({'wand of draconia', 'draconia'}, 8921, 3750, 'wand of draconia') shopModule:addSellableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 5000, 'wand of cosmic energy') shopModule:addSellableItem({'wand of inferno', 'inferno'},2187, 7500, 'wand of inferno') shopModule:addSellableItem({'wand of starstorm', 'starstorm'}, 8920, 9000, 'wand of starstorm') shopModule:addSellableItem({'wand of voodoo', 'voodoo'}, 8922, 11000, 'wand of voodoo') shopModule:addSellableItem({'snakebite rod', 'snakebite'}, 2182, 250,'snakebite rod') shopModule:addSellableItem({'moonlight rod', 'moonlight'}, 2186, 500, 'moonlight rod') shopModule:addSellableItem({'necrotic rod', 'necrotic'}, 2185, 2500, 'necrotic rod') shopModule:addSellableItem({'northwind rod', 'northwind'}, 8911, 3750, 'northwind rod') shopModule:addSellableItem({'terra rod', 'terra'}, 2181, 5000, 'terra rod') shopModule:addSellableItem({'hailstorm rod', 'hailstorm'}, 2183, 7500, 'hailstorm rod') shopModule:addSellableItem({'springsprout rod', 'springsprout'}, 8912, 9000, 'springsprout rod') shopModule:addSellableItem({'underworld rod', 'underworld'}, 8910, 11000, 'underworld rod') function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) local vocationId = player:getVocation():getId() local items = { [1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182 } if msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand') then if table.contains({1, 2, 5, 6}, vocationId) then if player:getStorageValue(30002) == -1 then selfSay('So you ask me for a {' .. ItemType(items[vocationId]):getName() .. '} to begin your advanture?', cid) npcHandler.topic[cid] = 1 else selfSay('What? I have already gave you one {' .. ItemType(items[vocationId]):getName() .. '}!', cid) end else selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid) end elseif msgcontains(msg, 'yes') then if npcHandler.topic[cid] == 1 then player:addItem(items[vocationId], 1) selfSay('Here you are young adept, take care yourself.', cid) player:setStorageValue(30002, 1) end npcHandler.topic[cid] = 0 elseif msgcontains(msg, 'no') and npcHandler.topic[cid] == 1 then selfSay('Ok then.', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
    Depois
     
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook') shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 'magic lightwand') shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion') shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion') shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion') shopModule:addBuyableItem({'strong health'}, 7588, 100, 1, 'strong health potion') shopModule:addBuyableItem({'strong mana'}, 7589, 80, 1, 'strong mana potion') shopModule:addBuyableItem({'great health'}, 7591, 190, 1, 'great health potion') shopModule:addBuyableItem({'great mana'}, 7590, 120, 1, 'great mana potion') shopModule:addBuyableItem({'great spirit'}, 8472, 190, 1, 'great spirit potion') shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 1, 'ultimate health potion') shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion') shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask') shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask') shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask') shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune') shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune') shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune') shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune') shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune') shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune') shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune') shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune') shopModule:addBuyableItem({'sudden death'}, 2268, 350, 3, 'sudden death rune') shopModule:addBuyableItem({'death arrow'}, 2263, 300, 3, 'death arrow rune') shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune') shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune') shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune') shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune') shopModule:addBuyableItem({'desintegrate'}, 2310, 80, 3, 'desintegreate rune') shopModule:addBuyableItemContainer({'bp ap'}, 2002, 8378, 2000, 1, 'backpack of antidote potions') shopModule:addBuyableItemContainer({'bp slhp'}, 2000, 8610, 400, 1, 'backpack of small health potions') shopModule:addBuyableItemContainer({'bp hp'}, 2000, 7618, 900, 1, 'backpack of health potions') shopModule:addBuyableItemContainer({'bp mp'}, 2001, 7620, 1000, 1, 'backpack of mana potions') shopModule:addBuyableItemContainer({'bp shp'}, 2000, 7588, 2000, 1, 'backpack of strong health potions') shopModule:addBuyableItemContainer({'bp smp'}, 2001, 7589, 1600, 1, 'backpack of strong mana potions') shopModule:addBuyableItemContainer({'bp ghp'}, 2000, 7591, 3800, 1, 'backpack of great health potions') shopModule:addBuyableItemContainer({'bp gmp'}, 2001, 7590, 2400, 1, 'backpack of great mana potions') shopModule:addBuyableItemContainer({'bp gsp'}, 1999, 8376, 3800, 1, 'backpack of great spirit potions') shopModule:addBuyableItemContainer({'bp uhp'}, 2000, 8377, 6200, 1, 'backpack of ultimate health potions') shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex') shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 'wand of dragonbreath') shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay') shopModule:addBuyableItem({'wand of draconia', 'draconia'}, 8921, 7500, 'wand of draconia') shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 10000, 'wand of cosmic energy') shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno') shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm') shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo') shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod') shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod') shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod') shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod') shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod') shopModule:addBuyableItem({'hailstorm rod', 'hailstorm'}, 2183, 15000, 'hailstorm rod') shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod') shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000, 'underworld rod') shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 250, 'wand of vortex') shopModule:addSellableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 500, 'wand of dragonbreath') shopModule:addSellableItem({'wand of decay', 'decay'}, 2188, 2500, 'wand of decay') shopModule:addSellableItem({'wand of draconia', 'draconia'}, 8921, 3750, 'wand of draconia') shopModule:addSellableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 5000, 'wand of cosmic energy') shopModule:addSellableItem({'wand of inferno', 'inferno'},2187, 7500, 'wand of inferno') shopModule:addSellableItem({'wand of starstorm', 'starstorm'}, 8920, 9000, 'wand of starstorm') shopModule:addSellableItem({'wand of voodoo', 'voodoo'}, 8922, 11000, 'wand of voodoo') shopModule:addSellableItem({'snakebite rod', 'snakebite'}, 2182, 250,'snakebite rod') shopModule:addSellableItem({'moonlight rod', 'moonlight'}, 2186, 500, 'moonlight rod') shopModule:addSellableItem({'necrotic rod', 'necrotic'}, 2185, 2500, 'necrotic rod') shopModule:addSellableItem({'northwind rod', 'northwind'}, 8911, 3750, 'northwind rod') shopModule:addSellableItem({'terra rod', 'terra'}, 2181, 5000, 'terra rod') shopModule:addSellableItem({'hailstorm rod', 'hailstorm'}, 2183, 7500, 'hailstorm rod') shopModule:addSellableItem({'springsprout rod', 'springsprout'}, 8912, 9000, 'springsprout rod') shopModule:addSellableItem({'underworld rod', 'underworld'}, 8910, 11000, 'underworld rod') function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) local vocationId = player:getVocation():getId() local items = { [1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182 } local precoVial = (3 * player:getStorageValue(75132)) if (msgcontains(msg, 'vial') or msgcontains(msg, 'flask')) and player:getStorageValue(75132) >= 1 then npcHandler:say('Do you want to sell {' .. player:getStorageValue(75132) .. '} flasks for 3 gps each?', cid) npcHandler.topic[cid] = 3 else npcHandler:say('You have no vials or flasks in our system.', cid) end if (msgcontains(msg, 'yes') and npcHandler.topic[cid] == 3) then npcHandler:say('You received '.. precoVial ..' gold coins.', cid) player:setStorageValue(75132, 0) player:addItem(2148, precoVial) npcHandler.topic[cid] = 0 elseif (msgcontains(msg, 'no') and npcHandler.topic[cid] == 3) then npcHandler.topic[cid] = 0 npcHandler:say('Ok then.', cid) end if msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand') then if table.contains({1, 2, 5, 6}, vocationId) then if player:getStorageValue(30002) == -1 then selfSay('So you ask me for a {' .. ItemType(items[vocationId]):getName() .. '} to begin your advanture?', cid) npcHandler.topic[cid] = 1 else selfSay('What? I have already gave you one {' .. ItemType(items[vocationId]):getName() .. '}!', cid) end else selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid) end elseif msgcontains(msg, 'yes') then if npcHandler.topic[cid] == 1 then player:addItem(items[vocationId], 1) selfSay('Here you are young adept, take care yourself.', cid) player:setStorageValue(30002, 1) end npcHandler.topic[cid] = 0 elseif msgcontains(msg, 'no') and npcHandler.topic[cid] == 1 then selfSay('Ok then.', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Sendo que você altera o preço que você paga por vial/flask na variável precoVial.
     
    Pronto, agora só chegar no seu NPC Mágico e falar vial ou flasks.
     
    Creio que tenha ficado entendido o tópico, caso dê algum erro, favor postar aqui.
  11. Obrigado
    Agaka recebeu reputação de MikaelX em (Resolvido)Alterando Script de Reflect pra ficar por %   
    @MikaelX 
     
  12. Curtir
    Agaka recebeu reputação de MikaelX em (Resolvido)Alterando Script de Reflect pra ficar por %   
    @MikaelX 
     
    edit: Comentário errado no código.
  13. Curtir
    Agaka deu reputação a WooX em Novo comando de depot   
    --<talkaction words="/depot;!depot" event="script" value="depot.lua"/>-- local sendToDepot = false local depotIDs = {2589, 2590, 2591, 2592} -- South, West, North and East local middleItems = {1643, 1645} -- Eixo Y, Eixo X function onSay(cid, words, param, channel) if not getPosition(getThingPos(cid)).depot then doPlayerSendCancel(cid, "You're not on the depot.") return true end param = string.lower(param) if (param == "clean") then doCleanTile(getPosition(getThingPos(cid)).depot) doCleanTile(getPosition(getThingPos(cid)).middle) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The depot and its surrounding were cleaned.") elseif (param == "collect") then local pos = getPosition(getThingPos(cid)).depot while getThingFromPos(pos).itemid > 0 do pos.stackpos = pos.stackpos + 1 if (pos.stackpos > 2) and (isInArray(depotIDs, getThingFromPos(pos).itemid)) then pos.stackpos = pos.stackpos - 1 break elseif (getThingFromPos(pos).itemid == 0) then break end end local toAdd = getThingFromPos(pos) if toAdd.itemid > 0 then if sendToDepot then doRemoveItem(toAdd.uid) local parcel = doCreateItemEx(ITEM_PARCEL) doAddContainerItem(parcel, toAdd.itemid, toAdd.type) doPlayerSendMailByName(getPlayerName(cid), parcel, getPlayerTown(cid)) local itemArticle = isItemStackable(toAdd.itemid) and toAdd.type or getItemArticleById(toAdd.itemid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You just received "..itemArticle.." "..getItemNameById(toAdd.itemid).." in your depot.") else doRemoveItem(toAdd.uid) doPlayerAddItem(cid, toAdd.itemid, toAdd.type) local itemArticle = isItemStackable(toAdd.itemid) and toAdd.type or getItemArticleById(toAdd.itemid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string.upper(itemArticle).." "..getItemNameById(toAdd.itemid).." was added to your inventory.") end else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "There's no item to be collected on your depot.") end else doPlayerSendCancel(cid, "Use the parameters clean or collect.") end return true end function getPosition(playerPos) local position = {} local crossDir = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}} local depotPos, middleItemPos for i = 1, #depotIDs do for k, v in pairs(crossDir) do depotPos = {x = playerPos.x, y = playerPos.y, z = playerPos.z, stackpos = playerPos.stackpos} depotPos.x = depotPos.x + v[1] depotPos.y = depotPos.y + v[2] local depot = getTileItemById(depotPos, depotIDs[i]) if depot.itemid == depotIDs[i] then depotPos.stackpos = 2 position.depot = {x = depotPos.x, y = depotPos.y, z = depotPos.z, stackpos = depotPos.stackpos} middleItemPos = {x = depotPos.x, y = depotPos.y, z = depotPos.z, stackpos = depotPos.stackpos} if playerPos.y ~= depotPos.y then middleItemPos.x = middleItemPos.x - 1 if getTileItemById(middleItemPos, middleItems[1]).itemid ~= middleItems[1] then middleItemPos.x = middleItemPos.x + 2 end elseif playerPos.x ~= depotPos.x then middleItemPos.y = middleItemPos.y - 1 if getTileItemById(middleItemPos, middleItems[2]).itemid ~= middleItems[2] then middleItemPos.y = middleItemPos.y + 2 end end position.middle = {x = middleItemPos.x, y = middleItemPos.y, z = middleItemPos.z, stackpos = middleItemPos.stackpos} break end end end return position end  
  14. Curtir
    Agaka deu reputação a DdJs em [8.60] Pumin Seal (Cave)   
    Pumin Seal (Cave)
    V 8.60
     
    [Cave inspirada no selo de Pumin da Ferumbras' Ascendant Quest]
    *Não se trata de uma réplica fiel do seal original.
     
    Download:
    Pumin_Seal8.60.rar
    Position: [X: 1006 Y: 1022 Z: 9]
     
    Imagens:
     
     
     
  15. Curtir
    Agaka deu reputação a GamerGoiano em APaguem esse post   
    APaguem esse post
  16. Curtir
    Agaka deu reputação a vyctor17 em [Show-Off] Vyctor17   
    Oi Tk, faz um tempo que eu postei alguns módulos que eu fiz, para o OTclient, agora vou mostrar um pouco de como eles foram implementados em um projeto de teste. vou fazer um breve explicação sobre o o funcionamento e depois colocarei um GIF ou Video mostrando in-game.
     
     
    Raridade em monstros e items.
    Monstros: a raridade em monstros aumenta seu poder de ataque e vida baseado na raridade. Para monstros existem 4 Tiers de raridade,  Comum, Épico, Lendário e Único um monstro com raridade acima de comum sempre protegendo um bau com recompensas.
     
    Items: Os items tem variação de raridade baseado em um encantamento obtido via Gemas, Essas raridades são dividas em 5 Tiers de raridade, Comum, Magico, Épico, Lendário e Único.
     

     
    a imagem não contem item e monstros únicos
     

    Gemas de encantamento.
    As gemas de encantamento melhoram um item e só podem ser utilizadas uma vez por item, existem duas gemas uma pode dar de um a três atributos novos ao item e outra de um a seis, a partir do numero de atributos novos gerados no item é definido sua raridade. As gemas podem ser obtidas através de mineração ou em baus de recompensa.

     

    Baus de recompensa.
    São gerados junto a monstros de raridade acima de comum dependo de qual bau o monstro protege mais forte ele é, exemplo um monstro épico protegendo um bau de ouro é mais forte que um épico protegendo um bau normal. Para abrir o bau você terá que fazer o Lockpick no bau.
     

    Wasp lendária protegendo bau da fortuna.
     
     

    Pescaria.
    Nada de muito explicativo só uma pesca comum, para obter peixes para Cooking ou para Alquimia.
     
     
     
     

    Lockpick.
    Nada de muito novo também.
     
     
     

    Montaria
    Nada muito diferente também, só existem três pontos diferentes da montaria no meu server para o do global que são, as montarias tem vida e se ela "morrer" você é desmontado, as montarias em quanto montado te libera magias, a montaria tem um slot próprio para poder ser equipada.
     
     

    Magias e inventario.
    Todas classes podem usar qualquer magia mas as magias são vinculadas as items, então para ter a magia liberada a pessoa tem que estar com o item equipado para aumentar a quantidade magias criei mais dois slots no inventario um slot para montaria e mais um anel.

     

    Vou ficar devendo falar sobre o craft e a alquimia, pois ainda estou trabalhando neles. deixar um agradecimento especial a galera do discord do TK que me ajudou com ideias e me guiando para melhorar sistemas existentes . Qualquer duvida ou sugestão para os sistemas acima ou para qualquer outro tipo de sistema que você acha que poderia ficar legal em conjunto com esses sistemas ficarei ligado nos comentários desse tópico. Obrigado pela atenção.
     
    Bonus:
     
     
     
  17. Curtir
    Agaka deu reputação a WooX em Field owner onLook (Magic Wall, Fire Bombs, etc)   
    Algumas pessoas vieram me pedir esse código, então hoje eu tirei um tempinho pra trazer pra vocês.
     
    O que faz

    Este código faz com que seja possivel ver através do look, quem jogou uma Magic Wall ou um Fire Bomb, isso é útil quando aquele amigo noob taca uma Magic Wall onde não deveria e diz que não foi ele, com esse código não tem como se esconder.

     
    Como implementar

     
    Este código foi testado apenas em TFS 0.x e OTX2, mas acredito que pode facilmente ser adaptado para TFS 1.x.
    Originalmente eu fiz este código para ser usado com a Magic Wall, mas ele pode ser implementado em qualquer spell que utilize COMBAT_PARAM_CREATEITEM.
     
    Script original da Magic Wall
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(cid, var) return doCombat(cid, combat, var) end Basta substituir o return doCombat pelo código abaixo.
    ret = doCombat(cid, combat, var) if ret then local mWall = getTileItemById(variantToPosition(var), 1497).uid doItemSetAttribute(mWall, "description", string.format("It was cast by: %s.", getCreatureName(cid))) end return ret O código completo deve ficar parecido com este.
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(cid, var) ret = doCombat(cid, combat, var) if ret then local mWall = getTileItemById(variantToPosition(var), 1497).uid doItemSetAttribute(mWall, "description", string.format("It was shot by: %s.", getCreatureName(cid))) end return ret end Note que 1497 é o ID da Magic Wall, para items como Fire Field e outros, o ID deve ser substituído.
     
    Créditos


  18. Curtir
    Agaka deu reputação a Namikaze em Blood City Remake   
    Voltei a mexer no RME ?
     

     

     

  19. Curtir
    Agaka deu reputação a Namikaze em Blood City Remake   
    Boa tarde galera, segue mais fotos do meu trabalho ?:



     
     
     
     
     
     
     


  20. Curtir
    Agaka deu reputação a Namikaze em Blood City Remake   
    Download link acima ^ 
     
    Hellou!!
    Estou modificando um Mapa, tentando deixar a cidade mais bonita porém com traps que deixe o PvP atraente com mais mecânicas,scaps etc. Também tentar passar mais seriedade e inserir um pouco de Rpg. Faço sozinho tenho pouco tempo e sabe lá Deus quando vai ficar pronto kkkk.
    Segue as fotenhas ?:
     
     
                                                       Templo

     
                                 Loja de Munições,Crossbow e Bow

     
     Terraço da Loja, Com alvos para treinas as flechadas no coração da morena

     
                 Loja de Utilitários Com umas Mecanicaszinhas para PvP.

     
    Um dos acessos para uma parte digamos alta da cidade. mw ai é o fino.

     
     
     
     
     
     
     
     
     
     
     
  21. Curtir
    Agaka deu reputação a xWhiteWolf em Callbacks de creaturescripts   
    Fala galera do TK, hoje eu vim trazer pra vocês uma coisa que se perdeu em todos esses anos de OT e que é uma das coisas mais importantes prum scripter intermediário/avançado. São as explicações dos respectivos callbacks de creaturescripts. Espero que ajude bastante gente

    Créditos: 90% Zonnebloem (um gringo ai que postou isso das sources) e 10% pra mim por completar oque ele não tinha escrito e arrumado umas coisas que ele escreveu errado.
     
        ____________________________     CREATURE EVENTS TIPOS:  _________________

    TFS 0.2
    type="login"     function onLogin(cid)   type="logout"     function onLogout(cid)   type="advance"     function onAdvance(cid, skill, oldLevel, newLevel)   type="think"     function onThink(cid, interval)   type="kill"     function onKill(cid, target)   type="death"     function onDeath(cid, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)   type="preparedeath"     function onPrepareDeath(cid, killer) TFS 0.3/0.4
    type="login"     function onLogin(cid)   type="logout"     function onLogout(cid)   type="advance"     function onAdvance(cid, skill, oldLevel, newLevel)   type="think"     function onThink(cid, interval)   type="kill"     function onKill(cid, target, lastHit)   type="death"     function onDeath(cid, corpse, deathList)   type="preparedeath"     function onPrepareDeath(cid, deathList)   type="statschange"     function onStatsChange(cid, attacker, type, combat, value)   type="combat"     function onCombat(cid, target)   type="target"     function onTarget(cid, target)   type="look"     function onLook(cid, thing, position, lookDistance)   type="textedit"     function onTextEdit(cid, item, newText)   type="outfit"     function onOutfit(cid, old, current)   type="push"     function onPush(cid, target)   type="follow"     function onFollow(cid, target)   type="attack"     function onAttack(cid, target)   type="areacombat"     function onAreaCombat(cid, tileItem, tilePosition, isAggressive)   type="cast"     function onCast(cid, target)   type="direction"     function onDirection(cid, old, current)   type="reportbug"     function onReportBug(cid, comment)   type="sendmail"     function onSendMail(cid, receiver, item, openBox)   type="receivemail"     function onReceiveMail(cid, sender, item, openBox)   type="traderequest"     function onTradeRequest(cid, target, item)   type="tradeaccept"     function onTradeAccept(cid, target, item, targetItem)   type="joinchannel"     function onJoinChannel(cid, channel, users)   type="leavechannel"     function onLeaveChannel(cid, channel, users) TFS 1.0
    type="login"     function onLogin(cid)   type="logout"     function onLogout(cid)   type="think"     function onThink(cid, interval)   type="preparedeath"     function onPrepareDeath(cid, killer)   type="death"     function onDeath(cid, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)   type="kill"     function onKill(cid, target)   type="advance"     function onAdvance(cid, skill, oldLevel, newLevel)   type="modalwindow"     function onModalWindow(cid, modalWindowId, buttonId, choiceId)   type="textedit"     function onTextEdit(cid, item, text)   type="changehealth"     function onChangeHealth(cid, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType)   type="changemana"     function onChangeMana(cid, attacker, manaChange)   type="extendedopcode"     function onExtendedOpcode(cid, opcode, buffer)     ____________________________     INFORMAÇÃO SOBRE OS TIPOS:  _________________
    antes de tudo tenha em mente que os tipos só serão executados no player ou monstro em que eles forem registrados; Registrar no login.lua vai fazer com que ele seja executado em todos os players assim q eles logarem. Se deve ser executado somente por alguns monstros, registre no monstro em questão no xml dele.

    login

    Quando é executada:
    - Quando um player loga

    Parametros:
    - cid = creatureid do player que logou

    quando está return false:
    - nada

    registra creature event:
    - não

    ~~~~

    logout

    Quando é executada:
    - quando um player desloga pelo logout do próprio cliente. Não acontece se o player morrer, for disconectado ou xlogs

    Parametros:
    - cid = creatureid do player que deslogou

    quando está return false:
    - Player não vai conseguir deslogar

    registra creature event:
    - não

    ~~~~

    advance

    Quando é executado:
    - Toda vez que um player avançar de level, magic level ou qualquer outra skill

    Parametros:
    - cid = creature id do player que avançou
    - skill = tipo da skill que o player avançou vide tabela abaixo (note que vc pode utilizar tanto o nome SKILL_FIST quanto o numero 0)
    SKILL_FIST = 0 SKILL_CLUB = 1 SKILL_SWORD = 2 SKILL_AXE = 3 SKILL_DISTANCE = 4 SKILL_SHIELD = 5 SKILL_FISHING = 6 SKILL__MAGLEVEL = 7 SKILL__LEVEL = 8 - oldlevel = level antes do player avançar
    - newlevel = o novo level após avançar

    quando está return false:
    - ele não vai avançar o nível

    Registra creature event:
    - sim (isso significa que vc pode colocar pra ele registrar um outro creatureevent dentro desse script após alcançar X level)

    ~~~~

    think

    Quando é executada:
    - Pelo tempo

    Parametros:
    - cid = creatureid do monstro ou player
    - interval = intervalo entre cada checagem OU em que intervalo deve ser executada, 500 é 0.5 segundo.

    quando está return false:
    - nada

    Registra creature event:
    - sim

    ~~~~

    kill

    Quando é executada:
    - Ao matar um player/monstro

    Parametros:
    - cid = creatureid do player ou do monstro que mata
    - target = creatureid do player ou monstro que é morto

    quando está return false:
    - O target não morrerá, ele ficará com 0 de vida e a barra sumirá para os inimigos.Ele precisará se curar para que sua barra de vida volte

    registra creature event:
    -sim

    ~~~~

    death

    Quando é executada:
    - Quando um player ou monstro morrem

    Parametros:
    - cid = creatureid do player monstro que morre
    - corpse = corpo do monstro ou player que morre

    exemplo de adicionando 3 crystal coins no corpo que morreu.
    doAddContainerItem(corpse.uid, 2160, 3) - deathlist = uma table com o nome de todos que mataram, sendo na ordem o deathlist[1] oque deu o ultimo hit e o deathlist[2] sendo oque deu mais dano.
    quando está return false:
    - O corpo não será criado

    Registra creature event:
    - Sim

    ~~~~

    preparedeath

    Quando é executada:
    - Quando um monstro ou player está prestes a morrer (pode ser usada em scripts que devem ser executados no segundo antes do player morrer)

    Parameters:
    - cid = creatureid do player ou monstro que está prestes a morrer
    - deathlist = uma tabela com o nome dos atacantes

    quando está return false:
    - o player ou monstro não irá morrer (mesma história do kill)

    Registra creature event:
    - Sim

    ~~~~

    statschange

    quando é executada:
    -Quando um player ou monstro ou ganha ou perde vida/mana de um combat ou uma função (combats não são só os das spells, mas também weapons/fist/melee... vale lembrar também que monstros não possuem mana)

    Parametros:
    - cid = creatureid do player ou monstro q ganha/perde vida/mana
    - attacker = creatureid do player ou monstro que causou a mudança na health/mana
    - type = tipo da mudança, sendo ela:Ganho de vida, perca de vida, ganho de mana e perca de mana vide tabela abaixo:
    STATSCHANGE_HEALTHGAIN = 0 STATSCHANGE_HEALTHLOSS = 1 STATSCHANGE_MANAGAIN = 2 STATSCHANGE_MANALOSS = 3 - combat = o tipo de combat que causou a alteração, sendo esses tipos:
    COMBAT_NONE = 0 COMBAT_PHYSICALDAMAGE = 1 COMBAT_ENERGYDAMAGE = 2 COMBAT_EARTHDAMAGE = 4 COMBAT_POISONDAMAGE = 4 COMBAT_FIREDAMAGE = 8 COMBAT_UNDEFINEDDAMAGE = 16 COMBAT_LIFEDRAIN = 32 COMBAT_MANADRAIN = 64 COMBAT_HEALING = 128 COMBAT_DROWNDAMAGE = 256 COMBAT_ICEDAMAGE = 512 COMBAT_HOLYDAMAGE = 1024 COMBAT_DEATHDAMAGE = 2048 - value = valor da mudança
    quando está return false:
    - O player ou o monstro não ganharão/perderão vida/mana no combat. Pode ser usado pra fazer ele ficar imortal por um certo período ou não ser capaz de tomar dano de certos players/creaturas 

    Registra creature event:
    - Sim

    ~~~~

    combat

    Quando é executado:
    - Quando um player ou monstro starta um combat (qualquer tipo de ataque)

    Parametros:
    - cid = creatureid do player ou monstro que usa o combat
    - target = creatureid do player ou monstro que sofre o combat

    quando está return false:
    - O player ou monstro não será capaz de levar ataques, isso também inclui que ele não poderá dar target em alguém/algo . Isso pode ser usado para criar monstros que não possam levar ataques ou fazer players ficarem imunes a dano por um certo tempo.

    Registra creature event:
    - Sim


    _______________________________________________________________________________________________

    Agora começa a graça da coisa:


    ~~~~

    target

    Quando é executado:
    - Quando um player ou monstro dá target em um player/mostro (follow/attack)

    Parametros:
    - cid = creatureid do player ou monstro que dá o target
    - target = creatureid do player ou monstro que é targeted

    quando está return false:
    - O player/monstro não poderá dar target.. alguns testes com monstros revelaram que o monstro ainda consegue te atacar então acho que essa função só serve para player

    Registra creature event:
    - Sim
     

    ~~~~

    look

    Quando é executado:
    - Quando um player dá look em algo

    Parametros:
    - cid = creatureid do player que dá o look
    - thing = objeto/player/monstro que o player dá look
    - position = não tenho certeza se é a posição do objeto que é dado look ou se é a minha posição.
    - lookDistance = distancia entre esse objeto e eu.

    quando está return false:
    - Não aparece a mensagem de look na tela

    Registra creature event:
    - Sim
     
    ~~~~

    textedit

    Quando é executado:
    - Quando um player edita um texto em algum item writeable (livros por exemplos)

    Parametros:
    - cid = creatureid do player
    - item = item que está sendo modificiado
    - newText = texto novo que foi escrito 

    quando está return false:
    - O player não conseguirá editar o texto, quando ele tentar dar ok o item continuará com o mesmo texto.. Pode ser usado numa quest com muito RPG pra checar se a senha que o player escreveu no livro é a correta.

    Registra creature event:
    - sim
     
    ~~~~

    outfit

    Quando é executado:
    - Quando um player ou monstro muda de outfit

    Parametros:
    - cid = creatureid do player ou monstro que muda de outfit
    - old = outfit antiga
    - current = outfit atual (após ter trocado)

    quando está return false:
    - a troca de outfit será cancelada e o player/monstro voltará para a antiga outfit

    Registra creature event:
    - sim
     
    ~~~~

    push

    Quando é executado:
    - Quando um player tenta empurrar um monstro ou um player

    Parametros:
    - cid = creatureid do player que empurrar
    - target = creatureid do player ou monstro que é empurrado

    quando está return false:
    - O player não conseguirá empurrar (arrastar o oponente com o mouse). É bastante util em eventos para que eles não possam ficar se empurrando

    Registra creature event:
    - sim
     
    ~~~~

    follow

    Quando é executado:
    - Quando um player dá follow em algum monstro ou player ou até num NPC

    Parametros:
    - cid = creatureid do player que dá o follow
    - target = creatureid da criatura (monstro/npc/player) que é seguida

    quando está return false:
    - O follow não irá ocorrer

    Registra creature event:
    - Sim
     
    ~~~~

    attack

    Quando é executado:
    - Quando um player ou monstro ataca (melee, spells não contam)

    Parametros:
    - cid = creatureid do player ou monstro que ataca
    - target = creatureid do player ou monstrp que sofre o ataque

    quando está return false:
    - O player/monstro não irá atacar, é bastante útil em sistemas que vc queira deixar uma certa criatura imune a ataques mas que ela ainda possa morrer pra spells

    Registra creature event:
    - Sim
     
    ~~~~

    areacombat

    Quando é executado:
    - Quando um player ou monstro starta um combat em área (usa uma spell ou dano em área)

    Parametros:
    - cid = creatureid do player ou monstro que usa o combat
    - tileItem = player que está dentro da area
    - tilePosition = posição do player que está dentro da area
    - isAggressive = se esse combat em área é agressivo ou não, lembre-se que magias como exura gran mas res fazem combat em área mas esse combat não é agressivo porque ela cura em área

    quando está return false:
    - o combat é cancelado

    Registra creature event:
    - Sim
     

    ~~~~

    cast

    Quando é executado:
    - Quando um player ou monstro solta uma magia

    Parametros:
    - cid = creatureid do player ou monstro que usa a magia
    - target = creatureid do player ou monstro que sofre o dano da magia

    quando está return false:
    - a magia não é lançada

    Registra creature event:
    - sim
     
    ~~~~

    direction

    Quando é executado:
    - Quando uma criatura (NPC/Player/Monster) muda de direção 

    Parametros:
    - cid = creatureid do player ou monstro que mudará de direção
    - old =  direção antiga
    - current = direção atual, após ter mudado, vide tabela abaixo:
    NORTH = 0EAST = 1 SOUTH = 2 WEST = 3 SOUTHWEST = 4 SOUTHEAST = 5 NORTHWEST = 6 NORTHEAST = 7 atente-se no fato de que não é possível virar pras direções 4,5,6 e 7 mas você utilizá-las num script que cheque a direção entre dois players, daí sim seria possível (como é no caso do exiva)
    quando está return false:
    - A criatura não será capaz de mudar de direção

    Registra creature event:
    - Sim
     
    ~~~~

    reportbug

    Quando é executado:
    - Quando um player reporta um bug

    Parametros:
    - cid = creatureid do player que reportou o bug
    - comment = comentário que ele adicionou ao reportar

    quando está return false:
    - O report será cancelado e não será enviado. Pode ser usado num script avançado de reports onde se o player não tiver escrito nenhum comentário ou tiver escrito determinadas palavras o envio será cancelado (pra evitar spams)

    Registra creature event:
    - Sim
     
    ~~~~

    sendmail

    Quando é executado:
    - Quando um player manda uma carta/parcel para outro

    Parametros:
    - cid = creatureid do player que mandou a correspondencia
    - receiver = creatureid do player que irá receber essa correspondencia
    - item = item que foi enviado (id dele)
    - openBox = conteúdo (no caso de parcel)

    quando está return false:
    - Correspondência não será enviada. É util pra registrar um log de todas as trocas entre players e pegar hackers.

    Registra creature event:
    - Sim
     
    ~~~~

    receivemail

    Quando é executado:
    - Quando um player recebe uma carta/parcel de outro

    Parametros:
    - cid = creatureid do player que recebou a correspondência
    - sender = creatureid do player que enviou a correspondência
    - item =  item recebido
    - openBox =  conteúdo da correspondencia (no caso de ser uma parcel)

    quando está return false:
    - Ele não receberá a correspondência.

    Registra creature event:
    - Sim 

    ~~~~

    traderequest

    Quando é executado:
    - Quando um player dá trade

    Parametros:
    - cid = creatureid do player que deu o trade
    - target = creatureid do player que ele tentou iniciar uma troca
    - item = item que foi iniciada a troca (se for uma backpack cheia de coisas dentro esse item será uma table com todos os itens)

    quando está return false:
    - A troca não será executada. É útil para scripts de itens vip onde o player não possa trocar determinados itens

    Registra creature event:
    - Sim
     
    ~~~~

    tradeaccept

    Quando é executado:
    - Quando um player aceita a troca com outro)

    Parametros:
    - cid = creatureid do player que aceitou a troca (você)
    - target = creatureid do player que aceitou a troca (cara com quem você trocou)
    - item = items que você deu em troca, no caso de uma backpack cheia de itens esse parametro será uma table com todos os itens
    - targetItem =  items que você recebeu em troca, no caso de uma backpack cheia de itens esse parametro será uma table com todos os itens

    quando está return false:
    - a troca não será concluída.

    Registra creature event:
    - Sim
     
    ~~~~

    joinchannel

    Quando é executado:
    - Quando um player entra num channel (aqueles canais tipo trade/ help chat/ info/ guild/ etc...)

    Parametros:
    - cid = creatureid do player que entrou no chat
    - channel = canal que o player entrou.. vide lista abaixo:
    CHANNEL_GUILD = 0 CHANNEL_PARTY = 1 CHANNEL_RVR = 3 CHANNEL_HELP = 9 CHANNEL_DEFAULT = 0xFFFE CHANNEL_PRIVATE = 0xFFFF - users = outros usuários do canal.
    quando está return false:
    - O player não conseguirá entrar no channel

    Registra creature event:
    - Sim
     
    OBS: a mesma coisa vale pra função leavechannel, só que o return false o player não conseguirá sair do channel.


    Espero que isso ajude bastante gente, eu não expliquei os types da versão 1.0 porque é basicamente a mesma coisa e pelos parametros dá pra você ter uma ideia doque é oque. :]
  22. Curtir
    Agaka deu reputação a Pedro. em Nakjila Layout 1x   
    Olá, tava olhando aqui um antigo HD que por acaso não estava funcionando e acabei conseguindo recuperar algumas coisas, então como estou afastado do forum estarei disponibilizando aqui. 
     
     
    Version: TFS 1x+
     
    Download:
    Nakjila
     
    Virustotal:
    AQUI
    Images:
     


     
     
  23. Gostei
    Agaka deu reputação a Cat em Sistema de teleports por waypoints (descobrir áreas no mapa)   
    Waypoint teleport system é um dispositivo de teletransporte. O principal objetivo de um waypoint é fornecer viagens rápidas entre as áreas que um jogador descobriu. Esse sistema foi desenvolvido por Oen432. (Apenas traduzi)
     
    Demonstração:
     
    Instalação
    Abra data/movements/movements.xml. Adicione XML: <movevent event="StepIn" actionid="4236" script="waypoints.lua" /> Abra data/creaturescripts/creaturescripts.xml. Adicione XML: <event type="ModalWindow" name="WaypointsModal" script="modal_windows.lua"/> Faça o Download de waypoints.rar abaixo, no final do tópico. Copie waypoints.lua para data/movements/scripts/waypoints.lua. Copie modal_windows.lua para data/creaturescripts/scripts/modal_windows.lua.  
    Configuração Todas as configurações estão em - data/movements/scripts/waypoints.lua.
    WINDOW_ID - ignore.
    BUTTON_ACCEPT - ignore.
    BUTTON_CLOSE - ignore.

    WAYPOINTS_STORAGE - base storage id, mude se já está sendo usado esse (garanta que de WAYPOINTS_STORAGE para WAYPOINTS_STORAGE + Number of waypoints, as storages não estejam sendo utilizadas em outro código).

    WAYPOINTS - lista de waypoints disponíveis
    name - nome que será mostrado na lista e quando o waypoint for ativado
    position - posição do piso no mapa, aqui é onde o jogador será teleportado
     
    Download
    waypoints-1_0_0.rar
     
  24. Curtir
    Agaka deu reputação a Lyu em (Resolvido)Guild Bonus   
    Tente isso, fiz aqui rapidinho mas não testei (acredito que funcione como você espera)
     
    data/movements/scripts/guildexp.lua
    if not guildExperienceBonus then guildExperienceBonus = 0 -- default value; no guild end function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local guild = player:getGuild() if guild then guildExperienceBonus = guild:getId() player:sendTextMessage(MESSAGE_INFO_DESCR, 'Sua guild agora possui o bônus em experiência.') player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end return true end data/movements/movements.xml
    <movevent event="StepIn" actionid="33462" script="guildexp.lua" /> data/events/scripts/player.lua
    --[[ Atenção, procure a função Player:onGainExperience(source, exp, rawExp) Adicione o código abaixo antes do último return exp ]] local guild = self:getGuild() if guild and guild:getId() == guildExperienceBonus then exp = exp * 1.2 -- 20% bonus end  
  25. Curtir
    Agaka deu reputação a Vodkart em (Resolvido)Soft e Firewalker Boots.   
    para que usar 2 códigos se pode fazer somente 1?
     
    usa assim:
     
     
    nome do seu script.lua
    local ret = { [10021] = {id = 6132, price = 10000, effect = CONST_ME_FIREWORK_BLUE}, [10022] = {id = 9933, price = 20000, effect = CONST_ME_FIREWORK_RED} } function onUse(cid, item, fromPosition, itemEx, toPosition) local t = ret[item.itemid] if not t then return true elseif not doPlayerRemoveMoney(cid, t.price) then doPlayerSendCancel(cid, "You need "..t.price.." golds.") return true end local pos = getThingPos(cid) doSendMagicEffect(pos, t.effect) doTransformItem(item.uid, t.id) return true end  
    tag:
     
    <action itemid="10021;10022" event="script" value="nome do seu script.lua"/>  
    ----------------------
    OBS: não dá para ver o vídeo.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo