Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. I hope you know what you are talking about this is a npc script, and only configure castle open and close IN GAME to make it show on your control panel, you have to write it on your control panel, which is 3rd party support
  2. address people properly <.<its madam ... setarray .rate, 40,30,20,10; // rate of getting +1 is 40%, +2 is 30%, +3 is 20%, +4 is 10% .item_id = 7227; // item ID requirement use to enchant setarray .item_req, 3,5,7; // require 3 items to make 1st enchant, 5 items to make 2nd enchant ... while ( .@i < 4 ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } end; already did it .item_id = 7227; // item ID requirement use to enchant setarray .item_req, 3,5,7; // require 3 items to make 1st enchant, 5 items to make 2nd enchant ... nvm .... prontera,156,179,5 script Armor Echant 100,{ mes "[^0000FFArmor Enchant^000000]"; mes "Do you want to Enchat your ^0000FFArmor^000000?"; next; if ( select ( "Yes", "No" ) == 2 ) close; mes "[^0000FFArmor Enchant^000000]"; if ( !getequipisequiped( EQI_ARMOR ) ) { mes "You dont have any ^0000FFArmor^000000 that is being equipped."; close; } .@id = getequipid( EQI_ARMOR ); .@ref = getequiprefinerycnt( EQI_ARMOR ); .@card1 = getequipcardid( EQI_ARMOR, 0 ); .@card2 = getequipcardid( EQI_ARMOR, 1 ); .@card3 = getequipcardid( EQI_ARMOR, 2 ); .@card4 = getequipcardid( EQI_ARMOR, 3 ); if ( .@card1 == 255 || .@card1 == 254 ) { mes "I can't enchant a signed equipment."; close; } if ( !.@card4 ) .@enchant = 0; else if ( !.@card3 ) .@enchant = 1; else if ( !.@card2 ) .@enchant = 2; else { mes "Sorry, this ^0000FFArmor^000000 has already been enchanted 3 times."; close; } if ( countitem( .item_id ) < .item_req[ .@enchant ] ) { mes "Sorry, you need "+ .item_req[ .@enchant ] +" "+ getitemname( .item_id ) +" to enchant this armor."; close; } .@rand = rand(.totalchance); while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++; .@o = rand(0,5); // orb of str/int/dex ... delitem .item_id, .item_req[ .@enchant ]; delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, .@card4; if ( !.@card4 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r; else if ( !.@card3 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, 4700 + .@o * 10 + .@r, .@card4; else getitem2 .@id, 1,1, .@ref, 0, .@card1, 4700 + .@o * 10 + .@r, .@card3, .@card4; equip .@id; mes "Armor Enchancement successful !"; close; OnInit: setarray .rate, 40,30,20,10; // rate of getting +1 is 40%, +2 is 30%, +3 is 20%, +4 is 10% .item_id = 7227; // item ID requirement use to enchant setarray .item_req, 3,5,7; // require 3 items to make 1st enchant, 5 items to make 2nd enchant ... while ( .rate[.@i] ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } end; } EDIT: fix typo .@enhance ...
  3. looks like its fixed now however it seems that we have to npcspeed 150; for now
  4. you have started to test my patience <.< next time better explain as detailed as possible in your 1st post prontera,156,178,5 script ldfhsdfkljs 100,{ if ( petstat(PET_CLASS) ) { mes "please return your pet into egg state to continue"; close; } getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( @inventorylist_card1[.@i] == -256 ) { query_sql "select class, level, equip, name from pet where pet_id = "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ), .@class, .@level, .@equipped, .@name$; .@menu$ = .@menu$ +"^0000FF"+ .@name$ +" ^00CC00{"+ getmonsterinfo( .@class, 0 ) +"} ^000000["+ .@level +"] ^FF0000"+( ( .@equipped )? "*equipped" : "" )+":"; .@pet_id[.@c] = .@id; .@egg_id[.@c] = @inventorylist_id[.@i]; .@pet_name$[.@c] = .@name$; .@pet_class[.@c] = .@class; .@pet_level[.@c] = .@level; .@pet_equipped[.@c] = .@equipped; .@c++; } } if ( !.@c ) { mes "your inventory doesn't have any pet egg"; close; } mes "select which pet that you want it to evolve"; next; .@s = select( .@menu$ ) -1; mes "selected : "+ .@pet_name$[.@s]; mes "level : "+ .@pet_level[.@s]; mes "equipped : "+( ( .@pet_equipped[.@s] )? "Yes" : "No" ); if ( getd( ".petr"+ .@pet_class[.@s] ) ) { mes "require :-"; .@size = getarraysize( getd( ".petr"+ .@pet_class[.@s] ) ); for ( .@i = 0; .@i < .@size; .@i += 2 ) mes getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" )+"x "+ getitemname( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ); } next; if ( !getd( ".pet"+ .@pet_class[.@s] ) ) { mes "this pet cannot evolve any further"; close; } if ( .@pet_level[.@s] < .min_level ) { mes "this pet doesn't meet the level requirement"; close; } if ( .@pet_equipped[.@s] ) { mes "please unequip this pet accesory to continue"; close; } if ( getd( ".petr"+ .@pet_class[.@s] ) ) { .@size = getarraysize( getd( ".petr"+ .@pet_class[.@s] ) ); for ( .@i = 0; .@i < .@size; .@i += 2 ) { if ( countitem( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ) < getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ) ) { mes "you need "+ getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ) +" to evolve this pet"; close; } } for ( .@i = 0; .@i < .@size; .@i += 2 ) delitem getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ), getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ); } delitem2 .@egg_id[.@s], 1, 1, 0, 0, -256, ( .@pet_id[.@s] % ( 1 << 16 ) - ( .@remainder15 = .@pet_id[.@s] % ( 1 << 15 ) ) < ( 1 << 15 ) )? .@remainder15 : ( .@remainder15 - ( 1 << 15 ) ), .@pet_id[.@s] >> 16, 0; makepet .@get_pet_id = getd( ".pet"+ .@pet_class[.@s] +"["+ rand( getarraysize( getd( ".pet"+ .@pet_class[.@s] ) ) ) +"]" ); mes "your "+ .@pet_name$[.@c] +" has reborn into "+ getmonsterinfo( .@get_pet_id, 0 ); mes "please rename your pet ~"; close; OnInit: .min_level = 80; // minimum level 80 to change pet egg // setarray getd( ".petr"+ <require pet egg> ), <require itemID 1>, <require item require 1>, <require itemID 2>, <require item require 2>, ... setarray getd( ".petr"+ 1002 ), 501,1, 502,2, 503,10; setarray getd( ".petr"+ 1011 ), 512,5, 513,8, 514,20; // setarray getd( ".pet"+ <require pet egg> ), <random pet egg 1>, <random pet egg 2> .... setarray getd( ".pet"+ 1002 ), 1113, 1031; // poring pet(1002) can evolve into drops(1113) or poporing(1031) setarray getd( ".pet"+ 1011 ), 1042; // chonchon(1011) can evolve into steel chonchon(1042) // add more as needed end; }
  5. your script will spam the error multiple time according to the times that you have teleport try @load multiple times and wait for 60 seconds after that
  6. http://www.eathena.ws/board/index.php?showtopic=174578 revamp this script entirely replace into item_db2 values ( 31061, 'Super_Player_card', 'Super Player card', 3, 10, null, 1, null, null, null, null, 2147483647, 7, 2, null, null, null, null, null, null, null, null ); replace into item_db2 values ( 31062, 'Hyper_Player_card', 'Hyper Player card', 3, 10, null, 1, null, null, null, null, 2147483647, 7, 2, null, null, null, null, null, null, null, null ); replace into item_db2 values ( 31063, 'Ultra_Player_card', 'Ultra Player card', 3, 10, null, 1, null, null, null, null, 2147483647, 7, 2, null, null, null, null, null, null, null, null ); // ~~~~~ 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]; 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 ) end; addtimer .@left *1000, "player_demoter::Ondemote"; 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; }
  7. prontera,156,179,5 script Armor Echant 100,{ mes "[^0000FFArmor Enchant^000000]"; mes "Do you want to Enchat your ^0000FFArmor^000000?"; next; if ( select ( "Yes", "No" ) == 2 ) close; mes "[^0000FFArmor Enchant^000000]"; if ( !getequipisequiped( EQI_ARMOR ) ) { mes "You dont have any ^0000FFArmor^000000 that is being equipped."; close; } .@id = getequipid( EQI_ARMOR ); .@ref = getequiprefinerycnt( EQI_ARMOR ); .@card1 = getequipcardid( EQI_ARMOR, 0 ); .@card2 = getequipcardid( EQI_ARMOR, 1 ); .@card3 = getequipcardid( EQI_ARMOR, 2 ); .@card4 = getequipcardid( EQI_ARMOR, 3 ); if ( .@card1 == 255 || .@card1 == 254 ) { mes "I can't enchant a signed equipment."; close; } if ( !.@card4 ) .@enchant = 0; else if ( !.@card3 ) .@enchant = 1; else if ( !.@card2 ) .@enchant = 2; else { mes "Sorry, this ^0000FFArmor^000000 has already been enchanted 3 times."; close; } if ( countitem( .item_id ) < .item_req[ .@enchant ] ) { mes "Sorry, you need "+ .item_req[ .@enchant ] +" "+ getitemname( .item_id ) +" to enchant this armor."; close; } .@rand = rand(.totalchance); while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++; .@o = rand(0,5); // orb of str/int/dex ... delitem .item_id, .item_req[ .@enchance ]; delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, .@card4; if ( !.@card4 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r; else if ( !.@card3 ) getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, 4700 + .@o * 10 + .@r, .@card4; else getitem2 .@id, 1,1, .@ref, 0, .@card1, 4700 + .@o * 10 + .@r, .@card3, .@card4; equip .@id; mes "Armor Enchancement successful !"; close; OnInit: setarray .rate, 50,33,17; // rate of getting +1 is 50%, +2 is 33%, +3 is 17% .item_id = 7227; // item ID requirement use to refine setarray .item_req, 3,5,7; while ( .@i < 3 ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } end; }
  8. http://rathena.org/board/topic/72376-mvp-summon-script/#entry146696
  9. oh you mean need another item to make poring egg + { 1 item } --> drops egg / poporing egg try this prontera,156,178,5 script ldfhsdfkljs 100,{ if ( petstat(PET_CLASS) ) { mes "please return your pet into egg state to continue"; close; } getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( @inventorylist_card1[.@i] == -256 ) { query_sql "select class, level, equip, name from pet where pet_id = "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ), .@class, .@level, .@equipped, .@name$; .@menu$ = .@menu$ +"^0000FF"+ .@name$ +" ^00CC00{"+ getmonsterinfo( .@class, 0 ) +"} ^000000["+ .@level +"] ^FF0000"+( ( .@equipped )? "*equipped" : "" )+":"; .@pet_id[.@c] = .@id; .@egg_id[.@c] = @inventorylist_id[.@i]; .@pet_name$[.@c] = .@name$; .@pet_class[.@c] = .@class; .@pet_level[.@c] = .@level; .@pet_equipped[.@c] = .@equipped; .@c++; } } if ( !.@c ) { mes "your inventory doesn't have any pet egg"; close; } mes "select which pet that you want it to evolve"; next; .@s = select( .@menu$ ) -1; mes "selected : "+ .@pet_name$[.@s]; mes "level : "+ .@pet_level[.@s]; mes "equipped : "+( ( .@pet_equipped[.@s] )? "Yes" : "No" ); if ( getd( ".pet"+ .@pet_class[.@s] ) ) mes "require : "+ getitemname( getd( ".pet"+ .@pet_class[.@s] ) ); next; if ( !getd( ".pet"+ .@pet_class[.@s] ) ) { mes "this pet cannot evolve any further"; close; } if ( .@pet_level[.@s] < .min_level ) { mes "this pet doesn't meet the level requirement"; close; } if ( .@pet_equipped[.@s] ) { mes "please unequip this pet accesory to continue"; close; } if ( !countitem( getd( ".pet"+ .@pet_class[.@s] ) ) ) { mes "you need "+ getitemname( getd( ".pet"+ .@pet_class[.@s] ) ) +" to evolve this pet"; close; } delitem getd( ".pet"+ .@pet_class[.@s] ), 1; delitem2 .@egg_id[.@s], 1, 1, 0, 0, -256, ( .@pet_id[.@s] % ( 1 << 16 ) - ( .@remainder15 = .@pet_id[.@s] % ( 1 << 15 ) ) < ( 1 << 15 ) )? .@remainder15 : ( .@remainder15 - ( 1 << 15 ) ), .@pet_id[.@s] >> 16, 0; makepet .@get_pet_id = getd( ".pet"+ .@pet_class[.@s] +"["+ rand( 1, getarraysize( getd( ".pet"+ .@pet_class[.@s] ) ) -1 ) +"]" ); mes "your "+ .@pet_name$[.@c] +" has reborn into "+ getmonsterinfo( .@get_pet_id, 0 ); mes "please rename your pet ~"; close; OnInit: .min_level = 80; // minimum level 80 to change pet egg // array getd( ... + <require pet egg> ), <require item>, <random pet egg 1>, <random pet egg 2> .... setarray getd( ".pet"+ 1002 ), 501, 1113, 1031; // poring pet(1002) with red pot(501) can evolve into drops(1113) or poporing(1031) setarray getd( ".pet"+ 1011 ), 502, 1042; // chonchon(1011) with orange pot(502) can evolve into steel chonchon(1042) // add more as needed end; }
  10. AnnieRuru

    PvP Room

    prontera,150,187,5 script Arena 413,{ switch( select( "2nd Class Arena [ "+getmapusers("pvp_y_1-2")+" Users ]", "3rd class Arena [ "+getmapusers("pvp_y_2-2")+" Users ]", "No Donation 2nd Job [ "+getmapusers("pvp_y_3-2")+" Users ]", "No Donation 3rd Job [ "+getmapusers("pvp_y_4-2")+" Users ]", "One on One [ "+getmapusers("pvp_y_5-2")+" Users ]", "Info" ) ) { case 1: if ( upper & 4 ){ mes "You are not 2nd Class , so you cant enter."; }else{ warp "pvp_y_1-2",0,0; announce ""+strcharinfo(0)+" Has Enter PvP 2nd Class Room !!",bc,0xBAB9B9; } break; case 2: if ( !( upper & 4 ) ){ mes "You are not 3rd Class , so you cant enter."; }else{ warp "pvp_y_2-2",0,0; announce ""+strcharinfo(0)+" Has Enter PvP 3rd Class Room !!",bc,0xBAB9B9; } break; case 3: if ( upper & 4 ){ mes "You are not 2nd Job class , so you cant enter."; }else{ for( set .@i,0; .@i<getarraysize(.NoDonator_ids); set .@i,.@i+1 ) if (countitem(.NoDonator_ids[.@i])) { mes "You can not bring God items in this pvp."; close; } warp "pvp_y_3-2",0,0; announce ""+strcharinfo(0)+" Has Enter PvP No Donation 2nd Job Room !!",bc,0xBAB9B9; } break; case 4: if ( !( upper & 4 ) ){ mes "You are not 3rd Class , so you cant enter."; }else{ for( set .@i,0; .@i<getarraysize(.NoDonator_ids); set .@i,.@i+1 ) if (countitem(.NoDonator_ids[.@i])) { mes "You can not bring God items in this pvp."; close; } warp "pvp_y_4-2",0,0; announce ""+strcharinfo(0)+" Has Enter PvP No Donation 3rd Class Room !!",bc,0xBAB9B9; } break; case 5: if ( getmapusers("pvp_y_5-2") > 1 ) { mes "please wait until 1 of them has fallen"; } else { warp "pvp_y_5-2",0,0; announce ""+strcharinfo(0)+" Has Enter PvP One on One Room !!",bc,0xBAB9B9; } break; case 6: mes "The PvP Room is free for all wants to fight each other,"; break; } close; OnInit: waitingroom "PvP Warper ",0; // items not allowed in Non Donator PVP setarray .NoDonator_ids[0], 2410, 1530, 2629, 2630, 16007, 31000, 31001, 31002, 31003; end; }
  11. - script kjdhfksdjf -1,{ OnInit: .map$ = "guild_vs2"; // set the map here setmapflag .map$, mf_loadevent; end; OnPCLoadMapEvent: if ( strcharinfo(3) != .map$ ) end; if ( statuspoint ) { warp "SavePoint", 0,0; dispbottom "Warning message"; } end; }
  12. rofl ... me is sarcastic, I make scripts for rathena only hmm guess_password0.2.txt - add configuration for npc name that has to match npc name - fix a bug that if previous round has setup locations already, and re-host the game again, map-server throw error because of .@map$[.@id] should be .map$[.@id]
  13. I believe my script should work on that revision ...you should ask this question in server support ... me make scripts only, don want support other kind of questions
  14. poring_c01 mapflag pvp poring_c01 mapflag pvp_noparty poring_c01 mapflag pvp_noguild poring_c01 mapflag partylock and add the check like Capuche did... or perhaps its better to add that check after this line menu "Register",-,"What is LMS?",what,"Leave",leave; next; if ( getcharid(1) ) <-- here
  15. com'on ... everything is possible ... however ... http://rathena.org/board/forum-32/announcement-10-script-request-rules/ this topic doesn't even explain properly what you are doing ... prontera,154,178,5 script kjdfhksdfjh 100,{ getitem callfunc( "F_RandMes", 10, 501,502,503,504,505, 1101,1201,1301,1401,1501 ), 1; end; }
  16. guess_password0.1.txt this is not simple script though, but might be fun if I release it
  17. ROFL !! - script gm_build_array_online -1,{ OnInit: .gm_level = 60; // set min gm level here if ( getusers(1) ) end; deletearray $gm_online_aid; $gm_online_count = 0; end; OnPCLoginEvent: if ( getgmlevel() < .gm_level ) end; // WAHAHAHAHHA $gm_online_aid[ $gm_online_count ] = getcharid(3); $gm_online_count++; end; OnPCLogoutEvent: if ( getgmlevel() < .gm_level ) end; // totally forgot x.x while ( $gm_online_aid[.@i] != getcharid(3) && .@i < $gm_online_count ) .@i++; if ( .@i == $gm_online_count ) end; // prevent @loadnpc/@reloadscript bug becos not in the array deletearray $gm_online_aid[.@i], 1; $gm_online_count--; end; } - script announce_every_player -1,{ OnPCLoginEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has online"; end; OnPCLogoutEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has offline"; end; }
  18. @request command spam my PM box <.< I'll do another way - script gm_build_array_online -1,{ OnInit: .gm_level = 60; // set min gm level here if ( getusers(1) ) end; deletearray $gm_online_aid; $gm_online_count = 0; end; OnPCLoginEvent: $gm_online_aid[ $gm_online_count ] = getcharid(3); $gm_online_count++; end; OnPCLogoutEvent: while ( $gm_online_aid[.@i] != getcharid(3) && .@i < $gm_online_count ) .@i++; if ( .@i == $gm_online_count ) end; // prevent @loadnpc/@reloadscript bug becos not in the array deletearray $gm_online_aid[.@i], 1; $gm_online_count--; end; } - script announce_every_player -1,{ OnPCLoginEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has online"; end; OnPCLogoutEvent: for ( .@i = 0; .@i < $gm_online_count; .@i++ ) message rid2name( $gm_online_aid[.@i] ), strcharinfo(0) +" has offline"; end; }
  19. <.< this is my infamous portal event script http://www.eathena.ws/board/index.php?showtopic=242886 update the script a little portal_event1.0c.txt one day gonna mass update this script
  20. I just thought wanna make this script a bit more readability, prontera,156,182,5 script Clemy 703,{ end; OnFri2048: OnFri2050: goto L_start; OnFri2049: OnFri2051: goto L_end; OnInit: if ( gettime(4) == 5 && gettime(3) == 20 && gettime(2) == 48 || gettime(4) == 5 && gettime(3) == 20 && gettime(2) == 50 ) goto L_start; else goto L_end; L_start: enablenpc strnpcinfo(0); .start = 1; .@interval = 2; .@step = 5; while ( .start ) { sleep .@interval * 1000; getmapxy .@map$, .@x, .@y, 1; while ( checkcell( .@map$, .@npc_x = .@x + rand( -.@step, .@step ), .@npc_y = .@y + rand( -.@step, .@step ), cell_chknopass ) ); // announce .@map$ +" "+ .@npc_x +" "+ .@npc_y, 0; npcwalkto .@npc_x, .@npc_y; npctalk callfunc( "F_RandMes", 2, "Heloo!!!", // 1 "Goodbye~!" // 2 ); } end; L_end: .start = 0; disablenpc strnpcinfo(0); end; } then only found out the problem is npcmove script commmand is not working in latest SVN dunno what the cause lol http://rathena.org/board/tracker/issue-7165-npcwalkto-not-working-in-latest-svn/#entry17196
  21. make me spoon feed <.< - script inst cutins -1,{ OnPCLoadMapEvent: while ( !compare( strcharinfo(3), .town$[.@i] ) && .@i < 4 ) .@i++; if ( .@i == 4 || @town_map_cutin_loaded & 1 << .@i ) end; @town_map_cutin_loaded = @town_map_cutin_loaded | 1 << .@i; sleep2 2000; cutin .pic$[.@i], 4; sleep2 3000; cutin "", 255; end; OnInit: setarray .town$, "1@tower", "2@tower", "prontera"; setarray .pic$, "sign_01", "sign_02", "sign_01"; while ( .@i < 4 ) { setmapflag .town$[.@i], mf_loadevent; .@i++; } end; } //instance script debugging <.< function script instance__ { if ( ( .@ins = instance_create( getarg(0), getcharid(1) ) ) < 0 ) return .@ins; .@i = 3; while ( getstrlen( getarg( .@i, "" ) ) ) { if ( !getstrlen( instance_attachmap( getarg(.@i), .@ins ) ) ) { instance_destroy .@ins; return -5; } .@i++; } if ( getarg(1) || getarg(2) ) instance_set_timeout getarg(1), getarg(2), .@ins; instance_init .@ins; instance_attach .@ins; return .@ins; } prontera,156,178,5 script kjdfhdksfjs 100,{ if ( !getcharid(1) ) { mes "you need a party to get in"; close; } if ( instance_id(1) ) { mes "your party is currently running an instance"; close; } if ( ( .@inst = callfunc( "instance__", "test instance", 0, 10, "1@tower", "2@tower" ) ) < 0 ) { mes "failed to create instance : "+ .@inst; close; } warpparty "1@tower", 0,0, getcharid(1); monster "this", -1,-1, "--ja--", 1002, 1, instance_npcname("dnvasdfwerq")+"::Onkill" ; end; } 1@tower,0,0,0 script dnvasdfwerq -1,{ Onkill: if ( strcharinfo(3) == has_instance( "1@tower" ) ) { warpparty "2@tower", 0,0, getcharid(1); monster "this", -1,-1, "--ja--", 1002, 1, instance_npcname("dnvasdfwerq")+"::Onkill" ; } else if ( strcharinfo(3) == has_instance( "2@tower" ) ) { warpparty "SavePointAll", 0,0, getcharid(1); sleep2 1; instance_destroy; } end; }
  22. https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/db/re/item_noequip.txt seems like I've tried, I'm able to save up to 32768, zone 11 perhaps the item_noequip.txt and skill_nocast_db.txt should make an update for it
  23. instanced map, the map name from 1@tower becomes 0011@tower that's why if you do strcharinfo(3) != .town$[.@i] will not work perhaps !compare( strcharinfo(3), .town$[.@i] ) might do the trick
  24. prontera,155,181,5 script kldjhfksdjhf 100,{ getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( @inventorylist_equip[.@i] & ( 1 << 10 ) ) { dispbottom "you are wearing "+ getitemname( @inventorylist_id[.@i] ); break; } } if ( isequipped(19515) ) dispbottom "yes, you are wearing a yellow hat"; end; } *getinventorylist can retrieve a costume item its hex value is and I tested with @item 19515 and @item 19516 ... seems to work
  25. http://www.eathena.w...howtopic=273306 me and toasty already did it in the past checkidle() ... somehow I feel its not necessary though OnPCIdleEvent seems more practical like in battleground script OnPCIdleEvent: if ( getcharid(4) ) bg_leave; like this perhaps we should do ... OnPCCheckIdleEvent: execute every time the player move, use skill, use item ... etc and push another variable @idle_timer which was the gettimetick(2) of the time when the player last action usage <npc>,{ dispbottom "you have idle for "+( gettimetick(2) - @idle_timer )+" seconds"; end; OnPCCheckIdleEvent: if ( !getcharid(4) ) end; deltimer strnpcinfo(0)+"::OnIdle"; addtimer 300000, strnpcinfo(0)+"::OnIdle"; end; OnIdle: dispbottom "you have idle for 5 minutes !"; bg_leave; end; } all right, I have fun with this lol OnPCIdleEvent_17092.diff prontera,155,186,5 script kdjhfksjfss 100,{ dispbottom "you have idle for "+( gettimetick(2) - @last_action_timer )+" seconds"; end; OnPCIdleEvent: deltimer strnpcinfo(0)+"::OnIdle"; addtimer 5000, strnpcinfo(0)+"::OnIdle"; end; OnIdle: dispbottom "Oooii! wake up !"; end; } EDIT: somehow OnPCIdleEvent is very resource intensive ... is there other methods that's more resource friendly ?
×
×
  • Create New...