Ir para conteúdo
  • Cadastre-se

(Resolvido)Como mudar looktype de um player quando morrer {Help}


Ir para solução Resolvido por Rafael Mateus,

Posts Recomendados

Ola Galera do tk Queria ajuda a mudar o looktype de um player quando morrer. 

 

 

  • Ex : Eu so um naruto quando eu morrer quero a corpse do naruto tipo alguem sabe como eu coloco no meu otserv?.
  • tipo eu ja tendo as sprites do corpse do naruto e tal ai como eu colocaria pra um player e tal onde configuro isso?
 
 
  • Ex : <?xml version="1.0" encoding="UTF-8"?>
    <monster name="Madara" nameDescription="madara" race="blood" experience="45800" speed="950" manacost="0">
    <health now="17065000" max="17065000"/>
    <look type="244" head="0" body="94" legs="79" feet="79" corpse="0"/> -----//----- aqui em Corpse ta 0 aqui e de um monstro mas pra um player n sei muda 
 
     alguem sabe onde acho todas looktype e tal do meu ot tipo assim 
 
 
<list gender="0" lookType="192" name="Naruto"/> ------------ male
<list gender="1" lookType="192" name="Naruto"/>  ------- female alguem saberia no meu xml/outfits n tem nada la n sei como .. SSHSAHASHASH ... bugado sl alguem ajuda aeee.
 
 
 
 
 
 
+rep pra quem ajudar pls 
 

 


UP

Link para o post
Compartilhar em outros sites
  • Solução

Vai Em data/creaturescripts/scripts Cria Um Lua Com Nome niwdeath.lua

e coloca isso dentro:

 

local table = {
[1] = 2882, --- [1] Vocation 2882 == ID Do Corpse
[2] = 2882 

}

local function transform(pos, id, voc)
local item = getTileItemById(pos, id)
if item and item.uid > 1 then
doTransformItem(item.uid, table[voc])
doDecayItem(item.uid or 0)
end
end

function onDeath(cid, corpse)
if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end
addEvent(transform, 15, getThingPos(cid), corpse.itemid, getPlayerVocation(cid))
return true
end

 

Depois Vai Em Login.lua e Coloca Isso:

 

registerCreatureEvent(cid, "Niwdeath")

 

Depois Vai creaturescripts.xml e coloca Isso Dentro:

 

<event type="death" name="Niwdeath" event="script" value="niwdeath.lua"/>

Editado por Rafael Mateus (veja o histórico de edições)

 Naruto Kai

Click Na Imagem Abaixo

     naruto_kyuubi_by_meliss_d6es2ut.png

Link para o post
Compartilhar em outros sites

dai eu teria que coloca todas vocações ????


n deu certo UPPPP


ALGUEM AJUDA AI COLOCA AS SPRITES DOS CORPOS MORTOS PLSS 


N FUNFO MANO tipo coloquei asssim a script.

 

 

local table = {
[1] = 2930 --naruto
[2] = 2930 --naruto todos são naruto. e pq o naruto tem 12 transform.
[3] = 2930 
[4] = 2930 
[5] = 2930 
[6] = 2930 
[7] = 2930 
[8] = 2930 
[9] = 2930 
[10] = 2930 
[11] = 2930 
[12] = 2930 
[13] = 2806 
 
}
 
local function transform(pos, id, voc)
local item = getTileItemById(pos, id)
if item and item.uid > 1 then
doTransformItem(item.uid, table[voc])
doDecayItem(item.uid or 0)
end
end
 
function onDeath(cid, corpse)
if not isPlayer(cid) or not table[getPlayerVocation(cid)] then return true end
addEvent(transform, 15, getThingPos(cid), corpse.itemid, getPlayerVocation(cid))
return true
end
 
 
 
entao configurei 1-12 que sao os naruto id 2930 eo corpo do naruto morto . matei um char naruto fico o corpo de um humano n deu certo ajudaa 
Link para o post
Compartilhar em outros sites

voce tem que coloca virgula no final

[12] = 2930, --- assim
[13] = 2806 ---- a ultima voce n coloca ,
Editado por Rafael Mateus (veja o histórico de edições)

 Naruto Kai

