Ola :XTibia_smile: eu to querendo um systema que quando o player vire vip a promotion ex: viro vip ele vira epic master sorcerer e quando a vip do player acaba a promotion volte para master sorcerer
Flws espero respostas ;D
Ola :XTibia_smile: eu to querendo um systema que quando o player vire vip a promotion ex: viro vip ele vira epic master sorcerer e quando a vip do player acaba a promotion volte para master sorcerer
Flws espero respostas ;D
preciso saber de 2 coisas basicas,
primeira qual o sistema vip do seu servidor.
e a segunda qual é o id das suas vip promotion (epic)
esse e o systema vip :
-- [( Script edited by: DoidinMapper )] -- function onLogin(cid) local pos = {x=160, y=57, z=7} if vip.hasVip(cid) == TRUE then if getPlayerStorageValue(cid,55555) ~= 1 then setPlayerStorageValue(cid,55555,1) end elseif vip.hasVip(cid) ~= TRUE and vip.getVip(cid) ~= 0 then if getPlayerStorageValue(cid,55555) == 1 then doTeleportThing(cid, pos, TRUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your VIP's over!") doPlayerSendTextMessage(cid,22,"Your VIP's over!") setPlayerPromotionLevel(cid, 1) setPlayerStorageValue(cid,55555,2) elseif getPlayerStorageValue(cid,55555) == -1 then setPlayerStorageValue(cid,55555,2) end end return TRUE end
e aki e as vocaçao que e pra vira
<vocation id="9" name="Dragon Master" description="an dragon master" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="40" gainmanaticks="2" gainmanaamount="70" manamultiplier="1.1" attackspeed="1900" soulmax="299" gainsoulticks="15" fromvoc="5" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="2.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="2.0"/> <skill id="2" multiplier="2.0"/> <skill id="3" multiplier="2.0"/> <skill id="4" multiplier="2.0"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="10" name="Dragon Elder" description="an dragon elder" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="40" gainmanaticks="2" gainmanaamount="70" manamultiplier="1.1" attackspeed="1900" soulmax="299" gainsoulticks="15" fromvoc="6" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="2.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="1.8"/> <skill id="2" multiplier="1.8"/> <skill id="3" multiplier="1.8"/> <skill id="4" multiplier="1.8"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="11" name="Dragon Royal" description="an dragon royal" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="60" gainmanaticks="3" gainmanaamount="60" manamultiplier="1.4" attackspeed="1900" soulmax="299" gainsoulticks="15" fromvoc="7" lessloss="30"> <formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.2"/> <skill id="1" multiplier="1.2"/> <skill id="2" multiplier="1.2"/> <skill id="3" multiplier="1.2"/> <skill id="4" multiplier="1.1"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="12" name="Dragon Elite" description="an dragon elite" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="70" gainmanaticks="4" gainmanaamount="50" manamultiplier="3.0" attackspeed="1900" soulmax="299" gainsoulticks="15" fromvoc="8" lessloss="30"> <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.1"/> <skill id="1" multiplier="1.1"/> <skill id="2" multiplier="1.1"/> <skill id="3" multiplier="1.1"/> <skill id="4" multiplier="1.4"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/>
ok vamos fazer pelo Creaturescript,onLogin...
obs: Para se tornar epic(2° promote),além de ser vip ele terá que ter a primeira promotion...(caso nao queira desse modo me avise)
em creaturescript/script crie um arquivo.lua e renomeie para:
promotevip.lua
--[[ by vodkart ]]-- function onLogin(cid) if vip.hasVip(cid) == TRUE then if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)+4) end elseif vip.hasVip(cid) == FALSE and vip.getVip(cid) == 0 then if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then -- id das vocation epic doPlayerSetVocation(cid,getPlayerVocation(cid)-4) end end return TRUE end
creaturescript.xml
<event type="login" name="EpicVip" script="promotevip.lua"/>
Nossa vlw msm deu certo vlw ;D
to te devendo uma tava atrais disso faz tempo ;D
uma outra coisa no site nao muda fica como elder druid ainda ;s e fica falando que a pesso n e vip vc sabe como aruma isso? uso o gestor acc maker
Tópico movido para a subseção da area.
luisfe23 here
Aew ta dando certo mais quando muda de vocação não da pra usar potions o/ alguem me fala como aruma e as espada club wands rod axe tbm não da pra usar
vai em
data/Lib/031-vocations.lua
e deixa assim:
function isSorcerer(cid) return isInArray({1, 5 , 9}, getPlayerVocation(cid)) end function isDruid(cid) return isInArray({2, 6 , 10}, getPlayerVocation(cid)) end function isPaladin(cid) return isInArray({3, 7 , 11}, getPlayerVocation(cid)) end function isKnight(cid) return isInArray({4, 8 , 12}, getPlayerVocation(cid)) end function isRookie(cid) return isInArray({0}, getPlayerVocation(cid)) end
e nas armas vc tem que ir em movements.xml
e ir adicionando os id da vocação exemplo:
<movevent type="Equip" itemid="2477" slot="legs" event="function" value="onEquipItem"> <vocation id="4"/> -- knight <vocation id="3"/> -- paladin <vocation id="11"/> -- royal paladin <vocation id="12"/> -- elite knight </movevent>
deu certo vlw soque as potions onde que aruma?
as potions é em
actions/scripts/liquids/potions.lua
ai lá dentro tem umas parte assim
vocations = {1, 2, 3, 5, 6, 7}
ai só ir adicionando as vocações
Aew vlw msm ;D
so que nao tem 1 geito + fácil pra arruma os itmes sem ter de ir add as vocações em cada item?
é.. tenso...
trabalhoso "/
EQUIPE SYNGAME - [ADM] Synyster [GOD] Zack
SKYPE: synyster.servegame
MSN: synyster.servegame@hotmail.com
O meu sistema de VIP e esse daqui: Como fica essa script pra mim? pra mudar o nome e vocacao do player ao receber a vip?!
-- Script SYtem vip 1.0 --
function onSay(cid, words, param)
if(words == "!buyvip") then
local price = 3000000
if doPlayerRemoveMoney(cid, 3000000) == TRUE then
local days = 30
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13540)
local timenow = os.time()
if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 13540, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.")
end
elseif(words == "!vipdays") then
local timenow = os.time()
local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.")
elseif(words == "/checkvip") then
if getPlayerAccess(cid) == 5 then
if not param then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end
local player = getPlayerByName(param)
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
local timenow = os.time()
local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60))
doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.")
return TRUE
end
elseif(words == "/addvip") then
if getPlayerAccess(cid) == 5 then
local t = string.explode(param, ",")
if not t[2] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end
local player = getPlayerByName(t[1])
local days = t[2]
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
local daysvalue = days*3600*24
local storageplayer = getPlayerStorageValue(player, 13540)
local timenow = os.time()
local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.")
setPlayerStorageValue(player, 13540, time)
local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24))
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.")
end
function onLogin(cid)
if getPlayerStorageValue(cid, 15000) - os.time() >= 1 then
doPlayerSetSpecialDescription(cid, " [Vip Account]")
end
return TRUE
end
elseif(words == "/delvip") then
if getPlayerAccess(cid) == 5 then
local dec = MESSAGE_INFO_DESCR
if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end
local C,t = {},string.explode(param, ",")
C.pos = getPlayerPosition(cid)
C.uid = getCreatureByName(t[1])
C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia.
C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip.
local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
if(getPlayerStorageValue(C.uid,13540) < C.time)then
doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.')
else
doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.')
setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time)
end
doSendMagicEffect(C.pos, math.random(28,30))
end
end
return TRUE
end
vodkart, funfou no system do mock, mais na hora que o char desloga e loga, fica sem vocations nenhuma, aparece só you are.
oi Vodkart
aqui deu certinho
mas qnd da look no char aparece a vocação antiga
tipo
elder druid
e qnd morre n acha o templo pq e vip
e quem n é vip acha
ajuda ae