Jump to content
  • 0

NPC Staff CP


Question

8 answers to this question

Recommended Posts

Posted

Hi Icabit!

 

To tell the truth I did not download the NPC.

I just know that no longer works because the message in the file page =\

This file has been reported as broken because: Not working in latest svn

 

However, thanks for the help intention!

 

Att,

CaioVictor.

Posted

Hi Icabit!

 

To tell the truth I did not download the NPC.

I just know that no longer works because the message in the file page =\

This file has been reported as broken because: Not working in latest svn

 

However, thanks for the help intention!

 

Att,

CaioVictor.

ill keep in touch with you

i might need this script myself

but i can't promise you that im a good scripter

Posted

This is an incomplete sample of your link :

prontera,150,150,0    script    Sample    100,{
    if ( getgmlevel() < .level ) end;
    mes .npc$;
    mes "What can i do for you?";
    next;
    switch(select("Account Data:IP Tracker:Nothing")) {
        case 1: mes .npc$;
                mes "Input the name of character";
                next;
                input @name$;
                query_sql "SELECT `group_id` FROM `login` JOIN `char` ON `login`.`account_id` = `char`.`account_id` WHERE `char`.`name` ='" +escape_sql(@name$)+ "'",@is_staff;
                if (@is_staff == 0) {
                    mes .npc$;
                    mes @name$+ " is not a staff on this server";
                    close;
                }
                query_sql "SELECT `login`.`account_id`, `userid` , `user_pass`, `sex` , `email` , `group_id` , `lastlogin` FROM `login` JOIN `char` ON `login`.`account_id` = `char`.`account_id` WHERE `char`.`name` ='" +escape_sql(@name$)+ "'",@aid,@u$,@up$,@s$,@e$,@gid,@ll$;
                mes .npc$;
                mes "The account information of " +@name$+ " are as follows : ";
                next;
                mes "Account ID : " +@aid;
                mes "Account Username : " +@u$;
                mes "Password : " +@up$;
                mes "Gender : " +@s$;
                mes "E-Mail : " +@e$;
                mes "Group ID : " +@gid;
                mes "Last Login : " +@ll$;
                break;
        case 2: mes .npc$;
                mes "Tracker Report :";
                mes "==============================";
                query_sql "SELECT `userid`, `lastlogin`, `last_ip` FROM `login` WHERE `group_id` != '0'", @user$, @login$, @lastIP$;
                for ( set .@i, 0; .@i < getarraysize(@user$); set .@i, .@i + 1 ) {
                    mes "Login : " +@user$[.@i];
                    mes "Date/Time : " +@login$[.@i];
                    mes "IP Address : " +@lastIP$[.@i];
                    mes "==============================";
                }
                break;
        case 3: mes .npc$;
                mes "Nice to meet you " +(Sex?"sir":"maam")+ ".";
                break;
        default: break;
    }
    end;

    OnInit:
        // NPC Name
        set .npc$, "[ " +strnpcinfo(1)+ " ]";
        // Lowest GM level to access the npc
        set .level, 99; 
        end;
}

This npc only consists account data and IP tracker of all staffs on your server. I am a bit lazy to code the whole npc because i have many things to do right now. /no1

Posted (edited)

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/script_commands.txt

 

i edited skorms script

 

i removed 

if ( getgmlevel() < .level ) end;

and

                query_sql "SELECT `group_id` FROM `login` JOIN `char` ON `login`.`account_id` = `char`.`account_id` WHERE `char`.`name` ='" +escape_sql(@name$)+ "'",@is_staff;
                if (@is_staff == 0) {
                    mes .npc$;
                    mes @name$+ " is not a staff on this server";
                    close;
                }
 

 

i replaced it

if ( getgroupid() < .level ) end;

 

 

heres my script for now i added the one for character details and reset note this is not yet tested

the sql database i used for reference is from https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/sql-files/main.sql

 

--
-- Table structure for table `char`
--

