antiblock
Rodnia | Alpha & Omega

Karbust

Coordenador
  • Content Count

    2,677
  • Joined

  • Last visited

  • Days Won

    117

Everything posted by Karbust

  1. NPC que tenham sido feito como NPC apenas têm a animação de espera (wait) e alguns até têm corrida. E NPC's não podem atacar, portanto se meteres um monstro, ele vai atacar quem clicar nele e der um hit no mesmo. Resumindo, não é possível meter um NPC a atacar.
  2. Tens de usar a source... 2089M não tem source...
  3. Então usa um downloader, tipo o Ant Download Manager, uso-o e recomendo... Percebi, pelo que o Glossy disse, que o link era do MEGA...
  4. Isso do amazon desconheço... Eu também tenho o cartão da paysafecard, mas lá está, na conta só podes usar paysafecards do país em que crias-te a conta... Podes sempre usar proxy para o país em que o paysafecard foi comprado...
  5. Essas são as que estão postadas, até os nomes dos ficheiros são iguais... São as que estão na turkmmo...
  6. Paysafecard mesmo no site da paysafecard só dá se fores comercial e para tal tens de apresentar a papelada que comprova que estás registado como empresa... Podes sempre usar o paygol, tem a opção de paysafecard se a pedires para ativar... Paypal também tens de ter conta comercial mas aí só precisas de associar um cartão à conta para poder usar o dinheiro, se procurares no google por IPN paypal encontras... Btw, é script e não scrypt...
  7. Não temos informações nenhumas sobre o erro... Tanto pode ser uma falta de ; como falta de " ou outra coisa... Btw, o Spoiler está vazio...
  8. Os M.2 ligam diretamente na board, não usas cabos. Normalmente, em muitas motherboards, quando o slot M.2 Sata está a ser usado, determinadas portas sata deixam de funcionar (normalmente a 1 e a 2 ou só a 1). Estes discos também têm melhores velocidades que os comuns 2.5" Os 2.5" são os comuns discos...
  9. Tem dado sempre, demora é algum tempo a carregar, não costuma demorar mais de 1 minuto...
  10. Comigo está sempre a entrar :O
  11. Às 8h estava a funcionar apesar de estar muito lento...
  12. I think exists until 2013 version, but most of the links on the web are dead...
  13. Não jogo a ouvir música, e quando oiço uso o browser dentro da steam para poder parar se for preciso sem minimizar
  14. Eu não te conheço, logo não posso "avaliar" quem não conheço, portanto não identifiquei o "gozo", mas sim uma ofensa...
  15. Essas funções valem a pena quando estás por exemplo num jogo, não tem nada a ver lol Por exemplo, estás no cs go, vais minimizar para saltar a música ou pausar ou assim? Pensa antes de falar, mas se calhar isso custa-te...
  16. Podes fazer isso, claro, mas em termos de rede terás sempre de abrir portas no router e assim, podes é comprar uma ligação dedicada com IP dedicado para esse PC, acho que isso existe...
  17. Na 2ª quest mete assim: local village = {0, 1, 21, 41} Isto porquê? Porque na linha seguinte: if pc.get_map_index() != village[pc.get_empire()] then pc.get_empire() tem 3 valores possíveis, 1, 2 e 3, e ao usar assim ele vai buscar ao array a segunda posição (se o reino for 1), visto que os arrays começam por 0. Podes também meter assim: if pc.get_map_index() != village[pc.get_empire() - 1] then
  18. Deixa de ser noob e joga sem cheats...
  19. https://metin2dev.org/board/index.php?/topic/7271-how-touse-virtual-box-as-homeroot/ Eu com esse tutorial consigo entrar no jogo usando o Loopback e o portmap...
  20. O login no site PHP vai ser feito também no Active Directory
  21. Boas a todos Estou a tentar fazer o trabalho para a minha PAP, usando C#, PHP, MySQL e o Active Directory. As contas vão ser criadas pelo programa C# na base de dados do Active Directory, mas sempre que tento criar uma conta recebo este erro: System.Reflection.TargetInvocationException: O destino de uma invocação accionou uma excepção. ---> System.Runtime.InteropServices.COMException: O servidor de RPC não está disponível. (Excepção de HRESULT: 0x800706BA) --- Fim do rastreio da pilha de excepção interna --- em System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args) em PAP.ldap_functions.createUser(String domain, String first, String last, String description, String password, String[] groups, String username, String email, Int32 mobile, String streetAddress, String city, String postalcode, Boolean enabled) em C:\Users\Karbust\source\repos\PAP\PAP\ldap_functions.cs:line 176 Estou a usar este código: public int createUser(String domain, String first, String last, String description, String password, String[] groups, String username, String email, Int32 mobile, String streetAddress, String city, String postalcode, bool enabled) { try { // create new user object and write into AD DirectoryEntry user = new DirectoryEntry(connectionstring_membros, adminlogin, adminpass); // User name (domain based) DirectoryEntry objUser = user.Children.Add("CN=" + username, "user"); // User name objUser.Properties["userPrincipalName"].Add(username + "@" + domain); // User name (older systems) objUser.Properties["samaccountname"].Add(username); // Surname objUser.Properties["sn"].Add(last); // Forename objUser.Properties["givenname"].Add(first); // Display name objUser.Properties["displayname"].Add(first + " " + last); // Description objUser.Properties["description"].Add(description); // E-mail objUser.Properties["mail"].Add(email); // Home dir (drive letter) //objUser.Properties["homedirectory"].Add(homeDir); // Home dir (path) //objUser.Properties["homedrive"].Add(homeDrive); objUser.CommitChanges(); // set user's password objUser.Invoke("SetPassword", password); //objUser.Properties["password"].Add(password); //objUser.SetPassword(password); //objUser.Invoke("SetPassword", new object[] { password }); // Mobile Number objUser.Properties["mobile"].Add(mobile); // Telephone Number //objUser.Properties["telephoneNumber"].Add(telephoneNumber); // Street objUser.Properties["streetAddress"].Add(streetAddress); // City objUser.Properties["l"].Add(city); // State/Province //objUser.Properties["st"].Add(stateprovince); // Zip/Postal Code objUser.Properties["postalCode"].Add(postalcode); // enable account if requested (see http://support.microsoft.com/kb/305144 for other codes) if (enabled) objUser.Invoke("Put", new object[] { "userAccountControl", "512" }); // add user to specified groups foreach (String thisGroup in groups) { DirectoryEntry newGroup = objUser.Parent.Children.Find("CN=" + thisGroup, "group"); if (newGroup != null) newGroup.Invoke("Add", new object[] { objUser.Path.ToString() }); } objUser.CommitChanges(); // make home folder on server //Directory.CreateDirectory(homeDir); // set permissions on folder, we loop this because if the program // tries to set the permissions straight away an exception will be // thrown as the brand new user does not seem to be available, it takes // a second or so for it to appear and it can then be used in ACLs // and set as the owner /*bool folderCreated = false; while (!folderCreated) { try { // get current ACL DirectoryInfo dInfo = new DirectoryInfo(homeDir); DirectorySecurity dSecurity = dInfo.GetAccessControl(); // Add full control for the user and set owner to them IdentityReference newUser = new NTAccount(domain + @"\" + username); dSecurity.SetOwner(newUser); FileSystemAccessRule permissions = new FileSystemAccessRule(newUser, FileSystemRights.FullControl, AccessControlType.Allow); dSecurity.AddAccessRule(permissions); // Set the new access settings. dInfo.SetAccessControl(dSecurity); folderCreated = true; } catch (System.Security.Principal.IdentityNotMappedException) { Console.Write("."); } catch (Exception ex) { // other exception caught so not problem with user delay as // commented above Console.WriteLine("Exception caught:" + ex.ToString()); return 0; } }*/ return 1; } catch(Exception ex) { MessageBox.Show("Exception caught: " + ex.ToString(), "Criar Cliente"); fncs.ErroToTxt(ex); return 0; } } A conta é criada, mas na execução desta linha: objUser.Invoke("SetPassword", password); recebo o erro indicado em cima e o para por aqui, já não executa o resto dos comandos... Estou a usar um código que encontrei na net, no qual a conta é criada e não recebo nenhum erro: using System; using System.Text; using System.DirectoryServices; using System.IO; using System.Security.AccessControl; using System.Security.Principal; using System.DirectoryServices.Protocols; using System.DirectoryServices.AccountManagement; namespace activeDirectoryLdapExamples { class Program { static void Main(string[] args) { // connect to LDAP //DirectoryEntry myLdapConnection = createDirectoryEntry(); // define vars for user String domain = "vm.pap"; String first = "First name"; String last = "Last name"; String description = ".NET Test"; String password = "xpto001!"; String[] groups = { "gr_membros" }; //String username = first.ToLower() + last.Substring(0, 1).ToLower(); String username = "charparodar"; String email = "[email protected]"; String homeDrive = "H:"; String homeDir = @"\\vm.pap\data3\USERS\" + username; // create user try { if (createUser(domain, first, last, description, password, groups, username, email, homeDrive, homeDir, true) == 0) { Console.WriteLine("Account created!"); Console.ReadLine(); } else { Console.WriteLine("Problem creating account :("); Console.ReadLine(); } } catch (Exception e) { Console.WriteLine("Exception caught:\n\n" + e.ToString()); Console.ReadLine(); } } static int createUser(String domain, String first, String last, String description, String password, String[] groups, String username, String email, String homeDrive, String homeDir, bool enabled) { // create new user object and write into AD //DirectoryEntry user = myLdapConnection.Children.Add("OU=" + first + ",OU= " + last, "user"); //DirectoryEntry user = myLdapConnection.Children.Add("CN=" + first + " " + last, "user"); DirectoryEntry user = new DirectoryEntry("LDAP://vmpap/OU=Membros,OU=Utilizadores,DC=vm,DC=pap", "Administrator", "xpto001!"); // User name (domain based) //user.Properties["userprincipalname"].Add(username + "@" + domain); //user.Invoke("Add", new object[] { username + "@" + domain }); //user.Invoke("Add", new object[] { "[email protected]" }); DirectoryEntry objUser = user.Children.Add("CN=charparodar","user"); // User name objUser.Properties["userPrincipalName"].Add(username + "@" + domain); // User name (older systems) objUser.Properties["samaccountname"].Add(username); // Surname objUser.Properties["sn"].Add(last); // Forename objUser.Properties["givenname"].Add(first); // Display name objUser.Properties["displayname"].Add(first + " " + last); // Description objUser.Properties["description"].Add(description); // E-mail objUser.Properties["mail"].Add(email); // Home dir (drive letter) //objUser.Properties["homedirectory"].Add(homeDir); // Home dir (path) //objUser.Properties["homedrive"].Add(homeDrive); objUser.CommitChanges(); // set user's password objUser.Invoke("SetPassword", password); // enable account if requested (see http://support.microsoft.com/kb/305144 for other codes) if (enabled) objUser.Invoke("Put", new object[] { "userAccountControl", "512" }); // add user to specified groups foreach (String thisGroup in groups) { DirectoryEntry newGroup = objUser.Parent.Children.Find("CN=" + thisGroup, "group"); if (newGroup != null) newGroup.Invoke("Add", new object[] { objUser.Path.ToString() }); } objUser.CommitChanges(); // make home folder on server //Directory.CreateDirectory(homeDir); // set permissions on folder, we loop this because if the program // tries to set the permissions straight away an exception will be // thrown as the brand new user does not seem to be available, it takes // a second or so for it to appear and it can then be used in ACLs // and set as the owner /*bool folderCreated = false; while (!folderCreated) { try { // get current ACL DirectoryInfo dInfo = new DirectoryInfo(homeDir); DirectorySecurity dSecurity = dInfo.GetAccessControl(); // Add full control for the user and set owner to them IdentityReference newUser = new NTAccount(domain + @"\" + username); dSecurity.SetOwner(newUser); FileSystemAccessRule permissions = new FileSystemAccessRule(newUser, FileSystemRights.FullControl, AccessControlType.Allow); dSecurity.AddAccessRule(permissions); // Set the new access settings. dInfo.SetAccessControl(dSecurity); folderCreated = true; } catch (System.Security.Principal.IdentityNotMappedException) { Console.Write("."); } catch (Exception ex) { // other exception caught so not problem with user delay as // commented above Console.WriteLine("Exception caught:" + ex.ToString()); return 1; } }*/ return 0; } static DirectoryEntry createDirectoryEntry() { // create and return new LDAP connection with desired settings DirectoryEntry ldapConnection = new DirectoryEntry("vm.pap"); ldapConnection.Path = "LDAP://192.168.1.80/OU=Utilizadores,DC=vm,DC=pap"; ldapConnection.AuthenticationType = AuthenticationTypes.Secure; return ldapConnection; } } } Alguém sabe como resolver este problema? O servidor do Active Directory é o mesmo, a ser usado no Windows Server 2012 R2. Obrigado
  22. O meu projeto é fazer um software de gestão de uma lan house, no qual as contas para os clientes usarem nos computadores serão criadas pelo C# que vai estar apenas na loja física, enquanto que com o PHP vai ser possível pagar faturas e assim... E além disso, já fiz a apresentação do pré-projeto da PAP, já se sabe o que vou fazer, estava tudo a correr bem, mas ao usar o código no meu programa dá erro aí...