Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. bg_updatescore "guild_vs2", .score[1], .score[2];// <- block the move after this line for ( .@i = 0; .@i < .minplayer2start; .@i++ ){ pcblockmove .team1aid[.@i],1; pcblockmove .team2aid[.@i],1; } sleep 3000; mapannounce "guild_vs2", "buff ready",0; for ( .@i = 5; .@i >= 0; .@i-- ){ sleep 1000; mapannounce "guild_vs2", "Start in "+ .@i +" seconds..",0; } for ( .@i = 0; .@i < .minplayer2start; .@i++ ){ if ( isloggedin( .team1aid[.@i] ) ) pcblockmove .team1aid[.@i],0; if ( isloggedin( .team2aid[.@i] ) ) pcblockmove .team2aid[.@i],0; }
  2. // Rewards per castle. // -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...} // -- via mail (option 2): <itemID>,<amount>,<Zeny> setarray .Reward[0],14001,1;
  3. what is your emulator, the version..? (for example rathena version 17400)
  4. What do you mean? This script save the guild id of the leader in a variable attached to the npc (variable reseted when @reload script)
  5. set .Team[1],getcharid(1); set .Created,2; setarray .Members[0],.No,.No; - for( set .@party,0; .@party < 2; set .@party,.@party + 1 ){ - getpartymember .Team[.@party],1; - for( set .@i,0; .@i < .No; set .@i,.@i + 1 ) - warpchar .Map$,0,0,$@partymembercid[.@i]; - } + warpparty .Map$, 0,0,.Team[0]; + warpparty .Map$, 0,0,.Team[1]; refer to warpparty
  6. Capuche

    request npc

    prontera,150,180,5 script ujiono 56,{ mes "Have you checked out the <URL>facebook page<INFO>http://www.facebook.com/</INFO></URL> recently ?"; close; } this structure can generate links to website. If you click on the name displayed in game, that launch a new window <URL>name to display in game<INFO>http://www.example.com/</INFO></URL>
  7. - script SB -1,{ L_whisper: mes "[Soul Buffer]"; mes " Hello "+strcharinfo(0)+", I am the Soul Buffer npc, i can soul link or buff you at the cost of some zeny. "; next; mes "[Soul Buffer]"; mes " What can i do for you?"; next; set .@i,select( "Buff Me = $200,000","Soul Link Me = $200,000","I Need Both = $400,000" ); set .@cost,( ( .@i == 3 )? 400000:200000 ); if( Zeny < .@cost ){ mes "You dont have enough "+.@cost+" zeny."; }else{ set Zeny,Zeny - .@cost; if( .@i & 1 ){ percentheal 100,100; skilleffect 34,0; sc_start SC_BLESSING,360000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10; } if( .@i & 2 ){ switch ( basejob ) { case Job_Alchemist: set .@spirit, 445; break; case Job_Monk: set .@spirit, 447; break; case Job_Star_Gladiator: set .@spirit, 448; break; case Job_Sage: set .@spirit, 449; break; case Job_Crusader: set .@spirit, 450; break; case Job_SuperNovice: set .@spirit, 451; break; case Job_Knight: set .@spirit, 452; break; case Job_Wizard: set .@spirit, 453; break; case Job_Priest: set .@spirit, 454; break; case Job_Bard: case Job_Dancer: set .@spirit, 455; break; case Job_Rogue: set .@spirit, 456; break; case Job_Assassin: set .@spirit, 457; break; case Job_Blacksmith: set .@spirit, 458; break; case Job_Hunter: set .@spirit, 460; break; case Job_Soul_Linker: set .@spirit, 461; break; default: if ( upper == 1 && baselevel < 70 ) set .@spirit, 494; } if ( .@spirit ) { sc_start4 sc_spirit, 360000, 5, .@spirit,0,0; skilleffect .@spirit, 5; } } mes "Done, Come back to me if you need my services again."; } close; OnWhisperGlobal: if( strnpcinfo(2) != "" ) end; goto L_whisper; } prontera,180,191,2 duplicate(SB) Soul Buffer#1 936 morocc,167,53,3 duplicate(SB) Soul Buffer#2 936 gonryun,148,174,6 duplicate(SB) Soul Buffer#3 936 lighthalzen,177,114,5 duplicate(SB) Soul Buffer#4 936 payon,164,213,2 duplicate(SB) Soul Buffer#5 936 same thing for the other npc : make and whisper the floating npc
  8. bg_updatescore "guild_vs2", .score[1], .score[2];// <- block the move after this line for ( .@i = 0; .@i < .minplayer2start; .@i++ ){ pcblockmove .team1aid[.@i],1; pcblockmove .team2aid[.@i],1; } sleep 3000; for ( .@i = 5; .@i >= 0; .@i-- ){ sleep 1000; mapannounce "guild_vs2", "Start in "+ .@i +" seconds..",0; } for ( .@i = 0; .@i < .minplayer2start; .@i++ ){ if ( isloggedin( .team1aid[.@i] ) ) pcblockmove .team1aid[.@i],0; if ( isloggedin( .team2aid[.@i] ) ) pcblockmove .team2aid[.@i],0; }
  9. pcblockmove + mapannounce bg_updatescore "guild_vs2", .score[1], .score[2];// <- block the move after this line
  10. @Roxas from the docs @Green maybe you load the npc twice with @loadnpc then make a reload script or you already have this script in another file or you already have a npc named DOTAPVP (rename it)
  11. There was a mistake in this version, I forgot to re-attach the aid of the leader in the loop (@variable is attached to the character, so @variable of the member attached was null) - script guild_announce -1,{ OnWhisperGlobal: .@guild_id = getcharid(2); if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; if ( @accountid_member == 0 ) @total_guild_member = query_sql( "select `account_id`, `char_id` from `guild_member` where `guild_id` = "+ .@guild_id, @accountid_member, @charid_member ); .@mes$ = @whispervar0$; .@name$ = strcharinfo(0); .@myaid = getcharid(3); while( .@i < @total_guild_member ) { if ( isloggedin( @accountid_member[.@i], @charid_member[.@i] ) ) { attachrid @accountid_member[.@i]; announce "[ "+ .@name$ +" ]: "+ .@mes$, bc_self; attachrid .@myaid; } .@i++; } }
  12. getitem only accept 2 arguments +1 optionnal BUILDIN_DEF(getitem,"vi?"), it must be getitem <item_id>, <quantity>; getitem <item_id>, <quantity>; getitem <item_id>, <quantity>; ... I made a custom getmultiitem like that long time ago, but can't find it...
  13. remove getmonsterinfo( killedrid, MOB_MVPEXP )
  14. Capuche

    @jailtime

    - script restricted_manner -1,{ OnInit: setarray .@bad_word$, "tangina", "t@ngin@", "t@ng1ng@", "tanga", "t@ng@" , "t@nga", "bobo" , "bob0"; set .@size_b, getarraysize( .@bad_word$ ); for( ; .@i < .@size_b; set .@i, .@i+1 ) defpattern 1, "([^:]+):.*\\s"+ .@bad_word$[.@i] +".$", "warning"; activatepset 1; end; warning: set @warning, @warning+1; if ( @warning == 3 ) { set @warning, 0; deltimer strnpcinfo(0) +"::OnDelay"; atcommand "@mute 5 "+ strcharinfo(0); } else { deltimer strnpcinfo(0) +"::OnDelay"; addtimer 300000, strnpcinfo(0) +"::OnDelay"; message strcharinfo(0), "Be careful with your language... Warning "+ @warning +"/3"; } end; OnDelay: set @warning, 3; end; }
  15. set .faildestroy,1; // Should the card remover have a chance of failure that destroys items? 1 = Yes, 0 = No. set this to 0
  16. http://rathena.org/board/topic/76660-clone-pvp-npc/ http://rathena.org/board/topic/76766-battleground-clone/
  17. Capuche

    Destroy item

    It would more effective with source mod than script (I have seen some delstorage, delcart item... in source release). currently you can't delete an item in a cart of player online with script command you can't delete an item in a open storage (but the item is deleted if the player close the storage)
  18. - sc_start sc_expboost,1000*60*60*24,"+$VIPs_PlatinumExpRate+"; + sc_start sc_expboost,1000*60*60*24,$VIPs_PlatinumExpRate; .. same typo for other sc_start
  19. OnPCLoginEvent: if( getgmlevel() == 1 ) atcommand "@fakename "+ strcharinfo(0) +" [Donator]"; end;
  20. after add your items (getitem <item id>, <amount>; ) if ( .@tmp & ( 1 << .@i ) == 0 ) {
  21. It call a buy window because you can't make a shop of items in your inventory with a sell window with script command. But the result is the same as a sell window in this script : the shop display YOUR items in your inventory and you can trade them vs other thing (like a sell window vs zeny)
  22. or you can use item_signer in the svn //===== rAthena Script ======================================= //= Sign Your Items //===== By: ================================================== //= Lupus //===== Current Version: ===================================== //= 1.1a //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Write you name on your rare equipment or weapon ^_- //===== Additional Comments: ================================= //= 1.1 Cleaned and edited for general use. [Euphy] //= 1.1a Added 'disable_items' command. [Euphy] //============================================================ prt_in,24,61,7 script Perchik 47,{ setarray .@Item[0],644,3; // Item requirements: <ID>,<Count>{,...} (0 to disable) setarray .@Cost[0],0,5000; // Zeny requirements: <base price>,<price per refine> disable_items; mes "[Perchik]"; mes "I can ^0055FFsign your name^000000 on almost any rare item you hold."; next; if(select("Tell me more...:Sign my items, please!") == 1) { mes "[Perchik]"; mes "I can put your name on any slotless equipment or weapon."; emotion e_ic; next; mes "[Perchik]"; if (getarraysize(.@Item) || getarraysize(.@Cost)) { mes "For my work I accept:"; if (getarraysize(.@Item)) for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2) mes " ~ "+.@Item[.@i+1]+"x "+getitemname(.@Item[.@i]); if (.@Cost[0]) mes " ~ "+.@Cost[0]+" Zeny"; if (.@Cost[1]) mes " ~ "+.@Cost[1]+" Zeny per refine"; } else mes "I work for free, but..."; next; emotion e_cry; mes "[Perchik]"; mes "Alas, I have 12 hungry children"; mes "and a very angry wife."; next; mes "[Perchik]"; mes "Or it was 12 angry children"; mes "and a very hungry wife..."; emotion e_hmm; close; } mes "[Perchik]"; mes "Show me your items to sign..."; next; setarray .@pos$[1],"Upper Headgear","Armor","Left hand","Right hand","Garment","Footgear","Left Accessory","Right Accessory","Mid Headgear","Lower Headgear"; set .@menu$,""; for (set .@i,1; .@i<=10; set .@i,.@i+1) { if (getequipisequiped(.@i)) set .@menu$, .@menu$+.@pos$[.@i]+" [^0055FF"+getequipname(.@i)+"^000000]"; set .@menu$, .@menu$+":"; } set .@part, select(.@menu$); set .@id, getequipid(.@part); set .@ref, getequiprefinerycnt(.@part); mes "[Perchik]"; if (!getequipisequiped(.@part)) { mes "Nothing is equipped there!"; emotion e_wah; close; } for(set .@i,0; .@i<4; set .@i,.@i+1) set .@slot[.@i], getequipcardid(.@part,.@i); if (.@slot[0]==255 || .@slot[0]==254 || .@slot[0]<0) { mes "Alas, this item's already signed."; mes "I would never touch a master's work."; emotion e_hmm; close; } if (.@slot[0]>4000 && .@slot[0]<5000) { mes "A card? Here?!"; mes "As I said before, I don't sign items with cards."; emotion e_hmm; close; } if (getiteminfo(.@id,10)) { mes "Sorry, I don't sign slotted items."; emotion e_sry; close; } getinventorylist; for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) if (@inventorylist_expire[.@i] != 0) { mes "Sorry, I don't sign rental items!"; emotion e_hmm; close; } set .@price, .@Cost[0]+(.@Cost[1]*.@ref); if (getarraysize(.@Item) || .@price) { mes "I will need:"; if (getarraysize(.@Item)) for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2) { mes " ~ "+.@Item[.@i+1]+"x "+getitemname(.@Item[.@i]); if (countitem(.@Item[.@i]) < .@Item[.@i+1]) set .@nr,1; } if (.@price) mes " ~ "+.@price+" Zeny"; } mes "Shall I sign your ^0055FF"+getitemname(.@id)+"^000000?"; next; if(select("Ok!:Leave")==2) { mes "[Perchik]"; mes "See you..."; emotion e_yawn; close; } mes "[Perchik]"; if (Zeny < .@price || .@nr) { mes "I don't work for 'thanks'."; emotion e_sry; close; } if (!countitem2(.@id,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3])) { mes "Where is "+getitemname(@id)+"...?"; npctalk "You're a snoozy cheater!"; logmes "CHEATER: Tried to sign an item not having it: "+getitemname(@id); emotion e_wah; close; } if (.@price) set Zeny, Zeny-.@price; if (getarraysize(.@Item)) for(set .@i,0; .@i<getarraysize(.@Item); set .@i,.@i+2) delitem .@Item[.@i], .@Item[.@i+1]; delitem2 .@id,1,1,.@ref,0,.@slot[0],.@slot[1],.@slot[2],.@slot[3]; mes "Done!"; emotion e_proud; getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff; equip .@id; close; } about refine, change .@ref with the value you want in getitem2 .@id,1,1,.@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff;
×
×
  • Create New...