CREATE TABLE IF NOT EXISTS `char` (
`char_id` int(11) unsigned NOT NULL auto_increment,
`account_id` int(11) unsigned NOT NULL default '0',
`char_num` tinyint(1) NOT NULL default '0',
`name` varchar(30) NOT NULL DEFAULT '',
`class` smallint(6) unsigned NOT NULL default '0',
`base_level` smallint(6) unsigned NOT NULL default '1',
`job_level` smallint(6) unsigned NOT NULL default '1',
`base_exp` bigint(20) unsigned NOT NULL default '0',
`job_exp` bigint(20) unsigned NOT NULL default '0',
`zeny` int(11) unsigned NOT NULL default '0',
`str` smallint(4) unsigned NOT NULL default '0',
`agi` smallint(4) unsigned NOT NULL default '0',
`vit` smallint(4) unsigned NOT NULL default '0',
`int` smallint(4) unsigned NOT NULL default '0',
`dex` smallint(4) unsigned NOT NULL default '0',
`luk` smallint(4) unsigned NOT NULL default '0',
`max_hp` mediumint(8) unsigned NOT NULL default '0',
`hp` mediumint(8) unsigned NOT NULL default '0',
`max_sp` mediumint(6) unsigned NOT NULL default '0',
`sp` mediumint(6) unsigned NOT NULL default '0',
`status_point` int(11) unsigned NOT NULL default '0',
`skill_point` int(11) unsigned NOT NULL default '0',
`option` int(11) NOT NULL default '0',
`karma` tinyint(3) NOT NULL default '0',
`manner` smallint(6) NOT NULL default '0',
`party_id` int(11) unsigned NOT NULL default '0',
`guild_id` int(11) unsigned NOT NULL default '0',
`pet_id` int(11) unsigned NOT NULL default '0',
`homun_id` int(11) unsigned NOT NULL default '0',
`elemental_id` int(11) unsigned NOT NULL default '0',
`hair` tinyint(4) unsigned NOT NULL default '0',
`hair_color` smallint(5) unsigned NOT NULL default '0',
`clothes_color` smallint(5) unsigned NOT NULL default '0',
`weapon` smallint(6) unsigned NOT NULL default '0',
`shield` smallint(6) unsigned NOT NULL default '0',
`head_top` smallint(6) unsigned NOT NULL default '0',
`head_mid` smallint(6) unsigned NOT NULL default '0',
`head_bottom` smallint(6) unsigned NOT NULL default '0',
`robe` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0',
`last_map` varchar(11) NOT NULL default '',
`last_x` smallint(4) unsigned NOT NULL default '53',
`last_y` smallint(4) unsigned NOT NULL default '111',
`save_map` varchar(11) NOT NULL default '',
`save_x` smallint(4) unsigned NOT NULL default '53',
`save_y` smallint(4) unsigned NOT NULL default '111',
`partner_id` int(11) unsigned NOT NULL default '0',
`online` tinyint(2) NOT NULL default '0',
`father` int(11) unsigned NOT NULL default '0',
`mother` int(11) unsigned NOT NULL default '0',
`child` int(11) unsigned NOT NULL default '0',
`fame` int(11) unsigned NOT NULL default '0',
`rename` SMALLINT(3) unsigned NOT NULL default '0',
`delete_date` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`moves` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`char_id`),
UNIQUE KEY `name_key` (`name`),
KEY `account_id` (`account_id`),
KEY `party_id` (`party_id`),
KEY `guild_id` (`guild_id`),
KEY `online` (`online`)
) ENGINE=MyISAM AUTO_INCREMENT=150000; 
 
