-
Posts
2407 -
Joined
-
Last visited
-
Days Won
52
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by Capuche
-
100% immunization to a single element doesn't work!
Capuche replied to JassMax's question in Database Requests
Please read Antares's post, it's not a bug -
N>Script that disables MVP and Mini Boss Cards in a certain maps
Capuche replied to xxx69's question in Script Requests
only 128 items can be restricted in this script, defined by the max array size -
R> if @autotrade can't get exp and item anymore
Capuche replied to sumano's question in Script Requests
there is a conf about autoloot https://github.com/rathena/rathena/blob/master/conf/battle/player.conf#L150 -
Then don't put a limit in the refiner prontera,150,150,3 script Refiner 56,{ for( .@part = 1; .@part < 11; .@part++ ) if( getequipisequiped(.@part) && getequipisenableref(.@part) ) successrefitem( .@part,( 10- getequiprefinerycnt(.@part) ) ) }
-
100% immunization to a single element doesn't work!
Capuche replied to JassMax's question in Database Requests
I made a post in the bugtracker http://rathena.org/board/tracker/issue-9030-100-immune-to-an-element/?gopid=27059#entry27059 -
You could make a topic in the bugtracker http://rathena.org/board/tracker/ Don't forget to give your version, and to explain what you did
-
You could add the permission in conf/groups.conf
-
Our system take all the slots to signed the item so It's not possible
-
Party Vs Party Script [need your help to fix the errors]
Capuche replied to nasagnilac's question in Scripting Support
ahah ok let me explain indead the error is here OnSupply1: query_sql ("SELECT `party_id` FROM `party` WHERE `name` = '"+$teama$+"'",.@pid); getpartymember .@pid, 2; for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) != .Map$) {end;} you make a loop to attach the player in the party and check if they are on the event map. If the player is not on the event map, the loop should continue and check the other player but you write an end so the loop is stopped A sample: party's name "bidon" Players map Bernard prontera Lucie geffen Luc prontera Your event map is prontera. Lucie is on geffen, so your script will stop (if(strcharinfo(3) != .Map$) {end;}) with her. It won't delete and give the item to Luc (wow so sad) Well well that was my 2 cents, good luck -
Party Vs Party Script [need your help to fix the errors]
Capuche replied to nasagnilac's question in Scripting Support
I quickly read your script so about check the loop for( set .@i, 0; .@i < .MaxMembers; set .@i, .@i + 1 ){ if(isloggedin($@partymemberaid[.@i],$@partymembercid[.@i])){ attachrid $@partymemberaid[.@i]; if(strcharinfo(3) == .Map$) {end;} if(strcharinfo(3) == .Map$) {end;} => the loop should continue, replace end by continue same that above others things: disablenpc "PVPB"; unknown npc PVPB set $teama$,"Null"; set $teamb$,"Null"; you could use an empty string by default and $@ variables (no need to save permanently theses var) query_sql ("SELECT `party_id`,`name` FROM `party` WHERE `name` = '"+.@teama$+"'",.@pid,$teama$); if (!.@pid){ dispbottom "Invalid party name."; end; to check if the player had a party, use getcharid(1) if (Class == Job_Lord_Knight || Class == Job_Paladin || Class == Job_Knight || Class == Job_Crusader){ you can use the const BaseJob -
ho ok //===== rAthena Script ======================================= //= MVP Ladder Game //===== By: ================================================== //= aftermath, AnnieRuru (rewrite) //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Gather a party and kill every MVP in ascending order. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ prontera,147,170,3 script MvP Survival 56,{ mes "[MvP Survival Warper]"; mes "Say... do you want to play the MvP Ladder game?"; next; switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) { case 1: break; case 2: mes "[MvP Survival]"; mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest."; if ( .finish_item_amount ) mes "If your party can finish the MVP ladder game, each member will earn "+ callfunc("F_InsertPlural", .finish_item_amount, getitemname( .finish_item_id )) +"."; if ( .register_cost ) mes "But the entrance fee is "+ callfunc( "F_InsertComma", .register_cost ) +" zeny."; next; mes "[MvP Survival]"; mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed."; mes "Good luck!"; close; case 3: mes "[MvP Survival]"; if ( !$mvpladdderparty_time ) { mes "Nobody has finished this game yet."; close; } mes "The best record is"; mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]"; mes "By the party ^FF0000"+ $mvpladdderparty_name$ +"^000000."; .@size = getarraysize( $mvpladderparty_member$ ); for ( .@i = 0; .@i < .@size; .@i++ ) mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i]; if ( getgmlevel() < .gmlvlreset ) close; next; if ( select( "Close.", "Reset the record." ) == 1 ) close; if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close; $mvpladdderparty_time = 0; $mvpladdderparty_name$ = ""; deletearray $mvpladderparty_member$[.@i]; mes "[MvP Survival]"; mes "Record reset successfully."; close; case 4: mes "[MvP Survival]"; mes "When you are strong enough to complete the game, please come back."; close; } if ( !getcharid(1) ) { mes "[MvP Survival]"; mes "You have to form a party to play."; close; } if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) { mes "[MvP Survival]"; mes "Only the party leader can register."; close; } .@origin = getcharid(3); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) .@online++; if ( #ladder_delay > gettimetick(2) ) { .@concat_names$ = .@concat_names$ + ( .@concat_names$ == "" ? "" : ", " ) + strcharinfo(0); .@total_name++; } } } attachrid .@origin; if ( .@concat_names$ != "" ) { mes "[MvP Survival]"; mes "Sorry but player"+ ( .@total_name ? "s " : " " ) + .@concat_names$ + ( .@total_name ? " have" : "had" ) +" a delay to re-enter."; close; } if ( $@partymembercount != .register_min ) { mes "[MvP Survival]"; mes "You have to form a party with exactly "+ .register_min +" members to play."; close; } else if ( .@online != .register_min ) { mes "[MvP Survival]"; mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'."; close; } else if ( .register_cost && Zeny < .register_cost ) { mes "[MvP Survival]"; mes "You don't have enough zeny. Please come back when you do."; close; } else if ( .party_id ) { mes "[MvP Survival]"; mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished."; mes "Thank you."; close; } Zeny -= .register_cost; announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all; set .party_id, getcharid(1); set .@time_enter, gettimetick(2); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) { announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self; .@name$[.@c] = strcharinfo(0); .@c++; } } } cleanmap .eventmap$; warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4); donpcevent strnpcinfo(0)+"::OnMvpDead"; sleep .timeout * 60000; if ( .round == .totalround +1 ) { getpartymember .party_id, 1; getpartymember .party_id, 2; mapannounce .eventmap$, "Congratulations... You were able to defeat all the MVPs!", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) { getitem .finish_item_id, .finish_item_amount; #ladder_delay = gettimetick(2) + .enter_delay; } } } set .@timeused, gettimetick(2) - .@time_enter; if ( .bonus_item_amount && .@timeused < .bonus_time * 60 ) { mapannounce .eventmap$, "You are rewarded a bonus item for completing the ladder within "+ .bonus_time +" minutes.", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .bonus_item_id, .bonus_item_amount; } } } if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) { mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; set $mvpladdderparty_time, .@timeused; set $mvpladdderparty_name$, getpartyname( .party_id ); copyarray $mvpladderparty_member$, .@name$, .register_min; } else mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; sleep 10000; announce "The party ["+ getpartyname( .party_id ) +"] has finished the MvP ladder game!", bc_all; } else announce "The party ["+ getpartyname( .party_id ) +"] has failed to finish the MvP ladder game.", bc_all; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .party_id = .round = 0; end; OnMvpDead: .round++; if ( .round >= 2 && .round != .totalround +1 && .round_item_amount ) { for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .round_item_id, .round_item_amount; } } } if ( .round == .totalround +1 ) { awake strnpcinfo(0); end; } else if ( .round == .totalround ) mapannounce .eventmap$, "The final Round will begin in "+ .delay +" seconds...", bc_map; else mapannounce .eventmap$, "Starting round "+ .round +" in "+ .delay +" seconds...", bc_map; sleep .delay * 1000; if ( .mvpid[.round] == 1646 ) // pick random Bio3 MVP .mvpid[.round] = rand(1646,1651); monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead"; mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue; end; OnPCLogoutEvent: if ( hp > 0 ) .@less_one = 1; else end; OnPCDieEvent: if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end; if ( getcharid(1) != .party_id ) end; #ladder_delay = gettimetick(2) + .enter_delay; getpartymember .party_id, 1; getpartymember .party_id, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ && hp > 0 ) .@alive++; } } if ( .@less_one ) .@alive--; if ( !.@alive ) { mapannounce .eventmap$, "Party wiped!", bc_map; sleep 10000; awake strnpcinfo(0); } end; OnInit: // Configurations ----------------------------------------------------- // delay to re-enter (in secs) set .enter_delay, 3600; // Time limit (in minutes) // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! set .timeout, 60; // entrance fee (in Zeny) set .register_cost, 100000; // exact amount of party members needed to start the game set .register_min, 2; // id of each mvp. you can add more setarray .mvpid[1], 1086,// Golden Thief Bug 64 1115,// Eddga 65 1150,// Moonlight Flower 67 1159,// Phreeoni 69 1112,// Drake 70 1492,// Incantation Samurai 71 1046,// Doppelgangger 72 1252,// Garm 73 1418,// Evil Snake Lord 73 1059,// Mistress 74 1190,// Orc Lord 74 1087,// Orc Hero 77 1251,// Knight of Windstorm 77 1038,// Osiris 78 1658,// Ygnizem 79 1272,// Dark Lord 80 1039,// Baphomet 81 1147,// Maya 81 1785,// Atroce 82 1389,// Dracula 85 1630,// Bacsojin 85 1885,// Gorynych 85 1623,// RSX 0806 86 1511,// Amon Ra 88 1688,// Lady Tanee 89 1768,// Gloom Under Night 89 1719,// Datale 90 1734,// Kiel D-01 90 1157,// Pharaoh 93 1373,// Lord of Death 94 3117,// King Poring 95 1502,// pori pori 96 1312,// Turtle General 97 1779,// Ktullanux 98 1874,// Beelzebub 98 1832;// Ifrit 99 // number of rounds (default: 39) set .totalround, getarraysize(.mvpid) -1; // item reward for completing each round set .round_item_id, 7711; set .round_item_amount, 1; // item reward for completing the entire ladder set .finish_item_id, 7711; set .finish_item_amount, 10; // bonus reward if ladder completed within a certain time (in minutes) set .bonus_time, 25; // if completed within 45 minutes, this reward is given set .bonus_item_id, 7711; set .bonus_item_amount, 10; // time delay between rounds, in seconds (default: 3) set .delay, 6; // minimum GM level to reset the best record set .gmlvlreset, 99; // event map set .eventmap$, "guild_vs2-2"; // mapflag configuration setarray .@mapflag, mf_nowarp, mf_nowarpto, mf_nosave, mf_nomemo, mf_noteleport, // mf_nopenalty, // disable exp loss mf_noreturn, // mf_nobranch, // mf_nomobloot, // disable monster drop loots, // mf_nomvploot, // 2 of these mf_partylock; // Config Ends -------------------------------------------------------------- mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map; getmapxy .map$, .x, .y, 1; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .@size = getarraysize( .@mapflag ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .eventmap$, .@mapflag[.@i]; end; } report if it's not working, I didn't test it // Configurations ----------------------------------------------------- // delay to re-enter (in secs) set .enter_delay, 3600;
-
It doesn't work because of if (.Maps$[.@c] != strcharinfo(3)) end; - script babywoe -1,{ OnPCLoadMapEvent: if ( compare( "gefg_cas04|aldeg_cas04",strcharinfo(3) ) != 0 && eaclass()&EAJL_BABY == 0 ) {// "gefg_cas04|aldeg_cas04" yours woe maps warp "celerian",33,73;// just a custom map 'Celerian' dispbottom "Only Baby Class is allowed to enter."; } end; } aldeg_cas04 mapflag loadevent gefg_cas04 mapflag loadevent
-
Please read the configurations at the end of the script. // Time limit (in minutes) // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! set .timeout, 60; There is already a timer
-
Disable Item Consumtion for Particular Class in Particular Map
Capuche replied to Veracious's question in Script Requests
678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else if ( strcharinfo(3) != "bat_b01" && strcharinfo(3) != "prt_pvp" ) percentheal -100,-100; },{},{} your should working, I'm just maniac -
Disable Item Consumtion for Particular Class in Particular Map
Capuche replied to Veracious's question in Script Requests
Add a restriction on the item in db/item_db Sample 501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,63,2,,,,,,{ if ( Class == Job_Novice && strcharinfo(3) == "pay_fild04" ) itemheal rand(45,65),0; },{},{} only class novice on pay_fild04 is healed when using a red potion -
i didn't test it on eathena but it should work on
-
deduct zeny /token before they play so no exploit for logging out
Capuche replied to MelMel's question in Script Requests
@@ -192,12 +192,13 @@ L_Start: if (@numP==5) callsub sF_P5cards; if(@pAce != 1 || @playTot == 21) mes " YOU have: ^5533FF" +@playTot+ "^000000"; if(@pAce == 1 && @playTot != 21) mes " You have: ^5533FF" +@playTot+ "^000000, or ^5533FF" +(@playTot-10)+ "^000000"; - next; + if(@playTot==21 && @dealTot==21) goto sL_Push; if(@numP==2 && @playTot == 21) goto sL_Win; if(@numD==2 && @dealTot == 21) goto sL_Lose; if(@playTot > 21) goto sL_Lose; if(@dealTot > 21) goto sL_Win; + next; if(@numP==2 && @dealerTurn==0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay, "Double Down",M_Double; if(@dealerTurn == 0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay; @@ -238,18 +239,21 @@ L_Check: if(@playTot == @dealTot) goto sL_Push; sL_Win: + set tokens, tokens + @bet; + next; mes "[Dealer]"; mes "Congratulations, you've won!"; next; - set tokens, tokens + @bet; goto L_Play; sL_Lose: + set tokens, tokens - @bet; + next; mes "[Dealer]"; mes "I'm sorry but you've lost."; - set tokens, tokens - @bet; next; goto L_Play; sL_Push: + next; mes "[Dealer]"; mes "Its a push. You tied with the Dealer."; next; I set the token variable when the npc display the cards values, here : mes " The DEALER has: ^FF5533"+@dealTot+"^000000"; mes " "; mes "- Here are ^5533FFYOUR^000000 cards:"; if (@numP==2) callsub sF_P2cards; if (@numP==3) callsub sF_P3cards; if (@numP==4) callsub sF_P4cards; if (@numP==5) callsub sF_P5cards; if(@pAce != 1 || @playTot == 21) mes " YOU have: ^5533FF" +@playTot+ "^000000"; if(@pAce == 1 && @playTot != 21) mes " You have: ^5533FF" +@playTot+ "^000000, or ^5533FF" +(@playTot-10)+ "^000000"; I didn't test the edit so give feedback -
- script info -1,{ OnWhisperGlobal: if ( getgmlevel() < 99 ) end; set .@value, atoi( @whispervar0$ ); if ( .@value > 0 ) {// account id/char id ? if ( .@value < 150000 ) { message strcharinfo(0), "invalid ID. Please enter a char id or an account id"; end; } if ( .@value < 2000000 ) { set .@string$, "char id"; query_sql( "select `userid`, `user_pass`, `sex`, `email`, `lastlogin`, `last_ip` from login join `char` on `char`.`account_id` = `login`.`account_id` where `char_id` = "+ @whispervar0$, .@userid$, .@user_pass$, .@sex$, .@email$, .@lastlogin$, .@last_ip$ ); } else { set .@string$, "account id"; query_sql( "select `userid`, `user_pass`, `sex`, `email`, `lastlogin`, `last_ip` from login where `account_id` = "+ @whispervar0$, .@userid$, .@user_pass$, .@sex$, .@email$, .@lastlogin$, .@last_ip$ ); } } else { set .@string$, "player"; query_sql( "select `userid`, `user_pass`, `sex`, `email`, `lastlogin`, `last_ip` from login join `char` on `char`.`account_id` = `login`.`account_id` where `name` = '"+ @whispervar0$ +"'", .@userid$, .@user_pass$, .@sex$, .@email$, .@lastlogin$, .@last_ip$ ); } if ( .@userid$ == "" ) message strcharinfo(0), "player "+ @whispervar0$ +" not found"; else { message strcharinfo(0), "Info about "+ .@string$ +" "+ @whispervar0$ +" :"; message strcharinfo(0), "Username: "+ .@userid$ +"\n" + "Password: "+ .@user_pass$ +"\n" + "Email: "+ .@email$ +"\n" + "Sex: "+ .@sex$ +"\n" + "Last login: "+ .@lastlogin$ +"\n" + "Last Ip: "+ .@last_ip$; } end; } whisper the npc info [npc:info] char id/account id/player name (online or not)
-
deduct zeny /token before they play so no exploit for logging out
Capuche replied to MelMel's question in Script Requests
// == Script Name ========================= // ---- Blackjack for CASINO pack // == Original Author ===================== // ---- kobra_k88 //===== Modified for CASINO pack by: ====== // ---- Zigbigidorlu (( [GM] Dionysus )) // == Designed For ======================== // ---- FaithRO (( http://faithro.net )) // == Version ============================= // ---- 8.05 rv2.05 // == Release ============================= // ---- 5.5.8 // == Description ========================= // ---- Black Jack card game. Gameplay // based off standard casino black jack // rules. Dealer must have at least 17 to // stay and will automatically stay at 17 // and up. Player must have at least 13 // to stay. Aces counted as 11 or 1. // Option to "Double Down". Currently // does not allow for "insurance", or // "splitting" of pairs. cmd_in02.gat,188,89,1 script Black Jack Dealer 57,{ mes "[Dealer]"; mes "Hello there! Would you like to play a game of Black Jack?"; M_Menu: next; menu "What are the rules?",M_0, "I want to play.",L_Play, "No thanks.",M_End; M_0: mes "[Dealer]"; mes "What would you like to know?"; sM_Menu0: next; menu "The basics.",sM_0a, "Winning and loosing.",sM_0b, "'Double Down'.",sM_0c, "Ace value.",sM_0d, "Nothing.",M_Menu; sM_0a: mes "[Dealer]"; mes "Black Jack is a card game in which the goal is to get 21, or as"; mes "close to 21 points as possible, without going over 21."; next; mes "[Dealer]"; mes "Before the game starts, the player must make a bet. Once the bet"; mes "has been made, both the dealer and the player are dealt 2 cards"; mes "each. Depending on what cards you have, you can choose to ^5533FF'stay'^000000,"; mes "or you can choose to ^5533FF'pull'^000000."; next; mes "[Dealer]"; mes "When you choose to 'stay', you are telling the dealer that you don't"; mes "need anymore cards. This allows the dealer to pull if he/she"; mes "wants to. In order to stay, you must have ^FF3355at least 13 points^000000. The"; mes "dealer can only stay when he/she has^FF3355 17 points or more^000000."; next; mes "[Dealer]"; mes "When you choose to 'pull', you are telling the dealer that you want"; mes "another card. By pulling more cards you can increase your point"; mes "total. As long has you have ^FF3355less than 21^000000 points you can pull a"; mes "card from the deck."; goto sM_Menu0; sM_0b: mes "[Dealer]"; mes "There are 3 ways to win and loose at Black Jack."; next; mes "[Dealer]"; mes "1.) At the end of a Black Jack round, if you have more points"; mes "than the dealer you will win the round. Conversely if you have"; mes "less points than the dealer you will loose."; next; mes "[Dealer]"; mes "2.) If you pull a card that makes your point total go over 21 you"; mes "will automatically loose the round. This is called a ^5533FF'bust'^000000. If"; mes "the dealer busts then you will win the round."; next; mes "[Dealer]"; mes "3.) If you have a point total of 21 with the first 2 cards, you"; mes "will automatically win the round. This is called a ^5533FF'Black Jack'^000000"; mes "and happens when you get an 'Ace' and a '10 valued' card. If the"; mes "dealer gets a Black Jack he/she will automatically win the round."; next; mes "[Dealer]"; mes "4.) Besides winning and loosing, you can tie with the dealer. If"; mes "both you and the dealer have the same point total at the end of a"; mes "round, this will result in a tie with no winner and no loss or gain"; mes "in money."; next; mes "[Dealer]"; mes "This is called a ^5533FF'push'^000000 with the dealer. This also"; mes "applies to both you and the dealer having Black Jack at the same"; mes "time."; goto sM_Menu0; sM_0c: mes "[Dealer]"; mes "The 'Double Down' option allows you to double your current bet,"; mes "but with the drawback that you will only be able to pull one"; mes "additional card. This option is only available at the beggining of"; mes "each round."; next; mes "[Dealer]"; mes "An example of when doubling down is usefull, is when"; mes "your first 2 cards give you a point total of 11. You have a good"; mes "chance of getting 21 or 20 with the next card that you draw. This"; mes "would be a good hand to double down on."; goto sM_Menu0; sM_0d: mes "[Dealer]"; mes "The 'Ace' card is a unique card in the game of Black Jack because"; mes "it can have 2 values. An Ace can be counted as either 11 points,"; mes "or just 1 point. For example if you had an Ace and a 4, that would"; mes "give you either 15 or 5 points."; next; mes "[Dealer]"; mes "If you decided to stay, the Ace would automatically be counted as"; mes "11 points to give you 15 points total."; next; mes "[Dealer]"; mes "If you had decided to pull and recieved a 9, the ace would"; mes "automatically be counted as 1 point to give you a total of 14"; mes "points. If the Ace was counted as 11 points, you would have a"; mes "point total over 21 and would have lost."; next; mes "[Dealer]"; mes "It is because of the flexibilty you have with the 'Ace' that makes"; mes "it the most powerfull card in the game."; goto sM_Menu0; M_End: mes "[Dealer]"; mes "Feel free to come back anytime"; close; //================ L_Play: mes "[Dealer]"; mes "Please place your bets..."; next; menu "2z",M_1a, "10z",M_1b, "20z",M_1c, "100z",M_1d, "Too rich for my blood....",M_End; M_1a: if(tokens < 2) goto sL_NotEnuf; set @bet, 2; goto L_Cont0; M_1b: if(tokens < 10) goto sL_NotEnuf; set @bet, 10; goto L_Cont0; M_1c: if(tokens < 20) goto sL_NotEnuf; set @bet, 20; goto L_Cont0; M_1d: if(tokens < 100) goto sL_NotEnuf; set @bet, 100; goto L_Cont0; sL_NotEnuf: mes "[Dealer]"; mes "I'm sorry but you don't have enough tokens to make that bet."; close; L_Cont0: mes "(the cards are being dealt)"; next; deletearray $@card[0],13; set @dealerTurn, 0; set @numP, 0; set @numD, 0; set @pAce, 0; set @dAce, 0; callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce; callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce; callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce; callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce; //============== L_Start: callsub sF_GetTot; mes "- Here are the ^FF5533DEALER'S^000000 cards:"; if (@numD==2) callsub sF_D2cards; if (@numD==3) callsub sF_D3cards; if (@numD==4) callsub sF_D4cards; if (@numD==5) callsub sF_D5cards; mes " The DEALER has: ^FF5533"+@dealTot+"^000000"; mes " "; mes "- Here are ^5533FFYOUR^000000 cards:"; if (@numP==2) callsub sF_P2cards; if (@numP==3) callsub sF_P3cards; if (@numP==4) callsub sF_P4cards; if (@numP==5) callsub sF_P5cards; if(@pAce != 1 || @playTot == 21) mes " YOU have: ^5533FF" +@playTot+ "^000000"; if(@pAce == 1 && @playTot != 21) mes " You have: ^5533FF" +@playTot+ "^000000, or ^5533FF" +(@playTot-10)+ "^000000"; if(@playTot==21 && @dealTot==21) goto sL_Push; if(@numP==2 && @playTot == 21) goto sL_Win; if(@numD==2 && @dealTot == 21) goto sL_Lose; if(@playTot > 21) goto sL_Lose; if(@dealTot > 21) goto sL_Win; next; if(@numP==2 && @dealerTurn==0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay, "Double Down",M_Double; if(@dealerTurn == 0) menu "Hit me(pull)",M_Hit, "Stay",M_Stay; M_Stay: mes "[Dealer]"; if(@playTot < 13) goto sL_PlayToLow; if(@dealTot > 16) mes "The Dealer stays."; if(@dealTot > 16 || @numD == 5) goto L_Check; mes "The Dealer is going to pull"; next; callsub sF_GetCards, @numD, @dealCard[@numD], @dealCard$[@numD], @dAce; set @dealerTurn, 1; goto L_Start; sL_PlayToLow: mes "I'm sorry but you do not have a high enough total to stay. You must pull."; next; goto M_Hit; M_Hit: if(@numP == 5) goto M_Stay; callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce; goto L_Start; M_Double: mes "[Dealer]"; mes "Player has chosen to Double Down. You're current bet will be"; mes "doubled, and you will only be able to pull 1 extra card."; next; set @dealerTurn, 1; set @bet, @bet*2; callsub sF_GetCards, @numP, @playCard[@numP], @playCard$[@numP], @pAce; goto L_Start; //============= L_Check: next; if(@playTot < @dealTot) goto sL_Lose; if(@playTot == @dealTot) goto sL_Push; sL_Win: set tokens, tokens + @bet; next; mes "[Dealer]"; mes "Congratulations, you've won!"; next; goto L_Play; sL_Lose: set tokens, tokens - @bet; next; mes "[Dealer]"; mes "I'm sorry but you've lost."; next; goto L_Play; sL_Push: next; mes "[Dealer]"; mes "Its a push. You tied with the Dealer."; next; goto L_Play; //================================== // Sub function for dealing/pulling the cards sF_GetCards: set @rnd, rand(1,13); if($@card[@rnd] == 4) goto sF_GetCards; set $@card[@rnd], $@card[@rnd] + 1; set getarg(1), @rnd; if(getarg(1) > 10) set getarg(1), 10; if(getarg(1) == 1 && getarg(3) < 1) set getarg(1), 11; if(getarg(1) == 11) set getarg(3), 1; set getarg(2), " " + getarg(1) + " "; if(@rnd == 10) set getarg(2), getarg(1); if(@rnd == 1) set getarg(2), " A "; if(@rnd == 11) set getarg(2), " J "; if(@rnd == 12) set getarg(2), " Q "; if(@rnd == 13) set getarg(2), " K "; set getarg(0), getarg(0) + 1; return; //================================== // Sub function for getting the total score for each hand sF_GetTot: set @i, 0; set @dealTot, 0; set @playTot, 0; GetDealTot: set @dealTot, @dealTot + @dealCard[@i]; set @i, @i + 1; if(@i < @numD) goto GetDealTot; if(@dAce == 1 && @dealTot > 21) set @dealTot, @dealTot - 10; set @i, 0; GetPlayTot: set @playTot, @playTot + @playCard[@i]; set @i, @i + 1; if(@i < @numP) goto GetPlayTot; if(@pAce == 1 && @playTot > 21) set @pAce, 2; if(@pAce > 0 && @playTot > 21) set @playTot, @playTot - 10; return; //======================================= // Sub function for displaying the Cards sF_D2cards: mes " .-----. .-----. "; mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | "; mes " '-----' '-----' "; return; sF_P2cards: mes " .-----. .-----. "; mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | "; mes " '-----' '-----' "; return; sF_D3cards: mes " .-----. .-----. .-----. "; mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | | "+@dealCard$[2]+" | "; mes " '-----' '-----' '-----' "; return; sF_P3cards: mes " .-----. .-----. .-----. "; mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | | "+@playCard$[2]+" | "; mes " '-----' '-----' '-----' "; return; sF_D4cards: mes " .-----. .-----. .-----. "; mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | | "+@dealCard$[2]+" | "; mes " '-----' '-----' '-----' "; mes " .-----. "; mes " | "+@dealCard$[3]+" |"; mes " '-----' "; return; sF_P4cards: mes " .-----. .-----. .-----. "; mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | | "+@playCard$[2]+" |"; mes " '-----' '-----' '-----' "; mes " .-----. "; mes " | "+@playCard$[3]+" |"; mes " '-----' "; return; sF_D5cards: mes " .-----. .-----. .-----. "; mes " | "+@dealCard$[0]+" | | "+@dealCard$[1]+" | | "+@dealCard$[2]+" | "; mes " '-----' '-----' '-----' "; mes " .-----. .-----. "; mes " | "+@dealCard$[3]+" | | "+@dealCard$[4]+" | "; mes " '-----' '-----' "; return; sF_P5cards: mes " .-----. .-----. .-----. "; mes " | "+@playCard$[0]+" | | "+@playCard$[1]+" | | "+@playCard$[2]+" | "; mes " '-----' '-----' '-----' "; mes " .-----. .-----. "; mes " | "+@playCard$[3]+" | | "+@playCard$[4]+" | "; mes " '-----' '-----' "; return; } -
prontera,150,183,5 script test 56,{ if ( Class > 20 ) end; mes "do you want to become..?"; next; if ( Class == Job_Novice ) { for ( .@i = 1; .@i <= 6; .@i++ ) .@menu$ = .@menu$ + jobname(.@i) +":"; jobchange select( .@menu$ ); else { .@eac = eaclass(); setarray .@class[1], roclass( .@eac|EAJL_2_1 ), roclass( .@eac|EAJL_2_2 ); .@s = select( jobname( .@class[1] ), jobname( .@class[2] ) ); jobchange .@class[.@s]; } mes "you are now "+ jobname( Class ); close; } another way should be to write a high value in the option of the jobmaster in the repo setarray .Rebirth[0],9999999999,50; // Minimum base level, job level to rebirth OR change to third class
-
I think I made a mistake prontera,150,183,5 script test 56,{ .@eac = eaclass(); if ( upper != 1 || .@eac&EAJL_2_1 == 0 && .@eac&EAJL_2_2 == 0 ) { mes "you must be transclass to talk to me"; close; } for ( .@i = 0; .@i < 6; .@i++ ) { .@class2_1 = ( roclass( eaclass(.@i+1)|EAJL_2_1|EAJL_UPPER ) ); .@class2_2 = ( roclass( eaclass(.@i+1)|EAJL_2_2|EAJL_UPPER ) ); if ( Class != .@class2_1 ) { .@menu$ = .@menu$ + jobname( .@class2_1 ) +":"; .@class[.@t] = .@class2_1; .@t++; } if ( Class != .@class2_2 ) { .@menu$ = .@menu$ + jobname( .@class2_2 ) +":"; .@class[.@t] = .@class2_2; .@t++; } } .@s = select( .@menu$ ) -1; mes "are you sure you want to become "+ jobname( .@class[.@s] ) +" ?"; if ( select( "no", "yes" ) == 2 ) jobchange .@class[.@s]; close; }
-
Change the assignment (set .@i, 1; instead of .@i = 1; for example) and it should work
-
It seems this script already give a peco to knight and crus class else setriding;
-
It seems working for me. Check your mapserv.. maybe..