Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by Capuche

  1. Repeatable in by account, non-repeatable by player the same day. prontera,153,189,5 script dksfjdsk 100,{ .@t = gettime(4); mes "Hi, today is "+ .week$[.@t]; mes "The Daily Quest for today is ..."; mes getitemname( getd( ".req_item"+ .@t ) ); next; mes "The Items that needed are :"; .@size = getarraysize( getd( ".req_item"+ .@t ) ); for ( .@i = 1; .@i < .@size; .@i += 2 ) mes getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ); next; if ( select ( "I want this Item", "Just walk around" ) == 2 ) { mes "OK, please come again"; close; } else if ( gettime(4) != .@t ) { mes "I'm sorry, today is a brand new day"; close; } else if( the_day_today == gettime(4) ) { mes "You already finished the Daily Quest today."; close; } for ( .@i = 1; .@i < .@size; .@i += 2 ) { if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) { setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ); .@c += 2; } } if ( .@c ) { mes "You didn't bring enough items"; for ( .@i = 0; .@i < .@c; .@i += 2 ) mes .@not_enough[ .@i +1 ] +"x "+ getitemname( .@not_enough[ .@i ] ); close; } for ( .@i = 1; .@i < .@size; .@i += 2 ) delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ); getitem getd( ".req_item"+ .@t ), 1; the_day_today = gettime(4); mes "Congratulations for getting"; mes getitemname( getd( ".req_item"+ .@t ) ); close; OnInit: setarray .week$, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"; setarray .req_item0, 501, 501,1, 502,1; setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40; setarray .req_item2, 501, 501,1, 502,1; setarray .req_item3, 501, 501,1, 502,1; setarray .req_item4, 501, 501,1, 502,1; setarray .req_item5, 501, 501,1, 502,1; setarray .req_item6, 501, 501,1, 502,1; end; }
  2. If it's just a question : yes it's possible.
  3. Other variables are permanent - like $mobactive in his script. If he log out, @FlavorText$ will be empty >> troublesome. If he doesn't often change its setting, npc scope and set option in his NPC would be better. If he doesn't want to be bored, global permanent scope.
  4. To prevent this overflow, I suggest to divide your check zeny when your trade Credits to Zeny. replace }else if( ( Zeny + ( @Amount * .Zeny[.@a] ) ) > .MaxZeny ){ to else if( ( Zeny / 100 + ( .@Amount * .@Zeny[ .@a ] ) / 100 ) > .@MaxZeny / 100 ) { prontera,138,183,6 script Credits 899,{ // Your Server Max Zeny Amount set .@MaxZeny, 2000000000; // Coins Item ID and each Coins Costs setarray .@Coins[ 1 ], 30005; setarray .@Zeny[ 1 ], 10000000; set .@Menu$,""; for( set .@a,1; .@a < getarraysize( .@Coins ); set .@a,.@a+1 ) set .@Menu$,.@Menu$ + getitemname( .@Coins[ .@a ] )+":"; while( 1 ) { mes "What do you want to do today?"; next; switch( select( "Credits to Zeny:Zeny to Credits" ) ){ case 1: mes "Very well. Here is the list on how much each coin is worth:"; for( set .@a,1; .@a < getarraysize( .@Coins ); set .@a,.@a+1 ){ mes "^0000FF"+getitemname( .@Coins[ .@a ] )+" ^FF0000"+.@Zeny[ .@a ]+"^000000 Zeny."; } next; set .@a, select( .@Menu$ ); mes "Select the Amount of Credits you want to trade into Zeny."; mes "You have "+countitem( .@Coins[ .@a ] )+" "+getitemname( .@Coins[ .@a ] )+"."; if( input( .@Amount, 1, countitem( .@Coins[ .@a ] ) ) != 0 ) mes "You cancelled."; else if( ( Zeny / 100 + ( .@Amount * .@Zeny[ .@a ] ) / 100 ) > .@MaxZeny / 100 ) { mes "You can hold this amount of Zeny."; } else { set Zeny, Zeny + ( .@Amount * .@Zeny[ .@a ] ); delitem .@Coins[ .@a ], .@Amount; mes "Done, you have traded "+.@Amount+" of "+getitemname( .@Coins[ .@a ] )+" into "+( .@Amount * .@Zeny[ .@a ] )+" Zeny."; } next; break; case 2: mes "Very well. Here is the list on how much each coin is worth:"; for( set .@a,1; .@a < getarraysize( .@Coins ); set .@a,.@a+1 ) mes "^0000FF"+getitemname( .@Coins[ .@a ] )+" ^FF0000"+.@Zeny[ .@a ]+"^000000 Zeny."; next; set .@a, select( .@Menu$ ); mes "Select the Amount of Zeny you want to trade into "+getitemname( .@Coins[ .@a ] )+"."; mes "You can get maximum of "+ ( Zeny/.@Zeny[ .@a ] ) +" "+getitemname( .@Coins[ .@a ] )+"."; if( input( .@Amount, 1, Zeny / .@Zeny[ .@a ] ) != 0 ) mes "You cancelled."; else { set Zeny,Zeny - ( .@Amount * .@Zeny[ .@a ] ); getitem .@Coins[ .@a ],.@Amount; mes "Done, you have traded "+( .@Amount * .@Zeny[ .@a ] )+" Zeny into "+.@Amount+" of "+getitemname( .@Coins[ .@a ])+" ."; } next; break; } } close; } payon,148,228,6 duplicate(Credits) Credits#0 899 morocc,170,84,2 duplicate(Credits) Credits#1 899
  5. In src/config/renewal.h #define RENEWAL_DROP ... ... #define RENEWAL_EXP Comment these lines to disable Renewal drop and/or renewal exp then recompile your server. SRC/config/
  6. You may have an error in mob_db.txt... check your whole mapserv.
  7. No you're right. Be more confident in yourself, no need to ask for a simple check like this one.
  8. function script F_bonus_Blabla { for( set .@j, 0; .@j < getargcount(); set .@j, .@j + 1 ) { if( !isequipped( getarg( .@j ) ) ) return 0; set .@temp[ .@j ], getarg( .@j ); } getinventorylist; for( set .@i, 0; .@i < @inventorylist_count; set .@i, .@i + 1 ) if( @inventorylist_equip[ .@i ] ) for( set .@j, 0; .@j < getarraysize( .@temp ); set .@j, .@j + 1 ) if( @inventorylist_id[ .@i ] == .@temp[ .@j ] ) { deletearray .@temp[ .@j ], 1; set .@ref, .@ref + @inventorylist_refine[ .@i ]; break; } if( getarraysize( .@temp ) || .@ref < 23 ) return 0; return 1; } Example : 1151,Slayer,Slayer,4,15000,,1300,90,,1,2,0x00004082,7,2,34,2,18,1,3,{ if( callfunc("F_bonus_Blabla",1151,2404) ) bonus bAtkRate,1; if(getrefine()>=7) bonus bAspd,2; },{},{} Refine+7 >> Increase attack speed +2% If player is equipped item ID 1151 (current weapon) and item ID 2404, increase ATK + 1%
  9. Well I post my fix too I also have try lol - script death -1,{ OnWhisperGlobal: if( getgmlevel() < 40 ) { dispbottom "You are not authorized to use this feature."; // Reject player access end; } set .@npcname$,"[Death Announcer]"; // Define the NPC's name AnnounceMenu: mes .@npcname$; mes "There are several settings for this controller."; mes "Only one announcer may be active at all times."; mes "What would you like to do?"; menu "Set Flavor Text",FlavorText,"Mob Announcer",MobAnnouncer,"PK Announcer",PKAnnouncer,"Nothing",-; close; FlavorText: next; mes .@npcname$; mes "Pleae input the text you would like to appear when a player is killed."; mes "^AAAAAAExample: Player <had his brains eaten>!^000000"; // $FlavorText$ would replace < > input .@test$; next; mes .@npcname$; mes "The message that will be broadcasted when a player dies is:"; mes "^FF0000Player "+ .@test$ +"!^000000"; mes " "; mes "Is that correct?"; next; menu "Yes, that's fine",CorrectFlavor,"No, let me change it",FlavorText,"Nevermind",-; close; CorrectFlavor: set $FlavorText$, .@test$; set $global_flavor, $global_flavor | 1; // At this point, Flavor Text has been defined goto AnnounceMenu; MobAnnouncer: if( $global_flavor & 1 ) { // Check if Flavor Text has been defined yet if( $global_flavor & 2 ) { next; mes .@npcname$; mes "The Mob Announcer is currently active."; mes "Would you like to disable it?"; next; menu "Yes",-,"No",AnnounceMenu; mes .@npcname$; mes "The Mob Announcer has been deactivated."; } else { next; mes .@npcname$; mes "Would you like to enable the Mob Announcer?"; mes "This will broadcast player deaths when they're killed by monsters."; next; menu "Yes",-,"No",AnnounceMenu; mes .@npcname$; mes "The Mob Announcer has been activated."; if( $global_flavor & 4 ) set $global_flavor, $global_flavor ^ 4; // Define the PK Announcer as "inactive" / "active" } set $global_flavor, $global_flavor ^ 2; // Define the Mob Announcer as "active"/"inactive" } else { next; mes .@npcname$; mes "I'm sorry, but you haven't set the Flavor Text yet!"; } next; goto AnnounceMenu; PKAnnouncer: if( $global_flavor & 1 ) { // Check if Flavor Text has been defined yet if( $global_flavor & 4 ) { next; mes .@npcname$; mes "The PK Announcer is currently active."; mes "Would you like to disable it?"; next; menu "Yes",-,"No",AnnounceMenu; mes .@npcname$; mes "The PK Announcer has been desactivated."; } else { next; mes .@npcname$; mes "Would you like to enable the PK Announcer?"; mes "This will broadcast player deaths when they're killed by other players."; next; menu "Yes",-,"No",AnnounceMenu; mes .@npcname$; mes "The PK Announcer has been activated."; if( $global_flavor & 2 ) set $global_flavor, $global_flavor ^ 2; // Define the Mob Announcer as "inactive" / "active" } set $global_flavor, $global_flavor ^ 4; // Define the PK Announcer as "inactive" / "active" } else { next; mes .@npcname$; mes "I'm sorry, but you haven't set the Flavor Text yet!"; } next; goto AnnounceMenu; // Announcers OnPCDieEvent: if( $global_flavor & 2 && killerrid > 3000000 ) announce strcharinfo(0) + $FlavorText$ +"!",bc_map; // Announce player death by monster end; OnPCKillEvent: if( $global_flavor & 4 ) { set .@name$, strcharinfo(0); attachrid killedrid; announce strcharinfo(0)+" "+$FlavorText$+" by "+.@name$+"!",bc_map; // Announce player death by PK } end; } @FlavorText$ was only attached to your GM.
  10. Missing mes [Valkyrie Crafter] WoW, I see that you show interest in the Demons Wings. Be careful with its power! Well, I only need those to make them: next; [Valkyrie Crafter] 1x Devil Wings 100x Dragon Scale 100x Evil Horn 50x Tiger's Footskin 10x gold for the crafting fees if(countitem(723) < 10 && countitem(726) < 10 && countitem(728) < 10 && countitem(727) < 10 && countitem(721) < 10 && countitem(719) < 10 && countitem(720) < 10) means if one of this items are missing, this condition if false but you want to be true. So use || instead of &&.
  11. He also can use the jobmaster in the svn of rAthena. http://svn.rathena.org/svn/rathena/trunk/npc/custom/jobmaster.txt Options : setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class setarray .JobReq[0],10,40; // Minimum job level to turn into 1st class, 2nd class set .ThirdClass,1; // Enable third classes? (1: yes / 0: no) set .SNovice,45; // Minimum base level to turn into Super Novice set .LastJob,1; // Enforce linear class changes? (1: yes / 0: no) set .SkillPointCheck,1; // Force player to use up all skill points? (1: yes / 0: no) set .Platinum,1; // Get platinum skills automatically? (1: yes / 0: no)
  12. Using jobmaster in the svn : Options zeny and items (same cost for all job) : set .zeny_charge, 500; // Ask Zeny ? (*cost* / 0: disabled) setarray .item_ID_charge[0], 601, 602; // Ask items ? (ID items. Example: setarray .item_charge[0], 601, 602, 603; _ /\_ put 0 to disable this option) setarray .item_cost_charge[0], 5, 1; // Cost items -- item_charge must be enabled
  13. You can try to integrate AnnieRuru's function of this post.
  14. If you want 2 teams generated randomly, you can try to integrate AnnieRuru's function of this post.
  15. Editing prontera,150,160,5 script ghjkl 456,{ .@itemid = 7227; .@amount = 10; .@event_map$ = "prontera"; .@aid = getcharid(3); if( !getcharid(1) ) { mes "You are not in a party."; close; } getpartymember getcharid(1),0; getpartymember getcharid(1),1; getpartymember getcharid(1),2; while( .@i < $@partymembercount ){ if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid( $@partymemberaid[ .@i ] ); if( countitem( .@itemid ) < .@amount ){ attachrid( .@aid ); mes "Your member "+$@partymembername$[.@i]+" haven't "+.@amount+" "+getitemname( .@itemid )+"."; close; } .@log_in[ getarraysize( .@log_in ) ] = $@partymemberaid[ .@i ]; } .@i++; } for( .@i = 0; .@i < getarraysize( .@log_in ); .@i++ ) delitem .@itemid, .@amount, .@log_in[ .@i ]; attachrid( .@aid ); dispbottom "All got items."; warpparty .@event_map$, 150,150, getcharid(1); close; }
  16. Change the setting in the NPC You don't want exchange coins ? "Exchange Coins", // [16] Remove 16 in set .MenuOption,1|2|4|8|16|32|64|128|256|512; etc...
  17. * Imitate the voice of AnnieRuru * No it doesn't ! (lol) It works only on rAthena
  18. O.o I misread ! It seems you want all this NPC in one. Well Euphy made an All-in-one NPC, here is the link : http://pastebin.com/raw.php?i=GJ4ukgGH Do the same thing that previously (replacing the line) AND change the setting as your content in the end of the NPC.
  19. Your minimal drop rate is define in conf/battle/drops.conf item_drop_card_min: 1 In mob_db.txt, if you let DropCardid and put DropCardper = 0 then the card drop rate is 0.01% 'coz your configuration define the card drop rate to 0.01% minimum. Also your script doesn't change the drop rate, it's additional. You would have real drop rate (0.01%) and drop rate define by your script (1%). In your script, you must edit set $@MaxDropChance,10; If set $@MaxDropChance,10;, you would have (1/10) % chance to drop item. set $@MaxDropChance,100; --> (1/100) %
  20. Capuche

    Party Recall

    Yes ! Also you can put callfunc "F_PartyReCall"; on another item script
  21. Refer to Basic_Scripting#Duplicating
  22. Capuche

    Party Recall

    Sorry I misread your post 12212,Giant_Fly_Wing,Giant Fly Wing,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashPartyCall"; },{},{} is like a fly wing but warp all member in party and you ask a script that do something like partyrecall... Here for you function script F_PartyReCall { if(getpartyleader(getcharid(1),2) == getcharid(0)) { set .@leader, getcharid(3); getmapxy .@mapl$, .@xl, .@yl, 0; getpartymember getcharid(1),2; set .@partymembercount, $@partymembercount; copyarray .@partymemberaid[0], $@partymemberaid[0], .@partymembercount; for(set .@i, 0; .@i < .@partymembercount; set .@i, .@i + 1) { if(attachrid(.@partymemberaid[.@i])) { if(HP > 0 && getcharid(3) != .@leader) { warp .@mapl$, .@xl, .@yl; } } } } return; }
  23. If you use instancing system, the map name "1@synav" become "0011@synav"
×
×
  • Create New...