AD
pedido

[movements] Editar Script De Mensagem e guild em tile

Por AdilsonHacker, 30 de jan. de 2014 em Scripts

editar script
resolvido
script
13
1.8k
AdilsonHackerA
30 de janeiro de 2014 às 19:00

Olá galera.. boa tarde. bom preciso da ajuda de vocês para editar um script pra mim.. ele é o seguinte o player só pode passar nele se tiver guild e level 25 e aparecer a mensagem para todos verem em vermelho tenho a basica dele aqui mais não ta funcionando , preciso que ele só fale a mensagem quando ele entrar pra invadir o castle ao sair não aparecer nada...

 

tipow assim , essa é a foto de um cara invadindo o castle :

EJ1AZ0.png

 

 

Script :

function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) then return true end
    local article = getPlayerSex(cid) == 0 and "A" or "O"
    if getPlayerGuildId(cid) > 0 then
        broadcastMessage(article.."O jogador"..article:lower().." "..getCreatureName(cid).." da guild "..getPlayerGuildName(cid).." esta invadindo o castelo, avisar aos donos atuais.")
    end
    return true
end

@up

Editado Janeiro 30 por AdilsonTsunami

HelflinH
30 de janeiro de 2014 às 23:41

Em scripts/castle.lua

function onStepIn(cid, item, position, fromPosition)
 
time_exauted = 120 -- em segundos
local storage = 11679 -- n mexa
 
