Ir para conteúdo
  • 0

Script Big Room


mister17

Pergunta

Fala galerinha  beleza?

Tfs 0.3.4

Pessoal preciso de 1 script que ao clicar em uma estatua  verifique se tenho 3 itens na bag e  então remova-os e teleporte o player a  um determinado  sqm com cooldown de 3 horas  para voltar a usar a estatua

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

6 respostass a esta questão

Posts Recomendados

  • 1
function onUse(cid, item, fromPosition, item2, toPosition)
	local teleport = {x=0, y=0, z=0} -- COORDENADAS
	local storage = 15205 -- STORAGE (VERIFIQUE ANTES PARA SABER SE NENHUM OUTRO SCRIPT USA O MESMO)
	local time = 3 -- TEMPO, AQUI ESTA CONFIGURADO PARA 3 HORAS.
	
	if getPlayerStorageValue(cid, storage) > os.time() then
		doPlayerSendCancel(cid, "You are exausted, wait "..(getPlayerStorageValue(cid, storage) - os.time()).." seconds.")
		return true
	end
	
	if getPlayerItemCount(cid, 2160) >= 75 and getPlayerItemCount(cid, 2160) >= 75 and getPlayerItemCount(cid, 2160) >= 75 then -- ID E QUANTIDADE, O SCRIPT VERICA AQUI ANTES
		doTeleportThing(cid, teleport)
		doSendMagicEffect(getPlayerPosition(cid), 10)
		---
		doPlayerRemoveItem(cid, 2160, 75) --- ID E QUANTIDADE
		doPlayerRemoveItem(cid, 2160, 75) --- ID E QUANTIDADE
		doPlayerRemoveItem(cid, 2160, 75) --- ID E QUANTIDADE
		---
		doPlayerSendTextMessage(cid, 22, "You entered a big room!")
		setPlayerStorageValue(cid, storage, os.time()+time*60*60)
	else
		doPlayerSendTextMessage(cid, 23, "Sorry, but you don't have the necessary items to enter this room.")
	end
end

Não cheguei a testar, mas creio que seja isso que você procura @mister17

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

  • 0
10 horas atrás, mister17 disse:

Fala galerinha  beleza?

Pessoal preciso de 1 script que ao clicar em uma estatua  verifique se tenho 3 itens na bag e  então remova-os e teleporte o player a  um determinado  sqm com cooldown de 3 horas  para voltar a usar a estatua

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local QuestItem = 1234
    local Estatua = 5678

    if target.uid == Estatua and Game.getStorageValue(xxx) < 1 then
    if player:removeItem(QuestItem, 1) then
        player:setStorageValue(123, 1)
        fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'hello nigga.')
        toPosition:sendMagicEffect(CONST_ME_TELEPORT)
        Game.setStorageValue(xxx, 1)
         end
    end
 
    return true
end
Editado por brazvct
Link para o comentário
Compartilhar em outros sites

  • 0
2 horas atrás, brazvct disse:

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local QuestItem = 1234
    local Estatua = 5678

    if target.uid == Estatua and Game.getStorageValue(xxx) < 1 then
    if player:removeItem(QuestItem, 1) then
        player:setStorageValue(123, 1)
        fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'hello nigga.')
        toPosition:sendMagicEffect(CONST_ME_TELEPORT)
        Game.setStorageValue(xxx, 1)
         end
    end
 
    return true
end

Lembrando que este sistema é para TFS 1.+, não ira funcionar nos derivados sem a devida atualização.

 

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

  • 0
52 minutos atrás, Henrique disse:

Lembrando que este sistema é para TFS 1.+, não ira funcionar nos derivados sem a devida atualização.

eu vi kkk fica pedindo algumas funções que não estão definidas

52 minutos atrás, Henrique disse:

 

 

3 horas atrás, brazvct disse:

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local QuestItem = 1234
    local Estatua = 5678

    if target.uid == Estatua and Game.getStorageValue(xxx) < 1 then
    if player:removeItem(QuestItem, 1) then
        player:setStorageValue(123, 1)
        fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'hello nigga.')
        toPosition:sendMagicEffect(CONST_ME_TELEPORT)
        Game.setStorageValue(xxx, 1)
         end
    end
 
    return true
end

ficou bom brother mas tem como configurar pra  tfs 0.3.4

Link para o comentário
Compartilhar em outros sites

  • 0
1 hora atrás, mister17 disse:

eu vi kkk fica pedindo algumas funções que não estão definidas

 

ficou bom brother mas tem como configurar pra  tfs 0.3.4

function onUse(cid, item, frompos, item2, topos)
playerpos = getPlayerPosition(cid) 
newpos = {x=XXX, y=YYY, z=Z} 

if item.uid == XXXX Then
getThingfromPos(playerpos)
doTeleportPlayer(cid, newpos)
end
end



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

×
×
  • Criar Novo...