Click Na Imagem Abaixo

     naruto_kyuubi_by_meliss_d6es2ut.png

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por New Narutibia
      Galera, estou precisando de uma ajuda, preciso de um script que cada vocação ao logar no OTServ pela primeira vez terá um determinado looktype.
      Ex: Loguei de naruto pela 1° vez e ele ja esta com o looktype de naruto, loguei de sasuke pela 1° vez e ele ja esta com looktype de sasuke, e assim por diante.
      Obrigado desde de já.
    • Por Vodkart
      Créditos: AnneMotta & Vodkart
      Descrição: Ao andar com o full addon de algumas outfits irá sair um efeito.
      Em creaturescript/script crie um arquivo.lua e renomeie para:
      outfiteffect.lua
        function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) local effect = { [136] = 3, [128] = 3, -- citizen [270] = 27,[273] = 27, -- jester [156] = 61,[152] = 61, -- assassin [147] = 44,[143] = 44, -- barbarian [148] = 45,[144] = 45, -- druid [157] = 68,[153] = 68, -- beggar [149] = 36,[145] = 36, -- wizard [279] = 17,[278] = 17, -- brotherwood [137] = 39,[129] = 39, -- hunter [141] = 66,[133] = 66, -- summoner [142] = 34,[134] = 34, -- warrior [155] = 31,[151] = 31, -- pirate [158] = 46,[154] = 46, -- shaman [288] = 6,[289] = 6 -- demonhunter } local o,c= effect[old.lookType],effect[current.lookType] if getPlayerAccess(cid) > 2 then return true elseif (not o or not c or old.lookAddons == 3 and o) then stopEvent(events[getPlayerGUID(cid)]) end if current.lookAddons == 3 and c then function WalkEffect(cid, c, pos) if not isCreature(cid) then return LUA_ERROR end if c then frompos = getThingPos(cid) if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then doSendMagicEffect(frompos, c) end events[getPlayerGUID(cid)] = addEvent(WalkEffect, 100, cid, c, frompos) end return true end WalkEffect(cid, c, {x=0, y=0, z=0}) end return true end em creaturescript.xml adicione as tags:
        <event type="login" name="EffectOutLogin" event="script" value="outfiteffect.lua"/> <event type="outfit" name="OutfitEffects" event="script" value="outfiteffect.lua"/> Como configurar:
      [iD DA OUTFIT] = N° DO EFEITO
    • Por Bruxo Ots
      Ola ,boa noite.
      Então estou tentando usar os novos look do 10.90 -.
      Porem quando tento mexer no script da esse erro.
      Mais so quando troco o script o script original funciona normal.
      esse é o script original que funciona até o look 595.
      function onSay(cid, words, param) local player = Player(cid) if not player:getGroup():getAccess() then return true end local lookType = tonumber(param) if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType <= 595 then local playerOutfit = player:getOutfit() playerOutfit.lookType = lookType player:setOutfit(playerOutfit) else player:sendCancelMessage("A look type with that id does not exist.") end return false end E esse oque estou tentando usar que da o erro.
      function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local lookType = tonumber(param) if not lookType then lookType = MonsterType(param) and MonsterType(param):getOutfit().lookType if not lookType then player:sendCancelMessage("A monster with that name does not exist.") return false end end if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType ~= 597 and lookType ~= 598 and lookType ~= 599 and lookType ~= 600 and lookType ~= 616 and lookType ~= 623 and lookType ~= 625 and lookType ~= 636 and lookType ~= 637 and lookType ~= 638 and lookType ~= 639 and lookType ~= 640 and lookType ~= 641 and lookType ~= 642 and lookType ~= 643 and lookType ~= 645 and lookType ~= 646 and lookType ~= 652 and lookType ~= 653 and lookType ~= 654 and lookType ~= 655 and lookType ~= 656 and lookType ~= 657 and lookType ~= 658 and lookType ~= 659 and lookType ~= 660 and lookType ~= 661 and lookType ~= 662 and lookType ~= 663 and lookType ~= 678 and lookType ~= 700 and lookType <= 701 then local playerOutfit = player:getOutfit() playerOutfit.lookType = lookType player:setOutfit(playerOutfit) else player:sendCancelMessage("A look type with that id does not exist.") end return false end Tenho que adicionar em mais algum lugar ,alguém poderia dar uma luz do que poderia ser.
       
       
    • Por mario0582
      Pessoal, tem 1 outft novo no tibia e uma montaria nova que foi adicionada no 10.77, mais não consigo achar os looktypes dele, dando /looktype só vai até o 699. Alguém sabe ??????
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo