Qualquer Player pode usar ou é apenas para Vip? Se for só Vip usar, qual o sistema Vip você usa?
Talk Action Para Second Promotion
By marciks, 11 de out. de 2012 in Scripts
info
Group: Cavaleiro
Joined: 19/11/10
Posts: 190
Reputation: +36
Tibia Character: Frenesy

info
Group: Campones
Joined: 12/08/12
Posts: 58
Reputation: +7
Tibia Character: Kung san

Eu peguei um script de npc, acho que era do vodkart e modifiquei para talkaction
function onSay(cid, words, param, channel)
local price = 14000
local vocations = {5,6,7,8}
local level = 20
if isInArray(vocations, getPlayerVocation(cid)) then
if getPlayerLevel(cid) >= level then
if doPlayerRemoveItem(cid,11192,5000) == TRUE then
local new = (getPlayerVocation(cid)+4)
doPlayerSetVocation(cid,new)
setPlayerStorageValue(cid, 878975, new)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
doCreatureSay(cid, "Second Promotion Ativada", TALKTYPE_ORANGE_1)
else
doPlayerSendTextMessage(cid,18,'Você não tem ' .. price .. ' vip coins para ser promovido')
end
else
doPlayerSendTextMessage(cid,18,'Desculpe, você precisa ter level '.. level .. ' ou mais para se promover!')
end
else
doPlayerSendTextMessage(cid,18,'Desculpe, mais você não possui a primeira promotion.')
end
end
Deu certinho mas ha um problema com a second promotion...
o player qnd usa magia sobe muito rapido de skill pois o ot é subwat (high rates). na primeira promotion o magic level para em 115
agora na second ta sem limites, hoje o cara fico dois minutos usando uma magia e pego 130k de ml.
agora so preciso saber como por um limite de skills, dizem que é nas sources mas acho que tem geito de por no creaturescripts..
Se puder ajudar nessa outra duvida fico grato mano
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

eu acho que isto tenque mudar no vocations.xml
info
Group: Campones
Joined: 12/08/12
Posts: 58
Reputation: +7
Tibia Character: Kung san

o que teria que mudar no vocations.xml?
Se eu não me engano, retornar false em um creaturescript onAdvance funciona como um limitador de skills e maglevel.
Ficaria mais ou menos assim.
local skills = {
[sKILL_FIST] = 400,
[sKILL_CLUB] = 400,
[sKILL_SWORD] = 400,
[sKILL_AXE] = 400,
[sKILL_DISTANCE] = 400,
[sKILL_SHIELD] = 400,
[sKILL__MAGLEVEL] = 300
}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL then
return true
end
if not skills[skill] then
return true
end
if newLevel > skills[skill] then
return false
end
end
Abraços.
Edited Outubro 22 by Oneshot





info
Group: Campones
Joined: 12/08/12
Posts: 58
Reputation: +7
Tibia Character: Kung san
preciso de um script que de a second promotion para um player por um item.
Exemplo:se o player tiver 25000 vip coins (id:11192) e Tiver uma das primeiras Vocaçoes da primeira promotion (id da vocaçao: do 5 ao 8) ele pode falar !secondpromotion e vira a segunda promotion com as vocations novas (secondvocation id:9,10,11,12)
Agradeço a toda ajuda
Edited Outubro 11 by marciks