CR
pedido

Action [Simples]

Por craigmabbit, 16 de abr. de 2013 em Scripts

resolvido
9
933
16 de abril de 2013 às 09:09

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.

SlicerS
16 de abril de 2013 às 11:24

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"/>

16 de abril de 2013 às 13:20

mas no caso da 1, tem como por pra mudar a mask junto ?

RoksasR
16 de abril de 2013 às 13:24

Oque seria a mask?

SlicerS
16 de abril de 2013 às 13:31

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?

16 de abril de 2013 às 13:51

não funcionou, todas as voc ta a mesma outfit :x

SlicerS
16 de abril de 2013 às 14:43

hã... impossivel.. mostra ae como tu deixo o script.. ;x

16 de abril de 2013 às 16:34

@Slicer foi erro meu, esqueci de tiro o looktype

vlw, ja dei o REP

RoksasR
16 de abril de 2013 às 17:58

Tópico movido para a seção de dúvidas e pedidos resolvidos.