Salve Scripts, Alguém poderia mandar uma script de Efeito pra staff?
Tipo: o nome em cima do personagem escrito [STAFF] OU [GOD].
Se alguém tiver, darei REP+. TMJ!
Salve Scripts, Alguém poderia mandar uma script de Efeito pra staff?
Tipo: o nome em cima do personagem escrito [STAFF] OU [GOD].
Se alguém tiver, darei REP+. TMJ!
Esse do texto não tenho aqui mas tenho um que solta effect:
data/globalevents/script add admefect
Citarif getPlayerGroupId(cid) >= 3 and isPlayer(cid) then
local tempo = 0.3 --- de quanto em quanto segundos ele solta o efeito
function loop (cid)
local pos = getCreaturePosition(cid)
local effects = 27,27 ----- EFEITO QUE VC QUERIA
doSendMagicEffect(pos, effects)
addEvent(function()
if isCreature(cid) then
loop(cid)
end
end, 1000 * tempo)
return true
end
loop(cid)
end
<globalevent name="admefect" interval="1" script="admefect.lua" />
Ps: Não sou autor do script e não lembro quem é estou apenas repassando.
Em 08/01/2019 em 13:19, Thalles Vitor disse:Tente, fiz para sair texto animado:
if getPlayerGroupId(cid) >= 3 and isPlayer(cid) then local tempo = 0.3 --- de quanto em quanto segundos ele solta o efeito function loop (cid) local pos = getCreaturePosition(cid) doSendAnimatedText(pos,"Exemplo--texto aqui", 215) addEvent(function() if isCreature(cid) then loop(cid) end end, 1000 * tempo) return true end loop(cid) end
Em 08/01/2019 em 09:55, R e d disse:Esse do texto não tenho aqui mas tenho um que solta effect:
data/globalevents/script add admefect
<globalevent name="admefect" interval="1" script="admefect.lua" />
Ps: Não sou autor do script e não lembro quem é estou apenas repassando.
Obrigado aos dois, irei testar assim que eu puder
Em 13/01/2019 em 09:09, Thalles Vitor disse:Caso funcione, marque como melhor resposta ^^
Oie tudo bem? desculpa reviver aqui, mas, deu erro... poderia me ajudar?
48 minutos atrás, Thalles Vitor disse:Nem alterei nada, só alterei algumas variáveis, mas dessa vez coloquei por pastebin, verifique se não da erro, pelo fato de que pelo XTibia pode copiar algum character inválido.
Opção 2: https://pastebin.com/1ePqTpzB
Ele não deu erro ao ligar o servidor, mas, não aparece no jogo...
3 minutos atrás, Thalles Vitor disse:Não sai o doSendAnimatedText? Acontece nada ao usar?
Ao usar nao, Ao logar no game.
Não, nada...
<event type="login" name="animatedTextStaff" event="script" value="animatedTextStaff.lua"/>
local configEffect = { [6] = {message = '[GOD]', time = 2}, --[Group ID] {MENSAGEM, tempo em segundos} [5] = {message = '[CM]', time = 2}, [4] = {message = '[GM]', time = 2}, [3] = {message = '[Senior Tutor]', time = 2}, [2] = {message = '[Tutor]', time = 2} } function onLogin(cid) registerCreatureEvent(cid, "animatedTextStaff") if configEffect[getPlayerGroupId(cid)] then effectGroup(cid) end return true end function effectGroup(cid) if isPlayer(cid) then local config = configEffect[getPlayerGroupId(cid)] doSendAnimatedText(getThingPos(cid), config.message, math.random(1,255)) addEvent(effectGroup, config.time*1000,cid) end end
Acabei de fazer!
╔══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ══════════════════════════╗
ALGUNS DOS MEUS TRABALHOS:
Newstory dbo+nto+bleach[DOWNLOAD]
- Projetos lançados também feitos por mim {
DBO SKY
POKE SKY
WODBOWARS
Tic-tac-War
Dbo Universe(em desenvolvimento)
}
Te Ajudei? Rep + e ficamos Quits
Precisando de ajuda?
Discord: Yan Liima #3702
Programador Júnior de LUA, PHP e JavaScript
Juntos somos lendas, separados somos Mitos!
╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝
8 minutos atrás, Thalles Vitor disse:Depois dos meus erros patéticos e alterações no script ta ae
Testei aqui e funcionou.
Ai tu cola no xml
<globalevent name="adm" interval="1" script="adm.lua" />
Não esquece de mudar o
if getPlayerGroupIdif getPlayerGroupId >= 8 then8 e o group id mude pelo que voce quer.
Por favor remova o
local thalles = getCreaturePosition(cid) -- Thalles é a variável.Esqueci de remover.
Se caso quiser em várias cores só trocar por
doSendAnimatedText(getThingPos(pid), "ADM", math.random(1,255))
Deu certo, só que assim, tá indo toda hora, e o cliente tá dando desbug... poderia colocar no tempo? ;/
5 minutos atrás, Yan Liima disse:<event type="login" name="animatedTextStaff" event="script" value="animatedTextStaff.lua"/>local configEffect = { [6] = {message = '[GOD]', time = 2}, --[Group ID],MENSSAGEM, tempo em segundos} [5] = {message = '[CM]', time = 2}, [4] = {message = '[GM]', time = 2}, [3] = {message = '[Senior Tutor]', time = 2}, [2] = {message = '[Tutor]', time = 2} } function onLogin(cid) registerCreatureEvent(cid, "animatedTextStaff") if configEffect[getPlayerGroupId(cid)] then effectGroup(cid) end return true end function effectGroup(cid) if isPlayer(cid) then local config = configEffect[getPlayerGroupId(cid)] doSendAnimatedText(getThingPos(cid), config.message, math.random(1,255)) addEvent(effectGroup, config.time*1000,cid) end end
Não funfo ;/
1 minuto atrás, Thalles Vitor disse:Como assim "desbug" pode explicar? e sim posso colocar time sim.
por causa que ele está indo muito rápido, ai meu pc acaba travando e dando desbug huashua, mas, é só colocar o time mesmo.
31 minutos atrás, Yan Liima disse:<event type="login" name="animatedTextStaff" event="script" value="animatedTextStaff.lua"/>local configEffect = { [6] = {message = '[GOD]', time = 2}, --[Group ID] {MENSAGEM, tempo em segundos} [5] = {message = '[CM]', time = 2}, [4] = {message = '[GM]', time = 2}, [3] = {message = '[Senior Tutor]', time = 2}, [2] = {message = '[Tutor]', time = 2} } function onLogin(cid) registerCreatureEvent(cid, "animatedTextStaff") if configEffect[getPlayerGroupId(cid)] then effectGroup(cid) end return true end function effectGroup(cid) if isPlayer(cid) then local config = configEffect[getPlayerGroupId(cid)] doSendAnimatedText(getThingPos(cid), config.message, math.random(1,255)) addEvent(effectGroup, config.time*1000,cid) end endAcabei de fazer!
[Warning - Event::loadScript] Event onThink not found
Aonde posso alterar para cada membro da staff sair um effect diferente ?
1 minuto atrás, Thalles Vitor disse:Pega o meu script e faça individual para cada grupo.
ou se preferir so ir colocando and
Esse erro ao usar
Citarif getPlayerGroupId(cid) >= 3 and isPlayer(cid) then
local tempo = 0.3 --- de quanto em quanto segundos ele solta o efeito
function loop (cid)
local pos = getCreaturePosition(cid)
doSendAnimatedText(pos,"Exemplo--texto aqui", 215)
addEvent(function()
if isCreature(cid) then
loop(cid)
end
end, 1000 * tempo)
return true
end
loop(cid)
end
[20:56:01.585] [Error - GlobalEvent Interface]
[20:56:01.586] data/globalevents/scripts/diarmaint/admeffect.lua
[20:56:01.587] Description:
[20:56:01.588] (internalGetPlayerInfo) Player not found when requesting player info #17
[20:56:01.588] [Error - GlobalEvent Interface]
[20:56:01.589] data/globalevents/scripts/diarmaint/admeffect.lua
[20:56:01.590] Description:
[20:56:01.590] data/globalevents/scripts/diarmaint/admeffect.lua:1: attempt to compare number with boolean
[20:56:01.591] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/diarmaint/admeffect.lua)
7 minutos atrás, Thalles Vitor disse:Pega o meu script e faça individual para cada grupo.
ou se preferir so ir colocando and
Não dá nenhum erro ao ligar, mas quando eu logo
[21:2:55.071] [Error - GlobalEvent Interface]
[21:2:55.076] data/globalevents/scripts/diarmaint/admeffect.lua:onThink
[21:2:55.080] Description:
[21:2:55.082] (internalGetPlayerInfo) Player not found when requesting player info #17
fica aparecendo sem parar enquanto apace [adm] e fica monstrando sem tempo entre.
2 minutos atrás, Thalles Vitor disse:Substitui todas suas funcoes if getplayergroupid por
if getPlayerGroupId(pid) ~= 1 or getPlayerGroupId(pid) ~= 3 or getPlayerGroupId(pid) ~= 4 or getPlayerGroupid(pid) ~= 5 or getPlayerGroupId(pid) ~= 8 then
Perfeito, os players verão se for ghost?
@diarmaint Creaturescript.
local configEffect = { [6] = {message = '[GOD]', color = 25, time = 2}, --[Group ID] {MENSAGEM, tempo em segundos} [5] = {message = '[CM]', color = 25, time = 2}, [4] = {message = '[GM]', color = 25, color = 25,time = 2}, [3] = {message = '[Senior Tutor]', color = 25, time = 2}, [2] = {message = '[Tutor]', color = 25, time = 2} } function onLogin(cid) registerCreatureEvent(cid, "animatedTextStaff") if configEffect[getPlayerGroupId(cid)] then effectGroup(cid) end return true end function effectGroup(cid) if isPlayer(cid) and not isPlayerGhost(cid) then local config = configEffect[getPlayerGroupId(cid)] doSendAnimatedText(getThingPos(cid), config.message, config.color) addEvent(effectGroup, config.time*1000,cid) end end
<event type="login" name="animatedTextStaff" event="script" value="animatedTextStaff.lua"/>
╔══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ══════════════════════════╗
ALGUNS DOS MEUS TRABALHOS:
Newstory dbo+nto+bleach[DOWNLOAD]
- Projetos lançados também feitos por mim {
DBO SKY
POKE SKY
WODBOWARS
Tic-tac-War
Dbo Universe(em desenvolvimento)
}
Te Ajudei? Rep + e ficamos Quits
Precisando de ajuda?
Discord: Yan Liima #3702
Programador Júnior de LUA, PHP e JavaScript
Juntos somos lendas, separados somos Mitos!
╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