Jump to content

Lil Troll

Members
  • Posts

    276
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Lil Troll

  1. Do you mean it does`nt change name in guild?

     

    First revert your name back to original then,

    Find this line:

    query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'";
    

    And below add this.

    query_sql "UPDATE `guild_member` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'";
  2. Hey! Thanks for the nice release.

    I'm gonna try this out!

    Keep it up! Cheers.

     

     

    @Lil Troll, May i asked for a few question? i don't understand at the OnInit: part there are lots of setarray but it doenst work?

    like the 

     

    setarray .Debris[0],7049,757,756,6077,1010,1011,984,985;    // DEBRIS, STONES,ELUNIUM,ORIDECON,REFINE MATERIALS && ETC..

    setarray .Scatter[0],1,2,3;                        // DEBRIS AMOUNT.
    setarray .ScatArea[0],1,2,3;                    // SCATTER AREA.
    setarray .SFXS[0],225,805,60;                    // MINING CAST
    setarray .SFX[0],44,100,4,18,53,65,960,965,967,901,730,722,585,32,907,810,941,563;    // Mining Explosion.

     

    Sort of confuse. @_@

    What do you mean? Are you getting map server error? 

     

    If you are pinpointing "setarray .Debris[0]":

    It is the scattered fragments upon explosion of the mine. Its just like consultation rewards. It will be randomly set as a drop upon set of explosion.

     

    If you are pinpointing "setarray .Scatter[0]":

    It is scattered debris amount pero explosion.

     

    If you are pinpointing "setarray .ScatArea[0]":

    This is the array of random area which the debris will be created.

  3. Hi Lil Troll,

     

    Create a code like this sir, welcome123

     

    and claim it using this Welcome123 uppercase "W"

     

    it will trigger the spam. you can get unlimited item using the code Welcome123 uppercase "W"

     

    Thanks,

     

    Or can be abuse with WELCOME123. Try it.

    Using input string is case sensitive. Sorry guys it took long, because I cant get what you both want to say to me. I`m not really good in English. 

     

    Now this is the fix:

    input .@pcode$;
    set .@pc$,strtoupper(.@pcode$);
    

    All inputted codes will be set to uppercase.

     

    Also all random codes is generated in upper case.

     

    Updated to new version.

     

    Please tell me guys if you found new bugs/errors, so that my next release will be much stable. (Includes mailing of codes and referral system.)

  4. for Sacred:
    input .@heroictoken;
    if(countitem(HeroicTokenID)<.@heroictoken*15){
    mes "Insufficient "+HeroicTokenID+"`s;
    close;
    }
    getitem SacredTokenID,(.@heroictoken/15)
    delitem HeroicTokenID,.@heroictoken
    
    for Heroic:
    input .@sacredtoken;
    if(countitem(SacredTokenID)<.@sacredtoken/15){
    mes "Insufficient "+SacredTokenID+"`s;
    close;
    }
    getitem  HeroicTokenID,(.@sacredtoken*15)
    delitem SacredTokenID,.@sacredtoken

    This is the base script. Little modification will do. If you like me to customize it give me the whole script you are using. :)

  5. prontera,158,182,0	script	Sample	100,{
    	mes "Blahblah";
    	menu "Change Name",one,"Change Birth",two;
    		one:
    			query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+strcharinfo(0)+"'",.@current$;	
    			mes "Input name...";
    			input .@name$;
    			if(getstrlen(.@name$)<4| getstrlen(.@name$)>23){
    				mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters.";
    			}
    			if(.@name$ == strcharinfo(0)) {
    				mes "You cannot enter same name.";
    				close;
    			}
    			mes "New name: "+.@name$+"";
    			query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'";
                            query_sql "UPDATE `guild_member` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'";
    			sleep2 1000;
    			mes "Name successfully changed, please relog to see changes.";
    			close;
    		two:
    			query_sql "SELECT `birthdate` FROM `ragnarok`.`login` WHERE `account_id` = '"+getcharid(3)+"'",.@birthdate$;
    			mes "Birth Date: "+.@birthdate$+"";
    			mes "Input Year of Birth.";
    			input .@year;
    			if(.@year==0){
    				mes "You entered wrong number of month.";
    				close;
    			}
    			mes "Input Month of Birth.";
    			input .@month;
    			if(.@month==0||.@month>12){
    				mes "You entered wrong number of month.";
    				close;
    			}
    			mes "Input Day of Birth.";
    			input .@day;
    			if(.@day==0||.@day>31){
    				mes "You entered wrong number of day.";
    				close;
    			}
    			mes "New B-D: "+.@year+"-"+.@month+"-"+.@day+"";
    			query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql(.@year)+"-"+escape_sql(.@month)+"-"+escape_sql(.@day)+"' WHERE `account_id` = '"+getcharid(3)+"'";
    			sleep2 1000;
    			mes "Birth Date successfully changed!";
    			close;
    }
    

    Here you go. You just need a lil modification. :)

    • Upvote 1
  6. @Lit Troll

    Still the Char's are not logging out from the server when they are in the same map.

    I think you dint understand my request.

    What do you mean by this?

    I want all the ID's too be killed not kicked out.
    

    From my above post i used (If you want the char to be killed):

    unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
    

    If you wanted the char to be kicked not killed change above to:

    atcommand "@kick " + strcharinfo(0); 

    It will kick the last player who joined the woe with same ip(This is not advisable when players are playing on internet cafe.)

    Idk yet how to kick both of them, because there's no command that can be used atm(in my own knowledge, if im not mistaking).

  7. -   script    Card    -1,{
        setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
        for ( set .@i,0; .@i < getarraysize(.Card); set .@i,.@i+1 ) {
            if ( isequippedcnt(.Card[.@i]) > 2 ) {
            dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
            nude;
            }
        }
        return;
    }
    

    Try this? Why you are using function?

  8. /////////////////////////////////////////////////////////////////////////
    //---------------------------------------------------------------------//
    //                       MINING (EXPLOSION TYPE)                       //
    //                     AUTHOR: LIL TROLL//COLDFIRE                     //
    //---------------------------------------------------------------------//
    //                          RATHENA SCRIPT                             //
    //---------------------------------------------------------------------//
    //                            Version 1                                //
    //---------------------------------------------------------------------//
    //    Credits to:                                                      //
    //    - Sir Emistry(For teaching me OnTouch).                          //
    //    - Lesbie for requesting the script.                              //
    //     FEATURES:                                                       //
    //    - Set the configuration, run the script.                         //
    //    - Add duplicates.                                                //
    //    - Player set the explosion and run for it!                       //
    //    - Wait till the explosion off then grab the items.               //
    //    - NPC AutoHides after set of explosions.                         //
    //---------------------------------------------------------------------//
    /////////////////////////////////////////////////////////////////////////

    explosive_mining.txt

    • Upvote 3
  9. Can i request?

    I want all the ID's too be killed not kicked out.

    If the 2 same IP chars get's into a map which is same IP restricted, i want them both to get killed(log'd out from the server).

    Thank you.

    Done.. :)

     

    -	script	dualclientkicker	-1,{
    OnPCLoadMapEvent:
    	set .@charmap$, strcharinfo(3);
    	if(!compare(.tmp$,.@charmap$)) end;
    	set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` = (SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a);
    	if(.@len-1) {
    		for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) {
    			getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d]));
    			if(.@charmap$==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) {
    				dispbottom "Duel accounts not allowed in WOE.";
    				unitskilluseid getcharid(3),"NPC_SELFDESTRUCTION",1;
    			}
    		}
    	}
    	end;
    	
    OnInit:
    	setarray   .maps$  ,	"aldeg_cas01", "gefg_cas01", "payg_cas01", "prtg_cas01";
    	set        .lens   ,	getarraysize(.maps$)                                   ;
    	for(set(.a,0);.a<.lens;set(.a,.a+1)) {
    		setmapflag .maps$[.a],	mf_loadevent ;
    		set .tmp$  ,.tmp$+.maps$[.a]+",";
    	}
    }
    
  10. I didn't test it yet. Tell me if there's wrong alright? :)

    /*
    DROP TABLE IF EXISTS `player_count`;
    CREATE TABLE IF NOT EXISTS `player_count` (
      `char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `count` int(10) unsigned NOT NULL DEFAULT '0',
      `date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      PRIMARY KEY (`id`)
    ) ENGINE = MYISAM;
    */
    -	script	Online_Peak	-1,{
    OnInit:
    query_sql "CREATE TABLE IF NOT EXISTS `player_count` (`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`count` int(10) unsigned NOT NULL DEFAULT '0',`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (`char_id`)) ENGINE = MYISAM";
    OnPCLoginEvent:
    	set .CurrentOnline,getusers(1); 
    	query_sql("SELECT `count` FROM `player_count` ORDER BY `count` LIMIT 1",.@CountUsers);
    	set .OnlinePeak,.@CountUsers[0]; 
    	if(getarraysize(.@CountUsers) == 0) {
    		set .OnlinePeak,.CurrentOnline;
    		query_sql("INSERT INTO `player_count`(count,date) VALUES("+.OnlinePeak+",NOW())");
    	}
    	else {
    		if(.CurrentOnline>.OnlinePeak) {
    			set .OnlinePeak,.CurrentOnline;		
    			query_sql("UPDATE `player_count` SET count = '"+.OnlinePeak+"', date = NOW()");
    			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
    			sleep2 3000;
    			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
    			sleep2 3000;
    			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
    			sleep2 3000;
    			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
    			sleep2 3000;
    			announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
    		}
    	}
    	
    end;
    }
  11. Thanks guys for stating errors,  got to look over it. I think ima re-write the whole sql part. Give me a bit over here. :)

     

     

    Sure mate. :)

    Updated to 1.2.2 actually guys, I do not know what causing you the bug, but it was working fine on me, I think the bug is because of SQL Administrative issues or using older SVN's.

     

    YMSXufC.png

  12. Where's the v.1.1 Script?

    Thanks for this.

    Forgot to save and add v.1.1 happened to update it to v.1.2. 

    Uploaded new version.

    awesome! Thank u! Very useful script :)

    update: Why you need a Serial code in script?

    I did that because anyone can open the gift box.

    Bump, uploaded new update. Added if equip is changed checks.

    Bump, updated again, fix typo error in if equip is changed checks.

  13. As usual, your scripting skills are increasing at quite a steady pace. I only have 2 suggestion, and that is to remove the use of the $@gb var, and change to .gb var. Secondly, merge both of those NPCs into 1. It may be easier to read and look at as 2 different NPCs, but it's definitely not necessary.

     

    Also, I don't think there is a need to bind 3 similar commands, if they are not spelt differently. I do believe that rAthena's @command system, is not case sensitive. Therefore, binding @gift should be all that is needed.

    Noted sir GMOcean really, thanks! Regarding the @command, idk why but in my current svn it is case sensitive. :(

     

    @pandacakep, thanks mate! 

     

    EDITED:

     

    As usual, your scripting skills are increasing at quite a steady pace. I only have 2 suggestion, and that is to remove the use of the $@gb var, and change to .gb var. Secondly, merge both of those NPCs into 1. It may be easier to read and look at as 2 different NPCs, but it's definitely not necessary.

     

    Also, I don't think there is a need to bind 3 similar commands, if they are not spelt differently. I do believe that rAthena's @command system, is not case sensitive. Therefore, binding @gift should be all that is needed.

    Thanks sir GM Ocean!

     

    Bump updated to v.1.1. :)

×
×
  • Create New...