-
Posts
2044 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by AnnieRuru
-
http://www.eathena.ws/board/index.php?s=&showtopic=147492&view=findpost&p=960352 it was discovered back in 2008 precisely honestly, once I found out directly modify the source in 2011, I no longer doing this castle modification because of Agitstart/AgitEnd able to control them
-
should be using killedrid instead if ( strcharinfo(3) != "guild_vs3" && strcharinfo(3) != "pvp_y_1-2" || !class || baselevel < 99 || joblevel < 70 ) more like this change if ( killedrid == getcharid(3) ) end; // kill himself(like grandcross) doesn't add kills count. if ( strcharinfo(3) != "guild_vs3","pvp_y_1-2","pvp_y_1-2" || (Class > 4000 && Class < 4023) || BaseLevel < 99) || JobLevel < 70) end; // Level 99/70 doesn't add kills and deaths count. into if ( getgroupid() > 3 || killedrid == getcharid(3) || strcharinfo(3) != "guild_vs3" && strcharinfo(3) != "pvp_y_1-2" || !class || baselevel < 99 || joblevel < 70 ) end;
-
yeah after some google around, it brings me to eamod site since its a feature of eamod, I think I shouldn't support this should've ask this question in eamod site
-
prontera,156,188,5 script kjdfhkshfs 100,{ getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; .@compare_job$ = "#"; .@origin = getcharid(3); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; .@online++; .@compare_job$ = .@compare_job$ + class +"#"; } } attachrid .@origin; // dispbottom .@online + .@compare_job$; if ( .@online < 3 ) mes "your party needs at least 3 party member online"; else if ( !compare( .@compare_job$, "#"+ Job_Wanderer +"#" ) ) mes "your party needs a wanderer in your party"; else if ( !compare( .@compare_job$, "#"+ Job_Minstrel +"#" ) ) mes "your party needs a minstrel in your party"; else mes "you are free the go"; close; } its kinda like a habit of mine prefer to use string with #value#value#value# and use *compare to search for a value
-
I'm interested to see what is this Rush battleground is aboutI bet that rush battleground has a quest-log, need to complete certain quest to get in this battleground and when the script reads the quest_db file, it fails and stuck your player because your quest_db missing that entry this will be impossible to support unless you are showing that battleground script that you are talking about
-
search setbgid in this forum, you'll find some script example
-
because I prefer to use query_sql as few times as possibleaccess query_sql once = 0.01 second (won't feel lag) access query_sql 100 times = 1 second (start to feel lag) OnInit will trigger every time the server start up or @reloadscript and that has already using a lot resources query_sql so much is just like a waste of energy since this kinda stuff is just need to run once and forget, why run it so many times ? reason 2: if you previously have a table create table test ( id int(11) primary key count int(11) ); and you want to edit this table alter table test add column name varchar(23) after id; there is no way you can do this with OnInit that's why its better to let the user learn to create the table manually, and they will remember that they have already created it so when you updated the script plus update the sql database, they will run this alter table syntax in their SQL browser maybe you say can do it with certain tricks select name from test limit 1 .... this will display an error on the user, and might just bombard your release topic with replies with negative opinions on your topic
-
my script should have check them with *attachrid command ( if attachrid ... else {here} )if they are log out, the next time player register, the attachrid condition will unqueue them yes ... in fact this how how my bg_pvp script looks like if you search bg_pvp around this forumthe team need to kill the opponent team the amount of points to win, and if they respawn to the amount of starting value, that team lost
-
since you asked in support section, so I assumed you know how to write battleground scripts 1. by official battleground system, 1 waitingroom = 1 battleground team only if you want to bypass this limit in any ways, source modification is the only way 2. you can just save the variables every time the player win the match if team A wins, loop every team A party members, if ( battleground_win_count++ % 10 ) end; getitem prize ID, amount; ... as simple as that
-
0. if you search inside script request section, you'll see I've done more than 20 battleground scripts, all of the points that you listed out, if you search carefully in script support/request section, you'll definitely find the answer 1. 2. if(.point[1]>.point[2]) { Announce "[battle Ground]:Team A Win!",0; }else if(.point[2]>.point[1]) { Announce "[battle Ground]:Team B Win!",0; } if .point[1] > .points[2], then bg_warp team B out if .point[2] > .points[1], then bg_warp team A out 3. 5. you can use initnpctimer to enablenpc "Prize Giver"; when the timer up by OnTimer120000: , disablenpc back and bg_warp winning team out 4. sry but I have to say you need to add a state to prevent players starting the game unintentionally by adding another npc variable
-
I like to see this scriptyour attachment picture doesn't make any sense - script kjbfksjhfkd -1,{ OnPCKillEvent: if ( strcharinfo(3) == "payg_cas03" && getcharid(2) && baselevel >= 99 && class ) getitem 501, 1; end; } if without refering to the attachment picture, this is how (simple) the script looks like I bet this is just adding a bunch of if-else
-
prontera,156,185,5 script kjdhfkdjsf 100,{ mes "wanna sign up"; if ( select( "yes", "no" ) == 2 ) close; else if ( .signup_count == 128 ) { mes "Sorry the whole queue is full"; close; } while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) set .@i, .@i +1; if ( .@i < .signup_count ) { mes "you have already sign up in this event"; close; } set .signup_aid[ .signup_count ], getcharid(3); set .signup_count, .signup_count +1; mes "You are now signed to the BG event"; // set .@i, 0; // DEBUG // while ( .signup_aid[.@i] ) { // set .@signup_name$, .@signup_name$ +","+ rid2name( .signup_aid[.@i] ); // set .@i, .@i +1; // } // mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$; close2; L_start: if ( .signup_count < .min2start ) end; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) { if ( attachrid( .signup_aid[.@i] ) ) { if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } else { deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } if ( .start || .signup_count < .min2start ) end; announce "event started", 0; set .start, 1; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i]; deletearray .signup_aid, .min2start; set .signup_count, .signup_count - .min2start; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; cleararray .score[1], .startingscore, 2; bg_updatescore "guild_vs3", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .start == 1 ) { if ( .score[1] == .score[2] ) mapannounce "guild_vs3", "Draw !", 0; else if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", " Red side wins !", 0; callsub L_reward, .red; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", " Blue side wins !", 0; callsub L_reward, .blue; } } bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_kickall .red; bg_kickall .blue; set .start, 0; deletearray .score; goto L_start; L_reward: getbgusers getarg(0); for ( set .@i, 0; .@i < $@arenamembersnum; set .@i, .@i +1 ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( !.score[ getarg(0) ] ) awake strnpcinfo(0); sleep2 1250; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0 ) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; OnInit: set .eventlasting, 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins set .min2start, 2; // minimum player to start set .startingscore, 3; // score at start set .red, createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" ); set .blue, createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" ); end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall
-
try this one instead /* create table pvpladder ( cid int(11) primary key, name varchar(23), kills int(11), deaths int(11), class int(11), key (kills) ) engine = myisam; */ prontera,164,170,2 script PvP Ladder 786,{ .@nb = query_sql( "select name, kills, deaths, class from pvpladder order by kills desc limit 10", .@name$, .@kills, .@deaths, .@class ); if ( !.@nb ) { mes "ladder is empty"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes "^0000FF"+ (.@i+1) +": ^228B22"+ .@name$[.@i] +" ^606060"+ jobname(.@class[.@i]) +" ^006699"+ .@kills[.@i] +" / ^C80000"+ .@deaths[.@i] +"^000000"; close; OnPCKillEvent: query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1, 0, "+ class +" ) on duplicate key update kills = kills +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class; attachrid killedrid; query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 0, 1, "+ class +" ) on duplicate key update deaths = deaths +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class; delwaitingroom; // continue read OnInit: if ( query_sql( "select name, kills, deaths, class from pvpladder order by kills desc limit 1", .@name$, .@kills, .@deaths, .@class ) ) waitingroom .@name$ +" ("+ jobname(.@class) +") : "+ .@kills +" / "+ .@deaths, 0; else waitingroom "PVP Ladder !", 0; end; } EDIT: fix a typo on table creation
-
1. you mean the queue system as if register on just the npc, without using waitingroom ? 2. you mean the player who completed his own 10th winning round of battleground event, or you mean the server hosting every 10th round of battleground event, automatically reward on the winning team ?
-
what do you mean automated ... this event is a permanently active battleground system ... as long as players able to gather enough members, the event start by itself anytime they want EDIT: Search keyword: bg_pvp_leader ... this script kinda popular, better make a backup
-
I still don't understand your request ... as I see my script, if the user has +6 Jacket[1] if he choose to use 3 +6str stone on this item, it has 35% chance of success on crafting a +6 Jacket[1] with a +6 str stone on 4th card slot if the refine failed, it consumes 3 +6str stones, and get back the +6 Jacket[1] try to explain like this to me so that I can understand what your request is about
-
use Toasty Warper lol ... this is the only script that I couldn't able replicate better than his ...
-
use the latest patch in rathena _17102, try to manually patch it, should be easy to do just add 4 new script commands into your eathena it should be working in eathena
-
change defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".*", "iCorrect"; into defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".$", "iCorrect";
-
prontera,153,184,5 script bg_pvp_register 100,{ end; OnStart: if ( getwaitingroomstate(0) < .min2start *2 ) end; getmapxy .@map$, .@x, .@y, 1; warpwaitingpc .@map$, .@x, .@y; announce "event started", 0; .red = createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onredout" ); .blue = createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onblueout" ); callfunc "rand__", .min2start *2, $@rand; for ( .@i = 0; .@i < $@warpwaitingpcnum; .@i++ ) setbgid ( .@i %2 )? .red : .blue, $@warpwaitingpc[ $@rand[.@i] ]; delwaitingroom strnpcinfo(0); bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; bg_updatescore "guild_vs3", 0,0; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) mapannounce "guild_vs3", "Draw !", 0; else if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", " Red side wins !", 0; callsub L_reward, .red; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", " Blue side wins !", 0; callsub L_reward, .blue; } bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_destroy .red; bg_destroy .blue; .score[1] = .score[2] = 0; L_waitingroom: waitingroom "BG PVP", .min2start *2 +1, strnpcinfo(0)+"::OnStart", .min2start *2; end; L_reward: getbgusers getarg(0); for ( .@i = 0; .@i < $@arenamembersnum; .@i++ ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; Onredout: callsub L_out, 2; Onblueout: callsub L_out, 1; L_out: announce strcharinfo(0) +" is out from the match !", 1; bg_leave; warp "SavePoint", 0,0; .score[ getarg(0) ]++; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == .min2start ) awake strnpcinfo(0); end; OnInit: .min2start = 1; // how many players in a team needed to start a battleground. IF set this to 3, means 6 players needed to start (3 players * 2 teams) .eventlasting = 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins goto L_waitingroom; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall source modification and shuffling algorithm already provided in that topic
-
Because the mod breaks after we update our SVN doesn't make sense, this modification is just adding 4 script commands ... very simple patch I bet this patch even works in eathena/3ceam ( by patch manually ) prontera,156,185,5 script kjdhfkdjsf 100,{ mes "wanna sign up"; if ( select( "yes", "no" ) == 2 ) close; else if ( .signup_count == 128 ) { mes "Sorry the whole queue is full"; close; } while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count ) set .@i, .@i +1; if ( .@i < .signup_count ) { mes "you have already sign up in this event"; close; } set .signup_aid[ .signup_count ], getcharid(3); set .signup_count, .signup_count +1; mes "You are now signed to the BG event"; // set .@i, 0; // DEBUG // while ( .signup_aid[.@i] ) { // set .@signup_name$, .@signup_name$ +","+ rid2name( .signup_aid[.@i] ); // set .@i, .@i +1; // } // mes "[Debug] Currently have "+ .signup_count +" sign-in and they are "+ .@signup_name$; close2; L_start: if ( .signup_count < .min2start ) end; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) { if ( attachrid( .signup_aid[.@i] ) ) { if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } else { deletearray .signup_aid[.@i], 1; set .signup_count, .signup_count -1; set .@i, .@i -1; } } if ( .start || .signup_count < .min2start ) end; announce "event started", 0; set .start, 1; for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i]; deletearray .signup_aid, .min2start; set .signup_count, .signup_count - .min2start; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; bg_updatescore "guild_vs3", 0,0; sleep .eventlasting * 1000; if ( .start == 1 ) { if ( .score[1] == .score[2] ) mapannounce "guild_vs3", "Draw !", 0; else if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", " Red side wins !", 0; callsub L_reward, .red; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", " Blue side wins !", 0; callsub L_reward, .blue; } } bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_kickall .red; bg_kickall .blue; set .start, 0; deletearray .score; goto L_start; L_reward: getbgusers getarg(0); for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; Onredout: callsub L_out, 2; Onblueout: callsub L_out, 1; L_out: announce strcharinfo(0) +" is out from the match !", 1; bg_leave; warp "SavePoint", 0,0; set .score[ getarg(0) ], .score[ getarg(0) ] +1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == .min2start /2 ) awake strnpcinfo(0); end; OnInit: set .eventlasting, 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins set .min2start, 2; // minimum player to start set .red, createbgid( "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onredout" ); set .blue, createbgid( "guild_vs3", 86,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onblueout" ); end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall try this however, if your next question is about how to write a battleground script, I have to move into script request section =/ your question is about how to write queue system, not the battleground system lol
-
you can actually retrieve the value from other online players via attachrid and it should be faster/optimized than running a query_sql, I guess however considering the speed, actually both doesn't really different much, nobody will feel the micro-second lag
-
I mean check your map-server.exe for debug message if 2nd npc also copy what you say, means your client does generate |00
-
Warping player(s) from a map after a set time
AnnieRuru replied to Gimj's question in Scripting Support
thousands is still ok, but not in millions xD the blame is at if ( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `varname`, `index`, `value` FROM `%s`", mapreg_table) inside src\map\mapreg_sql.c if retrieving this over a 50,000 lines, server will simply die that kind of lagging issue only happens after your server getting lots of players plus doing that for several months that trick was quite popular in year 2006/2007, it was only later found out about this flaw about 2008 I don't think saving just 4 lines will affect anything -
I don't really understand thisyou said you want an enchantment script which immediately give out +10 str if the user has 3x +10 str stones and you mean if the user collected 3x +10 stones, if failed, they still getting +9 stats ??? sounds ridiculous