eu nao costumo olhar o level recompense porque eu acho muitos pelo xtibia mais esse dai em vez de dar dinheiro da itens tmb vou testar aki mais parece ser muito bom
- Forums
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- [Creaturescripts] Level Recompense
ZM
[Creaturescripts] Level Recompense
By Zmovir, 29 de abr. de 2012 in Globalevents e Spells
otserv
tibia
script
3
1.2k
info
Group: Visconde
Joined: 11/04/12
Posts: 328
Reputation: +7
Tibia Character: ADM MiHawk

29 de abril de 2012 às 22:05
1 month later...
info
Group: Campones
Joined: 14/12/10
Posts: 63
Reputation: +10
Tibia Character: Naoteinteressa

13 de maio de 2012 às 21:40
Testei os 2 scripts aqui e não funcionou ![]()


info
Group: Barão
Joined: 28/09/10
Posts: 237
Reputation: +41
Olá galerinha do Xtibia fiz um script aki à pedido de um amigo meu acho que ja existe um parecido no forum mais sem delongas vamo ao script
Primeiramente va em /data/creaturescripts/scripts crie um arquivo com nome de recompenselvl ou um de sua preferencia
coloque isso dentro:
function onAdvance(cid, oldLevel, newLevel)
local t = {
[50] = {itemid = 0, quant = 0 ,stor = 35322}, -- level, itemid,quant,storage!
[100]= {itemid = 0, quant = 0 ,stor = 35333},
[150] = {itemid = 0, quant = 0 ,stor = 35344}
}
if getPlayerStorageValue(cid, t[getPlayerLevel(cid)]) == -1 then
doPlayerAddItem(cid,t[getPlayerLevel(cid)].itemid,t[getPlayerLevel(cid)].quant)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Você recebeu "..t.quant.."" .. getItemNameById(t[getPlayerVocation(cid)].itemid) .. " Por chegar ao level "..getPlayerLevel(cid).."")
setPlayerStorageValue(cid,t[getPlayerLevel(cid)].stor,1)
return true
end
end
ou
function onAdvance(cid, oldLevel, newLevel)
local t = {
[50] = {itemid = 0, quant = 0 ,stor = 35322}, -- level, itemid,quant,storage!
[100]= {itemid = 0, quant = 0 ,stor = 35333},
[150] = {itemid = 0, quant = 0 ,stor = 35344}
}
if getPlayerStorageValue(cid, t[getPlayerLevel(cid)]) == -1 and getPlayerLevel(cid) >= t[getPlayerLevel(cid)] then
doPlayerAddItem(cid,t[getPlayerLevel(cid)].itemid,t[getPlayerLevel(cid)].quant)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Você recebeu "..t.quant.."" .. getItemNameById(t[getPlayerVocation(cid)].itemid) .. " Por chegar ao level "..getPlayerLevel(cid).."")
setPlayerStorageValue(cid,t[getPlayerLevel(cid)].stor,1)
else
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Você nao pode pegar a recompensa 2x!")
return true
end
end
em creaturescripts.xml adcione isso
na mesma pasta em login.lua adcione essa linha
Explicando
em colchetes o level necessario, em itemid o item que ira ganhar, em quant a quantidade em stor o storage pra ele nao upar dnv e ganhar o item
para colocar mais e so adcionar mais uma linha [100]= {itemid = 0, quant = 0 ,stor = 35333}, e modificar exemplo:
Tem 2 scripts no topico testé os dois
Qualquer erro reporte no topico