FighterOT 1 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 Olá Gente, estou precisando da ajuda de vocês. É O Seguinte, eu estou usando o Baiak Extreme (OTProjects), eu queria que quando o player adquirir a VIP pelo site, aparece no nome [VIP] Ex: Eu, o player: Fighter - compro VIP pelo site, ai meu nome fica: [VIP] Fighter OBS: Não irei postar o script VIP System aqui, mais caso precisar, só pedir que eu posto. Darei 5 REPs+ para quem me ajudar. Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/ Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 Se puder postar o script ira ajudar como voce seleciono ao topico Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320398 Compartilhar em outros sites More sharing options...
0 FighterOT 1 Postado Agosto 20, 2012 Autor Share Postado Agosto 20, 2012 Em creaturescripts/scripts vipkick.lua [/color][/size][/font] -- by Shoeei for OTServ Brásil Fórum -- function onLogin(cid) if getPlayerPremiumDays(cid) > 0 then setPlayerStorageValue(cid, 20500, 1) elseif getPlayerPremiumDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 then doTeleportThing(cid, getPlayerMasterPos(cid)) setPlayerStorageValue(cid, 20500, -1) end return TRUE end [font=times new roman,times,serif][size=3][color=#ff0000] Agora, viplogin.lua function onLogin(cid) local vip = isVip(cid) if getVipTime(cid) > 0 and vip == FALSE then local townid = 1 doPlayerSetTown(cid, townid) local templePos = getTownTemplePosition(getPlayerTown(cid)) doTeleportThing(cid, templePos, false) setVipTime(cid, 0) doTeleportPlayers(cid, templePos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua vip acabou! você foi teleportado para o templo. Para ter as vantagens novamente adquira mais vip time.") elseif vip == TRUE then local duration = getVipDate(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) end return TRUE end [color=#FF0000][size=3] [/size][/color] Agora, vocationvip.lua [/size][/color] --[[ by vodkart ]]-- function onLogin(cid) if isVip(cid) == TRUE then if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)+4) end elseif isVip(cid) == FALSE and getVipTime(cid) == 0 then if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then -- id das vocation epic doPlayerSetVocation(cid,getPlayerVocation(cid)-4) end end return TRUE end [color=#FF0000][size=3] Agora em GlobalEvents/scripts vipend.lua [/size][/color] function onThink(interval, lastExecution, thinkInterval) local Query = db.getResult("SELECT `id`, `vip_time` FROM `accounts` WHERE `accounts`.`vip` = 1") if Query:getID() == -1 then return true end for i = 1, Query:getRows() do local AccID = Query:getDataInt('id') local VipTime = Query:getDataInt('vip_time') if VipTime >= os.time() then db.executeQuery("UPDATE `accounts` SET `vip_time = ".. math.ceil((VipTime - os.time()) / 86400) .." WHERE `accounts`.`id` = ".. AccID .." LIMIT 1;") else db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `accounts`.`id` = ".. AccID .." LIMIT 1;") end Query:next() end Query:free() return true end [color=#FF0000][size=3] Agora em movements/scripts viptile.lua function onStepIn(cid, item, position, fromPosition) if isVip(cid) == FALSE then doTeleportThing(cid, fromPosition, false) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente players vip podem passar.") end return TRUE end[color=#FF0000][size=3] [/size][/color] [color=#FF0000] [/color] Se não me engano, é apenas isso. (NO AGUARDO!) Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320406 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 function onThink(interval, lastExecution, thinkInterval) local Query = db.getResult("SELECT `id`, `vip_time` FROM `accounts` WHERE `accounts`.`vip` = 1") if Query:getID() == -1 then return true end for i = 1, Query:getRows() do local AccID = Query:getDataInt('id') local VipTime = Query:getDataInt('vip_time') if VipTime >= os.time() then 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) 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.") db.executeQuery("UPDATE `accounts` SET `vip_time = ".. math.ceil((VipTime - os.time()) / 86400) .." WHERE `accounts`.`id` = ".. AccID .." LIMIT 1;") else db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `accounts`.`id` = ".. AccID .." LIMIT 1;") end Query:next() end Query:free() return true end end Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320413 Compartilhar em outros sites More sharing options...
0 FighterOT 1 Postado Agosto 20, 2012 Autor Share Postado Agosto 20, 2012 Aonde eu adiciono isso? (NO AGUARDO). Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320415 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 Este e no script do globalevents Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320416 Compartilhar em outros sites More sharing options...
0 FighterOT 1 Postado Agosto 20, 2012 Autor Share Postado Agosto 20, 2012 Olá amigo, aqui não aconteceu nada. (TRADUZINDO = NÃO FUNCIONO) Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320425 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 function onThink(interval, lastExecution, thinkInterval) local Query = db.getResult("SELECT `id`, `vip_time` FROM `accounts` WHERE `accounts`.`vip` = 1") if Query:getID() == -1 then return true end for i = 1, Query:getRows() do local AccID = Query:getDataInt('id') local VipTime = Query:getDataInt('vip_time') if VipTime >= os.time() then if isVip(cid) then if string.sub(name, 1,6) == "[VIP] " then 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 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 db.executeQuery("UPDATE `accounts` SET `vip_time = ".. math.ceil((VipTime - os.time()) / 86400) .." WHERE `accounts`.`id` = ".. AccID .." LIMIT 1;") else db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `accounts`.`id` = ".. AccID .." LIMIT 1;") end Query:next() end Query:free() end return true end Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320430 Compartilhar em outros sites More sharing options...
0 Subwat 405 Postado Agosto 20, 2012 Share Postado Agosto 20, 2012 (editado) basta adicionar em seu script de comprar vip. db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id`= " .. nome .. ";") se for por talkaction fica fácil. se for por creaturescripts basta criar um arquivo no qual ao logar verifique se o player tem a storage VIP e adicionar a db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id`= " .. nome .. ";") ao script; Editado Agosto 20, 2012 por Subwat Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1320447 Compartilhar em outros sites More sharing options...
0 FighterOT 1 Postado Agosto 22, 2012 Autor Share Postado Agosto 22, 2012 Subwat não entendi, me explica tudo ai. Aonde que eu coloc tudo. porfavor? Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1321740 Compartilhar em outros sites More sharing options...
0 HollisterOT 0 Postado Setembro 9, 2012 Share Postado Setembro 9, 2012 Dá pra explicar melhor? O Meu sistema VIP é pelo site Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1335768 Compartilhar em outros sites More sharing options...
0 comedinhasss 234 Postado Setembro 9, 2012 Share Postado Setembro 9, 2012 Esse script eu não recomendo colocar amigo, nunca vi um script que remove o prefixo depois que o vip termina. Link para o comentário https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/#findComment-1335770 Compartilhar em outros sites More sharing options...
Pergunta
FighterOT 1
Olá Gente, estou precisando da ajuda de vocês.
É O Seguinte, eu estou usando o Baiak Extreme (OTProjects), eu queria que quando o player adquirir a VIP pelo site, aparece no nome [VIP]
Ex: Eu, o player: Fighter - compro VIP pelo site, ai meu nome fica: [VIP] Fighter
OBS: Não irei postar o script VIP System aqui, mais caso precisar, só pedir que eu posto.
Darei 5 REPs+ para quem me ajudar.
Link para o comentário
https://xtibia.com/forum/topic/192313-pedido-colocar-vip-no-no-nome-dos-jogadores-vip/Compartilhar em outros sites
11 respostass a esta questão
Posts Recomendados