Testei em conta normal.
o efeito nao pega qnd adikiri akela vocation.Mais vo tenta dnv.
Por Raidou, 12 de set. de 2012 em Scripts
info
Grupo: Banidos
Registrado: 30/07/12
Posts: 279
Reputação: +16
Char no Tibia: Raidou

Testei em conta normal.
o efeito nao pega qnd adikiri akela vocation.Mais vo tenta dnv.
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

veja assim
local vocs = {
[7] = {effect = 14},
[6] = {effect = 13},
[5] = {effect = 14}
}
function onThink(cid, interval)
local voc = getPlayerVocation(cid)
if vocs[voc] then
if getPlayerAccess(cid,0) and getPlayerAccess(cid,1) then
elseif getPlayerAccess(cid,2) then
local efeito = vocs[voc].effect
doSendMagicEffect(getCreaturePosition(cid), efeito)
return true
end
return true
end
end
info
Grupo: Banidos
Registrado: 30/07/12
Posts: 279
Reputação: +16
Char no Tibia: Raidou

Agora,o personagen nao quer reverter,nem transformar mais....![]()
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Da algum erro no console?
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Dei uma adaptada no meu script:
vocefeito.lua:
local tempo = 1 -- De quanto em quantos segundos sairá o efeito
local voc_ef = { -- Vocation ID / efeito
[1] = 10,
[2] = 10,
[3] = 10
}
local voc_table = voc_ef[getPlayerVocation(cid)]
function efeito(cid)
for i = 1, #voc_ef do
if getPlayerVocation(cid) ~= i then return true
end
end
doSendMagicEffect(getCreaturePos(cid), voc_table)
addEvent(efeito, tempo*1000, cid)
end
function onThink(cid)
efeito(cid)
return true
end
creaturescripts.xml:
<event type="think" name="VocationsEff" event="script" value="vocefeito.lua"/>
login.lua:
registerCreatureEvent(cid, "VocationsEff")
Editado Setembro 12 por LuckOake
info
Grupo: Banidos
Registrado: 30/07/12
Posts: 279
Reputação: +16
Char no Tibia: Raidou

Vou Testar ja edito aki.Fikem atentos,ao que eu postar.
OBS:Desculpa tar encomodando tanto voces.
É que o projeto vai ser mt bom.
@Edit
Bom,consegui arrumar o transformar.Mais o effect nao pego.Olhem como ta. meus arkivos.
effect.lua
local tempo = 1 -- De quanto em quantos segundos sairá o efeito
local voc_ef = { -- Vocation ID / efeito
[1] = 14,
[2] = 13,
}
local voc_table = voc_ef[getPlayerVocation(cid)]
function efeito(cid)
for i = 1, #voc_ef do
if getPlayerVocation(cid) ~= i then return true
end
end
doSendMagicEffect(getCreaturePos(cid), voc_table)
addEvent(efeito, tempo*1000, cid)
end
function onThink(cid)
efeito(cid)
return true
end
login.lua
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "VocationsEff")
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end
creaturescripts.xml
<!--?xml version="1.0" encoding="UTF-8"?-->
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua">
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua">
<event type="receivemail" name="Mail" event="script" value="mail.lua">
<event type="reportbug" name="SaveReportBug" script="reportbug.lua">
<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua">
<event type="think" name="Idle" event="script" value="idle.lua">
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua">
<event type="advance" name="upgain" event="script" value="upgain.lua">
<event type="think" name="VocationsEff" event="script" value="effect.lua">
</event></event></event></event></event></event></event></event></event></creaturescripts>
O efeito nao pega,mais ele transforma de boa.
Aguardo,respostas.
Editado Setembro 13 por Raidou
tenta esse script, com as tag iguais ao do chaotic, não esqueça de registrar no login.lua.
local pos = getCreaturePosition(cid) function onRaio(cid) if getPlayerVocation(cid) == 1 then doSendMagicEffect(pos, 10) elseif getPlayerVocation(cid) == 3 then doSendMagicEffect(pos, 65) end return true end function onLogin(cid) local time = -1 addEvent(function() onRaio(cid) end, time*1000) return true end
já espliquei como adicionar mais, agora testa ae ^^
Editado Setembro 13 por Snowsz
info
Grupo: Banidos
Registrado: 30/07/12
Posts: 279
Reputação: +16
Char no Tibia: Raidou

tenta esse script, com as tag iguais ao do chaotic, não esqueça de registrar no login.lua.
local pos = getCreaturePosition(cid) function onRaio(cid) if getPlayerVocation(cid) == 1 then doSendMagicEffect(pos, 10) elseif getPlayerVocation(cid) == 3 then doSendMagicEffect(pos, 65) end return true end function onLogin(cid) local time = -1 addEvent(function() onRaio(cid) end, time*1000) return true end
já espliquei como adicionar mais, agora testa ae ^^
Pode configura o Login.lua pra mim por favor?
Nao sei fazer isso.
Se puder passar o seu eu agradeço muito.
Até mais.
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Raidou o login.lua e o creatures.xml e igual o do caotic
info
Grupo: Banidos
Registrado: 30/07/12
Posts: 279
Reputação: +16
Char no Tibia: Raidou

Ta mais,eu nao sei adicionar a linha no login.lua.
Alguem adiciona pra mim?
Ta aki o meu Login.lua
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

pronto
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "efe")
return true
end
info
Grupo: Banidos
Registrado: 30/07/12
Posts: 279
Reputação: +16
Char no Tibia: Raidou

Desculpe pessoal,eu tentei de tudo que é jeito e nao deu testei todos scripts nao deu.
Eu estou usando,TFS 0.3.6 8.54
Será que é problema no distro?
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Raidou eu acho que o erro pode ser a versao do servidor
os scripts sao compativeis a 8.60 eu acho
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have
Testou com conta de group 6(god)
Tenta ae esta funcionando normalmente aki.
Detalhe
Em conta de group 6 não funcionou