Para akeles ots q é /addvip "e o nome do player esta aki o npc pros players nao ficarem esperando algum gm ou god entra pra paga vip...
Primeiro va na pasta NPC e depois copie um arquivo e renomie para Dimi, e coloque isso dentro:
<?xml version="1.0"?><npc name="Dimi" script="data/npc/scripts/Dimi.lua" access="3" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="266" head="78" body="113" legs="114" feet="0"/>
</npc>
Depois va em Npc/Scripts copie um arquivo lua e renomei para dimi e cole isso dentro.
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
selfSay('Hello ' .. creatureGetName(cid) .. '! Eu vendo vip por 1kk.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'vip') then
selfSay('Você deseja comprar uma VIP por 1kk?')
talk_start = os.clock()
end
if msgcontains(msg, 'yes') then
if pay(cid,1000000) then
setPlayerStorageValue(cid,13540,1)
selfSay('Você comprou uma VIP!')
talk_start = os.clock()
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 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
explicação:
Vermelho: é o preço da vip
Azul: é a action da vip.
Bom é isso dps é so colocar no ot!!
Espero ter ajudado!
Creditos:
turucai:50%
Luquette:50%
Falowsss!