LU
dúvida

[Ajuda] Aqui Simples =)

Por lukas13on, 21 de jul. de 2012 em Scripts

7
931
lukas13onL
21 de julho de 2012 às 13:07

Presiso de um Moveevent que faça o seguinte:

Quando ele pisar no chão vip que eu ja tenho configurado (AID=13595)

ele mande uma mensagem Falando Bem Vindo á área vip....

 

OBG ;)

TchubakaT
21 de julho de 2012 às 13:18

vai em movements-scripts crie 1arquivo nome . sistemavip.lua

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você nao e VIP compre agora mesmo!",
msgWelcome = "Bem Vindo a area VIP!"
}

if getPlayerStorageValue(cid, 13595) - os.time() <= 0 then
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return TRUE
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome)
return TRUE
end

em movements.xml cole isso.

<movevent type="StepIn" actionid="13595" event="script" value="sistemavip.lua"/>

 

 

 

AJUDEI?REP+?

Editado Julho 21 por Tchubaka

BlackLeftB
21 de julho de 2012 às 13:23

Formata o topico, pois está com as edisções do xtibia na script.

lukas13onL
21 de julho de 2012 às 13:31

Só quero que você coloque uma mensagem de bem vindo aqui em baixo pfv

 

function onStepIn(cid, item, pos)

-- teleports config
teleport1 ={x=2018, y=2051, z=10}
if isPlayer(cid) then
if item.actionid == 13595 then
vip = getPlayerStorageValue(cid,13595)
if vip == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não é vip, compre-a no site.")

doTeleportThing(cid,teleport1)

else
end
end
end
end

TchubakaT
21 de julho de 2012 às 13:44

tenta isso

function onStepIn(cid, item, pos)

local config = {
msgDenied = "Você nao e VIP compre agora mesmo!",
msgWelcome = "Bem Vindo a area VIP!"
}
-- teleports config
teleport1 ={x=2018, y=2051, z=10}
if isPlayer(cid) then
if item.actionid == 13595 then
vip = getPlayerStorageValue(cid,13595)
if vip == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não é vip, compre-a no site.")

doTeleportThing(cid,teleport1)

else
end
end
end
end

 

 

REP+?

Editado Julho 21 por Tchubaka

VodkartV
21 de julho de 2012 às 13:45
function onStepIn(cid, item, pos)

teleport1 ={x=2018, y=2051, z=10}
vip = getPlayerStorageValue(cid,13595)

if item.actionid == 13595 and isPlayer(cid) then
if vip == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não é vip, compre-a no site.")
doTeleportThing(cid,teleport1)
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "bem vindo a área vip.")
end
return true
end

lukas13onL
21 de julho de 2012 às 14:05

Funcionou perfeitamente muito obrigado *-*

quem sabe chamo você para meu closed beta :)

mapa ta quase pronto, script ta em 50% :)

function onStepIn(cid, item, pos)

teleport1 ={x=2018, y=2051, z=10}
vip = getPlayerStorageValue(cid,13595)

if item.actionid == 13595 and isPlayer(cid) then
if vip == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não é vip, compre-a no site.")
doTeleportThing(cid,teleport1)
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "bem vindo a área vip.")
end
return true
end