Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. My apologies, my attention was else where @.@; I provided the wav file, but I neglected to re-name it to the one the script uses. I'll update this shortly. Sorry again.
  2. Yeah, sorry, when I copy + pasted it, the code tags vanished. Just finished adding them in =P @ Idea to save posts and such, I don't really mind using just 1 post for the whole content, but it's up to you moderators on what you think would be best. I'm just trying to submit helpful stuff for the community. Edit: If you decide that multiple posts are better for this topic, then perhaps just limiting it to 4 posts. 1. Basic Scripts 2. Intermediate Scripts 3. Advanced Scripts 4. Expert Scripts
  3. Scripting Techniques, Tutorials and Guides I'm going to attempt to help everyone here with their scripts while not being directly involved in helping you with them xD. This will also help future/current scripters get some fresh info and maybe inspire innovative ideas towards scripting. So that we can prove that us " Scripters " are the superior ragnarok emulation race! Take that Source Code writers!! Jk lol, we need you too . What I'm going to do, is write detailed tutorials on how to write a few scripts. Starting from the basics to more advanced scripts. This way everyone can follow along. And hopefully this will help everyone understand how to write a few scripts and even troubleshoot their own scripts. During these guides, I'll be using my own, scripting form, but i'll try not to deviate too far from the norm . // A list of <sprite id>s can be found here: Sprite_IDs Credits: Ai4rei - Beginner Scripts - Scripts for complete beginners and novice scripters. - Intermediate Scripts - Scripts for intermediate level scripters. If you completed my beginner script series, then you are ready for this section. *Note - In most of these tutorials, I will be using the script from the previous lesson, unless the scripts deviate from each other. For instance jumping from Healer -> Quest NPC will result in a blank script. But each lesson from then on will be towards the quest NPC and will use the script from the previous lesson. * The idea behind this topic, is for new users, and current ones, to have a (second)place they can go to for reference when trying to write a script if they can't figure it out with script_commands.txt file. It will also help people learn how to write scripts. While hopefully, keeping script writing techniques to a ' very ' similar structure! !! This topic will be updated at Hercules first and then here once a script is fully complete. Some scripts may not be here right away. If this is the case it is because scripts are incompatible and need to be adjusted. !!
  4. O.o i don't get an infinity loop on herc D:
  5. Well, I completed the request on hercules. You can get the script there.
  6. Sorry, I forgot to update to version 0.7 on rAthena @.@; I've submitted an upload just waiting for approval by an admin. v0.1 - Original Script Created. v0.2 - Added Option for Triple Slot Machine with animations. v0.3 - Added support for item pricing &/or zeny pricing. v0.4 - Cleaned up script variables for easy editing. v0.5 - Tested out some new scripting methods with IF(THEN). v0.6 - Added option to change slot machine modes ingame. v0.7 - Added optional sound effects to slot machines. - NOTE
  7. Oh? I didn't know that was allowed. Well, time to delete this annoyingly complicated function xD since it's no longer of use. And yeah, trust me, it is a pain to make stuff like this so take the easy route.
  8. Are you having issues where a single entry in the sql db has an amount greater than max int? If so then theres nothing we can do unless you increase the size of max_int in the src by maybe converting it to uint64 or something. Edit: Althought this shouldn't be the issue as zenylog's amount is: int(11) which limits it to the max_int you specified. If your having issues finding a way to actually calculate the sum of ALL the sql entries together, then there is a way to do that. However to do so requires a loop and only pulling 1 query at a time. Let me know which is the issue D:
  9. Something like this? - script autoloottimer -1,{ OnInit: bindatcmd "@autoloot",strnpcinfo(3)+"::OnAutoloot"; .timer = 20; //Seconds timer lasts. end; OnAutoloot: if( autoloottimer > gettimetick(2) ){ dispbottom "You can't use this yet."; } atcommand "@autoloot"; addtimer 1000,strnpcinfo(3)+"::OnTimer"; announce "You have "+ .timer +" seconds to use @autoloot",bc_blue|bc_self; end; OnTimer: altimer++; if( altimer == 10 ) { announce "10 seconds left.",bc_blue|bc_self; } if( altimer == 15 ) { announce "15 seconds left.",bc_blue|bc_self; } if( autoloottimer < gettimetick(2) || altimer >= .timer ) { altimer = 0; autoloottimer = 0; atcommand "@autoloot"; announce "Timeout.",bc_blue|bc_self; end; } addtimercount strnpcinfo(3)+"::OnTimer",1000; end; OnPCLoginEvent: if( autoloottimer > gettimetick(2) ) { addtimer 1000,strnpcinfo(3)+"::OnTimer"; } end; } It'd be better to use addtimer in this case, since it'll eliminate the need to attach/deatch/reinitiate the timer over and over again. I made a sample script that should do what you wanted, but using the command: @autoloot to trigger it.
  10. The issue doesn't look like it's in the item, but rather in the function. Show us that so we can see if there is a problem with it. Because from the information your giving us all we can deduct is that: 1. The item exists. 2. Your using it. 3. Nothing happens. By elimination your function is most likely the problem.
  11. To disable all npc's in rA, is the same as when you disable scripts_athena.conf *Note - This file contains the list for NPCs like Merchants scripts_custom.conf scripts_guild.conf *Note - Disabling these scripts may cause unwanted issues regarding WoE scripts_jobs.conf *Note - Disabling these scripts will remove the OFFICIAL job quests needed to change jobs on official servers. scripts_test.conf Ultimately there will be issues if you don't pay attention to what your disabling. But for the most part, 90% of the scripts can be disabled without losing function. It's just alot of those scripts are, npc's people use on a daily basis. any of your NPCs. Just //comment them out of these files:
  12. mapname,x,y,z script npc_name sprite_id,{ mes "Would you like to trade "+ getitemname(.itemid) +" x"+ .amount +" for VIP time?"; mes "Each set of "+ .amount +" will earn you "+ .vip_time_minutes +" VIP minutes."; if( select( "YES:NO" ) == 2 || countitem(.itemid) < .amount ) { close; } //Not enough item / clicked close; next; mes "How many sets would you like to turn in?"; menu "1 set: 5 sets: 10 sets",-; switch( @menu ) { case 1: delitem .itemid, .amount; vip_time .vip_time_minutes; break; case 5: if( countitem( .itemid ) < .amount * 5 ){ mes "Sorry, you don't have that much"; close; } delitem .itemid, .amount*5; vip_time ( .vip_time_minutes * 5 ); break; case 10: if( countitem(.itemid) < .amount * 10 ){ mes "Sorry, you don't have that much"; close; } delitem .itemid, .amount*10; vip_time ( .vip_time_minutes * 10 ); break; } mes "Thank you. Your VIP status has been updated."; mes "Your remaining VIP time is: "+ vip_status(3) +""; close; }
  13. Your able to walk on the ship to view the city from above, but is the ship located within the city parameters, or is it off to the side? Because if it's inside the city, then you would have a large area where they are unable to walk right? But this map looks very interesting, nicely done.
  14. O.o I updated the description, it would allow you to use either a single slit machine version or a triple slot machine version. I even made a semi-custom animation for it.
  15. Updated to v0.2 - Added the Triple slot machine with animations.
  16. It works like this. 1. give each guild you add to the list a guild map of their own. 2. Then, when ever a player of a different guild enters a guild map that doesn't belong to them, it will announce it. 3. It currently only supports 128 guilds. ex: Guild A has it's own map. Guild B has it's own map. If a member of Guild A enters Guild B's map, then the server will announce that Guild B's map has been invaded by a member of Guild A.
  17. The Below should make it back to normal heal damage. Not sure though, didn't test it. In Battle.c find: switch (skill_id) { //Calc base damage according to skill case AL_HEAL: case PR_BENEDICTIO: case PR_SANCTUARY: /** * Arch Bishop **/ case AB_HIGHNESSHEAL: ad.damage = skill_calc_heal(src, target, skill_id, skill_lv, false); break; And then add ad.damage = ( skill_calc_heal(src, target, skill_id, skill_lv, false) / 5); Below AL_HEAL, so should look like: switch (skill_id) { //Calc base damage according to skill case AL_HEAL: ad.damage = ( skill_calc_heal(src, target, skill_id, skill_lv, false) / 2 ); case PR_BENEDICTIO: case PR_SANCTUARY: /** * Arch Bishop **/ case AB_HIGHNESSHEAL: ad.damage = skill_calc_heal(src, target, skill_id, skill_lv, false); break;
  18. The fail / success rate is determined by you. It only shows a 50% but it can be anywhere from 0% success -> 100% success. But what you mean is you want it to roll the slot machine 3x and determine the outcome then? I'll take a look at it and probably add it as an extra feature that can be enabled/disabled.
  19. File Name: Slot Machine File Submitter: GmOcean File Submitted: 13 Sep 2014 File Category: Games, Events, Quests Content Author: GmOcean This script will allow users to spend zeny &/or an item for a chance to win a prize from the slot machine. Currently there are 2 versions. First is a Single Slot Machine, where only 1 slot is rolled. Second is the Triple Slot machine, where 3 slots are rolled. For either version, SUCCESS must be the only thing displayed in order to win. To add the cutins, just place them in: data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/illust /* ============================================================= /* NOTE - If using soundeffects you must add the ".wav" files /* provided in the ".rar" file to your: data/wav folder located /* in either your: ( Ragnarok folder ) OR ( .grf file ) /* ============================================================= Click here to download this file
  20. Version v0.7

    2635 downloads

    This script will allow users to spend zeny &/or an item for a chance to win a prize from the slot machine. Currently there are 2 versions. First is a Single Slot Machine, where only 1 slot is rolled. Second is the Triple Slot machine, where 3 slots are rolled. For either version, SUCCESS must be the only thing displayed in order to win. To add the cutins, just place them in: data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/illust /* ============================================================= /* NOTE - If using soundeffects you must add the ".wav" files /* provided in the ".rar" file to your: data/wav folder located /* in either your: ( Ragnarok folder ) OR ( .grf file ) /* =============================================================
    Free
  21. The line your looking for is this } else if (getcharid(0) != getguildmasterid(getcharid(2))) { Other than that, your posting in the wrong section. For script support post in the script support section.
  22. Not that it's impossible or anything but, this is useless in the result of a server crash as you would need to be connected to the map server. So essentially you'd need to run the software anyways in that case. So, there really a need. Especially when it takes only 10seconds - 2mins to restart. Either way your players are kicked off. So might as well just launch the programs.
×
×
  • Create New...