Jump to content

nitrous

Developer
  • Posts

    141
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by nitrous

  1. StateIconList[EFST_IDs.EFST_PNEUMA] = { descript = { { "PNEUMA", COLOR_TITLE_BUFF }, { "Reduce variable cast time by 80%" } } } This should work, it's the same as one without time.
  2. in the StateIconList, remove the references to time.
  3. There are scripts in the tools directory, I think it's something like convert_sql.pl
  4. It should be NULL not NUL. Can you upload the file somewhere? How are you invoking main.sql? Through a tool like Workbench or on the command line?
  5. Well I'm dumb, I'm connecting to the wrong database. Please ignore this post.
  6. To make the automated build work. I split the mobdb and mobdrop tables in the database, which requires me to fix this script. The first SQL statement should return a list of letters in alphabetical order so that there exists at least one normal monster that drops a card that starts with that letter.
  7. Hey guys, looks like I need some help. I have 3 tables, mob_db_re, mob_drop_re, and item_db_re. mob_drop_re is created with this ddl statement: CREATE TABLE `mob_drop_re` ( `mobid` mediumint(9) unsigned NOT NULL default '0', `dtype` smallint(5) unsigned NOT NULL default '0', `index` smallint(5) unsigned NOT NULL, `nameid` smallint(5) unsigned NOT NULL default '0', `rate` smallint(9) unsigned NOT NULL default '0', `stealProtected` bool default false, `randomOptionGroup` text, PRIMARY KEY (`mobId`, `dtype`, `index`) ) ENGINE=MyISAM; I'm working on the card_seller in npc/custom/card_seller.txt, and I get an error at the first query_sql call. Here's the code: OnInit: if (checkre(0)) { .@mob_db$ = "mob_db_re"; .@mob_drop$ = "mob_drop_re"; .@item_db$ = "item_db_re"; } else { .@mob_db$ = "mob_db"; .@mob_drop$ = "mob_drop"; .@item_db$ = "item_db"; } freeloop 1; .@total = query_sql("SELECT DISTINCT LEFT(`name_japanese`, 1) AS alphabets FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_drop$ +"` ON `"+ .@mob_drop$ +"`.`nameid` = `"+ .@item_db$ +"`.`id` RIGHT JOIN `"+.@mob_db$ +"` ON `"+ .@mob_db$ +"`.`ID` = `"+ .@mob_drop$ +"`.`mobid` WHERE `"+ .@item_db$ +"`.`type` = 6 AND `name_english` LIKE '%_Card' AND ~(`MODE`) & 0x4000000 ORDER BY alphabets;", .alphabet$); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = query_sql("SELECT `"+.@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_drop$ +"` ON `"+ .@mob_drop$ +"`.`nameid` = `"+ .@item_db$ +"`.`id` RIGHT JOIN `"+.@mob_db$ +"` ON `"+ .@mob_db$ +"`.`ID` = `"+ .@mob_drop$ +"`.`mobid` WHERE `"+ .@item_db$ +"`.`type` = 6 AND `name_english` LIKE '%_Card' AND ~(`MODE`) & 0x4000000 AND LEFT(`name_japanese`, 1) = '"+ .alphabet$[.@i]+"' GROUP BY `name_japanese` ORDER BY `name_japanese` LIMIT 128;", .@id); npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 1000000; } freeloop 0; end; The script creates a sql statement as so: SELECT DISTINCT LEFT(`name_japanese`, 1) AS alphabets FROM `item_db_re` RIGHT JOIN `mob_drop_re` ON `mob_drop_re`.`nameid` = `item_db_re`.`id` RIGHT JOIN `mob_db_re` ON `mob_db_re`.`ID` = `mob_drop_re`.`mobid` WHERE `item_db_re`.`type` = 6 AND `name_english` LIKE '%_Card' AND ~(`MODE`) &0x4000000 ORDER BY alphabets; It works fine on MySQL Workbench, but produces an error when using it in the script: [SQL]: DB error - Unknown column 'mob_drop_re.nameid' in 'on clause' [Debug]: at script.cpp:16666 - SELECT DISTINCT LEFT(`name_japanese`, 1) AS alpha bets FROM `item_db_re` RIGHT JOIN `mob_drop_re` ON `mob_drop_re`.`nameid` = `ite m_db_re`.`id` RIGHT JOIN `mob_db_re` ON `mob_db_re`.`ID` = `mob_drop_re`.`mobid` WHERE `item_db_re`.`type` = 6 AND `name_english` LIKE '%_Card' AND ~(`MODE`) & 0x4000000 ORDER BY alphabets; [Debug]: Source (NPC): Card Seller at prontera (155,177) Can anyone help?
  8. Instead of sending the HP, you can send the SP. There's no way to send and show both hp/sp values on other players, so you can have a command to switch between the two.
  9. iirc, we solved it by updating the lua files. Just get them from the translation project
  10. Are you sure you didn't change it? https://github.com/rathena/rathena/blob/master/src/map/battle.c#L6378
  11. [SQL]: DB error - Unknown column 'last_mac' in 'field list' [Debug]: at script.cpp:16625 - SELECT `last_mac` FROM `login` WHERE `account_id` = '2000004' [Debug]: Source (NPC): Guild Master at prontera (203,135) [SQL]: DB error - Unknown column 'last_cpu' in 'field list' [Debug]: at script.cpp:16625 - SELECT `last_cpu` FROM `login` WHERE `account_id` = '2000004' [Debug]: Source (NPC): Guild Master at prontera (203,135) [SQL]: DB error - Unknown column 'last_motherboard' in 'field list' [Debug]: at script.cpp:16625 - SELECT `last_motherboard` FROM `login` WHERE `account_id` = '2000004' [Debug]: Source (NPC): Guild Master at prontera (203,135) These are because you haven't changed your login table to have `last_mac`, `last_cpu`, `last_motherboard`. [SQL]: DB error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `guild_package` WHERE `acc_id` = '2000004'' at line 1 [Debug]: at script.cpp:16625 - SELECT FROM `guild_package` WHERE `acc_id` = '2000004' [Debug]: Source (NPC): Guild Master at prontera (203,135) [SQL]: DB error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `guild_package` WHERE `claim_ip` = '180'' at line 1 [Debug]: at script.cpp:16625 - SELECT FROM `guild_package` WHERE `claim_ip` = '180' [Debug]: Source (NPC): Guild Master at prontera (203,135) These are because your SQL syntax is wrong. You need to use `SELECT * FROM blahblahblah`
  12. You can use addrid https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L3824-L3844 It will look something like this: addrid(0); variable = 0; detachrid(); query_sql( "DELETE FROM `char_reg_num` WHERE `key`='variable' " );
  13. You can try this diff. https://github.com/vstumpf/rathena/blob/playground/diffs/mob_hp_bars.diff
  14. Looks like you're using herc, not rA.
  15. When someone quits the game, the socket closes with EOF. This gets parsed in logclif_parse(login server), chclif_parse(char server), and clif_parse(map server). In the login server, when it reads EOF it just closes the socket. In the char server, if a character is already loaded, it might set the character offline, thereby saving the changes. In the map server, depending on how the client quits, it will either use map_quit, use clif_quitsave which calls map_quit, or nothing (in the case of autotrading).
  16. It can be done through source edits/additions. You would need to create a new timer function and make it trigger 5 minutes before the spawn of the monster. That function will send the announcement that the monster will spawn. In mob_setdelayspawn, you will have to check if the mob is an MvP, then call add_timer with the current tick of the server + spawn time - 5 minutes.
  17. 4359,B_Eremes_Card,Assassin Cross Card,6,20,,10,,,,,,,,2,,,,,{ if(Class != Paladin && Class != Champion) { bonus3 bAutoSpell,378,3,30; }},{},{} Try that.
  18. You either need to wait for Functor to respond or revert the update.
  19. You don't need visual studio on your vps, since you're not editing your code there. Follow the directions here: https://github.com/rathena/rathena#rathena
  20. This is the part of the code that's the problem: struct instance_db *db = instance_searchname_db(name); nullpo_retr(-1, db); The name you pass into instance_create is not being found in the instance database. EDIT: Looking further into this, the entry in instance_db.txt is incorrect. The correct format is: // ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,Map3,...,Map255
  21. I only showed you where the error was, you need to go in and remove the back tick from the beginning of the second query_sql line.
×
×
  • Create New...