Aonde está a imgem?
scripter funciona so que da erro no executável
Por joseanpereira, 06 de ago. de 2013 em Scripts
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

pera vou editar la encima
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Tente:
function onSay(cid, words, param) local t = string.explode(param, ",") local player = getPlayerByNameWildcard(t[1]) local amount = tonumber(t[2]) if param == "" or not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name and level required.") return true end if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to add the level to set.") end doPlayerAddExp(player, getExperienceForLevel(amount) - (getPlayerExperience(player))) doCreatureAddMana(player, getCreatureMaxMana(player) - getCreatureMana(player)) doCreatureAddHealth(player, getCreatureMaxHealth(player) - getCreatureHealth(player)) return true end
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

ainda aparece o erro quando adiciono o level
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

O mesmo ou diferente?
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

Tenta ai, o erro diz que não está achando o jogador, você não está usando em alguém deslogado, ou com ghost né, lembrando !cmd nome do jogador, value que vai adicionar.
function onSay(cid, words, param, channel)
local str = string.explode(param, ",")
local player = getPlayerByNameWildcard(str[1])
local amount = math.min(tonumber(str[2]) or 1, 100)
if not(player) then
return doPlayerSendTextMessage(cid, 27, "Player not found.")
elseif not(amount) then
return doPlayerSendTextMessage(cid, 27, words .. " player name, value.")
end
doPlayerAddExp(player, getExperienceForLevel(amount) - getPlayerExperience(player))
doCreatureAddMana(player, getCreatureMaxMana(player) - getCreatureMana(player))
doCreatureAddHealth(player, getCreatureMaxHealth(player) - getCreatureHealth(player))
return true
end
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

sim o mesmo erro
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

Caralho, que bugadão, você tá tentando adicionar em quem?
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

mano como e o comando e !cmd pete, 200?
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

@O nome deve estar igual em maiúscula !add Joseanpereira, 100.
Usa esse comando no parâmetro do skill coloca 1 para ser level.
function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.") return true end local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.") return true end t[2] = t[2]:lower() local skill = SKILL_IDS[t[2]] if(not skill) then local tmp = t[2]:sub(1, 1) if(tmp == 'l' or tmp == 'e') then skill = SKILL__LEVEL elseif(tmp == 'm') then skill = SKILL__MAGLEVEL else skill = tonumber(t[2]) if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.") return true end end end local amount = tonumber(t[3]) if(not amount or amount == 0) then amount = 1 end doPlayerAddSkill(pid, skill, amount, true) return true end
Editado Agosto 6 por Skymagnum
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

eu coloquei o comando /level pete, 20 e de minuiu so que so almento ate o level 100 haa não deu erro no executável
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

Você tá usando qual dos scripts?.
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

esse que retirou o level e colocou sem da erro e o de cima
esse
function onSay(cid, words, param, channel)
local str = string.explode(param, ",")
local player = getPlayerByNameWildcard(str[1])
local amount = math.min(tonumber(str[2]) or 1, 100)
if not(player) then
return doPlayerSendTextMessage(cid, 27, "Player not found.")
elseif not(amount) then
return doPlayerSendTextMessage(cid, 27, words .. " player name, value.")
end
doPlayerAddExp(player, getExperienceForLevel(amount) - getPlayerExperience(player))
doCreatureAddMana(player, getCreatureMaxMana(player) - getCreatureMana(player))
doCreatureAddHealth(player, getCreatureMaxHealth(player) - getCreatureHealth(player))
return true
end
so que so esta adicionando ate o level 100
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

A eu coloquei pra adicionar no máximo 100.
Usa ai.
function onSay(cid, words, param, channel)
local str = string.explode(param, ",")
local player = getPlayerByNameWildcard(str[1])
local amount = tonumber(str[2]) or 1
if not(player) then
return doPlayerSendTextMessage(cid, 27, "Player not found.")
elseif not(amount) then
return doPlayerSendTextMessage(cid, 27, words .. " player name, value.")
end
doPlayerAddExp(player, getExperienceForLevel(amount) - getPlayerExperience(player))
doCreatureAddMana(player, getCreatureMaxMana(player) - getCreatureMana(player))
doCreatureAddHealth(player, getCreatureMaxHealth(player) - getCreatureHealth(player))
return true
end



info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm
gente meus scripter e novo ele adiciona level nos players e retira exenplo /level pete,100 o player fica no level 100 /level pete,90 o player fica com level 90 ele ja vai para o level direto que vc colocar exenplo ele e level 50 e falo /level pete 40 ele ja fica no level 40 esse scripter funciona perfeito so que da erro no executavel como ajeitar isso i
magem do erro abaixo
meu scripter a baixo ele esta em data talkaction / scripter
é em talkaction.xml esta esse a baixo
tem algo de errado ?
Editado Agosto 6 por joseanpereira