Raily 1 Posted March 28, 2016 Well, i guess this is a completely dumb question... but is there a logic way to teleport all Connecting & Online players to one Location? Share this post Link to post Share on other sites
0 Cretino 48 Posted March 30, 2016 (edited) I think is it you want. @EDITLittle improvement applied. - script warp_online_players FAKE_NPC,{ OnInit: bindatcmd "warpall", strnpcinfo(3) + "::OnAtcommand", 99, 99, 0; setarray .warp_skip_group[0], 99; // Skip administrator group ID if (getarraysize($warp_online) == 0) setarray $warp_online[0], -1; end; OnAtcommand: // Usage: @warpall <map name> <x> <y> if (.@atcmd_numparameters < 3) message strcharinfo(0), .@atcmd_command$ + " failed. Usage: " + .@atcmd_command$ + " <map name> <x> <y>"; else { .@tmp = playerattached(); for(.@i = 0; .@i < getarraysize($warp_online); .@i++) { if ($warp_online[.@i] == -1) continue; if (isloggedin($warp_online[.@i])) { if (attachrid($warp_online[.@i])) { for(.@j = 0; .@j < getarraysize(.warp_skip_group); .@j++) { if (getgroupid() >= .warp_skip_group[.@j]) continue; warp .@atcmd_parameters$[0], atoi(.@atcmd_parameters$[1]), atoi(.@atcmd_parameters$[2]); break; } detachrid; } else setarray $warp_online[.@i], -1; } else setarray $warp_online[.@i], -1; } if (isloggedin(.@tmp)) { if (attachrid(.@tmp)) message strcharinfo(0), "All players have been warped to '" + .@atcmd_parameters$[0] + "' " + .@atcmd_parameters$[1] + "," + .@atcmd_parameters$[2] + "."; } } end; OnPCLoginEvent: for(.@i = 0; .@i < getarraysize($warp_online); .@i++) { if ($warp_online[.@i] == -1) { setarray $warp_online[.@i], getcharid(3); @warp_position = .@i; break; } } if (.@i == getarraysize($warp_online)) { @warp_position = getarraysize($warp_online); setarray $warp_online[@warp_position], getcharid(3); } end; OnPCLogoutEvent: setarray $warp_online[@warp_position], -1; @warp_position = 0; end; } Edited March 30, 2016 by Cretino 1 Raily reacted to this Share this post Link to post Share on other sites
0 Raily 1 Posted March 29, 2016 Yes, sure i ment the entire system for an NPC not as GM. (The NPC is not a visible NPC... its a function.) Share this post Link to post Share on other sites
0 Raily 1 Posted March 30, 2016 Seems like noone has an idea how to teleport all online players to an position using an NPC w/o using @recallall.... D: Share this post Link to post Share on other sites
0 Garr 117 Posted March 30, 2016 You can try using addrid plugin, and then even normal warp command will do Share this post Link to post Share on other sites
0 Raily 1 Posted March 30, 2016 Mah, did already test that, isnt working sadly... Share this post Link to post Share on other sites
0 Raily 1 Posted March 31, 2016 Wow, thank you very much, that help a lot! Share this post Link to post Share on other sites
Well, i guess this is a completely dumb question... but is there a logic way to teleport all Connecting & Online players to one Location?
Share this post
Link to post
Share on other sites