Postado Agosto 26, 2013 11 anos Ola, nesses Tópicos que vou criar vou Postar os Sistemas Básicos de Actions de um Servidor, para a pessoa poder pesquisar e também como se fosse um "Backup" e também sistemas Criados Por Min, que servidores não possuem e podem estar Adicionando. ~~Jail Sistema~~ Em \data\talkactions\scripts Adicione um Arquivo chamada cadeia.lua default_jail = 30 grouprequired = 3 jailedstoragevalue_time = 1338 jailedstoragevalue_bool = 1339 jailpos = { x = 981, y = 1023, z =6 } unjailpos = { x = 1022, y = 1028, z =7 } jail_list = {} jail_list_work = 0 function checkJailList(param) addEvent(checkJailList, 1000, {}) for targetID,player in ipairs(jail_list) do if isPlayer(player) == TRUE then if getPlayerStorageValue(player, jailedstoragevalue_time) < os.time() then doTeleportThing(player, unjailpos, TRUE) setPlayerStorageValue(player, jailedstoragevalue_time, 0) setPlayerStorageValue(player, jailedstoragevalue_bool, 0) table.remove(jail_list,targetID) doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'You were kicked from jail! See you later ') end else table.remove(jail_list,targetID) end end end function onSay(cid, words, param) if jail_list_work == 0 then jail_list_work = addEvent(checkJailList, 1000, {}) end if param == '' and (words == '!unjail' or words == '/unjail') then if getPlayerStorageValue(cid, jailedstoragevalue_time) > os.time() then doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You are jailed until ' .. os.date("%H:%M:%S", getPlayerStorageValue(cid, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').') else if getPlayerStorageValue(cid, jailedstoragevalue_bool) == 1 then table.insert(jail_list,cid) doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You will be kicked from jail in one second.') else doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You are not jailed.') end end return TRUE end local jail_time = -1 for word in string.gmatch(tostring(param), "(%w+)") do if tostring(tonumber(word)) == word then jail_time = tonumber(word) end end local isplayer = getPlayerByName(param) if isPlayer(isplayer) ~= TRUE then isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+1)) if isPlayer(isplayer) ~= TRUE then isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+2)) if isPlayer(isplayer) ~= TRUE then isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+3)) end end end if jail_time ~= -1 then jail_time = jail_time * 60 else jail_time = default_jail end if words == '!jail' or words == '/jail' then if getPlayerGroupId ( cid ) >= grouprequired then if isPlayer(isplayer) == TRUE then doTeleportThing(isplayer, jailpos, TRUE) setPlayerStorageValue(isplayer, jailedstoragevalue_time, os.time()+jail_time) setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 1) table.insert(jail_list,isplayer) doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You jailed '.. getCreatureName(isplayer) ..' until ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').') doPlayerSendTextMessage ( isplayer, MESSAGE_INFO_DESCR, 'You have been jailed by '.. getCreatureName(cid) ..' until ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').') return TRUE else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player with this name doesn\'t exist or is offline.") return FALSE end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have access to unjail other players.") return FALSE end elseif words == '!unjail' or words == '/unjail' then if getPlayerGroupId ( cid ) >= grouprequired then if isPlayer(isplayer) == TRUE then doTeleportThing(isplayer, unjailpos, TRUE) setPlayerStorageValue(isplayer, jailedstoragevalue_time, 0) setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 0) table.remove(jail_list,targetID) doPlayerSendTextMessage(isplayer,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid) .. ' let you go out from jail! See you later') doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You unjailed '.. getCreatureName(isplayer) ..'.') else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player with this name doesn\'t exist or is offline.") return FALSE end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have access to unjail other players.") return FALSE end end return FALSE end E Em TalkActions.xml Adicione <talkaction log="yes" words="/jail" access="3" event="script" value="Cadeia.lua"/> Contato : under12451 (Skype) Meus Tutoriais O Que é DDoS ? como se Proteger Por Tony Criando Servidor Poketibia Sistemas de Vips com [VIP] No Nome Cyclops - Mistrock - 100% AFK Como Editar um NPC 8.6 [ Itens e Preços] Editando Swords 8.6 Como Editar um NPC 8.6 [VENDA]
Postado Agosto 26, 2013 11 anos Já existe um tópico com esse sistema. Aqui está o Link : Clique aqui ! Tópico feito por : comedinhasss 愛"A alma permanece em suas criações" 平(Não dou suporte por mensagem privada.)
Postado Agosto 26, 2013 11 anos Autor Sim, mais esse é o meu Sistema que veio no meu TFS, estou postando eles para ajudar o pessoal. espero que entenda Editado Agosto 27, 2013 11 anos por TonyHalk (veja o histórico de edições) Contato : under12451 (Skype) Meus Tutoriais O Que é DDoS ? como se Proteger Por Tony Criando Servidor Poketibia Sistemas de Vips com [VIP] No Nome Cyclops - Mistrock - 100% AFK Como Editar um NPC 8.6 [ Itens e Preços] Editando Swords 8.6 Como Editar um NPC 8.6 [VENDA]
Postado Agosto 27, 2013 11 anos Autor Matheus esse Script veio no meu TFS. eu não criei ele Somente Tirei 3 bugs que estavam. Contato : under12451 (Skype) Meus Tutoriais O Que é DDoS ? como se Proteger Por Tony Criando Servidor Poketibia Sistemas de Vips com [VIP] No Nome Cyclops - Mistrock - 100% AFK Como Editar um NPC 8.6 [ Itens e Preços] Editando Swords 8.6 Como Editar um NPC 8.6 [VENDA]
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.