Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. You should have the same number of column in the 2 tables insert into `charlog` select * from `char` where `char_id` = 150000 EDIT : you already solved it, forget it^^
  2. Run in mysql update login set birthdate = '0000-00-00'
  3. set .SecondExpanded,1; // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? (1: yes / 0: no) change the option under OnInit label or replace at the begining of the script if (Class > 4049 || Class == Job_Gunslinger) { mes "No more jobs are available."; close; }
  4. By default birthday value is 0000-00-00 in login table I don't get it. You want a menu "default value" ?
  5. prontera,150,150,5 script sdfghjhgfd 56,{ query_sql "select birthdate from login where account_id = "+ getcharid(3), .@birthdate$; mes "you know what? i'm a mind reader"; mes "I know you are a "+ ( Sex ? " handsome man" : " beautiful lady" ) +" born in ^ff0000"+ .@birthdate$ +"^000000."; mes "Your underwear color is.. what? ok i stop it"; next; if ( select( "Change my birthdate", "Bye" ) == 2 ) close; mes "Really? well tell me your new birthdate - format 0000-00-00 thanks"; input .@string$; next; explode( .@tmp$, .@string$, "-" ); if( getarraysize( .@tmp$ ) != 3 || getstrlen(.@tmp$[0]) != 4 || atoi(.@tmp$[0]) < 1 || getstrlen(.@tmp$[1]) != 2 || atoi(.@tmp$[1]) < 1 || getstrlen(.@tmp$[2]) != 2 || atoi(.@tmp$[2]) < 1 ) { mes "wrong format bye"; close; } query_sql "update login set birthdate = '"+ escape_sql( .@string$ ) +"' where account_id = "+ getcharid(3); mes "done"; close; }
  6. - script BG_Check_IP -1,{ OnInit: setmapflag "arena", mf_loadevent; set .whitelist$, "| 127.0.0.1 | 127.0.0.2 | etc"; end; // Trigger when a player enters a map with "loadevent" mapflag. OnPCLoadMapEvent: // Only run for map "arena". if (strcharinfo(3) != "arena") end; set .@my_ip$, getcharip(); if ( compare( .@my_ip$, .whitelist$ ) ) end; // Get list of accounts with attached character's IP address. set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+ .@my_ip$ +"'",.@aid); // Passed check if only the attached player is returned. if (.@size < 2) end; // Check all online characters using the IP address if they are on a Battlegrounds map. set .@self, getcharid(3); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { if (.@aid[.@i] == .@self) continue; if (attachrid(.@aid[.@i])) { if (compare(strcharinfo(3),"arena")) { set .@name$, strcharinfo(0); attachrid(.@self); message strcharinfo(0),"Character "+.@name$+" is already present in this map with your IP. Kicking...."; sleep2 2000; atcommand "@kick "+strcharinfo(0); end; } } } // Passed check. end; }
  7. A quick mod [paste=4zf2yxj5yh7q] You didn't specify the base level to change Lord Knight or Rune Knight (non trans) > Rune Knight (trans) so it's still 99
  8. Another way - script reset_all -1,{ OnInit: bindatcmd "resetall", strnpcinfo(3) + "::OnCmd",99,99; end; OnCmd: .@config$ = checkre(3) ? "prere" : "re"; .group_limit = ( atoi(.@atcmd_parameters$[0]) < 1 ) ? 99 : atoi( .@atcmd_parameters$[0] ); query_sql "update `char` set status_point = ( select points from `status_points_"+ .@config$ +"` where `status_points_"+ .@config$ +"`.`base_level` = `char`.`base_level` ), "+ "`str` = 1, `agi` = 1, `vit` = 1, `int` = 1, `dex` = 1, `luk` = 1 "+ "where online = 0 and account_id not in ( select account_id from login where group_id >= "+ .group_limit +" )"; announce "[GM] " + strcharinfo(0) + " reset all the stats.", bc_all; addrid 0; if ( getgroupid() < .group_limit ) resetstatus; end; } [paste=79h03exenzoq] [paste=cks0m5eejyj] This one instantly resets the stats and give the status points to all players (online/offline) below the specific group level (99 by default) ex @resetall 80
  9. - script sdfdfbng -1,{ OnPCKillEvent: if ( !getmapflag( strcharinfo(3),mf_gvg_castle ) ) end; dispbottom "You killed " + rid2name( killedrid ); attachrid killedrid; dispbottom "killed by " + rid2name( killerrid ); end; }
  10. prontera,150,150,5 script ihjbnik 56,{ set .@guild_id, getcharid(2); if ( !.@guild_id ) { mes "you are not in a guild"; close; } else if ( getguildmasterid(.@guild_id) != getcharid(0) ) { mes "I only talk to the guild master"; close; } mes "warp?"; next; if ( select( "yes", "no" ) -1 ) end; warpguild "prontera",161,181,.@guild_id; .click++; if ( .click%2 ) end; disablenpc strnpcinfo(3); enablenpc "your npc"; }
  11. 300*20=6000 pvariables https://github.com/rathena/rathena/blob/master/src/common/mmo.h#L58 #define GLOBAL_REG_NUM 256 ///Max permanent character variables per char ...
  12. You can do it with a query_sql select value, g.name from global_reg_value g left join `char` on `char`.char_id = g.char_id where g.`str` = 'num_rebirth' order by g.`str` limit 10 There is a lot of ranking on the forum.. do a copy/past. I mean I won't add the ranking on the npc. Do it yourself
  13. Capuche

    Support ROom

    or try this prontera,150,150,5 script need help 56,{ end; OnInit: set .gm_house$, "geffen";// your gm house mapwarp .gm_house$,"prontera",150,150; setmapflag .gm_house$, mf_loadevent; setmapflagnosave .gm_house$,"prontera",150,150; end; OnStart: warpwaitingpc .gm_house$,0,0; end; OnPCLogoutEvent: if ( strcharinfo(3) == .gm_house$ ) { if ( getgmlevel() > 0 ) { set .gm_in, .gm_in -1; if ( .gm_in == 0 ) delwaitingroom; } else { set .player_in, 0; waitingroom "need help?",2, strnpcinfo(3) +"::OnStart",1; } } end; OnPCLoadMapEvent: if ( getgmlevel() > 0 ) { if ( .gm_in == 0 ) waitingroom "need help?",2, strnpcinfo(3) +"::OnStart",1; set .gm_in, .gm_in +1; } else { set .player_in, 1; delwaitingroom; } end; } it's bothering to check if there is someone on the map with onpclogoutevent. Maybe a onpcunloadmapevent mod would be interesting
  14. Like in the bug tracker it seems you're stuck because you miss the F_InsertPlural function (line https://github.com/rathena/rathena/blob/master/npc/custom/events/mvp_ladder.txt#L26 ) I suggest to delete your current npc\other\Global_Functions.txt file then download a new one https://github.com/rathena/rathena/blob/master/npc/other/Global_Functions.txt
  15. prontera,150,160,5 script auto cmd 87,{ mes "you can enable yours commands on login"; next; while(1) { for ( .@i = 0; .@i < .size_cmd; .@i++ ) .@menu$ = .@menu$ + "[ " + ( auto_cmd & pow( 2,.@i ) ? "^00ff00ON" : "^ff0000OFF" ) + " ^000000] @" + .cmd_display_name$[.@i] + ":"; .@s = select( .@menu$ ) -1; auto_cmd = auto_cmd ^ pow( 2,.@s ); mes "ok what's next?"; .@menu$ = ""; next; } OnPCLoginEvent: if ( auto_cmd == 0 ) end; for ( .@i = 0; .@i < .size_cmd; .@i++ ) { if ( auto_cmd & pow( 2,.@i ) ) atcommand "@" + .cmd_display_name$[.@i]; } end; OnInit: setarray .cmd_display_name$[0], "autoloot", "commands"; .size_cmd = getarraysize( .cmd_display_name$ ); } or http://rathena.org/board/topic/92360-utility-onpclogin-gm-settings/?p=243632 http://rathena.org/board/topic/76131-login-commands/?p=166229
  16. http://rathena.org/board/tracker/issue-8709-mvp-ladder-game/
  17. Well, the script never use the variable for the reward, set the variable after onpcloginevent OnPCLogin.... setarray .@D_Prize[0],673,675,671,12103; //Set to desired item prizes setarray .@D_Amt[0],100,50,10,1; //Amount of prize to be given set .@Serv_Name$,"Tairyu Ro"; //Set to your server name EDIT : Code seems to be broken ??
  18. Then try the npc of Brian that will count the status points http://rathena.org/board/topic/70252-anti-cheat-stats/?p=183729
  19. The item id is in `nameid` not in `id` prontera,150,150,5 script iuniono 488,{ if ( getgmlevel() < 99 ) end; mes "item id to delete?"; input .item_id; close2; query_sql "DELETE FROM `inventory` WHERE `nameid` = '"+ .item_id +"'"; query_sql "DELETE FROM `cart_inventory` WHERE `nameid` = '"+ .item_id +"'"; query_sql "DELETE FROM `storage` WHERE `nameid` = '"+ .item_id +"'"; query_sql "DELETE FROM `guild_storage` WHERE `nameid` = '"+ .item_id +"'"; addrid 0; delitem .item_id, countitem( .item_id ); end; }
  20. We can't access to the content of the link however... maybe this? http://rathena.org/board/topic/65641-achivement-system-with-no-source-edit/?hl=achievement http://rathena.org/board/topic/56410-achievement-system/?hl=achievement
  21. Capuche

    * 92 : while(getarraysize(getd(".@item"+@i)) > @w) { set .@itemw$,.@itemw <------------ // issue here ; the console say parse_line: need ';'
  22. For a password in a chatroom you need source mod but in a npc prontera,180,180,5 script name 74,{ .@passwrod$ = "ojinioj"; input .@test$; if ( .@test$ != .@password$ ) end; warp "inhuionh",0,0; }
×
×
  • Create New...