Author Topic: Rawr!  (Read 11448 times)

Offline Mercy

  • Hero Member
  • *****
  • Posts: I am a geek!!
    • View Profile
    • Email
Rawr!
« on: May 25, 2009, 02:15:37 AM »


I was curious to know if anyone had a nice item filter they could send my way? Or maybe you could pass GS's on to me Mo? I am working on a 9ac mod atm because I want to play nwn! And you noobs need to play too!





Elessar: why is the shit coming from his head?
Anheg: cause its japanese?

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Re: Rawr!
« Reply #1 on: May 25, 2009, 12:20:23 PM »
This is the filter that 420 wrote for me a few years ago.  I think it covers all or most of the item restrictions that GS had.  Just include an ExecuteScript(sScript, oTarget); line in the module OnEnter before any module items are created on the target.

Code: [Select]
//420 Item Filter
//By: 420 6/25/04
//OnClientEnter should make the PC execute this script.
//This script should be named "420itemfilter"

void main()
{
object oPC = OBJECT_SELF;
object oItem;
int iCounter;
int iACProperty;
itemproperty ipItem;

//Check through all equiped items.
for (iCounter = 0; iCounter <= NUM_INVENTORY_SLOTS; iCounter++)
    {
    oItem = GetItemInSlot(iCounter, oPC);

    //Delete any items with the listed properties, you may add more item properties
    //to filter.
    if (GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_HEALERS_KIT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP))
      {
      DestroyObject(oItem);
      DelayCommand(0.001, SendMessageToPC(oPC, "*Item property violation.*"));
      }

    //Check to see what the value of the item is, if over 500,000 gp value,
    //destroy it (this value allows 9 AC/11 AB max per item)
    if(GetGoldPieceValue(oItem) >= 500001)
        {
        DestroyObject(oItem);
        DelayCommand(0.001, SendMessageToPC(oPC, "*Item value higher than 500,000 gp.*"));
        }
    }


//Now do the exact same thing for all the items in the players inventory (whatever
//wasn't equiped
oItem = GetFirstItemInInventory(oPC);

while(GetIsObjectValid(oItem) == TRUE)
    {

    //Delete any items with the listed properties, you may add more item properties
    //to filter.
    if (GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_HEALERS_KIT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS) ||
        GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP))
      {
      DestroyObject(oItem);
      DelayCommand(0.001, SendMessageToPC(oPC, "*Item property violation.*"));
      }

    //Check to see what the value of the item is, if over 500,000 gp value,
    //destroy it (this value allows 9 AC/11 AB max per item)
    if(GetGoldPieceValue(oItem) >= 500001)
        {
        DestroyObject(oItem);
        DelayCommand(0.001, SendMessageToPC(oPC, "*Item value higher than 500,000 gp.*"));
        }

    oItem = GetNextItemInInventory(oPC);
    }
}

Offline Mercy

  • Hero Member
  • *****
  • Posts: I am a geek!!
    • View Profile
    • Email
Re: Rawr!
« Reply #2 on: May 25, 2009, 03:30:58 PM »
Thanks. I will add it when I get back to my pc. :D
Elessar: why is the shit coming from his head?
Anheg: cause its japanese?

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Re: Rawr!
« Reply #3 on: May 25, 2009, 06:31:18 PM »
You could probably do a search and find at least half the scripts you need on this board somewhere or another. :P

Wtf is with the purple text anyway?

Do you think it makes you look cool or something?

Well it does. So cut it out.

Offline Mercy

  • Hero Member
  • *****
  • Posts: I am a geek!!
    • View Profile
    • Email
