Ir para conteúdo

Featured Replies

Postado

Eae Galera Fmz? Seguinte queria um Script com essas sequintes coisas

1 > player precisa de x item na bp

2 > ao clicar em um item ele é teleportado 

3 > retira o item dele

4 > se ele tentar voltar ele pode entrar mesmo sem o x item

  • Respostas 5
  • Visualizações 780
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • thelifeofpbion
    thelifeofpbion

    function onUse(cid, item, fromPosition, item2, toPosition) local teleport = {x=169, y=414, z=7} -- Coordenadas para onde o player irá ser teleportado. local item_id = 5906 -- ID do item que o player

  • @pablobion consegue adicionar para nao teleportar se tiver com batle ou pk algo assim?

Postado
11 horas atrás, ZikaLord disse:

Eae Galera Fmz? Seguinte queria um Script com essas sequintes coisas

1 > player precisa de x item na bp

2 > ao clicar em um item ele é teleportado 

3 > retira o item dele

4 > se ele tentar voltar ele pode entrar mesmo sem o x item




 

function onUse(cid, item, fromPosition, item2, toPosition)

local teleport = {x=169, y=414, z=7} -- Coordenadas para onde o player irá ser teleportado.
local item_id = 5906 -- ID do item que o player precisa para ser teleportado.
local qtd = 100 -- quantidade

if isPlayer(cid) == true and getPlayerStorageValue(cid, 33423) == 1 then
doTeleportThing(cid, teleport)
 doSendMagicEffect(getPlayerPosition(cid), 44)
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce foi teleportado!")
else



if getPlayerItemCount(cid,item_id) >= qtd then
        doTeleportThing(cid, teleport)
        doSendMagicEffect(getPlayerPosition(cid), 44)
        doPlayerRemoveItem(cid, item_id, qtd)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce foi teletransportado por 300 "..getItemNameById(item_id).."!")
		setPlayerStorageValue(cid,33423,1)
      else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce precisa ter 300 "..getItemNameById(item_id).." para usar o magic teleport!")
		
		
      end
end

end

 

Postado
  • Autor
7 horas atrás, pablobion disse:




 


function onUse(cid, item, fromPosition, item2, toPosition)

local teleport = {x=169, y=414, z=7} -- Coordenadas para onde o player irá ser teleportado.
local item_id = 5906 -- ID do item que o player precisa para ser teleportado.
local qtd = 100 -- quantidade

if isPlayer(cid) == true and getPlayerStorageValue(cid, 33423) == 1 then
doTeleportThing(cid, teleport)
 doSendMagicEffect(getPlayerPosition(cid), 44)
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce foi teleportado!")
else



if getPlayerItemCount(cid,item_id) >= qtd then
        doTeleportThing(cid, teleport)
        doSendMagicEffect(getPlayerPosition(cid), 44)
        doPlayerRemoveItem(cid, item_id, qtd)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce foi teletransportado por 300 "..getItemNameById(item_id).."!")
		setPlayerStorageValue(cid,33423,1)
      else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce precisa ter 300 "..getItemNameById(item_id).." para usar o magic teleport!")
		
		
      end
end

end

 

foda mano vlw!!!!

  • 3 weeks later...
Postado
Em 04/08/2017 em 16:14, robi123 disse:

@pablobion consegue adicionar para nao teleportar se tiver com batle ou pk algo assim?

 

foi mal só vi hoje...

olha da pra fazer um if antes de teleportar 

ai ele verifica se tiver tal skull


 if getCreatureSkullType(cid) <= 3 then

 

 

algo do tipo

obs: não testei.

 

Spoiler

function onUse(cid, item, fromPosition, item2, toPosition)

local teleport = {x=169, y=414, z=7} -- Coordenadas para onde o player irá ser teleportado.
local item_id = 5906 -- ID do item que o player precisa para ser teleportado.
local qtd = 100 -- quantidade

if isPlayer(cid) == true and getPlayerStorageValue(cid, 33423) == 1 then
      if getCreatureSkullType(cid) <= 3 then
doTeleportThing(cid, teleport)
 doSendMagicEffect(getPlayerPosition(cid), 44)
 doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce foi teleportado!")
     else
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce esta com skull!")
   doSendMagicEffect(getPlayerPosition(cid), 3)
      
		
else



if getPlayerItemCount(cid,item_id) >= qtd then
        doTeleportThing(cid, teleport)
        doSendMagicEffect(getPlayerPosition(cid), 44)
        doPlayerRemoveItem(cid, item_id, qtd)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce foi teletransportado por 300 "..getItemNameById(item_id).."!")
		setPlayerStorageValue(cid,33423,1)
      else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,"Voce precisa ter 300 "..getItemNameById(item_id).." para usar o magic teleport!")
		
		
      end
end

end

 

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo