Jump to content

Skorm

Forum Moderator
  • Posts

    1282
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Skorm

  1. I don't have this problem. Try putting sleep2(2000); after OnPCStatCalcEvent:
  2. If you're using rAthena you could do it like this... OnNPCKillEvent: if( killedrid == 3054 ) { message strcharinfo(0),"You've killed the Dragon!"; addrid( 2, 0, getcharid(1) ); sc_start SC_BLESSING, 300000, 50; sc_start SC_INCREASEAGI, 300000, 50; sc_start SC_MAGNIFICAT, 300000, 5; sc_start SC_ANGELUS, 300000, 10; specialeffect2 668; } end; It would be much better for your server to do it like this... - script NPCNAME -1,{ On3054DeathEvent: message strcharinfo(0),"You've killed the Dragon!"; addrid( 2, 0, getcharid(1) ); sc_start SC_BLESSING, 300000, 50; sc_start SC_INCREASEAGI, 300000, 50; sc_start SC_MAGNIFICAT, 300000, 5; sc_start SC_ANGELUS, 300000, 10; specialeffect2 668; end; } Which would work with either... monster "prontera",0,0,"--ja--",3054,1,"NPCNAME::On3054DeathEvent"; Or prontera,0,0,20,20 monster --ja-- 3054,1,0,0,"NPCNAME::On3054DeathEvent"
  3. - shop ex_card_shop -1,501:1000 prontera,160,181,5 script card_exchange 474,{ mes "[ Card Exchange ]"; mes "Give to me your old cards in exchange I'll give you OCA."; mes "You currently have "+ex_cd_pts+" point(s)."; mes "Each card equals "+.points+" point(s)."; mes .limit+" point(s) will earn you "+.amount+" "+getitemname(.item)+"(s)."; callshop "ex_card_shop",2; npcshopattach "ex_card_shop"; end; OnSellItem: for (.@i = 0; .@i < getarraysize(@sold_nameid); .@i++) { if( getiteminfo( @sold_nameid[.@i], 2 ) != 6 ) { dispbottom "I only accept cards."; end; } if( .mvp ) { .@str$ = substr( getitemname( @sold_nameid[.@i] ), 0, getstrlen( getitemname(@sold_nameid[.@i]) ) -6 ); query_sql ( "SELECT count(*) FROM `mob_db_re` WHERE `iName` LIKE '"+.@str$+"' AND `MEXP`;", .@count ); if( .@count ) { dispbottom "I'm sorry but I don't accept mvp cards..."; end; } } if( countitem( @sold_nameid[.@i] ) < @sold_quantity[.@i] ) { dispbottom "Wth...?"; end; } delitem @sold_nameid[.@i], @sold_quantity[.@i]; ex_cd_pts = ex_cd_pts + ( @sold_quantity[.@i] * .points ); if( ex_cd_pts >= .limit ) { ex_cd_pts = ex_cd_pts % .limit; .@numbers = ex_cd_pts / .limit; getitem .item, .@numbers * .amount; } } end; OnInit: .mvp = 1; // Search and ignore mvp cards? .points = 1; // Points per card. .limit = 7; // The number of points required for ".item". .item = 616; // Item you get for reaching ".limit". .amount = 1; // The amount of ".item" you get per ".limit" reached. }
  4. It's not missing anything. It works fine for me, and I've tested it multiple times with different characters of varying gm levels. If that version isn't working for you try the untrimmed version I posted instead.
  5. Ugh no.... This is the script... - script fake_name -1,{ OnInit: set .eventmap$, "|turbo_roomc|morocc_mem|pvp_y_8-2|"; end; OnPCStatCalcEvent: set .@map$, "|"+strcharinfo(3)+"|"; if ( @fakename && !compare( .eventmap$, .@map$ ) || !@fakename && compare( .eventmap$, .@map$ ) ) { set @fakename, @fakename ? 0 : 1; charcommand "#fakename \""+ strcharinfo(0) +"\""+( @fakename ? "Player" : "" ); } } That's it nothing else.
  6. That isn't an edit the above post is the full script.
  7. Untrimmed: Trimmed: - script fake_name -1,{ OnInit: set .eventmap$, "|turbo_roomc|morocc_mem|pvp_y_8-2|"; end; OnPCStatCalcEvent: set .@map$, "|"+strcharinfo(3)+"|"; if ( @fakename && !compare( .eventmap$, .@map$ ) || !@fakename && compare( .eventmap$, .@map$ ) ) { set @fakename, @fakename ? 0 : 1; charcommand "#fakename \""+ strcharinfo(0) +"\""+( @fakename ? "Player" : "" ); } } That was part of the script.
  8. prontera,150,175,0 script testparty 521,{ npctalk "You're required to enter the waitingroom."; end; OnInit: waitingroom "test",11,"testparty::OnFull",3; end; OnFull: getmapxy .@map$, .@x, .@y, 1; warpwaitingpc .@map$, .@x, .@y; for ( .@i = 0; .@i < $@warpwaitingpcnum; .@i++ ) { .@name$ = rid2name($@warpwaitingpc[.@i]); .@char_id = getcharid( 0, .@name$ ); if ( getcharid( 1, .@name$ ) > 0 ) party_delmember( .@char_id ); sleep 100; if ( .@create == 0 ) { while( party_create( "party"+ rand(10000), .@char_id ) == -3 ); .@create = 1; } else if ( $@party_create_id ) party_addmember $@party_create_id, .@char_id; } end; OnPCLogoutEvent: .@logged = 1; OnPCStatCalcEvent: if ( strcharinfo(3) == "prontera" && !.@logged || strcharinfo(3) != "prontera" && .@logged || getcharid(1) == 0 ) end; .@party_id = getcharid(1); if ( getcharid(0) != getpartyleader( .@party_id, 2 ) ) party_delmember(); else { .i = 0; if ( instance_check_party(.@party_id,2) == 0 ) party_destroy(.@party_id); else { addrid( 2, 0, .@party_id ); if( !.i && !.@party_id ) { .i = 1; party_changeleader getcharid(1), getcharid(0); } else if( .@party_id ) party_delmember(); } } end; } Remember to set where it says "prontera" to your map.
  9. Replace: while( party_create( "party"+ rand(10000), 1 ) == -3 ); With: while( party_create( "party"+ rand(10000), .@char_id ) == -3 ); About your other question; yes it does.
  10. - script fake_name -1,{ OnInit: set .eventmap$, "turbo_roomc|morocc_mem|pvp_y_8-2"; end; OnPCLoadMapEvent: if( compare( "|"+.eventmap$+"|", "|"+strcharinfo(3)+"|" ) ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; set @death, 0; detachrid; charcommand "#fakename \""+ .@strcharinfo$ +"\" Player"; } end; OnPCDieEvent: if ( @fakename && compare( "|"+.eventmap$+"|", "|"+strcharinfo(3)+"|" ) ) { set @death, @death + 1; if( @death == 2 ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 0; warp "SavePoint",0,0; detachrid; charcommand "#alive \""+ .@strcharinfo$ +"\""; charcommand "#fakename \""+ .@strcharinfo$ +"\""; } } end; OnPCStatCalcEvent: if ( @fakename && !compare( "|"+.eventmap$+"|", "|"+strcharinfo(3)+"|" ) ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 0; set @death, 0; detachrid; charcommand "#fakename \""+ .@strcharinfo$ +"\""; } }
  11. - script fake_name -1,{ OnInit: set .eventmap$, "prontera|morocc|someothermap"; end; OnPCLoadMapEvent: if( compare( "|"+.eventmap$+"|", "|"+strcharinfo(3)+"|" ) ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; detachrid; charcommand "#fakename \""+ .@strcharinfo$ +"\" Player"; } end; OnPCDieEvent: if( compare( "|"+.eventmap$+"|", "|"+strcharinfo(3)+"|" ) ) warp "SavePoint",0,0; end; OnPCStatCalcEvent: if ( @fakename && !compare( "|"+.eventmap$+"|", "|"+strcharinfo(3)+"|" ) ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; detachrid; charcommand "#fakename \""+ .@strcharinfo$ +"\""; } } prontera mapflag loadevent morocc mapflag loadevent someothermap mapflag loadevent
  12. Oops small oversight on my part. - script fake_name -1,{ OnInit: set .eventmap$, "prontera"; end; OnPCLoadMapEvent: if( strcharinfo(3) == .eventmap$ ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; detachrid; charcommand "#fakename \""+ .@strcharinfo$ +"\" Player"; } end; OnPCDieEvent: if( strcharinfo(3) == .eventmap$ ) warp "SavePoint",0,0; end; OnPCStatCalcEvent: if ( @fakename && strcharinfo(3) != .eventmap$ ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; detachrid; charcommand "#fakename \""+ .@strcharinfo$ +"\""; } } prontera mapflag loadevent
  13. Edit-- It just occurred to me that 3ceam probably doesn't a lot of the commands used in the function. :/ - script fake_name -1,{ OnInit: set .eventmap$, "prontera"; end; OnPCLoadMapEvent: if( strcharinfo(3) == .eventmap$ ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; detachrid; charcommand "#fakename "+ .@strcharinfo$ +" Player"; } end; OnPCDieEvent: if( strcharinfo(3) == .eventmap$ ) warp "SavePoint",0,0; end; OnPCStatCalcEvent: if ( @fakename && strcharinfo(3) != .eventmap$ ) { set .@strcharinfo$, strcharinfo(0); set @fakename, 1; detachrid; charcommand "#fakename "+ .@strcharinfo$; } } prontera mapflag loadevent
  14. " "+ generateRandSeq() With " Player"
  15. Maybe something like this? Still untested. - script fake_name -1,{ OnInit: .eventmap$ = "eventmap"; function generateRandSeq { .@len = getarg( 0, 3 ); .@lib$ = getarg( 1, "abcdefghijklmnopqrstuvwxyz" ); for ( .@i = 1; .@i <= .@len; .@i++ ) { .@rand = rand( getstrlen( .@lib$ ) ); .@seq$ += charat( .@lib$, .@rand ); if( getarg( 2, 0 ) ) .@lib$ = delchar( .@lib$, .@rand ); } return .@seq$; } end; OnPCLoadMapEvent: if( strcharinfo(3) == .eventmap$ ) { function generateRandSeq; @fakename = 1; detachrid; charcommand "#fakename "+ .@strcharinfo$ +" "+ generateRandSeq(); } end; OnPCDieEvent: if( strcharinfo(3) == .eventmap$ ) warp "SavePoint",0,0; end; OnPCStatCalcEvent: if ( @fakename && strcharinfo(3) != .eventmap$ ) { .@strcharinfo$ = strcharinfo(0); @fakename = 0; detachrid; charcommand "#fakename "+ .@strcharinfo$; } } eventmap mapflag loadevent
  16. OnPCLoginEvent: if( $TOPPK$ == strcharinfo(0) && itemget < gettimetick(2) ) { itemget = gettimetick(2) + 500000; getitem 501,1; }
  17. Yes but it depends on the script you're running for top pvp leader.
  18. use... freeloop(1); or with eAthena... if ( ! ( set(.@l,.@l+1) % 600) ) sleep2 1;
  19. Skorm

    GM Room

    izlude_in,30,171,5 script gm_house 139,{ // This is where the gm house is. end; OnRefreshCount: set(.gms,0); set(.usr,0); deletearray .a_gms; addrid(1); if(getgmlevel()>=.gmlvl) set .a_gms[set(.gms,.gms+1)], getcharid(3); else set(.usr,.usr+1); end; /* query_sql( "SELECT `login`.`account_id`"+ "FROM `login`"+ "INNER JOIN `char`"+ "ON `login`.`account_id`=`char`.`account_id`"+ "WHERE `login`.`group_id`>="+.gmlvl+" AND `char`.`online`=1;", .aid ); for(set(.gms,0);.gms<getarraysize(.aid);set(.gms,.gms+1)) { attachrid(.aid[.gms]); if(strcharinfo(3)!=.map$) deletearray .aid[.gms],1; set(.gms,.gms-1); } set(.gms,.gms+1); attachrid(.aid[0]); addrid(1); if(getgmlevel()<.gmlvl) set(.usr,.usr+1); end;*/ OnPlayerHelp: if(getgmlevel()>=.gmlvl) { warp .map$,.x,.y; end; } donpcevent "gm_house::OnRefreshCount"; if(.gms&&!.usr&&!.que) { donpcevent "gm_house::OnAttachGms"; message strcharinfo(0),"You'll be warped to the help desk in 10 seconds."; set(.que,1); showdigit -10,2; sleep2(10000); if(playerattached()) { showdigit 0,0; warp .map$,.x,.y; } set(.que,0); } else { message strcharinfo(0),"The GMs are currently busy or unavailable please try again later."; } end; /*OnAttachGms: for(set(.@a,0);.@a<.gms;set(.@a,.@a+1)) { attachrid(.aid[.@a]); showdigit 10,3; soundeffect "¹öÆ°¼Ò¸®.wav",0; message strcharinfo(0),"A player is entering you have 10 seconds to prepare."; } end;*/ OnAttachGms: for(set(.@a,1);.@a<=.gms;set(.@a,.@a+1)) { attachrid(.a_gms[.@a]); showdigit -10,2; soundeffect "aster_die.wav",0; message strcharinfo(0),"A player is entering you have 10 seconds to prepare."; sleep2(10000); showdigit 0,0; } end; OnInit: bindatcmd "gmhelpme","gm_house::OnPlayerHelp"; getmapxy(.map$,.x,.y,1); set .gmlvl, 60; } prontera,155,179,5 script gm_house 45,3,3,{ OnTouch: doevent("gm_house::OnPlayerHelp"); } // Warp Portal
  20. You could emulate that with my script. https://rathena.org/board/files/file/3064-server-news/
  21. Skorm

    Menu Script

    Could be done better with menus instead... prontera,100,100,1 script test_npc 100,{ donpcevent("test_npc::OnBuildList"); .@len = getarraysize(.gm_list$); mes "[ test_npc ]"; if( !.@len ) { mes "Sorry no gms are online right now."; close; } mes "Input the gms charid to view information."; for(.@a = 0; .@a < .@len; .@a++ ) mes ""+.gm_list$[.@a]; next; input(.@input); mes "[ test_npc ]"; for(.@a = 0; .@a < .@len; .@a++ ) if( .gm_list[.@a] == .@input ) mes .gm_info$; if( .@a == .@len ) mes "I couldn't find that ID Sorry..."; close; OnBuildList: deletearray .gm_list$; deletearray .gm_list; deletearray .gm_info$ addrid(0); if( getgmlevel() >= 60 ) { .gm_list$[getarraysize(.gm_list$)] = strcharinfo(0)+" - "+getcharid(0); .gm_list[getarraysize(.gm_list)] = getcharid(0); .gm_info$[getarraysize(.gm_info$)] = "Class: "+ Class +", Base Level: "+ BaseLevel +", Job Level: "+ JobLevel +"."; } end; }
  22. Yeah you screwed up big time! Next time use code box prt_in,73,132,3 script Squishy Pinky Poring 1002,{ //poring if ( checkquest(20501,HUNTING) != 0 || checkquest(20501,HUNTING) != 1 ) { //Active. mes "Still here?"; mes "Go Continue killing 500 Porings"; close; } if (checkquest(20501,HUNTING) != 2) { // Completed. mes "Po~~Poring~"; mes "Your a great Poring Killer"; emotion e_kis; close; } else { mes "[ " + strnpcinfo(1) + " ]"; mes "Po~~Poring~"; mes "Well Done"; getexp 3000,500; erasequest 20501; close; } mes "[ " + strnpcinfo(1) + " ]"; mes "Po~~Poring~"; mes "You seek adventure?"; next; switch( select("Yes:No") ) { case 1: mes "[ " + strnpcinfo(1) + " ]"; mes "Really?!"; mes "That's great!"; next; mes "[ " + strnpcinfo(1) + " ]"; mes "Please kill 500 Porings"; mes "The Reward will be of great Fortune"; next; mes "Po~~Poring~"; mes "Goodluck killing 500 Porings!"; close2; setquest 20501; end; case 2: mes "[ " + strnpcinfo(1) + " ]"; mes "Your Missing some great Treasure here"; close; } close; } Or I'll be mad.
  23. Disclaimer: ----------------------------------------------------------------------------------------------------------------------------------------------------------- Sorry if this isn't the best read ever. It's certainly not formal in anyway and it's super trimmed. I just wanted to write it down once. ------------------------------------------------------------------------------------------------------------------------------------------------------------ I'm kinda stuck in my own paradox of wanting to help everyone but in doing so unable to help anyone. Ultimately I think something needs to change and maybe this is it. Goodluck, everyone, stay golden.
  24. - script item_get -1,{ OnPCKillEvent: if(getmapflag(strcharinfo(3),mf_pvp)) getitem 501, 10; }
×
×
  • Create New...