Olá galera XTibiana, postei duas dúvidas para não criar outro tópico.
1° - O meu vip system não funfa, se alguem puder me ajudar eis o script:
(data\movements. xml):
<movevent type="StepIn" actionid="29000" event="script" value="vipsystem.lua"/>
(data\movements\scripts\vipsystem.lua)
function onStepIn(cid, item, position, fromPosition)timenow = os.time()
quantity = math.floor((getPlayerStorageValue(cid,29000) - timenow)/(3600*24))
if isPlayer(cid) then
if quantity > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você ainda tem ".. quantity .." dia(s) restante(s) de VIP.")
else
dir = getPlayerLookDir(cid)
pos = getCreaturePosition(cid)
if dir == 0 then
newpos = {x=pos.x, y=pos.y+1, z=pos.z}
elseif dir == 2 then
newpos = {x=pos.x, y=pos.y-1, z=pos.z}
elseif dir == 1 then
newpos = {x=pos.x-1, y=pos.y, z=pos.z}
elseif dir == 3 then
newpos = {x=pos.x+1, y=pos.y, z=pos.z}
end
doTeleportThing(cid, newpos, dir)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Somente jogadores VIPs podem entrar nesta área.")
end
end
end
(data\talkactions)
<talkaction log="yes" access="5" words="/addvip" event="script" value="addvip.lua"/>
(data\talkactions\scripts\addvip.lua)
function onSay(cid, words, param)
-- configs
access = 1
days = 30
-- end configs
player = getPlayerByName(param)
daysvalue = days*3600*24
storageplayer = getPlayerStorageValue(player,29000)
timenow = os.time()
if storageplayer == -1 or storageplayer == 0 then
time = timenow+daysvalue
else
time = storageplayer+daysvalue
end
if param ~= "" then
if getPlayerGroupId(cid) >= access then
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adcionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(player,29000,time)
quantity = math.floor((getPlayerStorageValue(player,29000) - timenow)/(3600*24))
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente jogadores com acesso maior que "..access.." podem adcionar vips.")
end
end
end
(data\creaturescripts)
<event type="login" name="VipLogin" script="vip.lua"/>
(data\creaturescripts\scripts\vip.lua)
-- configstemplepos = {x=200,y=200,z=7}
cityid = 1
-- end configs
function onLogin(cid)
timenow = os.time()
viptime = getPlayerStorageValue(cid,29000)
quantity = math.floor((getPlayerStorageValue(cid,29000) - timenow)/(3600*24))
if quantity <= 0 and viptime > 0 then
setPlayerStorageValue(cid,29000,0)
doTeleportThing(cid,templepos)
-- setPlayerTown (estou sem minha listinha de functions para ver qual function que é para colocar townid), você pode colocar aqui se quiser
end
return TRUE
end
O Vip system é isso aí.
E tenho outra dúvida também, se alguem me passar um link de como criar spell em 8.5 ou modificar ás de 8.4, porquê as minhas não dão exhausted nem tiram mana.
Abraços.