-
Posts
2407 -
Joined
-
Last visited
-
Days Won
52
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Capuche
-
Just to point addtimer <ticks>,"NPC::OnLabel"; is not the best choice for your request since the player would be kicked only if he 'closes' the npc (an example is the headgear preview)
-
Nope it's definitely the view id. You can test it if you don't believe me... It's not the type : it would be screw up to save 'type 4' in the column weapon since type 4 can only be a weapon
-
Yes it's correct however you can delete the attachrid part when giving an item for ( .@i = 0; .@i < .@count; .@i++ ) { getitem 7773,20, .@account_id[.@i];
-
Requesting @item (bindatcmd) w/ Password system
Capuche replied to Limestone's question in Script Requests
the script can be done with atcommand too - script item_cmd -1,{ OnInit: bindatcmd "item",strnpcinfo(3)+"::OnAtcommand",60,60;// your min gmlevel end; OnAtcommand: .@myname$ = strcharinfo(0); if ( #item_cmd_password$ == "" ) { L_password: message .@myname$, "Please set your @item password (length must be between 4-10)."; if ( input( .@tmp$, 4,10 ) != 0 ) { message .@myname$, "The length must be between 4-10.";// => cancel end; } message .@myname$, "Your @item password is now : "+ .@tmp$; #item_cmd_password$ = .@tmp$; } else { message .@myname$, "Your @item password ?"; input .@tmp$; if ( .@tmp$ != #item_cmd_password$ ) { message .@myname$, "Wrong password."; end; } if ( select( "Continue", "Change password" ) == 2 ) goto L_password; } atcommand "@item "+ .@atcmd_parameters$[0] +" "+ .@atcmd_parameters$[1]; end; } but it was fun to make the script without it both working -
Maybe.. remove the skill from the mob skill db
-
where did you get that? I made a search in my rathena folder -> Search "char_opt" (0 hits in 0 files) indeed it save the view id
-
I guess you need source mod -> moved to source request
-
Check your skill_nocast_db and npc\mapflag\restricted
-
- script login_reward -1,{ OnPCLoginEvent: .@pow = 1 << 10; .@todays = gettime(8); if ( login_reward % .@pow == .@todays ) end; .@count += .reward_day;// reward of the day login_reward = ( login_reward &~ ( login_reward % .@pow ) ) + .@todays + .@pow;// update day and count day +1 ; day/count day/check week/check month if ( login_reward != .@todays + .@pow ) {// login_reward was not empty .@count_day = ( login_reward >> 10 ) % .@pow; .@cond_ofthemonth = ( ( login_reward >> 30 ) % .@pow ) != ( .@count_day / 31 ); if ( ( ( login_reward >> 20 ) % .@pow ) != ( .@count_day / 7 ) ) { .@count += .reward_week; login_reward = login_reward + pow( 2,20 ); .@weekly_message$ = ( .@cond_ofthemonth ? ", " : " and " ) + .reward_week +" golds for being online a week"; } if ( .@cond_ofthemonth ) { .@count += .reward_month; login_reward = login_reward + pow( 2,30 ); .@montly_message$ = " and " + .reward_month +" golds for being online a month"; } } getitem 969, .@count; dispbottom "Here your daily reward ! You got "+ .reward_day +" golds"+ .@weekly_message$ + .@montly_message$ +"."; end; OnInit: .reward_day = 2;// reward of the day : amount of gold .reward_week = 10;// reward of the week : amount of gold .reward_month = 35;// reward of the month : amount of gold end; } with the settings .reward_day = 2;// reward of the day : amount of gold .reward_week = 10;// reward of the week : amount of gold .reward_month = 35;// reward of the month : amount of gold
-
Requesting @item (bindatcmd) w/ Password system
Capuche replied to Limestone's question in Script Requests
- script item_cmd -1,{ OnInit: bindatcmd "item",strnpcinfo(3)+"::OnAtcommand",60,60;// your min gmlevel end; OnAtcommand: .@amount = atoi( .@atcmd_parameters$[1] ); .@amount = .@amount < 1 ? 1 : .@amount; .@myname$ = strcharinfo(0); if ( .@atcmd_numparameters == 0 ) { message .@myname$, "Please enter an item name or ID (usage: @item <item name/ID> <quantity>)."; message .@myname$, "@item failed."; end; } if ( countstr( .@atcmd_parameters$[0], ":" ) ) { explode( .@dummy$, .@atcmd_parameters$[0], ":" ); .@size = getarraysize( .@dummy$ ); while( .@i < .@size ) { .@item_id[.@i] = atoi( .@dummy$[.@i] ); if ( .@item_id[.@i] == 0 && getstrlen( .@dummy$[.@i] ) > 2 ) .@count = !searchitem( .@item_id[.@i],.@dummy$[.@i] ); if ( .@count || getiteminfo( .@item_id[.@i],0 ) == -1 ) { message .@myname$, "Invalid item ID or name."; message .@myname$, "@item failed."; end; } .@count = 0; .@i++; } } else { .@item_id = atoi( .@atcmd_parameters$[0] ); if ( .@item_id == 0 && getstrlen( .@atcmd_parameters$[0] ) > 2 ) .@count = !searchitem( .@item_id,.@atcmd_parameters$[0] ); if ( .@count || getiteminfo( .@item_id,0 ) == -1 ) { message .@myname$, "Invalid item ID or name."; message .@myname$, "@item failed."; end; } .@size = 1; } if ( #item_cmd_password$ == "" ) { L_password: message .@myname$, "Please set your @item password (length must be between 4-10)."; if ( input( .@tmp$, 4,10 ) != 0 ) { message .@myname$, "The length must be between 4-10.";// => cancel end; } message .@myname$, "Your @item password is now : "+ .@tmp$; #item_cmd_password$ = .@tmp$; } else { message .@myname$, "Your @item password ?"; input .@tmp$; if ( .@tmp$ != #item_cmd_password$ ) { message .@myname$, "Wrong password."; end; } if ( select( "Continue", "Change password" ) == 2 ) goto L_password; } while( .@j < .@size ) { getitem .@item_id[.@j], .@amount; .@j++; } message .@myname$, "Item created."; end; } it supports item name/ID and multi item name/ID -
else if ( .start != 1 ) { .start is undefined (so the value is always 0) Like Phenomena said .Day is undefined set #PremiumUser,gettimetick(2) + ( .Day * 3600 * 24 );// .Day must be 7 you forgot gettimetick(2) in theses lines, so the mapserv throw an overflow sc_start SC_ITEMBOOST,( #PremiumUser * 1000 ),50;// must be : sc_start SC_ITEMBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),50; sc_start SC_EXPBOOST,( #PremiumUser * 1000 ),300;// idem : sc_start SC_EXPBOOST,( ( #PremiumUser - gettimetick(2) ) * 1000 ),300;
-
to retrieve the current bPerfectHitRate of the player -> readparam( bPerfectHitRate ); note that if you also use bPerfectHitAddRate like in your example, readparam( bPerfectHitRate ) will throw the total value bonus bPerfectHitRate,1; bonus bPerfectHitAddRate,3; -> readparam( bPerfectHitRate ) => 4
-
Add the RE items in your item pre db or delete the item id of the 'non existant item' in mob db
-
OnAgitEnd: setarray .@castle_map$, "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05";// your castle map .@size = getarraysize( .@castle_map$ ); while( .@j < .@size ) { .@guild_id = getcastledata( .@castle_map$[.@j],1 ); if ( .@guild_id ) { .@count = query_sql( "select account_id from guild_member where guild_id = "+ .@guild_id +" and online = 1", .@account_id ); for ( .@i = 0; .@i < .@count; .@i++ ) { if ( attachrid .@account_id[.@i] ) #CASHPOINTS += 30; } query_sql "INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`, `account_id`) select `guild_member`.`char_id`, '#CASHPOINTS', '30', '3', '0' from `guild_member` where guild_id = "+ .@guild_id +" and online = 0 on duplicate key update `value` = `value` +30"; } .@j++; } end;
-
@Emistry if you use sum it sure will overflow 2 characters, 3000 zeny each log in -> sum -> 3000 + 3000 zeny -> log out log in -> sum -> 6000 + 3000 zeny -> log out
-
you can do the trick with a script npc - script qsdfgh -1,{ OnPCLoginEvent: query_sql "select max(`zeny`) from `char` where `account_id` = "+ getcharid(3), Zeny;// get and set the max zeny in my account end; }
-
bindatcmd is implemented in your revision, no need source edit http://trac.rathena.org/search?q=bindatcmd
-
replace } else if (countitem(getarg(0)) < @coupons) { by } else if (countitem( @couponid ) < @coupons) {
-
You must apply the patch from http://rathena.org/board/topic/72571-battleground-system-without-waitingroom/?hl=setbgid
-
nope not need an rid from my test
-
prontera,150,150,5 script trader 58,{ .@exchange_value = 3;// get 3 kafrapoints for 1 cashpoints if ( #CASHPOINTS == 0 ) { mes "You need some cashpoints."; close; } if ( select( "Trade", "Leave" ) == 2 ) { mes "Good bye."; close; } mes "How many points do you want to trade? You currently have "+ #CASHPOINTS +" cashpoints. 1 cashpoint = "+ .@exchange_value +" kafrapoint"; if ( input( .@value, 1, #CASHPOINTS ) != 0 ) { mes "Wrong value."; close; } #CASHPOINTS -= .@value; #KAFRAPOINTS = #KAFRAPOINTS + .@value * .@exchange_value; mes "you exchange "+ .@value +" cashpoints for "+ ( .@value * .@exchange_value ) +" kafrapoints"; close; }
-
something like this OnAgitEnd: .@castle_map$ = "prtg_cas01";// your castle map .@guild_id = getcastledata( .@castle_map$,1 ); .@count = query_sql( "select account_id from guild_member where guild_id = "+ .@guild_id +" and online = 1", .@account_id ); while( .@i < .@count ) { attachrid .@account_id[.@i]; #CASHPOINTS += 30; .@i++; } query_sql "INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`, `account_id`) select `guild_member`.`char_id`, '#CASHPOINTS', '30', '3', '0' from `guild_member` where guild_id = "+ .@guild_id +" and online = 0 on duplicate key update `value` = `value` +30"; end; EDIT : can be done with addrid too OnAgitEnd: .@castle_map$ = "prtg_cas01";// your castle map .@guild_id = getcastledata( .@castle_map$,1 ); query_sql "INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`, `account_id`) select `guild_member`.`char_id`, '#CASHPOINTS', '30', '3', '0' from `guild_member` where guild_id = "+ .@guild_id +" and online = 0 on duplicate key update `value` = `value` +30"; addrid( 3,0, .@guild_id ); #CASHPOINTS += 30; end;
-
I don't undersand your request, please reformulate it.
-
Script for disabling berry in Automated Event
Capuche replied to c e d i e's question in Script Requests
@c e d i e With the mapflag restricted the item is consumed but the effect is disabled. -
Replace //Check for 1 Minute if(@minute == 180){ set @minute,0; set .@point_amt, 1; //Points to get every hour (default: 10) getitem 7227,.@point_amt; dispbottom "You received "+.@point_amt+" TCGs by staying ingame for 1 hour"; set @consecutive_hour, @consecutive_hour + 1; } by //Check for 1 Minute if( @minute % 10 == 0 ){ set .@point_amt, 10; //Points to get // give 10 points... fill out dispbottom "You received "+.@point_amt+" TCGs by staying ingame for 10 mins"; } if(@minute == 180){ set @minute,0; set @consecutive_hour, @consecutive_hour + 1; } to give something every 10 mins