Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. quest.c int quest_read_db(void) { ..... while(fgets(line, sizeof(line), fp)) { if (k == MAX_QUEST_DB) { ShowError("quest_read_db: Too many entries specified in %s/quest_db.txt!\n", db_path); break; } ...... quest_db[k].id = atoi(str[0]); quest_db[k].time = atoi(str[1]); ...... k++; } } that MAX_QUEST_DB is just the number of entries a server will load just like how script command getarraysize limit to 128 <-- our crappy script engine this one the array limit to 2000 I still remember last year my quest log script -> link using ID as high as 100100 and it works https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/db/quest_db.txt in our SVN its currently already at 60355 if he doesn't show the script I also dunno how to support this
  2. if I understand correctly ... you are trying to make juggernaut event, am I wrong ? kill a player carrying a godlike item, autoequip it to gain super bonus if a player kill a godlike item carrier, the killer gets super bonus, and the dead ones become normal player this kind of level1 event script I can write on fly though I suggest its better to use OnPCStatCalcEvent to write this, not with an item like this because our current script engine will auto-delete items on floor, yeah I know your topic like this ... wait ... if that solution doesn't post to public I don't know how to write this script using your method otherwise you have to PM goddameit to write this for you also ...
  3. - script kasdhkasdjhsd -1,{ OnPCKillEvent: if ( pvp_skull_limit_day != atoi( gettimestr("%Y%m%d", 9) ) ) { pvp_skull_limit_day = atoi( gettimestr("%Y%m%d", 9) ); pvp_skull_limit_collect = 0; } if ( killedrid == getcharid(3) || pvp_skull_limit_collect >= 3 ) end; attachrid killedrid; .@charid = getcharid(0); attachrid killerrid; getitem2 7420, 1,1,0,0, 254, 0, .@charid % pow(2,16), .@charid / pow(2,16); pvp_skull_limit_collect++; }
  4. more like this prontera,155,177,5 script dkfjhsdfkjs 100,{ .@i = 1; while (1) { zeny = zeny + (( !rand(5) )? ( .@i * 5 ): -.@i ); // has a negative sleep2 250; } } although this works, but I don't recommend do something like this I don't believe in how rathena script engine calculating value inside compact if-else I just try this script ... my money really going up ... o.O that betting trick really prove can beat this system to gain infinite money .... in theory of course
  5. @Joseph script is closest, but not optimized enough prontera,156,177,5 script kdjfhkshf2 100,{ end; OnInit: .@interval = 5; .@step = 5; while (1) { sleep .@interval * 1000; getmapxy .@map$, .@x, .@y, 1; while ( checkcell( .@map$, .@npc_x = .@x + rand( -.@step, .@step ), .@npc_y = .@y + rand( -.@step, .@step ), cell_chknopass ) ); npcwalkto .@npc_x, .@npc_y; npctalk callfunc( "F_RandMes", 2, "I'm talking.", // 1 "Hello!" // 2 ); } end; // doesn't read } F_RandMes is 1 of the global function inside our svn its much cleaner than setting an array with getarraysize also much cleaner than switch( rand(x) ) { case 1: ... break; case2: .... break; } our crappy script engine parse switch, case and break very ugly F_RandMes is also consider 1 of the unique function only to *athena script language
  6. WTF !!!! I also got tricked by the definition from the request ! http://en.wikipedia....betting_system) https://rathena.svn....c/blackjack.txt L_Play: mes "[Dealer]"; mes "Please place your bets..."; next; menu "2z",M_1a, "10z",M_1b, "20z",M_1c, "100z",M_1d, "Too rich for my blood....",M_End; M_1a: if(Zeny < 2) goto sL_NotEnuf; set @bet, 2; goto L_Cont0; M_1b: if(Zeny < 10) goto sL_NotEnuf; set @bet, 10; goto L_Cont0; M_1c: if(Zeny < 20) goto sL_NotEnuf; set @bet, 20; goto L_Cont0; M_1d: if(Zeny < 100) goto sL_NotEnuf; set @bet, 100; goto L_Cont0; ..... sL_Win: mes "[Dealer]"; mes "Congratulations, you've won!"; next; set Zeny, Zeny + @bet; goto L_Play; sL_Lose: mes "[Dealer]"; mes "I'm sorry but you've lost."; set Zeny, Zeny - @bet; next; goto L_Play; up your post <3 prontera,158,177,5 script kdjfhkshf2 100,{ if ( !zeny ) { mes "you don't have any zeny left to bet <3"; close; } input .@i, 1, zeny; mes "are you sure you want to bet "+ .@i +" zeny ?"; next; if ( select ( "yes", "no" ) == 2 ) close; if ( .@i *5 + zeny > 1000000000 ) { // prevent zeny lost mes "you can't bet more than the amount of zeny you can carry"; close; } if ( zeny < .@i ) mes "don't cheat me by using @mail"; else if ( !rand(1) ) { mes "you win"; zeny = zeny + ( .@i *5 ); } else { mes "you lose"; zeny -= .@i; } close; } EDIT: suddenly feel like making Roulette script ... can be fun XD but nah ... no time atm, better make battleground script EDIT2: totally forgotten about @mail again ... damn http://www.goodbonusguide.com/casino-articles/roulette-systems-destroying-the-martingale-theory-myth.html http://wizardofodds.com/gambling/betting-systems/ ... fun article can learn something new even with simple script
  7. yeah, the topic starter already stated it of course you have to put your money on the table,then the dealer only multiply your bet according to the money you've put on the table, not from the money inside your pocket actually euphy is a very great scripter too, his skill can be higher than me it just this kind of stuff has to be accumulated through years of experience because of our crappy script engine like keyworld said, sometimes its not scripter's fault, but script engine fault hahaha
  8. FUN XD prontera,158,177,5 script kdjfhkshf2 100,{ if ( !zeny ) { mes "you don't have any zeny left to bet <3"; close; } input .@i, 1, zeny; mes "are you sure you want to bet "+ .@i +" zeny ?"; next; if ( select ( "yes", "no" ) == 2 ) close; if ( .@i *5 + zeny > 1000000000 ) { // prevent zeny lost mes "you can't bet more than the amount of zeny you can carry"; close; } zeny -= .@i; sleep2 1000; if ( !rand(5) ) { mes "you win"; zeny = zeny + ( .@i *5 ); } else mes "you lose"; close; } some discovery 1. when I use zeny += ( .@i *5 ) if I input 1 zeny, even though I have 500 zeny, it becomes 6 no idea why I guess something wrong with script engine ... hahaha 2. I already knew this input is limited to 10000000, http://www.eathena.ws/board/index.php?showtopic=190502 also 1 of our crappy script engine 3. I tested with euphy script... I originally thought if I carry more than MAX_ZENY define in mmo.h the server should throw max_zeny parameter ... overflow zeny error but my test server didn't throw any error at all ! so euphy script is also actually working and doesn't gives any error at all so it just player's fault to bet more than the zeny they can carry wahahah ... really a fun script, not lame ! EDIT: buda post faster than I did
  9. eamod is eamod, rathena is rathena we have our own unique script command and script language now if you want to make eamod script to convert into rathena script, certain script commands has to reverse engineer wahahaha I never work on a server that has bought eamod so I don't know how it worksseems like someone need to post a link or youtube video ... something like that so I can understand
  10. Ryokem post yeah, just a peak at script.c, our crappy script engine parse == C_EQ operator very ugly even C_LNOT + BUILDIN_FUNC(getstrlen) is much cleaner me also want to do like this from now on xD http://rathena.org/board/topic/73137-script-core-improvements/ remember to support this project XD
  11. its totally up to the user wants to execute it or not http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1252 http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1342 performance-wise, and at least in theory, in rathena innodb should be faster than myisam because we mostly perform WHERE `account_id` or WHERE `guild_id` stuffs however innodb type tables doesn't support "INSERT DELAYED INTO" command ... though but in practical, myisam is still quite stable ... because most rathena users doesn't have problems with it not to mention that our query has already index properly just take a peek at our own sql-files you might also learn something from it
  12. https://rathena.svn....gine_innodb.sql its inside your own folder LOL http://www.softwarep...gines-1470.html http://dba.stackexch...nnodb-or-myisam myisam is mostly use for read-heavy + table locking storage engine = such as pvp ladder ( always select ... order by kill desc ) innodb is mostly use for write-heavy + row locking storage engine = such as quest script ( select ... from char_id ... only 1 row is retrieve )
  13. I rather do something like this - script blah -1,{ OnPCKillEvent: set .@counttopunish, 3; // 3 times kill in same minute = OUT if ( killedrid == getcharid(3) ) end; attachrid killedrid; .@charid = getcharid(0); attachrid killerrid; setd "@count"+ gettime(2) +"_"+ killedrid, getd( "@count"+ gettime(2) +"_"+ killedrid ) +1; if ( getd( "@count"+ gettime(2) +"_"+ killedrid ) < .@counttopunish ) getitem2 7420, 1,1,0,0, 254, 0, .@charid % pow(2,16), .@charid / pow(2,16); else { announce strcharinfo(0) +", Stop killing "+ rid2name(killedrid) +" !!!", 0; warp "Save", 0,0; } end; } http://www.eathena.w...ype=post&id=334 ... hmm ... this script is seriously unoptimized ...
  14. http://www.eathena.w...dpost&p=1289421 http://www.eathena.w...dpost&p=1509691 dunno why but I feel like want to post this also xD how is this going to work ?all 5 cards need to use this function ? I don't understand how is this going to work
  15. global_reg_value .... in theory is unlimited because SQL InnoDB will perform row locking ... http://dev.mysql.com...al-locking.html well its more efficient to convert your SQL to innoDB for rathena ... because it only retrieve row value src\char\inter.c if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `str`, `value` FROM `%s` WHERE `type`=3 AND `char_id`='%d'", reg_db, char_id) ) if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `str`, `value` FROM `%s` WHERE `type`=2 AND `account_id`='%d'", reg_db, account_id) ) `mapreg` on the other hand is the one that need to watch out because it perform whole table search src\map\mapreg_sql.c if ( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `varname`, `index`, `value` FROM `%s`", mapreg_table)
  16. nope, not compatible with eathena or 3ceam anymore it just like eamod, that emulator also has their own battleground script commands I will soon turn script needed source modification to make this script only compatible with rathena only so ... sry this script is for rathena users only, its the same meaning where that script is only meant for eamod only
  17. actually I understand what you mean it just that my style of support is to write a sketch script, and ask the user to crack my script I'm not like @ToastOfDoom, @Z3R0, Yhn or Trancid where they can give detailed explanation on how to write a script but sadly ... the other scripting moderator which has scripting skill on par with me has gone inactive ... I also wish @ToastOfDoom is still around and give some advice, when he was around, we both give different kinds of script support me gives example script, @ToastOfDoom gave detailed explanation and pseudo-code unfortunately ... right now I'm the only active scripting moderator ... if @ToastOfDoom is still around maybe he can change things here a little bit also EDIT: yeah I cannot explain to you whats the meaning of struct, or pointer ... because I never been to any college or programming course all the knowledge I have is just write many and many scripts with my own self-taught knowledge that's why I just couldn't give explanation like others ... but if @ToastOfDoom ... he can ...
  18. move to client support and up for you ! <3 never thought about client hexing... me noob in client stuffs
  19. AnnieRuru

    debugmes

    change debugmes(killedrid); into debugmes(killedrid+"");
  20. if (!#AccountPW$) { [Error]: script:op_1: argument is not a number (op=C_LNOT) yeah rathena script engine sux ! operator only usable in integer value, cannot use for string btw this script ... is broken also ... [Debug]: npc_scriptcont: SecurityManager (sd->npc_id=110000212) is not 'UnknownNPC' (id=0). why the script start with next; command -.-"
  21. src\map\clif.c if( messagelen > CHAT_SIZE_MAX-1 ) { // messages mustn't be too long // Normally you can only enter CHATBOX_SIZE-1 letters into the chat box, but Frost Joke / Dazzler's text can be longer. // Also, the physical size of strings that use multibyte encoding can go multiple times over the chatbox capacity. // Neither the official client nor server place any restriction on the length of the data in the packet, // but we'll only allow reasonably long strings here. This also makes sure that they fit into the `chatlog` table. ShowWarning("clif_process_message: Player '%s' sent a message too long ('%.*s')!\n", sd->status.name, CHAT_SIZE_MAX-1, message); return false; } quite impossible I think I think the mechanic is ... when a dancer scream it read a file from client\data\dc_scream.txt and it just do the same as a player has just "talk" anyone can change this file and her scream will just talk into the dialog the user modify I remember there was an old bug report where a player modify this file, input a very very long line, causing everyone around the bard/dancer doing frost-joke or scream to get gravity error and it fixed ages ago by using CHAT_SIZE_MAX since frost joke and scream is acted like *unittalk, its impossible to disable it from server side I guess I tried to disable the file, or filled with empty lines seems to be impossible
  22. yeah http://www.eathena.ws/board/index.php?s=&showtopic=181741&view=findpost&p=1478950 what is the thing you don't understand ?
  23. Can arrays in rAthena be set without any initial index or dimension? O.o yesin eathena/rathena, set .@var, 1; is equal to set .@var[0], 1; because in our script engine , variable is equal to array with index [0] Can an existing array be checked about if empty or not just by calling the array name without any getarraysize command? If so, wow about rAthena yeah lolgetd(".craft"+ .@i ) here is equal to if ( getd(".craft"+ .@i ) != 0 ) yeah I know rathena script engine sux ... ok ... I've been get used to this with my experiences ...
  24. this script require 2-dimension array prontera,156,181,5 script asdas 100,{ mes "select an item"; next; .@item = select( .menu$ ); mes "the item you chose = "+ getitemname( getd( ".craft"+ .@item +"[0]" ) ); mes "require the following items"; for ( .@i = 1; .@i < .size[ .@item ]; .@i += 2 ) mes getd(".craft"+ .@item +"["+( .@i +1 )+"]") +"x "+ getitemname( getd(".craft"+ .@item +"["+ .@i +"]" ) ); next; for ( .@i = 1; .@i < .size[ .@item ]; .@i += 2 ) { if ( countitem( getd(".craft"+ .@item +"["+ .@i +"]") ) < getd(".craft"+ .@item +"["+( .@i +1 )+"]") ) { .@not_enough[ .@c ] = getd(".craft"+ .@item +"["+ .@i +"]"); .@c++; } } if ( .@c ) { mes "== Incomplete Items =="; for ( .@i = 0; .@i < .@c; .@i++ ) mes getitemname( .@not_enough[ .@i ] ); close; } for ( .@i = 1; .@i < .size[ .@item ]; .@i += 2 ) delitem getd(".craft"+ .@item +"["+ .@i +"]" ), getd(".craft"+ .@item +"["+( .@i +1 )+"]"); .@rand = rand(100); if ( .@rand < 5 ) .@get = 4; else if ( .@rand < 10 ) .@get = 3; else if ( .@rand < 25 ) .@get = 2; else if ( .@rand < 50 ) .@get = 1; else { mes "you failed at crafting this item"; close; } getitem getd( ".craft"+ .@item +"[0]" ), .@get; mes "you get "+ .@get +"x "+ getitemname( getd( ".craft"+ .@item +"[0]" ) ); close; OnInit: setarray .craft1, 1201, 501,1, 502,1, 503,1; setarray .craft2, 1204, 504,1, 505,1, 506,1; setarray .craft3, 2301, 512,1, 513,1, 514,1, 515,1; for ( .@i = 1; getd(".craft"+ .@i ); .@i++ ) { .menu$ = .menu$ + getitemname( getd(".craft"+ .@i +"[0]") ) +":"; .size[.@i] = getarraysize( getd(".craft"+ .@i ) ) -1; } end; } where the x-axis is the require items y-axis is the list of craft-able items in the menu
  25. prontera,154,183,5 script asdas 100,{ while ( .@i <= 531 ) { if ( getstatus(.@i) ) dispbottom .@i +" "+ getstatus(.@i) +""; .@i++; } } tested a paladin cast gospel and another player in party to receive the buff I got this list 30 // blessing 32 // increase agi 37 // holy weapon 38 // holy armor 187 // increase all stat 194 // increase hit 196 // increase flee 198 // max hp increase 199 // max sp increase 200 // attach strength 202 // increase def seems to match with data\skilldesctable2.txt Possible effects on allies: ^777777• 1-9999 HP heal • Remove all abnormal status (e.g. Curse, Blind and Poison) • Blessing LV 10 or Increase Agility LV 10 • Enchant Weapon or Armor with Holy property • Maximum HP or SP +100% • +20 to all stats • DEF +25% • MaxATK +100% • Flee Rate/HIT +50 ^000000 • Immunity against status ailments that immunity against status ailments, in my test server it says "All abnormal status effect has been removed" EDIT: wait, I got this • Immunity against status ailments ... checking which number it is now EDIT2: got it 214 // SC_SCRESIST
×
×
  • Create New...