XM
pedido

Preciso De Um Scripting Sobre Talck Actions, Que Remove Pedra

Por xmaster0, 18 de jul. de 2012 em Scripts

script
4
749
xmaster0X
18 de julho de 2012 às 23:45

Eu queria um script, quando eu falasse (apenas gm,god) /openmewtwo, uma pedra em tal lugar quebrasse, e quando eu falasse /closemewtwo a pedra retornasse, quem puder ajudar rep++

OneshotO
19 de julho de 2012 às 08:32
local position = {x = 180, y = 90, z = 7}
local stone = 1285

function onSay(cid, words, param, channel)
   local item = getTileItemById(position, stone)

   if(words == "/openmewtwo") then
       if(item.uid == 0) then
           doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "The Mewtwo's cave is already opened.")
           return true
       end

       doRemoveItem(item.uid)
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have opened the Mewtwo's cave.")
   elseif(words == "/closemewtwo") then
       if(item.uid > 0) then
           doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "The Mewtwo's cave is already closed.")
           return true
       end

       doCreateItem(stone, position)
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have closed the Mewtwo's cave.")
   end
   return true
end

xmaster0X
19 de julho de 2012 às 10:07

local position = {x = 180, y = 90, z = 7}
local stone = 1285

function onSay(cid, words, param, channel)
local item = getTileItemById(position, stone)

if(words == "/openmewtwo") then
	if(item.uid == 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "The Mewtwo's cave is already opened.")
		return true
	end

	doRemoveItem(item.uid)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have opened the Mewtwo's cave.")
elseif(words == "/closemewtwo") then
	if(item.uid > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "The Mewtwo's cave is already closed.")
		return true
	end

	doCreateItem(stone, position)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have closed the Mewtwo's cave.")
end
return true
end

 

mas eu colo isso onde. no talk action, ou no action?

LeoxtibiaL
19 de julho de 2012 às 10:13

Você pediu talkactions, foi o que ele fez, é lá que você deve colocar.