Jump to content

Jey

Members
  • Posts

    249
  • Joined

  • Last visited

  • Days Won

    4

Community Answers

  1. Jey's post in HELP! CentOS 6.9 Compile Error was marked as the answer   
    Did you enable the devtoolset for this shell session with `scl enable devtoolset-7` before you execute the configure script?
    Usually this error is reported, if the g++ compiler is outdated (like nitrous already mentioned).
  2. Jey's post in Showing actual remaining time was marked as the answer   
    Try to use clif_displaymessage(fd, atcmd_output); after sprintf. sprintf only saves the formatted string into atcmd_output. With clif_displaymessage you send it to the client.
  3. Jey's post in SQL DB Error - Field 'ID' not exist in mapserver.exe (SOLVED) was marked as the answer   
    Looks like your 'id' field doesn't have a default value
    id normally has the auto_increment attribute: https://github.com/rathena/rathena/blob/master/sql-files/logs.sql#L170
    You either can add it by hand, or drop the table and re-add it.
  4. Jey's post in Usage of deprecated constant was marked as the answer   
    You need to convert those constants. We prepared a script for that. https://github.com/rathena/rathena/blob/master/tools/convert_emotions.py
    If you installed python3, you just need to run
    cd tools ./convert_emotions.py Related Pull Request: https://github.com/rathena/rathena/pull/2527
  5. Jey's post in Download a specific commit. was marked as the answer   
    git clone https://github.com/rathena/rathena.git rathena cd rathena git checkout <commit_hash>  
  6. Jey's post in 1:1 Chat- Can't get rid of Pop-Up was marked as the answer   
    Alt+H -> Friend List

    ^ Click the Magnifier at the bottom.

    ^ Disable the check boxes.
  7. Jey's post in Compiling on Linux is broken was marked as the answer   
    I'm not sure if we're currently supporting cmake. Please compile with make.
    ./configure make server  
  8. Jey's post in Crash in map server was marked as the answer   
    It's a known issue. We're working on it. For further informations, see https://github.com/rathena/rathena/issues/2359
    If you want to help us, please add a crash dump there.
  9. Jey's post in Mind Breaker Not Work, rAthena Last version was marked as the answer   
    > Hehe, the problem is over, I just add a mind-breaker skill in src / map / status.c
    I really recommend you to update your rathena fork. Mind Breaker is possibly not the only faulty status change.
  10. Jey's post in got error when compiling server on putty was marked as the answer   
    You need to install the g++ package.
    Related: https://github.com/rathena/rathena/issues/2127
  11. Jey's post in Applying diff patch in putty or linux was marked as the answer   
    Advice: Don't do it on the host. Prepare your changes locally and push them via git.
    Nevertheless you could use the commands git apply or patch. But if you encounter merge conflicts you'll have a bad time.
  12. Jey's post in Added Skills But Can't Learn It. was marked as the answer   
    Did you merge the summoner PR? (https://github.com/rathena/rathena/pull/1965)
    Afaik it's a known issue and aleos is working on it.
  13. Jey's post in Automated Database Backup was marked as the answer   
    #!/bin/bash usr="backup" pw="yoursqldbpassword" pw7z="your7zpassword" dbs=(rathena board website) date=$(date -I) for db in "${dbs[@]}" do filename="${db}/${db}_${date}.sql" echo "Dumping Database: $db ..." mysqldump -u $usr -p$pw $db > $filename # creates a sql dump tar cf - $filename | 7za a -si -p$pw7z ${filename}.tar.7z # compresses the dump # ncftpput -Vmu [email protected] -p ftp ftp.host.com / ${filename}.tar.7z # copy it to an ftp server rm $filename done I'm using something like this. I'd recommend to add an explicit database user for backups with read access only. And using 7zip is good for both compression and encryption of the data.
    To run it on a daily basis I'd recommend using a cronjob:
    30 5 1 * * cd ~/backup && ./backup_full.sh > /dev/null 2>&1 30 5 2-31 * * cd ~/backup && ./backup.sh > /dev/null 2>&1 Mine is split into two parts. backup.sh is the above script and dumps everything except the log database. It runs every day except the first day of the month. backup_full.sh also includes the log table and is run only once every month.
    dbs=(rathena rathena_log board website) # dbs entry in full_backup.sh  
    Keep in mind: A backup on the same host will not help you at all if the hard drive is broken.
     
    I'm also interested in other solutions, so keep on posting them
  14. Jey's post in map server was marked as the answer   
    You should alway have a local test server to investigate in bugs autonomously.
    Anyway I tried to use Feint Bomb from a Land Protector. The Skill simply fails. But jumping on a Land Protector works like a charm.
    So you could try to describe it in detail or just update your rathena version. This should fix the problem, too.
  15. Jey's post in Lucky Player Event was marked as the answer   
    Try to avoid using freeloop. The infinity loop is caused by a wrong condition:
    if ( getgmlevel() < 100 && !checkvending() ) { DetachRID(); continue; } This will detach every non GM (needs at least level 100) and non vending player. Better would be:
    if ( getgmlevel() > 0 || // ignores GMs checkvending() || // ignores Vender checkweight(32000,1) == 0 || // Checkweight failed checkidle() > 60 ) { // ignores AFK-Player (should also include venders) I just had a look in an own script. It's pretty much the same, but differs from the time (not every hour at minute zero). And it just waits ten seconds, if it fails.
    OnMinute00: //Damit das ein wenig interessanter wird, wird der Coin nicht genau zur vollen //Stunde ausgeteilt, sondern irgendwann innerhalb dieser Stunde. stopnpctimer; initnpctimer; setnpctimer(rand(0,3540000)); end; OnTimer3545000: stopnpctimer; query_sql "SELECT `account_id` FROM `char` WHERE `online` = '1' ORDER BY RAND() LIMIT 0,1",.@accid; if( getarraysize(.@accid) != 1 ) end; attachrid .@accid[0]; //Player attached if( checkweight(32000,1) == 0 || checkidle() > 60 || getgmlevel() > 0 ) { setnpctimer(3535000); //Evtl. Wird in 10 Sekunden jemand gefunden, der nicht afk ist. startnpctimer; end; } getitem 32000,1; switch(rand(17)) { case 0: announce "["+strcharinfo(0)+"] ist ein richtiger Glückspilz und findet einen Coin hinter "+((Sex)?"seinem":"ihrem")+" Sofa.",b_all; break; // [...] (Sorry in German, but you'll get the point)
  16. Jey's post in removing # on players was marked as the answer   
    > I see. How can I remove "storage" on @charcommands? it seems like it is a script bound command.
    > btw, I tried using [ true,false ] and it does not work before... 
    Can you be a bit more precise?
    If you want to disable the use of scriptbound charcommands just set the charcommand level to something higher than zero:
    *bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};  
  17. Jey's post in Item Effect Stacking Edit. was marked as the answer   
    Oh I just realized:
    *isequippedcnt is for counting cards only. Sorry didn't see it correctly. I thought it will count equipped items by a given nameid.
    So a command to count equipped items is missing. There are now other possible solutions:
    As I mentioned above change the equip loc of the accessory to either right or left. (easiest method) Write a custom script-command like *countequipped(<itemid>) (most efficient solution) Write a custom script-function by using getinventorylist to count equipped items. Example: # Careful! Not tested. function script countequipped { getinventorylist(); .@nameid = getarg(0,0); .@count = 0; for( .@i = 0; .@i < @inventorylist_count; .@i++) { if( @inventorylist_id[.@i] == .@nameid && @inventorylist_equip[.@i] > 0 ) .@count++; } return .@count; } Use countitem as a workaround for countequipped (Note: every inventory item will be counted)  
    Example DB entry for Clip:
    2607,Clip,Clip,4,30000,,100,,0,,1,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus bMaxSP,10; },{},{} #standard 2607,Clip,Clip,4,30000,,100,,0,,1,0xFFFFFFFF,63,2,136,,0,0,0,{ if( callfunc("countequipped",2607) > 1 ) { bonus bMaxSP,5; } else { bonus bMaxSP,10; } },{},{} If you're interested in using the command "countequipped", I'll create a pull request for it as a script command, since I wouldn't recommend the inflationary use of getinventorylist.
  18. Jey's post in Sql script was marked as the answer   
    # Removes all inventory items from all characters DELETE FROM `inventory`; # Removes inventory items from character 150000 DELETE FROM `inventory` WHERE `char_id` = 150000; # Sets group_id to 1 of account 2000000 UPDATE `login` SET `group_id` = 1 WHERE `account_id` = 2000000; Edit:
    Don't forget to backup your database.
  19. Jey's post in Storage Reduct was marked as the answer   
    I wouldn't recommend it to you. Even if it's safe to do it now, the behavior can change anytime and there will be no one who's going to test it in future rathena versions.
     
    So I'd do one of these:
    1. Reduce the items in the storage. You can save all "deleted" items in another table and give them to your players though a NPC or something like that.
    2. Test the current storage behavior. If it works advice your players to reduce their storage in the next ~3 weeks. Remove overtopping items from storages with more than 600 items after that time.
    3. Wait for this Pull: https://github.com/rathena/rathena/pull/1115. If this is merged you should be able to keep your 700 slot storage.
    4. Wait for this Pull: https://github.com/rathena/rathena/pull/1620. And move all overtopping to a premium storage.
  20. Jey's post in Linux vps was marked as the answer   
    https://rathena.org/wiki/Installation_(Debian)
  21. Jey's post in Need Help This Script was marked as the answer   
    I have no clue what you want to do with with script. But you can replace this big switch with something like this:
    OnInit:     //initialize arrays:     setarray .cedi_cards[0],4001,4424,4025,4143,...;     setarray .cedi_points[0],10,15,10,200,...;     //make sure to add 64 entries to these arrays //... set .@rand0to63,rand(64); set .@card,.cedi_cards[.@rand0to63]; //renamed .card$ to .@card /* .card$ is a string, you should use just .card or .@card instead. The same goes for the other integer variables. I'd also recommend to use .@scope variables here instead of an .npc variable. */ set .@points,.cedi_points[.@rand0to63]; //renamed .cedi_points$ to .@points set .@cname$,getitemname(.cedi_cards[.@rand0to63]); // renamed .cname$ to .@cname$ //...
  22. Jey's post in Fame through script was marked as the answer   
    script_commands.txt
    If you already tested it, there seems to be no script driven solution.So you should look for an example of raising fame in the src.
    Example for pharmacy_10 in src/map/skill.c:

    case 10: fame += battle_config.fame_pharmacy_10; // Success to prepare 10 Condensed Potions in a row //[...] if (fame) pc_addfame(sd,fame); The needed function is pc_addfame. Now you can simply create a script function like this:Add to src/custom/script.inc:

    /// Increases fame of the attached character /// /// addfame <fame points>; BUILDIN_FUNC(addfame) { int fame; struct map_session_data *sd = script_rid2sd(st); nullpo_retr(1, sd); //Player must be attached fame = script_getnum(st,2); if( fame < 0 ) { ShowError("addfame: Fame must be positive. (Fame=%d).\n", fame); return 1; } pc_addfame(sd,fame); return SCRIPT_CMD_SUCCESS; } Add to src/custom/script_def.inc:
    BUILDIN_DEF(addfame,"i"), Keep in mind that every job will get the fame points. Even if it's a High Wizard.
  23. Jey's post in script that select random member from a party was marked as the answer   
    np ^^
    Just attach to the player and use strcharinfo like this:
    set .@pid,getcharid(1); //Set Party Id getpartymember .@pid,2; //Get Party Information while(1) { //Loops until a Player gets the item     detachrid; //Detach from the first player     set .@pm_aid,$@partymemberaid[rand($@partymembercount)]; //Saves the Account ID of the random Member     if( attachrid(.@pm_aid) )     {         //Just to be sure he is in the same party and not logged with another character         if( getcharid(1) != .@pid )             continue;         //Online, attached and in the same party:         announce strcharinfo(0)+" has got the item.",bc_all;         getitem 502,1;         break;     } }
  24. Jey's post in PvP Player Stuck / Bug was marked as the answer   
    I think you're searching for the mapflag nosave:
  25. Jey's post in Reflect and card effects was marked as the answer   
    I think it's not official.
     
    Found an equal bugreport on hercules: http://hercules.ws/board/tracker/issue-7738-bbreakweapon-and-bbreakarmor-on-reflect-skillitem/?gopid=20585#entry20585
     
    Edit:
    It was fixed by malufett in src/map/skill.c
     
    He changed: (around Line 1617)
        if( attack_type&BF_WEAPON )     { // Coma, Breaking Equipment to:
        if( attack_type&BF_WEAPON && skill_id != CR_REFLECTSHIELD ) {         // Coma, Breaking Equipment But i still have no clue if this is really official behavior or not ^^
×
×
  • Create New...