Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. Use getequiprefinerycnt bonus bStr, getequiprefinerycnt( EQI_HEAD_TOP ); bonus bMaxSP, getequiprefinerycnt( EQI_HEAD_TOP );
  2. or like that prontera,150,160,5 script warp anywhere 78,{ function t; function s; if ( cooldown_warp > gettimetick(2) ) { mes "you must wait "+ t( cooldown_warp - gettimetick(2) ); close; } warp "geffen", 0,0; cooldown_warp = gettimetick(2) + 3600;// 3600 secs = 1h addtimer ( 3 *60 *1000 ), strnpcinfo(3) +"::OnEvent";// 3mins end; OnEvent: dispbottom "end of timer"; warp "prontera", 0,0; end; function t { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@week = .@left / ( 86400 * 7 ); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; return ( ( .@week ? .@week +" week"+ s( .@week ) : "" ) + ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } }
  3. The npc display NULL because of the non existent item. I thought your item ID existed so I didn't add a check prontera,152,170,4 script Custom Headgear Trader 797,{ function AddItem; mes "[Custom Headgear Trader]"; mes "Hello " +strcharinfo(0)+ ", I can exchange your Custom Headgear. That means if you're ever bored of your current Custom Headgear sprite, I can easily give you another!"; next; mes "[Custom Headgear Trader]"; mes "This service however is not free, if you want to change your Custom Headgear, I require:"; mes "1x Custom Headgear"; mes "3x Cash Points"; next; if (select("Continue, please.:I'm not interested.") - 1) close; if(#CASHPOINTS < 3) { mes "[Custom Headgear Trader]"; mes "I'm sorry You do not meet the requirements. For you to use my service, I need 3 Cash Points and a Custom Headgear."; close; } mes "[Custom Headgear Trader]"; mes "Very well, let's proceed with the process. Select the Customized Headgear that you want to exchange:"; getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { if ( getiteminfo( @inventorylist_id[.@i],5 ) & ( 1|256|512 ) == 0 ) continue;// not an headgear for ( .@j = 0; .@j <= .num_total/128; .@j++ ) { if ( compare( getd( ".itemidcompare"+ .@j +"$" ), ":"+ @inventorylist_id[.@i] +":" ) ) { setd ".@arraymenu_"+ ( .@count/10 ) +"$["+ ( .@count%10 ) +"]", getitemname( @inventorylist_id[.@i] ); setd ".@itemid_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_id[.@i]; setd ".@refine_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_refine[.@i]; setd ".@attribute_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_attribute[.@i]; setd ".@identify_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_identify[.@i]; setd ".@card1_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card1[.@i]; setd ".@card2_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card2[.@i]; setd ".@card3_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card3[.@i]; setd ".@card4_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card4[.@i]; .@count++; } } } if ( .@count == 0 ) { sleep2 2000; mes "...Oh, it appears that you have no Custom Headgear, sorry but I can't help you."; close; } while(1) { .@menu$ = ( .@page ? "^777777Back^000000:" : ":" ) + implode( getd( ".@arraymenu_"+ .@page +"$" ), ":" ) + ( .@page == .@count/10 ? "":":^777777Next Page^000000" ); .@s = select( .@menu$ ) -2; if ( .@s == -1 && .@page ) .@page--; else if ( .@s == 10 ) .@page++; else break; } .@item_name$ = getd( ".@arraymenu_"+ .@page +"$["+ .@s +"]" ); .@myitem_id = getd( ".@itemid_"+ .@page +"["+ .@s +"]" ); mes "You've selected your ^FF0000" + getd( ".@arraymenu_"+ .@page +"$["+ .@s +"]" ) + "^000000, is that correct?"; next; if (select("Yes, it is.:No.") - 1) close; next; mes "[Custom Headgear Trader]"; mes "Very well then, now select the item you want to exchange your " + .@item_name$ + " for:"; mes "^FF0000To see a list of available sprites, please talk to the Headgear NPC!^000000"; for ( .@j = 0; .@j < .num_total; .@j += 10 ) { .@menu$ = ( .@j/10 ? "^777777Back^000000:" : ":" ); for ( .@i = .@j; .@i < .@j +10; .@i++ ) { .@item_id = getd( ".itemid"+ ( .@i/128 ) +"["+ ( .@i%128 ) +"]" ); if ( .@item_id ) .@item_name2$ = getitemname( .@item_id ); else .@item_name2$ = ":"; .@menu$ = .@menu$ + .@item_name2$ +":"; } .@menu$ = .@menu$ + ( .@j/10 != .num_total/10 ? "^777777Next Page^000000" : "" ); .@s2 = select( .@menu$ ) -2; if ( .@s2 == -1 && .@j/10 ) .@j -= 20; else if ( .@s2 != 10 ) break; } .@tradeid = getd( ".itemid"+ ( ( .@j + .@s2 ) /128 ) +"["+ ( .@j + .@s2 )%128 +"]" ); next; mes "[Custom Headgear Trader]"; mes "Please confirm that you want to use 3 Cash Points for trading your ^FF0000" + .@item_name$ + "^000000 for a ^FF0000" + getitemname(.@tradeid)+ "^000000:"; next; if (select("Confirm:Cancel") - 1) close; if (countitem( .@myitem_id ) == 0 || #CASHPOINTS < 3) { mes "[Custom Headgear Trader]"; mes "It appears that you don't meet the requirements. In order to use my service, you need to have a Custom Headgear and 3 Cash Points."; close; } .@identify = getd( ".@identify_"+ .@page +"["+ .@s +"]" ); .@refine = getd( ".@refine_"+ .@page +"["+ .@s +"]" ); .@attribute = getd( ".@attribute_"+ .@page +"["+ .@s +"]" ); .@card1 = getd( ".@card1_"+ .@page +"["+ .@s +"]" ); .@card2 = getd( ".@card2_"+ .@page +"["+ .@s +"]" ); .@card3 = getd( ".@card3_"+ .@page +"["+ .@s +"]" ); .@card4 = getd( ".@card4_"+ .@page +"["+ .@s +"]" ); delitem2 .@myitem_id,1, .@identify, .@refine, .@attribute, .@card1, .@card2, .@card3, .@card4; getitem2 .@tradeid,1, .@identify, .@refine, .@attribute, .@card1, .@card2, .@card3, .@card4; set #CASHPOINTS,#CASHPOINTS - 3; mes "[Custom Headgear Trader]"; mes "==================================="; mes "Official Receipt"; mes "==================================="; mes "From : " + .@item_name$; mes "To : " +getitemname(.@tradeid); mes "==================================="; dispbottom "3 Cash Points have been deducted. Current Balance = "+#CASHPOINTS+" Cash Points."; next; mes "[Custom Headgear Trader]"; mes "Thank you for using my Custom Headgear trading system, " +strcharinfo(0)+ ". Have a nice day!"; close; OnInit: AddItem( 8005,8006,8015,8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,8052,8053,8054,8055,8056,8057,8058,8059,8060,8062,8063,8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080,8081,8082,8083,8084,8085,8086,8087,8094,8095,8098,8100,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,8112,8113,8114,8115,8116,8112,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,8128,8130,8131,8132,8133,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077 ); // AddItem( 5009,5010,5011,5012,5013,5014,5015,5016,5017,5018,5019 ); // AddItem( 601,... ); end; function AddItem { .@amount = .num_total + getargcount(); .@i = .@tmp = .num_total; while( .@i < .@amount ) { .@arg = getarg( .@i - .@tmp ); if ( getitemname( .@arg ) != "NULL" ) { setd ".itemid"+ ( .num_total/128 ) +"["+ ( .num_total%128 ) +"]", .@arg; setd ".itemidcompare"+ ( .num_total/128 ) +"$", getd( ".itemidcompare"+ ( .num_total/128 ) +"$" ) +":"+ .@arg; .num_total += 1; if ( .num_total%128 == 0 ) setd ".itemidcompare"+ ( .num_total/128 -1 ) +"$", getd( ".itemidcompare"+ ( .num_total/128 -1 ) +"$" ) +":"; else if ( .num_total == .@amount ) setd ".itemidcompare"+ ( .num_total/128 ) +"$", getd( ".itemidcompare"+ ( .num_total/128 ) +"$" ) +":"; } .@i++; } } } this version skip the non existent item ID
  4. Replace the previous sleep to sleep2 to keep the rid of the player sleep2 500; // Slow down script execution slightly. if( agitcheck() ) donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; sleep2 7000; // your announce
  5. prontera,166,185,6 script ghjkl 56,{ if ( getgmlevel() < 99 ) end; mes "Enter an item id or item name. Display a list order by max amount found."; input .@tmp$; .@item_id = atoi( .@tmp$ ); if ( .@item_id == 0 && getstrlen( .@tmp$ ) > 2 ) {// item name, eventually .@count = searchitem( .@tmp_array, .@tmp$ ); if ( .@count == 0 ) {// none item found mes "None item found."; close; } mes "I found the following items: "; next; while( .@i < .@count ) { .@menu$ = .@menu$ + getitemname( .@tmp_array[.@i] ) +" (ID "+ .@tmp_array[.@i] +"):"; .@i++; } .@s = select( .@menu$ ) -1; .@item_id = .@tmp_array[.@s]; } else if ( .@item_id == 0 || getiteminfo( .@item_id,2 ) == -1 ) { mes "Wrong item id"; close; } .@search$ = "`nameid` = "+ .@item_id +" or `card0` = "+ .@item_id +" or `card1` = "+ .@item_id +" or `card2` = "+ .@item_id +" or `card3` = "+ .@item_id; while(1) { .@count = query_sql( "SELECT `char`.`name`, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `inventory` WHERE `char`.`char_id` = `inventory`.`char_id` and ( "+ .@search$ +" ) ) AS inv, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `cart_inventory` WHERE `char`.`char_id` = `cart_inventory`.`char_id` and ( "+ .@search$ +" ) ) AS cart, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `storage` WHERE `storage`.`account_id` = `char`.`account_id` and ( "+ .@search$ +" ) ) AS sto, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `guild_storage` WHERE `guild_storage`.`guild_id` = `char`.`guild_id` and ( "+ .@search$ +" ) ) AS gsto "+ "FROM `char` order by ( inv + cart + sto + gsto ) desc limit "+ ( .@page * 100 ) +", 100", .@name$, .@inventory, .@cart, .@storage, .@gstorage ); if ( .@count == 0 ) break; for ( .@i = 0; .@i < .@count && .@name$[.@i] != ""; .@i += 20 ) { mes "^ff0000<player>^000000 <inv>,^00ff00<cart>,^0000ff<sto>,^006600<gsto>"; for ( .@j = 0; .@j < 20 && .@name$[ (.@i+.@j) ] != ""; .@j++ ) { .@tmp = .@i + .@j; if ( ( .@inventory[.@tmp] + .@cart[.@tmp] + .@storage[.@tmp] + .@gstorage[.@tmp] ) == 0 ) { next; goto L_end;// XP! } .@num++; mes .@num +"/ ^ff0000"+ .@name$[.@tmp] +"^000000 : < "+ .@inventory[.@tmp] +", ^00ff00"+ .@cart[.@tmp] +", ^0000ff"+ .@storage[.@tmp] +", ^006600"+ .@gstorage[.@tmp] +"^000000 >"; } next; } .@page++; } L_end: mes "*end of the list*"; close; }
  6. Capuche

    GM Group

    There is no limit of the group in the src (group def as int) the limit is on sql where group is def as tinyint (max 127) You can create a group id 25000042 and make an @adjgroup, it's working but without mod a group max is def as 127 in sql
  7. Try this battleground by AnnieRuru Just change the map http://rathena.org/board/topic/73801-can-someone-fix-this-for-me-thank-you/?p=154082
  8. Comment the lines with 'agiup' for the mvps https://github.com/rathena/rathena/blob/master/db/re/mob_skill_db.txt#L1169
  9. Try prontera,152,170,4 script Custom Headgear Trader 797,{ function AddItem; mes "[Custom Headgear Trader]"; mes "Hello " +strcharinfo(0)+ ", I can exchange your Custom Headgear. That means if you're ever bored of your current Custom Headgear sprite, I can easily give you another!"; next; mes "[Custom Headgear Trader]"; mes "This service however is not free, if you want to change your Custom Headgear, I require:"; mes "1x Custom Headgear"; mes "3x Cash Points"; next; if (select("Continue, please.:I'm not interested.") - 1) close; if(#CASHPOINTS < 3) { mes "[Custom Headgear Trader]"; mes "I'm sorry You do not meet the requirements. For you to use my service, I need 3 Cash Points and a Custom Headgear."; close; } mes "[Custom Headgear Trader]"; mes "Very well, let's proceed with the process. Select the Customized Headgear that you want to exchange:"; getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { if ( getiteminfo( @inventorylist_id[.@i],5 ) & ( 1|256|512 ) == 0 ) continue;// not an headgear for ( .@j = 0; .@j <= .num_total/128; .@j++ ) { if ( compare( getd( ".itemidcompare"+ .@j +"$" ), ":"+ @inventorylist_id[.@i] +":" ) ) { setd ".@arraymenu_"+ ( .@count/10 ) +"$["+ ( .@count%10 ) +"]", getitemname( @inventorylist_id[.@i] ); setd ".@itemid_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_id[.@i]; setd ".@refine_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_refine[.@i]; setd ".@attribute_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_attribute[.@i]; setd ".@identify_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_identify[.@i]; setd ".@card1_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card1[.@i]; setd ".@card2_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card2[.@i]; setd ".@card3_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card3[.@i]; setd ".@card4_"+ ( .@count/10 ) +"["+ ( .@count%10 ) +"]", @inventorylist_card4[.@i]; .@count++; } } } if ( .@count == 0 ) { sleep2 2000; mes "...Oh, it appears that you have no Custom Headgear, sorry but I can't help you."; close; } while(1) { .@menu$ = ( .@page ? "^777777Back^000000:" : ":" ) + implode( getd( ".@arraymenu_"+ .@page +"$" ), ":" ) + ( .@page == .@count/10 ? "":":^777777Next Page^000000" ); .@s = select( .@menu$ ) -2; if ( .@s == -1 && .@page ) .@page--; else if ( .@s == 10 ) .@page++; else break; } .@item_name$ = getd( ".@arraymenu_"+ .@page +"$["+ .@s +"]" ); .@myitem_id = getd( ".@itemid_"+ .@page +"["+ .@s +"]" ); mes "You've selected your ^FF0000" + getd( ".@arraymenu_"+ .@page +"$["+ .@s +"]" ) + "^000000, is that correct?"; next; if (select("Yes, it is.:No.") - 1) close; next; mes "[Custom Headgear Trader]"; mes "Very well then, now select the item you want to exchange your " + .@item_name$ + " for:"; mes "^FF0000To see a list of available sprites, please talk to the Headgear NPC!^000000"; for ( .@j = 0; .@j < .num_total; .@j += 10 ) { .@menu$ = ( .@j/10 ? "^777777Back^000000:" : ":" ); for ( .@i = .@j; .@i < .@j +10; .@i++ ) { .@item_id = getd( ".itemid"+ ( .@i/128 ) +"["+ ( .@i%128 ) +"]" ); if ( .@item_id ) .@item_name2$ = getitemname( .@item_id ); else .@item_name2$ = ":"; .@menu$ = .@menu$ + .@item_name2$ +":"; } .@menu$ = .@menu$ + ( .@j/10 != .num_total/10 ? "^777777Next Page^000000" : "" ); .@s2 = select( .@menu$ ) -2; if ( .@s2 == -1 && .@j/10 ) .@j -= 20; else if ( .@s2 != 10 ) break; } .@tradeid = getd( ".itemid"+ ( ( .@j + .@s2 ) /128 ) +"["+ ( .@j + .@s2 )%128 +"]" ); next; mes "[Custom Headgear Trader]"; mes "Please confirm that you want to use 3 Cash Points for trading your ^FF0000" + .@item_name$ + "^000000 for a ^FF0000" + getitemname(.@tradeid)+ "^000000:"; next; if (select("Confirm:Cancel") - 1) close; if (countitem( .@myitem_id ) == 0 || #CASHPOINTS < 3) { mes "[Custom Headgear Trader]"; mes "It appears that you don't meet the requirements. In order to use my service, you need to have a Custom Headgear and 3 Cash Points."; close; } .@identify = getd( ".@identify_"+ .@page +"["+ .@s +"]" ); .@refine = getd( ".@refine_"+ .@page +"["+ .@s +"]" ); .@attribute = getd( ".@attribute_"+ .@page +"["+ .@s +"]" ); .@card1 = getd( ".@card1_"+ .@page +"["+ .@s +"]" ); .@card2 = getd( ".@card2_"+ .@page +"["+ .@s +"]" ); .@card3 = getd( ".@card3_"+ .@page +"["+ .@s +"]" ); .@card4 = getd( ".@card4_"+ .@page +"["+ .@s +"]" ); delitem2 .@myitem_id,1, .@identify, .@refine, .@attribute, .@card1, .@card2, .@card3, .@card4; getitem2 .@tradeid,1, .@identify, .@refine, .@attribute, .@card1, .@card2, .@card3, .@card4; set #CASHPOINTS,#CASHPOINTS - 3; mes "[Custom Headgear Trader]"; mes "==================================="; mes "Official Receipt"; mes "==================================="; mes "From : " + .@item_name$; mes "To : " +getitemname(.@tradeid); mes "==================================="; dispbottom "3 Cash Points have been deducted. Current Balance = "+#CASHPOINTS+" Cash Points."; next; mes "[Custom Headgear Trader]"; mes "Thank you for using my Custom Headgear trading system, " +strcharinfo(0)+ ". Have a nice day!"; close; OnInit: AddItem( 8005,8006,8015,8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,8052,8053,8054,8055,8056,8057,8058,8059,8060,8062,8063,8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080,8081,8082,8083,8084,8085,8086,8087,8094,8095,8098,8100,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,8112,8113,8114,8115,8116,8112,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,8128,8130,8131,8132,8133,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077 ); // AddItem( 5009,5010,5011,5012,5013,5014,5015,5016,5017,5018,5019 ); // AddItem( 601,... ); end; function AddItem { .@amount = .num_total + getargcount(); .@i = .num_total; while( .@i < .@amount ) { .@arg = getarg( .@i - .num_total ); setd ".itemid"+ ( .@i/128 ) +"["+ ( .@i%128 ) +"]", .@arg; setd ".itemidcompare"+ ( .@i/128 ) +"$", getd( ".itemidcompare"+ ( .@i/128 ) +"$" ) +":"+ .@arg; .@i += 1; if ( .@i%128 == 0 ) setd ".itemidcompare"+ ( .@i/128 -1 ) +"$", getd( ".itemidcompare"+ ( .@i/128 -1 ) +"$" ) +":"; else if ( .@i == .@amount ) setd ".itemidcompare"+ ( .@i/128 ) +"$", getd( ".itemidcompare"+ ( .@i/128 ) +"$" ) +":"; } .num_total = .@amount; } } My God I spend 30mins on a bug >>
  10. What does this script suppose to do? can't find any information on google
  11. What was the problem after all ? It was working for me
  12. I suggest you to use initnpctimer instead of sleep command : awake only 'awake' the current sleep, the script still run like that OnEnable: sleep2 5000; donpcevent "Greedsummoner::OnSummon"; mapannounce "prt_fild08","Summoner: Start now!",0; initnpctimer; end; OnTimer60000: mapannounce "prt_fild08","Summoner: 5 minute's left",0; end; OnTimer120000: mapannounce "prt_fild08","Summoner: 4 minute's left",0; end; OnTimer180000: mapannounce "prt_fild08","Summoner: 3 minute's left",0; end; // etc.. Don't forget to stop the timer - awake "GAnnounce"; + stopnpctimer;
  13. It may be because of the next button // Capuche cleaning Base on the poring race by Zell_ff8, xianz, Neko prontera,139,184,5 script Poring Race 882,{ if( .access_Prace == 0 ) { mes "[Poring Race Staff]"; mes "Poring Race has ended."; close; } mes "[Poring Race Staff]"; mes "Do you want to participate on Poring Race?"; if( select( "Yes","No" ) -1 ) { next; mes "[Poring Race Staff]"; mes "See you again next time!"; close; } if( .access_Prace == 0 ) { next; mes "[Poring Race Staff]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } close2; @prace_winner$ = ""; warp "p_track01",52,41; end; // OnInit: OnMinute20: if( gettime(3)%2 ) end; set .access_Prace, 1; announce "Poring Race is now open!",0,0xFFAB54; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; end; OnPraceEnd: set .access_Prace, 0; announce "Poring Race is over!",0,0xFFAB54; end; } p_track01,58,41,3 script Bidder#prace0 877,{ function checkevent; mes "[Bidder]"; if( getstrlen( @prace_winner$ ) ) { mes "You have choose ^00bb00"+ @prace_winner$ +"^000000"; close; } else if ( checkevent() || .start ) { mes "There is a race in progress..."; close; } else if( !getvariableofnpc( .access_Prace,"Poring Race" ) ) { mes "There is no race."; close; } mes "Choose the poring you want to bet:"; mes "It will cost "+ .zeny_req +" Zeny."; next; .@s = select( .menu_$ ); if( .@s == 7 ) { mes "[Bidder]"; mes "Goodbye."; close; } .@c$ = .monst_$[ .@s -1 ]; if ( checkevent() ) { mes "[Bidder]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } else if( Zeny < .zeny_req ) { mes "[Bidder]"; mes "You don't have enough Zeny."; close; } Zeny -= .zeny_req; @prace_winner$ = .@c$; .prace_bidders[ .prace_bets ] = getcharid(3); .prace_bets++; mes "[Bidder]"; mes "I have "+ .prace_bets +" bets."; initnpctimer; npctalk "I got "+ strcharinfo(0) +" bet!"; close; OnTimer60000: npctalk "I got "+ .prace_bets +" bets. Anyone else?"; end; OnTimer80000: npctalk "The race will start soon. Last chance."; end; OnTimer90000: stopnpctimer; .start = 1; mapannounce "p_track01","Porings, on your marks...",1,0xFFAB54; sleep 2500; for( .@i = 3; .@i > 0; .@i-- ) { mapannounce "p_track01","..."+ .@i +"...",1,0xFFAB54; sleep 1000; } donpcevent strnpcinfo(0) +"::OnStartRace"; sleep 1000; mapannounce "p_track01","Gooo!!!",1,0xFFAB54; end; OnTimer320000: mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; donpcevent strnpcinfo(0) +"::OnReturnRace"; end; OnStartRace: callsub L_label, "OnRace"; OnStopRace: callsub L_label, "OnStop"; OnReturnRace: callsub L_label, "OnReturn"; L_label: donpcevent "Metaling#prace3::"+ getarg(0); donpcevent "Poring#prace1::"+ getarg(0); donpcevent "Poporing#prace6::"+ getarg(0); donpcevent "Angeling#prace2::"+ getarg(0); donpcevent "Santa Poring#prace5::"+ getarg(0); donpcevent "Deviling#prace4::"+ getarg(0); if( getarg(0) == "OnStop" && .prace_winner$ != "" ) { mapannounce "p_track01", "The winner is "+ .prace_winner$,1,0xFFAB54; donpcevent strnpcinfo(0) +"::OnChequeo"; sleep 3000; donpcevent strnpcinfo(0) +"::OnReturnRace"; sleep 10000; mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; } end; OnChequeo: for( .@i = 0 ; .@i < .prace_bets; .@i++ ) { if( attachrid( .prace_bidders[.@i] ) && getstrlen( @prace_winner$ ) ) { dispbottom "The winner is "+ .prace_winner$ +" and you have bet for "+ @prace_winner$ +"."; if( @prace_winner$ == .prace_winner$ ) { dispbottom "You have won!"; mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1,0xFFAB54; getitem .item_gained, .item_num_gain; emotion 21,1; } else { dispbottom "You have lost."; emotion 28,1; } @prace_winner$ = ""; } } deletearray .prace_bidders, .prace_bets; end; OnInit: .zeny_req = 3500; .item_gained = 7199; .item_num_gain = 2; setarray .monst_$,"Poring","Angeling","Metaling","Deviling","Santa Poring","Poporing","None"; .menu_$ = implode( .monst_$, ":" ); end; function checkevent { getmapxy .@mapname$, .@x1, .@y, 1, "Poring#prace1"; getmapxy .@mapname$, .@x2, .@y, 1, "Angeling#prace2"; getmapxy .@mapname$, .@x3, .@y, 1, "Metaling#prace3"; getmapxy .@mapname$, .@x4, .@y, 1, "Deviling#prace4"; getmapxy .@mapname$, .@x5, .@y, 1, "Santa Poring#prace5"; getmapxy .@mapname$, .@x6, .@y, 1, "Poporing#prace6"; .@tmp = ( .@x1 + .@x2 + .@x3 + .@x4 + .@x5 + .@x6 ) != 58 * 6; return .@tmp; } } //----------------------------------- // Racer NPC's //----------------------------------- - script pori_race -1,{ OnRace: initnpctimer; end; OnStop: stopnpctimer; end; OnReturn: sleep 1000; while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++; movenpc strnpcinfo(3), 58, .walk_t[.@i]; end; OnTimer1100: getmapxy .@mapname$,.@x,.@y,1, strnpcinfo(3); if( rand(100) < .prace_random ) npcwalkto .@x-1, .@y; .@r = rand( .prace_random2 ); if ( .@x -1 == 29 ) { while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++; set getvariableofnpc( .prace_winner$, "Bidder#prace0" ), .monst$[ .@i ]; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; end; } stopnpctimer; setnpctimer .@r; startnpctimer; end; OnInit: if ( strnpcinfo(2) != "" ) end; setarray .walk_t, 38, 36, 34, 32, 30, 28; setarray .monst$, "Poring", "Angeling", "Metaling", "Deviling", "Santa Poring", "Poporing"; .prace_random = 70; .prace_random2 = 600; end; } p_track01,58,38,2 duplicate(pori_race) Poring#prace1 1002 p_track01,58,36,2 duplicate(pori_race) Angeling#prace2 1096 p_track01,58,34,2 duplicate(pori_race) Metaling#prace3 1613 p_track01,58,32,2 duplicate(pori_race) Deviling#prace4 1582 p_track01,58,30,2 duplicate(pori_race) Santa Poring#prace5 1062 p_track01,58,28,2 duplicate(pori_race) Poporing#prace6 1031 p_track01,78,42,0 warp p_track002 1,3,prontera,142,170 p_track01 mapflag nobranch p_track01 mapflag noicewall p_track01 mapflag nomemo p_track01 mapflag noreturn p_track01 mapflag noteleport p_track01 mapflag nowarpto p_track01 mapflag nowarp p_track01 mapflag pvp off p_track01 mapflag nosave
  14. official script https://github.com/rathena/rathena/blob/master/npc/other/divorce.txt
  15. Did you change the coordinates too? // x and y horizone .. setarray .x_line,149,154,159; setarray .y_line,173,169,165,161,157;
  16. Line 20 miss a bracket -> if(!countitem( getd(".item"+.@menu+"[0]") ) ) {mes "You need to have 1, "+ getitemname(getd(".item"+.@menu+"[0]")) +""; close;}
  17. You can use bonus2 bAddDefClass,n,x; x% physical damage reduction against monsters of class n Against players, n is their job id. bonus2 bAddMDefClass,n,x; x% magical damage reduction against monsters of class n Against players, n is their job id.
  18. About skill_damage_db don't forget to enable the option in core.h /// Uncomment to enable skills damage adjustments /// By enabling this, db/skill_damage.txt and the skill_damage mapflag will adjust the /// damage rate of specified skills. //#define ADJUST_SKILL_DAMAGE
  19. The second version should work on hercules http://rathena.org/board/topic/87702-requesting-item-bindatcmd-w-password-system/?p=223987 However what do you mean by 'stuck'? do you have any error on your mapserv?
  20. - script inuinhuin -1,{ OnPCLoginEvent: set .@number1, rand( 1000 ); set .@number2 rand( 1000 ); set .@total, .@number1 + .@number2; mes .@number1 +" + "+ .@number2 +" ? you have 5 seconds to answer"; attachnpctimer; initnpctimer; input .@ans; if (.@ans != .@total ) { mes "wrong!"; stopnpctimer; OnTimer5000: atcommand "@kick "+strcharinfo(0); } else { mes "right!"; stopnpctimer; close; } }
  21. You misread, I said to remove the skill from mob_skill_db, not from skill_db
  22. You can let like that, that shouldn't create any problem I think
  23. Maybe http://rathena.org/board/topic/72457-chat-color-change/
  24. Post your current quest shop's script here, thanks
  25. I guess if ( strcharinfo(3) == "prtg_cas01" && .guild_id == getcharid(2) ){ should be if ( strcharinfo(3) == "prtg_cas01" && getcastledata("prtg_cas01", 1) == getcharid(2) ){ to update the castle owner
×
×
  • Create New...