Jump to content

KeyWorld

Members
  • Posts

    379
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by KeyWorld

  1. It missing {} each time so it go directly on the goto. Should be: if ($EmpBrk_PrzDG == 1) { set $EmpBrk_PrzDG, 0; goto L_TPD; } if ($EmpBrk_PrzDG == 0) { set $EmpBrk_PrzDG, 1; goto L_TPD; } Or: if ($EmpBrk_PrzDG == 1) set $EmpBrk_PrzDG, 0; else set $EmpBrk_PrzDG, 1; goto L_TPD; Or even: set $EmpBrk_PrzDG, !$EmpBrk_PrzDG; goto L_TPD;
  2. Seems like you have a debug in your php file (echo) that print 308892. Once you remove this line, add a header('Content-type:image/gif'); before the imagegif() (or before the whole code).
  3. It will work but you can even simplify it: prontera,155,181,5 script Sample 757,{ warp "pvp_y_1-2", 0, 0; end; OnPCKillEvent: if( strcharinfo(3) == "pvp_y_1-2" ) announce "[" + strcharinfo(0) + "] has killed [" + rid2name(killedrid) + "] in " + strcharinfo(3), 0; }
  4. Yeah you have to calculate bounding boxes to display rsm correctly on the map.
  5. It's hard to find the error since the script isn't really user friendly and clean (some bad loops and things). I find one error here: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ; Should be: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ; Edit: And another one (but don't cause you problem right now): setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1; To: setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1; Edit: And again: setarray .@card[1], getequipcardid ( .slot, 0 ), getequipcardid ( .slot, 1 ), getequipcardid ( .slot, 2 ), getequipcardid ( .slot, 3 ); set .@refine, getequiprefinerycnt ( .slot ); .slot should be replace with .@slots[.@i] each time.
  6. You have to check if $_GET['module'] is defined BEFORE checking its value. <?php if( empty($_GET['module']) || $_GET['module'] == 'main' ): ?>
  7. No, don't use freeloop here, it will freeze the emulator... Just take a look here, the two loops use the same .@a variable. setarray .@slots[0], 1, 9, 10; // put here your slots. for ( set .@a, 0; .@a < 3 ; set .@a, .@a + 1 ) { set .@e, getequipid ( .@slots[.@a] ); for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) { ... code ... } } I think should be modified with: setarray .@slots[0], 1, 9, 10; // put here your slots. set .@slot_size, getarraysize(.@slots); for ( set .@i, 0; .@i < .@slot_size ; set .@i, .@i + 1 ) { set .@e, getequipid ( .@slots[.@i] ); for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) { ... code ... } }
  8. Well, I will release my php charsim soon, but I can help for now. There is a lot of codes that aren't used in your code so it's hard to know what you do exactly. But for sure, the $j in the for() should be init as 0 (not 4). Well if you need help it will be better to post the whole script, here or in pm
  9. I am here just to say that this project is not dead. I had some others priority last months and currently on vacation in Hawaii. The project will continue in middle of september with some others members (if we find a good way to manage the project). @curiosity Nice job, yeah sharing the same material is a great boost performance, merging mesh too, using a texture atlas too. I currently try to use GRFs directly on the browser using the drag and drop API, but my zlib unpacker is a little too slow. Well I think we can talk in pm if you want (but not for now, not inside a computer enought).
  10. You will have to make your own.
  11. Can you specify ? Do you want a panel to generate an avatar/signature like the one you link, or just the script to display players from your server ?
  12. Really nice and modern, good job Xantara There are just some details I'm not fan but it's just details and not really important, really nice Design is the less important part of a Panel/Framework
  13. BUILDIN_FUNC(pcisdead) { TBL_PC* sd; if ( script_hasdata(st,2) ) // specify char_id sd = map_charid2sd( script_getnum(st,2) ); else // Current user sd = script_rid2sd(st) if ( sd == NULL ) // not found user script_pushint(st, 0 ); else script_pushint(st, pc_isdead(sd) ? 1 : 0 ); return 0; } BUILDIN_DEF(pcisdead,"?"),
  14. Hmm ? °° From conf/battle/drops.conf // Make broadcast ** Player1 won Pupa's Pupa Card (chance 0.01%) *** // Note: It also announces STEAL skill usage with rare items // 0 = don't show announces at all // 1 = show announces for 0.01% drop chance items // 333 = show announces for 3.33% or lower drop chance items // 10000 = show announces for all items rare_drop_announce: 0 So just set to 100, I don't see the point to change it in the conf and in src (or I misunderstood).
  15. Hmm. The weird error is here: set @selectmenu$,getarraysize(.@selectcity$[0]); What are you trying to do ? You can do the same script in two lines: setarray @cities$,"Morocc","Alberta","Izlude","Lutie","Comodo","Yuno","Amatsu","Gonryun","Umbala","Niflheim","Louyang","Jawaii","Ayothaya","Einbroch","Lighthalzen","Einbech","Hugel","Rachel","Veins","Moscovia"; select( implode( @cities$, ":" ) ); I keep the use of the @var since I don't know what you want to do with, but in this concept it's better to use .@var
  16. My fault, I copy deathscythe13's base script without reading : function script party_has_duplicate_job { set .@party_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( !.@party_id ) { return -1; } // Loading party members variables getpartymember .@party_id, 1; getpartymember .@party_id, 2; // Keep rid attached. set .@rid, playerattached(); // Check all members for ( set .@i,0; .@i<$@partymembercount; set .@i, .@i+1 ) { // Online user if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i]) ) { // Attach the member to access "Class" attachrid( $@partymemberaid[.@i] ); if ( compare( .@tmp_class$ + "|", "|" + Class + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + Class; } // Offline user (use sql) else { set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) + "`char_id`='" + $@partymembercid[.@i] + "' "; set .@sql_i, .@sql_i + 1; } } // SQL for offline users if ( getstrlen(.@sql$) ) { // get class from offline members set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class ); // Check the class. for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 ) { if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + .@class[.@i]; } } // Restore RID. if ( .@rid ) attachrid(.@rid); else detachrid; return 0; }
  17. @Khaii This should fixed the problem : function script party_has_duplicate_job { set .@party_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( .@party_id != 1 ) { return -1; } // Loading party members variables getpartymember .@party_id,1; getpartymember .@party_id,2; // Keep rid attached. set .@rid, playerattached(); // Check all members for ( set .@i,0; .@i<$@partymembercount; set .@i, .@i+1 ) { // Online user if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i]) ) { // Attach the member to access "Class" attachrid( $@partymemberaid[.@i] ); if ( compare( .@tmp_class$ + "|", "|" + Class + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + Class; } // Offline user (use sql) else { set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) + "`char_id`='" + $@partymembercid[.@i] + "' "; set .@sql_i, .@sql_i + 1; } } // SQL for offline users if ( getstrlen(.@sql$) ) { // get class from offline members set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class ); // Check the class. for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 ) { if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + .@class[.@i]; } } // Restore RID. if ( .@rid ) attachrid(.@rid); else detachrid; return 0; } @Emnaj if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } if ( $@partymembercount != 7 ) { mes "You have to be 7 on the team."; close; } mes "OK, no problem with your party, let's go !";
  18. Maybe due to the header "{" in the next line, try replace this: function script party_has_duplicate_job { With: function script party_has_duplicate_job {
  19. Just 7 members or 1 to 7 members ?
  20. The script above can't work : - If the party is : mage, archer, swordman, mage, it will not find the 2 mages. - Can have problem with offline member (Class will throw an error ?) - What about a user disconnect before the test and reconnect after ? So here a function (not tested), I just write on the fly, should do the work. function script party_has_duplicate_job { set .@party_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( .@party_id != 1 ) { return -1; } // Loading party members variables getpartymember getcharid(1),1; getpartymember getcharid(1),2; // Keep rid attached. set .@rid, playerattached(); // Check all members for ( set .@i,0; .@i<$@partymembercount; set .@i, .@i+1 ) { // Online user if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i]) ) { // Attach the member to access "Class" attachrid( $@partymemberaid[.@i] ); if ( compare( .@tmp_class$ + "|", "|" + Class + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + Class; } // Offline user (use sql) else { set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) "`char_id`='" + $@partymembercid[.@i] + "' "; set .@sql_i, .@sql_i + 1; } } // SQL for offline users if ( getstrlen(.@sql$) ) { // get class from offline members set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class ); // Check the class. for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 ) { if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) ) { if ( .@rid ) attachrid(.@rid); else detachrid; return 1; } set .@tmp_class$, .@tmp_class$ + "|" + .@class[.@i]; } } // Restore RID. if ( .@rid ) attachrid(.@rid); else detachrid; return 0; } Example of used: if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } mes "OK, no problem with your party, let's go !"; ...
  21. Not possible to increase this value, you will have error with the client.
  22. Nice one I already worked on a design with the same system (loading the whole site, manage pages with a javascript animation) but I abandoned this way : Loading all images from each pages it's a bit long for the network, and the SEO isn't really structured. Well I sent you a pm for two things about your website. Keep it up
  23. Yeah the script engine doesn't support coma operator So you can use DevilEvil's code, or imbricate set() but will look messy... or don't use for() (can use do/while() while(), goto, recursive function). By the way you should know that .@value don't need to be set to 0 when starting a script (because they are already set to 0), so in a lot of case the first statement of for() can be remove.
  24. Certainly due to the act file that contain a color info that multiply the sprite image with.
×
×
  • Create New...