Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. yeah can do that ... but waste server resources ... prontera,157,178,5 script Clemy 703,{ end; OnMon0000: OnWed0000: disablenpc strnpcinfo(0); end; OnSun0000: OnTue0000: enablenpc strnpcinfo(0); // continute read on OnInit: if ( gettime(4) != 0 && gettime(4) != 2 ) { // add this... disablenpc strnpcinfo(0); end; } .@interval = 2; .@step = 5; while (1) { sleep .@interval * 1000; if ( gettime(4) != 0 && gettime(4) != 2 ) { // add this.... disablenpc strnpcinfo(0); end; } 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, "Heloo!!!", // 1 "Goodbye~!" // 2 ); } } refer to this woe time explanation and learn its trick this is event script trick ..............
  2. holiday_event_ladder.0.2.txt
  3. prontera,153,182,5 script kdjfhskdfj 100,{ end; OnPCLoadMapEvent: showevent 1,2; end; OnInit: setmapflag strnpcinfo(4), mf_loadevent; end; }
  4. this script from old eathena board http://www.eathena.w...howtopic=236779 is an invisible topic, but I still have scripting moderator access in that forum to view that invisible topic no idea who invisible it ... though and the funny thing is this is made by but I didn't see an update in this topic here I dig out the script <removed> EDIT: http://rathena.org/b...on/#entry100815 It was a big hit in eAthena and a lot of people loved it: http://www.eathena.w...79&st=0&start=0 but I denied the release ;P. @Jam, I might release it as a Paid script for future reference. Sorry. ok user said don't want ...
  5. 6 years ago ... dynamic menu is consider super advance scripting technique .... http://www.eathena.w...showtopic=81437 com'on now .... has become a common sense script optimization ... I probably learned that around 2008 too, learned from Yhn mostly
  6. query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0) { mes ""; mes "I'm sorry, the rewards are exclusively for new players."; close; } ....... // Set variable to make sure player can't get items again. set #NewbieGift, 1; setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; take a closer look ... the original script already did it '$127.0.0.1_NG' appeared in my `mapreg` table
  7. OnAgitEnd: set $castle_claimed[1], 0; // everytime woe ends the variable resets set $castle_claimed[2], 0; set $castle_claimed[3], 0; set $castle_claimed[4], 0; set $castle_claimed[5], 0; set $castle_claimed[6], 0; set $castle_claimed[7], 0; set $castle_claimed[8], 0; set $castle_claimed[9], 0; set $castle_claimed[10], 0; set $castle_claimed[11], 0; set $castle_claimed[12], 0; set $castle_claimed[13], 0; set $castle_claimed[14], 0; set $castle_claimed[15], 0; set $castle_claimed[16], 0; set $castle_claimed[17], 0; set $castle_claimed[18], 0; set $castle_claimed[19], 0; set $castle_claimed[20], 0; end; I wonder did you ever read the script
  8. warpguild doesn't work case 3: // m,x,y if (!map[pl_sd->bl.m].flag.noreturn && !map[pl_sd->bl.m].flag.nowarp) pc_setpos(pl_sd,mapindex_name2id(str),x,y,CLR_TELEPORT); break; in a map that is noreturn or nowarp mapflag, warpguild script command doesn't work and castle maps has noreturn mapflags also your getcastledata script command missing an argument getcastledata("<map name>",<type of data>) like this - script asdasdas -1,{ OnAgitEnd: // setcastledata "prtg_cas01", 1 , 1; // for testing purpose .@nb = query_sql( "select char_id from `char` where guild_id = "+ getcastledata( "prtg_cas01", 1 ) +" and online = 1", .@cid ); for ( .@i = 0; .@i < .@nb; .@i++ ) warpchar "quiz_02", 0,0, .@cid[.@i]; sleep 3000; query_sql "select account_id from `char` where online = 1", .@aid; // randomly find someone to attach attachrid .@aid; atcommand "@itemmap quiz_02 607 1"; mapwarp "quiz_02","prontera",155,181; end; } but seriously ... just like this will do - script asdasdas -1,{ OnAgitEnd: .@nb = query_sql( "select account_id from `char` where guild_id = "+ getcastledata( "prtg_cas01", 1 ) +" and online = 1", .@aid ); for ( .@i = 0; .@i < .@nb; .@i++ ) getitem 607, 1, .@aid[.@i]; end; } dunno why you want to complicated it so much
  9. then post it here and we can help you with it
  10. @uDe doesn't work to initiate an event, need to utilize an event label OnClockxxxx: is correct if ( ( gettime(4)==2 && gettime(3)==22 && gettime(2)==28 ) ... is only use to check a time ... it wont trigger on that time @NeoGenesis use mine http://www.eathena.ws/board/index.php?s=&showtopic=174222&view=findpost&p=1491458 find L_start: add OnTue2000: OnThu2000: OnSat2000: find L_start: add OnTue2030: OnThu2030: OnSat2030: refer to script_commands.txt
  11. prontera,155,179,5 script jdhfkjshfs 100,{ rentitem 1201, 3; equip 1201; successrefitem EQI_HAND_R; successrefitem EQI_HAND_R; successrefitem EQI_HAND_R; sleep2 1000; downrefitem EQI_HAND_R; close; } I think there's a bug in SVN yes, the item is still there, but after relog, the item is magically gone EDIT: report in bug tracker http://rathena.org/board/tracker/issue-6971-rentitem-with-refined-items-stays-in-inventory-until-relog/
  12. try this one bg_pvp_gm_0.1.txt since you said you want to give out the prize yourself, I purposely made L_listteam function to announce the winning team members EDITing post ... will criticize why previous script doesn't work 1. bg_kickall .red; bg_kickall .blue; lol this is not a script command from default SVN this is my custom battleground script command, sure send an error straight away 2. donpcevent "bg_emp#control::OnAutoAbort"; there is no OnAutoAbort label at all well .... too much I guess ... lazy to find the rest @_@ these 2 error is very obvious bug
  13. this is not a stable ladder script, I think .. if ... [1] player A -> 10 points [2] player B -> 10 points [3] player C -> 10 points if player C score 1 point, the ladder becomes [1] player C -> 11 points [2] player A -> 10 points [3] player C -> 10 points <-- this player name is repeated terces pvp ladder and my pvp ladder script doesn't has such problems, we search the whole ladder until find the correct index I think better just write a new one *spoon feed* -> move the topic into script request section another txt style ladder script ... emp_breaker_ladder.0.1.txt 1. install this script 2. follow this topic add doevent "Emperium Ladder::OnEmpBreak"; under OnAgitBreak: and OnStartArena:
  14. try learn from this script generator http://www.eathena.ws/board/index.php?s=&showtopic=239278&view=findpost&p=1305062 and remember to setup a test server, keep edit the script, read script_commands.txt, and @reloadscript ... etc
  15. please follow script request rules and open a new topic for itas this topic has already done its discussion so you can do something like -> .. in a new topic I like to request add modification of this script ... I want to add this blah blah blah feature ... I'm using rathena 16xxx
  16. so you mean, after finished 10 quests ( case 1: -> default: ... done all 10 quests, set Quest1Done, 1; getitem "gold_coin" ) and do another 10 quests ( case 1: -> default: ... done all 10 quests, set Quest1Done, 2; getitem "silver_coin"; getitem "bank_notes"; ) and stop ... cannot do it again issit ? ( if Quest1Done == 2 ... halt ) because I also getting confused ... btw I'm sure emistry can do this ... its his script
  17. http://www.eathena.ws/board/index.php?showtopic=194782 lol com'on 4 years old scripts ... of course our current scripting standard is higher a little bit now don't forget that member also read this folder and made it all into 1 single npc ...
  18. in scripts if ( getcharid(3) == ... in source if ( sd->status.account_id == ... I think you can figure out
  19. As of now, it detects the recipient's name automatically from the given charid.. and you can get anyone's charid using getcharid(0,"Rad").. And this doesnt need to use attachrid, as long as you have a charid you can use it (unless I didnt get what you're saying). ah damn .. I just say something stupidactually, what I meant is getcharid( 0, "Annieruru" ) will only return the result when the user is online and if the user is offline, even there's no source command can get the user CharID <-- totally forgotten about this the only way is use *query_sql in scripts or Sql_Query in source ... ok I'm wrong about this one yeah ... in scripts if want to send a mail to an offline user, should've save the array of char_id first hand so can forget about adding "<Recipient name>" optional field EDIT: in clif.c if (!intif_Mail_send(sd->status.account_id, &msg)) mail_deliveryfail(sd, &msg); I just read this part perhaps your script command should also do something like if ( sendmail(..... ) ) mes "mail sent successfully !"; else mes "mail sent failure !"; hmm ... let me check what are the conditions for mail sent to fail EDIT2: no.1 ... mail box is full ... -> #define MAIL_MAX_INBOX 30 .. in mmo.h no.2 ... specify zeny in negative value .. no.3. ... invalid item ID ... no.4 ... gives zeny more than MAX_ZENY variable in mmo.h ... no.5 ... MAIL_TITLE_LENGTH -> #define MAIL_TITLE_LENGTH 40 no.6 ... MAIL_BODY_LENGTH -> #define MAIL_BODY_LENGTH 200 I think that's all ... guess the rest about special attributes about items can refer to getitem2 script command
  20. ah, forgot to add, and the trick is keep trying I lost count how many scripts I've made ... .@i++ is set .@i, .@i +1; yes it is the same http://rathena.org/b...-engine-update/ ... I pay very high respect to @Epoque ... damn he's inactive
  21. lol its natural ... this is an event script ... they will race for the level, and they will also race for the prizeif 1st and 2nd place level up to level150 almost the same time they will race for the prize too so the first player who talk to this npc, they will get to choose 5 items, and claimed the prize so even 2nd place can claim the most unique prize they want if they race to this npc before 1st place does to reset, create another script to clear them -> deletarray $var;or shut down your server and manually remove the lines inside `mapreg` table -> delete from mapreg where varname = '$var'; ... actually at my current scripting ability, any kinds of event script looks easy to me atm
  22. let's see ... my script on post#3 and emistry script on post#6 is stable script my script use txt style ladder, which generate 1 perm player variable + 2 global array emistry script use sql style ladder which require SQL table try use either one of the solution provided
  23. oh I actually meansset baselevel, 150; or @lvup 150 <-- will not trigger OnPCBaseLvUpEvent: however getexp ... set baseexp, baseexp + n; ... or killing a monster <-- will trigger OnPCBaseLvUpEvent: so if you got quest script, of course can trigger this event label I used $ <-- permanent global variableit will survive through @reloadscript and server restart, so no problem try this ... quite simple to me actually prontera,153,182,5 script jhfksdjf 100,{ mes "these are the ones that has raced to level 150 in this server"; .@size = getarraysize( $race_level150_name$ ); if ( .@size ) { for ( .@i = 0; .@i < .@size; .@i++ ) mes ( .@i +1 )+". "+ $race_level150_name$[.@i]; } else mes "-> no record yet"; while ( $race_level150_name$[.@r] != strcharinfo(0) && .@r < 5 ) .@r++; // search the user if ( .@r == 5 ) close; // means you are not in the list else if ( $race_level150_bits & 1 << .@r ) close; // already claimed the prize next; mes "you can claim a reward from me"; next; .@size = getarraysize( $race_level150_item ); for ( .@i = 0; .@i < .@size; .@i++ ) .@menu$ = .@menu$ + getitemname( $race_level150_item[.@i] ) +":"; .@s = select( .@menu$ ) -1; // special = this is a race, player also can race to talk to this npc, so make sure the data is unchanged while players choosing for the reward if ( getarraysize( $race_level150_item ) != .@size ) { mes "I'm sorry, the item list has changed, please talk to me again!"; close; } getitem $race_level150_item[.@s], 1; mes "Congrats for getting "+ getitemname( $race_level150_item[.@s] ) +"!!"; deletearray $race_level150_item[.@s], 1; // remove 1 item index $race_level150_bits = $race_level150_bits | 1 << .@r; // save the bits of winner (in index) has claimed the prize close; OnPCBaseLvUpEvent: if ( baselevel != 150 ) end; // if its not level150, don't need run the rest .@size = getarraysize( $race_level150_name$ ); if ( .@size == 5 ) end; // after 5th place, no more announce strcharinfo(0) +" has race to No."+( .@size +1 )+" position to level 150 !!", 0; $race_level150_name$[ .@size ] = strcharinfo(0); // save the record end; OnInit: if ( !$race_level150_item && !getstrlen($race_level150_name$) ) setarray $race_level150_item, 501,502,503,504,505; // *CONFIG* = set your own item ID for prize giver here end; }
  24. emistry_daily_chain_quest.txt I hope emistry don't mind I edited his script http://rathena.org/b...ake-this-daily/ also, those things about 1 gold coin ... stuffs is easily configurable inside the script ... think emistry will explain for you in detail
  25. nope I didn't ... straight give away the rewards when they reach level150 OnPCBaseLvUpEvent event label only trigger when player killing a mobit wont trigger with GM commands or script commands, so its safe, no need to do such checks ops ... read my next post what kind of prize ?
×
×
  • Create New...