Jump to content

KirieZ

Core Developers
  • Content Count

    234
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by KirieZ

  1. This format seems to be from phpmyadmin/mysql, am I right? Hercules doesn't support sql item_db, you must edit <herc_folder>/db/re/item_db.conf or <herc_folder>/db/pre-re/item_db.conf instead. (according to your server settings) Hope this helps!
  2. maybe you can do it using bindatcmd? Doc: https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L7771
  3. You have to force push git push origin <your branch> --force
  4. try 20151029 but uncomment this: //#define ENABLE_PACKETVER_RE
  5. KirieZ

    SetQuest2

    heheehh thanks So I'll make a PR of it soon
  6. KirieZ

    SetQuest2

    This seems like a great idea, I'll try something when I get some free time, no promises though
  7. KirieZ

    SetQuest2

    Yes, iRO is using that, actually I got the idea of making this plugin after writting the iRO xmas quest, where they reset the quest at 4am. About HUNTING I think it's not possible as the entry of player's quest contains only the count, unless you add extra columns to quest table and some other changes, and PLAYTIME is just what my plugin currently does, right?
  8. KirieZ

    SetQuest2

    SetQuest2 View File NOTE: This functionality got merged into Hercules (check setquest and getcalendartime). That being said, I'm NOT maintaining this plugin anymore. Hello, This plugin adds the setquest2 script command that allows you to add a quest with your own time limit, ignoring the one in quest_db, thus allowing you to, for example, make a quest end at a determined time next day independently of when it was originally given. *setquest(<ID>,<Time Limit>)Place quest of <ID> that will expire at <Time Limit> in the users quest log, the state of which is "active". Examples: - Ask the player to come back in a random number of minutes (1 ~ 3) prontera,150,150,4 script SetQuest2 1_m_01,{ .@p = questprogress(7128,PLAYTIME); if (.@p == 1) { mes "Come back later!"; } else { if (.@p == 2) { mes "You came back!"; getitem Red_Potion, 1; erasequest 7128; } .@i = rand(1, 3); mes "Come back in " + .@i + " minutes"; setquest2 7128, gettimetick(2) + (.@i * 60); } close;} - Ask the player to come back tomorrow (next day at 00:00) prontera,150,152,4 script SetQuest2b 1_m_01,{ .@p = questprogress(7126,PLAYTIME); if (.@p == 1) { mes "Come back later!"; } else { if (.@p == 2) { mes "You came back!"; getitem Red_Potion, 1; erasequest 7126; } .@i = 86400 - gettimetick(1); mes "Come back tomorrow"; setquest2 7126, gettimetick(2) + .@i; } close;} If you find any bug let me know. Submitter KirieZ Submitted 02/22/17 Category Plugins  
  9. KirieZ

    SetQuest2

    Version 1.0

    36 downloads

    NOTE: This functionality got merged into Hercules (check setquest and getcalendartime). That being said, I'm NOT maintaining this plugin anymore. Hello, This plugin adds the setquest2 script command that allows you to add a quest with your own time limit, ignoring the one in quest_db, thus allowing you to, for example, make a quest end at a determined time next day independently of when it was originally given. *setquest(<ID>,<Time Limit>)Place quest of <ID> that will expire at <Time Limit> in the users quest log, the state of which is "active". Examples: - Ask the player to come back in a random number of minutes (1 ~ 3) prontera,150,150,4 script SetQuest2 1_m_01,{ .@p = questprogress(7128,PLAYTIME); if (.@p == 1) { mes "Come back later!"; } else { if (.@p == 2) { mes "You came back!"; getitem Red_Potion, 1; erasequest 7128; } .@i = rand(1, 3); mes "Come back in " + .@i + " minutes"; setquest2 7128, gettimetick(2) + (.@i * 60); } close;} - Ask the player to come back tomorrow (next day at 00:00) prontera,150,152,4 script SetQuest2b 1_m_01,{ .@p = questprogress(7126,PLAYTIME); if (.@p == 1) { mes "Come back later!"; } else { if (.@p == 2) { mes "You came back!"; getitem Red_Potion, 1; erasequest 7126; } .@i = 86400 - gettimetick(1); mes "Come back tomorrow"; setquest2 7126, gettimetick(2) + .@i; } close;} If you find any bug let me know.
  10. sorry , i don't know its was my bad or not but in my client i think its has a problem when i try to right click on other character. it's doesn't show any c-code screenHercules000.jpg Ah, right, this might be fixed when my Pull Request is merged: https://github.com/HerculesWS/Hercules/pull/1567
  11. What exactly C-Code does? Sorry I thought it was only a code for you to check if it was really a friend or something like that. What is broken on it?
  12. KirieZ

    NpcTalk2

    View File NpcTalk2 NOTE: Hercules now provides this functionality by itself (check unittalk). I'm not updating this anymore. Hello, When converting iRO's Xmas event I missed a way to use npctalk to a specific player, so today I made it. This plugin adds the npctalk2 script command that allows you to show a message like npctalk, but to a specific player only (by default the one attached to the script). *npctalk2("<message>"{, "<npc name>",{"player name"}})This command will display a message to the a target player as if the NPC object running it was a player talking - that is, above their head and in the chat window. The display name of the NPC will get appended in front of the message to complete the effect.If NPC Name is given, the message will display on this npc's instead.If Player Name is given, the message will be displayed to that player instead of the attached one (if he's online)If the player is too far from the NPC (for example, in another map), the message will only show in the chatbox. Usage Example: Assumming it's running in a NPC named Test and that there's a NPC named Test2 near.// Will display "I'm only talking to <Attached Player Name>" only to the attached player over NPC Testnpctalk2 "I'm only talking to "+strcharinfo(0);// Will display "I'm only talking to KirieZ" to player named KirieZ over NPC Testnpctalk2 "I'm only talking to KirieZ", "Test", "KirieZ";// Will display "Don't bother my friend, I'll talk to you" to the Attached player over NPC Test2npctalk2 "Don't bother my friend, I'll talk to you", "Test2"; If you find any bug let me know. Submitter KirieZ Submitted 02/04/17 Category Plugins  
  13. KirieZ

    NpcTalk2

    Version 1.0

    101 downloads

    NOTE: Hercules now provides this functionality by itself (check unittalk). I'm not updating this anymore. Hello, When converting iRO's Xmas event I missed a way to use npctalk to a specific player, so today I made it. This plugin adds the npctalk2 script command that allows you to show a message like npctalk, but to a specific player only (by default the one attached to the script). *npctalk2("<message>"{, "<npc name>",{"player name"}})This command will display a message to the a target player as if the NPC object running it was a player talking - that is, above their head and in the chat window. The display name of the NPC will get appended in front of the message to complete the effect.If NPC Name is given, the message will display on this npc's instead.If Player Name is given, the message will be displayed to that player instead of the attached one (if he's online)If the player is too far from the NPC (for example, in another map), the message will only show in the chatbox. Usage Example: Assumming it's running in a NPC named Test and that there's a NPC named Test2 near.// Will display "I'm only talking to <Attached Player Name>" only to the attached player over NPC Testnpctalk2 "I'm only talking to "+strcharinfo(0);// Will display "I'm only talking to KirieZ" to player named KirieZ over NPC Testnpctalk2 "I'm only talking to KirieZ", "Test", "KirieZ";// Will display "Don't bother my friend, I'll talk to you" to the Attached player over NPC Test2npctalk2 "Don't bother my friend, I'll talk to you", "Test2"; If you find any bug let me know.
  14. yeah, it's, I can't code it at moment, but you can do it by making two extra arrays, one with the minimun and another with the maximum reward, then just use rand(min[.@j], max[.@j]). example: setarray .min[0], 1, 5; setarray .max[0], 2, 7;
  15. setarray .ItemIds[0], 2321, 2403; setarray .rewards[0], Red_Potion, White_Potion; getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++ ) { // Loop through the entire inventory if ( @inventorylist_equip[.@i] == 0 ) { // Item should not be equipped for (.@j = 0; .@j < getarraysize(.ItemIds); .@j++) { // Check if it's a rewardable item if (@inventorylist_id[.@i] == .ItemIds[.@j]) break; } if (.@j < getarraysize(.ItemIds)) { // If it's delitem @inventorylist_id[.@i], @inventorylist_amount[.@i]; // delete item getitem .rewards[.@j], @inventorylist_amount[.@i]; } } }
  16. Ah, right, I thought you wanted to exchange everything. You can make 2 arrays, one with Item Ids (e.g.: setarray .itemIds[0], 2321, 2403;) and one with "rewards" (e.g.: setarray .rewards[0], Red_Potion, White_Potion;) then instead of checking the type ( getiteminfo(<ID>, 2) ) you check if this item is in .ItemIds, if it's, get its index, then you can exchange it for the reward. something like: for (.@j = 0; .@j < getarraysize(.ItemIds); .@j++) { if (@inventorylist_id[.@i] == .ItemIds[.@j]) break; } if (.@j < getarraysize(.ItemIds)) { // This item reward is .rewards[.@j] // delitem/getitem } else { // This item is not rewardable }
  17. You can make everything inside 1 for loop, going through the entire inventory and checking the item type example: (I didn't test this code) getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++ ) { // Loop through the entire inventory if ( @inventorylist_equip[.@i] == 0 ) { // Item should not be equipped if ( getiteminfo(@inventorylist_id[.@i], 2) == 5 ) { // Item is an armor type .@count01 += @inventorylist_amount[.@i]; // add to .@count01 delitem @inventorylist_id[.@i], @inventorylist_amount[.@i]; // delete item } } } // Now we went through all items, get .@count01 red potions getitem 501, .@count01;
  18. Sorry for the delay, I didn't see your edit. You can see the documentation here: https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L7549
  19. its okay sir thank you for reply i understand you pretty well but sir uhhmm is there any tutorial if how can i make it by myself so i can make the images with each stage ?? thank you I don't think there's a tutorial about that, but you can get some ideas of how to code it from the lucky spin that we did some time ago, it uses pretty much the same idea, except that it doesn't change day by day: http://herc.ws/board/topic/10412-request-a-daily-lucky-spin-like-this/?p=62450 Basically you can show 1 image per time, so you have to make all possible displays as images, eg: - daily_1.bmp : day 1 box open, and rest closed - daily_2.bmp : day 1 and 2 boxes open and rest closed - daily_3.bmp : day 1, 2, 3 open, rest closed and so on. then you check the day and show the right image with the cutin command To make the image, create a base image with all boxes closed, then you replace the first one with the prize, save, replace the second, save, and repeat until all boxes are replaced by prizes (last day)
  20. This cashshop is from the newer clients (RagexeRE 2013 and newer I think), to setup it use db/cashshop_db.conf. About the daily login, there's one here in herc download area: http://herc.ws/board/files/file/299-ragnarok-online-daily-reward-psd-only/ if you want to make it by yourself you just need to make some images with each stage of it (all box closed, box1 open, box1 and 2 open, and so on) and display them together with a script that handles daily login.
  21. The problem is at: if(.@atcmd_parameters$[1]) if expression must result in a number (0 for false or other numbers for true) and there you're giving it a string (notice the $). I'm not sure what you're trying to compare there, but a example would be: if(.@atcmd_parameters$[1] == "1") // runs if parameters[1] is equal to 1 Maybe you're trying to check if the parameter exists? It would probably be better to use .@atcmd_numparameters instead. Example: if (.@atcmd_numparameters == 2) // So parameters[0] and parameters[1] exists Hope this helps
  22. I mean, in your for loop, you have these two lines: .@refine$[ getarraysize( .@refine$ ) ] = @inventorylist_refine[ .@i ]; .@card1$[ getarraysize( .@card1$ ) ] = @inventorylist_card1[ .@i ]; note that you're using [ ] so .@refine$ and .@card1$ are arrays, then, on getitem2, you're doing: getitem2 5162,1,1,.@refine$,0,.@card1$,0,0,0; so you're passing arrays ( .@refine$ and .@card1$ ) in an parameter that expects a value. As far as I know getitem2 doesn't accept arrays as parameter. If you want to create multiple items (as it seems so), you should do a for loop with getitem2, like that: for (.@i = 0; .@i < getarraysize(.@card1$); .@i++) { getitem2 5162,1,1,.@refine$[.@i],0,.@card1$[.@i],0,0,0; } or you can do everyting in one loop (maybe it was what you're trying to do?) next; getinventorylist; for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){ if ( @inventorylist_id[ .@i ] == 5162 ) { // Slotted bone helm .@refine$ = @inventorylist_refine[ .@i ]; .@card1$ = @inventorylist_card1[ .@i ]; getitem2 5162,1,1,.@refine$,0,.@card1$,0,0,0; } } (note that in this case I've replace [getarraysize(.@refine$)] by just .@refine$)
  23. Shouldn't this if have a { } ? for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1) { if ( @inventorylist_id[ .@i ] == 5162 ) { // Slotted bone helm .@refine$[ getarraysize( .@refine$ ) ] = @inventorylist_refine[ .@i ]; .@card1$[ getarraysize( .@card1$ ) ] = @inventorylist_card1[ .@i ]; } } the way it's, .@card1 is being set in every iteration, not only in the bone helm one. And you're using .@refine$ and .@card1$ as arrays inside the for and at getitem you're not, maybe you forgot something there? Hope this helps
  24. I think that the old subnet_athena is now on network.conf on lan_subnets. You probably only have to modify packets.h if you have changed your client's default encryption keys
×
×
  • Create New...

Important Information

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