I redid the rowboat script below…got another error…ugh…trying my best to do this…you are right I suck at this scripting…trying though…lol. I will post the two scripts below my new script I just tried and failed again at:
#include "x2_inc_toollib"
void main()
{
object oPC =GetItemActivator();
int irowboat=GetLocalInt(oPC,"rowboat");
if (GetLocalInt(oPC,"stop")==1)
{
return;
}
if (irowboat==0)
{
if( GetAppearanceType(oPC)<7)
{
DelayCommand(1.0,SetCameraHeight(oPC,0.45));
SetPhenoType(45,oPC);
SetCreatureTailType(9970, oPC)
object ooar = CreateItemOnObject ("oar", oPC)
DelayCommand(0.1, AssignCommand(oPC, ActionEquipItem(ooar, INVENTORY_SLOT_RIGHTHAND)));
}
DelayCommand(1.0,SetCameraHeight(oPC,0.45));
SpeakString("rowboat",TALKVOLUME_SILENT_TALK);
SetLocalInt(oPC,"rowboat",1);
{ }
else
{
FloatingTextStringOnCreature("You must have a humanoid appeareance to row a boat !" ,oPC);
}
}
if (irowboat==1)
{
SetLocalInt(oPC,"rowboat",0);
SpeakString("debout",TALKVOLUME_SILENT_TALK);
SetPhenoType(0,oPC);
}
}
Will post the two scripts. The first one is from a crawling animation I have on a widget I found a long time ago on the vault:
#include "nw_i0_spells"
void RemoveAllEffect(object oPJ)
{
effect eLoop=GetFirstEffect(oPJ);
while (GetIsEffectValid(eLoop))
{
RemoveEffect(oPJ, eLoop);
eLoop=GetNextEffect(oPJ);
}
}
void main()
{
effect eLent=EffectMovementSpeedDecrease(60);
effect eSuperLent=ExtraordinaryEffect(eLent);
effect eSilent=EffectSkillIncrease(SKILL_MOVE_SILENTLY,15);
effect eSuperSilent=ExtraordinaryEffect(eSilent);
effect eHide=EffectSkillIncrease(SKILL_HIDE,15);
effect eSuperHide=ExtraordinaryEffect(eHide);
effect eAc2=EffectACIncrease(2,AC_DODGE_BONUS,DAMAGE_TYPE_PIERCING);
effect eSuperAc2=ExtraordinaryEffect(eAc2);
effect eWeakSlash=EffectDamageImmunityDecrease(DAMAGE_TYPE_SLASHING,50);
effect eSuperWeakSlash=ExtraordinaryEffect(eWeakSlash);
effect eWeakBludge=EffectDamageImmunityDecrease(DAMAGE_TYPE_BLUDGEONING,50);
effect eSuperWeakBludge=ExtraordinaryEffect(eWeakBludge);
object oPC =GetItemActivator();
int iRampe=GetLocalInt(oPC,"rampe");
if (GetLocalInt(oPC,"stop")==1)
{
return;
}
if (iRampe==0)
{
if( GetAppearanceType(oPC)<7)
{
DelayCommand(1.0,SetCameraHeight(oPC,0.45));
SetPhenoType(20,oPC);
SpeakString("rampe",TALKVOLUME_SILENT_TALK);
SetActionMode(oPC, ACTION_MODE_STEALTH, TRUE);
SetFootstepType(FOOTSTEP_TYPE_SOFT);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSuperLent,oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSuperHide,oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSuperSilent,oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSuperAc2,oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSuperWeakSlash,oPC);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSuperWeakBludge,oPC);
SetLocalInt(oPC,"rampe",1);
}
else
{
FloatingTextStringOnCreature("You must have a humanoid appeareance to crawl !" ,oPC);
}
}
if (iRampe==1)
{
SetLocalInt(oPC,"rampe",0);
SpeakString("debout",TALKVOLUME_SILENT_TALK);
SetPhenoType(0,oPC);
SetFootstepType(FOOTSTEP_TYPE_DEFAULT);
RemoveSpecificEffect(EFFECT_TYPE_AC_INCREASE,oPC);
RemoveSpecificEffect(EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE,oPC);
RemoveSpecificEffect(EFFECT_TYPE_SKILL_INCREASE,oPC);
RemoveSpecificEffect(EFFECT_TYPE_MOVEMENT_SPEED_DECREASE,oPC);
SetActionMode(oPC, ACTION_MODE_STEALTH, FALSE);
}
}
This second one is from the test module OnEnterArea script of the rowboat animation I downloaded from. I need it to work from a widget…not on entering an area.
#include "x2_inc_toollib"
void main()
{
object oPC = GetEnteringObject();
TLChangeAreaGroundTilesEx(GetArea(oPC), 401, 2.2f);
if (GetPhenoType(oPC) == 2)
{
SetPhenoType(44, oPC);
}
else
{
SetPhenoType(43, oPC);
}
SetCreatureTailType(9970, oPC);
object ooar = CreateItemOnObject ("oar", oPC);
DelayCommand(0.1, AssignCommand(oPC, ActionEquipItem(ooar, INVENTORY_SLOT_RIGHTHAND)));
}
Not sure if I need each include from each script?