Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. //Initialization of the Rewards add_item(8042,1,1,"Vote Token Exchanger");every 1 votes point from `cp_v4p_voters` gives you 1 Item ID 8042 ...hmm, I'm sure there must be a guide somewhere in this forum tells you how to set this stuffs ..
  2. in fact, all 3 answers are correct one my 1st one on post#2, only correct if .@BuildCount = 4 but on post#3 and post#4 can delete the entries no matter how many your .@BuildCount is all correct answer just using different command like I said in other topic if there are more than 1 scripter replied to your topic it also means more than 1 answer/solution to your question
  3. this is Q&A event ... I think many event GM loves to host this event by setting up a chat room with password enabled if a player successfully guessed the password correctly by join in the GM chat room, GM will reward the player manually by trade I remember seeing this script somewhere in eathena forum ... let me dig it oh yes http://www.eathena.ws/board/index.php?showtopic=192495&hl=password seems to be still working fine ...
  4. @nanakiwurtz I am a chinese so I can understand what she is saying is it possible to create a sql table, the user_id and password column limited to A-Z alphabets and numeric numbers only ?I know PHP can use Regular Expression to do something like this, but is it possible for MySQL to create a column field with this setting I think her server is chinese based, but she just post here to double confirm MySQL can do this check or not create table aaa ( id int(11) primary key, value nvarchar(100) ); select * from aaa; drop table aaa;tested, I still can input ~!$#&* to store the datavarchar also seems can store ~!$#&*
  5. what happens if you have 3 knife in the inventory 1 knife refine +0 1 knife refine +5 1 knife refine +10 how do you want it to work ?
  6. atcommand "@storeall"; ... I am sure players can purposely filled their storage with junks to bypass this system ... but, its a nice script though RWC ... I see I think your entrance NPC script would have another check with getinventorylist... right ?
  7. - script AutoFunEvent -1,{ //OnInit: OnClock2000: OnClock2100: initnpctimer; addrid 0; if ( getgmlevel() < 20 && !checkvending() ) { setd ".aid"+ .aidcount, getcharid(3); .aidcount++; } end; OnTimer1: if ( !.aidcount ) end; .@rand = rand( .aidcount ); announce rid2name( getd(".aid"+ .@rand) ) +" won in Lucky Pick Event.", bc_all; getitem 675, 1, getd(".aid"+ .@rand); .aidcount = 0; stopnpctimer; end; }seems like a cheap hackperhaps it can be improve
  8. no.1 bug I found is $prace_bidders is actually an array inside the OnInit: do deletearray $prace_bidders instead of set it 0 .. no.2 bug is you changed prace_playing into @prace_playing means if the one who 1st placed the betting log out, the rest won't get the price for(set .@i,0; .@i < (getarraysize($prace_bidders)); set .@i, .@i + 1){ if(attachrid($prace_bidders[.@i])){ if (@prace_playing!=1) end; ....... }it ends the script immediatelymaybe change it to continue; might work no.3 have you try login 2 accounts and start the bet with both of them ? it seems this script start the npc timer THE MOMENT ANY PLAYER placed their bets I thought, an event script like this, the npc timer shouldn't be controlled by the players, but from OnClock something ... even if you want to do it that way, you should use a npc variable .start or something and check if the event has already started or not... haiz ... I don't understand why the timer is set to 60000 for registration and set to 0 when the race going to start ... really made me misunderstood that part, I don't think any normal scripter will want to script it this way ... hmm .. too unoptimized ... to read ... nvm ... reading this script seriously hurting my eyes ... how come you can get the race started ? the startnpctimer is located inside a function, and I thought npc timer has to be on the npc itself ? <-- not tested tested ... can ... wtf ... I just know about this ... I used *sleep too much <.< seriously ... I would rather rewrite the whole script than just keep guessing where the bug come from the labels jump here and there makes this script seriously hard to read I getting this error after finally get the race started [Error]: script:run_func: C_ARG not found. please report this!!! [Debug]: Source (NPC): Poring#prace1 at cydonia (103,54)dunno what kind of error is thisbut don't feel like debug this script anymore I would prefer that you translate the script made by Masao instead of using this hard to read script
  9. there is a typo with your @prace_winner$ ... or issit prace_winner$ ? inside Checker#prace0 npc the variable is prace_winner$ but inside Bidder#prace0 npc the variable become @prace_winner$ ?
  10. seems like you have edited the script, post it
  11. hahahaha ~~~ !!! emistry wanna play with me, me happy <3 delete from global_reg_value where str regexp '^Build_[0-9]*(n)?.$$';
  12. http://rathena.org/board/topic/73169-player-checker-npc/?p=150668 http://www.eathena.ws/board/index.php?showtopic=268999 actually if you have indexed the `char_id` column in `char_bg` table, you can actually do a JOIN statement set .@nb, query_sql( "select `char`.name, char_bg.win, char_bg.lost from char_bg left join on `char` where `char`.char_id = char_bg.char_id order by char_bg.win desc limit 10", .@name$, .@win, .@lost ); I just prefer to do like that because I don't need to remember or look for the table has been indexed properly or not so if you didn't indexed that table, my syntax will perform the search faster than this join ones in your case, the `win` column from `char_bg` table should be indexed
  13. if you mean character creation, by looking in the source code which it uses strchr to limit the charactersso it seems like SQL doesn't do the limit character operation, its in the source code do it http://dev.mysql.com/doc/refman/5.5/en/string-types.html I have read the documentation ... maybe it can't if you want to limit it from npc script, keyworld released the script style string manipulation command http://www.eathena.ws/board/index.php?showtopic=204303&hl= which I think you can crack it he used compare on all variables from the .@char$ array if ( .@i == .@charsize ) -> then it is not a character in the array
  14. set .@nb, query_sql( "select char_id as aaa, ( select name from `char` where char_id = aaa ), win, lost from char_bg order by win desc limit 10", .@char_id, .@name$, .@win, .@lost ); mes "^0000FF[ BG Ranking ]^000000"; for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 ) mes "^0000FF"+ (.@i+1) +": ^006699"+ ( ( getstrlen( .@name$[.@i] ) )? .@name$[.@i] : "None" ) +"^000000 ^00AA00W["+ .@win[.@i] +"]^000000 ^FF0000L["+ .@lost[.@i] +"]^000000";
  15. confirm this bug happens when ( a noob ) who didn't read the map-server.exe error prontera,151,171,4 duplicate(mission_board) Mission A#1 837 prontera,151,171,4 duplicate(mission_board) Mission A 837 prontera,151,171,4 duplicate(mission_board) Mission A 837 prontera,151,171,4 duplicate(mission_board) Mission A 837this script has protection to shut down bugged npc, but still caused npc not show up properly in "Edit NPC Limitation"a suggestion is to tell the GM immediately about this error again whenever they access the red GM menu
  16. //====== Checker: ============================================== cydonia,99,44,0 script Checker#prace0 -1,{hecker or Checker ? O_O WinRace: set $prace_gate,0; mapannounce "cydonia","O vencedor é o "+$prace_winner$+".",1,0xFFAB54; donpcevent "Checker#prace0::OnChequeo";apparently, when the a mob npc reaches the finish linewill trigger this npc ripped from eathena topic //NPC Checker - script Checker#prace0 -1,{ end; OnChequeo: for(set .@tmp1,0;.@tmp1<(getarraysize($prace_bidders));set .@tmp1,.@tmp1+1) { if(attachrid($prace_bidders[.@tmp1])) { if( prace_playing != 1) end; dispbottom "The winner is "+$prace_winner$+" and you have bet for "+prace_winner$+"."; if( prace_winner$ == $prace_winner$ && prace_winner$ != "") { dispbottom "You have won!"; mapannounce "p_track01"," Congratulations! "+strcharinfo(0)+" has won!",1,0xFFAB54; getitem 7199,2; emotion 21,1; } else dispbottom "You have lost."; emotion 28,1; set prace_winner$,""; set prace_playing,0; } //else { announce .@tmp1+" || "+$prace_bidders[.@tmp1],bc_all; } //debug } for( set .@tmp1,0; .@tmp1 < (getarraysize( $prace_bidders )); set .@tmp1,.@tmp1 + 1 ) { set $prace_bidders[.@tmp1],0; } }seems like, this script will attachrid on all account with $prace_bidders arraythen attachrid to check the permanent player variable again with a string variable (?) prace_winner$ if ( $prace_winner$ == "poring" ) then its true and getitem for the attached player ... hell ... the way this script use to check a variable is extremely unoptimized...
  17. use Notepad++ and do a "Find in file" with the keyword "OnSettings" inside your "...\npc\" folder
  18. delete from global_reg_value where str in ( 'Build_1$', 'Build_1n$', 'Build_2$', 'Build_2n$', 'Build_3$', 'Build_3n$', 'Build_4$', 'Build_4n$' );if you set .@BuildCount,4; of course
  19. I don't understand why you use different variable and set at different valueif you check the script on post#1, he used if(bac_so >= 1 || dop_pel >= 1 || kh_d01 >= 1 || than_t >= 1 || sbh_fbh >= 1 || may_an >= 1 || golden_t >= 1 || tao_gunk >= 1 || dev_ling >= 1 || gr1_gr1 >= 1 || tgen_tgen >= 1) goto gloom;which is the correct wayso you should only set the variable to 1 to enable, 0 to disable though, I still recommend to use something like bits to set the variable unless you are writing instanced quest script,in normal quest script you shouldn't hide/unhide the npc should set a state like you did above and let the npc just say hello without any useful dialog
  20. hahaha, me want join in too ~ - script kjdhfkjshf -1,{ OnPCLoadMapEvent: if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && ( agitcheck() || agitcheck2() ) && !getcharid(2) ) { mes "You are not in a guild"; close2; warp "Save", 0,0; } end; OnInit: setarray .castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; for ( .@i = 0; .@i < 30; .@i++ ) setmapflag .castles$[.@i], mf_loadevent; end; } https://github.com/rathena/rathena/blob/master/npc/custom/woe_controller.txt#L97euphy woe controller already setmapflag mf_loadevent all those castle maps ... or maybe not there's 2 setting that needs to turn on to enable it
  21. isn't that we can already compare a string with < or > already ? prontera,168,185,5 script kjdhfksdjfh 100,{ .@string$[0] = "asdf"; .@string$[1] = "qwer"; if ( .@string$[0] == .@string2$[1] ) dispbottom "1 true"; else dispbottom "1 false"; if ( .@string$[0] < .@string$[1] ) dispbottom "2 true"; else dispbottom "2 false"; end; } http://www.eathena.ws/board/index.php?s=&showtopic=180080&view=findpost&p=1311671can already sort the string just like that
  22. - script day_night_npc -1,{ OnClock0100: OnClock2000: OnInit: sleep 1; // if you want to use different script file, then slow down the script execution if ( gettime(3) >= 1 && gettime(3) < 20 ) { // day warp enablenpc "daywarp#1"; disablenpc "nightwarp#1"; } else { enablenpc "nightwarp#1"; disablenpc "daywarp#1"; } end; } prontera,152,192,0 warp daywarp#1 2,2,morocc,156,93 prontera,152,192,0 warp nightwarp#1 2,2,geffen,119,59if it is different file, then you have to make sure that your custom script is being read laterread npc\re\scripts_main.conf, or npc\scripts_custom.conf make sure the warp npc is being read 1st before the day_night_npc or ... just easily put a sleep command before enablenpc/disablenpc
  23. OMFG !! this is my 1st script ! prontera,152,192,0 warp Sample 2,2,quiz_02,340,77
  24. [paste=74qo3zp6a878] if I understand correctly ... you trying to use 1 item to unlock the map but once the map is unlock, the script will open the map indefinitely this will require to set a permanent player variable in bits ... because in the script, it lacks this feature
  25. oh !this script has the leader option enabled the script will always loop the the team index to search for a player that is currently not a leader L_setleader: while ( ( .@tmp = getd( ".team"+ getarg(0) +"aid["+ rand( getd(".team"+ getarg(0) +"count") ) +"]" ) ) == playerattached() );if you set to 1, it will caused an infinite loopand it is supposed to be work in this way because .... didn't I already said DO NOT set to 1 ? set .minplayer2start, 2; // minimum player to start ... please do not set to 1
×
×
  • Create New...