Postado Novembro 5, 2019 5 anos Olá! Boa tarde à todos. Como vocês estão? Pessoal, Não sei se estou com o título correto ou algo do tipo (foi o melhor que pensei). Gostaria de solicitar uma Talkaction/System que mandaria o player para a Jail e retirasse 15% da XP TOTAL do player. Eu tenho uma prisão montada e só falta os comandos e o sistema. A Versão do servidor é uma das mais recentes: 12.1/12.15. Teria como me ajudar com algo? Desde já, agradeço a compreensão.
Postado Novembro 5, 2019 5 anos Este tópico foi movido para a área correta. Esta é uma mensagem automática!Pedimos que leia as regras do fórum! Mostrar conteúdo oculto This topic has been moved to the correct area. This is an automated message!Please read the forum rules. Compre seus Scripts Agora totalmente seguro e de forma rápida, aceitamos também encomendas. discord.gg/phJZeHa2k4 Projeto ATS (Naruto) Informações Abaixo Facebook Youtube Discord Tutoriais / Conteúdos Clique Aqui
Postado Novembro 6, 2019 5 anos Posso tentar fazer no final de semana. Outra coisa, ele ficaria um tempo determinado ou você iria determinar no comando? Se for no comando, seria de horas ou dias? Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Novembro 6, 2019 5 anos Autor Em 06/11/2019 em 01:55, movie disse: Posso tentar fazer no final de semana. Outra coisa, ele ficaria um tempo determinado ou você iria determinar no comando? Se for no comando, seria de horas ou dias? Oi, Bom dia! Obrigado pela resposta. Iria determinar no comando e seria por dias. Por exemplo: 1 dia, 2 dias, 3 dias, 7 dias, 14 dias e 21 dias. E também teria a possibilidade de criar o /unjail no mesmo e manda-lo para o templo? Obrigado, mesmo. Editado Novembro 6, 2019 5 anos por Gabriel Farre Correção de informações. (veja o histórico de edições)
Postado Novembro 6, 2019 5 anos Tentarei criar o seguinte comando então: /jail nome,tempo /unjail nome Outra coisa, o PVP será aberto na prisão? Fiz aqui rapidinho sendo que a prisão não é PVP. Em talkactions, crie um arquivo lua com o nome jail.lua local posPrison = Position(x,y,z) function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local split = param:split(",") local preso = (split[1]) local tempo = (split[2]) tempo = tempo * 60 * 24 if not preso then player:sendCancelMessage("A player with that name is not online.") return false end if not tempo then player:sendCancelMessage("Insufficient parameters.") return false end if preso:getStorageValue(41234) > os.time() then player:sendCancelMessage("The player ".. preso .." is already arrested.") return false end if preso and tempo then preso:setStorageValue(41234, (tempo) + os.time()) preso:getPosition():sendMagicEffect(11) preso:sendTextMessage(MESSAGE_STATUS_DEFAULT, "You were arrested until ".. tempo .." days.") preso:teleportTo(posPrison) posPrison:sendMagicEffect(11) else player:sendCancelMessage("You need to inform the player and the time (in days) he will be stuck.") end return true end Em talkactions, crie um arquivo lua com o nome unjail.lua function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local targetPlayer = Player(param) if targetPlayer == nil then return false end if not targetPlayer then player:sendCancelMessage("Insufficient parameters.") return false end if targetPlayer:getStorageValue(41234) <= os.time() then player:sendCancelMessage("The player ".. targetPlayer .." is already free.") return false end local town = targetPlayer:getTown():getTemplePosition() if targetPlayer then targetPlayer:setStorageValue(41234, 0) targetPlayer:getPosition():sendMagicEffect(11) targetPlayer:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Congratulations ".. targetPlayer ..", now you are free.") targetPlayer:teleportTo(town) else player:sendCancelMessage("The player is offline.") end return true end Em talkactions.xml adicione as seguintes tags <talkaction words="/jail" separator=" " script="jail.lua" /> <talkaction words="/unjail" script="unjail.lua" /> Agora em creaturescript, crie um arquivo chamado unjail.lua function onLogin(player) player:registerEvent("unjailLogin") player:registerEvent("unjailThink") local town = player:getTown():getTemplePosition() if player:getStorageValue(41234) > 0 then player:teleportTo(town) player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Congratulations ".. player ..", now you are free.") player:getPosition():sendMagicEffect(11) end end function OnThink(creature, interval) local player = creature:getPlayer() local town = player:getTown():getTemplePosition() if player:getStorageValue(41234) > 0 then player:teleportTo(town) player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "Congratulations ".. player ..", now you are free.") player:getPosition():sendMagicEffect(11) end end Em creaturescript.xml adicione as seguintes tags <event type="login" name="unjailLogin" script="unjail_creature.lua"/> <event type="think" name="unjailThink" interval="60" script="unjail_creature.lua"/> Não é necessário registrar no login.lua Qualquer erro me avisa aqui que eu tento arrumar pra você. Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
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.