Eross Posted September 4, 2021 Group: Members Topic Count: 165 Topics Per Day: 0.09 Content Count: 375 Reputation: 12 Joined: 04/05/20 Last Seen: 14 hours ago Share Posted September 4, 2021 Hi ! I have a script that disable dual gepard id in a map ... How to make this allow only 3 same gepard ID in map ??? Thanks - script disable_duals -1,{ end; OnInit: // 1= if you have gepard 0=if you do not use gepard set .Gepard,1; setarray .current_maps$[0] , "pvp_n_1-5", "guild_vs1", "guild_vs2", "guild_vs3", "guild_vs4", "guild_vs5", "pvp_y_1-2", "pvp_y_2-2", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05", "ordeal_1-1"; end; OnPCLoadMapEvent: if (.Gepard == 1) { //GEPARD SHIELD ID CHECKER for(set .@i ,0;.@i<getarraysize(.current_maps$);set .@i,.@i+1) { if (strcharinfo(3) == .current_maps$[.@i]) { getmapxy(.@map$,.@mapx,.@mapy,BL_PC); } } query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@UniqueId$); query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@UniqueId$+"'", .@CuentaId); set .@error,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) { if(attachrid(.@CuentaId[.@i])) { if (.@CuentaId == 2000001) { set .@j,0; } else { getmapxy(.@map2$,.@mapx2,.@mapy2,BL_PC); if (.@map2$ == .@map$){ set .@j,.@j+1; } } } } detachrid; attachrid .@error; if(.@j > 1) { dispbottom "Sorry, dual login is not allowed on this map."; sleep2 500; dispbottom "Warping you back to Savepoint now..."; sleep2 1000; warp "SavePoint",0,0; } end; } else { for(set .@i ,0;.@i<getarraysize(.current_maps$);set .@i,.@i+1) { if (strcharinfo(3) == .current_maps$[.@i]) { getmapxy(.@map$,.@mapx,.@mapy,BL_PC); } } query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@UltimaIp$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@UltimaIp$+"'", .@CuentaId); set .@error,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) { if(attachrid(.@CuentaId[.@i])) { //if .Gepard is 0 add id of accounts to which the system will not affect, brothers, couple, gms, etc ... .@CuentaId == accountId if (.@CuentaId == 2000001 || .@cuentaId == 2000156 || .@CuentaId == 2000249 || .@CuentaId == 2000002 || .@CuentaId == 2000031 || .@CuentaId == 2000050 || .@CuentaId == 2000021 || .@CuentaId == 2000073 || .@CuentaId == 2000029) { set .@j,0; } else { getmapxy(.@map2$,.@mapx2,.@mapy2,BL_PC); if (.@map2$ == .@map$){ set .@j,.@j+1; } } } } detachrid; attachrid .@error; if(.@j > 1) { dispbottom "Sorry, Double Login is not allowed on this map."; sleep2 1000; dispbottom "Warping you back to Savepoint..."; sleep2 2000; warp "SavePoint",0,0; } end; } } Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted September 4, 2021 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2364 Joined: 10/28/11 Last Seen: Saturday at 07:02 PM Share Posted September 4, 2021 if(.@j > 3) { dispbottom "Sorry, only 3 IDs with same Unique ID are allowed on this map."; sleep2 500; dispbottom "Warping you back to Savepoint now..."; sleep2 1000; warp "SavePoint",0,0; } Quote Link to comment Share on other sites More sharing options...
Question
Eross
Hi ! I have a script that disable dual gepard id in a map ... How to make this allow only 3 same gepard ID in map ??? Thanks
Link to comment
Share on other sites
1 answer 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.