Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. move to source modification support since you only wants to log @items, I rather say there is no need to log atcommand at all because picklog already helps you log @items with type A
  2. trunk/npc/kafras/functions_kafras.txt use openstorage
  3. nope, if your client doesn't have a sprite for it in idnum2itemresnametable.txt it just show empty, -> Custom_weapons if it is showing an apple, you must already hexed your client btw, I think you got your hexed client differently from ours what you are talking seems to be client modification, not source modification
  4. BUILDIN_FUNC(checkidle) { TBL_PC *sd; if ( script_hasdata(st,2) ) { if ( data_isstring( script_getdata(st,2) ) ) sd = map_nick2sd( script_getstr(st,2) ); else sd = map_id2sd( script_getnum(st,2) ); } else sd = script_rid2sd(st); if ( sd ) script_pushint( st, DIFF_TICK(last_tick, sd->idletime) ); else script_pushint(st,0); return 0; } BUILDIN_DEF(checkidle, "?"), wonder whats taking this so long ...
  5. add if ( !getmapflag( strcharinfo(3), mf_gvg_castle ) ) end; under OnPCKillEvent:
  6. I also think its weird, his script has "Test_Headgear" card shop npc as float,but doesn't have any callshop "Test_Headgear"; command around dunno whats the meaning of it http://rathena.org/board/topic/75216-itemizer-with-delay/#entry161901 I dunno if you couldn't find hard enough, but here's mine is the armor enchant has anything to do with this topic ?
  7. // ~~~~~ show time left in days, hours, minutes and seconds ~~~~~ function script timeleft__ { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } prontera,156,179,5 script Player Promoter 947,{ mes "[Player Promoter]"; if ( getgmlevel() == 99 ) { mes "Hi Admin, do you want to distribute ^00CC00Player Promoter Cards^000000 with your name on it ?"; next; for ( .@i = 1; .@i <= .total_group; .@i++ ) .@menu$ = .@menu$ +"Distribute "+ getitemname( .group_idreq[.@i] ) +":"; .@s = select( .@menu$ ); getitem2 .group_idreq[.@s], 1,1,0,0, 254, 0, getcharid(0) % ( 1 << 16 ), getcharid(0) >> 16; close; } else if ( getgmlevel() > 1 ) { mes "Only Admin can use me"; close; } for ( .@i = 1; .@i <= .total_group; .@i++ ) .@menu$ = .@menu$ +( ( getgroupid() < .@i && countitem( .group_idreq[.@i] ) )? "upgrade to "+ .group_name$[.@i] : "" )+":"; if ( getstrlen( #pp_accupgrade$ ) ) { sscanf #pp_accupgrade$, "%d %d", .@id, .@time; mes "Your account is currently a ^00CC00"+ .group_name$[.@id] +"^000000. You still have ^0000FF"+ callfunc( "timeleft__", .@time - gettimetick(2) )+"^000000."; if ( getstrlen( .@menu$ ) == .total_group ) close; } else if ( getstrlen( .@menu$ ) == .total_group ) { mes "Make a donation and you can upgrade your account to become Super Players ^^"; close; } mes "Do you want to upgrade your account ?"; next; .@s = select( .@menu$ ); delitem .group_idreq[.@s], 1; #pp_accupgrade$ = .@s +" "+( gettimetick(2) + 2592000 ); // 1 month atcommand "@adjgroup "+ .@s; mes "[Player Promoter]"; mes "Your account has successfully upgraded to "+ .group_name$[1]; sc_start sc_expboost, 2147483647, 100; sc_start sc_itemboost, 2147483647, 100; close; OnPCLoginEvent: if ( getgmlevel() > 1 ) #pp_accupgrade$ = ""; if ( !getstrlen( #pp_accupgrade$ ) ) end; sscanf #pp_accupgrade$, "%d %d", .@id, .@time; .@left = .@time - gettimetick(2); if ( .@left > 0 ) { atcommand "@adjgroup "+ .@id; if ( .@left >= 2147483 ) { sc_start sc_expboost, 2147483647, 100; sc_start sc_itemboost, 2147483647, 100; } else { addtimer .@left *1000, "player_demoter::Ondemote"; sc_start .@left *1000, 2147483647, 100; sc_start .@left *1000, 2147483647, 100; } end; } Ondemote: atcommand "@adjgroup 0"; message strcharinfo(0), "Your account has demoted to normal player"; #pp_accupgrade$ = ""; end; OnInit: // setarray .group_<definition>, <group ID 1>, <group ID 2>, <group ID 3>; ... must follow the sequence in 1,2,3,4,5 ... setarray .group_idreq[1], 31061, 31062, 31063; setarray .group_name$[1], "Super Player", "Hyper Player", "Ultra Player"; .total_group = 3; end; } speechless with goddameit's edit...
  8. LMAO !!actually the original script goes like this, which I did something according to my usual logic prontera,154,180,5 script kjhfdkjsf 100,{ mes "max server online was "+ .peak_date_num +" at "+ .peak_date_time$; close; OnPCLoginEvent: if ( getusers(1) <= .peak_date_num ) end; .peak_date_num = getusers(1); .peak_date_time$ = gettimestr( "%A, %d/%b/", 20 ) + gettime(7) + gettimestr( " %I:%M:%S %p", 20 ); $peak_date$ = .peak_date_num +" "+ .peak_date_time$; end; OnInit: sscanf $peak_date$, "%d %40c", .peak_date_num, .peak_date_time$; end; } I reread the request again and found out its not in the request
  9. why don't you manually go to your `mob_db` database and edit it ? making a script like this, it just like doing it for training purposes ... ( which I already learned past that ) all items drop by monsters are always only 1 quantityto have it drop more than 1 need source modification
  10. - script dshfkdsfjhksfj -1,{ OnPCKillEvent: .@origin = getcharid(3); attachrid killedrid; if ( !getcharid(2) ) end; if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) getitem 7227, 20, .@origin; else getitem 7227, 10, .@origin; end; }
  11. bg_emp_reward_0.4.txt
  12. only my script use sscanf weird, I thought latest revision already fix this error http://rathena.org/board/tracker/issue-7059-sscanf-script-command-display-error-in-map-server/
  13. .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id; yes it will, can't read these 3 lines ? in euphy's woe controller script, many variables are already preset there I just have to use some getvariableofnpc retrieve the value directly from there
  14. yeah it should be, uncomment those line that mark with //DEBUG to test it out .......
  15. enable_logs: 0x00404 the rest seems fine
  16. describe how it is issit similar to this one ? http://rathena.org/board/topic/73648-7v7-pvpgvg-feature/#entry153129 though @GM Takumirai likes to give irrelavent answer ... don't mind his post
  17. prontera,155,181,5 script kjdfhskfhds 100,{ getpartymember getcharid(1), 0; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( compare( $@partymembername$[.@i], "ruru" ) ) { mes "sry, "+ $@partymembername$[.@i] +" is not allow to enter"; close; } } mes "free to go"; close; }
  18. query_sql "UPDATE login SET `group_id`=0 WHERE account_id="+getcharid(3); I don't think this is the correct way to change a gm group unless ask the player to relog after using the item like atcommand "@kick "+ strcharinfo(0) or something to refresh the group db perhaps use @adjgroup - script lasdlkasdla -1,{ OnInit: .page = 2; bindatcmd "list_premium", strnpcinfo(0)+"::Onaaa", 99, 100; end; Onaaa: query_sql "select count(1) from global_reg_value where str = '#PremiumUser'", .@total; while (1) { .@nb = query_sql( "select account_id as a, ( select name from `char` where account_id = a limit 1 ), value from global_reg_value where str = '#PremiumUser' limit "+ .page +" offset "+ .@currentpage * .page, .@aid, .@name$, .@value ); mes "current page no."+( .@currentpage +1 )+". total "+ ( .@total / .page +1 ) +" pages"; for ( .@i = 0; .@i < .@nb; .@i++ ) mes ( .@currentpage * .page + .@i +1 ) +". "+ .@name$[.@i] +" ["+ .@aid[.@i] +"] -> "+ .@value[.@i]; next; if ( select( "next", "previous" ) == 1 ) { if ( .page * ( .@currentpage +1 ) < .@total ) .@currentpage++; else { mes "end of page"; close; } } else { if ( .@currentpage ) .@currentpage--; else { mes "start of the page"; close; } } } close; // doesn't reach } just make for fun ... EDIT: lol ... post up the wrong script
  19. this is support section you need 2 sql table for this 1 table is for auctioning another table is the ID of the auction for the bidder's item when player auction something, the auction table automatically generated, which is easy to do the when players wants to buy a bid item, create another row for the 2nd table according to the ID of the auction you need my getitemname2 function, how to write dynamic menu with getinventorylist, dynamic menu with sql table, and more importantly, sendmail script command ... lol
  20. AnnieRuru

    Custom BG

    bg_pvp_leader_0.3.txt
  21. are these both same request ? looks so similar to me perhaps can merge topic I don't have time to browse/comply every topics here I only hand-pick those request that's look interesting to me, which are mostly event script related
  22. prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select * from woe_point order by points desc limit 3", .@guild_id, .@points ); if ( !.@nb ) { mes "no record yet"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes ( .@i +1 )+". "+ getguildname( .@guild_id[.@i] ) +" -> "+ .@points[.@i]; close; OnClock1930: OnClock2000: OnClock2030: OnClock2100: for ( .@i = 0; .@i < 30; .@i++ ) { .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "insert into woe_point values ( "+ .@castle_guild_id +", 1 ) on duplicate key update points = points +1"; } end; OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "insert into woe_point values ( "+ getcharid(2) +", 1 ) on duplicate key update points = points +1"; end; } why make things so hard ? EDIT: ops, forgot the SQL create create table woe_point ( guild_id int(11) unsigned primary key, points int(11) ) engine = myisam; EDIT2 ... wait a moment, I change the layout ok here, I think better use existing table because if the guild gets deleted, the row will also be deleted from the source itself alter table guild add column woe_points int(11) default 0 after emblem_data, add index (woe_points); prontera,155,181,5 script Woe Points 100,{ .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); for ( .@i = 0; .@i < .@nb; .@i++ ) { if ( !.@points[.@i] ) break; mes ( .@i +1 )+". "+ .@guild_name$[.@i] +" -> "+ .@points[.@i]; } close; OnClock1930: OnClock2000: OnClock2030: OnClock2100: for ( .@i = 0; .@i < 30; .@i++ ) { .@castle_guild_id = getcastledata( getvariableofnpc( .Castles$[.@i], "WOE_CONTROL" ), 1 ); if ( getvariableofnpc( .Active[0], "WOE_CONTROL" ) & 1 << .@i && .@castle_guild_id ) query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ .@castle_guild_id; } end; OnBreakEmp: // put doevent under OnAgitBreak ... query_sql "update guild set woe_points = woe_points +1 where guild_id = "+ getcharid(2); end; }
  23. prontera,154,180,5 script kjhfdkjsf 100,{ if ( gettime(8) != .peak_date_time ) callsub L_setpeak; mes "max online today is "+ .peak_date_num; close; OnPCLoginEvent: callsub L_setpeak; end; OnInit: sscanf $peak_date$, "%d %d", .peak_date_num, .peak_date_time; end; L_setpeak: if ( getusers(1) <= .peak_date_num ) end; .peak_date_num = getusers(1); .peak_date_time = gettime(8); $peak_date$ = .peak_date_num +" "+ .peak_date_time; return; } @Capuche your script will have bug, if say Tuesday there's nobody login on the 1st few hours of that day it says 'today'... but it should be yesterday @Emistry much better, but you just always forgot about gettimestr prontera,155,181,5 script Sample 757,{ mes gettimestr("%A",10) +" peaks : "+ $peak[gettime(4)]; close; OnPCLoginEvent: if ( getusers(1) > $peak[ gettime(4) ] ) $peak[ gettime(4) ] = getusers(1); end; } EDIT: remove the useless gettime(7) ... EDIT2: wahahaha Capuche post#10 damn fun !
  24. I think the script can only go for pvp OR gvg as they both have totally different mechanics ( battleground is even more different ) and your proposal has a lot flaws I'll counter propose 1. let's make it 1 hour each, so there's only 24 sessions in 1 dayotherwise its too pack also make it register 3 days in advance 2. I suggest the number of participants is propose by the hosterif they want gvg 5vs5, they just have to input number 5 the the challenger see it suits their taste in this way, small guild and large guild will also able to have fun according to the size of their guilds sometimes they want small skirmish, sometimes they want big war, can be up to them when the time comes, I can also make it in 2 different ways a. when its time for war, randomly pick 5 online players in the guild if the guild having less than 5 online guild members, they will automatically forfeit b. when its time for war, the guild master must online and hand-pick their soldiers if the guild having less than 5 online guild members, they will automatically forfeit pick your choice, or can do another proposal it wont be any good to start out a script while your proposal is incomplete
  25. the reason that we have unknown apple with item database, but doesn't have unknown mob ID is because the data can be left over in player-side if a player is carrying an itemID with 21111, but then the GM removes it from item_db, when that player login, the map-server will display an error -> unknown itemID - 21111 ... something like that [Warning]: itemdb_search: Item ID 500 does not exists in the item_db. Using dummy data. if the gm create a monster with mobID 2345 then the admin removes it from mob_db, when the server attempt to spawn, it will display an error -> unknown mobID .... the monster is only created/load/read in the server [Warning]: buildin_monster: Attempted to spawn non-existing monster class 1003 because if you want to make a custom mob without playing with client-side, we have mob_avail for itso there is no need to do any more modification for it in fact, I have release several scripts that play around with mob_avail.txt I do think you have misunderstood what I'm saying though when I say its possible with source modification I mean do a modification with something like if ( pc_readreg("client_date") < 20101231 ) clif_send <poring ID sprite>; else clif_send <normal mobID sprite>; .. which should be located somewhere in the clif.c file the correct way of saying it should be it would prevent a lot of client errors the server has no way to detect the client having the sprite or not @clydelion is actually right
×
×
  • Create New...