function sugested() --GName generatorlocal cons = {'b','c','d','f','g','h','i','j','k','l','m','n',' p','q','r','s','t','v','x','y','z'}
local dimdim = 40 ----------------EDITE AKI O DINHIERO QUE SERA REMOVIDO
local vog = {"a",'e','i','o','u'}
local sibalas = {}
for i=1,#cons do
for e=1,#vog do
table.insert(sibalas,1,cons..vog[e])
end
end
local total = ""
for i=1,math.random(1,2) do
local nam = ""
for i=1,math.random(2,4) do
nam = nam..sibalas[math.random(1,#sibalas)]
end
if math.random(1,2) == 1 then
nam = nam..vog[math.random(1,#vog)]
elseif math.random(1,2) == 2 then
nam = nam..cons[math.random(1,#vog)]
end
total = total..(i == 2 and ' ' or '')..nam:sub(1,1):upper()..nam:sub(2,-1)
end
return total
end
function onSay(cid, words, param, channel)
if not getPlayerMoney(cid) >= dimdim then
doCreatureSay(cid,"Nao posso pagar é "..dimdim..",1)
return true
end
doPlayerRemoveMoney(cid, dimdim)
if param == 'gen' then
doCreatureSay(cid,'Suggested name: '..sugested(),1)
return true
end
local param1,param2 = param:match('(.-)[;:,.]%s*(.+)')
param = param1 or param
param2 = param2 or sugested()
if not param then
doPlayerSendTextMessage(cid,25,'Use like this: /rename Old name, New name')
return true
end
if param2:len() <= 2 or param2:len() > 20 then
doPlayerSendTextMessage(cid,25,'Please 3-20 characters.')
return true
end
if param2:match('[%a%d%s%u%l]+') ~= param2 then
doPlayerSendTextMessage(cid,25,'Please only A-Z 0-9')
return true
end
param2 = param2:sub(1,1):upper()..param2:sub(2,-1)
local p2 = getPlayerByName(param)
if p2 and isPlayer(p2) then
local id = getPlayerGUID(p2)
doPlayerPopupFYI(p2,'Changing your name. Please login aigan on your character list.')
addEvent(doRemoveCreature,2000,p2)
addEvent(function(id,param2)
db.executeQuery("UPDATE `players` SET `name` = '"..param2.."' WHERE `id` ="..id)
end,2100,id,param2)
else
doPlayerSendTextMessage(cid,25,'Player '..param..' not found.')
return true
end
return TRUE
end
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have

Editado Maio 14 por caotic
info
Grupo: Campones
Registrado: 29/12/08
Posts: 49
Reputação: +3
Char no Tibia: black levon

info
Grupo: Campones
Registrado: 29/10/11
Posts: 96
Reputação: +24
Char no Tibia: Deathz

Vou ver aqui mais esse script é talkactions ?
info
Grupo: Campones
Registrado: 29/12/08
Posts: 49
Reputação: +3
Char no Tibia: black levon

Vou ver aqui mais esse script é talkactions ?
é sim
info
Grupo: Cavaleiro
Registrado: 13/11/11
Posts: 190
Reputação: +20
Char no Tibia: Sweesh

Diz o bug no executor?
info
Grupo: Campones
Registrado: 29/12/08
Posts: 49
Reputação: +3
Char no Tibia: black levon

Não aparece bug no executador apenas para de funcionar a talk.
info
Grupo: Cavaleiro
Registrado: 13/11/11
Posts: 190
Reputação: +20
Char no Tibia: Sweesh

Tenta esse:
function sugested() --GName generator
local cons = {'b','c','d','f','g','h','i','j','k','l','m','n',' p','q','r','s','t','v','x','y','z'}
local vog = {"a",'e','i','o','u'}
local sibalas = {}
for i=1,#cons do
for e=1,#vog do
table.insert(sibalas,1,cons..vog[e])
end
end
local total = ""
for i=1,math.random(1,2) do
local nam = ""
for i=1,math.random(2,4) do
nam = nam..sibalas[math.random(1,#sibalas)]
end
if math.random(1,2) == 1 then
nam = nam..vog[math.random(1,#vog)]
elseif math.random(1,2) == 2 then
nam = nam..cons[math.random(1,#vog)]
end
total = total..(i == 2 and ' ' or '')..nam:sub(1,1):upper()..nam:sub(2,-1)
end
return total
end
function onSay(cid, words, param, channel)
local dimdim = 40 ----------------EDITE AKI O DINHIERO QUE SERA REMOVIDO
if not getPlayerMoney(cid) >= dimdim then
doCreatureSay(cid,"Nao posso pagar é "..dimdim..",1)
return true
end
doPlayerRemoveMoney(cid, dimdim)
if param == 'gen' then
doCreatureSay(cid,'Suggested name: '..sugested(),1)
return true
end
local param1,param2 = param:match('(.-)[;:,.]%s*(.+)')
param = param1 or param
param2 = param2 or sugested()
if not param then
doPlayerSendTextMessage(cid,25,'Use like this: /rename Old name, New name')
return true
end
if param2:len() <= 2 or param2:len() > 20 then
doPlayerSendTextMessage(cid,25,'Please 3-20 characters.')
return true
end
if param2:match('[%a%d%s%u%l]+') ~= param2 then
doPlayerSendTextMessage(cid,25,'Please only A-Z 0-9')
return true
end
param2 = param2:sub(1,1):upper()..param2:sub(2,-1)
local p2 = getPlayerByName(param)
if p2 and isPlayer(p2) then
local id = getPlayerGUID(p2)
doPlayerPopupFYI(p2,'Changing your name. Please login aigan on your character list.')
addEvent(doRemoveCreature,2000,p2)
addEvent(function(id,param2)
db.executeQuery("UPDATE `players` SET `name` = '"..param2.."' WHERE `id` ="..id)
end,2100,id,param2)
else
doPlayerSendTextMessage(cid,25,'Player '..param..' not found.')
return true
end
return TRUE
end
info
Grupo: Campones
Registrado: 29/12/08
Posts: 49
Reputação: +3
Char no Tibia: black levon

Tenta esse:
ainda não deu =/
info
Grupo: Cavaleiro
Registrado: 13/11/11
Posts: 190
Reputação: +20
Char no Tibia: Sweesh

Eu testei aqui e funcionou, desculpa entao cara, nao sei qual é o problema. Nao vou poder te ajudar nessa.
Editado Maio 14 por Lucaswc15
info
Grupo: Campones
Registrado: 29/12/08
Posts: 49
Reputação: +3
Char no Tibia: black levon

Eu testei aqui e funcionou, desculpa entao cara, nao sei qual é o problema. Nao vou poder te ajudar nessa.
ta certo vlw pela ajuda vo ficar tentando aqui
Obrigado !



info
Grupo: Campones
Registrado: 29/12/08
Posts: 49
Reputação: +3
Char no Tibia: black levon
Bom galera eu peguei uma script de rename tudo funciono normal mais queria
poder deixar esse comando pros player por "x" preço como um aol,que precisa de "x"
money e vir uma msg você não tem dinheiro suficiente.
Obrigado !