Jump to content

GmOcean

Community Contributors
  • Content Count

    371
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by GmOcean

  1. @1 - By default initnpctimer does not have a player attached so you can just use that if you choose to. @2 - TRUNCATE TABLE `table_name` is used when you want to delete all the data from the given table, without deleting the table from the schema. You shouldn't have any issues of table mix ups, since you can't have the same table name in the same schema. So, if `votegoal` isn't the table you want to TRUNCATE, then perhaps a different table is what you need to do? Additionally, if you're having issues, where `votegoal` is the name of a table inside 2 different schemas, and this is the problem, you should be able to specify which schema to truncate from: query_sql("TRUNCATE database.schema `table_name`");
  2. Version v0.1

    24 downloads

    Additional Instance Check Commands to go along with the existing instance_check_party. Commands: *instance_check_guild(<guild_id>{,<amount>{,<min>{,<max>}}});This function checks if a guild meets certain requirements, returning 1 ifall conditions are met and 0 otherwise. it will only check online characters.amount - number of online guild members (default is 1).min - minimum level of all characters in the guild (default is 1).max - maximum level of all characters int he guild (default is max level in conf).Example:if( instance_check_guild(getcharid(2), 2, 1, 150) ){ mes "Your guild meets the Memorial Dungeon requirements.", mes "All online members are between levels 1-150 and at least two are online."; close;} else { mes "Sorry, your guild does not meet requirements."; close;} *instance_check_ready(<IOT_TYPE>,<owner_id>{,amount{,min{,max}}});This function checks if the Char, Party, Guild, etc... meets certain requirements, returning 1 ifall conditions are met and 0 otherwise. It will only check online characters.IOT_TYPE: IOT_NONE - Not sure what this is, but will return 1 regardless of settings due to it being unknown. IOT_CHAR - Character ( Will only check for min or max level. Amount doesn't matter since only 1 character can enter IOT_CHAR instance ). IOT_PARTY - Party IOT_GUILD - Guildamount - number of online party members (default is 1).min - minimum level of all characters in the party (default is 1).max - maximum level of all characters in the party (default is max level in conf).Example:if( instance_check_ready(IOT_CHAR, getcharid(0), 1, 75) ){ mes "The player has met all the requirements to enter the instance.", mes "The player is at least level 75 and is online."; close;} else { mes "The player does not meet all the requirements or is offline."; close;}Example 2:if( instance_check_ready(IOT_PARTY, getcharid(1), 5, 10, 50) ){ mes "The party meets all the requirements to enter the instance.", mes "All online members are between the levels 10-50 and at least 5 members are online."; close;} else { mes "Sorry, your party does not meet all the requirements."; close;}Example 3:if( instance_check_ready(IOT_GUILD, getcharid(2), 36, 140, 150) ){ mes "The guild meets all the requirements to enter the instance."; mes "All online members are between the levels 140-150 and at least 36 of them are online."; close;} else { mes "Sorry, your guild does not meet the requirements."; close;} [Credits: malufett for providing the base for which these commands were derived from].
  3. Okay, so when I made this command in script.c originally, it worked fine. In fact, it's just a clone of another command except for a few things. This particular warning/error i'm receiving is part of the cloned code. While in script.c there is no error, the command works perfectly fine. However when copy+pasting the code to plugin system. This is the warning/errors I am forced to face: warning C4018: '<' : signed/unsigned mismatchwarning C4018: '>' : signed/unsigned mismatch Now, I managed to solve this by simply changing int to int16. But, in script.c it's just a normal int. Is there a reason that the plugin system picks this up but not the main files when I compile it? Also, I'm compiling in Debug mode so this should be seen. Even when compiling in release mode this isn't found.
  4. This is untested, but it should do what you want. All you need to do, is set the array with the castle names, and it will continue to rotate the castle after each WoE. The only thing is, you can't change it from in-game. Meaning GMs cannot change it at will. This is to prevent conflicts when a guild is inside of the guild dungeon, and a GM changes castle's. Resulting in possible abuse. Additionally, this script does not limit access to a castle. All this does is change owner ship of Castle 1 -> Castle 2, Castle 2 -> Castle 3, etc.... And loop back over once it reaches the end. You need to manage which castle's are available during WoE in a seperate script. How this script works: 1. Setup script by editing the arrays. 2. After each WoE the castle will rotate. ( Transfer all data from Castle 1 -> Castle 2 ). - script castle_rotation -1,{OnInit:setarray .castle$[0],"prtg_cas01", // 1st Edition WoE "payg_cas01", "gefg_cas01", "aldg_cas01", "prtg_cas02", "payg_cas02", "gefg_cas02", "aldg_cas02"; setarray .castle2$[0],""; // 2nd Edition WoEend;// Has to be set to AgitEnd or else guild will be kicked out upon changing owner ship of castle.// Therefore after WoE has ended in 1 Castle, the Guild will own the castle NEXT in line.// Example: WoE is in prtg_cas01. It ends. Winning Guild now owns, payg_cas01.// Afterwards, guild should go to that castle to make changes ( investments, etc... )OnAgitEnd:callfunc("rotate_castle", .castle$[$rotation], ( (.castle$[($rotation + 1)] == "")? .castle$[0]:.castle$[($rotation + 1)] ) );$rotation ++;if( .castle$[($rotation + 1)] == "" ){ $rotation = 0;}end;OnAgitEnd2:callfunc("rotate_castle", .castle2$[$rotation], ( (.castle2$[($rotation + 1)] == "")? .castle2$[0]:.castle2$[($rotation + 1)] ) );$rotation ++;if( .castle2$[($rotation + 1)] == "" ){ $rotation = 0;}end;}function script rotate_castle {.@i = 18;while( .@i > 1 ){// Transfer data from Castle 1 -> Castle 2 setcastledata( getarg(1), .@i, getcastledata( getarg(0), .@i) );// Erase Data from Castle 1 after transfering it to Castle 2 setcastledata( getarg(0), .@i, 0 );.@i--;}return 0;}
  5. I see. Well, that isn't too bad, guess it would make sense I can't just hook into a function like that.
  6. So, what I want to know how to do is, hook into certain parts of code where it does has a switch(case:). How would I do that if it's even possible. Or do I have to just copy paste all of the code into a plugin, and add my custom code as well, so that it completely overrides it?
  7. Taking a small break from my Scripting Tutorial Topic to produce other works. - Nov. 3, 2013

  8. Updated~!! Added a Scripting Techniques section, and filled it with a few things not much. Do note, that they are not intended to be used in public scripts it's purely for private use only. Since they can be hard to read at times. Also, another script guide using bindatcmd. The script is finished as is, but will be expanded on in future parts, so marking incomplete for now. Edit: Custom Atcommand @buff - Complete ( 2 Parts ).
  9. Well, using NEMO's Patcher you can restore old login on new clients to bypass the use of a launcher. But, i'm not sure if it supports clients this new, it may need to be updated assuming packet's were changed around.
  10. What I'm requesting, is to make quest_db a sql table. So that the server will create the db from the SQL table listings, should I choose to enable that. Same way itemdb works with sql. The reason, is this would allow for use of custom commands to " create " quests and add it to the db, as well as modify existing quests from ingame via an npc or otherwise.
  11. No problem. It's something that needed to be done anyways. We should be trying to actively provide awareness to projects that will be a benefit to the RO community. So this can be my contribution to such a cause. =P
  12. GmOcean

    Away System

    This is a neat idea, an AutoTrade effect, for afk use. My only suggestion is, remove the ignore monster effect because, this makes it 100% abusable for leeching people to higher levels. Other than that, I like it, and will give it a test =P
  13. mapname,x,y,z script npc_name 123,{mes "Where do you want to be warped?";next;.@select = select( implode( .warps$, ":" ) );mes "Are you sure you want to be warped to: "+ .warps$[.@select] +"?";if( select( "Yes, warp me now.", "No, I've changed my mind." ) == 2 ){ close; }warp .maps$[.@select],.x[.@select],.y[.@select];close;OnInit:setarray .warps$[0],"Map display names","Example","Prontera","Payon","Morroc";setarray .maps$[0],"prontera","payon","morroc";setarray .x[0],150,170,140;setarray .y[0],180,190,150;end;} my appologies, there was a typo with the warp command. it reads, .map$ it should say .maps$ so you can either add an S to that, or remove the S where the array is being set.
  14. You need to edit the arrays.
  15. mapname,x,y,z script npc_name 123,{mes "Where do you want to be warped?";next;.@select = select( implode( .warps$, ":" ) );mes "Are you sure you want to be warped to: "+ .warps$[.@select] +"?";if( select( "Yes, warp me now.", "No, I've changed my mind." ) == 2 ){ close; }warp .map$[.@select],.x[.@select],.y[.@select];close;OnInit:setarray .warps$[0],"Map display names","Example","Prontera","Payon","Morroc";setarray .maps$[0],"prontera","payon","morroc";setarray .x[0],150,170,140;setarray .y[0],180,190,150;end;}
  16. Doesn't the default warper provided in herc's npc/custom folder do that already?
  17. @1 - Didn't know it worked without being used for strings O.o. See even i'm still learning xD @2 - That would be better, but you forgot to add :: in your example, they are needed to push the options down or else, No thank you will go to case 2. Edit: Updated, with Dastgir's suggestion.
  18. Update! Finished Advanced Healer & Buffer. Going to take a small break from updating this as I plan out the next script to write a tutorial for, as well as to give me time to other tasks I'm currently falling behind on.
  19. Yeah, but what if they were to use this: http://herc.ws/board/topic/4912-peek-successor-to-yommys-packet-analyzer/ essentially, this would let them see those encrypted packets would it not, since it's your client they'd be using it on >.> if so, then we pretty much gave them the tools. It's a shame really, such skilled people over there helping out with OpenKore.
  20. Like this? prontera,154,180,4 script Item Checker 123,{if( !countitem(501) ){ mes "You don't have a Red Potion.";} else { mes "You have a Red Potion, I can tell.";}close;}
  21. File Name: Monster Search File Submitter: GmOcean File Submitted: 12 Oct 2014 File Category: Utility Official Supported Projects: Midgard-Community Project & Yourolist Project & RateMyServer Website ============================================================= Description ============================================================= This script will allow users to search information about a monster in-game, and then open up a page to that exact mob on any website admins choose to enable. Works for both re/non-re monsters. ============================================================= Features ============================================================= Choose between what website you want your server to use. Or simply leave that upto your players by enabling all sites. ============================================================= NOTE - Requires a client from 2011-10-10aRagexe.exe onwards. NOTE2 - RateMyServer Link does not support custom mobs. NOTE3 - As of yet, Midgard-Community & Yourolist also, do not support custom mobs to the extent of my knowledge. ============================================================= Click here to download this file
  22. Glad you like it. But I don't need to be rewarded for it lol. It's just making it easier for players to search if they are sitting around. Since they would have just gone to the website themselves otherwise.
  23. Update! Finished Basic Item Trader with 2 parts ( for lack of other things to add to it D: ). Created & Finished Basic Floating Rates NPC with 2 parts. Edit: Going to start intermediate scripts next, anyone got any idea's for one? If not I'll just throw in a more detailed and modified version of the Healer & Buffer script.
  24. Agree with kisuka, however I thought this was implied lol. But if it wasn't then yes, scripts can go, folder must stay, so that I have a place to put my scripts.
×
×
  • Create New...

Important Information

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