prontera,150,150,0    script    Sample    100,{
    if ( getgroupid() < .level ) end;
    mes .npc$;
    mes "What can i do for you?";
    next;
    switch(select("Account Data:Character Data:IP Tracker:Nothing")) {
        case 1: mes .npc$;
                mes "Input the name of character";
                next;
                input @name$;
                query_sql "SELECT `login`.`account_id`, `userid` , `user_pass`, `sex` , `email` , `group_id` , `lastlogin` FROM `login` JOIN `char` ON `login`.`account_id` = `char`.`account_id` WHERE `char`.`name` ='" +escape_sql(@name$)+ "'",@aid,@u$,@up$,@s$,@e$,@gid,@ll$;
                mes .npc$;
                mes "The account information of " +@name$+ " are as follows : ";
                next;
                mes .npc$;
                mes "Account ID : " +@aid;
                mes "Account Username : " +@u$;
                mes "Password : " +@up$;
                mes "Gender : " +@s$;
                mes "E-Mail : " +@e$;
                mes "Group ID : " +@gid;
                mes "Last Login : " +@ll$;
                break;
    case 2: input @name$;
        query_sql "SELECT * FROM `char` WHERE `name` ='" +escape_sql(@name$) +"'",@char_id,@account_id,@char_num,@name$,@class,@base_level,@job_level,@base_exp,@job_exp,@zeny,@str,@agi,@vit,@int,@dex,@luk,@max_hp,@hp,@max_sp,@sp,@status_point,@skill_point,@option,@karma,@manner,@party_id,@guild_id,@pet_id,@homun_id,@elemental_id,@hair,@hair_color,@clothes_color,@weapon,@shield,@head_top,@head_mid,@head_bottom,@robe,@last_map$,@last_x,@last_y,@save_map$,@save_x,@save_y,@partner_id,@online,@father,@mother,@child,@fame,@rename,@delete_date,@moves;
                mes .npc$;
                mes "The account information of " +@name$+ " are as follows : ";
                next;
                mes .npc$;
                mes "Character ID : " + @char_id;
                mes "Account ID : " + @account_id; 
                mes "Slot : " + @char_num;
                mes "Character Name : " + @name$;
                mes "Class : " + @class;
                mes "Base Level : " + @base_level;
                mes "Job Level : " + @job_level;
                mes "Base Exp : " + @base_exp;
                mes "Job Exp : " + @job_exp;
                mes "Zeny : " + @zeny; 
                mes "Strength : " + @str;
                mes "Agility : " + @agi;
                mes "Vitality : " + @vit;
                mes "Intelligence : " + @int;
                mes "Dexterity : " + @dex;
                mes "Luk : " + @luk;
                mes "Max Hp : " + @max_hp;
                mes "Current Hp : " + @hp;
                mes "Max Sp : " + @max_sp;
                mes "Current Sp : " + @sp;
                mes "Status Points : " + @status_point; 
                mes "Skill Points : " + @skill_point; 
                mes "Option : " + @option;
                mes "Karma : " + @karma;
                mes "Manner : " + @manner;
                mes "Party ID : " + @party_id; 
                mes "Guild ID : " + @guild_id; 
                mes "Pet ID : " + @pet_id; 
                mes "Homunculus ID : " + @homun_id; 
                mes "Elemental ID : " + @elemental_id; 
                mes "Hair : " + @hair;
                mes "Hair Color : " + @hair_color;
                mes "Clothes Color : " + @clothes_color;
                mes "Weapon : " + @weapon;
                mes "Shield : " + @shield;
                mes "Upper Head Gear : " + @head_top;
                mes "Middle Head Gear : " + @head_mid;
                mes "Bottom Head Gear : " + @head_bottom;
                mes "Robe : " + @robe;
                mes "Last Map : " + @last_map$;
                mes "Last Map X : " + @last_x;
                mes "Last Map Y : " + @last_y;
                mes "Save Map : " + @save_map$;
                mes "Save Map X : " + @save_x;
                mes "Save Map Y : " + @save_y;
                mes "Partner ID : " + @partner_id; 
                mes "Online : " + @online;
                mes "Father : " + @father; 
                mes "Mother : " + @mother; 
                mes "Child : " + @child; 
                mes "Fame : " + @fame; 
                mes "Rename : " + @rename;
                mes "Delete Date : " + @delete_date; 
                mes "Moves : " + @moves; 
                next;
                mes "What do you want to do?";
                    switch(select("Reset Look:UnEquip:Reset Position:Nothing"))
                        {
                        case 1:
                            mes "Are you sure you want to Reset the look of this character?";
                            switch(select("Yes:No"))
                                {
                                case 1: 
                                    query "UPDATE hair=0,hair_color=0,clothes_color=0 WHERE `name` ='" +escape_sql(@name$) +"'";
                                    mes "The reset look was successful";
                                    goto Lbreak;
                                case 2:
                                    goto Lbreak;
                                }
                            goto Lbreak;
                        case 2:
                            mes "Are you sure you want to UnEquip this character?";
                            switch(select("Yes:No"))
                                {
                                case 1: 
                                    query "UPDATE weapon=0,shield=0,head_top=0,head_mid=0,head_bottom=0,robe=0 WHERE `name` ='" +escape_sql(@name$) +"'";
                                    mes "UnEquip was successful";
                                    goto Lbreak;
                                case 2:
                                    goto Lbreak;
                                }
                            goto Lbreak;
                        case 3:
                            mes "Are you sure you want to Reset The Position of this character?";
                            switch(select("Yes:No"))
                                {
                                case 1: 
                                    query "UPDATE last_map=Prontera,Last_x=156,Last_y=191 WHERE `name` ='" +escape_sql(@name$) +"'";
                                    mes "UnEquip was successful";
                                    goto Lbreak;
                                case 2:
                                    goto Lbreak;
                                }
                            goto Lbreak;
                        case 4: 
                            goto Lbreak;
                        }
                Lbreak:
                break;
                close;
        case 3: mes .npc$;
                mes "Tracker Report :";
                mes "==============================";
                query_sql "SELECT `userid`, `lastlogin`, `last_ip` FROM `login` WHERE `group_id` != '0'", @user$, @login$, @lastIP$;
                for ( set .@i, 0; .@i < getarraysize(@user$); set .@i, .@i + 1 ) {
                    mes "Login : " +@user$[.@i];
                    mes "Date/Time : " +@login$[.@i];
                    mes "IP Address : " +@lastIP$[.@i];
                    mes "==============================";
                }
                break;
        case 3: mes .npc$;
                mes "Nice to meet you " +(Sex?"sir":"maam")+ ".";
                break;
        default: break;
    }
    end;


    OnInit:
        // NPC Name
        set .npc$, "[ " +strnpcinfo(1)+ " ]";
        // Lowest GM level to access the npc
        set .level, 99; 
        end;
}
 

 

i will follow this topic as much as possible

Edited by icabit
Posted

Hi all ^^'

 

Thanks for the replies and the scripts!

 

However, I really need something to submit registration for trading of items / zennys, last access ...
Something that offers almost complete control of
staff members.

 

I've been thinking about buying that script, however, he has nearly one year without updates, so I do not know if there will be much to be fixed.

 

Anyone would be interested in splitting the price with me?
So we can buy it and make fixes together.
 
Att,
CaioVictor.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...