Jump to content

Sephus

Core Developers
  • Content Count

    229
  • Joined

  • Last visited

  • Days Won

    47

Reputation Activity

  1. Upvote
    Sephus reacted to Winterfox in Passing npc array variable to function?   
    - script testnpc 123,{ OnWhisperGlobal: setarray .test[0],1,12,123; callfunc "abc"; end;}function script abc { copyarray .@test, getvariableofnpc(.test,"testnpc"), getarraysize( getvariableofnpc(.test,"testnpc") ); return;}
  2. Upvote
    Sephus reacted to GmOcean in Passing npc array variable to function?   
    She meant to place .test as arg(0), which would make it pass the info from .test. But if I'm not mistaken, only .test[0].
    If you REALLY need to copy an array over to a function for w/e reason, turn it into a temp global array $@test.
     
    You can also use setd/getd to dynamically create these names so they are unique each time you make them, so they don't overlap with one another and cause errors.
  3. Upvote
    Sephus reacted to Ind in Hercules Ultimate Localization Design   
    Hercules Ultimate Localization Design
    Hello~! - What?!
    Servers are now able to run under any number of languages, without having any of the default files modified Designed by Haruna and Ind  
    Translating NPCs without editing them
    By launching map server with the --generate-translations param a .pot (.po template) file will be created with all of the servers translate-able strings (including all npc dialogue), this file can be edited in text mode or by utilising any .po editor (there are many out there; for a high range of OSes) A .po file does not need to be fully translated to be used, map server will know when loading the file, and will fallback to the hardcoded string in the npc files as necessary Users are able to change their language with the new @lang command, @lang controls what language users see in @commands (msg_txt stuff) as well as over npc dialogues map-server.conf has a new setting called default_language where server owners may specify which language should be used as a base When you have a new .po file you want map server to use, add it to db/translations.conf Easy to Maintain
    Since .po is a widely used format there are many tools that can help with merging for example Poedit, which easily consolidates a translated .po file with a newly generated .pot. For example when you have a translated .po and since it was created npc dialogs were added or modified all you have to do is launch map server to generate a new .pot, open your old .po in Poedit, go "Catalog -> Update from POT file" and it will insert the new translatable strings without touching your existing translations, it will also notify you of any "obsolete" strings that are in your .po file but that are no longer in use Script Command Macro
    Besides messages.conf, all the dialogue utilised by 'mes' and 'select' is included in the .pot automatically, this patch also introduces a mechanism for utilising strings outside of these commands, the script macro _() which can be employed just as if it were a script function, for example set .@status$,_("Available"); tells map server to export "Available" as a translate-able string when it is run with --generate-translations (when running map server normally the macro has no overhead during runtime) Special Thanks to
    Raizen and Roberto from Cronus, we would not have worked on this if it weren't for them Links~!
    Commit Editing Example
  4. Upvote
    Sephus reacted to Angelmelody in How to check if target is a boss?   
    this?
    if((struct mob_data *)bl->db->mexp >0)
  5. Upvote
    Sephus reacted to jaBote in How to check if target is a boss?   
    A nifty way of doing that in scripting is checking if the mob has MvP experience to deliver when killed.
     
    I'm not that good on source but you could find a way to test if that assumption still works for SRC. It should, too.
  6. Upvote
    Sephus reacted to Ind in How to check if target is a boss?   
    if your mob is guaranteed to have spawned from a 'boss' flag e.g.
    gef_dun02,0,0,0,0 boss_monster Doppelganger 1046,1,7200000,600000,1you can check withif( md->spawn && md->spawn->state.boss )(note that you can't check directly to md->spawn->state.boss because some mobs do not have md->spawn, so checking both is a must (otherwise it'll crash)
  7. Upvote
    Sephus reacted to AnnieRuru in How to check if target is a boss?   
    ACMD(chkmvp) { if( !message || !*message ) { clif->message( fd, "empty" ); return false; } else if ( mob->db( atoi(message) )->mexp ) { clif->message( fd, "This is a MVP" ); return true; } else { clif->message( fd, "No mobs or not MVP" ); return true; }} ACMD_DEF(chkmvp),
  8. Upvote
    Sephus reacted to Haru in how to fix this 'Zeny'   
    The reported filename may be incorrect. I just committed a patch that should lead to less misleading error reports (and now shows Unknown when it doesn't have a clue, rather than simply showing the last parsed script). 
    If it appears upon player login, it might not be related to any script at all. Doublecheck your SQL database (char_reg_num_db) to see if you have leftovers of a variable named 'zeny', and remove them.
    This might now have anything to do with case sensitivity at all, but rather item name constants. If you have an item whose AegisName is 'Zeny' (guessing it's coming from a certain extended shop patch), change it to something else ('Zeny_' or 'Zeny_Token' are good options there). It's complaining because if you have an item with Zeny as AegisName, it'll never know if you want to use the item ID or the player parameter, in cases such as this:if (Zeny < 10000) { mes "You don't have enough money."; close;}
  9. Upvote
    Sephus reacted to jaBote in BG Queue: Debug   
    Hi Smoke.
     
    You can see its status here: https://github.com/HerculesWS/Hercules/issues/69
     
    However, be wary this isn't being the main focus of the development ATM, so it's possible they'll take a while to be fully finished.
  10. Upvote
    Sephus reacted to Tepoo in some official iro scripts   
    also iro ist one of the servers who are more far away from kro then the sun to the earth ^^
  11. Upvote
    Sephus reacted to Yommy in 2013-12-23c kRO Client, Merry Christmas <3   
    Here is my christmas gift to Hercules. I wish you all have an awesome holiday and nice time with family.
    I have included an xdiff file, but I recommend (when he manage to fix the multiple grf) you to use NEMO Client Patcher made by Neo.

    You need to add the PacketShuffle stuff into src/map/packets.h, just follow the files pattern,
    then edit src/common/mmo.h and change the PACKETVER to 20131223
    do a recompile and the client will be able to connect.


    2013-12-23cRagexe_v2.zip 2.5 MB
    https://mega.co.nz/#!Yt1DQSQC!TWk1AQU8sTXpP_t57Uowpne2-ZYSPhTB2_4WT55PFcY


    2013-12-23cRagexe_v2.xdiff 102 KB
    https://mega.co.nz/#!ogUUFLQJ!CPbCaX29tJLe_JOoeQd1oR24ug8WL83B0z_2T1XTXfQ


    This is a very new client, and it will probably require resources from the latest kRO updates.
    so kRO will need to be fully updated, i recommend to use RO Patcher Lite made by Ai4rei.


    Special Thanks to Rytech and Ind


    See you in 2014.
    Yommy
     
    Ps
    Neo posted.an update here
    http://herc.ws/board/topic/3609-2013-12-23c-kro-client-merry-christmas-3/?p=24183
     
    Thank you
     
    Ps:
    Neo posted some update here 
×
×
  • Create New...

Important Information

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