Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. @Metamorphic Without initnpctimer, the timer will never start. - script Security -1,{ OnTimer1800000: stopnpctimer; if( @loop ) end; OnPCLoginEvent: cutin "ein_soldier",2; if (getgmlevel()>=85) goto gm_admin; set @loop, 1; setoption 0x40; setoption 0x2000; pcblockmove getcharid(3),1; percentheal 100,100; mes "Hallo, apa kamu bot ?? kalau tidak.. Ketik nomor yang sesuai ya."; atcommand "@noask"; mes "Ini login untuk antibot."; mes "Ketik nomor yang sesuai dengan warna di tanda ####"; next; set .@number1, rand (1000000,9999999); set .@number2, rand (1000000,9999999); set .@number3, rand (1000000,9999999); set .@number4, rand (1000000,9999999); set .@number5, rand (1000000,9999999); set .@number6, rand (1000000,9999999); set .@number00, rand (1000000,9999999); set .@number01, rand (1000000,9999999); set .@number02, rand (1000000,9999999); set .@number03, rand (1000000,9999999); set .@number04, rand (1000000,9999999); set .@number05, rand (1000000,9999999); set .@number06, rand (1000000,9999999); set .@number07, rand (1000000,9999999); set .@number08, rand (1000000,9999999); set .@number09, rand (1000000,9999999); set .@number10, rand (1000000,9999999); set .@number66, rand (1000,9999); set .@number99, rand (100,999); set .@Col, rand (6); if(.@Col == 0) goto colred; if(.@Col == 1) goto colorg; if(.@Col == 2) goto colblu; if(.@Col == 3) goto colvio; if(.@Col == 4) goto colgre; mes "^F5F9FD"+ .@number99 +"^000000^FFF9EE"+ .@number66 +"^000000^FF8C00"+ .@number2 +"^000000^F5F9FD"+ .@number05 +"^000000"; mes "^F8F8FF"+ .@number66 +"^000000^F7F7FF"+ .@number99 +"^000000^A52A2A"+ .@number6 +"^000000^F5F9FD"+ .@number05 +"^000000"; mes "^F5F9FD"+ .@number99 +"^000000^FFF9EE"+ .@number66 +"^000000^9400D3"+ .@number4 +"^000000^F8F8FF"+ .@number06 +"^000000"; mes "^F5F9FD"+ .@number66 +"^000000^F7F7FF"+ .@number99 +"^000000^FF0000"+ .@number1 +"^000000^F5F9FD"+ .@number02 +"^000000"; mes "^F8F8FF"+ .@number99 +"^000000^FFF9EE"+ .@number66 +"^000000^0000FF"+ .@number3 +"^000000^F8F8FF"+ .@number01 +"^000000"; mes "^F5F9FD"+ .@number99 +"^000000^F7F7FF"+ .@number66 +"^000000^008000"+ .@number5 +"^000000^F5F9FD"+ .@number03 +"^000000"; mes "^F7F7FF#^F5F9FD#^FFF9FA#^A52A2A####^FFF9EE##^F8F8FF#"; next; input .@number; next; goto brochk; colgre: mes "^FFF9EE"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000^008000"+ .@number5 +"^000000^F5F9FD"+ .@number04 +"^000000"; mes "^FFF9FA"+ .@number99 +"^000000^F7F7FF"+ .@number66 +"^000000^FFA500"+ .@number2 +"^000000^F5F9FD"+ .@number03 +"^000000"; mes "^F5F9FD"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000^FF0000"+ .@number1 +"^000000^F5F9FD"+ .@number00 +"^000000"; mes "^FFF9EE"+ .@number99 +"^000000^FFF9EE"+ .@number66 +"^000000^9400D3"+ .@number4 +"^000000^F5F9FD"+ .@number01 +"^000000"; mes "^F7F7FF"+ .@number66 +"^000000^FFF9FA"+ .@number99 +"^000000^0000FF"+ .@number3 +"^000000^F5F9FD"+ .@number06 +"^000000"; mes "^FFF9EE"+ .@number99 +"^000000^F5F9FD"+ .@number66 +"^000000^A52A2A"+ .@number6 +"^000000^F5F9FD"+ .@number05 +"^000000"; mes "^F7F7FF#^FFF9FA#^F5F9FD#^008000####^F5F9FD#^F8F8FF#^FFF9EE##"; next; input .@number; next; goto grechk; colvio: mes "^F7F7FF"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000^9400D3"+ .@number4 +"^000000^F5F9FD"+ .@number09 +"^000000"; mes "^F7F7FF"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000^FFA500"+ .@number2 +"^000000^F5F9FD"+ .@number04 +"^000000"; mes "^F7F7FF"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000^A52A2A"+ .@number6 +"^000000^F5F9FD"+ .@number05 +"^000000"; mes "^FFF9EE"+ .@number99 +"^000000^F7F7FF"+ .@number66 +"^000000^FF0000"+ .@number1 +"^000000^F5F9FD"+ .@number06 +"^000000"; mes "^FFF9EE"+ .@number99 +"^000000^F7F7FF"+ .@number66 +"^000000^0000FF"+ .@number3 +"^000000^F5F9FD"+ .@number08 +"^000000"; mes "^FFF9EE"+ .@number99 +"^000000^F7F7FF"+ .@number66 +"^000000^008000"+ .@number5 +"^000000^F5F9FD"+ .@number01 +"^000000"; mes "^F5F9FD#^FFF9EE#^FFF9FA#^9400D3####^F8F8FF#^F5F9FD##^F7F7FF##"; next; input .@number; next; goto viochk; colblu: mes "^F8F8FF"+ .@number01 +"^000000^FFA500"+ .@number2 +"^000000^F7F7FF"+ .@number66 +"^000000^F5F9FD"+ .@number99 +"^000000"; mes "^FFF9EE"+ .@number09 +"^000000^A52A2A"+ .@number6 +"^000000^F5F9FD"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000"; mes "^F5F9FD"+ .@number08 +"^000000^FF0000"+ .@number1 +"^000000^F7F7FF"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000"; mes "^F8F8FF"+ .@number07 +"^000000^0000FF"+ .@number3 +"^000000^F5F9FD"+ .@number66 +"^000000^F5F9FD"+ .@number99 +"^000000"; mes "^FFF9EE"+ .@number06 +"^000000^008000"+ .@number5 +"^000000^F5F9FD"+ .@number66 +"^000000^FFF9EE"+ .@number99 +"^000000"; mes "^F5F9FD"+ .@number05 +"^000000^9400D3"+ .@number4 +"^000000^F7F7FF"+ .@number66 +"^000000^F5F9FD"+ .@number99 +"^000000"; mes "^FFF9EE###^0000FF####^F8F8FF####^F5F9FD#^FFF9FA#^F7F7FF##"; next; input .@number; next; goto bluchk; colorg: mes "^FFF9EE"+ .@number4 +"^000000^A52A2A"+ .@number6 +"^000000^F5F9FD"+ .@number07 +"^000000"; mes "^F8F8FF"+ .@number3 +"^000000^9400D3"+ .@number4 +"^000000^F5F9FD"+ .@number00 +"^000000"; mes "^F5F9FD"+ .@number1 +"^000000^FF0000"+ .@number1 +"^000000^F5F9FD"+ .@number06 +"^000000"; mes "^F8F8FF"+ .@number2 +"^000000^0000FF"+ .@number3 +"^000000^F5F9FD"+ .@number04 +"^000000"; mes "^F5F9FD"+ .@number5 +"^000000^FF8C00"+ .@number2 +"^000000^F5F9FD"+ .@number08 +"^000000"; mes "^F5F9FD"+ .@number6 +"^000000^008000"+ .@number5 +"^000000^F8F8FF"+ .@number10 +"^000000"; mes "^F5F9FD#^FFF9EE####^FFA500####^F5F9FD#^F5F9FD####^F7F7FF##^FFF9FA##"; next; input .@number; next; goto orgchk; colred: mes "^F5F9FD"+ .@number6 +"^000000^A52A2A"+ .@number6 +"^000000^F8F8FF"+ .@number10 +"^000000"; mes "^F8F8FF"+ .@number5 +"^000000^008000"+ .@number5 +"^000000^F5F9FD"+ .@number09 +"^000000"; mes "^F5F9FD"+ .@number3 +"^000000^9400D3"+ .@number4 +"^000000^F8F8FF"+ .@number08 +"^000000"; mes "^F8F8FF"+ .@number1 +"^000000^0000FF"+ .@number3 +"^000000^F5F9FD"+ .@number07 +"^000000"; mes "^F5F9FD"+ .@number2 +"^000000^FFA500"+ .@number2 +"^000000^F5F9FD"+ .@number05 +"^000000"; mes "^F8F8FF"+ .@number5 +"^000000^FF0000"+ .@number1 +"^000000^F5F9FD"+ .@number02 +"^000000"; mes "^F5F9FD##^FF0000####^F8F8FF####^FFF9FA#^FFF9EE#^F7F7FF#"; next; input .@number; next; goto redchk; redchk: if(.@number < .@number1 || .@number > .@number1) goto LOG_FAIL; goto OK; orgchk: if(.@number < .@number2 || .@number > .@number2) goto LOG_FAIL; goto OK; bluchk: if(.@number < .@number3 || .@number > .@number3) goto LOG_FAIL; goto OK; viochk: if(.@number < .@number4 || .@number > .@number4) goto LOG_FAIL; goto OK; grechk: if(.@number < .@number5 || .@number > .@number5) goto LOG_FAIL; goto OK; brochk: if(.@number < .@number6 || .@number > .@number6) goto LOG_FAIL; goto OK; LOG_FAIL: mes "Kamu salah mengetik nomor."; next; mes "Saya keluarkan kamu dari server!"; next; atcommand "@kick " + strcharinfo(0); end; OK: mes "^4233F4"+strcharinfo(0)+"^000000!"; mes "Terima kasih untuk tidak menggunakan bot di server ini."; announce "Player "+strcharinfo(0)+" masuk di server ini !!",bc_all; setoption 0x40,0; setoption 0x2000,0; pcblockmove getcharid(3),0; percentheal 100,100; atcommand "@noask"; cutin "ein_soldier",255; //callfunc "LadderWork","Cash",10,"#CASHPOINTS"; next; mes "Selamat bermain di server ini"; dispbottom "Cash points kamu sekarang "+#CASHPOINTS+"."; attachnpctimer; initnpctimer; set @loop, 0; close; gm_admin: mes "Selamat datang GM ^4233F4"+strcharinfo(0)+"^000000!"; announce "GM "+strcharinfo(0)+" masuk di server ini !!",bc_all; cutin "ein_soldier",255; //callfunc "LadderWork","Cash",10,"#CASHPOINTS"; next; mes "Selamat bermain di server ini"; dispbottom "Cash points kamu sekarang "+#CASHPOINTS+"."; close; }
  2. - script hourlypoints -1,{ OnPCLoginEvent: if( getd( ".L"+ getcharid(0) ) ) end; .@char_id = getcharid(0); setd ".L"+ .@char_id, 1; while(1) { .@loop__++; // +1 loop every 30 secs if( #hourly_reward == gettime(8) ) { .@loop__ = 0; if( .re_log ) end; } else if( checkvending() || checkchatting() ) { dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again."; end; } else if( checkidle() > 300 ) { if( .@loop__ > 1 ) dispbottom "The hourly points event is re-initialized because you were idle more than 5 minutes."; .@loop__ = 0; if( .re_log ) end; } else if( .@loop__ == 60*2 ) { #hourly_reward = gettime(8); getitem .reward_ID,1; dispbottom "You received 1 "+ getitemname( .reward_ID ) +" by staying ingame for 1 hour."; if( .re_log ) end; } dispbottom "ok"; sleep2 30000; if( !playerattached() ) { setd ".L"+ .@char_id, 0; end; } } end; OnInit: .re_log = 0; // player must relog to re-activate the hourly point ? (1: yes, 0: no) .reward_ID = 7227; // item ID reward when player not idle and online more than 1 hour end; } There was a bug I didn't make enough check.
  3. Just for duel mode conf/misc.conf // Allow using teleport/warp when dueling duel_allow_teleport: no Otherwise in pk mode, all map are pvp (except towns). Mapflag nowarp is not a good solution, you need a source modification.
  4. I agree with Lemongrass even if it need a lot of work to adapt this. Maybe it's another subject, another suggest but I take this opportunity to give my point of view : When I was a scripter gm newbie (it's not about 40 years, I'm not so old even if I'm telling my story) it was hard to play with all the @reload command and I take a lot of time to find what command I must do to reload the file I want (it need some test to find the right @reload for some db files) => I think the reload commands are not clearly identified from the beginning. I would prefer: @reload <empty> --> give help --> give all reload command and the file it reloads (if need) like -- itemdb : item_db, item_db2 etc.. -- skilldb : skill_db, etc.. and a space between @reload and the command (a submenu is more clear) @reload script @reload skilldb etc..
  5. 3 arrays with the map isn't it ? However I don't undersand the use of this command for a mob. getmapxy is currently used to get the exact localisation of a specific object and in the current state, we can't get the gid of a specific mob. If you want the localisation of monsters, I suggest to adapt @whereis or @mobsearch command to npc command (in array) and leave getmapxy to search a specific objet, not a collection. It's just my point of view.
  6. I suggest a little function that save the coordinated with Getmapxy in some @var after the player is warped. Then add a menu to retrieve the coordinated.
  7. In each file (kvm01, 02.. tierra01, 02.. ) 1/ search the waitingroom Sample: waitingroom "Battle Station",11,"start#bat_a02::OnReadyCheck",1,0,80; //*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>,<required zeny>,<min lvl>,<max lvl>}; 11 = <limit> : maximum number of people allowed to enter the chat room ---> 10 peoples can enter Change it as your content 2/ search OnReadyCheck: under this label, there is something like this if( .@Guillaume < 10 || .@Croix < 10 ) here 10 is the limit of player, chenge it as your content 3/ in kvm case (kvm01, 02.. files), you must change .Guillaume_Count and .Croix_Count variables too if( .Guillaume_Count < 5 || .Croix_Count < 5 )
  8. In src\config\renewal.h Comment the #define // #define RENEWAL etc.. then recompile > your server will be pre-re
  9. http://subversion.assembla.com/svn/ClientSide/Packets/Packet_db/
  10. In file kvm/kvm01.txt kvm/kvm02.txt kvm/kvm03.txt Search in each file the label OnReadyCheck: Under this label, search and replace if( .@Guillaume < 5 || .@Croix < 5 ) end; by if( .@Guillaume < 5 || .@Croix < 5 ) { announce .@Guillaume + "/5 guillaume side, "+ .@Croix +"/5 croix side",0; end; } There will be an announce each time a player enter in the waitingroom.
  11. I didn't find why too... but I cleaned this version and it seems the bug disappeared - script Juggernaut -1,{ // GM Menu // ------- if ( getgmlevel() >= 99 ) { mes .npc_name$; mes "You can choose to:"; mes "- enable/disable the enter,"; mes "- warp out players."; mes " "; mes "Enter Status: "+ ( .offline ? "^E00000OFFLINE^000000" : "^00A000ONLINE^000000" ); next; set .@sel, select( "^ff0000Player menu", "^777777~ "+ ( .offline ? "Enable" : "Disable" ), "~ Warp Out", "~ "+ ( .offline ? "Enable" : "Disable" ) +" + Warp Out^000000" ) -1; if( .@sel != 0 ) { if( .@sel&1 ) set .offline, .offline^1; if( .@sel&2 ) { getmapxy .@map$, .@x, .@y, 0; mapwarp "pvp_n_1-3", .@map$, .@x, .@y; } mes .npc_name$; mes "Done."; close; } } // Player menu // ----------- if ( .offline ) { mes .npc_name$; mes "Sorry, but I'm disabled at the moment."; close; } set .@jugg_user, getmapusers( "pvp_n_1-3" ); if ( .@jugg_user == 0 ) { set $@_juggernaut$, ""; movenpc "The Juggernaut",99,101; deletearray $@juggernaut; } if ( getvariableofnpc( .jugg_end, "The Juggernaut" ) == 1 ) { mes .npc_name$; mes "Welcome to the Juggernaut."; mes ""; mes "A game just ended please try again in 5 seconds."; close; } mes .npc_name$; mes "Welcome to the Juggernaut."; mes ""; mes "There are ^ff0000"+ .@jugg_user +"^000000 player(s) currently in the game."; mes ""; mes "Would you like to join?"; next; if( select( "- Yes", "- No" ) -1 ) { mes .npc_name$; mes "Come back when you want!"; close; } set @jugkill, 0; set @heal, 0; getmapxy #originmap$, #originx, #originy,0; set .@size_jug, getarraysize( $@juggernaut ); setarray $@juggernaut[ .@size_jug ], getcharid(3); warp "pvp_n_1-3", .coord_x[ .spawn ], .coord_y[ .spawn ]; save "pvp_n_1-3", .coord_x[ .spawn ], .coord_y[ .spawn ]; set .spawn, .spawn +1; if ( .spawn == 8 ) set .spawn, 0; percentheal 100,100; end; OnInit: set .npc_name$, "[ Juggernaut ]"; setarray .coord_x, 99, 60, 100, 140, 111, 112, 87, 87; setarray .coord_y, 58, 100, 138, 99, 110, 88, 88, 113; end; } pvp_n_1-3,99,101,4 script The Juggernaut 1198,{ if ( strcharinfo(0) != $@_juggernaut$ && $@_juggernaut$ != "" ) end; npcspeed 100; if ( $@_juggernaut$ == "" ) { OnJuggChangeEvent: set $@_juggernaut$, strcharinfo(0); announce "[ "+ $@_juggernaut$ +" ] is the Juggernaut!#@?%@?",bc_map; set .@acc_id, getcharid(3); set .@eac, eaclass(); while ( .@i < .size_job_type && .@eac&EAJ_UPPERMASK != .job_type[.@i] ) set .@i, .@i +1; unitskilluseid .@acc_id, .skill_id[.@i +1], 5; set .@job, .@i +1; set .@juggbuff, 9; } while ( strcharinfo(0) == $@_juggernaut$ && strcharinfo(3) == "pvp_n_1-3" ) { getmapxy .@map$, .@x, .@y, 0; getmapxy .@map_npc$, .@x_npc, .@y_npc, 1; if( distance( .@x, .@y, .@x_npc, .@y_npc ) > 15 ) movenpc "The Juggernaut", .@x, .@y; npcwalkto ( .@x +2 ), ( .@y +2 ); set .@juggbuff, .@juggbuff + 1; set .@jugglink, .@jugglink + 1; percentheal 2,3; if ( .@juggbuff == 10 ) { sc_start SC_BLESSING,11000, .bless_lvl[ .@job ]; skilleffect 34,0; sc_start SC_INCREASEAGI,11000, .agi_lvl[ .@job ]; skilleffect 29,0; sc_start SC_IMPOSITIO,11000,10; skilleffect 66,0; sc_start SC_SUFFRAGIUM,11000,10; skilleffect 67,0; sc_start SC_ADRENALINE2,11000,5; sc_start SC_WEAPONPERFECTION,11000,5; sc_start SC_OVERTHRUST,11000,5; sc_start SC_MAXIMIZEPOWER,11000,5; sc_start SC_ASSUMPTIO,11000,5; skilleffect 361,0; set .@juggbuff, 0; } if ( .@jugglink == 20 ) { unitskilluseid .@acc_id, .skill_id[ .@job ], 5; set .@jugglink, 0; } sleep2 1000; } end; L_EndEvent: set .@size_jug, getarraysize( $@juggernaut ); for ( set .@j, 0; .@j < .@size_jug; set .@j, .@j +1 ) { attachrid $@juggernaut[ .@j ]; sleep2 1; callsub L_Quit; } deletearray $@juggernaut, .@size_jug; sleep2 5000; set .jugg_end, 0; movenpc "The Juggernaut",99,101; end; OnPCKillEvent: if ( strcharinfo(3) != "pvp_n_1-3" ) end; if ( $@_juggernaut$ == rid2name( killedrid ) && $@_juggernaut$ != strcharinfo(0) ) { mapannounce "pvp_n_1-3", "The Juggernaut has fallen!",0; doevent "The Juggernaut::OnJuggChangeEvent"; } else if ( $@_juggernaut$ == strcharinfo(0) ) { set @jugkill, @jugkill + 1; set @towin, 20 - @jugkill; if ( @towin == 0 ) { set .jugg_end, 1; set @jugkill, 0; mapannounce "pvp_n_1-3", "Juggernaut: [ "+ $@_juggernaut$ +" ] has won the game!",0; set $@_juggernaut$, ""; goto L_EndEvent; } else mapannounce "pvp_n_1-3", "The Juggernaut, [ "+ $@_juggernaut$ +" ] needs "+ @towin +" kills to win.",0; } attachrid( killedrid ); set @heal, 0; if ( .jugg_end == 1 ) end; sleep2 1000; set .@newsave, rand( 1,5 ); if ( .@newsave == 1 ) warp "pvp_n_1-3", rand(53,96), rand(97,102); else if ( .@newsave == 2 ) warp "pvp_n_1-3", rand(97,102), rand(101,144); else if ( .@newsave == 3 ) warp "pvp_n_1-3", rand(102,152), rand(97,102); else if ( .@newsave == 4 ) warp "pvp_n_1-3", rand(97,102), rand(55,95); else if ( .@newsave == 5 ) warp "pvp_n_1-3", rand(83,112), rand(83,89); sleep2 500; percentheal 100,100; end; OnPCLogoutEvent: if ( strcharinfo(3) != "pvp_n_1-3" ) end; if ( $@_juggernaut$ == strcharinfo(0) ) { set $@_juggernaut$, ""; mapannounce "pvp_n_1-3", "The Juggernaut has left the game.",0; } if ( getmapusers( "pvp_n_1-3" ) == 1 ) { set $@_juggernaut$, ""; movenpc "The Juggernaut",99,101; } while ( getarraysize( $@juggernaut ) && .@i < getarraysize( $@juggernaut ) && $@juggernaut[@i] != getcharid(3) ) set .@i, .@i +1; if( .@i != getarraysize( $@juggernaut ) ) deletearray $@juggernaut[ .@i ], 1; callsub L_Quit, 1; L_Quit: for ( set .@j, 0; .@j < .size_sc_name; set .@j, .@j +1 ) sc_end .sc_name[ .@j ]; if ( #originmap$ == "" ) set #originmap$, "prontera"; save #originmap$, #originx, #originy; warp #originmap$, #originx, #originy; percentheal 100,100; set #originmap$, ""; set #originx, 0; set #originy, 0; set @heal, 0; if( getarg( 0,0 ) ) end; return; OnInit: setarray .job_type, EAJ_ALCHEMIST, EAJ_MONK, EAJ_SAGE, EAJ_CRUSADER, EAJ_SUPER_NOVICE, EAJ_KNIGHT, EAJ_WIZARD, EAJ_PRIEST, EAJ_BARDDANCER, EAJ_ROGUE, EAJ_ASSASSIN, EAJ_BLACKSMITH, EAJ_HUNTER, EAJ_SOUL_LINKER, EAJ_STAR_GLADIATOR, EAJ_TAEKWON; set .size_job_type, getarraysize( .job_type ); setarray .skill_id, 445, 447, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 460, 461, 448; setarray .bless_lvl, 30, 40, 50, 50, 50, 40, 50, 50, 40, 44, 40, 40, 40, 100, 40; setarray .agi_lvl, 10, 10, 20, 10, 30, 40, 10, 10, 20, 20, 10, 40, 40, 10, 20; setarray .sc_name, SC_BLESSING, SC_INCREASEAGI, SC_ASSUMPTIO, SC_OVERTHRUST, SC_WEAPONPERFECTION, SC_MAXIMIZEPOWER, SC_ADRENALINE2, SC_IMPOSITIO, SC_SUFFRAGIUM; set .size_sc_name, getarraysize( .sc_name ); // Reloadscript case // ----------------- set .@size, query_sql( "SELECT `account_id` FROM `char` WHERE `online` = 1 LIMIT 128", .@account_id ); for ( set .@j, 0; .@j < .@size; set .@j, .@j +1 ) { getmapxy .@map$, .@x, .@y, 0, rid2name( .@account_id[ .@j ] ); if( .@map$ == "pvp_n_1-3" ) { attachrid .@account_id[ .@j ]; callsub L_Quit; } } end; } // Healer // ------ - script healer::jugg_healer 829,{ if ( @heal == 0 ) { percentheal 100,100; set @heal, 1; } if ( eaclass()&EAJ_UPPERMASK == EAJ_PRIEST ) unitskilluseid getcharid(3),454,5; end; } // NPC leave // --------- - script leave_jugg::escape_jugg 780,{ mes .npc_name$; mes "Would you like to leave the Juggernaut event ?"; next; if ( select( "^777777~ No", "~ Yes^000000" ) == 1 ) { mes .npc_name$; mes "Ok, carry on."; close; } doevent "The Juggernaut::OnPCLogoutEvent"; end; OnInit: set .npc_name$, "[ Juggernaut ]"; end; } // ====== Mapflags pvp_n_1-3 mapflag nomemo pvp_n_1-3 mapflag noreturn pvp_n_1-3 mapflag restricted 6 // ====== Duplicates //pvp_n_1-3,116,83,5 duplicate(jugg_healer) Healer#1 829 //pvp_n_1-3,115,116,5 duplicate(jugg_healer) Healer#2 829 //pvp_n_1-3,138,108,5 duplicate(jugg_healer) Healer#3 829 //pvp_n_1-3,100,146,5 duplicate(jugg_healer) Healer#4 829 //pvp_n_1-3,83,116,5 duplicate(jugg_healer) Healer#5 829 //pvp_n_1-3,60,106,5 duplicate(jugg_healer) Healer#6 829 //pvp_n_1-3,83,83,5 duplicate(jugg_healer) Healer#7 829 //pvp_n_1-3,100,52,5 duplicate(jugg_healer) Healer#8 829 pvp_n_1-3,103,52,5 duplicate(escape_jugg) Leave Game#1 780 pvp_n_1-3,140,92,5 duplicate(escape_jugg) Leave Game#2 780 pvp_n_1-3,96,140,5 duplicate(escape_jugg) Leave Game#3 780 pvp_n_1-3,59,92,5 duplicate(escape_jugg) Leave Game#4 780 // pvp_n_1-3,53,98,4 duplicate(Grendal) Repair NPC#1 813 // pvp_n_1-3,93,59,4 duplicate(Grendal) Repair NPC#2 813 // pvp_n_1-3,147,99,4 duplicate(Grendal) Repair NPC#3 813 // pvp_n_1-3,107,138,4 duplicate(Grendal) Repair NPC #4 813 // Main Warper prontera,163,195,4 duplicate(Juggernaut) Juggernaut#0 810 morocc,164,97,4 duplicate(Juggernaut) Juggernaut#1 810 geffen,128,62,4 duplicate(Juggernaut) Juggernaut#2 810 payon,175,107,4 duplicate(Juggernaut) Juggernaut#3 810 alberta,122,58,4 duplicate(Juggernaut) Juggernaut#4 810 izlude,131,120,4 duplicate(Juggernaut) Juggernaut#5 810
  12. Maybe something like this ? - script iubiu -1,{ OnInit: setarray .@map_name$, "bat_c01", "bat_c02"; .@size_map = getarraysize( .@map_name$ ); for ( .@i = 0; .@i < .@size_map; .@i++ ) setmapflag .@map_name$[.@i], mf_loadevent; .bg_map$ = implode( .@map_name$, "|" ); end; OnPCLoadMapEvent: if ( !compare( .bg_map$, strcharinfo(3) ) || !getcharid(4) || getgmlevel() || @loop_bg ) end; @loop_bg++; while( compare( .bg_map$, strcharinfo(3) ) && getcharid(4) ) { sleep2 10000; if( checkidle() > 60 && checkidle() <= 70 ) announce "please move or you will get kicked", bc_self; else if( checkidle() > 90 && checkidle() <= 100 ) announce "you got 30 seconds to move", bc_self; else if( checkidle() > 120 ) { warp "SavePoint", 0, 0; break; } } @loop_bg = 0; end; }
  13. There is Monster vs monster http://www.eathena.ws/board/Monster-Vs-Monster-Arena-t27613.html I never properly test this script though There are others versions than this one, just search Monster vs monster.
  14. Well in the quest shop of Euphy, replace (or add after, like you want) prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop"; } by - script stqpdfg -1,{ OnInit: bindatcmd "cashshop",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: callfunc "qshop"; end; } @cashshop will display the shop menu Set the cash points in Add function, <point cost> // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2);
  15. Like this ? 12622,Boarding_Halter,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ setmounting(); },{},{}
  16. gonryun,166,114,5 script WoE Warper 843,{ if( getcharid(2) && ( eaclass()&EAJ_BASEMASK ) != EAJ_NOVICE ) { mes "you are not in a guild"; close; } mes "Do you want to go above the "+ ( .warp_type ? "krimtruc" : "bamboo" ) + " castle ?"; if ( select( "Yes", "No" ) -1 ) close; if( .warp_type ) warp "prtg_cas01" ,99,32; // krim castle else warp "prtg_cas01" ,99,32; // bamboo castle close; OnAgitStart: sleep 1; if( gettime(3) == 11 ) .warp_type = 1; // warp to krim else .warp_type = 0; // warp to bamboo hideoffnpc "WoE Warper"; end; OnInit: OnAgitEnd: hideonnpc "WoE Warper"; end; }
  17. Yes map-serv display a lot of things, npc errors are among them. The script need the sql table global_reg_value to properly work. I can't support txt server, I never try on txt
  18. Well I tested it. Gm in left corner send a potion to player in right. The script is then attach to the player and gm is stucked
  19. Check your mapserv and tell me if you have an error. Do you use eA/rA ?
  20. Make a new group id in conf/groups.conf which inherit all commands of yours players + the news commands Then in item_db, adjust the group with atcommand script on the equip/unequip part of the item 2601,Ring,Ring,5,30000,,100,,0,,0,0xFFFFFFFE,7,2,136,,20,0,0,{ },{ atcommand "@adjgroup 1 "+ strcharinfo(0); },{ atcommand "@adjgroup 0 "+ strcharinfo(0); }
  21. You're right but you should spawn another dragon when a player kill the real otherwise the event ends
  22. GM level above 5 are not in the ranking that's why the npc display this weird value. If you want a time value for the gm + not a time ranking for gm comment under OnPCLoginEvent // if( getgmlevel() >= 5) end;
  23. Maybe you will find what you want on the topic of the original post
  24. //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6 //===== Compatible With: ===================================== //= rAthena SVN r16862+ //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop"; } // Script Core //============================================================ - script quest_shop -1,{ function Add; function Chk; function Slot; function A_An; OnInit: // freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"#CASHPOINTS","Cash Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Headgears","Weapons","Other"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2); Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600); Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1); Add(1,5045,1,0,0,2252,1,1054,450,943,1200); sleep 1; Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10); Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10); Add(3,531,1,3,0,512,1,713,1); Add(3,532,1,3,0,513,1,713,1); Add(3,533,1,3,0,514,1,713,1); Add(3,534,1,3,0,515,1,713,1); // ----------------------------------------------------------- // freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set .@i, select(.menu$); else if (.@size == 1) set .@i, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set .@i, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[.@i] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop"+.@i,1; npcshopattach "qshop"+.@i; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } mes "[Quest Shop]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512)) && @qe[2] > 0) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[6])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Quest Shop]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; specialeffect2 699; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), 1; if (@qe[1] & 1) changelook LOOK_HEAD_BOTTOM, @qe[2]; if (@qe[1] & 256) changelook LOOK_HEAD_TOP, @qe[2]; if (@qe[1] & 512) changelook LOOK_HEAD_MID, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[6]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; } deletearray @qe[0],7; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; getarg( .@i,0 ) > 0; set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } } function script qshop { deletearray @i[0],getarraysize(@i); for(set .@i,0; getarg( .@i,0 ) > 0; set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "quest_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 - shop qshop5 -1,909:-1 if you have many items, add some sleep between add functions Add(1,5045,1,0,0,2252,1,1054,450,943,1200); sleep 1; Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10);
  25. Check this post for the script A GM can give an item for all players online and offline, offline players get the item once they log in
×
×
  • Create New...