Jump to content

Zeiyan

Members
  • Content Count

    53
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Upvote
    Zeiyan got a reaction from Kuroyama in Utility: GM Tools   
    @charinfo
     
    A @command (via script) that gives you and your GM Staff (GM level 2 NOT group level)information about Player account informations without having to login to phpmyadmin. I'm quite used to making very simple scripts but this is my first time to give back to the community and also my first time using sql query in scripts (in short i'm a newbie) Please leave comments about what you think . ( I use it on my own server so it includes checking if they have freebies received via account or via mac address)
     
    You can choose to input Character name or Username
     
    NOTE: I know the @accinfo almost do the same thing but i'm a big noob in source editing so i made this for my own use ( then i can include the stuff i want to display)
    - script charinfo -1,{OnInit: bindatcmd "charinfo","charinfo::OnCharInfo", 0, 2; end;OnCharInfo: if(getgroupid() >= 2) { mes " [ Character Info ] "; mes " Hello GM ^00CC00"+strcharinfo(0)+"^000000!"; mes " What would you like to check? "; switch (select("Character Name:Username")) { case 1: input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; next; break; case 2: input .@acnme$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" + .@acnme$ + "'",.@acid; next; break; } query_sql "SELECT `userid`,`email`,`group_id`,`last_ip`,`birthdate`,`last_mac` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@usrd$,.@eml$,.@ggm,.@lstip$,.@brtdy$,.@macad$; if ( .@ggm > 0 ) { mes "[ Account Information ]"; mes "GM Account Information are not available"; close; } else if ( .@acid < 2000000 || .@acid > 3000000 ) { mes "[ Account Information ]"; mes "Character Not Found"; close; } query_sql "SELECT `name`, `base_level`, `job_level` FROM `char` WHERE `account_id` =" + .@acid + " ORDER BY `base_level` DESC",.@chrlst$, .@blvl, .@jlvl; mes "[Character List]" ; for(set .@i, 0; .@i < getarraysize(.@chrlst$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@chrlst$[.@i]+"^000000 "; mes "Level: "+.@blvl[.@i]+"/"+.@jlvl[.@i]+" "; } next; mes "[ Account Information ]"; mes "Account ID: "+.@acid; mes "Username: "+.@usrd$; mes "Email: "+.@eml$; mes "Last IP: ^00CC00"+.@lstip$+"^000000"; mes "Birthdate: "+.@brtdy$; mes "Mac Address: ^FF0000"+.@macad$+"^000000"; query_sql "SELECT `account_id`,`last_mac` FROM `freebies` WHERE `account_id` =" + .@acid + " ",.@rcvfrbs, .@lstmc$; if (.@rcvfrbs > 0) { set .@rcvfrbs, 1; } else { set .@rcvfrbs, 0; } if (.@rcvfrbs > 0) { set .@rcvfrbs$, "^00CC00Yes^000000"; } if (.@rcvfrbs == 0) { set .@rcvfrbs$, "^FF0000No^000000"; } mes "Freebies from account: "+.@rcvfrbs$; for(set .@i1, 0; .@i1 < getarraysize(.@lstmc$); set .@i1, .@i1 + 1){ set .@lstmc, .@lstmc +1; } if (.@lstmc < 1) { set .@lstmc$, "^FF0000No^000000"; } if (.@lstmc > 0) { set .@lstmc$, "^00CC00Yes^000000"; } mes "Freebies from MAC: "+.@lstmc$; close; }} 2. @ipinfo
     
    This one displays all users (displays username) with login count and last login from IP address of a certain character (Input Character name)
     
    - script ipinfo -1,{OnInit: bindatcmd "ipinfo","ipinfo::OnIPInfo", 2, 2; end;OnIPInfo: if(getgroupid() >= 2) { input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; query_sql "SELECT `last_ip`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl; query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_ip` ='" + .@lstp$+ "'", .@acidlip, .@acidlip$, .@lgncnt, .@lstlgn$; if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; } if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; } mes "Name: ^00CC00"+.@chrnm$+"^000000 "; mes "IP Address: ^FF0000"+.@lstp$+"^000000 "; next; mes "Displaying Users with IP: ^00CC00"+.@lstp$; next; for(set .@i, 0; .@i < getarraysize(.@acidlip$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@acidlip$[.@i]+"^000000 "; mes "Login Count: "+.@lgncnt[.@i]+" "; mes "Last Login: "+.@lstlgn$[.@i]+" "; } close; }} 3. @macinfo
     
    Same as @ipinfo except this one displays mac address information (if you have harmony or in my case have last_mac table)
     
    - script macinfo -1,{OnInit: bindatcmd "macinfo","macinfo::OnMacInfo", 2, 2; end;OnMacInfo: if(getgroupid() >= 2) { input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; query_sql "SELECT `last_mac`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl; query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_mac` ='" + .@lstp$+ "'", .@acidlmac, .@acidlmac$, .@lgncnt, .@lstlgn$; if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; } if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; } mes "Name: ^00CC00"+.@chrnm$+"^000000 "; mes "Mac Address: ^FF0000"+.@lstp$+"^000000 "; next; mes "Displaying Users with Mac: ^00CC00"+.@lstp$; next; for(set .@i, 0; .@i < getarraysize(.@acidlmac$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@acidlmac$[.@i]+"^000000 "; mes "Login Count: "+.@lgncnt[.@i]+" "; mes "Last Login: "+.@lstlgn$[.@i]+" "; } close; }}  
  2. Upvote
    Zeiyan got a reaction from lenon25 in Utility: GM Tools   
    @charinfo
     
    A @command (via script) that gives you and your GM Staff (GM level 2 NOT group level)information about Player account informations without having to login to phpmyadmin. I'm quite used to making very simple scripts but this is my first time to give back to the community and also my first time using sql query in scripts (in short i'm a newbie) Please leave comments about what you think . ( I use it on my own server so it includes checking if they have freebies received via account or via mac address)
     
    You can choose to input Character name or Username
     
    NOTE: I know the @accinfo almost do the same thing but i'm a big noob in source editing so i made this for my own use ( then i can include the stuff i want to display)
    - script charinfo -1,{OnInit: bindatcmd "charinfo","charinfo::OnCharInfo", 0, 2; end;OnCharInfo: if(getgroupid() >= 2) { mes " [ Character Info ] "; mes " Hello GM ^00CC00"+strcharinfo(0)+"^000000!"; mes " What would you like to check? "; switch (select("Character Name:Username")) { case 1: input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; next; break; case 2: input .@acnme$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" + .@acnme$ + "'",.@acid; next; break; } query_sql "SELECT `userid`,`email`,`group_id`,`last_ip`,`birthdate`,`last_mac` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@usrd$,.@eml$,.@ggm,.@lstip$,.@brtdy$,.@macad$; if ( .@ggm > 0 ) { mes "[ Account Information ]"; mes "GM Account Information are not available"; close; } else if ( .@acid < 2000000 || .@acid > 3000000 ) { mes "[ Account Information ]"; mes "Character Not Found"; close; } query_sql "SELECT `name`, `base_level`, `job_level` FROM `char` WHERE `account_id` =" + .@acid + " ORDER BY `base_level` DESC",.@chrlst$, .@blvl, .@jlvl; mes "[Character List]" ; for(set .@i, 0; .@i < getarraysize(.@chrlst$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@chrlst$[.@i]+"^000000 "; mes "Level: "+.@blvl[.@i]+"/"+.@jlvl[.@i]+" "; } next; mes "[ Account Information ]"; mes "Account ID: "+.@acid; mes "Username: "+.@usrd$; mes "Email: "+.@eml$; mes "Last IP: ^00CC00"+.@lstip$+"^000000"; mes "Birthdate: "+.@brtdy$; mes "Mac Address: ^FF0000"+.@macad$+"^000000"; query_sql "SELECT `account_id`,`last_mac` FROM `freebies` WHERE `account_id` =" + .@acid + " ",.@rcvfrbs, .@lstmc$; if (.@rcvfrbs > 0) { set .@rcvfrbs, 1; } else { set .@rcvfrbs, 0; } if (.@rcvfrbs > 0) { set .@rcvfrbs$, "^00CC00Yes^000000"; } if (.@rcvfrbs == 0) { set .@rcvfrbs$, "^FF0000No^000000"; } mes "Freebies from account: "+.@rcvfrbs$; for(set .@i1, 0; .@i1 < getarraysize(.@lstmc$); set .@i1, .@i1 + 1){ set .@lstmc, .@lstmc +1; } if (.@lstmc < 1) { set .@lstmc$, "^FF0000No^000000"; } if (.@lstmc > 0) { set .@lstmc$, "^00CC00Yes^000000"; } mes "Freebies from MAC: "+.@lstmc$; close; }} 2. @ipinfo
     
    This one displays all users (displays username) with login count and last login from IP address of a certain character (Input Character name)
     
    - script ipinfo -1,{OnInit: bindatcmd "ipinfo","ipinfo::OnIPInfo", 2, 2; end;OnIPInfo: if(getgroupid() >= 2) { input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; query_sql "SELECT `last_ip`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl; query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_ip` ='" + .@lstp$+ "'", .@acidlip, .@acidlip$, .@lgncnt, .@lstlgn$; if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; } if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; } mes "Name: ^00CC00"+.@chrnm$+"^000000 "; mes "IP Address: ^FF0000"+.@lstp$+"^000000 "; next; mes "Displaying Users with IP: ^00CC00"+.@lstp$; next; for(set .@i, 0; .@i < getarraysize(.@acidlip$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@acidlip$[.@i]+"^000000 "; mes "Login Count: "+.@lgncnt[.@i]+" "; mes "Last Login: "+.@lstlgn$[.@i]+" "; } close; }} 3. @macinfo
     
    Same as @ipinfo except this one displays mac address information (if you have harmony or in my case have last_mac table)
     
    - script macinfo -1,{OnInit: bindatcmd "macinfo","macinfo::OnMacInfo", 2, 2; end;OnMacInfo: if(getgroupid() >= 2) { input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; query_sql "SELECT `last_mac`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl; query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_mac` ='" + .@lstp$+ "'", .@acidlmac, .@acidlmac$, .@lgncnt, .@lstlgn$; if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; } if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; } mes "Name: ^00CC00"+.@chrnm$+"^000000 "; mes "Mac Address: ^FF0000"+.@lstp$+"^000000 "; next; mes "Displaying Users with Mac: ^00CC00"+.@lstp$; next; for(set .@i, 0; .@i < getarraysize(.@acidlmac$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@acidlmac$[.@i]+"^000000 "; mes "Login Count: "+.@lgncnt[.@i]+" "; mes "Last Login: "+.@lstlgn$[.@i]+" "; } close; }}  
  3. Upvote
    Zeiyan got a reaction from buczak in Achievement System [ Script Only ]   
    Hello hercules!. I just want to share this script i made. I'm fully aware that the coding style sucks, hard to modify and hard to understand (even i have problems reading it when i finished.)
    nonetheless i wanted to share it and hopefully someone can optimize it and make it easy to modify and clean the whole thing up (if possible add achievements to make it easier)
     
    NOTE:
    for pvp achievement my separate script has variable "KILL" (using ghost's pvp script so don't need to do checking for abuse)
    for event achievement i added the variable "evtjunk" to all my custom events
     
    Script:
    http://pastebin.com/vBuWaiKd
     
    SQL:
    CREATE TABLE IF NOT EXISTS `achievement` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `char_id` varchar(23) NOT NULL default '', `name` varchar(23) NOT NULL default '', `achievement` varchar(23) NOT NULL default '', `val` int(11) NOT NULL default '0', PRIMARY KEY (`id`), KEY (`id`)) ENGINE=MyISAM; Please leave comments, tips and advices below. (Hoping to hear from people i learned from, emistry and annieruru! 
     
  4. Upvote
    Zeiyan got a reaction from mmseabb02 in Utility: GM Tools   
    @charinfo
     
    A @command (via script) that gives you and your GM Staff (GM level 2 NOT group level)information about Player account informations without having to login to phpmyadmin. I'm quite used to making very simple scripts but this is my first time to give back to the community and also my first time using sql query in scripts (in short i'm a newbie) Please leave comments about what you think . ( I use it on my own server so it includes checking if they have freebies received via account or via mac address)
     
    You can choose to input Character name or Username
     
    NOTE: I know the @accinfo almost do the same thing but i'm a big noob in source editing so i made this for my own use ( then i can include the stuff i want to display)
    - script charinfo -1,{OnInit: bindatcmd "charinfo","charinfo::OnCharInfo", 0, 2; end;OnCharInfo: if(getgroupid() >= 2) { mes " [ Character Info ] "; mes " Hello GM ^00CC00"+strcharinfo(0)+"^000000!"; mes " What would you like to check? "; switch (select("Character Name:Username")) { case 1: input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; next; break; case 2: input .@acnme$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" + .@acnme$ + "'",.@acid; next; break; } query_sql "SELECT `userid`,`email`,`group_id`,`last_ip`,`birthdate`,`last_mac` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@usrd$,.@eml$,.@ggm,.@lstip$,.@brtdy$,.@macad$; if ( .@ggm > 0 ) { mes "[ Account Information ]"; mes "GM Account Information are not available"; close; } else if ( .@acid < 2000000 || .@acid > 3000000 ) { mes "[ Account Information ]"; mes "Character Not Found"; close; } query_sql "SELECT `name`, `base_level`, `job_level` FROM `char` WHERE `account_id` =" + .@acid + " ORDER BY `base_level` DESC",.@chrlst$, .@blvl, .@jlvl; mes "[Character List]" ; for(set .@i, 0; .@i < getarraysize(.@chrlst$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@chrlst$[.@i]+"^000000 "; mes "Level: "+.@blvl[.@i]+"/"+.@jlvl[.@i]+" "; } next; mes "[ Account Information ]"; mes "Account ID: "+.@acid; mes "Username: "+.@usrd$; mes "Email: "+.@eml$; mes "Last IP: ^00CC00"+.@lstip$+"^000000"; mes "Birthdate: "+.@brtdy$; mes "Mac Address: ^FF0000"+.@macad$+"^000000"; query_sql "SELECT `account_id`,`last_mac` FROM `freebies` WHERE `account_id` =" + .@acid + " ",.@rcvfrbs, .@lstmc$; if (.@rcvfrbs > 0) { set .@rcvfrbs, 1; } else { set .@rcvfrbs, 0; } if (.@rcvfrbs > 0) { set .@rcvfrbs$, "^00CC00Yes^000000"; } if (.@rcvfrbs == 0) { set .@rcvfrbs$, "^FF0000No^000000"; } mes "Freebies from account: "+.@rcvfrbs$; for(set .@i1, 0; .@i1 < getarraysize(.@lstmc$); set .@i1, .@i1 + 1){ set .@lstmc, .@lstmc +1; } if (.@lstmc < 1) { set .@lstmc$, "^FF0000No^000000"; } if (.@lstmc > 0) { set .@lstmc$, "^00CC00Yes^000000"; } mes "Freebies from MAC: "+.@lstmc$; close; }} 2. @ipinfo
     
    This one displays all users (displays username) with login count and last login from IP address of a certain character (Input Character name)
     
    - script ipinfo -1,{OnInit: bindatcmd "ipinfo","ipinfo::OnIPInfo", 2, 2; end;OnIPInfo: if(getgroupid() >= 2) { input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; query_sql "SELECT `last_ip`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl; query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_ip` ='" + .@lstp$+ "'", .@acidlip, .@acidlip$, .@lgncnt, .@lstlgn$; if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; } if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; } mes "Name: ^00CC00"+.@chrnm$+"^000000 "; mes "IP Address: ^FF0000"+.@lstp$+"^000000 "; next; mes "Displaying Users with IP: ^00CC00"+.@lstp$; next; for(set .@i, 0; .@i < getarraysize(.@acidlip$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@acidlip$[.@i]+"^000000 "; mes "Login Count: "+.@lgncnt[.@i]+" "; mes "Last Login: "+.@lstlgn$[.@i]+" "; } close; }} 3. @macinfo
     
    Same as @ipinfo except this one displays mac address information (if you have harmony or in my case have last_mac table)
     
    - script macinfo -1,{OnInit: bindatcmd "macinfo","macinfo::OnMacInfo", 2, 2; end;OnMacInfo: if(getgroupid() >= 2) { input .@chrnm$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid; query_sql "SELECT `last_mac`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl; query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_mac` ='" + .@lstp$+ "'", .@acidlmac, .@acidlmac$, .@lgncnt, .@lstlgn$; if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; } if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; } mes "Name: ^00CC00"+.@chrnm$+"^000000 "; mes "Mac Address: ^FF0000"+.@lstp$+"^000000 "; next; mes "Displaying Users with Mac: ^00CC00"+.@lstp$; next; for(set .@i, 0; .@i < getarraysize(.@acidlmac$); set .@i, .@i + 1){ mes .@i+1+". ^00CC00"+.@acidlmac$[.@i]+"^000000 "; mes "Login Count: "+.@lgncnt[.@i]+" "; mes "Last Login: "+.@lstlgn$[.@i]+" "; } close; }}  
  5. Upvote
    Zeiyan reacted to ossi0110 in EMERGENCY! Map-server crash   
    did you added it into the trunk folder?  on the desktop from asura ?
     
    if yes when you compile the server he is automatic in GDB mode.
     
    then you just have to rightclick in the trunk folder and use Open Terminal from here,  and write  gdb map-server core  and then bt full
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.