Jump to content

Skorm

Forum Moderator
  • Posts

    1268
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Skorm

  1. That's because it isn't enclosed within the proper braces.
  2. This is more of a general question.
  3. Skorm

    Help me

    - script nevasca1 -1,{ OnPCLoginEvent: if ( player_login ){ skill 89,1,0; } else { player_login++; } } Could also count the logins from sql... But you can't call special tags from inside functions.
  4. Skorm

    NPC Deny Item?

    I would answer this but your dp scares the crap out of me.
  5. moc_para01,15,183,6 script Kafra Employee::kaf_pronteewqraee 117,{ cutin "kafra_01",2; callfunc "F_KafSet"; mes "[Kafra Employee]"; mes "Welcome to the"; mes "Kafra Corporation."; mes "The Kafra services"; mes "are always on your side."; mes "How may I assist you?"; callfunc "F_Kafra",5,0,0,40,800; //savepoint "moc_para01",30,186; getmapxy( .@map$, .@x, .@y, 0 ); savepoint .@map$, .@x, .@y; callfunc "F_KafEnd",0,1,"in the city of Prontera"; }
  6. If you're using the version by Masao... set $@Monster,1000+rand(1,323); Just increase the range. set .MonsterID,rand( 1001,2380 ); set $@Monster,1000+rand(1,995); The one by gmocean has a blacklist so i'd recommend that.
  7. Maybe this will help you out enough with your script. prontera,100,100,1 script chance_get 101,{ mes "[ Chancy ]"; mes "Oh hello would you like to try my game?"; next; if( select( "Yes:No" ) == 2 ) { mes "[ Chancy ]"; mes "I'm sorry to hear that. Maybe next time then."; close; } mes "[ Chancy ]"; if( countitem( .gold ) < .gold_amount ) { mes "You don't have enough "+getitemname( .gold )+"."; mes "I require at least "+.gold_amount+"."; close; } else if( Zeny < .zeny ) { mes "It looks like you don't have enough zeny..."; mes "You need at least "+.zeny+"."; close; } Zeny = Zeny - .zeny; delitem .gold, .gold_amount; if( rand( 101 ) <= .chance ) { .@rand = rand( .length ); getitem .rewards[.@rand], .reward_amounts[.@rand]; mes "Congratulations you got "+getitemname( .rewards[.@rand] )+" x"+.reward_amounts[.@rand]+"!!!"; } else mes "I'm sorry you didn't get anything. Come back and try again!"; close; OnInit: .gold = 617; .gold_amount = 100; .zeny = 10000000; .chance = 40; setarray .rewards, 501, 502, 503, 504, 506; setarray .reward_amounts, 1, 1, 1, 2, 2; .length = getarraysize( .rewards ); }
  8. I've tested it and it is working... I recommend using rAthena if you aren't already.
  9. Just remove set from that line.
  10. amatsu,235,237,4 script healer 925,{ end; OnInit: freeloop(1); getmapxy( .m$, .x, .y, 1, strnpcinfo(0) ); OnTimer5000: initnpctimer; addrid( 4, 0, .x-15, .y-15, .x+15, .y+15 ); if( playerattached() ) { getinventorylist; .@len = @inventorylist_count; copyarray .@inventorylist_id, @inventorylist_id, .@len; copyarray .@inventorylist_identify, @inventorylist_identify, .@len; for ( .@j = 0; .@j < .@len; .@j++ ) { if ( !.@inventorylist_identify[.@j] ) { delitem2 .@inventorylist_id[.@j], 1, 0, 0, 0, 0, 0, 0, 0; getitem .@inventorylist_id[.@j], 1; } } if( HP < MAXHP ) { specialeffect2 EF_HEAL2; percentheal 100, 100; } repairall; } }
  11. Copy the Raw Data from the bottom of pastebin it preserves tabs.
  12. Skorm

    ###### Spawn

    - script NPCNAME -1,{ OnInit: OnHour00: if( !mobcount("prt_fild01","NPCNAME::OnMonsterExist") ) monster "prt_fild01",0,0,"--ja--",1001,1,"NPCNAME::OnMonsterExist"; OnMonsterExist: }
  13. I don't have this problem. Try putting sleep2(2000); after OnPCStatCalcEvent:
  14. 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"
  15. - 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. }
  16. 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.
  17. 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.
  18. That isn't an edit the above post is the full script.
  19. 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.
  20. 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.
  21. 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.
  22. - 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$ +"\""; } }
  23. - 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
  24. 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
  25. 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
×
×
  • Create New...