stydianx Posted July 20, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Share Posted July 20, 2013 I want to request a rewarder script that goes like this: this rewarder give players who comes to a map for the 1st time. -Checks IP. -Also gives Exp -One per account thanks Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 20, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 20, 2013 The first time on a special map or all maps? Quote Link to comment Share on other sites More sharing options...
stydianx Posted July 20, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted July 20, 2013 The first time on a special map or all maps? only 2 special maps Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 22, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 22, 2013 - script welcome_on_my_map -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); while( .@i < .size_specialmap && .@map$ != .special_map$[.@i] ) .@i++; if ( .@i == .size_specialmap || #variable_firstmap & ( 1 << .@i ) ) end; query_sql "select max(`value`) from global_reg_value where `str` = '#variable_firstmap' and `account_id` in ( select `account_id` from `login` where `last_ip` = ( select `last_ip` from `login` where `account_id` = "+ getcharid(3) +" ) )", .@tmp;// null convert to 0 by serv if ( .@tmp & ( 1 << .@i ) == 0 ) { #variable_firstmap = #variable_firstmap | ( 1 << .@i ); query_sql "insert into global_reg_value (`char_id`, `str`, `value`, `type`, `account_id`) select 0, '#variable_firstmap', '"+ #variable_firstmap +"', 2, `account_id` from `login` where `account_id` in ( select `account_id` from `login` where `last_ip` = ( select `last_ip` from `login` where `account_id` = "+ getcharid(3) +" ) ) on duplicate key update value = '"+ #variable_firstmap +"'"; getexp .base_exp_gained[.@i], .job_exp_gained[.@i];// base exp, job exp gained dispbottom "You got "+ .base_exp_gained[.@i] +" base exp and "+ .job_exp_gained[.@i] +" job exp."; } end; Oninit:// setting setarray .special_map$, "payon","geffen";// your map exp reward setarray .base_exp_gained, 100, 100;// base exp given by map (payon, geffen..) setarray .job_exp_gained, 100, 100;// job exp given by map (payon, geffen..) // others .size_specialmap = getarraysize( .special_map$ ); while( .@i < .size_specialmap ) { setmapflag .special_map$[.@i], mf_loadevent; .@i++; } } Quote Link to comment Share on other sites More sharing options...
stydianx Posted July 24, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted July 24, 2013 THANKSSSS! last question, how do i add items? Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 25, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 25, 2013 THANKSSSS! last question, how do i add items? after add your items (getitem <item id>, <amount>; ) if ( .@tmp & ( 1 << .@i ) == 0 ) { Quote Link to comment Share on other sites More sharing options...
stydianx Posted July 25, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted July 25, 2013 - script welcome_on_my_map -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); while( .@i < .size_specialmap && .@map$ != .special_map$[.@i] ) .@i++; if ( .@i == .size_specialmap || #variable_firstmap & ( 1 << .@i ) ) end; query_sql "select max(`value`) from global_reg_value where `str` = '#variable_firstmap' and `account_id` in ( select `account_id` from `login` where `last_ip` = ( select `last_ip` from `login` where `account_id` = "+ getcharid(3) +" ) )", .@tmp;// null convert to 0 by serv if ( .@tmp & ( 1 << .@i ) == 0 ) { getitem 607,100; #variable_firstmap = #variable_firstmap | ( 1 << .@i ); query_sql "insert into global_reg_value (`char_id`, `str`, `value`, `type`, `account_id`) select 0, '#variable_firstmap', '"+ #variable_firstmap +"', 2, `account_id` from `login` where `account_id` in ( select `account_id` from `login` where `last_ip` = ( select `last_ip` from `login` where `account_id` = "+ getcharid(3) +" ) ) on duplicate key update value = '"+ #variable_firstmap +"'"; getexp .base_exp_gained[.@i], .job_exp_gained[.@i];// base exp, job exp gained dispbottom "You got "+ .base_exp_gained[.@i] +" base exp and "+ .job_exp_gained[.@i] +" job exp."; } end; Oninit:// setting setarray .special_map$, "payon","geffen";// your map exp reward setarray .base_exp_gained, 100, 100;// base exp given by map (payon, geffen..) setarray .job_exp_gained, 100, 100;// job exp given by map (payon, geffen..) // others .size_specialmap = getarraysize( .special_map$ ); while( .@i < .size_specialmap ) { setmapflag .special_map$[.@i], mf_loadevent; .@i++; } } did i do this right? Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 26, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 26, 2013 Yes that's right 1 Quote Link to comment Share on other sites More sharing options...
stydianx Posted July 27, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 390 Reputation: 27 Joined: 07/12/12 Last Seen: October 24, 2022 Author Share Posted July 27, 2013 Thanks +1 Quote Link to comment Share on other sites More sharing options...
Question
stydianx
I want to request a rewarder script that goes like this:
this rewarder give players who comes to a map for the 1st time.
-Checks IP.
-Also gives Exp
-One per account
thanks
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.