Ir para conteúdo

Conde Sapo

Visconde
  • Total de itens

    322
  • Registro em

  • Última visita

Posts postados por Conde Sapo

  1. -_- Essa action é o Hunter, reportado.

     

     

    Voce tem 4 posts aquii neste forum

    os 4 você acusa alguém de ripper

     

    e esse HUNTER quem é ???

    olhei os membros só achei HUNTER que tem um único post

    e não é TOPICO

     

    mostra o LINK desse suposto topico que eu copiei PLX

     

     

    :XTibia_smile:

  2. Pra ficar melhor, bom, eu nao sei, nao sei como é no global,
    no global é exatamente assim.

    eu não inventei nada

     

     

    pq vc não coloca aquelas surprise bags no lugar de só bags,
    é facil

     

    Basta trocar estas linhas

    bag = doPlayerAddItem(cid, 1997, 1) <-- amarela

    bag = doPlayerAddItem(cid, 1996, 1) <--- cinza

    bag = doPlayerAddItem(cid, 1994, 1) <--- lilas

    substitua pelo ID das suprise-bags

     

     

    :XTibia_smile:

  3. Exclusivo para XTibia

    favor não postar em outro forum

     

    Tive algumas barreiras.

    Alguns outfits eu não tenho no meu Evolutions

     

    data\npc\Stan.xml

    local focus = 0
    local talk_start = 0
    local talk_state = 0
    local target = 0
    local following = false
    local attacking = false
    
    function onThingMove(creature, thing, oldpos, oldstackpos)
    end
    
    function onCreatureAppear(creature)
    end
    
    function onCreatureDisappear(cid, pos)
    if focus == cid then
    	selfSay('Good bye then.')
    	focus = 0
    	talk_start = 0
    end
    end
    
    function onCreatureTurn(creature)
    end
    
    function msgcontains(txt, str)
    return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
    end
    
    function onCreatureSay(cid, type, msg)
    msg = string.lower(msg)
    
    if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
    	selfSay('Hello ' .. creatureGetName(cid) .. '! I sell masquerade costumes.')
    	focus = cid
    	talk_start = os.clock()
    
    elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
    	selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
    
    elseif focus == cid then
    	talk_start = os.clock()
    
    	if msgcontains(msg, 'deluxe costume') then
    		selfSay('Do you want to buy deluxe costume for 1500 gps?')
    		talk_state = 1
    
    	elseif msgcontains(msg, 'uncommon costume') then
    		selfSay('Do you want to buy uncommon costume for 1000 gps?')
    		talk_state = 2
    
    	elseif msgcontains(msg, 'common costume') then
    		selfSay('Do you want to buy common costume for 500 gps?')
    		talk_state = 3
    
    	elseif msg == 'costume' or msg == 'costumes' then
    		selfSay('I sell Deluxe Costume (1500gps), Uncommon Costume (1000 gps) and Commom Costume (500 gps)')
    		selfSay('I sell also Party Hats (600gps) and Party Trumpets (80 gps)')
    		talk_start = os.clock()
    
    	elseif msgcontains(msg, 'party hat') then
    		selfSay('Do you want to buy party hat for 600 gps?')
    		talk_state = 4
    
    	elseif msgcontains(msg, 'party trumpet') then
    		selfSay('Do you want to buy party trumpet for 80 gps?')
    		talk_state = 5
    
    	elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
    		selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
    		focus = 0
    		talk_start = 0
    		talk_state = 0
    
    	elseif msgcontains(msg, 'yes') and talk_state == 1 then
    		if doPlayerRemoveMoney(cid,1500) == TRUE then
    			bag = doPlayerAddItem(cid, 1997, 1)
    			doSetItemActionId(bag,3001)
    			talk_state = 0
    			talk_start = os.clock()
    		else
    			selfSay('Sorry, you don\'t have money.')
    		end
    		talk_state = 0
    
    	elseif msgcontains(msg, 'yes') and talk_state == 2 then
    		if doPlayerRemoveMoney(cid,1000) == TRUE then
    			bag = doPlayerAddItem(cid, 1996, 1)
    			doSetItemActionId(bag,3002)
    			talk_start = os.clock()
    		else
    			selfSay('Sorry, you don\'t have money.')
    		end
    		talk_state = 0
    
    	elseif msgcontains(msg, 'yes') and talk_state == 3 then
    		if doPlayerRemoveMoney(cid,500) == TRUE then
    			bag = doPlayerAddItem(cid, 1994, 1)
    			doSetItemActionId(bag,3003)
    			talk_start = os.clock()
    		else
    			selfSay('Sorry, you don\'t have money.')
    		end
    		talk_state = 0
    
    	elseif msgcontains(msg, 'yes') and talk_state == 4 then
    		buy(cid,6578,1,600)
    		talk_start = os.clock()
    		talk_state = 0
    
    	elseif msgcontains(msg, 'yes') and talk_state == 5 then
    		buy(cid,6572,1,80)
    		talk_start = os.clock()
    		talk_state = 0
    	end
    end
    end
    
    function onCreatureChangeOutfit(creature)
    end
    
    function onThink()
    doNpcSetCreatureFocus(focus)
    if (os.clock() - talk_start) > 30 then
    	if focus > 0 then
    		selfSay('Next Please...')
    	end
    	focus = 0
    end
    if focus ~= 0 then
    	if getDistanceToCreature(focus) > 5 then
    		selfSay('Good bye then.')
    		focus = 0
    	end
    end
    end

     

     

    Agora vem a AÇÂO de clicar na bag

     

    data\actions\actions.xml

    --  Bag de Carnaval - by Conde Sapo
    
    function onUse(cid, item, frompos)
    if frompos.x == 65535 then
    	--  tah na BP
    	if item.actionid == 3001 then
    		-- Deluxe
    		rand = math.random(1,5)
    		if rand == 1 then
    			outfit = {lookType = 220}  -- Serpent Spawn
    		elseif rand == 2 then
    			outfit = {lookType = 201}  -- Demon
    		elseif rand == 3 then
    			outfit = {lookType = 244}  -- Juggernaut
    		elseif rand == 4 then
    			outfit = {lookType = 55}   -- Behemoth
    		elseif rand == 5 then
    			outfit = {lookType = 91}   -- Rahemos  (Abrigado Claudioo pelo número do LookType)
    		end
    
    	elseif item.actionid == 3002 then
    		-- UnCommon
    		rand = math.random(1,5)
    		if rand == 1 then
    			outfit = {lookType = 47}   -- Quara Hydromancer
    		elseif rand == 2 then
    			outfit = {lookType = 237}  -- Diabolic Imp
    		elseif rand == 3 then
    			outfit = {lookType = 78}   -- Banshee
    		elseif rand == 4 then
    			outfit = {lookType = 257}  -- Frost Giant  (Abrigado Claudioo pelo número do LookType)
    		elseif rand == 5 then
    			outfit = {lookType = 99}   -- Lich
    		end
    
    	elseif item.actionid == 3003 then
    		-- Common
    		rand = math.random(1,5)
    		if rand == 1 then
    			outfit = {lookType = 7}    -- Orc Warrior
    		elseif rand == 2 then
    			outfit = {lookType = 96}   -- Pirate Cutthroat
    		elseif rand == 3 then
    			outfit = {lookType = 214}  -- Dworc Voodoomaster
    		elseif rand == 4 then
    			outfit = {lookType = 70}   -- Dwarf Guard
    		elseif rand == 5 then
    			outfit = {lookType = 23}   -- Minotaur Mage
    		end
    	end
    	if doPlayerRemoveItem(cid,item.itemid,1) == TRUE then
    		doPlayerSay(cid,"I\'m bad!",16)
    	end
    
    	doSetCreatureOutfit(cid, outfit, 600000 )
    	doSendMagicEffect(frompos,12)
    else
    	doPlayerSendCancel(cid,"Carry with you first!")
    end
    return 1
    end

     

     

    Agradecimentos

     

    outfit = {lookType = 91} -- Rahemos
    outfit = {lookType = 257} -- Frost Giant

    Claudioo

    pelos códigos dos LookType

     

    Eu não inventei nada

    Isso vem do Tibia Global

    Divirtam-se com as fantasias de Carnaval

    :XTibia_smile:

  4. Ideia muito boa mas a parte de scripts tá HORRORIVEL

    (isso é um trocadilho.... HORROROSO com HORRIVEL)

    o mininu só esqueceu do H

     

     

    Voce testou os scripts? :)

    Me pare ce que voce é novo nesse pedaço, vamos dar uma ajudinha.

    Primeiro, voce não precisa verificar se o item vai ser removido

    Segundo, voce pode fazer todos os scripts em um só

    aplauso.gif

    Isso melhorou 200% este tópico

     

    Nada como um BOM scripter expor seu conhecimento.

     

     

    :XTibia_smile:

  5. Não achou Player para a transferencia :

    xid = getPlayerByName(msg)

    Precisa ver se seu OT da suporte a esse comando

     

    function getCount(msg)
    b, e = string.find(msg, "%d+")
    
    if b == nil or e == nil then
    	count = 1
    else
    	count = tonumber(string.sub(msg, b, e))
    end
    if count > 100000 then   [color="#FF0000"]<-----------------[/color]
    	count = 100000
    elseif count == 0 then
    	count = 1
    end
    return count
    end

    o NPC permite retirada maxima de 10000

     

    Pra mudar isso fica assim :

    function getCount(msg)
    b, e = string.find(msg, "%d+")
    
    if b == nil or e == nil then
    	count = 1
    else
    	count = tonumber(string.sub(msg, b, e))
    end
    if count == 0 then
    	count = 1
    end
    return count
    end

     

    --------------------------------------------------------------------------------------------------------------

    AFF VEI FIZ TUDO CERTIM MAIS O NPC NAO EXISTE AKI,,, NAO DA DE CRIAR ELE NAO!HELP PLX
    o NPC ta funcionando.

    Como colocar o NPC no server não é comigo.

    Encontre algum cooperador disposto a ensina-lo.

     

     

    :XTibia_smile:

  6. Deve ser legal,mas da pra matar?
    Não

    Ela é só uma planta que enche o saco

    Não é bicho (não tem respaw)

     

    Muito bom conde, vou usar no meu server. No tibia rl ela deicha envenenado se não me engano.
    Desculpa meu amiguinho.

    Você está enganado sim.

    Essa planta só morde... Não deixa poison.

     

    mas se você quizer POISON basta incluir estas linhas

    local veneno = createConditionObject(CONDITION_POISON )
    addDamageCondition(veneno, 5, 1000, -50)
    addDamageCondition(veneno, 4, 1000, -40)
    addDamageCondition(veneno, 3, 1000, -30)
    addDamageCondition(veneno, 2, 1000, -20)
    addDamageCondition(veneno, 1, 1000, -10)
    
    doTargetCombatCondition(0, cid, veneno, CONST_ME_NONE)

     

    Explicando :

    addDamageCondition(NOME, QTD, TEMPO, DANO)

    NOME - nome da ação

    QTD - Quantidade de ações

    TEMPO - Tempo entre uma ação e outra (1000 = 1 seg)

    DANO - Dano da ação (Valor positivo adiciona vida)

     

    Neste exemplo :

    addDamageCondition(veneno, 3, 3000, -70)

    addDamageCondition(veneno, 4, 2000, -90)

    vai tirar 3 danos de 70 a cada 3 segundos

    depois vai tirar 4 dados de 90 a cada 2 segundos

    e vai tirando enquanto tiver linhas de addDamageCondition

     

     

    :XTibia_smile:

  7. desculpa mas ja existe um ot com ele é o lelo v4
    Se você tivesse lido o topico inteiro saberia que já isso já foi informado por @linkay

     

    Quem não tem esse OT não sabia desse monstro

    Agora todos vão ter o coelhinho safado porque eu fiz o meu

     

    o nome dele no global é Halloween Hare (e não lelo v4)

    e garanto que o seu não vem com as trasnformações deste ultimo UpDate

     

     

    :XTibia_smile:

  8. Exclusivo para XTibia

    favor não postar em outro forum

    ------------------------------------------------------------------------------------------------------------------------------------

     

    Pra quem não conhece a Jungle Maw

    Jungle_Maw.gif

    (agradecimentos a TibiaWiki pela imagem)

     

    Simples e facil de fazer

     

    1° - items.xml

    O Item 4209 em muitos OTs é só ITEM (não alterar o item 4208)

    Precisamos especificar que agora é a Planta Que Morde

    <item id="4209" name="jungle maw">
    <attribute key="decayTo" value="4208"/>
    <attribute key="duration" value="30"/>
    </item>

    Vai ficar assim agora

    Esta é a imagem da planta "fechada"

     

    DecayTo 4208 (volta a ser a planta "aberta")

    Duration 30 após 30 segundos (alterar a gosto)

     

    Pisando no item 4208 ele se transforma no item 4209

    Após 30 segundos volta a ser 4208

    (nada acontece se pisar no item 4209)

     

     

    2° - movements.xml

    Especificando a ação de PISAR e JOGAR OBJETO

    -- Jungle Maw
    <movevent event="AddItem" tileitem="1" itemid="4208" script="JungleMaw.lua"/> -- Etapa final
    <movevent event="StepIn" itemid="4208" script="JungleMaw.lua"/>

    Colocar estas linhas em qualquer lugar do arquivo

     

    onStepIn é a ação de pisar no item

    onAddItem é a ação de jogar algo no item

     

     

    3° - JungleMaw.lua

    -- Planta q morde - By Conde Sapo
    
    function onStepIn(cid, item, pos)
    if isPlayer(cid) == 1 then
    	-- Passou Player
    	doSendMagicEffect(pos, 0)
    elseif isCreature(cid) == 1 then
    	-- Passou Bicho
    	doSendMagicEffect(pos, 3)
    end
    doPlayerAddHealth(cid, -30)
    doTransformItem(item.uid,4209)
    doDecayItem(item.uid)
    return 1
    end
    
    function onAddItem(moveitem, tileitem, pos)
    -- Objeto jogado
    doSendMagicEffect(pos, 2)
    doTransformItem(tileitem.uid,4209)
    doDecayItem(tileitem.uid)
    return 1
    end

     

    Explicando o script

     

    Quando pisa na planta (player ou bicho) vai tirar 30 de vida

    doPlayerAddHealth(cid, -30)

    (alterar a gosto)

     

    Se jogar um objeto na planta , só vai "fechar" a bocona dele

     

    após 30 segundos volta a ser a planta com a boca aberta

    seja player, bicho ou objeto que passou por cima

    os effects são diferentes pra cada caso

     

    Aconselho não por NPC perto da planta

    vai gerar erro se o NPC passar por cima

     

    Acho que não esqueci nada

    Divirtam-se com a Planta Gulosa Jurassica Carnivora Dentuça Mordedora Pantaneira

     

    :XTibia_smile:

  9. tem um erro no script

     

    quando vc fala pedra empata, tesoura vc perde, papel vc ganha

     

    fica sempre nisso.

    Meu amigo Nostra cometeu um erro sutil

    o RAND não tá sendo atualizado

     

    local npc_random = math.random(1, 3)

    Esta linha aqui bem no começo do script

     

    Pra acertar é facil...

    esta linha

    				if doPlayerRemoveMoney(cid, price_to_play) == 1 then

    ela aparece 3 vezes no script

     

    basta substituir por isto

    				if doPlayerRemoveMoney(cid, price_to_play) == 1 then
    					npc_random = math.random(1, 3)

    Nos 3 lugares

    Com isso o RAND é atualizado cada vez que o player fala uma das palavras do jogo.

     

     

    Parabundas pela ideia Nostra

    :hi:

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...