Postado Setembro 16, 2017 7 anos Estou tentando implantar esse sistema que aumenta em 20% para quem é vip, adicionei o bloqueio do acc manager, e troquei as variaveis, porém não deu muito certo. O objetivo era aparecer apenas uma mensagem para quem não é vip, e 1 para quem é vip. function onLogin(cid) local rate = 1.2 -- 10% a mais de exp. local config = { hasVip = "You have "..((rate - 1)*100).."% rom exp! Enjoy the benefits vip donate!", -- mensagem apenas para vip hasVip = "Hello player enjoy the benefits vip, you will win "..((rate - 1)*100).."% more than xp!", -- mensagem para quem não é vip } if (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then end if isPremium(cid) then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.hasVip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.hasVip) end return TRUE end Eu uso o sistema mock E ainda no mesmo, me fizeram o seguinte moveemente, só que da erros, e o padrão do sistema mock não funciona aqui. --[[ -- Script Vip Sytem 1.0 -- function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "You need to be a vip player to access this area.", msgWelcome = "Welcome to vip area!" } if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end ]]-- function onStepIn(cid, item, position, fromPosition) local tileConfig = { kickPos = fromPosition, kickEffect = CONST_ME_POFF, kickMsg = "You need to be a vip player to access this area.", enterMsg = "Welcome to vip area!", enterEffect = CONST_ME_MAGIC_RED, } if isPlayer(cid) == true then if vip.hasVip(cid) == FALSE then doTeleportThing(cid, tileConfig.kickPos) doSendMagicEffect(tileConfig.kickPos, tileConfig.kickEffect) doPlayerSendCancel(cid, tileConfig.kickMsg) return end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, tileConfig.enterMsg) doSendMagicEffect(position, tileConfig.enterEffect) return true end end
Postado Setembro 16, 2017 7 anos function onLogin(cid) local rate = 1.2 -- 10% a mais de exp. local config = { hasVip = "You have "..((rate - 1)*100).."% rom exp! Enjoy the benefits vip donate!", -- mensagem apenas para vip hasVip = "Hello player enjoy the benefits vip, you will win "..((rate - 1)*100).."% more than xp!", -- mensagem para quem não é vip } if not (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then if isPremium(cid) == true then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.hasVip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.hasVip) end end return true end Editado Setembro 16, 2017 7 anos por DboExplorer (veja o histórico de edições) Te ajudei ?? Que tal fazer uma contribuição ?
Postado Setembro 16, 2017 7 anos Autor 4 horas atrás, DboExplorer disse: function onLogin(cid) local rate = 1.2 -- 10% a mais de exp. local config = { hasVip = "You have "..((rate - 1)*100).."% rom exp! Enjoy the benefits vip donate!", -- mensagem apenas para vip hasVip = "Hello player enjoy the benefits vip, you will win "..((rate - 1)*100).."% more than xp!", -- mensagem para quem não é vip } if not (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then if isPremium(cid) == true then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.hasVip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.hasVip) end end return true end Não deu certo, a mensagem 1, aparece para quem é vip, e a 2 para quem não é, entendeu? Me ajuda no script do movements tb...? Editado Setembro 16, 2017 7 anos por JcA (veja o histórico de edições)
Postado Setembro 16, 2017 7 anos Solução function onLogin(cid) local rate = 1.2 -- 10% a mais de exp. local config = { Vip = "You have "..((rate - 1)*100).."% rom exp! Enjoy the benefits vip donate!", -- mensagem apenas para vip NotVip = "Hello player enjoy the benefits vip, you will win "..((rate - 1)*100).."% more than xp!", -- mensagem para quem não é vip } if not (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then if isPremium(cid) == true then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.Vip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.NotVip) end end return true end 7 minutos atrás, JcA disse: Não deu certo, a mensagem 1, aparece para quem é vip, e a 2 para quem não é, entendeu? Me ajuda no script do movements tb...? function onStepIn(cid, item, position, fromPosition) local tileConfig = { kickPos = fromPosition, kickEffect = CONST_ME_POFF, kickMsg = "You need to be a vip player to access this area.", enterMsg = "Welcome to vip area!", enterEffect = CONST_ME_MAGIC_RED, } if isPlayer(cid) == true then if isPremium(cid) == false then doTeleportThing(cid, tileConfig.kickPos) doSendMagicEffect(tileConfig.kickPos, tileConfig.kickEffect) doPlayerSendCancel(cid, tileConfig.kickMsg) return end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, tileConfig.enterMsg) doSendMagicEffect(position, tileConfig.enterEffect) return true end end Te ajudei ?? Que tal fazer uma contribuição ?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.