Garr
Members-
Content Count
482 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Garr
-
Just a question, why did you have to modify it to get charIDs when most commands work with accIDs, including *attachrid and *rid2name? You can just go through the accID array, attaching the players to script, and do checkvending() without any extra options on it. Speaking of which that's why you're getting an error. For rid2name you need to provide accID, not charID.
-
I just want to ask... why? Why did you have to use an endless timer? OnPCLoginEvent:OnPCLogoutEvent:OnPCBaseLvUpEvent:OnPCJobLvUpEvent:It's pretty obvious when these four special labels will be invoked. - script LevelUpGifts -1,{end;OnPCLoginEvent: // To give prizes to people who already obtained the levels before script was implemented and are already 99. .@flag = 1;OnPCBaseLvUpEvent: if( BaseLevel >= 60 && !(LevelUpPrize&1) ) { // Insert giving items to level 60 here; LevelUpPrize |= 1; if( BaseLevel == 60 ) announce strcharinfo(PC_NAME) + " reached level 60, congratulations!",bc_all|bc_npc|bc_blue; } if( BaseLevel >= 70 && !(LevelUpPrize&2) ) { // Insert giving items to level 70 here; LevelUpPrize |= 2; if( BaseLevel == 70 ) announce strcharinfo(PC_NAME) + " reached level 70, way to go!",bc_all|bc_npc|bc_blue; } if( BaseLevel >= 80 && !(LevelUpPrize&4) ) { // Insert giving items to level 80 here; LevelUpPrize |= 4; if( BaseLevel == 80 ) announce strcharinfo(PC_NAME) + " reached level 80, hafway to the top!",bc_all|bc_npc|bc_blue; } if( BaseLevel >= 90 && !(LevelUpPrize&8) ) { // Insert giving items to level 90 here; LevelUpPrize |= 8; if( BaseLevel == 90 ) announce strcharinfo(PC_NAME) + " reached level 90, you're almost there!",bc_all|bc_npc|bc_blue; } if( BaseLevel >= 99 && !(LevelUpPrize&16) ) { // Insert giving items to level 99 here; LevelUpPrize |= 16; if( BaseLevel == 99 && !.@flag ) // Just so players that already got 99'd wouldn't get an announce on login. // They reached it way long ago announce strcharinfo(PC_NAME) + " reached level 99, congratulations!",bc_all|bc_npc|bc_blue; }end;} Something like this and checks would run only on leveling up and logging in, instead of running this check on every player every 0.1second >.<
-
Well, technically storage doesn't have a limit, but iirc a big enough gear filled storage can crash the client every time you open it since the packet sent will get way too big for client to swallow, no?
-
Bet that's exactly the reason it wasn't hacked yet
-
available options cannot be selected. HELP please
Garr replied to almarket23's question in Script Support
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. 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 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 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; }} -
*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?
-
Yup. Why don't you just try compiling it on test server and see if it compiles? >.>
-
Missed division. skill_lv / 5, not skill_lv5.
-
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)
-
[Massive Release] Fishing Minigame
Garr replied to Avenar's topic in Quest, Shops, Functions & Algorithms Releases
Sounds like an awesome release. I'd take it just to dwell in the script Thank you! -
First of all, rev.620 of Browedit is not good for final saving the map. Use rev. 586 for that. What I do to get rid of those not loading parts is open the map in rev. 586 of BrowEdit, insert to full, generate -> quadtree, and then save the map. See if that helps.
-
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 >.>
-
Bump for what? You've been given what formula to change, so adjust it to your liking.
-
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): Other is mac-style ®: And the last one is what windows uses by default (rn): 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?
-
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 >.>
-
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;}
-
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;
-
Well, it's nothing to worry about, but if you like you can redo that into matk += matk * 0.1; That should get rid of warning.
-
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;
-
Hercules is case sensitive. Replace "Select" with "select".
-
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; } }
-
Mainly search all the code for SC_BERSERK, you'll find where it's used to prevent chatting, gears changing and so on. There are just too many places to mention them all here >.<
-
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?
-
Need help to correct this Devil Square script!!!
Garr replied to dungpt8782's question in Script Support
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. -
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.