Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   Team NPCs (https://forums.graalonline.com/forums/showthread.php?t=3187)

MoonAngel 05-19-2001 06:13 PM

Team NPCs
 
Would it be possible to get the team npc script used to separate the players in 2 teams like the CTF or CS? That script could be used by everyone and although ive encoutered glitches (my clothes dont go back to what they were they stay red or blue) it is one of the script i really need = |

Admins 05-19-2001 09:20 PM

The whole script?
Or just this

NPC Code:

pcount = 0;
for (i=0; i<playerscount; i++) with (players[i]) {
if (playerid>0) {
if (pcount%2==0)
setplayerprop #g,Red Team;
else
setplayerprop #g,Blue Team;
pcount++;
}
}


MoonAngel 05-19-2001 09:25 PM

hmm, i would appreciate the whole clothe changing and warping script and could also explain what this script those? I still have a lot to learn about scripting '-_-

kyle0654 05-19-2001 10:34 PM

That just sets their guild to the team they're on. You could then add whatever you want to do stuff based on their team like:

NPC Code:

function changeclothes() {
for (i = 0; i < playerscount; i++) { with(players[i]) {
if (strequals(#g,Red Team)) setplayerprop #C2, red;
else setplayerprop #C2 blue;
} }
}



I'm not sure if #C2 is coat, but it's not that hard to do once you have their guild set. You just set everything based on their team...maybe give them special weapons and stuff, then finally, you warp them in.

-Kyle

MoonAngel 05-19-2001 11:42 PM

kewl, thanks to both of you! =)


All times are GMT +2. The time now is 03:11 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.