Ja anotamos seu Pedido, Espere ate que ele esteja pronto.
Mandaremos por PM. Prazo 1 dia
Ja anotamos seu Pedido, Espere ate que ele esteja pronto.
Mandaremos por PM. Prazo 1 dia
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

Em data/creaturescripts/scripts, duplica um arquivo e nomeia para "upstats" se cole:
function onAdvance(cid, oldLevel, newLevel)
local pid = getPlayerGUID(cid)
if (newLevel == 20 and getPlayerStorageValue(cid, 102088) <= 0) then
if (getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 102088, 1)
local bp = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp, 15414, 1)
doAddContainerItem(bp, 15647, 1)
doAddContainerItem(bp, 15404, 1)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 3) then
setPlayerStorageValue(cid, 102088, 1)
local bp2 = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp2, 15643, 1)
doAddContainerItem(bp2, 15648, 1)
doAddContainerItem(bp2, 15649, 1)
doAddContainerItem(bp2, 15644, 1)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2) then
setPlayerStorageValue(cid, 102088, 1)
local bp3 = doPlayerAddItem(cid, 1988, 1)
if (getPlayerVocation(cid) == 1) then
doAddContainerItem(bp3, 2187, 1)
else
doAddContainerItem(bp3, 2183, 1)
end
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid)
return TRUE
end
end
if (newLevel == 50 and getPlayerStorageValue(cid, 102089) <= 0) then
if (getPlayerVocation(cid) == 1) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102089, 1)
doRemoveCreature(cid,true)
return TRUE
elseif (getPlayerVocation(cid) == 2) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102089, 1)
doRemoveCreature(cid,true)
return TRUE
elseif (getPlayerVocation(cid) == 3) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102089, 1)
doRemoveCreature(cid,true)
return TRUE
else
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102089, 1)
doRemoveCreature(cid,true)
return TRUE
end
end
return TRUE
end
Agora em creaturescripts.xml cole a tag:
<event type="advance" name="UpStats" event="script" value="upstats.lua"/>
E por ultimo em creaturescripts/scripts no arquivo login.lua antes do ultimo return true cole a tag:
registerCreatureEvent(cid, "UpStats")
info
Group: Visconde
Joined: 19/08/10
Posts: 379
Reputation: +161
Gender: Masculino
Tibia Character: Hexagrama

cara o script ta certo e bom, mas tem alguns erros
o player chegou ao lvl 20 e nao ganhou skills só ganhou depois do 20 ali pelo 25~30
ao chegar no lvl 50 também nao ganhou vocation só ganhou quando estava no lvl 51~60 e quando promoveu nao ganhou a vocation
09:25 You see yourself. You are .
se puder arrumar ficaria grato
Edited Março 8 by DanielZiyak
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

function onAdvance(cid, oldLevel, newLevel)
local pid = getPlayerGUID(cid)
if (newLevel == 20 and getPlayerStorageValue(cid, 102088) <= 0) then
if (getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 102088, 1)
local bp = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp, 15414, 1)
doAddContainerItem(bp, 15647, 1)
doAddContainerItem(bp, 15404, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 3) then
setPlayerStorageValue(cid, 102088, 1)
local bp2 = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp2, 15643, 1)
doAddContainerItem(bp2, 15648, 1)
doAddContainerItem(bp2, 15649, 1)
doAddContainerItem(bp2, 15644, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2) then
setPlayerStorageValue(cid, 102088, 1)
local bp3 = doPlayerAddItem(cid, 1988, 1)
if (getPlayerVocation(cid) == 1) then
doAddContainerItem(bp3, 2187, 1)
else
doAddContainerItem(bp3, 2183, 1)
end
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid)
return TRUE
end
end
if (newLevel == 50 and getPlayerStorageValue(cid, 102089) <= 0) then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getCreaturePosition(cid), 30)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You have been promoted!")
return TRUE
end
return TRUE
end
Edited Março 8 by Jhon992
info
Group: Visconde
Joined: 19/08/10
Posts: 379
Reputation: +161
Gender: Masculino
Tibia Character: Hexagrama

continua a mesma coisa
15:41 You see yourself. You are .
olha minhas vocations
<!--?xml version="1.0" encoding="UTF-8"?--> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no" droploot="no"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="50" gainhp="100" gainmana="130" gainhpticks="12" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="900" soulmax="50" gainsoulticks="120" fromvoc="1"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="5.0" magdamage="5.0" maghealingdamage="1.0" defense="1.0" magdefense="5.0" armor="1.0"> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="2.0" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="50" gainhp="100" gainmana="130" gainhpticks="12" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="900" soulmax="50" gainsoulticks="120" fromvoc="2"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="5.0" magdamage="5.0" maghealingdamage="1.0" defense="1.0" magdefense="5.0" armor="1.0"> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="2.0" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="60" gainhp="110" gainmana="70" gainhpticks="8" gainhpamount="1" gainmanaticks="4" gainmanaamount="2" manamultiplier="1.4" attackspeed="900" soulmax="50" gainsoulticks="120" fromvoc="3"> <formula meleedamage="1.0" distdamage="5.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="5.0" magdefense="1.0" armor="1.0"> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="3.1" shielding="4.0" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="80" gainhp="130" gainmana="90" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="900" soulmax="50" gainsoulticks="120" fromvoc="4"> <formula meleedamage="5.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.0" club="5.0" sword="5.0" axe="5.0" distance="1.4" shielding="5.0" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="100" gainhp="140" gainmana="150" gainhpticks="12" gainhpamount="1" gainmanaticks="200" gainmanaamount="2" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="9.0" magdamage="9.0" maghealingdamage="2.0" defense="1.0" magdefense="7.0" armor="1.0"> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="3.0"> </skill></formula></vocation> <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="100" gainhp="140" gainmana="150" gainhpticks="12" gainhpamount="1" gainmanaticks="200" gainmanaamount="2" manamultiplier="1.1" attackspeed="800" soulmax="100" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="9.0" magdamage="9.0" maghealingdamage="2.0" defense="1.0" magdefense="7.0" armor="1.0"> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="3.0"> </skill></formula></vocation> <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="200" gainhp="125" gainmana="125" gainhpticks="6" gainhpamount="1" gainmanaticks="200" gainmanaamount="2" manamultiplier="1.4" attackspeed="800" soulmax="100" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleedamage="1.0" distdamage="7.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="2.0" defense="7.0" magdefense="1.0" armor="1.0"> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="5.1" shielding="6.0" fishing="1.1" experience="3.0"> </skill></formula></vocation> <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="250" gainhp="150" gainmana="120" gainhpticks="4" gainhpamount="1" gainmanaticks="200" gainmanaamount="2" manamultiplier="3.0" attackspeed="800" soulmax="100" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleedamage="7.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="2.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.1" club="7.0" sword="7.0" axe="7.0" distance="1.5" shielding="7.0" fishing="1.1" experience="3.0"> </skill></formula></vocation> </vocations>
eu mudei os IDS no script pra eu nao ter que mudar denovo se voce for me ajudar muda apartir desse:
function onAdvance(cid, oldLevel, newLevel)
local pid = getPlayerGUID(cid)
if (newLevel == 12 and getPlayerStorageValue(cid, 102089) <= 0) then
if (getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 102089, 1)
local bp = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp, 2395, 1)
doAddContainerItem(bp, 2195, 1)
doAddContainerItem(bp, 2519, 1)
doAddContainerItem(bp, 2491, 1)
doAddContainerItem(bp, 2488, 1)
doAddContainerItem(bp, 2487, 1)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 3) then
setPlayerStorageValue(cid, 102089, 1)
local bp2 = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp2, 8891, 1)
doAddContainerItem(bp2, 2195, 1)
doAddContainerItem(bp2, 8851, 1)
doAddContainerItem(bp2, 6529, 1)
doAddContainerItem(bp2, 2470, 1)
doAddContainerItem(bp2, 2471, 1)
doAddContainerItem(bp2, 7367, 1)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2) then
setPlayerStorageValue(cid, 102089, 1)
local bp3 = doPlayerAddItem(cid, 1988, 1)
if (getPlayerVocation(cid) == 1) then
doAddContainerItem(bp3, 2188, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
else
doAddContainerItem(bp3, 2185, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
end
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid)
return TRUE
end
end
if (newLevel == 200 and getPlayerStorageValue(cid, 102090) <= 0) then
if (getPlayerVocation(cid) == 1) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid,true)
return TRUE
elseif (getPlayerVocation(cid) == 2) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid,true)
return TRUE
elseif (getPlayerVocation(cid) == 3) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid,true)
return TRUE
else
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid,true)
return TRUE
end
end
return TRUE
end
o que pode ser errado?
Edited Março 8 by DanielZiyak
Ve se este aqui vai funcionar!
function onAdvance(cid, oldLevel, newLevel)
local pid = getPlayerGUID(cid)
if (newLevel == 12 and getPlayerStorageValue(cid, 102089) <= 0) then
if (getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 102089, 1)
local bp = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp, 2395, 1)
doAddContainerItem(bp, 2195, 1)
doAddContainerItem(bp, 2519, 1)
doAddContainerItem(bp, 2491, 1)
doAddContainerItem(bp, 2488, 1)
doAddContainerItem(bp, 2487, 1)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 3) then
setPlayerStorageValue(cid, 102089, 2)
local bp2 = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp2, 8891, 1)
doAddContainerItem(bp2, 2195, 1)
doAddContainerItem(bp2, 8851, 1)
doAddContainerItem(bp2, 6529, 1)
doAddContainerItem(bp2, 2470, 1)
doAddContainerItem(bp2, 2471, 1)
doAddContainerItem(bp2, 7367, 1)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
return TRUE
end
if getPlayerVocation(cid) == 1 then
setPlayerStorageValue(cid, 102089, 3)
local bp3 = doPlayerAddItem(cid, 1988, 1)
if (getPlayerVocation(cid) == 1) then
doAddContainerItem(bp3, 2188, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
elseif getPlayerVocation(cid) == 2 then
setPlayerStorageValue(cid, 102089, 4)
doAddContainerItem(bp3, 2185, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
end
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid)
return TRUE
end
end
if (newLevel == 200 and getPlayerStorageValue(cid, 102090) <= 0) then
if (getPlayerVocation(cid) == 1) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid,true)
return TRUE
elseif (getPlayerVocation(cid) == 2) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 2)
doRemoveCreature(cid,true)
return TRUE
elseif (getPlayerVocation(cid) == 3) then
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 3)
doRemoveCreature(cid,true)
return TRUE
else
setPlayerPromotionLevel(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 4)
doRemoveCreature(cid,true)
return TRUE
end
end
return TRUE
end
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

