Script, Voltar Para Vocação Free

pablofozz
em Scripts

pablofozz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/06/07Posts: 12

Meu sistema da a vocação vip automaticamente e qnd termina a vip teleporta o player pro templo de carlin, porem eu preciso de algum script q quando termia a vip faz a vocação voltar para vocação free.

Alguem pode ajudar?

Oneshot

avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 05/07/09Posts: 1347

Bom, acho que o modo mais fácil, seria, bem, usar essa função:

 

setPromotionLevel(cid, 1)

 

Abraços.

caotic

Afinal de contas,sou um mordomo e tanto
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 04/03/11Posts: 1599Char no Tibia: No Have

e oneshot nao ta errado mais

 

passe o seu sistema de teleport quando o o premuin acaba

pablofozz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/06/07Posts: 12
function onLogin(cid)

local temple = { x =721, y = 598, z = 7}

if vip.hasVip(cid) == true then

if getPlayerStorageValue(cid,55555) ~= 1 then

setPlayerStorageValue(cid,55555,1)

end

else

if getPlayerStorageValue(cid,55555) == 1 then

doTeleportThing(cid, temple)

doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")

db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")

setPlayerPromotionLevel(cid, 1)

setPlayerStorageValue(cid, 55555, 0)

end

end

return true

end

 

sera q se eu editar

setPlayerPromotionLevel(cid, 1)

para

setPlayerPromotionLevel(cid, 0)

da vai dar certo?

caotic

Afinal de contas,sou um mordomo e tanto
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 04/03/11Posts: 1599Char no Tibia: No Have

function onLogin(cid)

local temple = { x =721, y = 598, z = 7}

local voca = 6 ----------mude para o id da vocaçao que vai voltar----------------

if vip.hasVip(cid) == true then

if getPlayerStorageValue(cid,55555) ~= 1 then

setPlayerStorageValue(cid,55555,1)

end

else

if getPlayerStorageValue(cid,55555) == 1 then

doTeleportThing(cid, temple)

doPlayerSetVocation(cid, voc)

doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")

db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")

setPlayerPromotionLevel(cid, 1)

setPlayerStorageValue(cid, 55555, 0)

end

end

return true

end

pablofozz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/06/07Posts: 12

ok mais uma hora e kina outra hora e pally, como vo faze?

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Gente, é só diminuir por -4, doPlayerSetVocation(cid,(getPlayerVocation(cid)-4))

 

function onLogin(cid)
local temple = { x =721, y = 598, z = 7}
if vip.hasVip(cid) == true then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
else
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, temple)
doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")
db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")
doPlayerSetVocation(cid,(getPlayerVocation(cid)-4))
setPlayerStorageValue(cid, 55555, 0)
end
end
return true
end

 

Substitua.

Atenciosamente, Vilden.