Jump to content

Renn

Members
  • Content Count

    4
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    Renn reacted to Ind in Memory Slasher !!" - May 30 Patch   
    Hercules casts "Memory Slasher !!" - May 30 Patch
    Memory Slasher !!
    Regardless all the fancy features in it, this patch's greatest achievement is smart, clever employment of memory, by looking at our memory usage wisely we've been able to reduce map-server's memory (RAM) usage by more than 2/3, about 183MB of RAM were dropped, while maintaining Hercules outstanding record on performance improvement. Beyond the memory usage drop there is also a significant processing speed improvement which can be noticed during boot, map cache loading which used to account for most of the map-servers boot time no longer exists, its gone, dead, fini, boom! it was replaced by a smart map cache handler that loads its data only when a map is necessary (the data is then kept until shut down), this logic also makes map-server's shut down process a hell lot faster.
     
    Instance Rework
    As suggested by the community, this wasnt supposed to be bundled with this commit but the memory usage improvements required me to modify how instances were stored, so I re-wrote part of it to fit the suggestion as well.
    Instance Functionality/Feature Server may now create instances of any maps regardless of client-side edits, e.g. one can clone prontera and call it "mymapname" (as is best described in the *instance_attachmap script command note) Instances may now be available in 4 distinct ways (as is best described in *instance_create script command note), by nobody (server type instance, to be used with special map names), by a sole character, by a party, or by a guild Script Command Changes *instance_create 2nd param is now called owner_id instead of party_id, and it got a 3rd optional param that defines what kind of owner id it is (when not provided, assumes party_id, for backwards compatibility), available options are (IOT_ stands for INSTANCE OWNER TYPE) IOT_NONE (0), IOT_CHAR (1), IOT_PARTY (2) and IOT_GUILD (3). *instance_destroy no longer autodetects instance id from party id *instance_attachmap now supports a 4th, optional, param, "<new map name>", it will allow you to specify a entirely new map name for the instance (without the need of client-side edits). This option can be best employed when used on a instance of <owner_type> IOT_NONE *instance_detachmap no longer autodetects instance id from party id *instance_id no longer supports any param *instance_set_timeout no longer autodetects instance id from party id *instance_announce no longer autodetects instance id from party id, and to tell it to autodetect from the attached script you must set instance_id param as -1 as opposed to 0 *instance_npcname no longer autodetects instance id from party id *has_instance no longer autodetects instance from party, however it now checks if attached player possesses a instance with same map as has_instance(<param>) checks for *instance_warpall no longer autodetects instance from party Other ChangesInstance IDs (valid ones) are now always >= 0 as opposed to > 0 (update your scripts!) Battlegrounds Queue
    As suggested by the community, most of its features were added in this patch, we were unable to finish it though because we lacked some information, we've put our questions in this topic, once our questions are answered we should be able to finish it in a matter of minutes (all the heavy lifting was done in this patch).
    Arenas They're easily configurable in the new conf/battlegrounds.conf file, it possible to add more arenas by editing the client's lua files/entryqueue/entryqueuelist.lua file Configuration Sample arenas: ({    name: "Tierra Gorge" //must match the name in client files    event: "Tierra_BG2::OnPlayerListReady"    minLevel: 80    maxLevel: 150    reward: {/* amount of badges awarded on each case */        win: 3        loss: 1        draw: 1    }    minPlayers: 6 /* minimum amount of players to start */    maxPlayers: 60 /* maximum amount of players */    minTeamPlayers: 6 /* minimum amount of team members required for a team (party or guild) to join */    delay_var: "Tierra_BG_Tick" /* npc variable name that will store the delay for this match */    maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */},{    name: "KVM (Level 59 and below)" //must match the name in client files    event: "KvM03_BG::OnPlayerListReady"    minLevel: 1    maxLevel: 59    reward: {/* amount of badges awarded on each case */        win: 1        loss: 0        draw: 0    }    minPlayers: 4 /* minimum amount of players to start */    maxPlayers: 60 /* maximum amount of players */    minTeamPlayers: 5 /* minimum amount of team members required for a team (party or guild) to join */    delay_var: "KVM_BG_Tick" /* npc variable name that will store the delay for this match */    maxDuration: 30 /* maximum duration in minutes, if reached game ends and highest score wins (or calls a draw if scores are equal) */}) QueueWe wanted to make the queue as easy to play with as possible, so we've created a whole new set of script commands designed with this purpose. These commands make it easy to create and control queues for anything, games, events, quests, and of course in this case, the battleground's queue. Queue - Script Commands *queue()creates a new queue instance, returns created queue id set .@id,queue(); *queuesize(<queue_id>)returns the amount of entries in queue instance of <queue_id>. set .@length,queuesize(.@queue_id); *queueadd(<queue_id>,<var_id>)adds <var_id> to queue of <queue_id>, returns 1 if <var_id> is already present in the queue, 0 otherwise. queueadd(.@queue_id,.@var_id); *queueremove(<queue_id>,<var_id>)removes <var_id> from queue of <queue_id>, returns 1 if <var_id> is not present in the queue, 0 otherwise. queueremove(.@queue_id,.@var_id); *queueopt(<queue_id>,<optionType>,{Optional <option val>})modifies <queue_id>'s <optionType>, when <option val> is not present, <optionType> is removed from <queue_id>, when present it modifies <queue_id>'s <optionType> with the new <option val> value.
    Currently 3 options are available, HQO_OnDeath (0), HQO_OnLogout (1), HQO_OnMapChange (2) (the constant names are not final). queueopt(.@queue_id,0,"MyNPC::MyOnQueueMemberDeathEventName");It allows you to hook npc events to be triggered by specific actions that may happen to a player in the queue (when the queue in question is used for account ids) *queuedel(<queue_id>)deletes <queue_id> returns 1 when <queue_id> is not found, 0 otherwise. queuedel(.@queue_id); *queueiterator(<queue_id>)creates a new queue iterator instance, a queue iterator is not a reference to a queue's actual members, it copies the queues members when initialized, this way you can loop through them even if you remove them from the queue set .@it,queueiterator(.@queue_id); *qicheck(<queue_iterator_id>)checks whether there is a next member in the iterator's queue, 1 when it does, 0 otherwise. qicheck(.@queue_iterator_id); *qiget(<queue_iterator_id>)obtains the next member in the iterator's queue, returns the next member's id or 0 when it doesnt exist. for( set .@elem,qiget(.@queue_iterator_id); qicheck(.@queue_iterator_id); set .@elem,qiget(.@queue_iterator_id) ) *qiclear(<queue_iterator_id>)deletes a queue iterator from memory, returns 1 when it fails, 0 otherwise. qiclear(.@queue_iterator_id) Sample Usage: /* say create a queue */set .@id,queue();queueadd(.@id,getcharid(3));/* ... add as many entries ... (no limit) */if( queuesize(.@id) == 999 ) {    /* whatever */}/* anywhere in the code */set .@it,queueiterator(.@id);for( set .@elem,qiget(.@it); qicheck(.@it); set .@elem,qiget(.@it) ) {    //do anything e.g.    /* attachrid .@elem; */    /* mes "ID:"+.@elem; */}qiclear(.@it); Special Thanks To
    Yommy for providing me with a hell lot of data for the BG Queue, wouldn't have been able to get it to this point without his help. Rosiel for his suggestion on the instance feature Xgear for his help with the network timeout bug mkbu95 for pinpointing the script parser bug All of Hercules Staff for their ideas/suggestions/criticism and support, and for keeping me sane during this memory slashing madness The Future~! This patch sure has taken me away from my usual bug-squashing mode, I'll be going back to my over-10-bug-fix-a-day schedule. We have quite a hell lot planned so this might not last long, make sure to keep an eye on your bug reports for I sure will be replying to them. Link~u! Commit 1 Commit 2 Commit 3
  2. Upvote
    Renn reacted to Gepard in Flux Control Panel for Hercules   
    Flux Control Panel for Hercules
     
    Flux CP is now officialy available for Hercules!
     
    It is fully working with both pre-Renewal and Renewal Hercules servers. We will continue developing it, so it is always up-to-date and compatible with latest Hercules.
     
    New theme
    Hercules' Flux CP comes with a brand new theme. It's a grey-ish modern and clean HTML5 theme, called Emphaino.
    It has a nice dropdown menu located on top of the screen, and a customizable footer area, where you can put some stuff that should be visible all the time (like links to social media, forums etc.).
     
    A picture is worth a thousand words:



     
    It's a HTML5 theme, so it requires a decent browser, or IE9+ (if you insist on using that).
     
    Theme selection
    Having two themes is great, but until now it was impossible to make use of them both. That's why theme selector has been added to both themes, so your users can pick whichever theme they like more.
     
    Again, preview:

     
    Extra credits
    Authors of original FluxCP & FluxCP-rA. Authors of Emphaino theme (originally for Wordpress).

     
    Download
    Hercules' FluxCP Github repository: https://github.com/HerculesWS/FluxCP
     
    Issues
    Bug reports, questions and suggestions are all welcome directly on GitHub: https://github.com/HerculesWS/FluxCP/issues
     
    Enjoy~
  3. Upvote
    Renn reacted to jaBote in How to add Rental Items to the Cash Shop?   
    Rental items make use of the rentitem script command (check rentitem on doc/script_commands.txt). They're usually a box that when you open it you'll have that item for some time (time expressed in seconds) and after that it's gone.
     
    I think you can't directly rent items from the Cash Shop but you could take the idea from what it's done on official servers, which is selling boxes that rent you the items when you open them. There are numerous examples on RateMyServer for instance.
×
×
  • Create New...

Important Information

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