Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. kinda fun making this script been awhile I scripted something like mission board function script rand__ { .@range = getarg(0); .@count = getarg(2, 0); .@count = ( .@count == 0 || .@count > .@range )? .@range : ( .@count > 128 )? 128 : .@count; while ( .@i < .@count ) { .@r = .@save = rand( .@i, .@range -1 ) ; if ( getd(".@tmp1_"+ .@i ) == 0 ) { .@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r; setd ".@tmp2_"+ .@i, .@r; setd ".@tmp2_"+ .@save , .@i; setd ".@tmp1_"+ .@save , 1; set getelementofarray( getarg(1), .@i ), .@r; if ( .@save < .@count ) set getelementofarray( getarg(1), .@save ), .@i; } .@i++; } return .@count; } prontera,156,188,5 script khdfsdkjhf 100,{ // hatgame$ = ""; if ( hatgame$ != "" ) { explode @tmp$, hatgame$, "#"; callsub L_preview; next; for ( .@i = 1; .@i <= 3; .@i++ ) { if ( countitem( .itemreq[ atoi( @tmp$[ .@i ] ) *2 ] ) < .itemreq[ atoi( @tmp$[ .@i ] ) *2 +1 ] ) { mes "you don't have enough "+ getitemname( .itemreq[ atoi( @tmp$[ .@i ] ) *2 ] ); close; } } for ( .@i = 1; .@i <= 3; .@i++ ) delitem .itemreq[ atoi( @tmp$[ .@i ] ) *2 ], .itemreq[ atoi( @tmp$[ .@i ] ) *2 +1 ]; getitem atoi( @tmp$[0] ), 1; mes "congrats for "+ getitemname( atoi( @tmp$[0] ) ); hatgame$ = ""; close; } mes "to play a hat game you need "+ .itemstart[0] +" "+ getitemname(.itemstart[1])+"."; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( countitem(.itemstart[1]) < .itemstart[0] ) { mes "you don't have enough required items"; close; } delitem .itemstart[1], .itemstart[0]; @tmp$[0] = .rewarditem[ rand( .rewarditemsize ) ] +""; set .@dummy, callfunc( "rand__", .itemreqsize, $@rand, 3 ); for ( .@i = 0; .@i < 3; .@i++ ) @tmp$[ .@i +1 ] = $@rand[ .@i ] +""; hatgame$ = implode( @tmp$, "#" ); callsub L_preview; close; L_preview: mes "headgear : "+ getitemname( atoi( @tmp$[0] ) ); mes "you have to bring"; for ( .@i = 1; .@i <= 3; .@i++ ) mes .itemreq[ atoi( @tmp$[ .@i ] ) *2 +1 ] +"x "+ getitemname( .itemreq[ atoi( @tmp$[ .@i ] ) *2 ] ); return; OnInit: setarray .itemstart, 10, 909; // 10 jellopy setarray .itemreq, 501, 10, // 10 red pot 502, 9, // 9 orange pot 503, 8, // 8 yellow pot 504, 7, // 7 white pot 505, 6, // 6 blue pot 512, 1, // 1 apple 513, 2, // 2 banana 514, 3, // 3 grape 515, 4; // 4 carrot setarray .rewarditem, 5001, 5002, 5003, 5004; .itemreqsize = getarraysize(.itemreq) / 2; .rewarditemsize = getarraysize(.rewarditem); end; } credit to keyworld for the shuffling algorithm
  2. ok something about level2 event script case 1: if(getcharid(1)==0) { mes "[Neilay]"; mes "Only those in a party can compete in this event!"; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { mes "[Neilay]"; mes "You are not the leader of your party!"; close; } if(BaseLevel<.MHBaseLimit) { mes "[Neilay]"; mes "You must be atleast ^0000FFBase Level "+.MHBaseLimit+"^000000 to register a party!"; close; } if(JobLevel<.MHJobLimit) { mes "[Neilay]"; mes "You must be atleast ^0000FFJob Level "+.MHJobLimit+"^000000 to register a party!"; close; } if(.MHPartyID!=0) { mes "[Neilay]"; mes "There is already a party registered."; close; } getpartymember getcharid(1),1; for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i])) your script only has 1 getpartymember type 1, which only save charID I wonder how your $@partymemberaid[.@i] comes from ... other script ? and switch(prompt("Start Event")) { case 1: if(.MonsterHunterStart==1) { next; mes "[Neilay]"; mes "Their is a Monster Hunter event is currently going on!"; close; } for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i])) the script HIT a prompt remember to recall getpartymember again I just file a bug report to properly explain the current script engine behavior http://rathena.org/board/tracker/issue-6804-party-member-loop-issue-in-script-commandstxt/page__gopid__15065 EDIT: I also dislike having checks before next; button and warp after select ok this will create an exploit where if the player found out about this they will gather all party members fulfill the requirement, then after party leader talk to npc and after hit next; party members secretly change their members and warp inside without having the requirement fulfill example: http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4929 its the same concept I hope you can understand this script engine behavior when you try to script level2 event script EDIT2: WTF the post removed ! hahaha ..... nvm
  3. @vgrebirth if you're talking about my script, just .deny = 0; will do now its hard to continue discussion since there's 2 people has release the same thing in the same topic you have to say you are using which person's script
  4. @Peopleperson49 well since we release free stuffs on the board other members of course has the permission to edit to his liking to put on his server but in this board, you have to give permission to edit to put in this board private server is a place where players enjoy themself, and the gm there has power to control their server but in this board, everyone of us is equal in terms of script writing please don't put your personally feeling from that server into this board I don't wish to see you hurt anyone else ( I'm actually glad that you hit me, because I've experienced this many times in the past ) I'm actually just asking to put "but annieruru did it 1st" something like that in script release section it shouldn't be hard to do @nanakiwurtz http://www.eathena.ws/board/index.php?s=&showtopic=156045&view=findpost&p=860205 http://www.eathena.ws/board/index.php?s=&showtopic=181741&view=findpost&p=1478950 please do note that copyarray from $@partymemberaid immediately into another array to avoid clashing with another party is a strong rumor in script_commands.txt ultramage has already explained once a script executed all CPU power will dedicate in running that script instance until it hit a end; next; sleep ... something
  5. what I mean is he should say something like, annieruru started before me... but he didn't say anything in script release section and sounds like he claim he is the only one who made it 1st lol its actually fine by me lol I'm also kinda lazy to put some lame script like this up in script release section you see I finished that script in just 1 hour time anyway many of my script also scatter around script support/request section if you guys know how to search properly and this also isn't the 1st time I encounter this my 5 years eathena scripting, there're many members did the same to me in the past what I actually meant is reminding him while we all learn how to do scripting, especially in script request section whoever has already done any scripts before your post, or even just giving some direction/guide the name should be mentioned in script release section because everyone has helped contribute to make this script possible to be done he should be feel more thanksgiving for all around him who've contributed, not claim all the credit for himself example even a small amount of introduction ... can let others who've done it before you felt at ease
  6. the easiest way I can think of is use OnPCUseSkillEvent, and summon a *monster type 8
  7. because nobody know the answer except Brainstorm o.O
  8. @Peopleperson49 since ancient times there has been many people keep copy each other's idea like toasty warper copy my favourite warper .... but you should at least leave a link (at least link this topic) that someone else has done this same idea I usually don't care that other people ripping my script cause I know I'm already popular icon for being pro scripter in this board ( I already famous enough as it is ) however other members might not able to tolerate this behavior ( if it was other members did it 1st and you re-release again, I wont be so sure what is going to happen ) I understand you are willingly to learn, but leaving some credit to previous author is recommended
  9. LMAO somebody rip my script xD http://www.eathena.ws/board/index.php?s=&showtopic=239232 from the search of $WOE_CONTROL it leads to euphy's script I think can use that one, just ... that script should also send a reward through mailbox with sql if the guild master is offline which I already did in post#53 in that topic
  10. this source mod should fix the movement speed in the map http://www.eathena.ws/board/index.php?s=&showtopic=273944&view=findpost&p=1503295 regardless what kind of speed buff they get
  11. http://rathena.org/board/topic/64418-script-editors-notepad-rathena-custom-syntax-highlight/
  12. please use visual express or notepad++ when you do scripting it will find out error for you, visually
  13. then at least post a screenshot like this topic http://rathena.org/board/topic/72643-guys-need-help/ and point out which particular npc it is
  14. mapflag is the only way to do it without touching source you mean certain players can equip knife, but certain players can't equip knife in the same map ? EDIT: I regretted I post this I shouldn't have support if the topic didn't provide enough information
  15. OnInit: disablenpc "WOR"; hideonnpc "Emperium Wars#WOR1"; end; the npc is invisible, and your GM account can see it when there's no guild are fighting and event are accessible, only that npc will become visible seriously, that's why I also don't like using hideonnpc, I prefer disablenpc edit for below this person seriously need to be spoon feed
  16. getitem getitem 512,1, 2000000; // give an apple to account ID 2000000 seriously, most of the script commands you find in rathena uses account ID rather than char ID there's only 2 conditions that I can think of uses char ID 1st is when a party do party registration 2nd is when make a signed item the rest are almost dealing with account ID
  17. sc_check http://www.eathena.w...dpost&p=1498382 hmm I didn't explain how to use sc_check <effect type>; sc_check <effect type> {, <account ID> }; sc_check <effect type> {, <type> }; sc_check <effect type> {, <type> {, <account ID> } }; <type> is only use for soul link because sc_spirit has extra argument that different to every jobs http://www.eathena.w...howtopic=274421 for agi: if ( sc_check(sc_strfood) || sc_check(sc_agifood) || sc_check(sc_vitfood ) end; else sc_start sc_agi, 1000,1; for str: if ( sc_check(sc_agifood) || sc_check(sc_agifood) || sc_check(sc_vitfood ) end; else sc_start sc_str, 1000,1; expand them as you see fit EDIT: there's getstatus script command implemented on newer rathena that's doing similar to my modification change my sc_check into official getstatus script command
  18. run_script() as OnPCStatCalcEvent as npc name ? o.O this sounds like this label no able to run more than twice test ... - script kjfhsdfkjhsd -1,{ OnPCStatCalcEvent: bonus bstr, 10; end; } - script kjhdfkjsdfh -1,{ OnPCStatCalcEvent: bonus bagi, 10; end; } - script fjfkjsdfskdfj -1,{ OnPCStatCalcEvent: bonus bvit, 10; end; } can't reproduce error o.o well watever if it works just fine
  19. http://rathena.org/b...racters-status/ you should at least output topic link so people can understand o.O
  20. damn ... I found some very interesting topic OnPCStatCalcEvent.patch - script kjfhsdfkjhsd -1,{ OnPCStatCalcEvent: if ( strcharinfo(3) == "prontera" ) // permanently increase 100 str as long as staying in prontera bonus bstr, 100; if ( strcharinfo(0) == "Annieruru" ) // permanently increase 200 agi if the player name Annieruru (me xD) bonus bagi, 200; end; }
  21. I ignore this topic because I don't understand what she says can you repeat her question in more understandable way ?
  22. from eathena Download: [paste=7207eo0p96gx] new method and examples -> just visit the one in hercules forum .... lazy to copy and paste http://hercules.ws/board/topic/4570- Note: bg_kickall has been removed so no need to recycle the team ID ----------------------------------------- [spoiler=OLD method - eAthena period] Download: battleground_16873.diff ----------------------------------------- *createbgid <respawn map>, <respawn x>, <respawn y>, <On Quit event>, <On Death event>; create a specific battleground ID, for the rest .... refer to doc ----------------------------------------- *setbgid <battleground ID> {, <player name> }; player attached to the script will join the battleground team, but if a player name ( or account ID ) is specify, will let that player join the battleground team the command returns positive number ( > 0 ) if the function is successful if it return negative :- -1: the battleground team haven't create yet ... has to be create with createbgid -2: the team already full, it reached MAX_BG_MEMBERS = 30 which can increase at src\map\battleground.h -3: player not found ... happens when the input <player name> is not online or not found -4: invalid battleground ID ... currently only accept ID range within 1~1000 -5: the player already join the battleground ID that you specify if the player has joined battleground ID 500, and you use setbgid 700; this will force the player to leave battleground ID 500 and join battleground ID 700 without any notification only when the player joined bg ID 500, and use setbgid 500; then only the command return -5 <-- failed setbgid 0; is equal to bg_leave; and setbgid 0, "annie"; or setbgid 0, 2000000; will make the player "annie" ( or account id "]2000000 ) leave the battleground team without using attachrid + bg_leave ----------------------------------------- *getbgusers <battleground ID>; similar to getpartymember <party ID>, 2; // <-- return account ID this will create an array "$@arenamembers" holding all the player's account ID from the battleground team and $@arenamembersnum is equal to bg_get_data(<battleground ID>, 0), just like $@partymembercount ----------------------------------------- *bg_kickall <battleground ID>; kick every player out from the battleground team this command is counter-part from bg_destroy ----------------------------------------- . [spoiler=OLD method - rAthena period]----------------------------------------- *createbgid <respawn map>, <respawn x>, <respawn y>, <On Quit event>, <On Death event>; create a specific battleground ID, for the rest .... refer to doc .red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onreddead" ); .blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onbluedead" ); -----------------------------------------*setbgid <battleground ID> {, <player name> }; *setbgid <battleground ID> {, <player account ID> }; player attached to the script will join the battleground team, but if a player name ( or account ID ) is specify, will let that player join the battleground team warpwaitingpc "guild_vs3", 0,0; for ( .@i = 0; .@i < $@warpwaitingpcnum; .@i++ ) setbgid ( .@i % 2 )? .red : .blue, $@warpwaitingpc[.@i]; the command returns positive number ( > 0 ) if the function is successfulif it return negative :- -1: the battleground team haven't create yet ... has to be create with createbgid -2: the team already full, it reached MAX_BG_MEMBERS = 30 which can increase at src\map\battleground.h -3: player not found ... happens when the input <player name> is not online or not found -5: the player already join the battleground ID that you specify if the player has joined battleground ID 500, and you use setbgid 700; this will force the player to leave battleground ID 500 and join battleground ID 700 without any notification ( player who same group will receive a message mention that "player xxx leaving battlefield" ) only when the player joined bg ID 500, and use setbgid 500; then only the command return -5 but the script will still continue running without posting any error, so don't worry setbgid 0; is equal to bg_leave; and setbgid 0, "annie"; or setbgid 0, 2000000; will make the player "annie" ( or account id 2000000 ) leave the battleground team without using attachrid + bg_leave ----------------------------------------- *getbgusers <battleground ID>; similar to getpartymember <party ID>, 2; // <-- return account ID this will create an array "$@arenamembers" holding all the player's account ID from the battleground team and $@arenamembersnum is equal to bg_get_data(<battleground ID>, 0), just like $@partymembercount getbgusers .red; for ( .@i = 0; .@i < $@arenamembersnum; .@i++ ) getitem 501, 1, $@arenamembers[.@i]; -----------------------------------------*bg_kickall <battleground ID>; kick every player out from the battleground team this command is counter-part from bg_destroy ----------------------------------------- currently don't have enough samples for this new method, because I've done a few battleground script ... and it seems members are prefer not to use source modification ... o.o remember these steps use OnInit with createbgid use setbgid to let player join don't use bg_destroy command, but use bg_kickall command instead remember different script use different teams, there's a limit of 30 players on each team only <- can increase at src/map/battleground.h#L10 eg: this battleground script use bg id 1 & 2, next battleground script use bg id 3 & 4 ( bg id is self generated in ascending order )Example ... npc "aaa" doesn't use any custom script command npc "bbb" is the one that using these script commands difference is quite a lotalthough both also can achieve the battleground team creation, but its obvious the 2nd one is much much cleaner and more feature Example : use OnInit + createbgid, then use setbgid to attach 2 teams on the event controller npc if your script assigned bg_id 1 & 2, then your script use bg_warp 1 ... and bg_warp 2 ... EDITED SCRIPT : prontera,155,181,5 script Sample 100,{ mes "Battlegound"; if ( select ( "join/leave", "warp all bg members to you" ) == 1 ) if( getcharid(4) ){ bg_leave; dispbottom "Leave BG"; }else{ setbgid .bg_id; dispbottom "Joined BG"; } else if ( getcharid(4) == 0 ) dispbottom "you didn't join a battleground team"; else { getmapxy .@map$, .@x, .@y, 0; bg_warp .bg_id, .@map$, .@x, .@y; } close; OnInit: getmapxy .@map$, .@x, .@y, 1; .bg_id = createbgid( .@map$, .@x, .@y, "", "" ); end; } the current sample script should be look like this now .... battleground will auto generate the Battle Group ID , you cant assign the ID. tested and work fine in rev 17532 ... [spoiler=Archive] battleground_16819.diff battleground_16873.diff battleground_17101.diff battleground_17102.diff
  23. status_calc_pc try refer to this how to add new item type http://www.eathena.ws/board/index.php?showtopic=246304
  24. AnnieRuru

    WoR Event

    at that time I overlooked that topic because a lot members complain about tabbing ... heading... etc which I thought that script might not get popular ... though and now comparing this request and that topic, its just simply not the same thing - request for randomizing team members, but the script use fix party vs party - request player from same team can attack each other, but the script use pvp ( I'll go for battleground ) - request for 1 specific player to be crown as king, but the script doesn't has one anyway thx for fixing the modification for me, I'll test it soon and post in source snippet PS: to list out top player kills in your team, sorting algorithm is required XD if you play counter-strike, and show the score, that's what I mean EDIT: I found that patch don't even have to fix anything lol
  25. AnnieRuru

    WoR Event

    use this http://www.eathena.w...howtopic=275949 hmm ............... http://trac.rathena..../battleground.c no wonder it broke however I don't think that patch might work in rathena anymore ... maybe need to update the patch 1st before start writing this script
×
×
  • Create New...