Author Topic: Okay I'm having some problems...  (Read 7161 times)

Offline fireknight40

  • Sr. Member
  • ****
  • Posts: 277
    • MSN Messenger - fireknight40@hotmail.com
    • AOL Instant Messenger - fireknight40
    • Yahoo Instant Messenger - briortheforesaken
    • View Profile
    • http://members.dslextreme.com/users/fierynight3/Iceys%20Hints%20and%20Tips.htm
    • Email
Okay I'm having some problems...
« on: February 03, 2005, 06:07:03 PM »
Uhm yeah the filter that i'm using doesn't like me if someone could check it for me and help me that would be great thank you. :)
Code: [Select]
void main()
{
    object oPC = GetEnteringObject();
    string sEnteringPC = GetPCPlayerName(oPC);
{
    object oItem;
    int nCount;

    oItem = GetFirstItemInInventory(oPC);
    while ( GetIsObjectValid(oItem) == TRUE)
{

/*Items in inventory with the following properties will be destroyed
(to allow a property listed toggle the corresponding flag [i.e. TRUE to FALSE])*/
if ((GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL) == TRUE)
|| GetPlotFlag(oItem) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_HIT_PROPERTIES) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_DAMAGE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL)== TRUE )
|| GetItemCost(oItem, 500000)
    DestroyObject(oItem);
}
    oItem = GetNextItemInInventory(oPC);
}
    for ( nCount = 0; nCount < NUM_INVENTORY_SLOTS; nCount++ )
{
    oItem = GetItemInSlot(nCount,oPC);

/*Equipped items with the following properties will be destroyed
(to allow a property listed toggle the corresponding flag [i.e. TRUE to FALSE])*/
if ((GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL) == TRUE)
|| GetPlotFlag(oItem) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_HIT_PROPERTIES) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL)== TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_DAMAGE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) == TRUE )
{
    DestroyObject(oItem);
}
    if(GetPlotFlag(oPC) == TRUE)
{
    SetPlotFlag(oPC,FALSE);
}
}
}
}
Okay that's on my OnClientEnter by the way.
Also having a few problems with my thrones... here's the code i'm using now...
Code: [Select]
void main()
{
 object oPC = GetLastUsedBy();
 object oThrone = OBJECT_SELF;
// place the effect you want to apply to the throne in brackets
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
// this will prevent the effect from being dispelled
         eVis = SupernaturalEffect(eVis);

 if(GetIsObjectValid(oThrone)&&
   !GetIsObjectValid(GetSittingCreature(oThrone)) &&
    GetPCPlayerName(oPC)== "fireknight40")
     {
      AssignCommand(oPC, ActionSit(oThrone));
      ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, OBJECT_SELF);
     }
 else
  {
   string NoSit = "You are not allowed to sit on this throne! It belongs to
Brior!";
   FloatingTextStringOnCreature(NoSit, oPC);
  }
}

That's on the on used by the way. I want it so only that person can sit in it unfortunately i can't seem to get the public CD key fetcher to work so i'm trying t use the account name. Thanks again. :)