function onAdvance(cid, oldLevel, newLevel)
local pid = getPlayerGUID(cid)
if (newLevel == 12 and getPlayerStorageValue(cid, 102089) <= 0) then
if (getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 102089, 1)
local bp = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp, 2395, 1)
doAddContainerItem(bp, 2195, 1)
doAddContainerItem(bp, 2519, 1)
doAddContainerItem(bp, 2491, 1)
doAddContainerItem(bp, 2488, 1)
doAddContainerItem(bp, 2487, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 3) then
setPlayerStorageValue(cid, 102089, 1)
local bp2 = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp2, 8891, 1)
doAddContainerItem(bp2, 2195, 1)
doAddContainerItem(bp2, 8851, 1)
doAddContainerItem(bp2, 6529, 1)
doAddContainerItem(bp2, 2470, 1)
doAddContainerItem(bp2, 2471, 1)
doAddContainerItem(bp2, 7367, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2) then
setPlayerStorageValue(cid, 102089, 1)
local bp3 = doPlayerAddItem(cid, 1988, 1)
if (getPlayerVocation(cid) == 1) then
doAddContainerItem(bp3, 2188, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
else
doAddContainerItem(bp3, 2185, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
end
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid)
return TRUE
end
end
if (newLevel == 200 and getPlayerStorageValue(cid, 102090) <= 0) then
if (getPlayerVocation(cid) == 1) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
elseif (getPlayerVocation(cid) == 2) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
elseif (getPlayerVocation(cid) == 3) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
else
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
end
end
return TRUE
end
info
Group: Visconde
Joined: 19/08/10
Posts: 379
Reputation: +161
Gender: Masculino
Tibia Character: Hexagrama

function onAdvance(cid, oldLevel, newLevel) local pid = getPlayerGUID(cid) if (newLevel == 12 and getPlayerStorageValue(cid, 102089) <= 0) then if (getPlayerVocation(cid) == 4) then setPlayerStorageValue(cid, 102089, 1) local bp = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bp, 2395, 1) doAddContainerItem(bp, 2195, 1) doAddContainerItem(bp, 2519, 1) doAddContainerItem(bp, 2491, 1) doAddContainerItem(bp, 2488, 1) doAddContainerItem(bp, 2487, 1) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";") return TRUE end if (getPlayerVocation(cid) == 3) then setPlayerStorageValue(cid, 102089, 1) local bp2 = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bp2, 8891, 1) doAddContainerItem(bp2, 2195, 1) doAddContainerItem(bp2, 8851, 1) doAddContainerItem(bp2, 6529, 1) doAddContainerItem(bp2, 2470, 1) doAddContainerItem(bp2, 2471, 1) doAddContainerItem(bp2, 7367, 1) doRemoveCreature(cid) db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";") return TRUE end if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2) then setPlayerStorageValue(cid, 102089, 1) local bp3 = doPlayerAddItem(cid, 1988, 1) if (getPlayerVocation(cid) == 1) then doAddContainerItem(bp3, 2188, 1) doAddContainerItem(bp3, 2195, 1) doAddContainerItem(bp3, 7730, 1) doAddContainerItem(bp3, 2656, 1) doAddContainerItem(bp3, 2499, 1) else doAddContainerItem(bp3, 2185, 1) doAddContainerItem(bp3, 2195, 1) doAddContainerItem(bp3, 7730, 1) doAddContainerItem(bp3, 2656, 1) doAddContainerItem(bp3, 2499, 1) end doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid) return TRUE end end if (newLevel == 200 and getPlayerStorageValue(cid, 102090) <= 0) then if (getPlayerVocation(cid) == 1) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) setPlayerStorageValue(cid, 102090, 1) doRemoveCreature(cid) return TRUE elseif (getPlayerVocation(cid) == 2) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) setPlayerStorageValue(cid, 102090, 1) doRemoveCreature(cid) return TRUE elseif (getPlayerVocation(cid) == 3) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) setPlayerStorageValue(cid, 102090, 1) doRemoveCreature(cid) return TRUE else doPlayerSetVocation(cid, getPlayerVocation(cid)+4) setPlayerStorageValue(cid, 102090, 1) doRemoveCreature(cid) return TRUE end end return TRUE end
Jhon nao deu erro, mas o player ficou na mesma vocation, caraca que dificil isso ![]()
Edited Março 8 by DanielZiyak
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

