Jump to content

Petey Pablo

Members
  • Posts

    569
  • Joined

  • Last visited

Posts posted by Petey Pablo

  1. here

    int atcommand_sleep(const int fd, struct map_session_data* sd, const char* command, const char* message)
    {
    
    
    if(map_flag_gvg(sd->bl.m) || map_flag_vs(sd->bl.m)){
    clif_displaymessage(fd, "you can't....");
    return -1;
    }
    if(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > 10) {
    if(sd->sc.opt1 != 0 && sd->sc.opt1 != OPT1_SLEEP){
    	clif_displaymessage(fd, msg_txt(707)); //Please refrain from trying to abuse this command.
    		return -1;
    }
    if(sd->sc.opt1 != OPT1_SLEEP){
    	sc_start(&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"
    	sd->sc.opt1 = OPT1_SLEEP;
    	sc_start(&sd->bl,SC_COMA,100,1,skill_get_time2(185,1));
    	clif_displaymessage(fd, msg_txt(705)); //You are now asleep.
    } else {
    	sd->sc.opt1 = 0;
    	clif_emotion(&sd->bl,45);
    	status_change_end(&sd->bl, SC_TRICKDEAD, -1);
    	sc_start(&sd->bl,SC_COMA,100,1,skill_get_time2(185,1));
    	clif_displaymessage(fd, msg_txt(706)); //You are now awake.
    }
    
    	clif_changeoption(&sd->bl);
    		return 0;
    }
    	clif_displaymessage(fd, msg_txt(707)); //Please refrain from trying to abuse this command.
    		return -1;
    }

  2. How to disable @sleep command on pvp and gvg maps? See my source code below

    int atcommand_sleep(const int fd, struct map_session_data* sd, const char* command, const char* message)
    {
    
       if(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > 10) {
       if(sd->sc.opt1 != 0 && sd->sc.opt1 != OPT1_SLEEP){
           clif_displaymessage(fd, msg_txt(707)); //Please refrain from trying to abuse this command.
               return -1;
       }
       if(sd->sc.opt1 != OPT1_SLEEP){
           sc_start(&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"
           sd->sc.opt1 = OPT1_SLEEP;
           sc_start(&sd->bl,SC_COMA,100,1,skill_get_time2(185,1));
           clif_displaymessage(fd, msg_txt(705)); //You are now asleep.
       } else {
           sd->sc.opt1 = 0;
           clif_emotion(&sd->bl,45);
           status_change_end(&sd->bl, SC_TRICKDEAD, -1);
           sc_start(&sd->bl,SC_COMA,100,1,skill_get_time2(185,1));
           clif_displaymessage(fd, msg_txt(706)); //You are now awake.
       }
    
           clif_changeoption(&sd->bl);
               return 0;
       }
           clif_displaymessage(fd, msg_txt(707)); //Please refrain from trying to abuse this command.
               return -1;
    }

  3. Problem with the afk hat. Im using eA and Xray Client. See image below

    /*==========================================
    * @afk
    *------------------------------------------*/
    ACMD_FUNC(afk) {
    
    	nullpo_retr(-1, sd);
    
    			if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag )
    			{
    
    			if(map[sd->bl.m].flag.pvp  || map[sd->bl.m].flag.gvg){
    			clif_displaymessage(fd, "You may not use the @afk maps PVP or GVG.");
    			return -1;}
    
    					sd->state.autotrade = 1;
    					sd->state.monster_ignore = 1;
    pc_setsit(sd);
    					skill_sit(sd,1);
    					clif_sitting(&sd->bl);
    clif_changelook(&sd->bl,LOOK_HEAD_TOP,471);
    					clif_specialeffect(&sd->bl, 234,AREA);					  
    					if( battle_config.at_timeout )
    					{
    							int timeout = atoi(message);
    							status_change_start(&sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout)*60000,0);
    					}
    					clif_authfail_fd(fd, 15);
    			} else
    					clif_displaymessage(fd, "@afk is not allowed on this map.");
    	return 0;
    }
    

    Screenshot problem:

    t7nbdy.jpg

    how do i change hat to this http://ratemyserver....&isearch=Search

    Thank you!

  4. I have problem with E-Inquiry.

    My player is already send a message to lvl99 gm. But the lvl99 gm's is not recieving message from normal characters. See the image below

    Player

    xfqmme.jpg

    lvl99 GM

    w9jghv.jpg

    Im using eA.

    main script

    - script E-Inquiry -1,{
    
    OnStartMenu:
    mes "Do you having problems and wish to inform GM Staffs about this ?";
    next;
    switch( select( "View Messages",
    "Write Messages",
    ( getgmlevel() < .GMLevel )?"":"^FF0000[ GM ]^000000 Manage Messages" )){
    
    Case 1:
    do{
    mes "What types of Messages you would like to View ?";
    for( set .@i,0; .@i < 3; set .@i,.@i + 1 )
    set .@Found[.@i],query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = "+.@i+" AND `Sender_ID`='"+getcharid(3)+"'",.@ID );
    
    set .@Msg,select("^FF0000Un-Replied Messanges [ ^FF0000"+.@Found[0]+"^000000 ]",
    "^0000FFReplied Messages^000000 [ ^FF0000"+.@Found[1]+"^000000 ]",
    "Archieved Messages [ ^FF0000"+.@Found[2]+"^000000 ]" ) - 1;
    set .@Replied,query_sql(" SELECT `ID`,`Title`,`Message`,`Inquiry_Time`,`Reply`,`Reply_Time`,`Reply_Name` FROM `E-Inquiry` WHERE `Status`= "+.@Msg+" AND `Sender_ID`='"+getcharid(3)+"' ",.@ID, .@Title$,.@Message$,.@Time$,.@Reply$,.@ReplyTime$,.@ReplyName$ );
    if( !.@Replied ){
    mes "You didnt have Messages to read.";
    next;
    }else{
    set .@Menu$,"";
    for( set .@i,0; .@i < .@Replied; set .@i,.@i + 1 )
    set .@Menu$,.@Menu$ + "^FF0000[ "+( .@i+1 )+". ]^0000FF "+.@Title$[.@i]+":";
    next;
    set .@Select,select( .@Menu$ ) - 1;
    mes "^00FF00____________________________^000000";
    mes "^FF0000Date :^000000 : "+.@Time$[.@Select];
    mes "^FF0000Title^000000 : "+.@Title$[.@Select];
    mes "^00FF00____________________________^000000";
    mes "^FF0000Messages^000000 : "+.@Message$[.@Select];
    mes "^00FF00____________________________^000000";
    if( .@Msg > 0 ){
    mes "^0000FFReply from ^FF0000"+.@ReplyName$[.@Select]+" ^000000 : "+.@Reply$[.@Select];
    mes "^00FF00____________________________^000000";
    mes "^0000FFTime ^000000 : "+.@ReplyTime$[.@Select];
    }
    next;
    set .@MsgOpt1,select("View Other Messages",( .@Msg == 1 )?"Move to Archieve":"","Delete Message" );
    switch( .@MsgOpt1 ){
    Case 2:
    query_sql("UPDATE `E-Inquiry` SET `Status` = 2 WHERE `ID` = "+.@ID[.@Select]+" ");
    mes "Message has been moved to Archieve.";
    break;
    Case 3:
    query_sql("DELETE FROM `E-Inquiry` WHERE `ID` = "+.@ID[.@Select]+" ");
    mes "Message has been DELETED.";
    break;
    default:
    break;
    }
    }
    }while( .@MsgOpt1 < 3 );
    break;
    
    Case 2:
    mes "^00FF00____________________________^000000";
    mes "^FF0000NOTES :^000000 All the Messages will be recorded for future references, so please do not abuse this. Otherwise action will be taken on you";
    do{
    next;
    mes "^00FF00____________________________^000000";
    mes "^FF0000Title^000000 : "+.@Title$;
    mes "^00FF00____________________________^000000";
    mes "^FF0000Messages^000000 : "+.@Message$;
    mes "^00FF00____________________________^000000";
    
    next;
    set .@Select,select(( .@Title$ == "" )?"[ ^FF0000Incomplete^000000 ] Title":"[ ^0000FFCompleted^000000 ] Title",
    ( .@Message$ == "" )?"[ ^FF0000Incomplete^000000 ] Message":"[^0000FFCompleted^000000 ] Title",
    ( .@Title$ == "" || .@Message$ == "" )?"":"^FF0000SEND MESSAGE^000000" );
    
    switch( .@Select ){
    Case 1:
    mes "Enter a Title for your Problems";
    input .@Title$;
    break;
    Case 2:
    mes "Briefly explain what's your Problem";
    set .@i,0;
    do{
    input getd(".@Message"+.@i+"$");
    set .@Message$,.@Message$ + getd(".@Message"+.@i+"$")+" ";
    set .@Continue,select("Complete:Continue Messages");
    }while( .@Continue == 2 );
    break;
    default:
    mes "Your message has been sent.";
    query_sql( "INSERT INTO `E-Inquiry` ( `Sender_ID`,`Sender_Name`,`Title`,`Message`,`Status`,`Inquiry_Time` ) VALUES ( "+getcharid(3)+",'"+escape_sql(strcharinfo(0))+"','"+escape_sql(.@Title$)+"','"+escape_sql(.@Message$)+"',0,'"+gettimestr("%Y-%m-%d %H:%M:%S",21)+"' ) ");
    break;
    }
    }while( .@Select != 3 );
    break;
    
    Case 3:
    do{
    mes "Alright, what next ?";
    next;
    for( set .@i,0; .@i < 3; set .@i,.@i + 1 )
    set .@Found[.@i],query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = "+.@i+"",.@ID );
    
    set .@Types,select("^FF0000View All Unread Messanges [ ^FF0000"+.@Found[0]+"^000000 ]",
    "View All Replied Messages^000000 [ ^FF0000"+.@Found[1]+"^000000 ]",
    "View All Archieved Messages [ ^FF0000"+.@Found[2]+"^000000 ]" ) - 1;
    
    set .@ManageMSG,query_sql(" SELECT `ID`,`Sender_Name`,`Title`,`Message`,`Inquiry_Time`,`Reply`,`Reply_Time`,`Reply_Name` FROM `E-Inquiry` WHERE `Status`= "+.@Types+" LIMIT 127",.@ID,.@Sender$, .@Title$,.@Message$,.@Time$,.@Reply$,.@ReplyTime$,.@ReplyName$ );
    if( !.@ManageMSG ){
    mes "You didnt have Messages to read.";
    next;
    }else{
    set .@Menu$,"";
    for( set .@i,0; .@i < .@ManageMSG; set .@i,.@i + 1 )
    set .@Menu$,.@Menu$ +"^FF0000[ "+( .@i+1 )+". ]^0000FF "+.@Title$[.@i]+":";
    next;
    set .@Select,select( .@Menu$ ) - 1;
    mes "^00FF00____________________________^000000";
    mes "^FF0000Date :^000000 : "+.@Time$[.@Select];
    mes "^FF0000Aurthor :^000000 : "+.@Sender$[.@Select];
    mes "^FF0000Title^000000 : "+.@Title$[.@Select];
    mes "^00FF00____________________________^000000";
    mes "^FF0000Messages^000000 : "+.@Message$[.@Select];
    mes "^00FF00____________________________^000000";
    if( .@Types > 0 ){
    mes "^0000FFReply from ^FF0000"+.@ReplyName$[.@Select]+" ^000000 : "+.@Reply$[.@Select];
    mes "^00FF00____________________________^000000";
    mes "^0000FFTIme ^000000 : "+.@ReplyTime$[.@Select];
    }
    next;
    set .@MsgOpt1,select( ( .@Types == 2 )?"":"Reply Message","View Other Messages","Delete Message" );
    switch( .@MsgOpt1 ){
    Case 1:
    set .@i,0;
    do{
    input getd(".@Reply"+.@i+"$");
    set .@Reply$,.@Reply$ + getd(".@Reply"+.@i+"$")+" ";
    set .@Continue,select("Complete:Continue Messages");
    }while( .@Continue == 2 );
    
    query_sql("UPDATE `E-Inquiry` SET `Status` = 1,`Reply`='"+escape_sql(.@Reply$)+"',`Reply_Name`='"+escape_sql(strcharinfo(0))+"',`Reply_Time`='"+gettimestr("%Y-%m-%d %H:%M:%S",21)+"' WHERE `ID` = "+.@ID[.@Select]+" ");
    message strcharinfo(0),"Reply has been sent.";
    break;
    Case 3:
    query_sql("DELETE FROM `E-Inquiry` WHERE `ID` = "+.@ID[.@Select]+" ");
    mes "Message has been Deleted.";
    default:
    break;
    }
    }
    }while( .@MsgOpt1 != 1 );
    break;
    }
    close;
    
    OnInit:
    // Min. GM Level to Read / Manage Messages.
    set .GMLevel,99;
    end;
    
    OnPCLoginEvent:
    if( getgmlevel() < .GMLevel ){
    set .@Replied,query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = 1 AND `Sender_ID`='"+getcharid(3)+"'",.@ID );
    if( .@Replied )
    message strcharinfo(0),"You have "+.@Replied+" Replied Messages from GM Team.";
    }else{
    set .@Unread,query_sql("SELECT `ID` FROM `E-Inquiry` WHERE `Status` = 0 ",.@ID );
    if( .@Unread )
    message strcharinfo(0),"GM Team received "+.@Unread+" New Message from Players.";
    }
    if( .@Replied || .@Unread ){
    if( select("Read the Messages:Cancel") == 2 ) close;
    goto OnStartMenu;
    }
    end;
    
    }
    
    // Main NPC
    prontera,151,186,5 script E-Inquiry#Main 757,{
    doevent "E-Inquiry::OnStartMenu";
    }
    
    // Duplicates NPC
    // prontera,155,181,5 duplicate(E-Inquiry#Main) E-Inquiry#1 757
    // prontera,155,182,5 duplicate(E-Inquiry#Main) E-Inquiry#2 757
    // prontera,155,183,5 duplicate(E-Inquiry#Main) E-Inquiry#3 757
    

    sql script

    CREATE TABLE IF NOT EXISTS `E-Inquiry` (
    `ID` bigint(20) unsigned NOT NULL auto_increment,
    `Sender_ID` int(11) unsigned NOT NULL default '0',
    `Sender_Name` varchar(30) NOT NULL default '',
    `Title` text,
    `Message` text,
    `Status` tinyint(2) NOT NULL default '0',
    `Inquiry_Time` datetime NOT NULL default '0000-00-00 00:00:00',
    `Reply` text,
    `Reply_Time` datetime NOT NULL default '0000-00-00 00:00:00',
    `Reply_Name` varchar(30) NOT NULL default '',
    PRIMARY KEY  (`ID`)
    ) ENGINE=MyISAM;
    

  5. Alright, guess I'll just upload mine for him :P

    Here you go:

    //===== rAthena Script =======================================
    //= Account Locker
    //===== By: ==================================================
    //= darristan ([email protected])
    //===== Current Version: =====================================
    //= 1.1
    //===== Compatible With: =====================================
    //= rAthena SVN
    //===== Additional Comments: =================================
    //= 1.0 Initial release
    //= 1.1 Added wrong password attempt
    //= 1.2 Added atcmd binding
    //============================================================
    aria_in,46,166,2 script Account Manager 57,{
    mes "[Account Manager]";
    mes "Hello " + strcharinfo(0) + ".";
    mes "How may I assist you today?";
    next;
    switch(select(((!#AccLock)? "Lock Account:":":Unlock Account")+":Information:Cancel")) {
    case 1:
     mes "[Account Manager]";
     mes "So if you would like to lock your account, you will need to input a password after next.";
     mes "^808080Tips: Input 0 to cancel.^000000";
     next;
     input .@Pass$;
     if (.@Pass$ == "0") {
      mes "[Account Manager]";
      mes "Alright, you can always talk me to again if you changed your mind.";
      close;
     }
     mes "[Account Manager]";
     mes "Good. So the password would be:";
     mes "^0055FF" + .@Pass$ + "^000000";
     mes "Proceed?";
     next;
     if (select("Confirm:Cancel") == 2) {
      mes "[Account Manager]";
      mes "Alright. Talk to me again anytime.";
      close;
     }
     mes "[Account Manager]";
     mes "Password is now set. Account will be locked upon log out.";
     set .@Pass$, #AccPass$;
     set #AccLock, 1;
     close;
    case 2:
     mes "[Account Manager]";
     mes "Please input your password.";
     mes "^808080Tips: Input 0 to cancel.^000000";
     set @Attempt, .Attempt;
     next;
     input .@Pass$;
     if (.@Pass$ == "0") {
      mes "[Account Manager]";
      mes "Alright, you can always talk me to again if you changed your mind.";
      close;
     }
     while (.@Pass$ != #AccPass$) {
      if (@Attempt == 0) {
    mes "[Account Manager]";
    mes "You have entered wrong password too many times!";
    close2;
    atcommand "@kick " + strcharinfo(0);
    end;
      }
      set @Attempt, @Attempt - 1;
      mes "[Account Manager]";
      mes "Wrong password! You have " + @Attempt + " attempt left.";
      next;
      input .@Pass$;
     }
     mes "[Account Manager]";
     mes "Account unlocked. You can always talk to me if you intended to lock your account again.";
     set #AccLock, 0;
     close;
    case 3:
     mes "[Account Manager]";
     mes "If you feel unsafe with your account, you can always use my service and lock them with a password. Upon logging in, password will be asked and will give no access on wrong password.";
     close;
    case 4:
     mes "[Account Manager]";
     mes "See you again!";
     close;
    }
    OnInit:
    set .Attempt, 3; // Number of attempts if wrong password entered.
    end;
    }
    
    - script AccLock -1,{
    OnLock:
    if (#AccLock == 1) {
     dispbottom "Lock failed! Your account is already locked.";
     end;
    }
    if (.@atcmd_parameters$ == "") {
     dispbottom "Lock failed! Password cannot be empty.";
     end;
    }
    if (getstrlen(.@atcmd_parameters$) < 4) {
     dispbottom "Lock failed! Password must be at least 4 characters.";
     end;
    }
    set #AccPass$, .@atcmd_parameters$;
    set #AccLock, 1;
    dispbottom "Account locked successfully! Password is " + #AccPass$ + ".";
    end;
    OnUnlock:
    if (#AccLock == 0) {
     dispbottom "Unlock failed! Your account is already unlocked.";
     end;
    }
    if (.@atcmd_parameters$ == "" || .@atcmd_parameters$ != #AccPass$) {
     dispbottom "Unlock failed! Wrong password!";
     end;
    }
    set #AccLock, 0;
    dispbottom "Account unlocked successfully.";
    end;
    
    OnPCLoginEvent:
    if (#AccLock == 1) {
     specialeffect2 9;
     atcommand "@option 2 0 "+(64|(checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
     set @Attempt, .Attempt;
     mes "[Account Manager]";
     mes "Please input your password to continue.";
     next;
     input .@Pass$;
     while (.@Pass$ != #AccPass$) {
      if (@Attempt == 1) {
    mes "[Account Manager]";
    mes "You have entered wrong password too many times!";
    close2;
    atcommand "@kick " + strcharinfo(0);
    end;
      }
      set @Attempt, @Attempt - 1;
      mes "[Account Manager]";
      mes "Wrong password! You have " + @Attempt + " attempt left.";
      next;
      input .@Pass$;
     }
     mes "[Account Manager]";
     mes "You may continue your game now.";
     atcommand "@option 0 0 " + ((checkoption(8)*8)|(checkoption(16)*16)|(checkoption(32)*32)|(checkoption(128)*128)|(checkoption(256)*256)|(checkoption(512)*512)|(checkoption(1024)*1024));
     close;
    }
    end;
    OnInit:
    bindatcmd("lock","AccLock::OnLock");
    bindatcmd("unlock","AccLock::OnUnlock");
    set .Attempt, 3; // Number of attempts if wrong password entered.
    end;
    }
    

    Usage:

    @lock <password>

    @unlock <password>

    or talk to the NPC.

    error found. im using old eA revision. See the image below.

    post-524-0-56587600-1350663688_thumb.jpg

  6. How about the other skills? :)

    Increase Throw Fuuma Shuriken Skill Damage but you must use Huuma weapon class.

    Increase Magic Damage - Must use Huuma weapon class.

    Reduced Throw Fuuma Sheriken skill delay

    Reduced Reverse Tatami Skill Delay

×
×
  • Create New...