Jump to content

jaBote

Community Contributors
  • Content Count

    2037
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by jaBote

  1. I'm done with it, but I haven't tested. Would like to release it, that's the reason of doing the script in a more general and configurable way than what you just asked. Upaste mirror: http://upaste.me/fb7712684462cbaf3 //===== Hercules Script =======================================================//= Multiple droprate on mob elements from a set (default set: elements).//===== By: ===================================================================//= jaBote//===== Current Version: ======================================================//= 0.9.0 alpha//===== Changelog =============================================================//= 0.9.0 Initial version [jaBote]//===== Description: ==========================================================//= Implements multiple drop rates on mob sets that change each week.//===== Warning: ==============================================================//= -> addmonsterdrop/delmonsterdrop script commands don't work well with mobs//= that drop the same item more than once.//= -> Doesn't work well with @reloadscript and/or server restarts (it will//= reassign a new set).//===== Additional information: ===============================================//= Configurations are located from line 22 (OnInit label).//=============================================================================- script element_drops -1,{OnInit: // Configurations START. // Add in mob IDs on the place of the numbers setarray .set_0[0], 1001, 1002, 1004, 1005, 1007; // Neutral setarray .set_1[0], 1001, 1002, 1004, 1005, 1007; // Water setarray .set_2[0], 1001, 1002, 1004, 1005, 1007; // Earth setarray .set_3[0], 1001, 1002, 1004, 1005, 1007; // Fire setarray .set_4[0], 1001, 1002, 1004, 1005, 1007; // Wind setarray .set_5[0], 1001, 1002, 1004, 1005, 1007; // Poison setarray .set_6[0], 1001, 1002, 1004, 1005, 1007; // Holy setarray .set_7[0], 1001, 1002, 1004, 1005, 1007; // Shadow setarray .set_8[0], 1001, 1002, 1004, 1005, 1007; // Ghost setarray .set_9[0], 1001, 1002, 1004, 1005, 1007; // Undead // Set to the name of the type of each set of $@set_X // BEWARE! Number of set of this array MUST be the same than the total // amount of sets (which is quite obvious). This is VERY IMPORTANT. setarray .names$[0], "Neutral", "Water", "Earth", "Fire", "Wind", "Poison", "Holy", "Shadow", "Ghost", "Undead"; // Set to the multiplication rate of drops (should be >= 1) // Examples: 100 = x1 (useless); 200 = x2; 50 = x0.5 // Based on final drop rates after battle conf calculations. .multiplicator = 200; // Force change of element each week? (1 = Yes; 0 = No) .force_change = 1; // Text message. You can change or translate it if you want, but be careful // not to touch the %s since you'll screw the dynamic formatting .announce_format$ = "The element %s has been doubled for this week."; // Atcommand name you want to use for keeping your users informed .atcommand$ = "ddw"; // Configurations END. Don't touch unless you know what you're doing. // Bind an atcommand bindatcmd .atcommand$,strnpcinfo(3)+"::OnCommand"; // Get the amount of sets and use an impossible set .amount = getarraysize(.names$); .set = -1; // Let it fall through the OnMon0000: label to assign first set on server // startup (or reloadscript)OnMon0000: .@old_set = .set; // Force the change of set if required if (.force_change) { do { .set = rand(.amount); } while (.set == .@old_set); } else { .set = rand(.amount); } // Restore old drops and assign new ones... if set hasn't changed if (.@old_set != .set) { freeloop(1); // We could be needing it // Restoring old sets, just if there was an old set if (.@old_set >= 0) { .@old_set_size = getarraysize(getd( ".set_" + .@old_set)); for (.@i = 0; .@i < .@old_set_size; .@i++) { // This is pretty ugly, but there's no other mean to do this. .@mobid = getd( ".set_" + .@old_set + "[" + .@i + "]" ); .@drop_count = getd(".mobdrop_count_[" + .@i + "]"); for (.@j = 0; .@j <= .@drop_count; .@j++) { // We only have to restore previously saved originals .@drop_item = getd(".mobdrop_item_" + .@i + "[" + .@j + "]"); .@drop_rate = getd(".mobdrop_rate_" + .@i + "[" + .@j + "]"); // This updates monster drop back to original state addmonsterdrop(.@mobid, .@drop_item, .@drop_rate); } } } // Applying multiplicator to new set for (.@i = 0; .@i < getarraysize( getd( ".set_" + .set ) ); .@i++) { // Get original mob drops .@mobid = getd( ".set_" + .set + "[" + .@i + "]" ); getmobdrops(.@mobid); setd ".mobdrop_count_[" + .@i + "]", $@MobDrop_count; // We'll need it for (.@j = 0; .@j <= $@MobDrop_count; .@j++) { // We only have to save originals setd ".mobdrop_item_" + .@i + "[" + .@j + "]", $@MobDrop_item[.@i]; setd ".mobdrop_rate_" + .@i + "[" + .@j + "]", $@MobDrop_rate[.@i]; // Calculate new rate. If it gives a value out of bounds, // addmonsterdrop will then take care of capping it inbounds // along with a warning we can safely ignore. .@new_rate = ($@MobDrop_rate[.@i] * .multiplicator) / 100; // This updates monster drop item if the mob already drops it addmonsterdrop(.@mobid, $@MobDrop_item[.@i], .@new_rate); } } freeloop(0); } // Announce new set for everyone and finish. .@announce_text$ = sprintf(.announce_format$, .names$[.set]); announce .@announce_text$, bc_all|bc_blue; end;OnCommand: // Announce set just for yourself and finish. .@announce_text$ = sprintf(.announce_format$, .names$[.set]); announce .@announce_text$, bc_self|bc_blue; end;} Please test it and point any bugs or errors you can find on it. P.S.: I've made an effort to make it extra readable so that anybody could modify it if they wanted.
  2. Nice question. Not a Git expert, but I however think that if you do that and Git fails to update a file, it terminates with a fatal error (didn't test, but should do since these kind of errors in control versioning should be considered as such).
  3. You'll get an update conflict if you are using Git. Conflicts aren't bad, and if you're using TortoiseGit it warns you with a nice yellow, triangle shaped warning icon with a !. You just have to manually resolve it. In this particular case I'd just use THEIRS (the one you pulled) whole file rather than ckecking, and add the maps again if it doesn't include it. Remember WeeMapCache utility can merge existing mapcaches if you want .
  4. Rental items are supposed to be standalone equipments, this is why you're experiencing these issues. Just look at what your inventory table is (or another table that manages items, actually): CREATE TABLE IF NOT EXISTS `inventory` ( `id` int(11) unsigned NOT NULL auto_increment, `char_id` int(11) unsigned NOT NULL default '0', `nameid` int(11) unsigned NOT NULL default '0', `amount` int(11) unsigned NOT NULL default '0', `equip` int(11) unsigned NOT NULL default '0', `identify` smallint(6) NOT NULL default '0', `refine` tinyint(3) unsigned NOT NULL default '0', `attribute` tinyint(4) unsigned NOT NULL default '0', `card0` smallint(11) NOT NULL default '0', `card1` smallint(11) NOT NULL default '0', `card2` smallint(11) NOT NULL default '0', `card3` smallint(11) NOT NULL default '0', `expire_time` int(11) unsigned NOT NULL default '0', `favorite` tinyint(3) unsigned NOT NULL default '0', `bound` tinyint(1) unsigned NOT NULL default '0', `unique_id` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `char_id` (`char_id`)) ENGINE=MyISAM; nameid is the item ID# of that particular item and expire_time is the time at which the item expires. So, if you compound a card onto an item, all the entry information for the card is deleted and the equipment info is updated with the card inserted on its correct slot, making the expire_time of the card nowhere to be found, thus rendering it permanent. A polite guess (not sure) is that if you rent slotted equipment and insert permanent cards on it, they should be lost once the rental time expires . P.S.: This is not a script concern, moving to General support section .
  5. That does still work inside of a script, but counts mobs instead of giving items. If you want all of your party members to get an item, you can try changing all count++; on the script to: getitem <item ID>, amount; And you're good to go. Just notify me if that wasn't what you wanted.
  6. Please read your posted screen again. The console itself is giving you the answer to your problems: [Error]: script_add_str: detected possible use of wrong case in a script. Found 'OnPcLoginEvent', probably meant to be 'OnPCLoginEvent' (in 'npc/custom/autojob.txt') [Error]: script_add_str: detected possible use of wrong case in a script. Found 'ResetSkill', probably meant to be 'resetskill'(in 'npc/custom/autojob.txt')
  7. You did great! However your comparison to get the status of WOE 2.0 (agitcheck2) since it checks for Yuno and Rachel castles, and you are restricting trans jobs from a WOE 1.0 castle. I usually tend to encourage people do it themselves when it's a simple edit, glad you could do it!
  8. Will try if I get enough spare time today, or tomorrow. Anybody else is encouraged to give it a try too. P.S.: Honestly don't know if it'll be possible to update @mi. Yes if it gets updated by using addmobdrops/delmobdrops, no in other case.
  9. Los archivos num2item e idnum2item dejaron de ser usados a partir del cliente 20120418 (el primero posterior a 20120410), en favor de otro archivo llamado itemInfo.lua (o .lub). Personalmente, os recomiendo que descarguéis el cliente completo (sin customs) de Ossi0110 en http://hercules.endlessro.net/ para asegurar el funcionamiento completo del cliente. Los items en clientes nuevos se encuentran en System/itemInfo.lub (o .lua, da igual). Intentad abrirlo como un editor de textos: si veis algo ininteligible es que están compilados y habrá que descompilarlos (no sé yo muy bien cómo). La parte de clientes es la que peor se me da, así que no sabría deciros exactamente cómo añadir alitas con ninguno de los tipos de cliente. Un saludo.
  10. Dastgir, he's using PhpMyAdmin and I know myself it breaks when trying to import a large file because it's fault of the PhPmyAdmin program itself. I can reproduce the error and it happened to me some years ago. This is renewal mob skill db, but happens the same with pre-renewal one (and sorry my PhpMyAdmin is in my local language): It gets fixed if you split the mob_skill_db.sql file into several smaller files. You open the file, select a number of rows (around 1000 is a good value) and then paste into the PhpMyAdmin query window till you finish inputting the whole file and no errors will appear. That, or if you want your database manager to swallow the whole file just instal MySQL workbench, that is competent enough but you'll need some more MySQL management knowledge.
  11. Desconozco ese tipo de versiones de la data, aunque tiene toda la pinta de que estás intentando mezclar muchas cosas. A partir del cliente siguiente a 20120410 se produjo una restructuración gran parte del contenido de la carpeta data en cuanto a las tablas con objetos (idnum2itemxxxxtable.txt y similares pasaron a otro formato totalmente distinto) y otras cosas de las que no estoy tan familiarizado. Algo me dice que estás intentando que un cliente posterior a 20120410 lea las tablas de clientes previos y eso no es así. Por favor esclaréceme qué versiones utilizas para comparar las carpetas data y demás. Un saludo.
  12. Multiple database? Ok, I will try it. No, not multiple database, but splitting the contents of the db in smaller sets and making PMA swallow it.
  13. What database tool are you using for executing it? If it's PhpMyAdmin, then that error is that software's fault. I'd reccommend splitting the big db in some smaller sets of queries to ensure you can insert all of them.
  14. Hello. You've got a script command that works just for that purpose: agitcheck() You've got to edit only 1 line to add it. Try yourself.
  15. Just make your own item, and make sure its on use script is like this one: .@addition = rand(20,50);#CASHPOINTS += .@addition;announce "You've earned " + .@addition + " Cash Points. Your current total is " + #CASHPOINTS + " Cash Points.", bc_self;
  16. Nope, to my knowledge there isn't another way of doing that, sadly. Unless Baphomet had a fixed spawn time (which he doesn't), so that you could time it from the NPC event that gets called when the mob is killed. Beware though, you can't use Convex Mirror on these monsters spawned by script command even if they're bosses.
  17. They sure have all primary keys as you can see on sql-files/logs.sql. And in case they hadn't they could still be edited, but just not as efficiently as if they had. Dastgir's queries seem fine to me.
  18. Remove it from the permanent mob spawn, then make a script that spawns him and properly announces with the same delays.
  19. Maybe this can be of your interest: conf/battle/items.conf // Item check? (Note 1)// On map change it will check for items not tagged as "available" and// auto-delete them from inventory/cart.// NOTE: An item is not available if it was not loaded from the item_db or you// specify it as unavailable in db/item_avail.txtitem_check: no And this other file: /db/item_avail.txt
  20. One of the main things you'd have to know is that unlimited web hosting is a scam. 90% of hostings that are saying unlimited are lying because that isn't true (just imagine millions of clients buying cheap, unlimited web hostings and uploading all of their files just to have a backup, which would be rather silly). You should rather go for unmetered when looking for these. And trust me, you'd rather prefer to know your limits than having a hard limit (usually under a Fair Use clause in the Terms of Service) and not knowing where it is. Just think, buying hard drives for your data is expensive and you may not know, but carriers charge data centers based on the amount of data traffic they consume. It's rather common to have unmetered data transfer on shared hostings (web hostings) since your host wants you to be able to serve your web to any legit who requests it (that's why it's common to find some terms of service in hosts that bans directly or indirectly making download sites on shared web hostings). Now, if you want a paid web hosting, think what hard disk space you need. You won't usually need more than 10 GB unless you're running a massive site or using your space inefficiently. As I said, you usually won't have to mind about transfer, but if your transfer isn't on the unmetered side try to have it around the 100 GB mark to make it on a very safe mark (unless you're running sites with tons of visits). Hope this helped you.
  21. Vaya. Yo tan malo con los clientes pero parece que te ha tocado ración triple de problemas con él. Si me pudieras conseguir una captura de pantalla del error la pasaría a mis compañeros que responden este tipo de preguntas en las secciones internacionales, porque de momento no se me ocurre nada que comentar. ¿Como aclaración, estás usando el cliente 20131223 de ossi0110 tal cual, o estás añadiendo el grf de algún otro servidor? En caso de ser lo segundo, ¿podría ver el contenido del otro grf? P.D.: Si no es porque tienes otro grf y el otro grf tiene algún archivo malformado, honestamente no sabría qué decirte.
  22. It's quite simple. Just compile in pre-renewal mode to ensure you've got pre-renewal mechanics, and disable any job npc you're not interested to have in your server on the npc/scripts_jobs.conf file. Then, if you have a job changer NPC, ensure it won't change your players to any trascendent class. Trascendent and third jobs will still be available on the server, just via atcommands or if a script changes them to these classes (this happens on every current emulator), so you have to avoid the usage of these atcommands. No other script than a jobchanger or these specified in the file I linked should arbitrarily be able to change jobs, based on current Hercules version.
  23. jaBote

    OnTimer Script

    120000 ticks are 120000/1000 = 120 seconds, which is 2 minutes. A whole hour is 1000*60*60 = 3600000 milliseconds and the same number of ticks.
  24. I don't know, but have never seen a server reaching to that limit. Hopefully a dev could give you a better answer, but just stay reassured that maybe you won't ever have to face that issue.
  25. The item combos have been moved to another file so that you don't have to place that comparison envery time you want to make a combo. New combo files are in item_combo_db.txt on their respective folders: db/pre-re/item_combo_db.txt for pre-renewal servers; db/re/item_combo_db.txt for renewal servers. Hope it helps you, I see it's better than the former method. However, you can still use it on your custom combos if you want. P.S.: Moving topic to General server support~.
×
×
  • Create New...

Important Information

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