Re: Rawr!
« Reply #4 on: May 25, 2009, 07:43:38 PM »
:O Thanks Hell! (For telling me I'm cool.)

Also come on, at least this got someone to post right? :D
Elessar: why is the shit coming from his head?
Anheg: cause its japanese?

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Rawr!
« Reply #5 on: May 25, 2009, 08:11:57 PM »

Wtf is with the purple text anyway?
I would call that more of a lavender.

-420

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Re: Rawr!
« Reply #6 on: May 25, 2009, 10:58:15 PM »
I would call that more of a lavender.

-420
Yes, well, I am not surprised you are an expert on the color. Congratulations!

Offline Elessar Telrunya

  • Hero Member
  • *****
  • Posts: 2095
    • View Profile
Re: Rawr!
« Reply #7 on: May 26, 2009, 07:35:22 AM »
Yet another topic successfully veered off-course by our faithful moderator - we go from scripts to colors!

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Re: Rawr!
« Reply #8 on: May 26, 2009, 06:48:50 PM »
Actually my first post was on topic with some off-topic information included. Mercy and 420 completely went off-topic, and then I also went off-topic, and finally, you furthered it being off-topic so that it is now about it being off-topic. Originally, I was not the first to be off-topic. You really suck at this don't you?

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Rawr!
« Reply #9 on: May 27, 2009, 11:07:12 AM »
Mercy and 420 completely went off-topic, and then I also went off-topic, and finally, you furthered it being off-topic so that it is now about it being off-topic.
Doesn't that mean that Elessar was actually on-topic by being off-topic in a thread that is now about being off-topic?

-420

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Re: Rawr!
« Reply #10 on: May 27, 2009, 01:46:58 PM »
Doesn't that mean that Elessar was actually on-topic by being off-topic in a thread that is now about being off-topic?

-420
No. Because the off-topic topic of the thread is no longer the same topic as it was originally. Thread's don't change topics, people do. What it was about originally is what it is supposed to be about now. If it is no longer that and is something else, then that something else is off-topic. This is off-topic. You are off-topic. Nobody truly gives a shit.

This is a small forum and the regulars have been here for so long that it doesn't matter. With the level of activity, any posting is worthwhile. From time to time stuff needs to be cleaned up and organized, that's pretty much all I do. I don't feel the need to jump on everybody's asses about every little off-topic post they make, at least people are posting and keeping this board alive. It doesn't take much for one to die out. When things get off-topic or people argue, I could be closing topics, moving/deleting posts, and enforcing rules all the time, but really, that would be counter-productive. It would only serve to end discussions and silence what little posting there is. For the most part, I just be who I am. However, if say, GS were to come up (or GS 2) and the forums became really popular again and we started getting tons of new people, rules would be necessary again, and I wouldn't have the same attitude about post-quality. It's one thing when everyone knows each other and there's nothing new, than when you have a bunch of people who don't know each other and new ones coming every day.

If it makes you happy, which it won't...

Topic resolved. Closed.

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Re: Rawr!
« Reply #11 on: May 28, 2009, 01:57:57 PM »
No. Because the off-topic topic of the thread is no longer the same topic as it was originally. Thread's don't change topics, people do. What it was about originally is what it is supposed to be about now. If it is no longer that and is something else, then that something else is off-topic. This is off-topic. You are off-topic. Nobody truly gives a shit.

This is a small forum and the regulars have been here for so long that it doesn't matter. With the level of activity, any posting is worthwhile. From time to time stuff needs to be cleaned up and organized, that's pretty much all I do. I don't feel the need to jump on everybody's asses about every little off-topic post they make, at least people are posting and keeping this board alive. It doesn't take much for one to die out. When things get off-topic or people argue, I could be closing topics, moving/deleting posts, and enforcing rules all the time, but really, that would be counter-productive. It would only serve to end discussions and silence what little posting there is. For the most part, I just be who I am. However, if say, GS were to come up (or GS 2) and the forums became really popular again and we started getting tons of new people, rules would be necessary again, and I wouldn't have the same attitude about post-quality. It's one thing when everyone knows each other and there's nothing new, than when you have a bunch of people who don't know each other and new ones coming every day.

If it makes you happy, which it won't...

Topic resolved. Closed.

Wow great post.  Couldn't have said it better myself :P

Offline Soul Sojourner

  • Resident Awesome
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2748
  • Nothing is true; everything is permitted.
    • View Profile
    • Email
Re: Rawr!
« Reply #12 on: May 28, 2009, 08:55:49 PM »
Fuck you, shithead.

:D