Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. wait a moment ... why the *expandInventory has the I as capital letter ? I remember there was a script standardization topic, forgot where issit now, discussed years ago 1. all constants should be CAPITAL LETTERS -> QUEUEOPT_LOGOUT, IOT_PARTY, GETTIME_WEEKDAY ... 2. all functions start with F_, and Capitial Letters only on word -> F_MesInfo, F_MesColor, F_InsertComma, F_SaveQuestSkills 3. all script commands should be low cap 4. and the ... no idea when ... variables ... for example your *getInventorySize() has I and S capital, opposed to *getinventorylist() all low cap hercules script engine is case-sensitive, so we have to be extra be careful when apply the capital letters ... although there are already some controversial ... like the "All" vs "all" ... reported #784
  2. ok, read back the topic in rathena, I actually know what you are trying to make but your script totally ruined it, and I have no idea where to start fixing that ... it just a total mess so by the information what I gotten are ... 1. you just want to have guardians roaming in conquered castle 2. "guild_vs2" custom castle is actually not part of the code you want (I provide the template, and you failed to understand the template) is that correct ? its much easier if I have spoon feed from the beginning
  3. already mentioned in script_commands.txt *expandInventory(<value>) Adjust player inventory to given value. Maximum inventory size is MAX_INVENTORY. Minimum inventory size is FIXED_INVENTORY_SIZE. For supported clients it send inventory change packet. For old clients, this change is silent. Current max inventory size can be read by function getInventorySize(). https://github.com/HerculesWS/Hercules/blob/82d634ad431b2ffe7077a561f4eafd2486ede44b/doc/script_commands.txt#L10349 https://github.com/HerculesWS/Hercules/blob/82d634ad431b2ffe7077a561f4eafd2486ede44b/src/common/mmo.h#L170
  4. pet eggs are not simple as that, there is also a `pet` table you have to worry about you can't just *delitem ... have to list the pet owner, intimacy, ... etc fetch the pet information then use *delitem2 to delete the correct pet ID also your script is a total mess, I have totally no idea what you are doing // counting_sort_index <input array>, <output index>{, <total index>}; function script counting_sort_index { .@total = .@size = getarg( 2, getarraysize( getarg(0) ) ); copyarray .@arr, getarg(0), .@size; for ( .@i = 0; .@i < .@size; ++.@i ) setd ".@index_"+ .@arr[.@i] +"["+( .@tmp[.@arr[.@i]]++ )+"]", .@i; for ( ; .@size; --.@size ) { .@index = getarraysize(.@tmp) -1; .@out[.@size-1] = getd( ".@index_"+ .@index +"["+( --.@tmp[.@index] )+"]" ); } copyarray getarg(1), .@out, .@total; return; } prontera,155,185,5 script F_PetTrader 1_F_MARIA,{ disable_items; if ( getpetinfo(1) ) { mes "please return your pet into egg state to continue"; close; } getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( @inventorylist_card1[.@i] == -256 ) { .@egg_id[.@c] = @inventorylist_id[.@i]; .@pet_id[.@c] = @inventorylist_card2[.@i] + @inventorylist_card3[.@i] * ( 1 << 16 ); ++.@c; } } if ( !.@c ) { mes "your inventory doesn't have any pet egg"; close; } counting_sort_index .@petid, .@s, .@c; // never thought a time need a sorting algorithm for ( .@i = 0; .@i < .@c; ++.@i ) { .@petid[.@i] = .@pet_id[.@s[.@i]]; .@eggid[.@i] = .@egg_id[.@s[.@i]]; } .@pet_field$ = .@petid[0]; for ( .@i = 1; .@i < .@c; ++.@i ) .@pet_field$ += ","+ .@petid[.@i]; .@nb = query_sql( "select intimate, class, equip, name from pet where pet_id in ("+ .@pet_field$ +") order by pet_id", .@intimate, .@class, .@equipped, .@name$ ); if ( .@nb != .@c ) { mes "Error ... "; close; } mesf "There are %d pet egg inside your inventory", .@c; for ( .@i = 0; .@i < .@nb; ++.@i ) { mesf "\rPet ID : %d", .@petid[.@i]; mesf "Pet Name : %s", .@name$[.@i]; mesf "Pet Class : %d", .@class[.@i]; mesf "Egg ID : %d", .@eggid[.@i]; mesf "Intimacy : %d", .@intimate[.@i]; } next; for ( .@i = 0; .@i < .@nb; ++.@i ) .@menu$ += sprintf( ("[%d] %s:"), .@petid[.@i], replacestr( .@name$[.@i], ":", ";" ) ); .@s = select(.@menu$) -1; mesf "Selected #%d %s", .@petid[.@s], .@name$; // then decide what you want to do here mes "delete it ?"; next; if ( select( "Yes", "No" ) == 2 ) close; delitem2 .@eggid[.@s], 1,1,0,0, -256, .@petid[.@s] % ( 1 << 16 ), .@petid[.@s] / ( 1 << 16 ), 0; close; }
  5. bonus bUnbreakableGarment,`n`; | Garment cannot be damaged/broken by any means bonus bUnbreakableWeapon,`n`; | Weapon cannot be damaged/broken by any means bonus bUnbreakableArmor,`n`; | Armor cannot be damaged/broken by any means bonus bUnbreakableHelm,`n`; | Helm cannot be damaged/broken by any means bonus bUnbreakableShield,`n`; | Shield cannot be damaged/broken by any means bonus bUnbreakableShoes,`n`; | Shoes cannot be damaged/broken by any means there are already having item bonus to do this, so maybe a 3rd solution is simply extend the armor protection to protect garment and extend helm protection to protect shoes
  6. that means _$() or _() is equally detect by HULD, the only difference is it generate a comment in the pot file means nothing big differences ... I actually thought _() unable to parse %s or something ... seems I was wrong @Myriad, soon we will roll out a new version of HULD, it already discuss on the staff level old design -> http://herc.ws/board/topic/8687-hercules-ultimate-localization-design/ once the new design roll out, I will force recommend the community to adapt this new scripting style and for your question, because sprintf("Test %s", .@var); isn't detect by HULD and its sprintf(_("Text %s"), .@var); , only enclose the string by the way, on a side note, I seriously think we should change all the ^000000 into F_MesColor(C_BLACK) some machine translation can break ^000000 into ^ 000000 <-- can be solve by F_MesColor %s into % s <-- nothing can be done with this, other than manually fix it
  7. 1 sentence -> I cannot understand your post btw if you are talking about having a long list of array, isn't that already in your 1st post yeah, can't understand you, despite we live in the same country catch me in discord https://discordapp.com/invite/ZUzbRSp
  8. prontera,155,185,5 script kjsdhfksjf 1_F_MARIA,{ disable_items; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { .@item_type = getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ); if ( ( .@item_type == IT_WEAPON || .@item_type == IT_ARMOR ) && !@inventorylist_equip[.@i] && !.costumeid[ @inventorylist_id[.@i] ] ) .@id[.@c++] = @inventorylist_id[.@i]; } mes "Equipments found that are not costumes"; if ( !.@c ) { mes "<none>"; close; } mesf "Total -> %d", .@c; for ( .@i = 0; .@i < .@c; ++.@i ) mes getitemname( .@id[.@i] ); close; OnInit: // SQL query to fetch all the costumes .@nb = query_sql( "select id from item_db where equip_locations & "+( EQP_COSTUME_HEAD_TOP|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_LOW|EQP_COSTUME_GARMENT ), .@id ); // build the 'pointers' to compare later freeloop true; for ( .@i = 0; .@i < .@nb; ++.@i ) .costumeid[ .@id[.@i] ] = true; end; }
  9. What is the difference between _("<string>") and _$("<string>") meant for HULD I found a few clues in script.c else if( strcmp(buildin->name, "mes") == 0 ) script->buildin_mes_offset = script->buildin_count; else if( strcmp(buildin->name, "mesf") == 0 ) script->buildin_mesf_offset = script->buildin_count; else if( strcmp(buildin->name, "select") == 0 ) script->buildin_select_offset = script->buildin_count; else if( strcmp(buildin->name, "_") == 0 ) script->buildin_lang_macro_offset = script->buildin_count; else if( strcmp(buildin->name, "_$") == 0 ) script->buildin_lang_macro_fmtstring_offset = script->buildin_count; so its script->buildin_lang_macro_offset and script->buildin_lang_macro_fmtstring_offset next, in generate-translations.c if (!duplicate) { if (script->syntax.last_func == script->buildin_mes_offset || script->syntax.last_func == script->buildin_select_offset || script->syntax.lang_macro_active ) { is_translatable_string = true; } else if (script->syntax.last_func == script->buildin_mesf_offset || script->syntax.lang_macro_fmtstring_active ) { is_translatable_fmtstring = true; } } now this make sense, _("<string>") is somehow group together with mes and select _$("<string>") is somehow group together with mesf so this is my guess ... _("<string>") is for those without %d %s ... _$("<string>") is for those with %d %s ... like sprintf ... right ? so ... my next question is ... there are 3 types <none> c format no c format what are those actually means then ? if translate by hand, it probably doesn't mean anything ... line 187 in generate-translations.c is_translatable_fmtstring ? "#, c-format\n" : (has_percent_sign ? "#, no-c-format\n" : ""), @Haru @Dastgir
  10. cannot reproduce, 0,9,14,31 .... all status GREEN prontera,155,185,5 script kjsdhfksjf 1_F_MARIA,{ input .@a; setbattleflag "land_skill_limit", .@a; getmapxy .@map$, .@x, .@y, UNITTYPE_NPC; areamonster .@map$, .@x -10, .@y -10, .@x +10, .@y +10, "--ja--", NAGHT_SIEGER, 30, "", Size_Small, AI_ATTACK; areamonster .@map$, .@x -10, .@y -10, .@x +10, .@y +10, "--ja--", PORING_V, 30, "", Size_Small, AI_NONE; end; }
  11. hmm ... its not backward compatible, like Hercules compile with Windows 8.1 SDK, will throw error same thing with rathena but after re-target to 10.0.17763.0, everything seems green and no, I didn't get your Heal error after retarget to 17763 version I try pull request then, see if they actually accept your suggestion or not https://github.com/HerculesWS/Hercules/pull/2368
  12. similar topic -> and since you want method 3 prontera,155,185,5 script kjsdhfksjf 1_F_MARIA,{ disable_items; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( .costumeid[ @inventorylist_id[.@i] ] && !.@compare[ @inventorylist_id[.@i] ] ) { .@found[.@c++] = @inventorylist_id[.@i]; .@compare[ @inventorylist_id[.@i] ] = true; } } if ( !.@c ) { mes "no costume found on your character"; close; } mesf "%d custome found on your character", .@c; for ( .@i = 0; .@i < .@c; ++.@i ) mes getitemname( .@found[.@i] ); close; OnInit: // SQL query to fetch all the costumes .@nb = query_sql( "select id from item_db where equip_locations & "+( EQP_COSTUME_HEAD_TOP|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_LOW|EQP_COSTUME_GARMENT ), .@id ); // build the 'pointers' to compare later freeloop true; for ( .@i = 0; .@i < .@nb; ++.@i ) .costumeid[ .@id[.@i] ] = true; end; } EDIT: no longer repeat the costume value
  13. I need to test this, if this is true, this really save a lot of time ... by the way, isn't this will make the emulator bug ? because our code isn't intended to be coded this way
  14. thanks for the criticism, this post is better, +1 about visual studio 2017 guide in the image, yes I admit that part was the most frustrating one ... it just ... this part took me 3 days to install .. download 2.5 GB is a lot download visual studio, 1 day ... hercules need Windows 10 SDK 10.0.15063 ... download 1 day ... rathena need Windows 8.1 SDK ... download another 1 day... in my experience, this part makes me very frustrated https://rathena.org/board/topic/117966-how-to-find-nearest-enemyobtain-a-list-of-units-on-the-same-map-etc/?do=findComment&comment=356462 he's not patient about downloading another visual studio LOL ... he is currently sticking with visual studio 2013, and I kinda think it works btw he does update his emulator project to the latest eventually... and he having problems with creating patch https://rathena.org/board/topic/118036-how-to-reduce-monster-atk/?do=findComment&comment=356762 100% agree, rathena kinda crash a lot in recent commits PS : .... *click this*
  15. I'll just pick a few to reply 1. you did a good job helping people to instantly setup a server, I wont deny that part just like playing games online, for example, just download the package, plug and play what I did is post a proper guide for the community, same as many others before me, http://herc.ws/board/topic/152-obtaining-hercules/ http://herc.ws/board/topic/968-guide-how-to-setup-hercules/#comment-6870 http://herc.ws/board/topic/93-guidehow-to-setup-a-ragnarok-onlineserver-side-only/ your package can last forever, assuming members want to use an outdated emulator mine will not last, and will wash just like any other guides 2. I have A LOT OF MEMBERS asking me how to apply King of Emperium patch, and when I ask how they setup their server, 90% of them say use your guide your guide is plug and play, but it doesn't teach the process, yes, there are a lot of bumpy road if take the hard way, but you actually learn something every time solve a problem for example, following my guide, already learn how to update the server, apply patch, how to create grf, how to write SQL ... all in screenshots 3. and no, when comes to contributing, we have to use the latest/updated emulator ... same goes to rathena or hercules for example, your current version which last update on 07 July 2018 it still having bugs on *inarray script command, and many of my scripts using this script command will throw error on your current package yes, I told them to update to latest revision, and 3 people asked me how to do it, I just sigh .... well at least 3 people doesn't understand the 9th minute part of your video 4. I guess we just have a different opinion on the subject, I prefer to do the traditional method, and you like to help newbies some might prefer to follow my guide, but I think majority (especially newbies) will prefer yours make no mistakes, when I hear people say --> I just want to install RO just for childhood memory <-- I would still recommend your guide 5. I think its rude to come here and bash some other member's guide I hope you won't do the same if there is another similar guide post on rathena forum the rest are minor compare windows to linux ... of course linux better ... to be honest, I'm the only hercules staff member using windows, all other staff members use linux imgur ... no ... if I make this topic fully load with screenshots, it eats lots of bandwidth how did I learn to ride bicycle ? my father rent a bicycle and I ride on it while I was 7~8 years old, nobody push at the back, no book, no guide, straight on to the real thing, fell a few times ... typical chinese teaching method ... yes I'm chinese EDIT: yes, how the chinese children learn how to swim -> throw them into the water that's why western culture thinks chinese are child abuse
  16. 5. YES .... this system has implemented VERY long time ago that everyone now gotten used to it 2. just to be clear, what you mean is this ... "@summon 1956" 30 times and get 30 naght seiger "@monster 1914" and summon a crystal now the map-server should spam error ?? nope, can't reproduce, everything green and works fine I even change land_skill_limit: 31, in the battle_config, everything works fine and others, get a test server and test yourself btw, can you get a clean hercules and test on it before posting ? you make hercules sounds like a crappy emulator because it gives you lots of error
  17. apply patch failed, sorry can't help. You are on your own on this one
  18. - script dsfsfsasda FAKE_NPC,{ OnInit: bindatcmd "mobcount", strnpcinfo(NPC_NAME)+"::Onaaa"; end; Onaaa: if ( !.@atcmd_numparameters ) { dispbottom "input a mob ID"; end; } .@mobid = atoi( .@atcmd_parameters$ ); if ( getmonsterinfo( .@mobid, MOB_LV ) == -1 ) { dispbottom "invalid monster ID"; end; } .@size = getunits( BL_MOB, .@bl, false, strcharinfo(PC_MAP) ); for ( .@i = 0; .@i < .@size; ++.@i ) if ( getunitdata( .@bl[.@i], UDT_CLASS ) == .@mobid ) ++.@c; dispbottom sprintf(_("There are %1$dx %2$s in %3$s."), .@c, getmonsterinfo( .@mobid, MOB_NAME ), strcharinfo(PC_MAP) ); end; } why you start your topic by saying NOT using bindatcmd, but then 2nd post says want to use bindatcmd ? if using script way WITHOUT using bindatcmd, then its impossible
  19. 1. it works fine, tested on "@monster 1914" 2. needs more info 3. https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L1823 make the default value 0 or -1, depends on your script 4. change the monster mode and it will move prontera,155,185,5 script ksjdfhsd 1_F_MARIA,{ // .@mobid = monster("this", -1,-1, "--ja--", 1002, 1, ""); // .@mobid = monster("this", -1,-1, "--ja--", 1511, 1, ""); .@mobid = monster("this", -1,-1, "--ja--", 2042, 1, ""); setunitdata .@mobid, UDT_MASTERAID, getcharid(3); // setunitdata .@mobid, UDT_MASTERCID, getcharid(0); <-- doesn't work setunitdata .@mobid, UDT_MODE, getunitdata( .@mobid, UDT_MODE ) + 1; // setunitdata .@mobid, UDT_MODE, getunitdata( .@mobid, UDT_MODE ); end; } 5 yes 6. item_db2.conf { Id: 39999 AegisName: "Jellopy__" Name: "Jellopy__" Buy: 6 Weight: 10 BuyingStore: true Sprite: 909 }, https://github.com/HerculesWS/Hercules/blob/stable/doc/item_db.txt#L358-L360
  20. can't test your patch because you convert the [tab] into [space] try upload your patch somewhere else, like github, google drive or https://pastebin.com/ or just use <Code> tag ... seriously
  21. ima going to put this as Rejected btw you should tell what is your OS ... I'm using Windows 7 SP1, map-server.bat will always restart, to not make it restart, run from the MS-DOS
  22. every time there is a crash, I always see that window come out if the window doesn't come out, no idea .... I used this method to debug my test server ever since I used visual studio 2010 I think you should show us the patch what have you done on your server... and we hercules don't use patch, everything should be plugin in MySQL is Nydhogg\'s Memory perhaps different syntax
  23. rathena seems sort of ... changing everything from 32-bit into 64-bit rathena can crash my arathi basin script ... ->https://rathena.org/board/topic/104325-wow-arathi-basin/?do=findComment&comment=356135 fixed also crash my MVP ladder script ... -> https://github.com/rathena/rathena/issues/3881 these 2 bugs are just fixed recently yeah I just found 3rd bug ... as you can see from the crash dump, it has something to do with array hercules works just fine .... com;on I'm quick to report bugs on hercules, you know it
  24. any kind of source edit can be critical good timing, I just reproduce a crash with rathena test server, not going to tell how to reproduce, let's see how long they take to find this bug so, here's the screenshots you should get this window when there's a crash, select Debug the Program Open a new instance with Visual Studio then you can see the trace from Visual Studio, the Call Stack field matters a lot
×
×
  • Create New...

Important Information

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