Olá !
Alguem ai teria um scrit de sistema vip para tfs 0.4, server 8.6 sqlite ?
Com tag [VIP] e exp 50% +.
Alguem poderia me ajudar com isso ?
Agradeço desde ja !
Olá !
Alguem ai teria um scrit de sistema vip para tfs 0.4, server 8.6 sqlite ?
Com tag [VIP] e exp 50% +.
Alguem poderia me ajudar com isso ?
Agradeço desde ja !
use esse systema vip.
http://www.xtibia.co...-vip-system-20/
50%xp pra vip..
em Creaturescript/script Crie um arquivo.lua e renomeie para :
vipexp.lua
function onLogin(cid) local rate = 1.5 -- 50% local config = { welvip = "você tem "..((rate - 1)*100).."% de exp a mais agora!", not_vip = "Tornesse vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!", s = 13540, -- storage vip } if getPlayerStorageValue(cid, config.s) - os.time() >= 1 then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.welvip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.not_vip) end return TRUE end
em Creaturescript/script/login.lua adicione:
registerCreatureEvent(cid, "ExpVip")
em Creaturescript.xml adicione a tag:
<event type="login" name="ExpVip" script="vipexp.lua"/>
e aqui vip nick. sai quando akba a vip.
em creaturescripts/scripts criem um arquivo chamado vipname.lua e coloquem isso
function pegarNome(name) return string.sub(name, 7) end function onLogin(cid) local name = getCreatureName(cid) local nome = getPlayerGUID(cid) if isVip(cid) then if string.sub(name, 1,6) == "[VIP] " then return true else db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"You go kicked in 10 seconds for update you name.") addEvent(doRemoveCreature,10000,cid) end else if string.sub(name, 1,6) == "[VIP] " then db.executeQuery("UPDATE `players` SET `name` = '"..pegarNome(getCreatureName(cid)).."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"You go kicked in 10 seconds for update you name.") addEvent(doRemoveCreature,10000,cid) end end return true end
no login.lua,no meio dos registerCreatureEvent, coloquem isso:
registerCreatureEvent(cid, "vipname")
e no creaturescripts.xml coloquem isso:
<event type="login" name="vipname" event="script" value="vipname.lua"/>
REP+?
Te Ajudei? Então REP+