peeuowfe 0 Postado Outubro 11, 2012 Share Postado Outubro 11, 2012 Nao sei se é uma duvida ou um pedido, botei pedido mais tudo bem! Tou precisando de um system vip que exemplo, quando eu por /addvip nomedoplayer, days dai automaticamente o nome dele mude pra [VIP] Nomedoplayer. Que adicione o [VIP] No começo do nome, sendo que quando eu por o /addvip e o nome dele tiver normal sem o [VIP] ele tem exemplo 5 segundo pra sair, dai se passar 5 segundo o player automaticamente da logout! RESULMINDO Eu de /addvip nomedoplayer, days, 5 segundos pra logar dai se passar 5 ssegundo da loggout e quando o player entra dinovo aparece [VIP] Nome do Player! Obrigado Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/ Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 11, 2012 Share Postado Outubro 11, 2012 editei uma talkaction para você va em data / talkactions / scripts / e o arquivo que ta o script que compra a vip e troque por isto -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 1000000 if doPlayerRemoveMoney(cid, 1000000) == TRUE then local days = 7 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() if getPlayerStorageValue(cid, 13545) - 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.") db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") addEvent(doRemoveCreature, 5*1000, cid, true) setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - 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, 13545) - 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, 13545) - 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, 13545) 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, 13545, time) local quantity = math.floor((getPlayerStorageValue(player,13545) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") 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,13545) < 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,13545,getPlayerStorageValue(C.uid,13545)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361553 Compartilhar em outros sites More sharing options...
0 peeuowfe 0 Postado Outubro 11, 2012 Autor Share Postado Outubro 11, 2012 Ok, mais quando a vip acaba ele remove o nome [VIP]? Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361576 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 11, 2012 Share Postado Outubro 11, 2012 Não então faza assim -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 1000000 if doPlayerRemoveMoney(cid, 1000000) == TRUE then local days = 7 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end local name = getCreatureName(cid) local nome = getPlayerGUID(cid) if getPlayerStorageValue(cid, 29000) - os.time() >= 0 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 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") 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, 13545) - 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, 13545) - 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, 13545) 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, 13545, time) local quantity = math.floor((getPlayerStorageValue(player,13545) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") 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,13545) < 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,13545,getPlayerStorageValue(C.uid,13545)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361588 Compartilhar em outros sites More sharing options...
0 peeuowfe 0 Postado Outubro 11, 2012 Autor Share Postado Outubro 11, 2012 Nao pego '-' o nome [VIP] Nao aparece ='( Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361590 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 11, 2012 Share Postado Outubro 11, 2012 da qual erro no console? Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361595 Compartilhar em outros sites More sharing options...
0 peeuowfe 0 Postado Outubro 11, 2012 Autor Share Postado Outubro 11, 2012 Nao da erro neum mais tipo, quando eu ponho /addvip MYNAME, 10 dai nao aparece o nome [VIP] Dai eu ja dei loggout e tbm nao aparece '-' Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361596 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 11, 2012 Share Postado Outubro 11, 2012 tente fazer assim fale com o player !buyvip se for me avisa que este e de buyvip eu so editei dps eu configuro para se por addvip Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361620 Compartilhar em outros sites More sharing options...
0 peeuowfe 0 Postado Outubro 11, 2012 Autor Share Postado Outubro 11, 2012 nao pego =/ Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1361625 Compartilhar em outros sites More sharing options...
0 fokus090 36 Postado Outubro 14, 2012 Share Postado Outubro 14, 2012 [Vip] no Nome (Removendo ao Acabar) Vip System by Account v1.0 Link para o comentário https://xtibia.com/forum/topic/196229-sistema-vip/#findComment-1363308 Compartilhar em outros sites More sharing options...
Pergunta
peeuowfe 0
Nao sei se é uma duvida ou um pedido, botei pedido mais tudo bem!
Tou precisando de um system vip que exemplo, quando eu por /addvip nomedoplayer, days
dai automaticamente o nome dele mude pra [VIP] Nomedoplayer.
Que adicione o [VIP] No começo do nome, sendo que quando eu por o /addvip e o nome dele tiver normal
sem o [VIP] ele tem exemplo 5 segundo pra sair, dai se passar 5 segundo o player automaticamente da logout!
RESULMINDO
Eu de /addvip nomedoplayer, days, 5 segundos pra logar dai se passar 5 ssegundo da loggout
e quando o player entra dinovo aparece [VIP] Nome do Player!
Obrigado
Link para o comentário
https://xtibia.com/forum/topic/196229-sistema-vip/Compartilhar em outros sites
9 respostass a esta questão
Posts Recomendados