Ir para conteúdo
  • 0

Como Colocar Esse Script Como Talkactions


TiagoBordin1988

Pergunta

function onUse(cid, item, frompos, item2, topos)

wall1 = {x=685, y=40, z=7, stackpos=1}

wall2 = {x=685, y=41, z=7, stackpos=1}

wall3 = {x=685, y=42, z=7, stackpos=1}

wall4 = {x=685, y=43, z=7, stackpos=1}

wall5 = {x=685, y=44, z=7, stackpos=1}

wall6 = {x=601, y=40, z=7, stackpos=1}

wall7 = {x=601, y=41, z=7, stackpos=1}

wall8 = {x=601, y=42, z=7, stackpos=1}

wall9 = {x=601, y=43, z=7, stackpos=1}

wall10 = {x=601, y=44, z=7, stackpos=1}

getwall1 = getThingfromPos(wall1)

getwall2 = getThingfromPos(wall2)

getwall3 = getThingfromPos(wall3)

getwall4 = getThingfromPos(wall4)

getwall5 = getThingfromPos(wall5)

getwall6 = getThingfromPos(wall6)

getwall7 = getThingfromPos(wall7)

getwall8 = getThingfromPos(wall8)

getwall9 = getThingfromPos(wall9)

getwall10 = getThingfromPos(wall10)

 

if item.uid == 7105 and item.itemid == 1945 then

doCreateItem(1304,1,wall1)

doCreateItem(1304,1,wall2)

doCreateItem(1304,1,wall3)

doCreateItem(1304,1,wall4)

doCreateItem(1304,1,wall5)

doCreateItem(1304,1,wall6)

doCreateItem(1304,1,wall7)

doCreateItem(1304,1,wall8)

doCreateItem(1304,1,wall9)

doCreateItem(1304,1,wall10)

doTransformItem(item.uid,item.itemid+1)

elseif item.uid == 7105 and item.itemid == 1946 then

doCreateItem(1304,1,wall1)

doCreateItem(1304,1,wall2)

doCreateItem(1304,1,wall3)

doCreateItem(1304,1,wall4)

doCreateItem(1304,1,wall5)

doCreateItem(1304,1,wall6)

doCreateItem(1304,1,wall7)

doCreateItem(1304,1,wall8)

doCreateItem(1304,1,wall9)

doCreateItem(1304,1,wall10)

doTransformItem(item.uid,item.itemid-1)

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

 

return true

end

 

Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

Como assim ?

poderia explicar melhor ?

 

so quer por como talkaction se for isso esta aki OBS : Se eu n fiz oq você quis poste ai que eu n entendi direito seu pedido

 

function onSay(cid, words, param)

wall1 = {x=685, y=40, z=7, stackpos=1}

wall2 = {x=685, y=41, z=7, stackpos=1}

wall3 = {x=685, y=42, z=7, stackpos=1}

wall4 = {x=685, y=43, z=7, stackpos=1}

wall5 = {x=685, y=44, z=7, stackpos=1}

wall6 = {x=601, y=40, z=7, stackpos=1}

wall7 = {x=601, y=41, z=7, stackpos=1}

wall8 = {x=601, y=42, z=7, stackpos=1}

wall9 = {x=601, y=43, z=7, stackpos=1}

wall10 = {x=601, y=44, z=7, stackpos=1}

getwall1 = getThingfromPos(wall1)

getwall2 = getThingfromPos(wall2)

getwall3 = getThingfromPos(wall3)

getwall4 = getThingfromPos(wall4)

getwall5 = getThingfromPos(wall5)

getwall6 = getThingfromPos(wall6)

getwall7 = getThingfromPos(wall7)

getwall8 = getThingfromPos(wall8)

getwall9 = getThingfromPos(wall9)

getwall10 = getThingfromPos(wall10)

 

if item.uid == 7105 and item.itemid == 1945 then

doCreateItem(1304,1,wall1)

doCreateItem(1304,1,wall2)

doCreateItem(1304,1,wall3)

doCreateItem(1304,1,wall4)

doCreateItem(1304,1,wall5)

doCreateItem(1304,1,wall6)

doCreateItem(1304,1,wall7)

doCreateItem(1304,1,wall8)

doCreateItem(1304,1,wall9)

doCreateItem(1304,1,wall10)

doTransformItem(item.uid,item.itemid+1)

elseif item.uid == 7105 and item.itemid == 1946 then

doCreateItem(1304,1,wall1)

doCreateItem(1304,1,wall2)

doCreateItem(1304,1,wall3)

doCreateItem(1304,1,wall4)

doCreateItem(1304,1,wall5)

doCreateItem(1304,1,wall6)

doCreateItem(1304,1,wall7)

doCreateItem(1304,1,wall8)

doCreateItem(1304,1,wall9)

doCreateItem(1304,1,wall10)

doTransformItem(item.uid,item.itemid-1)

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

 

return true

end

Link para o comentário
Compartilhar em outros sites

  • 0

Como assim ?

poderia explicar melhor ?

 

so quer por como talkaction se for isso esta aki OBS : Se eu n fiz oq você quis poste ai que eu n entendi direito seu pedido

 

