TSMDude wrote...
Any help would be appreciated and yes, I know several of you have good scripts but please only mention them if your willing to share, lol...
I HAS AW3SOM3 SKRIPT YOU CANNOT HAS! BWAHAHAHAHA!
On a more serious note, this is what we use for our Boots of Springing and Leaping - it just uses AppearDisappear, which can have serious downsides (like players stuck bein invisible and unable to move, requiring relog). That's an uncommon problem, though, and we see it as acceptable for our purpose - guild contests:
#include "hg_inc"
#include "x2_inc_switches"
void main() {
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE)
return;
object oPC = GetItemActivator();
object oItem = GetItemActivated();
object oArea = GetArea(oPC);
if (GetTag(oArea) != "PillarsofPerdition") {
SendMessageToPC(oPC, "You cannot use these boots in this area.");
return;
}
location lTarget = GetItemActivatedTargetLocation();
object oBlocker = GetNearestCreatureToLocation(CREATURE_TYPE_IS_ALIVE, TRUE, lTarget,
1, CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
location lBlocker = GetLocation(oBlocker);
object oCreature = GetNearestCreatureToLocation(CREATURE_TYPE_IS_ALIVE, TRUE, lTarget, 1);
location lCreature = GetLocation(oCreature);
if (GetIsObjectValid(oBlocker) &&
oBlocker != oPC &&
GetDistanceBetweenLocations(lTarget, lBlocker) < 2.0) {
SendMessageToPC(oPC, "You cannot land so close to another player. Because there " +
"is not enough room to land, you would plummet into oblivion.");
return;
}
if (GetIsObjectValid(oCreature) &&
GetIsEncounterCreature(oCreature) &&
GetDistanceBetweenLocations(lTarget, lCreature) < 2.0) {
SendMessageToPC(oPC, "You cannot land so close to a creature. Because there " +
"is not enough room to land, you would plummet into oblivion.");
return;
}
if (GetResRef(oItem) == "bootsofspring001") {
if (GetLocalInt(oArea, "RestrictGreaterBoots") && !GetLocalInt(oPC, "AllowGreaterBoots")) {
SendMessageToPC(oPC, "You cannot use the Greater Boots of Springing and Leaping at this time.");
return;
}
AddLocalInt(oPC, "GreaterBootsUses", 1);
}
if (GetIsObjectValid(GetItemPossessedBy(oPC, "newssithrgem")))
RemoveStealthEffects(oPC);
effect eJump = EffectDisappearAppear(lTarget);
ApplyVisualToObject(VFX_IMP_PULSE_WIND, oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oPC, 5.0);
}
For places where it could cause a player permadeath, however, we use an alternative using two effects, Disappear and Appear. Here's our illithid gravity warp effect:
void DoSlam(object oSlammed, int nDamage, int nHasRing) {
location lSlam = GetLocation(oSlammed);
effect eJump = EffectDisappear();
effect eLand = EffectAppear();
ApplyEffectToObject(1, eJump, oSlammed, 1.0);
AssignCommand(GetArea(OBJECT_SELF), DelayCommand(1.0, ApplyEffectToObject(0, eLand, oSlammed)));
effect eDamageFall = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING);
DelayCommand(2.0, ApplyEffectToObject(0, eDamageFall, oSlammed));
if (nHasRing)
DelayCommand(3.0, FloatingTextStringOnCreature("Your levitation cushioned your fall!", oSlammed, FALSE));
else
DelayCommand(3.0, FloatingTextStringOnCreature("The Graviter caught you in a gravity warp!", oSlammed, FALSE));
}
If you mean something other ethan short hops, though, you'd have to go the pheotype route as the last poster suggested. I suppose you could combine that with the 'hops' to allow players to go up and down on different elevations - though I would bind a player tool for that rather than an item, I think.
Funky