TeachersPet
Well-known member
- Joined
- Jul 27, 2005
- RedCents
- 71¢
Add this into PiggyZone. This is sort of a beta so you HAVE to use exact zone names (you can't use his full zone names thing etc...), but it works!
Just type /chainshift <zone1> <zone2> <zone3> all the way up to <zone 99> and it will zone you in order to each zone.
Post if you have any crashes or anything.
Add THIS to IntializePlugin
Add THIS to ShutDownPlugin
Just type /chainshift <zone1> <zone2> <zone3> all the way up to <zone 99> and it will zone you in order to each zone.
Post if you have any crashes or anything.
Rich (BB code):
// ChainShift Data
int ChainShiftZone[100] = {0};
int ChainShiftStatus = 0;
PLUGIN_API VOID OnZoned(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR szMsg[MAX_STRING] = {0};
if(ChainShiftZone[0] > 0) {
ChainShiftStatus++;
if(ChainShiftStatus > ChainShiftZone[0]) {
ChainShiftZone[0] = 0;
}
DestZone=ChainShiftZone[ChainShiftStatus];
DestType=1;
ZoneReason=0;
Y=pChar->Y;
X=pChar->X;
Z=pChar->Z;
Heading =(int)pChar->Heading;
ZoneChange=true;
return;
}
}
VOID ChainShift(PSPAWNINFO pChar, PCHAR szLine);
VOID ChainShift(PSPAWNINFO pChar, PCHAR szLine)
{
char szMsg[MAX_STRING] = {0};
bool ZoneDetected = true;
char ZoneCheckName[MAX_STRING] = {0};
int ZoneFound = 0;
ChainShiftStatus = 0;
GetArg(ZoneCheckName,szLine,1);
ZoneFound = GetZoneID(ZoneCheckName);
while(ZoneDetected == true) {
if(ZoneFound > 0) {
ChainShiftZone[0]++;
ChainShiftZone[ChainShiftZone[0]] = ZoneFound;
GetArg(ZoneCheckName,szLine,(ChainShiftZone[0] + 1));
ZoneFound = GetZoneID(ZoneCheckName);
} else {
ZoneDetected = false;
}
}
if(ChainShiftZone[0] > 0) {
ChainShiftStatus++;
DestZone=ChainShiftZone[1];
DestType=1;
ZoneReason=0;
Y=pChar->Y;
X=pChar->X;
Z=pChar->Z;
Heading =(int)pChar->Heading;
ZoneChange=true;
return;
}
}
Add THIS to IntializePlugin
Rich (BB code):
AddCommand("/chainshift",ChainShift);
Add THIS to ShutDownPlugin
Rich (BB code):
RemoveCommand("/chainshift");

