Ir para conteúdo
  • 0

Action [Simples]


craigmabbit

Pergunta

bom são 2 actions simples; são dois itens

 

1 - você usa um item , e a action checa a voc e muda a outfit por ex:

 

vocation [1] = outfit 1

vocation [2] = outfit 2 e por ai vai

 

2 - você usa o item e ela remove todas as conditions.

Link para o comentário
Compartilhar em outros sites

8 respostass a esta questão

Posts Recomendados

  • 0

1*

 

local vocs = {
[1] = {lookType = 122},
[2] = {lookType = 155},
}
function onUse(cid, item, frompos, item2, topos)
if vocs[getPlayerVocation(cid)] then
  doSetCreatureOutfit(cid, vocs[getPlayerVocation(cid)], -1)
else
  doPlayerSendTextMessage(cid, 27, "You haven't the right vocation!")
end
return true
end

 

 

<action itemid="xxxx" event="script" value="yyyy.lua"/>

 

2*

 

local allConds = {
CONDITION_POISON,
CONDITION_FIRE,
CONDITION_ENERGY,
CONDITION_PHYSICAL,
CONDITION_HASTE,
CONDITION_PARALYZE,
CONDITION_OUTFIT,
CONDITION_INVISIBLE,
CONDITION_LIGHT,
CONDITION_MANASHIELD,
CONDITION_INFIGHT,
CONDITION_DRUNK,
CONDITION_EXHAUST,
CONDITION_FOOD,
CONDITION_REGENERATION,
CONDITION_SOUL,
CONDITION_DROWN,
CONDITION_MUTED,
CONDITION_ATTRIBUTES,
CONDITION_FREEZING,
CONDITION_DAZZLED,
CONDITION_CURSED,
CONDITION_PACIFIED,
CONDITION_GAMEMASTER,
CONDITION_HUNTING,
CONDITION_MISS,
}
function onUse(cid, item, frompos, item2, topos)
  for i = 1, #allConds do
   doRemoveCondition(cid, allConds[i])
  end
  doSendMagicEffect(getPlayerPosition(cid), 21)
return true
end

 

 

<action itemid="xxxx" event="script" value="yyyy.lua"/>

Link para o comentário
Compartilhar em outros sites

  • 0

assim?

 

local vocs = {
[1] = 122,
[2] = 155,
}
function onUse(cid, item, frompos, item2, topos)
local outfit = getCreatureOutfit(cid)
if vocs[getPlayerVocation(cid)] then
  outfit.lookType = vocs[getPlayerVocation(cid)]
  doSetCreatureOutfit(cid, outfit, -1)
else
  doPlayerSendTextMessage(cid, 27, "You haven't the right vocation!")
end
return true
end

 

 

ou tu diz, tu escolher a cor da outfit?

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...