Ir para conteúdo

leonvenigor

Campones
  • Total de itens

    32
  • Registro em

  • Última visita

Histórico de Reputação

  1. Upvote
    leonvenigor deu reputação a beddy em Vocation Por City Rep++   
    Olha, enquanto isso dai eu nao sei..
     
     
    Porem voce pode fazer o seguinte...
     
    Faz para os players nascerem sem VOCATION
    Cria uma sala inicial
    Nesta sala irá ter as CIDADES
    O player entra no portal de uma cidade
    Entao daí coloque um script no portal, para selecionar o TOWNid e o TEMPLE da cidade e mudar a vocation.
     
    Ou fassa assim: (se voce nao saber muito de script)
     
    Faz para os players nascerem sem VOCATION
    Cria uma sala inicial
    Nesta sala irá ter as CIDADES
    O player entra no portal de uma cidade
    Dai vai para outra sala, onde o player fala com um the oracle, apenas para confirmação, dai ele te manda para a city com o temple e townid dela.
  2. Upvote
    leonvenigor deu reputação a Lucaswc15 em Npc De Outfit (Rep+)   
    Voce quer receber outfit ou addon?
     
    Se for outfit voce precisa colocar uma storage no XML/outfits.xml
     
    Vou dar um exemplo com assassin outfit:
     

    <outfit id="14" quest="10023"> premium="yes"> <list gender="0" lookType="156" name="Assassin"/> <list gender="1" lookType="152" name="Assassin"/> </outfit>
     
    A storage é quest="10023">
    Entao voce tem que criar um npc que de essa storage, entao o player poderá usar a outfit.
     
    Vai em data/npc e crie um npc chamado Assassin Brother.xml e coloque isso dentro:

    <?xml version="1.0" encoding="UTF-8"?> <npc name="Assassin Brother" script="assassin.lua" floorchange="0" speed="460"> <health now="100" max="100"/> <look type="152" head="40" body="126" legs="114" feet="0" addons="2"/> </npc>
     
    Agora vá em npc/scripts e crie um arquivo chamado assassin.lua e coloque isso dentro:
     
     
     
     

    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'itens')) then selfSay('Me traga 5k que lhe fa\ço a {outfit}.', cid) elseif(msgcontains(msg, 'outfit')) then selfSay('Voc\ê me trouxe 5k para o assassin outfit?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerStorageValue(cid, 10023) == -1 then if(doPlayerRemoveMoney(cid, 5000) == true) then selfSay('Sua roupa esta pronta, pode vestir!', cid) setPlayerStorageValue(cid, 10023,1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem dinheiro.', cid) talkState[talkUser] = 0 end else selfSay('Voc\ê ja tem essa roupa.', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  3. Upvote
    leonvenigor deu reputação a jhon992 em [Resolvido] Npc Quest   
    @Subwat, reportado por flood. Não é a primeira vez que vejo tu floodando topicos dessa maneira para ganhar mais posts, sendo que qualquer um pode entender oque esse usuario quer, e mesmo depois do usuario explicar melhor você não atende seu pedido.
     
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    @leonvenigor, o script do npc vai ficar assim:

    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local itemNeed = { -- itens que precisa para completar a troca {itemid = 1234, quant = 10}, -- id do item, quantidade } local spellName = "Light" -- nome da spell que aprendera, os nomes das spells se encontrar no arquivo spells.xml local lvlNeed = 8 -- lvl necessario para fazer a quest. 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'trocar') then selfSay('Você deseja trocar '.. itemNeed[1].quant ..''.. getItemNameById(itemNeed[1].itemid) ..', pela spell' .. spellName ..'.', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if getPlayerLevel(cid) < lvlNeed then selfSay('Você não possui level necessario.', cid) return true end for i=1, #itemNeed do if getPlayerItemCount(cid, itemNeed[i].itemid) < itemNeed[i].quant then selfSay('Você não possui os item necessarios para troca.', cid) return true end end for i=1, #itemNeed do doPlayerRemoveItem(cid, itemNeed[i].itemid, itemNeed[i].quant) end doPlayerLearnInstantSpell(cid, spellName) selfSay('Você aprendeu a spell'.. spellName ..'.', cid) else selfSay('Você não deseja {trocar}?', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  4. Upvote
    leonvenigor deu reputação a Vodkart em (Pedido) Item por exhausted   
    local err = createCombatArea({ {0, 0, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 3, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 0, 0}}) function onUse(cid, item, frompos, item2, topos) --Script "Bomba" by Jedian local storage = 11148 -- não mexa aqui local exausted = 10 -- Tempo para player poder usar o item novamente! (tempo em segundos) if getPlayerStorageValue(cid, storage) >= os.time() then return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") elseif frompos.x == 65535 then return doPlayerSendCancel(cid, 'You cannot use it here.') end setPlayerStorageValue(cid, storage, os.time()+exausted) doRemoveItem(item.uid, 1) doSendMagicEffect(frompos, 32) local m = {[0] = 0, [1] = 5, [2] = 4, [3] = 3, [4] = 2, [5] = 1} for i, v in ipairs(m) do addEvent(doSendAnimatedText, (i - 1)*1000, frompos, v, 180) end addEvent(af, 5050, cid, item, frompos, item2, topos) return true end function af(cid, item, frompos, item2, topos) doSendAnimatedText(frompos, 'Caboom!', 180) doAreaCombatHealth(0, 8, frompos, err, -500, -1000, 8) end
     
     
     
    vai em spells.xml e onde estiver needlearn="0"
    vc coloca
     
    needlearn="1"
     
    needlearn="0" -- é se precisa aprender para usar , 0 no caso é false
    needlearn="1" -- se precisa aprender a magia para usar, 1 é true
  • Quem Está Navegando   0 membros estão online

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