Jump to content

Garr

Members
  • Content Count

    482
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by Garr


  1. Here:

    prontera,150,150,5    script    Usagi    89,{set .@n$, "[Miss Usagi]";checkstatus:query_sql("SELECT char_id,account_id,name,class,base_level,job_level FROM `char` ",@charid,@accntid$,@name$,@class$,@blevel$,@jlevel$);mes .@n$;mes "This are the Players that is already reached the max level. Please choose the player that you want to check the information.";mes "===================================";    for (.@i = 0; .@i < getarraysize(@blevel$); .@i++ ) {        if ("99" == @blevel$[.@i]) {            mes ""+@charid[.@i]+" || "+@name$[.@i]+"";        }    }next;input ( .@level );for (.@i = 0; .@i < getarraysize(@charid); .@i++ )    if( .@level == @charid[.@i])        break;if ( .@i >= getarraysize(@charid) ) {    mes .@n$;    mes "The Character ID that you enter is not available. Please enter the correct Character ID.";    next;    switch(select("Re-enter Character ID")) { goto checkstatus;    }}mes .@n$;mes "Account ID: "+@accntid$[.@i]+"";mes "Character ID: "+@charid[.@i]+"";mes "Name : "+@name$[.@i]+"";mes "Class Type: "+@class$[.@i]+"";mes "Base Level: "+@blevel$[.@i]+"";mes "Job Level: "+@jlevel$[.@i]+"";close;}

    You needed to go over whole array first, what you were doing is pretty much comparing first value, and if it didn't pass you'd send him to the basic menu. And I have some extra questions:

    a) You know, redoing the query every time a wrong ID is entered is a nice way to refresh the list, but I'd keep it to another talk with NPC and leave the list as it was.

    B) Why in the world would you get ALL players in the array and compare them to blevel 99 inside script engine when SQL query will do that way faster?

    c) gotos are bad. period.

    d) It'd be more safe to use the number that query returns instead of checking on array size all the time. Not that it's a problem when query is not running every wrong ID you enter, but it's still better to be safe :D The problem here when the query is refreshing is that it might return less players than before (let's say, GM changed level from 99 to 96 between queries), and that will leave garbage from previous query which getarraysize will count, but number that query_sql returns wouldn't.

    Well, although the above version would work, I'd take the one that I fixed the above remarks in :D

    prontera,150,150,5	script	Usagi	89,{set .@n$, "[Miss Usagi]";.@count = query_sql("SELECT `char_id`,`account_id`,`name`,`class`,`base_level`,`job_level` FROM `char` WHERE `base_level` = 99",@charid,@accntid$,@name$,@class$,@blevel$,@jlevel$);	while(1) {		mes .@n$;		mes "These are the Players who already reached the max level. Please input charID of the player that you want to check on.";		mes "===================================";		for (.@i = 0; .@i < .@count; .@i++ )			mes @charid[.@i]+" || "+@name$[.@i];		next;		input ( .@cid );		for (.@i = 0; .@i < .@count; .@i++ ) 			if( .@cid == @charid[.@i])				break;		if ( .@i >= .@count ) {			mes .@n$;			mes "The Character ID that you entered is not available. Please enter the correct Character ID.";			next;			select("Re-enter Character ID");			continue; // gotos are a nono		}		mes .@n$;		mes "Account ID: "+@accntid$[.@i];		mes "Character ID: "+@charid[.@i];		mes "Name : "+@name$[.@i];		mes "Class Type: "+jobname(@class$[.@i]);		mes "Base Level: "+@blevel$[.@i];		mes "Job Level: "+@jlevel$[.@i];		close;	}}

  2. *query_sql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});*query_logsql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});Executes an SQL query. A 'select' query can fill array variables with up to 128 rows of values, and will return the number of rows (the array size).Note that 'query_sql' runs on the main database while 'query_logsql' runs on the log database.

    This?


  3. Oh, sorry.

     

    Hmm. Since you tried with quadtree generating, I sometimes saw an advice to raise the ground above 0 height level. Set your water level to 0 and check if any parts of your map are under the water. If so, you'd need to raise it so it doesn't fall under the 0 height mark. (You mentioned raising parts, and changing height of objects, but the point here is everything being above 0 height)


  4. Depends on ow badly you want to nerf the damage, that's why you're on your own there. Currently formula is DMG = 40*STR + SKILL_LV * (HP/10 + 35).

    Best results would come from reducing multipliers, like make it 10*STR + SKILL_LV/5 * (HP/100 + 35). That way you'll reduce damage quite some bit. But as I said, which parts exactly you want nerfed is up to you >.>


  5. And I thought you ran out of ideas? I'd think trying something new wouldn't hurt. Besides, I don't think script engine itself is involved in this in any way, it's more of a how file is being read.

     

    @@Dogpatch

    There are 3 different ways to announce a line break inside a file, one is unix-style (n):

    5vwxp4.jpg

    Other is mac-style ®:

    2wokcbn.jpg

    And the last one is what windows uses by default (rn):

    5ebct3.jpg

    Took all 3 pictures in notepad++ showing hidden signs for end of line.

     

    Also, I meant if you take an already working/loading script file, make a copy of it (not through new file -> paste contents, but actual file copy), clear its contents and write some script inside and load that one, will it show up? (And I mean WRITE script anew, not paste from somewhere). Because if it will then it's probably something on how you save your files (eols, eofs, coding, whatever else there might be), otherwise the problem is somewhere else.

    Did you try to get a working script file from someone else? File itself, not its copy via pastebin and alike. Or transferred your file to someone else for testing?


  6. Do they load if you delete contents of already created script, write something of your own and save that somewhere as copy?

     

    Also, I think I had it with one script once. The problem was in new line I was using, iirc it was changed to unix only (n), and when I fixed it to win (rn) it started working fine. Or was it other way around? I forgot. But anyway, the thing is without properly reading new lines it thought that all the script is in one line and was acting weird as hell thanks to it >.>


  7. Uhh. Basically you're putting things in array, and then compare them to themselves. I'd say you're always getting that stop, right?

     

    So can you elaborate what exactly do you want? Any amount of orbs, but so they won't repeat within item? Also, mind me asking why you're checking only last 3 slots, and not all 4? How many slots are available? What's the variable you use to store which orb players wants to slot in?

     

    I think the following script should work, if you'll fill in the needed parts.

    input .@orbID; //orb that player wants to slot// .@part, I guess, contains which equip we're enchantingsetarray .@cardid[0],getequipcardid(.@part,0),getequipcardid(.@part,1),getequipcardid(.@part,2),getequipcardid(.@part,3);.@string = "," + implode(.@cardid,",") + ",";if( compare(.@string,","+.@orbID+",") ) {	mes .npc$;	mes "Sorry, I cannot enchant the same orb on the same item.";	close;}

  8. src/map/pc.c, pc_useitem.

    	// Statuses that don't let the player use items	if (sd->sc.count && (		sd->sc.data[SC_BERSERK] ||		(sd->sc.data[SC_GRAVITATION] && sd->sc.data[SC_GRAVITATION]->val3 == BCT_SELF) ||		sd->sc.data[SC_TRICKDEAD] ||		sd->sc.data[SC_HIDING] ||		sd->sc.data[SC__SHADOWFORM] ||		sd->sc.data[SC__INVISIBILITY] ||		sd->sc.data[SC__MANHOLE] ||		sd->sc.data[SC_KG_KAGEHUMI] ||		sd->sc.data[SC_WHITEIMPRISON] ||		sd->sc.data[SC_DEEP_SLEEP] ||		sd->sc.data[SC_SATURDAY_NIGHT_FEVER] ||		sd->sc.data[SC_COLD] ||		(sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)	    ))		return 0;

  9. Well, you can comment everything inside the case, just don't comment the "case x:" as well, that way they'll be getting increased chance at other statuses instead of the ones you commented out.

     

    If for every level of Mind Breaker you want 10%, then replace the lines I brought up before with:

    		if (sc->data[SC_MINDBREAKER])			matk *= 1.1;

  10. Mind Breaker at 10% per level, you mean? Or total?

    Per level, src/map/status.c:

    		if (sc->data[SC_MINDBREAKER])			matk += matk * sc->data[SC_MINDBREAKER]->val2/100;

    change to

    		if (sc->data[SC_MINDBREAKER])			matk += matk * sc->data[SC_MINDBREAKER]->val2/200;

     

    For gospel src/map/skill.c:

    				int i = rnd()%13; // Positive buff count				int time = skill->get_time2(sg->skill_id, sg->skill_lv); //Duration				switch (i) {					case 0: // Heal 1~9999 HP						heal = rnd() %9999+1;						clif->skill_nodamage(ss,bl,AL_HEAL,heal,1);						status->heal(bl,heal,0,0);						break;					case 1: // End all negative status						status->change_clear_buffs(bl,2);						if (tsd) clif->gospel_info(tsd, 0x15);						break;					case 2: // Immunity to all status						sc_start(ss,bl,SC_SCRESIST,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x16);						break;					case 3: // MaxHP +100%						sc_start(ss,bl,SC_INCMHPRATE,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x17);						break;					case 4: // MaxSP +100%						sc_start(ss,bl,SC_INCMSPRATE,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x18);						break;					case 5: // All stats +20						sc_start(ss,bl,SC_INCALLSTATUS,100,20,time);						if (tsd) clif->gospel_info(tsd, 0x19);						break;					case 6: // Level 10 Blessing						sc_start(ss,bl,SC_BLESSING,100,10,time);						break;					case 7: // Level 10 Increase AGI						sc_start(ss,bl,SC_INC_AGI,100,10,time);						break;					case 8: // Enchant weapon with Holy element						sc_start(ss,bl,SC_ASPERSIO,100,1,time);						if (tsd) clif->gospel_info(tsd, 0x1c);						break;					case 9: // Enchant armor with Holy element						sc_start(ss,bl,SC_BENEDICTIO,100,1,time);						if (tsd) clif->gospel_info(tsd, 0x1d);						break;					case 10: // DEF +25%						sc_start(ss,bl,SC_INCDEFRATE,100,25,time);						if (tsd) clif->gospel_info(tsd, 0x1e);						break;					case 11: // ATK +100%						sc_start(ss,bl,SC_INCATKRATE,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x1f);						break;					case 12: // HIT/Flee +50						sc_start(ss,bl,SC_INCHIT,100,50,time);						sc_start(ss,bl,SC_INCFLEE,100,50,time);						if (tsd) clif->gospel_info(tsd, 0x20);						break;				}			}

    to

    				int i = rnd()%12; // Positive buff count				int time = skill->get_time2(sg->skill_id, sg->skill_lv); //Duration				switch (i) {					case 0: // Heal 1~9999 HP						heal = rnd() %9999+1;						clif->skill_nodamage(ss,bl,AL_HEAL,heal,1);						status->heal(bl,heal,0,0);						break;					case 1: // End all negative status						status->change_clear_buffs(bl,2);						if (tsd) clif->gospel_info(tsd, 0x15);						break;					case 2: // Immunity to all status						sc_start(ss,bl,SC_SCRESIST,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x16);						break;					case 3: // MaxHP +100%						sc_start(ss,bl,SC_INCMHPRATE,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x17);						break;					case 4: // MaxSP +100%						sc_start(ss,bl,SC_INCMSPRATE,100,100,time);						if (tsd) clif->gospel_info(tsd, 0x18);						break;					case 5: // All stats +20						sc_start(ss,bl,SC_INCALLSTATUS,100,20,time);						if (tsd) clif->gospel_info(tsd, 0x19);						break;					case 6: // Level 10 Blessing						sc_start(ss,bl,SC_BLESSING,100,10,time);						break;					case 7: // Level 10 Increase AGI						sc_start(ss,bl,SC_INC_AGI,100,10,time);						break;					case 8: // Enchant weapon with Holy element						sc_start(ss,bl,SC_ASPERSIO,100,1,time);						if (tsd) clif->gospel_info(tsd, 0x1c);						break;					case 9: // Enchant armor with Holy element						sc_start(ss,bl,SC_BENEDICTIO,100,1,time);						if (tsd) clif->gospel_info(tsd, 0x1d);						break;					case 10: // DEF +25%						sc_start(ss,bl,SC_INCDEFRATE,100,25,time);						if (tsd) clif->gospel_info(tsd, 0x1e);						break;					case 11: // HIT/Flee +50						sc_start(ss,bl,SC_INCHIT,100,50,time);						sc_start(ss,bl,SC_INCFLEE,100,50,time);						if (tsd) clif->gospel_info(tsd, 0x20);						break;				}			}

  11. conf/groups.conf

    <permissions>A group of settings	<permission> : <bool>If a permission is not included, false is assumed.For a full list of available permissions, see: doc/permissions.txt

    doc/permissions.txt

    can_trade : Ability to trade or otherwise distribute items (drop, storage, vending etc...).

    Did you properly configure your group?


  12. You forgot to use instance_attachmap, so 2@ds is not copied as an instance map, and that's where the error comes from.

    *instance_attachmap("<map name>",<instance id>{,<use base name>{,"<new map name>"}});Attaches the map "<map name>" to the instance specified with <instance id>. The optional parameter specifies, whether a map requires emulation for instancing (1) or not (0 = default). if use base name is specified,and "<new map name>" too the server will instance the map under the "<new map name>",name.Returns the resulting map name on success or an empty string on failure.

  13. The error says it all, try to create /data/tmp folder, and give it permission. I'd advice you to change owner to www-data ( sudo chown -R www-data:www-data /var/www/html/fluxCP ), and give permissions 755 to folders and 644 to files.

×
×
  • Create New...

Important Information

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