Isso resolvera seu problema.
Em data/movements/movements.xml cole as tags:
<movevent type="StepIn" actionid="25000" event="script" value="tiledance.lua"/> <movevent type="StepOut" actionid="25000" event="script" value="tiledance.lua"/>
Duplica um arquivo em data/movements/scripts e nomeia para "tiledance" sem as aspas e nele cole:
function onStepIn(cid, item, pos) if (getPlayerStorageValue(cid, 302124) > 0) then doPlayerSendTextMessage(cid, 22, "Você não pode subir com dancing system ativado.") return false end setPlayerStorageValue(cid, 302123, 1) return TRUE end function onStepOut(cid, item, pos) setPlayerStorageValue(cid, 302123, 0) return TRUE end
Agora em talkactions/scripts, troque seu arquivo "dancing.lua" por esse:
local conf = {}
-- // config // ---
conf.danceTexts = {"GO GO DANCE!", "DANCE NOW!", "DANCE IS FUNY!"}
conf.textSpeed = 1500 -- how fast animated texts is sending?
conf.danceSpeed = 100 -- dance speed
conf.outfitSpeed = 250 -- outfit changer speed
conf.outfitMale = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325} -- all male outfits
conf.outfitFemale = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324} -- all female outfits
-- // end // --
function dancer(tab)
if isPlayer(tab[1]) then
local dirs = {[0] = {1,3},[1] = {0,2},[2] = {1,3},[3] = {0,2}}
local look = dirs[getCreatureLookDirection(tab[1])]
doCreatureSetLookDir(tab[1], look[math.random(1,2)])
tab[2].dancer = addEvent(dancer,conf.danceSpeed, {tab[1], tab[2]})
end
end
function messager(tab)
if isPlayer(tab[1]) then
doCreatureSay(tab[1], conf.danceTexts[math.random(1, #conf.danceTexts)], TALKTYPE_ORANGE_2)
tab[2].messager = addEvent(messager,conf.textSpeed, tab)
end
end
function outfitChanger(tab)
if isPlayer(tab[1]) then
if getPlayerSex(tab[1]) == PLAYERSEX_FEMALE then
outs = conf.outfitFemale
else
outs = conf.outfitMale
end
local outfit = {
lookType = outs[math.random(1, #outs)],
lookHead = math.random(1,133),
lookBody = math.random(1,133),
lookLegs = math.random(1,133),
lookFeet = math.random(1,133),
lookTypeEx = math.random(1,133),
lookAddons = math.random(0,3)}
doCreatureChangeOutfit(tab[1], outfit)
tab[2].outfitChanger = addEvent(outfitChanger,conf.outfitSpeed, tab)
end
end
backOutfit = {}
local backOutfit = {}
function onSay(cid, words, param, channel)
local pid = getPlayerGUID(cid)
if type(events[pid]) ~= "table" then
events[pid] = {}
end
if (getPlayerStorageValue(cid, 302123) > 0) then
doPlayerSendTextMessage(cid, 22, "Você não pode ativar o dancing system no trainer.")
return true
end
if string.lower(param) == "start" and not(events[pid].dancer) then
outBack = getCreatureOutfit(cid)
backOutfit[pid] = outBack
backOutfit[pid].lookType = outBack.lookType
backOutfit[pid].lookAddons = outBack.lookAddons
dancer({cid, events[pid]})
messager({cid, events[pid]})
outfitChanger({cid, events[pid]})
setPlayerStorageValue(cid, 302124, 1)
elseif string.lower(param) == "stop" and events[pid].dancer then
stopEvent(events[pid].dancer)
stopEvent(events[pid].messager)
stopEvent(events[pid].outfitChanger)
events[pid] = {}
doCreatureChangeOutfit(cid, backOutfit[pid])
setPlayerStorageValue(cid, 302124, 0)
end
return TRUE
end




info
Grupo: Barão
Registrado: 24/02/10
Posts: 204
Reputação: +14
Char no Tibia: Krewcz
Tipo do script: Actions, Talkactions
Protocolo (versão do Tibia): 8.60
Servidor utilizado: Baiak
Nível de experiência: Médio
Adicionais/Informações: Bom, vou começar do principio, meu servidor, quando o player da exit nos treiners, eles ficam la AFK, o otserv baniu, como falsificação de dados, eu tinha removido a action do tile que faz o player deslogar, mais vou colcoar DENOVO ( http://www.xtibia.com/forum/topic/134811-movement-ant-exit/ ) Só que se o player usar o comando !dance start ( http://www.xtibia.com/forum/topic/134984-moveevent-dance-system/ ) ele não desloga.
Gostaria que ao player estivesse no tile com uma actions 25000 não podesse usar o !dance start, só o stop, ou, ao dar exit, o !dance start, automaticamente desse !dance stop, meu servidor é serio, dedicado, precisso disso urgente.