vc ker q fike piskando isso qndo ele entrar?
tenta isso
local text = <~King~> local storage = 13192 function onLogin(cid) if getPlayerStorageValue(cid,storage) == TRUE then doCreatureSay(getCreaturePosition(cid),text,22) end end return 0 end
[/code]
info
Grupo: Visconde
Registrado: 12/08/07
Posts: 345
Reputação: +7
Char no Tibia: Lokeded
vc ker q fike piskando isso qndo ele entrar?
tenta isso
local text = <~King~> local storage = 13192 function onLogin(cid) if getPlayerStorageValue(cid,storage) == TRUE then doCreatureSay(getCreaturePosition(cid),text,22) end end return 0 end
[/code]
Editado Junho 29 por Schiavinato
vc ker q fike piskando isso qndo ele entrar?
tenta isso
local text = <~King~> local storage = 13192 function onLogin(cid) if getPlayerStorageValue(cid,storage) == TRUE then doCreatureSay(getCreaturePosition(cid),text,22) end end return 0 end
Mais uma vez foste o unico que me respondeu em scripits que eu tenho problemas.... vou exprimentar ja digo se funcionou ou não ...
[/code]
O scripit nao funciona da logo erro... fiz uma alteraçoes porque o seu tinha uns erros...
local text = "<~King~>" local storage = 13192 function onLogin(cid) if getPlayerStorageValue(cid,storage) == TRUE then doCreatureSay(getCreaturePosition(cid),text,22) end end return 0
O meu Objectivo é transformar esta TALK \/ numa função OnLogin.
local time = 5 -- 1 = 1 sec, 2 = 2 sec, ...
local storage = 13192
local say_events = {}
local function SayText(cid)
if isPlayer(cid) == TRUE then
if say_events[getPlayerGUID(cid)] ~= nil then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getCreaturePosition(cid),"<~King~>", math.random(01,255))
doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30))
doPlayerAddMana(cid,75)
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
end
end
return TRUE
end
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
if param == "on" then
if isPlayer(cid) and getPlayerStorageValue(cid, storage) >= 1 then
doSendAnimatedText(getPlayerPosition(cid),"<~King~>", math.random(10,255))
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You active now the command.")
end
elseif param == "off" then
stopEvent(say_events[getPlayerGUID(cid)])
say_events[getPlayerGUID(cid)] = nil
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You disable the Command.")
end
return TRUE
end
Editado Junho 29 por tavax
info
Grupo: Visconde
Registrado: 20/08/06
Posts: 250
Reputação: +146

Tenta assim:
local time = 5 -- 1 = 1 sec, 2 = 2 sec, ... local storage = 13192 local function SayText(cid) if isCreature(cid) == TRUE then doSendAnimatedText(getCreaturePosition(cid), "<~King~>", math.random(01,255)) doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30)) doPlayerAddMana(cid,75) addEvent(SayText, time * 1000 / 2, cid) end end function onLogin(cid) if getPlayerStorageValue(cid, storage) >= 1 then addEvent(SayText, time * 1000, cid) end return TRUE end
E tem que colocar no creaturescripts.xml:
<event type="login" name="logineffect" script="logineffect.lua"/>
info
Grupo: Visconde
Registrado: 12/08/07
Posts: 345
Reputação: +7
Char no Tibia: Lokeded
Esse script tem alguma coisa estranha
Nele tem uma função que o player ganha mana ![]()
doPlayerAddMana(cid,75)
Esse script tem alguma coisa estranha
Nele tem uma função que o player ganha mana ¬¬
doPlayerAddMana(cid,75)
O scripit meio esquesito.... fiz ele com ajuda de um amigo meu...
Vou exprimentar a ideia do Kydrai e ja digo alguma coisa
EDITE \/
Vlw esta a funcionar se o scripit causar alguns problemas eu contacto vc kydrai
Editado Junho 29 por tavax
info
Grupo: Artesão
Registrado: 24/06/07
Posts: 104
Reputação: +3
Char no Tibia: Tavas
Ola pessoal eu estva tentando criar um evento no player se ele estiver a Storange X
Exemplo... se o player completar uma boa quest ele recebe um Titulo... assim se ele entrar vai ficar sempre aparecendo o nome da quest/titulo em cima dele... Eu fiz isso com talk mas fica chato porque os player se esquecem... Entao queria fazer OnLogin
Meu scripit.... Da erro quando o player Entra hehehhehe Espero que voces me possam ajudar
local time = 5 -- 1 = 1 sec, 2 = 2 sec, ... local storage = 13192 local say_events = {} function onLogin(cid) if isPlayer(cid) == TRUE then if getPlayerGUID(cid) ~= nil then if getPlayerStorageValue(cid,storage) == TRUE then doSendAnimatedText(getCreaturePosition(cid),"<~King~>", math.random(01,255)) doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30)) doPlayerAddMana(cid,75) end getPlayerGUID(cid) = addEvent(SayText, time * 1000 / 2, cid) end end return TRUE endEspero que entendao o meu objectivo se nao entender é so dizerem
Editado Junho 29 por tavax