Jump to content

Ragno

Retired Staff
  • Content Count

    133
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Ragno

  1. The channelmes() command is an awesome command to create and improve announcement systems, and there are two needs that can't be completed in the actual state. Suggestion 1. Please allow the usage of password on default channels. Rationale: Create channels for administrative purposes available only to gms and admins. Right now, I'm creating the channel "#system" with a password through a npc on the server start to send messages visible only to gms, that will send administrative messages of things happening while the server is running, and I would like to avoid the ussage of a npc for this. Suggestion 2. Please create a new permision to only read messages in channels. Rationale: Have a channel to send server's announcements to everybody, but players will not be able to send messages through that channel, only to read those announcements or leave channel if they want. Only those with hchsys_admin permission would be able to send messages to this channel. Right now I haven't a way to do this Suggestion 3. Please create a mapflag to deactivate specific channels on maps and/or zones. Rationale: Disable channels such as "#party" (custom one) in dungeons and fields and leave them only to towns. Actually there is the mapflag nomapchannelautojoin but this is only for #map autologin (I guess). Suggestion 4. Please add a command to ignore specific player's chat from channel without ban him from channel and without leaving the channel (if possible). Thanks to Dairel, a player from our server who suggested this originaly on our boards. Rationale: There is some times when player just don't want to read specific messages because may consider it spam, or just don't need to read it. Hope this suggestions could be implemented
  2. Afaik, eAmod has an alternative script command to broadcast battlegrounds messages. I don't remember what was the name of that command, but allows players to don't show those announces in ther chats. I never tested by myself, only read about it long time ago. However, if you don't want to create new script commands, you can use channelmes() command to send messages to channels and create a way to allow players to disable it through @channel command. To know more about it please read documentation: *channelmes("<#channel>", "<message>") This command will send a message to the specified chat channel. The sent message will not include any character's names. For special channels, such as #map and #ally, the attached RID's map or guild will be used. If the channel doesn't exist (or, in the case of a character-specific channel, no RID is attached), false will be returned. In case of success, true is returned. Hope this help you
  3. Even when it's a noble intention to share with community with different battlegrounds liked by more people, you can't avoid the fact that those are custom content and Hercules is an emulator that emulates official content (mainly from kRO). I guess it couldn't be implemented to main repository because it's custom content but, you can still share it with community through script/plugin releases.
  4. El archivo que estás abriendo es un archivo para importar configuraciones custom, es decir, un archivo en donde puedes poner cosas custom sin la necesidad de tener que editar el archivo base. Para efectos prácticos, creo que saldría mejor editar el archivo base y para ello ve a la carpeta "conf\common\" y ahí busca el archivo "inter-server.conf", donde se muestran todas las configuraciones disponibles: Por cierto, te recomiendo poner un título más preciso al tema, ya que un título tan general como este generará mucha confusión en la comunidad.
  5. The npc is not attached to an instance because only those that are inside an instance map are attached, so, floating npcs can't read instance variables because they are not attached. Try put a location for the npc: 2@nyd,1,1,0 script nyd_logout_exploit FAKE_NPC,{ end; OnPCLogoutEvent: if (!compare(strcharinfo(PC_MAP), "2@nyd")) end; getmapxy (@map$,@x,@y,UNITTYPE_PC); if ('ins_nyd2 < 4) end; if ((@x >= 100 && @x <= 300) && (@y >= 255 && @y <= 390)) #nyd_nest = gettimetick(2) + ( 60 * 60 * 24 * 3); // 3 Days end; } However, this practice is not recommended and will be harmful because you will be duplicating the OnPCLogoutEvent with every instance created. Maybe you could try with this other: - script nyd_logout_exploit FAKE_NPC,{ end; OnPCLogoutEvent: if (!compare(strcharinfo(PC_MAP), "2@nyd")) end; .@instance_id = has_instance2("2@nyd"); instance_attach(.@instance_id); getmapxy (@map$, @x, @y, UNITTYPE_PC); if ('ins_nyd2 < 4) end; if ((@x >= 100 && @x <= 300) && (@y >= 255 && @y <= 390)) #nyd_nest = gettimetick(2) + (60 * 60 * 24 * 3); // 3 Days end; } This other npc manually attaches the floating npc to the instance gived by has_instance2() command, and then I think you can read the instance variable (needs test).
  6. I have had that error once, but was a problem with the script. I fixed the script and never get again that error and I don't remember how to reproduce it. That is why I asked you for the script, or at least the part that produces the error. I can't help you without a way to reproduce the issue. Maybe some other have had that problem too.
  7. Yes. When player goes inside a map, you can remove the variable by setting it to 0 or to empty string. Examples: @var = 0; @var$ = ""; The first one for integer variables and the second one for string variables. You can do this in the npc that sends player inside the instance, or using getpartymember() and attachrid() commands as the example of this other topic. R418.109300
  8. Can you share the script for reproduce the error? Or at least, the part where produces the error.
  9. I guess this would do the trick: - script InstanceCheck FAKE_NPC,{ end; OnPCDieEvent: if (!compare(strcharinfo(PC_MAP), "@")) end; .@player$ = strcharinfo(PC_NAME); .@party_id = getcharid(CHAR_ID_PARTY); .@map$ = strcharinfo(PC_MAP); getpartymember .@party_id, 2; copyarray .@party_aid[0], $@partymemberaid[0], $@partymembercount; sleep 100; // Intended delay to processing. callsub S_CheckAlive, .@party_id, .@map$, .@party_aid; message .@player$, "All your allies are dead. Preparing to warp all of you to Prontera."; sleep 120000; callsub S_CheckAlive, .@party_id, .@map$, .@party_aid; mapwarp .@map$, "prontera", 156, 191; end; S_CheckAlive: for (.@i = 0; .@i < getarraysize(getarg(2)); ++.@i) { if (attachrid(getelementofarray(getarg(2), .@i))) if (getcharid(CHAR_ID_PARTY) == getarg(0) && strcharinfo(PC_MAP) == getarg(1) && Hp) end; } return; } What this script does is compare every party member with the one who triggers the script, ignoring those outside of the instance map and stoping if one of them is inside but not dead. After all, will wait 2 minutes and then warp all of them to Prontera, after checking again if all of them are still dead. R418.109273
  10. That may be because card remover (at least, the one from Malangdo Island) deletes the equipment and then creates new items. That means that previous card was deleted from players inventory and was created a new one. That is the reason you have your card without rental. Before the deletion, npc should check if attached card has rental state. I don't figure a way to do that check, but maybe with getinventorylist() command, but it would be something weird thing. I guess that is the behaviour it should have. However, there is a topic on Github about implement an OnRentalExpireEvent that may fit to your needs: Added 'OnRentalExpireEvent' trigger (related to Bug #7418 / Rental End). You could try to do the merge of that in your server and then recompile, or, maybe request to convert it to plugin in Plugin Requests forum. It would be nice to have it as plugin.
  11. In your test, the instance is trying to warp you to 0001@memhall and name has 12 characters length. I think that may be the problem since maps has limitations with the name length. Try to short the name to something like 1@mmhall.
  12. Until you are using additional sql tables for specific reasons, you don't need the usage of a query to update the values for every party member, you can use attachrid() script command instead of that to loop over every party member. Example: .@char_id = getcharid(CHAR_ID_CHAR); .@party_id = getcharid(CHAR_ID_PARTY); getpartymember .@party_id, 2; for (.@i = 0; .@i < $@partymembercount; ++.@i) { if (attachrid($@partymemberaid[.@i])) { if (ticket) { --ticket; time = gettimetick(2) + 604800; } else message strcharinfo(PC_NAME), "You don't have more tickets"; } } attachrid(.@char_id); In that example, you will be attaching the script for every party member and then discount 1 ticket and set time variable if him has a ticket, otherwise it will bring the message that don't have more tickets. And then, return to the original party member who activates the script. In the script that you post, you have this query: .@nb = query_sql("SELECT ticket,time FROM rdc WHERE account_id = "+$@partymemberaid[.@i]+"", .ticket,.time ); If so, you are setting to pick every character from the account of the party member looped, because you are selecting every record where account_id it's equal to the id of the party member's account id. Maybe you are trying to gather all the members of the party registered in that table, but if so, you should select every record with party id value to gather only party members. Make the registration process with query sql would give you the chance to discount ticket to every party member, even those who are not logged in on the time when the registration is doned, or even those who are outside of the game party but flaged in your database as in the same agrupation (like a kind of clan or something). However, I suggest you to use attachrid() instead, since it's easier to manage. Please remember to assignment vars directly instead of use set command, because set command is deprecated in Hercules and may be removed in any future time. R418.109263
  13. You can make a check in OnEquipScript and OnUnequipScript events, where you check if is equiped any kind of card and unequip in proper conditions. Example: OnEquipScript: <" if (card_check >= 2) { message strcharinfo(PC_NAME), "You can't equip more than 2 of this kind of cards"; unequip(EQI_HAND_R); } card_check += 1; end; "> OnUnequipScript: <" card_check -= 1; end; "> In that script, when card is equiped will add +1 to card_check variable and -1 when unequiped. If card_check variable is more or equal to 2, it will bring a message and unequip the weapon (in the assmption that card is equiped on a weapon). You can create groups of cards to have several conditions by creatin a new and different variable for every card group. However, the hard part is to make the proper unequip command to unequip the right gear, mostly because accesoryes can be equiped on two slots and assassins can equip weapons on both hands. To make it easy you can use nude() command so it will unequip everything, but remember to clear all the vars when that happen.
  14. Since normal instance maps has all of them an "@" in their name, you can use that for identify the instance maps using compare() script command. In example, give this script to the Giggling Box: Script: <" if (compare(strcharinfo(PC_MAP), "@")) announce "You are on an Instance Map.", bc_self; else announce "You aren't on an Instance Map.", bc_self; "> That script will compare if the string "@" is contained inside the string generated by strcharinfo(PC_MAP), so, if player is in an instance map (let's say 1@tower) it will return true (1) otherwise it will return false (0) when name doesn't have the "@" string.
  15. I'm not sure if can be possible of that, but an alternative that I can suggest is, if you are setting mf_zone by npc, use a temporary global variable to save the fact that you already setted that mapflag according to your needs, and then do the check over that variable.
  16. Just after the if( .@Amount ){ check, you can add a new check to verify weight: if (.@Amount) { if (checkweight(.@CoinID[.@i], .@Amount)) { #KAFRAPOINTS = #KAFRAPOINTS - ( .@Amount * 2 ); getitem .@CoinID[.@i], .@Amount; mes "Done"; } else { mes "You have no space on inventory."; } } Also, you need to avoid usage of set command, Set script command is deprecated and it may be remove in any future. Instead, set values directly in this way: .@i = 1; .@i = select(.@string$); .@i = .@a + .@b; Or, as in previous example: #KAFRAPOINTS = #KAFRAPOINTS - ( .@Amount * 2 ); It's easier and more clean. Also, I recommend you to put a space after a comma, since it is standard in Hercules and also makes the script more clean and more readable.
  17. You need to download first a copy of emulator on github web page: https://github.com/HerculesWS/Hercules. In there, hit the green button "Clone or download" and then in the button Download zip. That will bring you a clean copy of emulator, but you still needs to compile it so you can run it on windows (or linux if you want). To compile the emulator you can follow the next tutorial: Compiling - Hercules Wiki. You will need a compiler (it can be Visual Studio and you can download it from this page) and also a program to manage sql database (actually I use WampServer64) You can also download a pre-compiled emulator in Downloads section. When you have a compiled emulator, you can follow this other tutorial to set up your server: [ tutorial ] Preparing database ragnarok for pre-compiled Hercules
  18. There is not exactly a function to enchant an item, you should use getitem2() command to produce the item with the needed enchants. This is the usual process: Check if player has the gear to enchant, if not, finish the npc. Calculate the enchant to give (note 1) (Optional) Save the cards/refines attached to the gear to enchant (note 2) Delete required gear to enchant. Make the gear with getitem2 command and the enchants you want (and cards/refines as you need) Note 1. About calculate the enchant to give. Remember that "enchants" doesn't exist as that, they are cards that has a different sprite than the one from the cards. You can give any item you want as enchant, even an armor if you want. In example, Eden Group quest has a part where player can put cards (scorpion card and other) as an enchant to the weapons from Eden. Note 2. About saving the cards/refines attached to the gear. In some cases you may want to keep the cards or refines that gear has. When you delete it you will erase the actual refines or cards that gear has but you can put it again puting the according values in the getitem2() command. Use getequipcardid() and getequiprefinerycnt() script commands to store those values into variables to use in getitem2() command. Please check doc\script_commands.txt to know more about getitem2(), getequipcardid() and getequiprefinerycnt() script commands.
  19. I don't know wich one is the client that allows you to select the character gender in character creation window. However, you can use command changecharsex() on items or npcs to change sex for invoking character: *changecharsex; This command is exactly same as changesex, with an exception that, character sex will be changed instead of account sex. Requires client 2014-10-22 or greater.
  20. Ragno

    Need help

    Yes, sintaxis is correct. However, you are missing monster 1649 High Priest Magaleta mvp and I suggest you to put in in order from 1646 to 1651. It seems you are using pre-renewal since you decided to use value 7 for race. Value 7 stands for Scaraba subrace monsters and with that Queen Scaraba Card (4507) would have effect on that lhz03 subrace, only if you have implemented that card. You can add new races, but it seems it needs a src edition plus adding it to mob_race2_db.txt to add new races, because adding a new race (over 9 value) without src edition produces a warning in console. You may not have it since you are using value 7 that stands for scaraba subrace monsters. To add new races in src open src\map\map.h and search for the next values: enum { RC2_NONE = 0, RC2_GOBLIN, RC2_KOBOLD, RC2_ORC, RC2_GOLEM, RC2_GUARDIAN, RC2_NINJA, RC2_SCARABA, RC2_TURTLE, RC2_MAX }; Just after RC2_TURTLE add the new one and then recompile. Then, edit db\constants.conf in "Subraces" section to add the new constant for the new race and use it in your code instead of numeric value. However, if you are not planing to use Queen Scaraba Card at all, you can just use value 7 as you have. (Btw, try to put an space after the comma, since it is standard in Hercules )
  21. Los únicos mapas que recuerdo tienen un aspecto similar a una granja, podrían ser los de las carreras de hugel: Esos mapas son p_track01 y p_track02. Con tan pocos datos no sé si sea el que hayas visto.
  22. Ragno

    Need help

    Also, you can use bonus2 bAddRace2 script to set damage specifically to biolab 3 boss monsters. Just edit file db/{pre-}re/mob_race2_db.txt to add the new race with monster id of those boss monsters.
  23. You don't need to do any src edition. In db\sc_config.txt you can configure the behavior for every single status effect. By default, foods has this values: SC_FOOD_STR, 92 SC_FOOD_AGI, 92 SC_FOOD_VIT, 92 SC_FOOD_DEX, 92 SC_FOOD_INT, 92 SC_FOOD_LUK, 92 That means: 4 + 8 + 16 + 64 = 92 If you want to make them resist death, just change 92 to 93, adding the +1 flag:
  24. If any of them is possible, I would gladly help sending the sentences where noun gender is different when translated, or at least inform of them. -- I have another suggestion to help Huld to be knowed and experienced for more people. Would it be possible have the capability to load multiple .po files for a same language? The purpouse of this is to be able to add individual translations to individual scripts instead of modify main language.po file (wich is cool as it is). That would help players to experience huld system with events, custom scripts, or new script releases and let gms to maintain a secondary po file to custom npc from server individual from main emulator npcs. Also, since those files would be less sized, it would be more friendly to translate them, allowing scripters to introduce themselves to po editor more easily.
  25. It seems really hard to solve Since it was decided to not edit script to add gender context and have to stick to official syntax. Well, I guess the only solution would be to locally edit those sentences adding a simple space at the end of the string, with the gender check. Besides, for what I read, french and german languages also has gender differences for nouns, but I don't know too much about those languages.
×
×
  • Create New...

Important Information

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