Isso que era simples néh, sahuda. Agora vai funcionar, testa com um char que tu n fez ainda.
function onAdvance(cid, oldLevel, newLevel)
local pid = getPlayerGUID(cid)
if (getPlayerLevel(cid) == 12 and getPlayerStorageValue(cid, 102089) <= 0) then
if (getPlayerVocation(cid) == 4) then
setPlayerStorageValue(cid, 102089, 1)
local bp = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp, 2395, 1)
doAddContainerItem(bp, 2195, 1)
doAddContainerItem(bp, 2519, 1)
doAddContainerItem(bp, 2491, 1)
doAddContainerItem(bp, 2488, 1)
doAddContainerItem(bp, 2487, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 3) then
setPlayerStorageValue(cid, 102089, 1)
local bp2 = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bp2, 8891, 1)
doAddContainerItem(bp2, 2195, 1)
doAddContainerItem(bp2, 8851, 1)
doAddContainerItem(bp2, 6529, 1)
doAddContainerItem(bp2, 2470, 1)
doAddContainerItem(bp2, 2471, 1)
doAddContainerItem(bp2, 7367, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";")
db.executeQuery("UPDATE `player_skills` SET `value` = ".. 20 .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";")
return TRUE
end
if (getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2) then
setPlayerStorageValue(cid, 102089, 1)
local bp3 = doPlayerAddItem(cid, 1988, 1)
if (getPlayerVocation(cid) == 1) then
doAddContainerItem(bp3, 2188, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
else
doAddContainerItem(bp3, 2185, 1)
doAddContainerItem(bp3, 2195, 1)
doAddContainerItem(bp3, 7730, 1)
doAddContainerItem(bp3, 2656, 1)
doAddContainerItem(bp3, 2499, 1)
end
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `maglevel` = " .. 20 .. " WHERE `id` = "..pid)
return TRUE
end
end
if (getPlayerLevel(cid) == 200 and getPlayerStorageValue(cid, 102090) <= 0) then
if (getPlayerVocation(cid) == 1) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
elseif (getPlayerVocation(cid) == 2) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
elseif (getPlayerVocation(cid) == 3) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
else
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
setPlayerStorageValue(cid, 102090, 1)
doRemoveCreature(cid)
return TRUE
end
end
return TRUE
end
info
Group: Visconde
Joined: 19/08/10
Posts: 379
Reputation: +161
Gender: Masculino
Tibia Character: Hexagrama

10:34 You see yourself. You are a knight.
cara melhor deixar nem vai dar isso :S ja dando os itens a bom, eu axo que vou criar uma porta pra lvl 200 passar e falar com um npc, mais facil ![]()
REP+ jhon pela ajuda e pela paciencia
info
Group: Visconde
Joined: 19/08/10
Posts: 379
Reputation: +161
Gender: Masculino
Tibia Character: Hexagrama
Eae galera, vim pedir alguns scripts, são muito simples (eu penso) mas não consigo fazer, espero que me ajudem ;D.
Versão: 9.44
Servidor Utilizado: Crystal Server
Experiencia: médio, sei como adicionar e editar o script, só quero eles prontos
tipo do script: creaturescript (eu creio)
Script1:
Quando o player chega no lvl 20, ganha +20 de todos os skills.
kina: shield, axe, club, sword)
paladin: distance, shield)
druid e sorcerer: Magic level)
Script2:
Quando um player chega no lvl 20 ganha tal item:
Kina: ganha uma sword, axe e club de id: 15414, 15647, 15404
Paladin: ganha um crossbow, bolt, arrow e bow de IDS: 15643, 15648, 15649, 15644
Druid ganha uma rod de id: 2183
Sorcerer ganha uma wand de id: 2187
se possivel oss players receber os itens dentro de uma backpack.
Script3:
Quando o player chega no level 50 ganha promotion
Druid -> Elder Druid
Sorcerer -> Master Sorcerer
Paladin -> Royal Paladin
Knight -> Elite Knight
Script4:
Um script simples onde só elder, master, royal e elite promotions pode passar.
É isso ai galera, estou precisando muuito, mesmo, se alguém puder ajudar eu dou REP+, vlw