Testei em conta normal.
o efeito nao pega qnd adikiri akela vocation.Mais vo tenta dnv.
By Raidou, 12 de set. de 2012 in Scripts
info
Group: Banidos
Joined: 30/07/12
Posts: 279
Reputation: +16
Tibia Character: Raidou

Testei em conta normal.
o efeito nao pega qnd adikiri akela vocation.Mais vo tenta dnv.
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: 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
Group: Banidos
Joined: 30/07/12
Posts: 279
Reputation: +16
Tibia Character: Raidou

Agora,o personagen nao quer reverter,nem transformar mais....![]()
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

Da algum erro no console?
info
Group: Marquês
Joined: 22/07/12
Posts: 1.1k
Reputation: +400
Gender: Masculino
Tibia Character: 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")
Edited Setembro 12 by LuckOake
info
Group: Banidos
Joined: 30/07/12
Posts: 279
Reputation: +16
Tibia Character: 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.
Edited Setembro 13 by 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 ^^
Edited Setembro 13 by Snowsz
info
Group: Banidos
Joined: 30/07/12
Posts: 279
Reputation: +16
Tibia Character: 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
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

Raidou o login.lua e o creatures.xml e igual o do caotic
info
Group: Banidos
Joined: 30/07/12
Posts: 279
Reputation: +16
Tibia Character: 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
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: 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
Group: Banidos
Joined: 30/07/12
Posts: 279
Reputation: +16
Tibia Character: 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
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

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