Explica como você quer que os players ganhem está vocation.
info
Grupo: Conde
Registrado: 11/02/09
Posts: 559
Reputação: +7
Char no Tibia: Deep Druid

Os players só estão ganhando a vocação através do comando /attr, assim só eu posso adicionar a nova classe, eu estou aqui testando ainda de lançar no meu OT e eu entro adiciono a classe ela funciona normalmente, mas quando eu deslogo o char e logo novamente ele diz que está sem vocation ..
Dúvida sanada já resolvi o problema, gostaria de saber agora onde eu mudo as classes que o pode usar cada potion ..
info
Grupo: Artesão
Registrado: 20/04/10
Posts: 109
Reputação: +23
Char no Tibia: Charles Mil

Na pasta do seu OT vai em data/actions/scripts/liquids e tem um arquivo chamado potions.lua é nele que tu edita.
Não esquece do REP+ Desse e do outro tópico que você criou ![]()
Na pasta do seu OT vai em data/actions/scripts/liquids e tem um arquivo chamado potions.lua é nele que tu edita.
Não esquece do REP+ Desse e do outro tópico que você criou
Cara, oque voce falou nao tem nada a ver com a dúvida dele ;/
Topic :.
Cara, você deu /save antes que o OT caisse? Enfim...
Ao invez de usar o comando /attr você poderia colocar atravéz da database, sqlite, phpmyadmin enfim... Por que assim, era certeza de ser salvo, basta ver o ID da vocação, ir no SQL ou MYSQL e trocar o vocation id por ela.
Se ajudei REP +
info
Grupo: Artesão
Registrado: 20/04/10
Posts: 109
Reputação: +23
Char no Tibia: Charles Mil

Dúvida sanada já resolvi o problema, gostaria de saber agora onde eu mudo as classes que o pode usar cada potion ..
Tem tudo a ver ele pergunto onde edita para que a classe use certa potion presta atenção antes de comentar !
Dúvida sanada já resolvi o problema, gostaria de saber agora onde eu mudo as classes que o pode usar cada potion ..
Presta atenção amigo ele pergunto onde edita para que a classe usa certa potion.
Editado Julho 30 por ADMCharles
Posta aqui o script do Seu /attr pra eu editar.
local itemFuncs ={
["attackspeed"] = setItemAttackSpeed,
["name"] = setItemName,
["plural"] = setItemPluralName,
["attack"] = setItemAttack,
["extraattack"] = setItemExtraAttack,
["defense"] = setItemDefense,
["armor"] = setItemArmor,
["extradefense"] = setItemExtraDefense,
["hitchance"] = setItemHitChance,
["range"] = setItemShootRange,
["actionid"] = doSetItemActionId,
["action"] = doSetItemActionId,
["aid"] = doSetItemActionId,
["description"] = doSetItemSpecialDescription,
["desc"] = doSetItemSpecialDescription,
["protection"] = doSetItemProtection,
["charges"] = doChangeTypeItem,
["count"] = doChangeTypeItem
}
local creatureFuncs =
{
["health"] = doCreatureAddHealth,
["maxhealth"]= setCreatureMaxHealth,
["mana"] = doCreatureAddMana,
["maxmana"] = setCreatureMaxMana,
["speed"] = doChangeSpeed,
["droploot"] = doCreatureSetDropLoot,
["cannotmove"] = doCreatureSetNoMove,
["skull"] = doCreatureSetSkullType,
["redskull"] = doPlayerSetRedSkullTicks
}
local playerFuncs =
{
["fyi"] = doPlayerPopupFYI,
["tutorial"] = doPlayerSendTutorial,
["guildrank"] = doPlayerSetGuildRank,
["guildnick"] = doPlayerSetGuildNick,
["group"] = doPlayerSetGroupId,
["vocation"] = doPlayerSetVocation,
["promotion"] = setPlayerPromotionLevel,
["stamina"] = doPlayerAddStamina,
["town"] = doPlayerSetTown,
["balance"] = doPlayerDepositMoney
}
function onSay(cid, words, param, channel)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end
local pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=1}
if getCreatureLookDirection(cid) == SOUTH then
pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z, stackpos=255}
elseif getCreatureLookDirection(cid) == NORTH then
pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y-1, z=getCreaturePosition(cid).z, stackpos=255}
elseif getCreatureLookDirection(cid) == EAST then
pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255}
elseif getCreatureLookDirection(cid) == WEST then
pos = {x=getCreaturePosition(cid).x-1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255}
end
local t = string.explode(param, ",")
local getThing = getThingFromPos(pos)
if itemFuncs[t[1]] then
if getThing.itemid > 0 then
if itemFuncs[t[1]](getThing.uid, t[2]) then
doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can not add attribute to this item.")
return TRUE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item not found.")
return TRUE
end
elseif creatureFuncs[t[1]] then
if isCreature(getThing.uid) then
if creatureFuncs[t[1]](getThing.uid, t[2]) then
doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can not add attribute to this creature.")
return TRUE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Creature not found.")
return TRUE
end
elseif playerFuncs[t[1]] then
if isPlayer(getThing.uid) then
if playerFuncs[t[1]](getThing.uid, t[2]) then
doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can not add attribute to this player.")
return TRUE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.")
return TRUE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Unknow attribute.")
return TRUE
end
return TRUE
end
Espero ter ajudado!
info
Grupo: Cavaleiro
Registrado: 12/10/09
Posts: 160
Reputação: +19
Gênero: Masculino

Dúvida sanada já resolvi o problema, gostaria de saber agora onde eu mudo as classes que o pode usar cada potion ..
para muda as potions usando cada volcation e assim
data\actions\scripts\liquids
tem 1 arquivo chamado Potions....
dentro dele ta assim .... coloquei para todas as Vocations usar todos potions..... e vo deixa vermelho para vc saber ond muda para suas vocations.. se nao foi isso que pediu desculpa foi oq entendi...
local config = {removeOnUse = "no",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 1.0
}
config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)
local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {1, 2, 3, 4, 5, 6, 7, 8}, vocStr = "knights, sorcerers, druids and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {1, 2, 3, 4, 5, 6, 7, 8}, vocStr = "knights, sorcerers, druids and paladins"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {1, 2, 3, 4, 5, 6, 7, 8}, vocStr = "knights, sorcerers, druids and paladins"}, -- ultimate health potion
[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 4, 5, 6, 7, 8}, vocStr = "knights, sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 600}, level = 80, vocations = {1, 2, 3, 4, 5, 6, 7, 8}, vocStr = "knights, sorcerers, druids and paladins"}, -- great mana potion
[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {1, 2, 3, 4, 5, 6, 7, 8}, vocStr = "knights, sorcerers, druids and paladins"}, -- great spirit potion
}
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return false
end
if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end
if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end
doDecayItem(doCreateItem(2016, potion.splash, toPosition))
doTransformItem(item.uid, potion.empty)
return TRUE
end
if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return TRUE
end
local health = potion.health
if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then
return false
end
local mana = potion.mana
if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then
return false
end
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
if(not realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end
doAddCondition(cid, exhaust)
if(not potion.empty or config.removeOnUse) then
doRemoveItem(item.uid, 1)
return TRUE
end
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, potion.empty, 1)
doPlayerRemoveItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty))
doPlayerAddItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty))
return TRUE
end




info
Grupo: Conde
Registrado: 11/02/09
Posts: 559
Reputação: +7
Char no Tibia: Deep Druid
Eu criei uma classe no meu OT que ela tá sem bugs normal, mas quando eu deslogo o char e volto com ele ele volta sem vocação " You see yourself. You have no vocation. "
Gostaria de saber o porque .. rep+