Jump to content

KirieZ

Core Developers
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by KirieZ


  1. 52 minutes ago, Hamburglin said:

    Perfect, this is where my mind was going next. What is the point of the db here then? Just to query data?

     

    While I have you here. two more things:

    1. Where would I of actually read up on to learn this? I couldn't find this in the wiki.

    2. I've only imported pre-re items into my db, but now I realize this must not have any effect. How do I make my server pre-re?

     

    These sql files are kept to be used by control panels (like FluxCP).

    1) Are you using the Github's wiki or the old one? You can check there: http://herc.ws/wiki/Main_Page ; Also you can find a lot of documentation in hercules' docs folder. Other than that probably around the forums or asking a new question.

    2) To make your server pre-renewal you have to change the following line in src/config/renewal.h and recompile:
    Find:

    //#define DISABLE_RENEWAL

    Change to:

    #define DISABLE_RENEWAL

    Once you recompile your server will be running in pre-renewal mode :)


  2. i hope to see a PR for this too, this is required for some official behavior. Not lying - I put you in my harem

     

    +1 for you for all your work, thank you a lot

    heheehh thanks :D

    So I'll make a PR of it soon


  3. This is a very cool command, it gives a lot of new chances and also I remember have seen on iRO that quest delay wasn't fixed on some new quest, instead delay was from until specific hour (changes if quest was seted in different hour).

     

    I have a suggestion, would be possible to add an option to change PLAYTIME or HUNTING? I mean, have an option to set hunting quest to specific monsters without needing to add new quest entryes to each monster/quantity of monsters.

    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?


  4. 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.


     


  5.  

    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?

     

    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

     

    attachicon.gifscreenHercules000.jpg

    Ah, right, this might be fixed when my Pull Request is merged: https://github.com/HerculesWS/Hercules/pull/1567


  6. 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.


     


  7. 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;
    

  8. 
    

    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];

    }

    }

    }


  9. 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
    }
    

  10. 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;
    

  11.  

    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.

    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)


  12. 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.


  13. 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


  14. 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$)


  15. 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


  16. First, import the logs.sql to ragnarok database, or you have to change the settings to load logs from other database.

     

    And, do you have an account with username 'testid', password 'testpass' or whatever you put in this part of char-server.conf and map-server.conf:

    // Server Communication username and password.
    userid: "testid"
    passwd: "testpass"  

    and sex 'S' on your login table? If not, you have to create it.


  17. Quando monto a minha, apenas para usar localmente, costumo fazer o seguinte:

    Com isso acredito que a pasta fica bem limpa e com o básico que você precisa para rodar o servidor, se for para abrir para jogadores, a mudança seria transformar a pasta data em uma grf.

     

    Espero ter ajudado.

×
×
  • Create New...

Important Information

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