Olá Xtibia vim aqui tenta solucionar meu problema '-' bom vmos lá
No meu server de (DBZ) qndo a vip acaba as pessoas estão viajando ainda -.- o acces 1 nao sai dos chares mais a premmy sai e no database fica sem prem days e com prem end ai fica com acces 1 , e ganhando exp premmy mais magias vip nao usa.
O script é esse :
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
if getPlayerAccess(cid) >= 1 then
selfSay('Earth,M2,Tsufur,Zelta,Vegeta,Namek,Gardia,Lude,Premia (300 zeni everywhere)')
focus = cid
talk_start = os.clock()
else
selfSay('Only premium players can travel by Capsule.')
focus = 0
talk_start = 0
end
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'earth') then
if pay(cid,300) then
travel(cid, 78, 488, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'm2') then
if pay(cid,300) then
travel(cid, 78, 514, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'tsufur') then
if pay(cid,300) then
travel(cid, 105, 488, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'zelta') then
if pay(cid,300) then
travel(cid, 105, 515, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'vegeta') then
if pay(cid,300) then
travel(cid, 141, 489, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'namek') then
if pay(cid,300) then
travel(cid, 141, 515, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'gardia') then
if pay(cid,300) then
travel(cid, 148, 547, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'lude') then
if pay(cid,300) then
travel(cid, 191, 498, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'premia') then
if pay(cid,300) then
travel(cid, 191, 526, 8)
selfSay('Let\'s go!')
focus = 0
talk_start = 0
else
selfSay('Sorry, you don\'t have enough money.')
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. getCreatureName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 45 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
Alguem pode me ajudar ? :S pf