if (getPlayerStorageValue(cid, storage) <= os.time()) then
doBroadcastMessage("O Jogador ".. getCreatureName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o Castelo. Aviso aos donos atuais, corram para protegê-lo!", 21)
setPlayerStorageValue(cid, storage, os.time()+time_exauted)
end
return TRUE
end

Em movements.xml

    <!--Castle 24H-->
    <movevent type="StepIn" actionid="65535" event="script" value="castle.lua"/>

Agora é só ir no tile pelo mapa editor, e por AID 65535.

AdilsonHackerA
31 de janeiro de 2014 às 13:18

Cara primeiramente muito obrigado por me ajudar, funcionou direitin mais você esqueceu de algo que pedi acima..
A parte de ele so passar pelo tile so se tiver guild caso nao tenha apareca a msg pra ele dizendo que precisa de guild , e de só passar level 50+.
Arruma ai.. esperando. Curtido!

 

@edit

 

Ocorreu um erro

Você já atingiu seu limite de reputações positivas para hoje

 

Quando puder eu dou seu rep+ ok!

Editado Janeiro 31 por AdilsonTsunami

HelflinH
31 de janeiro de 2014 às 13:55
function onStepIn(cid, item, position, fromPosition)
 
time_exauted = 120 -- em segundos
local storage = 11679 -- n mexa

level = 50
local t = {x=1000,y=1000,z=7}


if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doPlayerSendCancel(cid,"You Need level " .. level .. " or more this pass.")
end
return TRUE
end


if not(getPlayerGuildId(cid)) then 

doTeleportThing(cid,t) 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only players with guilds.") 

end 

return true
end 


if (getPlayerStorageValue(cid, storage) <= os.time()) then
doBroadcastMessage("O Jogador ".. getCreatureName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o Castelo. Aviso aos donos atuais, corram para protegê-lo!", 21)
setPlayerStorageValue(cid, storage, os.time()+time_exauted)
end
return TRUE
end

Ve se essa joça funciona ai kkkkkkkkkkkk nem eu sei oque eu fiz mano kkk

AdilsonHackerA
31 de janeiro de 2014 às 14:15
function onStepIn(cid, item, position, fromPosition)
 
time_exauted = 120 -- em segundos
local storage = 11679 -- n mexa

level = 50
local t = {x=1000,y=1000,z=7}


if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doPlayerSendCancel(cid,"You Need level " .. level .. " or more this pass.")
end
return TRUE
end


if not(getPlayerGuildId(cid)) then 

doTeleportThing(cid,t) 

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only players with guilds.") 

end 

return true
end 


if (getPlayerStorageValue(cid, storage) <= os.time()) then
doBroadcastMessage("O Jogador ".. getCreatureName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o Castelo. Aviso aos donos atuais, corram para protegê-lo!", 21)
setPlayerStorageValue(cid, storage, os.time()+time_exauted)
end
return TRUE
end

Ve se essa joça funciona ai kkkkkkkkkkkk nem eu sei oque eu fiz mano kkk

 

 

Não funfo não maninho, deu erro !

HelflinH
31 de janeiro de 2014 às 14:20

Eu já esperava, fui embolando umas coisas que achei na net.. kkk nem sei fazer isso aí não...

 

Depois deve aparecer alguem pra te ajudar..

 

Fui.

AdilsonHackerA
31 de janeiro de 2014 às 14:21

Mesmo assim obrigadl pela sua ajuda.. ajudou muito.. depois te dou o rep!

Editado Janeiro 31 por AdilsonTsunami

KilluaK
31 de janeiro de 2014 às 14:28



function onStepIn(cid, item, position, fromPosition)

 

local time_exauted = 120 -- em segundos

local storage = 11679 -- n mexa

local level = 50

local t = {x=1000,y=1000,z=7}

 

if getPlayerLevel(cid) < level then

doTeleportThing(cid, fromPosition, true)

doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)

doPlayerSendCancel(cid,"You Need level " .. level .. " or more to pass.")

return true

end

 

 

if getPlayerGuildId(cid) == false or getPlayerGuildId(cid) == nil or not getPlayerGuildId(cid) then

doTeleportThing(cid, t)

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only players with guilds.")

return true

end

 

 

if getPlayerStorageValue(cid, storage) <= os.time() then

doBroadcastMessage("O Jogador ".. getCreatureName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o Castelo. Aviso aos donos atuais, corram para protegê-lo!", 21)

setPlayerStorageValue(cid, storage, os.time()+time_exauted)

end

return true

end

AdilsonHackerA
31 de janeiro de 2014 às 15:20

function onStepIn(cid, item, position, fromPosition)
 
    local time_exauted = 120 -- em segundos
    local storage = 11679 -- n mexa
    local level = 50
    local t = {x=1000,y=1000,z=7}

    if getPlayerLevel(cid) < level then
        doTeleportThing(cid, fromPosition, true)
        doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
        doPlayerSendCancel(cid,"You Need level " .. level .. " or more to pass.")
        return true
    end


    if getPlayerGuildId(cid) == false or getPlayerGuildId(cid) == nil or not getPlayerGuildId(cid) then 
        doTeleportThing(cid, t) 
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only players with guilds.") 
        return true
    end 


    if getPlayerStorageValue(cid, storage) <= os.time() then
        doBroadcastMessage("O Jogador ".. getCreatureName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o Castelo. Aviso aos donos atuais, corram para protegê-lo!", 21)
        setPlayerStorageValue(cid, storage, os.time()+time_exauted)
    end
    return true
end

 

Ei manim funfo tudo normal, não deu nen um erro no tfs porém so falta ele so poder passa com guild ! so isso mesmo que falta !

KilluaK
31 de janeiro de 2014 às 15:52



function onStepIn(cid, item, position, fromPosition)

 

local time_exauted = 120 -- em segundos

local storage = 11679 -- n mexa

local level = 50

local t = {x=1000,y=1000,z=7}

 

if not isPlayer(cid) then return true end

 

if getPlayerGuildId(cid) == nil or getPlayerGuildId(cid) <= 0 or getPlayerGuildId(cid) == false then

doPlayerSendCancel(cid, "Voce precisa ter uma guild para invadir o castelo!")

doTeleportThing(cid, t)

return false

end

 

if getPlayerLevel(cid) < level then

doTeleportThing(cid, fromPosition, true)

doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)

doPlayerSendCancel(cid,"You Need level " .. level .. " or more to pass.")

return true

end

 

if getPlayerStorageValue(cid, storage) <= os.time() then

doBroadcastMessage("O Jogador ".. getCreatureName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o Castelo. Aviso aos donos atuais, corram para protegê-lo!", 21)

setPlayerStorageValue(cid, storage, os.time()+time_exauted)

end

return true

end

AdilsonHackerA
31 de janeiro de 2014 às 16:10

Obrigado Mano deu certin aqui!

Duvida sanada!

KilluaK
31 de janeiro de 2014 às 16:11

Tópico movido para a seção de dúvidas e pedidos resolvidos.

3 meses depois...
DuhisbackD
23 de abril de 2014 às 16:01

Olá galera.. boa tarde. bom preciso da ajuda de vocês para editar um script pra mim.. ele é o seguinte o player só pode passar nele se tiver guild e level 25 e aparecer a mensagem para todos verem em vermelho tenho a basica dele aqui mais não ta funcionando , preciso que ele só fale a mensagem quando ele entrar pra invadir o castle ao sair não aparecer nada...

 

tipow assim , essa é a foto de um cara invadindo o castle :

EJ1AZ0.png

 

 

Script :

function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) then return true end
    local article = getPlayerSex(cid) == 0 and "A" or "O"
    if getPlayerGuildId(cid) > 0 then
        broadcastMessage(article.."O jogador"..article:lower().." "..getCreatureName(cid).." da guild "..getPlayerGuildName(cid).." esta invadindo o castelo, avisar aos donos atuais.")
    end
    return true
end

@up

Tem como você arrumar o mapa do castelo? se tiver add ai skype ou facebook

Skype: duzinho1997

Face: duzinho.araujo