Jump to content

nanakiwurtz

Members
  • Posts

    1654
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by nanakiwurtz

  1. Hello, I have a script to test:

    prontera,145,150,5	script	gettimestr	735,{
    	dispbottom "1a: "+getstrlen(gettimestr("%Y/%m/%d",20));
    	dispbottom "1b: "+gettimestr("%Y/%m/%d",20);
    	
    	dispbottom "2a: "+getstrlen(gettimestr("%Y/%m/%d",10));
    	dispbottom "2b: "+gettimestr("%Y/%m/%d",10);
    	
    	dispbottom "3a: "+getstrlen(gettimestr("%Y/%m/%d",8));
    	dispbottom "3b: "+gettimestr("%Y/%m/%d",8);
    }
    

    It prints:

    1a: 10
    1b: 2015/11/15
     
    2a: 0
    2b:
     
    3a: 0
    3b:

    Line 1a and 1b works just fine, while line 3a and 3b doesn't even print anything.

    What I'm questioning here is the line 2a and 2b, why it doesn't work even line 1a prints 10?

    To make line 2a and 2b work, it needs 1a + 1 = 11

     

    Current syntax: gettimestr(<format string>,<max length>);

    The format string length (%Y, %m,  %d, etc) is always 2 for each.

    So what I'm suggesting here is to remove max length and make it to count automatically by counting the length of <format string> minus 2 for each %x, add by it's corresponding length (%y=2, %Y=4) then +1.

     

    For example: 

    dispbottom ""+gettimestr("%Y/%m/%d");

    %Y = 4, / = 1, % m= 2, / = 1, %d = 2 -> 4 + 1 + 2 + 1 + 2 = 10, but we need to add 1 to make it to work, so it will be 11.

     

    Buuuuttt.. There is a catch..

    The user locale settings is surely different for each systems, like %A (Full weekday name according to locale settings), %B (Full month name according to locale settings), etc

     

    So I don't know if this suggestion even makes sense or not... /hmm

  2. skill.c: In function ‘skill_parse_row_requiredb’:
    skill.c:20304: warning: array subscript is above array bounds
    skill.c:20305: warning: array subscript is above array bounds

    That warning will be fixed soon

     

    [Error]: skill_parse_row_requiredb: Invalid item 1 for skill 2257.
    [Error]: sv_readdb: Could not process contents of line 683 of "db/pre-re/skill_require_db.txt".

    It means the skill NC_PILEBUNKER require item 1549 (Pilebuncker) which is only available on Renewal...

    Are you using pre-re?

  3. iz_ac01,100,39,4 script Captain Joe 470,{
    	if (BaseClass == Job_Novice) {
    		mes "Welcome,";
    		mes "this is the";
    		mes "Prontera Chivalry.";
    		mes "What brings you here?";
    		next;
    		switch(select("I want to change my job to Swordman.:I want to change my job to a Knight.:Just visiting.")) {
    		case 1:
    			mes "[Captain Joe]";
    			mes "I see.";
    			mes "A Swordman, you say?";
    			mes "You've come to the right place, "+((Sex)?"lad":"lass")+".";
    			mes "but you dont need any quest if you want to become one!";
    			mes "I sense great honor and pride in you so I can change you now into a swordsman.";
    			next;
    			callfunc "Job_Change",Job_Swordsman;
    			callfunc "F_ClearJobVar"; // Clears all job variables for the current player
    			mes "[Captain Joe]";
    			mes "I hereby declare you a member of the Prontera Chivalry.";
    			mes "Protect the weak and live with honor.";
    			next;
    			getitem 656,7; //Awakening_Potion
    			mes "[Captain Herman]";
    			mes "Oh...";
    			mes "We have prepared a small gift to congratulate you on your job change. Please use it when you are in battle as you honorably protect others.";
    			next;
    			mes "[Captain Herman]";
    			mes "Go forth!";
    			mes "The future of Rune-Midgard rests on your shoulders!";
    			close;
    				
    		case 2:
    			mes "[Captain Herman]";
    			mes "Ah, I see that you have great ambition. But you must first become a Swordman before becoming";
    			mes "a Knight. One step at a time...";
    			next;
    			mes "[Captain Herman]";
    			mes "First, visit the Swordman guild in Izlude. Then, come visit us again once you have become a well experienced Swordman.";
    			close;
    				
    		case 3:
    			mes "[Captain Herman]";
    			mes "Aha~";
    			mes "You must have lots of free time. Why don't you go hunt some monsters instead of wandering about aimlessly?";
    			close;
    		}
    	} else if (BaseJob == Job_Swordman) {
    		mes "Ah, a member of our Chivalry.";
    		mes "I hope you are living up to my expectations. We have vowed to be strong for our kingdom, even if death is upon us...";
    		mes "What brings you here?";
    		next;
    		switch(select("I want to change my job to a Knight.:Just visiting.")) {
    		case 1:
    			mes "[Captain Joe]";
    			mes "I see.";
    			mes "A Knight?, you say?";
    			mes "You've come to the right place, "+((Sex)?"lad":"lass")+".";
    			mes "but you dont need any quest if you want to become one!";
    			mes "I sense great honor and pride in you so I can change you now into a knight.";
    			next;
    			callfunc "Job_Change",Job_Knight;
    			callfunc "F_ClearJobVar"; // Clears all job variables for the current player
    			mes "[Captain Joe]";
    			mes "I hereby declare";
    			mes "you a member of";
    			mes "the Prontera Chivalry.";
    			mes "Protect the weak and";
    			mes "live with honor.";
    			next;
    			getitem 656,7; //Awakening_Potion
    			mes "[Captain Herman]";
    			mes "Oh...";
    			mes "We have prepared a small gift to congratulate you on your job change. Please use it when you are in battle as you honorably protect others.";
    			next;
    			mes "[Captain Herman]";
    			mes "Go forth!";
    			mes "The future of";
    			mes "Rune-Midgard";
    			mes "rests on your";
    			mes "shoulders!";
    			close;
    			
    		case 2:
    			mes "[Captain Herman]";
    			mes "Ah, I see you can look around here for some quest in the mean time";
    			mes "Good luck, Honorable Knight.";
    			close;
    		}
    	} else if (BaseJob == Job_Knight) {
    		mes "Welcome back to the Prontera Chivalry, will give our lives for king and country! Please enjoy your stay.";
    		close;
    	} else {
    		mes "Welcome. We, the proud Knights of the Prontera Chivalry, will give our lives for king and country! Please enjoy your stay.";
    		close;
    	}
    }
    

    Untested

×
×
  • Create New...