Currently Posted January 13, 2013 Posted January 13, 2013 An OnPCLoginEvent where the NPC will automatically change the player's permissions to cannot trade when account "25xxx" login. will be used for donators. Quote
Nipsino Posted January 13, 2013 Posted January 13, 2013 An OnPCLoginEvent where the NPC will automatically change the player's permissions to cannot trade when account "25xxx" login. will be used for donators. Why not just create a seperate Group for donators? And then set the can_trade to false. Quote
Currently Posted January 13, 2013 Author Posted January 13, 2013 But then I'll have to restart server Quote
Nipsino Posted January 13, 2013 Posted January 13, 2013 But then I'll have to restart server No you don't. use @reloadpcdb 1 Quote
AnnieRuru Posted January 13, 2013 Posted January 13, 2013 http://www.eathena.ws/board/index.php?showtopic=174578 revamp this script entirely replace into item_db2 values ( 31061, 'Super_Player_card', 'Super Player card', 3, 10, null, 1, null, null, null, null, 2147483647, 7, 2, null, null, null, null, null, null, null, null ); replace into item_db2 values ( 31062, 'Hyper_Player_card', 'Hyper Player card', 3, 10, null, 1, null, null, null, null, 2147483647, 7, 2, null, null, null, null, null, null, null, null ); replace into item_db2 values ( 31063, 'Ultra_Player_card', 'Ultra Player card', 3, 10, null, 1, null, null, null, null, 2147483647, 7, 2, null, null, null, null, null, null, null, null ); // ~~~~~ show time left in days, hours, minutes and seconds ~~~~~ function script timeleft__ { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } prontera,156,179,5 script Player Promoter 947,{ mes "[Player Promoter]"; if ( getgmlevel() == 99 ) { mes "Hi Admin, do you want to distribute ^00CC00Player Promoter Cards^000000 with your name on it ?"; next; for ( .@i = 1; .@i <= .total_group; .@i++ ) .@menu$ = .@menu$ +"Distribute "+ getitemname( .group_idreq[.@i] ) +":"; .@s = select( .@menu$ ); getitem2 .group_idreq[.@s], 1,1,0,0, 254, 0, getcharid(0) % ( 1 << 16 ), getcharid(0) >> 16; close; } else if ( getgmlevel() > 1 ) { mes "Only Admin can use me"; close; } for ( .@i = 1; .@i <= .total_group; .@i++ ) .@menu$ = .@menu$ +( ( getgroupid() < .@i && countitem( .group_idreq[.@i] ) )? "upgrade to "+ .group_name$[.@i] : "" )+":"; if ( getstrlen( #pp_accupgrade$ ) ) { sscanf #pp_accupgrade$, "%d %d", .@id, .@time; mes "Your account is currently a ^00CC00"+ .group_name$[.@id] +"^000000. You still have ^0000FF"+ callfunc( "timeleft__", .@time - gettimetick(2) )+"^000000."; if ( getstrlen( .@menu$ ) == .total_group ) close; } else if ( getstrlen( .@menu$ ) == .total_group ) { mes "Make a donation and you can upgrade your account to become Super Players ^^"; close; } mes "Do you want to upgrade your account ?"; next; .@s = select( .@menu$ ); delitem .group_idreq[.@s], 1; #pp_accupgrade$ = .@s +" "+( gettimetick(2) + 2592000 ); // 1 month atcommand "@adjgroup "+ .@s; mes "[Player Promoter]"; mes "Your account has successfully upgraded to "+ .group_name$[1]; close; OnPCLoginEvent: if ( getgmlevel() > 1 ) #pp_accupgrade$ = ""; if ( !getstrlen( #pp_accupgrade$ ) ) end; sscanf #pp_accupgrade$, "%d %d", .@id, .@time; .@left = .@time - gettimetick(2); if ( .@left > 0 ) { atcommand "@adjgroup "+ .@id; if ( .@left >= 2147483 ) end; addtimer .@left *1000, "player_demoter::Ondemote"; end; } Ondemote: atcommand "@adjgroup 0"; message strcharinfo(0), "Your account has demoted to normal player"; #pp_accupgrade$ = ""; end; OnInit: // setarray .group_<definition>, <group ID 1>, <group ID 2>, <group ID 3>; ... must follow the sequence in 1,2,3,4,5 ... setarray .group_idreq[1], 31061, 31062, 31063; setarray .group_name$[1], "Super Player", "Hyper Player", "Ultra Player"; .total_group = 3; end; } Quote
QQfoolsorellina Posted January 18, 2013 Posted January 18, 2013 (edited) there is a new command that can handle this - script notest12345 -1,{ OnPCLoginEvent: if(donatorvar) atcommand "@rmvperm can_trade"; } Edited January 18, 2013 by QQfoolsorellina 1 Quote
Currently Posted January 18, 2013 Author Posted January 18, 2013 Thank you! This one is much easier (: Quote
Question
Currently
An OnPCLoginEvent where the NPC will automatically change the player's permissions to cannot trade when
account "25xxx" login.
will be used for donators.
6 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.