function onSay(cid, words, param)

wall1 = {x=685, y=40, z=7, stackpos=1}

wall2 = {x=685, y=41, z=7, stackpos=1}

wall3 = {x=685, y=42, z=7, stackpos=1}

wall4 = {x=685, y=43, z=7, stackpos=1}

wall5 = {x=685, y=44, z=7, stackpos=1}

wall6 = {x=601, y=40, z=7, stackpos=1}

wall7 = {x=601, y=41, z=7, stackpos=1}

wall8 = {x=601, y=42, z=7, stackpos=1}

wall9 = {x=601, y=43, z=7, stackpos=1}

wall10 = {x=601, y=44, z=7, stackpos=1}

getwall1 = getThingfromPos(wall1)

getwall2 = getThingfromPos(wall2)

getwall3 = getThingfromPos(wall3)

getwall4 = getThingfromPos(wall4)

getwall5 = getThingfromPos(wall5)

getwall6 = getThingfromPos(wall6)

getwall7 = getThingfromPos(wall7)

getwall8 = getThingfromPos(wall8)

getwall9 = getThingfromPos(wall9)

getwall10 = getThingfromPos(wall10)

 

if item.uid == 7105 and item.itemid == 1945 then

doCreateItem(1304,1,wall1)

doCreateItem(1304,1,wall2)

doCreateItem(1304,1,wall3)

doCreateItem(1304,1,wall4)

doCreateItem(1304,1,wall5)

doCreateItem(1304,1,wall6)

doCreateItem(1304,1,wall7)

doCreateItem(1304,1,wall8)

doCreateItem(1304,1,wall9)

doCreateItem(1304,1,wall10)

doTransformItem(item.uid,item.itemid+1)

elseif item.uid == 7105 and item.itemid == 1946 then

doCreateItem(1304,1,wall1)

doCreateItem(1304,1,wall2)

doCreateItem(1304,1,wall3)

doCreateItem(1304,1,wall4)

doCreateItem(1304,1,wall5)

doCreateItem(1304,1,wall6)

doCreateItem(1304,1,wall7)

doCreateItem(1304,1,wall8)

doCreateItem(1304,1,wall9)

doCreateItem(1304,1,wall10)

doTransformItem(item.uid,item.itemid-1)

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

 

return true

end

 

Então irei explicar mais é este o sentido mesmo, pois o script que estou usando é em uma alavanca eu puxo ela e aparece as pedras nas coordenadas.....

Só que queria saber como fazer ao inves de usar em alavanca usar como comando Talkactions, tipo falar /pedra e as pedra aparecerem tendeu?

 

Então testei isso que tu falou acima e aparece este erro quando executo a Talkactions que no meu caso fiz /azul ...

talkerro.jpg

Link para o comentário
Compartilhar em outros sites

  • 0

Veja se funciona. Acabei de acordar.

 

local stones = {
{position = {x =685, y = 40, z = 7}, itemid = 1304},
{position = {x =685, y = 41, z = 7}, itemid = 1304},
{position = {x =685, y = 42, z = 7}, itemid = 1304},
{position = {x =685, y = 43, z = 7}, itemid = 1304},
{position = {x =685, y = 44, z = 7}, itemid = 1304},
{position = {x =601, y = 40, z = 7}, itemid = 1304},
{position = {x =601, y = 41, z = 7}, itemid = 1304},
{position = {x =601, y = 42, z = 7}, itemid = 1304},
{position = {x =601, y = 43, z = 7}, itemid = 1304},
{position = {x =601, y = 44, z = 7}, itemid = 1304}
}

function onSay(cid, words, param, channel)
for _, stone in ipairs(stones) do
	local item = getTileItemById(stone.position, stone.itemid)
	if item then
		doRemoveItem(item.uid, 1)
	end
	doCreateItem(stone.itemid, stone.position)
end
return true
end

Link para o comentário
Compartilhar em outros sites

  • 0

Veja se funciona. Acabei de acordar.

 

local stones = {
{position = {x =685, y = 40, z = 7}, itemid = 1304},
{position = {x =685, y = 41, z = 7}, itemid = 1304},
{position = {x =685, y = 42, z = 7}, itemid = 1304},
{position = {x =685, y = 43, z = 7}, itemid = 1304},
{position = {x =685, y = 44, z = 7}, itemid = 1304},
{position = {x =601, y = 40, z = 7}, itemid = 1304},
{position = {x =601, y = 41, z = 7}, itemid = 1304},
{position = {x =601, y = 42, z = 7}, itemid = 1304},
{position = {x =601, y = 43, z = 7}, itemid = 1304},
{position = {x =601, y = 44, z = 7}, itemid = 1304}
}

function onSay(cid, words, param, channel)
for _, stone in ipairs(stones) do
	local item = getTileItemById(stone.position, stone.itemid)
	if item then
		doRemoveItem(item.uid, 1)
	end
	doCreateItem(stone.itemid, stone.position)
end
return true
end

 

Vlws Rep+ Dúvida Tirada

 

OBS: Tirei esta parte pois queria so criar os items !!!

 

if item then

doRemoveItem(item.uid, 1)

end

 

Editado por TiagoBordin1988
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...