FE

script actions outifts

Por felippe reine, 24 de ago. de 2020 em Scripts

10
2.4k
24 de agosto de 2020 às 21:10

ola uso servidor 8.6 tfs 1.3 alguem poderia me ajuda com um script de actions para outfts eu criei algumas montarias para o 8.6 ai queria que ao dar use em determinado item o player ganhasse a a outfit com addon 1 e 2 ja

no meu outfits xml

esta assim a looktype da montaria 

<outfit type="3" looktype="1339" name="spectral mount" premium="no" unlocked="no" enabled="yes" /

24 de agosto de 2020 às 22:45
1 hora atrás, felippe reine disse:
Versão do Servidor: TFS - 1.2
Tipo de Script: actions
Código:
  Mostrar conteúdo oculto


    

ola uso servidor 8.6 tfs 1.3 alguem poderia me ajuda com um script de actions para outfts eu criei algumas montarias para o 8.6 ai queria que ao dar use em determinado item o player ganhasse a a outfit com addon 1 e 2 ja

no meu outfits xml

esta assim a looktype da montaria 

<outfit type="3" looktype="1339" name="spectral mount" premium="no" unlocked="no" enabled="yes" /

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureOutfit(cid).lookType >= 1 then
           doSetCreatureOutfit(cid, {lookType = 1}, -1)
      end
return true
end
24 de agosto de 2020 às 23:51
1 hora atrás, brazvct disse:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureOutfit(cid).lookType >= 1 then
           doSetCreatureOutfit(cid, {lookType = 1}, -1)
      end
return true
end

amigao so iniciante ainda nessa area  nao consigo ainda fazer o script inteiro 

pra liberar essa outfit se puder me ajuda ficarei eternamente grato amigao 

<outfit type="3" looktype="1339" name="spectral mount" premium="no" unlocked="no" enabled="yes" /

@brazvct

25 de agosto de 2020 às 09:17
9 horas atrás, felippe reine disse:

amigao so iniciante ainda nessa area  nao consigo ainda fazer o script inteiro 

pra liberar essa outfit se puder me ajuda ficarei eternamente grato amigao 

<outfit type="3" looktype="1339" name="spectral mount" premium="no" unlocked="no" enabled="yes" /

@brazvct

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 848484848484 and (getPlayerStorageValue(cid, 8000) == EMPTY_STORAGE) then
        doPlayerAddOutfitId(cid, 36, 3)
        setPlayerStorageValue(cid, 8000, 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
        doPlayerSendTextMessage(cid,22,"Congratulations, you have received the Outfit!")
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid,"You have already received this outfit!.")
    end
end

 

36 = Id da Outfit

8000 = Storage desse item, se voce tiver a storage, vc nao ganha denovo a outfit

84848484848 = id do item

doRemoveItem(item.uid, 1) = vai remover o item ao usar

O script anterior vai trocar sua outfit

26 de agosto de 2020 às 00:27
15 horas atrás, brazvct disse:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 848484848484 and (getPlayerStorageValue(cid, 8000) == EMPTY_STORAGE) then
        doPlayerAddOutfitId(cid, 36, 3)
        setPlayerStorageValue(cid, 8000, 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
        doPlayerSendTextMessage(cid,22,"Congratulations, you have received the Outfit!")
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid,"You have already received this outfit!.")
    end
end

 

36 = Id da Outfit

8000 = Storage desse item, se voce tiver a storage, vc nao ganha denovo a outfit

84848484848 = id do item

doRemoveItem(item.uid, 1) = vai remover o item ao usar

O script anterior vai trocar sua outfit

@brazvct brother coloquei assim o script mas nao funcionou

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.itemid == 29417 and (getPlayerStorageValue(cid, 33330) == EMPTY_STORAGE) then
        doPlayerAddOutfitId(cid, 1339, 3)
        setPlayerStorageValue(cid, 33330, 1)
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
        doPlayerSendTextMessage(cid,22,"Congratulations, you have received the Outfit!")
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid,"You have already received this outfit!.")
    end
end 

26 de agosto de 2020 às 10:30

@felippe reine Eu mandei 2 scripts, um é pra te dar a outfit e outro pra trocar...

PoccnnP
26 de agosto de 2020 às 10:53
10 horas atrás, felippe reine disse:

EMPTY_STORAGE

 

21 minutos atrás, brazvct disse:

@felippe reine Eu mandei 2 scripts, um é pra te dar a outfit e outro pra trocar...

 

26 de agosto de 2020 às 22:26
11 horas atrás, Poccnn disse:

 

 

o script nao funcionou que pena 

PoccnnP
27 de agosto de 2020 às 08:07
Melhor resposta
9 horas atrás, felippe reine disse:

o script nao funcionou que pena 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not(canPlayerWearOutfit(cid,1339,3))then
		doPlayerAddOutfit(cid,1339,3)
		doPlayerAddMount(cid, 3)		
		doRemoveItem(item.uid, 1)
	end
	return true
end

 

27 de agosto de 2020 às 15:16
7 horas atrás, Poccnn disse:

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not(canPlayerWearOutfit(cid,1339,3))then
		doPlayerAddOutfit(cid,1339,3)
		doPlayerAddMount(cid, 3)		
		doRemoveItem(item.uid, 1)
	end
	return true
end

 

obrigado pode fechar o topico