I take it this is more of a security update rather than a major gameplay change?
Will Ghettozone begin to spawn its own bots or is that still up to Tokath?
Teleport isn't supposed to take arguments. It's only supposed to teleport to the nearest zone. Specific teleportation is what transport is for.
I was going to go crazy and post the exact code that shows you can teleport to town or dugeon in standard rpg but I dont need to. I have two items that are plausable proof.
1. Dueschat. Under the teleport-neutral menu you have options one and two. They are "Teleport to Town" and "Teleport to Dungeon". They would not be listed if they were not spells.
2. The fact that Shannara mentions it. Other players can confirm it to be true.
Ok I will mention one code item. The teleport spell uses the GetNearestZone() function to find the zone. In that fuction you can specify "town, "dungeon", and "freeforall".
I haven't changed any of that code. If it doesn't accept arguments now then it didn't before. End of story. Freaking trolls.
function GetNearestZone(%clientId, %zonetype, %returnType)
{
dbecho($dbechoMode, "GetNearestZone(" @ %clientId @ ", " @ %zonetype @ ", " @ %returnType @ ")");
>//%zonetype can be "town", "dungeon" or "freeforall"
%closestDist = 500000;
%closestZone = "";
%mpos = "";
%clpos = GameBase::getPosition(%clientId);
for(%i = 1; %i <= $numZones; %i++)
{
%type = $Zone::Type[%i];
if(%type == "PROTECTED" && String::ICompare(%zonetype, "town[/color]") == 0 ||
%type == "DUNGEON" && String::ICompare(%zonetype, "dungeon") == 0 ||
%type == "FREEFORALL" && String::ICompare(%zonetype, "freeforall") == 0 ||
%zonetype == -1)
{
%finalpos = $Zone::Marker[%i];
%dist = Vector::getDistance(%finalpos, %clpos);
if(%dist < %closestDist)
{
%closestDist = %dist;
%closestZoneDesc = $Zone::Desc[%i];
%closestZone = $Zone::FolderID[%i];
%mpos = %finalpos;
}
}
}
if(%mpos == "") //no zones were found (this means there are NO zones in the map...)
return False;
//%returnType:
//1 = returns the distance from the client to the nearest zone
//2 = returns the description of the zone nearest to the client
//3 = returns the zone id of the zone nearest to the client
//4 = returns the position of the middle of the zone nearest to the client
if(%returnType == 1)
return %closestDist;
else if(%returnType == 2)
return %closestZoneDesc;
else if(%returnType == 3)
return %closestZone;
else if(%returnType == 4)
return %mpos;
}
for(%i = 1; %i <= $numZones; %i++)
{
%type = $Zone::Type[%i];
if(%type == "PROTECTED" && String::ICompare(%zonetype, "town") == 0 || %type == "DUNGEON" && String::ICompare(%zonetype, "dungeon") == 0 || %type == "FREEFORALL" && String::ICompare(%zonetype, "freeforall") == 0 || %zonetype == -1)
{
%finalpos = $Zone::Marker[%i];
%dist = Vector::getDistance(%finalpos, %clpos);
if(%dist < %closestDist)
{
%closestDist = %dist;
%closestZoneDesc = $Zone::Desc[%i];
%closestZone = $Zone::FolderID[%i];
%mpos = %finalpos;
}
}
}
if(%mpos == "") //no zones were found (this means there are NO zones in the map...)
return False;
I'm not an experienced programmer, but I understand basic if-else if-else checks.
Quote from: "Corona"I'm not an experienced programmer, but I understand basic if-else if-else checks.
Did you totally miss the point of the screenshot I provided...that the code you're claiming I'm too dumb to read is IDENTICAL between PCRPG 3.35/3.33/ANY_VERSION and TRPG 5.005? Also, you don't have any idea how my spell system validation works. There is no possible way for it to pass "town" and not "dungeon" or "dungeon but not "town".
...so aggrivating
I offered to find a way to make it work how you folks would like, but instead of a "thanks" or an "ok" I just received more unsavory womaning. What the crap, guys. What the holy, mother farkin' crap.
I've had about enough of you for one day. If you aren't going to stick to the points and you want to skew everything to make it sound like I'm a freaking moron when it isn't my fault, I'll need you to leave the board for the remainder of today.
As a note to everybody on this forum (not particularly you, Corona), when I say "end of story" on this forum there is a reason. It means either "I'll take care of it, no need for further discussion," or it can also mean "Regardless of anything and everything, this is the last that should be mentioned of the current line of discussion in this thread." Some times like in this instance, both meanings apply.
This DID work in pcrpg before the cast exploit was fixed and you added all those argument checks for spells.
The teleport spell passes the %zonetype variable ("town" or "dungeon") and you can clearly see it being parsed by GetNearestZone(). Indeed, there is even a third argument you can pass, "freeforall", though I don't know what that does.