Lord of Doriath[/span]
[span style=\'color:blue\']Sentinel of GodSpire[/color]

Offline CleTus

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • http://
Okay I'm having some problems...
« Reply #1 on: February 03, 2005, 08:47:21 PM »
What happens on each of the scripts? Does the throne let you or anyone else sit? Does the filter not function at all?
GIT-R-DONE!

Light travels faster than sound. That is why some people appear bright until you hear them speak.

Offline fireknight40

  • Sr. Member
  • ****
  • Posts: 277
    • MSN Messenger - fireknight40@hotmail.com
    • AOL Instant Messenger - fireknight40
    • Yahoo Instant Messenger - briortheforesaken
    • View Profile
    • http://members.dslextreme.com/users/fierynight3/Iceys%20Hints%20and%20Tips.htm
    • Email
Okay I'm having some problems...
« Reply #2 on: February 03, 2005, 08:59:42 PM »
filter destroys things it shouldn't and the thrones won't let anyone sit

Lord of Doriath[/span]
[span style=\'color:blue\']Sentinel of GodSpire[/color]

Offline CleTus

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • http://
Okay I'm having some problems...
« Reply #3 on: February 03, 2005, 09:13:40 PM »
Right for the Throne script does it compile? I copied it into compiler and it sayed Undertimened string constant. if it says that for you just move the whole NoSit string so it's 1 line. Maybe for the throne try this. GetPCPublicCdKey.

Code: [Select]
void main()
{
object oPC = GetLastUsedBy();
object oThrone = OBJECT_SELF;
// place the effect you want to apply to the throne in brackets
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
// this will prevent the effect from being dispelled
        eVis = SupernaturalEffect(eVis);

if(GetPCPublicCDKey(oPC)== "Your Key Here")
  
    {
     AssignCommand(oPC, ActionSit(oThrone));
     ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, OBJECT_SELF);
    }
else
 {
  string NoSit = "You are not allowed to sit on this throne! It belongs to Brior!";
  FloatingTextStringOnCreature(NoSit, oPC);
 }
}

I took out the IF Valid parts. I don't think they're really needed as you are the only one allowed to click the throne so you're always valid. Right?

Anyways for the filter.. I have no idea.. Let me look again.
GIT-R-DONE!

Light travels faster than sound. That is why some people appear bright until you hear them speak.

Offline CleTus

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • http://
Okay I'm having some problems...
« Reply #4 on: February 03, 2005, 10:00:44 PM »
Quote
filter destroys things it shouldn't and the thrones won't let anyone sit
[snapback]17793[/snapback]

The filter will not compile because GetCost is not a valid function. It's GetGoldPieceValue. I'm pretty sure you edited that in to Toki's Filter, right? I'm not sure how to edit filters. I've never made one before. Maybe Mel could help?
GIT-R-DONE!

Light travels faster than sound. That is why some people appear bright until you hear them speak.

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Okay I'm having some problems...
« Reply #5 on: February 03, 2005, 10:11:15 PM »
Hmm.. for the throne, try this perhaps...

Code: [Select]
void main()
{
object oPC = GetLastUsedBy();
object oThrone = OBJECT_SELF;
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
eVis = SupernaturalEffect(eVis);

if(GetIsObjectValid(oThrone)&&
!GetIsObjectValid(GetSittingCreature(oThrone)) &&
GetPCPublicCDKey(oPC)== "Your CD key")
{
AssignCommand(oPC, ActionSit(oThrone));
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, OBJECT_SELF);
}
else
{
string NoSit = "You are not allowed to sit on this throne! It belongs to Brior!";
FloatingTextStringOnCreature(NoSit, oPC);
}
}
« Last Edit: February 03, 2005, 10:15:58 PM by HeLLMasteRHeLL »

Offline fireknight40

  • Sr. Member
  • ****
  • Posts: 277
    • MSN Messenger - fireknight40@hotmail.com
    • AOL Instant Messenger - fireknight40
    • Yahoo Instant Messenger - briortheforesaken
    • View Profile
    • http://members.dslextreme.com/users/fierynight3/Iceys%20Hints%20and%20Tips.htm
    • Email
Okay I'm having some problems...
« Reply #6 on: February 03, 2005, 10:45:03 PM »
Public CD key doesn't like me... can that be done via account name?

Lord of Doriath[/span]
[span style=\'color:blue\']Sentinel of GodSpire[/color]

Offline CleTus

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • http://
Okay I'm having some problems...
« Reply #7 on: February 03, 2005, 10:55:02 PM »
Hell, your's looks the same as the other one. Did you just take out the /// comments and put the lines to the edge? Anyways yeah brior, you can use acc name. just replace the get cd key to GetPlayerName like you had.
I'm going to test this now and see if it works.

EDIT Yeah it works now. Though the green effect does not go away. You want it like that?
« Last Edit: February 03, 2005, 10:59:31 PM by CleTus »
GIT-R-DONE!

Light travels faster than sound. That is why some people appear bright until you hear them speak.

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Okay I'm having some problems...
« Reply #8 on: February 03, 2005, 10:59:37 PM »
No, it's not the same, basically the only difference is this:

if(GetIsObjectValid(oThrone)&&
!GetIsObjectValid(GetSittingCreature(oThrone)) &&
GetPCPublicCDKey(oPC)== "Your CD key")

I tested the script I posted, an' it works just fine, so you should'nt have a problem.

Offline Daniel1975

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • http://
    • Email
Okay I'm having some problems...
« Reply #9 on: February 04, 2005, 07:10:13 PM »
LOL that's funny!

He's posting scripts here which he got from me ;) (like many others)  :D
I already explained him how to use them  :P

G[/span][span style=\'color:orange\']w[/span][span style=\'color:yellow\']y[/span][span style=\'color:green\']d[/span][span style=\'color:blue\']i[/span][span style=\'color:purple\']on[/span] - Slann [span style=\'color:red\']Lord[/span] of the [span style=\'color:green\']Antediluvians