Jump to content

Brian

Members
  • Posts

    2223
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by Brian

  1. "When a player logs in, if they are not on their save map, then warp them to save point." - script nosave_if_not_town -1,{ OnPCLoginEvent: if (strcharinfo(3) != getsavepoint(0)) { warp "SavePoint",0,0; } end; } "When a player logs in, if they are not a map with the town mapflag, warp them to their save point." - script nosave_if_not_town -1,{ OnPCLoginEvent: if (getmapflag(strcharinfo(3),mf_town) == 0) { warp "SavePoint",0,0; } end; } --> "When a char logs out, put them back at their save point (so they will be there next time they login." Edit your /trunk/conf/mapflag/nosave.txt and replace it with this: (this includes all the maps except those in town.txt)
  2. Add the 'nosave' mapflag to all the maps where you want them to be back in town if they relog.
  3. Fixed, sorry about that.
  4. Correct, in Ragnarok News Default sort key = Topic start date Default sort order = descending
  5. Did you know that SELECT can select more than one column?! For example, these 7 queries could be combined into one: query_sql "SELECT `userid` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc1$; query_sql "SELECT `user_pass` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc2$; query_sql "SELECT `sex` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc3$; query_sql "SELECT `email` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc4$; query_sql "SELECT `group_id` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc5$; query_sql "SELECT `lastlogin` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc6$; query_sql "SELECT `last_ip` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc7$; query_sql "SELECT `userid`,`user_pass`,`sex`,`email`,`group_id`,`lastlogin`,`last_ip` " + "FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc1$, .@whoisacc2$, .@whoisacc3$, .@whoisacc4$, .@whoisacc5$, .@whoisacc6$, .@whoisacc7$;
  6. // http://rathena.org/board/topic/58835-done-request-ip-check/page__view__findpost__p__80798 // Checking I P when entering a Map and kick if dual .. example map bat_room - script Only1perIP -1,{ OnPCLoadMapEvent: set .maps$, "bat_room,anothermap,etc"; set .@my_map$, strcharinfo(3); // check if they are on a "1-per-IP" map if (compare(","+.maps$+"," , ","+.@my_map$+",")) { // look for other online players from the same IP query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id " + "WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") " + "AND `char`.online=1 AND login.account_id!="+getcharid(3), .@account_id; for (set .@i,0; .@i<getarraysize(.@account_id); set .@i,.@i+1) { // check if other online players are on the same map getmapxy .@map$,.@x,.@y, 0, rid2name(.@account_id[.@i]); if (.@map$ == .@my_map$) { // kick the new player arriving to map set .@name$, strcharinfo(0); announce "Sorry, only 1 char per IP can be on this map at a time.", bc_self; sleep 1000; atcommand "@kick " + .@name$; } } } end; } bat_room mapflag loadevent To add more maps: 1. add it to this string set .maps$, "bat_room,anothermap,etc"; 2. and add the 'loadevent' mapflag on that map <map name> mapflag loadevent
  7. In /src/map/clif.c search for clif_parse_GuildBreak (line 12043). Change that whole function to this: /// Request to delete own guild (CZ_REQ_DISORGANIZE_GUILD). /// 015d <key>.40B /// key: /// now guild name; might have been (intended) email, since the /// field name and size is same as the one in CH_DELETE_CHAR. void clif_parse_GuildBreak(int fd, struct map_session_data *sd) { if( map[sd->bl.m].flag.guildlock ) { //Guild locked. clif_displaymessage(fd, msg_txt(228)); return; } if (agit_flag || agit2_flag) { clif_displaymessage(fd, "You can't break guild during WoE."); return; } guild_break(sd,(char*)RFIFOP(fd,2)); }
  8. Brian

    CeresCP

    This has already been committed to the SVN, thanks again for the patch Xantara! http://sourceforge.net/apps/trac/cerescp/changeset/117/
  9. Brian

    CeresCP

    Sorry, there are currently no plans for this.
  10. Brian

    CeresCP

    Or press Back and edit it at the previous screen (the Installer Script).
  11. So we can be like @ping 0 ms "my test server (127.0.0.1) has amazing ping!"
  12. Is the error saying the configure script is not executable? This wiki page explains how to fix that: Configure#Setting_executable_bit chmod +x ./configure
  13. Instead of a source edit, you can just add a check in the script. if ((eaclass() & EAJ_UPPERMASK) == EAJ_BARDDANCER) { mes "Sorry, " + jobname(Class) + "s are not allowed to change sex."; } else { // proceed with sex change } close;
  14. Did you know that by using the correct SVN Properties, you can host patches (and pretty much any static content) from a svn repository! Any recommendations for free SVN hosting? here are a few: Assembla, GoogleCode, SourceForge Here are some of the common SVN Properties you'll need to use: HTML files = svn:mime-type=text/html plain text (like your patchlist) = svn:mime-type=text/plain .gif images = svn:mime-type=image/gif .ico images = svn:mime-type=image/x-icon .jpg images = svn:mime-type=image/jpeg .png = svn:mime-type=image/png patch files (.thor .gpf .grf and any other binary files) = svn:mime-type=application/octet-stream
  15. I think you could create a command like @reset_dar that uses pc_setaccountreg(sd, "dar_dar", 0); then to use it on other players: #reset_dar PlayerName. If you don't want to edit the source, you could make a script that GMs can whisper the name of a player, then the script resets the player's variable. - script reset_dar -1,{ OnWhisperGlobal: if (getgroupid() < 99) end; set .@AID, playerattached(); set .@name$, @whispervar0$; mes "[dar_dar reset]"; mes "Do you want to reset the Dar Dar quest for " + .@name$ + "?"; if (select("Yes:No")==2) close; // check if player exists if (query_sql "SELECT char_id,account_id FROM `char` WHERE `name`='"+escape_sql(.@name$)+"'", .@char_id, .@account_id) { // if player is online ... if (isloggedin(.@char_id, .@account_id)) { if (attachrid .@account_id) { set dar_dar, 0; attachrid .@AID; mes "Dar Dar quest reset for " + .@name$ + "."; } } else { // offline - delete variable from SQL query_sql "DELETE FROM global_reg_value WHERE char_id="+.@char_id+" AND `str`='dar_dar'"; mes "Dar Dar quest reset for " + .@name$ + "."; } } else { mes "Player not found."; } close; }
  16. I just tested on Firefox 10.0.2 and was unable to reproduce this issue. Can you try: hard refresh the page (Ctrl+F5) clear your browser's cache (Ctrl+Shift+Del), pick time=Everything and check cache
  17. Thanks Jman! Thanks everyone!
  18. Set the variable to 0, which is the equivalent of deleting the variable. set dar_dar, 0;
  19. checkweight will check this for you. If their inventory is full, checkweight() will return 0.
×
×
  • Create New...