Author Topic: legit pvp server script  (Read 18474 times)

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« on: November 19, 2004, 04:56:20 PM »
I started a server for my clan on godspire.
Now I've been working with it for a week or so I really start liking it and I whould like to improve my server.

Could somwone post a script here or make a link or someting so I can put the same rules on my server as on godspire?

Since my clan is on godspire having the same rules would be usefull so I can train with my clan on my server.

So the program has to check evryting somwone could use to cheat ...
I hope somwone here knows the rules of godspire and can make me a script that has exactly the same rules. Mayby talon could just copy his script?

I ask this cuz I can't do any scripting myself.
I looked on the nwvault but its too hard to adjust those scripts and they do too much or too few...

Ps: I also need the duell manager script :P. I can't download the one 420 posted...
« Last Edit: November 19, 2004, 04:58:25 PM by Pazuul »
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #1 on: November 19, 2004, 05:22:54 PM »
Eh, .... well, this kind of post get me depressed:
Quote
Could somwone post a script here or make a link or someting so I can put the same rules on my server as on godspire?
A script.. It won't fit in 1 script..
Quote
I hope somwone here knows the rules of godspire and can make me a script that has exactly the same rules. Mayby talon could just copy his script?
Copy and give away his filter, he, I believe hamster can fly too  :glare:
Quote
I ask this cuz I can't do any scripting myself.
Don't start whit maintaining a server whit heavy scripts then ...
Time to learn scripting I guess.
Quote
I looked on the nwvault but its too hard to adjust those scripts and they do too much or too few...
Will take like 1000 or more lines of scripting to get gs like rules/gameplay whitout bugs.
Quote
I also need the duell manager script :P. I can't download the one 420 posted...
Well, I have that somewhere.
Code: [Select]
 Here is the main script, your duel managers item tag should be the name of
  this script:
  *NOTE* You must change the "AreaTag1" and AreaTag2" to the tags of the
  areas where duels are allowed (you can add or remove areas if you wish)
 
  QUOTE
  //Duel Handling System
  //By: 420 6/25/04
  //This script should have the same name as the tag of the item that is
  used to
  //request a duel from another player. This script needs the script
  "endduel" and alterations
  //to the OnDeath, OnClientEnter and OnClientLeave scripts. As well as any
  area
  //OnExit scripts to which the duels are restricted.
 
  void main()
  {
  //Declare all (or most) of the variables
  effect eWait = SupernaturalEffect(EffectCutsceneParalyze());
  effect eInDuel =
  SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_GREEN));
  effect eUnsummon =  EffectVisualEffect(VFX_IMP_UNSUMMON);
  effect eParalyzed =
  SupernaturalEffect(EffectVisualEffect(VFX_DUR_PARALYZED));
 
  object oSelf = GetItemActivator();
  string sSelf = GetPCPlayerName(oSelf);
  string sSelfName = GetName(oSelf);
 
  object oTarget = GetItemActivatedTarget();
  string sTarget = GetPCPlayerName(oTarget);
  string sTargetName = GetName(oTarget);
 
  string sArea = GetTag(GetArea(oSelf));
 
  string sActiveDuel = GetLocalString(oSelf, "ActiveDuel");
  string sActiveDuelT = GetLocalString(oTarget, "ActiveDuel");
 
  object oAssociate;
 
  //When the item is activated it will have one of the following effects:
  //
  //If the activator is in a confirmed duel, set the "DuelAborted" variable
  on the
  //activator then kill the activator.
  if(sActiveDuel != "")
     {
     SetLocalInt(oSelf, "DuelAborted", 1);
     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE), oSelf);
     }
  //If the activator is not in the right area the item doesn't work and the
  activator is
  //told the reason.
  else if(sArea != "AreaTag1" ||
         sArea != "AreaTag2" )
     {
     FloatingTextStringOnCreature("This item cannot be used in this area.",
  oSelf);
     }
  //If the target is not a PC or if the activator targets itself the item
  doesn't
  //work and the activator is told the reason.
  else if(GetIsPC(oTarget) == FALSE ||
         (oSelf == oTarget))
     {
     FloatingTextStringOnCreature("Invalid target.", oSelf);
     }
  //If the target of the item is in a duel the item does nothing and the
  activator is
  //told the reason.
  else if(sActiveDuelT != "")
     {
     FloatingTextStringOnCreature("Target is currently in a duel.", oSelf);
     }
  //If the activator targets someone who hasn't requested a duel then
  request a duel.
  else if(GetLocalInt(oTarget, sSelf) == 0)
     {
     FloatingTextStringOnCreature("You have requested a duel with
  "+sTargetName+".", oSelf);
     FloatingTextStringOnCreature(sSelfName+" has requested a duel with
  you.", oTarget);
     SetLocalInt(oSelf, sTarget, 1);
     DelayCommand(60.0, DeleteLocalInt(oSelf, sTarget));
     }
  //If the script gets this far then the activator has targeted a PC that
  requested
  //a duel no more than 1 minute ago. Start a duel with that PC.
  else
     {
     //Remove the Duel Request local variable from the requester
     DeleteLocalInt(oTarget, sSelf);
 
     //Set an active duel local variable on both players with their
  opponents account
     //name.
     SetLocalString(oSelf, "ActiveDuel", sTarget);
     SetLocalString(oTarget, "ActiveDuel", sSelf);
 
     //Remove them from any party
     RemoveFromParty(oTarget);
     RemoveFromParty(oSelf);
 
     //Make them both rest instantly to remove spell effects/memorize spells
  and ready
     //feats.
     ForceRest(oTarget);
     ForceRest(oSelf);
 
     //Destroy any summoned familiars/animal companions
     //*note* This will only work if the PCs only have a max of 2 familiars
  and
     //2 animal companions.
     oAssociate = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oTarget, 1);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oTarget, 1);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oTarget, 2);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oTarget, 2);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oSelf, 1);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oSelf, 1);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oSelf, 2);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     oAssociate = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oSelf, 2);
     ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eUnsummon,
  GetLocation(oAssociate));
     DestroyObject(oAssociate);
 
     //Set the PCs hostile to each other
     SetPCDislike(oTarget, oSelf);
 
     //Paralyze them for 1 round (6 seconds) slap a "Active Duel" graphic on
  them
     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eWait, oTarget, 6.0);
     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eWait, oSelf, 6.0);
 
     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyzed, oTarget, 6.0);
     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyzed, oSelf, 6.0);
 
     ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInDuel, oTarget);
     ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInDuel, oSelf);
 
     //Count down message for both players.
     DelayCommand(2.0, FloatingTextStringOnCreature("Ready.", oTarget));
     DelayCommand(2.0, FloatingTextStringOnCreature("Ready.", oSelf));
     DelayCommand(4.0, FloatingTextStringOnCreature("Set.", oTarget));
     DelayCommand(4.0, FloatingTextStringOnCreature("Set.", oSelf));
     DelayCommand(6.0, FloatingTextStringOnCreature("Go!", oTarget));
     DelayCommand(6.0, FloatingTextStringOnCreature("Go!", oSelf));
     }
  }
 
 
 
  This script must be called "endduel":
 
  QUOTE
  //Duel Handling System
  //By: 420 6/25/04
  //*NOTE*: This script must be called "endduel"
  //This script handles ending the duel and resetting the PCs to their state
  before
  //the duel, it removes the "Active Duel" local variable and visual effect
 
  void main()
  {
  DeleteLocalString(OBJECT_SELF, "ActiveDuel");
 
  effect eEffect = GetFirstEffect(OBJECT_SELF);
  while(GetIsEffectValid(eEffect) == TRUE)
     {
     if(GetEffectType(eEffect) == EFFECT_TYPE_VISUALEFFECT &&
       GetEffectSubType(eEffect) == SUBTYPE_SUPERNATURAL)
         {
         RemoveEffect(OBJECT_SELF, eEffect);
         }
     eEffect = GetNextEffect(OBJECT_SELF);
     }
  }
 
 
 
  Place this script in the Modules OnClientLeave event trigger:
 
  QUOTE
  //Duel Handling System
  //By: 420 6/25/04
  //This script should be added to the OnClientLeave Module Properties event
  trigger.
  //If the person leaving the server was in a duel this will find their
  opponent and
  //inform then that the PC left and the duel was aborted. Then it will run
  the
  //"endduel" script.
 
  void main()
  {
  object oTarget = GetExitingObject();
  string sTarget = GetLocalString(oTarget, "Account");
 
  string sActiveDuel = GetLocalString(oTarget, "ActiveDuel");
  object oOpponent;
 
  if(sActiveDuel != "")
     {
     oOpponent = GetFirstPC();
     while(oOpponent != OBJECT_INVALID)
         {
         if(GetLocalString(oOpponent, "ActiveDuel") == sTarget)
             {
             FloatingTextStringOnCreature("Your opponent left.", oOpponent);
             DelayCommand(1.0, FloatingTextStringOnCreature("You won the
  duel.", oOpponent));
             SetPCLike(oTarget, oOpponent);
             ForceRest(oOpponent);
             ExecuteScript("endduel", oOpponent);
             }
         oOpponent = GetNextPC();
         }
     }
  }
 
 
 
  This script should be placed in the OnExit event trigger of all areas
  where duels are allowed:
 
  QUOTE
  //Duel Handling System
  //By: 420 6/25/04
  //This script should be put in the OnExit event triggers of any areas that
  allow
  //duels. If someone leaves the area (but not the server) then set the
  "DuelAborted"
  //local variable and kill the PC.
 
 
  void main()
  {
  object oTarget = GetExitingObject();
  string sActiveDuel = GetLocalString(oTarget, "ActiveDuel");
 
  if(sActiveDuel != "" &&
   GetPCPlayerName(oTarget) != "")
     {
     SetLocalInt(oTarget, "DuelAborted", 1);
     ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(TRUE), oTarget);
     }
  }
 
 
 
  This file replaces Bioware's crappy default OnDeath module event trigger:
  *NOTE* You must change the "AreaTag1" and "AreaTag2" to the same tags as
  the ones in the main Duel Manager script. (ie the 2 areas where duels are
  allowed.)
 
  QUOTE
  //Created by 420 because he is fed up with Bioware's crappy scripting.
  //This should replace the Module Properties OnDeath event trigger.
  //6/27/04
 
  void Raise(object oPlayer)
  {
 
         effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);
 
         effect eBad = GetFirstEffect(oPlayer);
  
  ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer);
  
  ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)),
  oPlayer);
 
         //Search for negative effects
         while(GetIsEffectValid(eBad))
         {
             if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
                 GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
                 GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
                 GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
                 GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE
  ||
                 GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
                 GetEffectType(eBad) ==
  EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
                 GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
                 GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                 GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
                 GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
                 GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
                 {
                     //Remove effect if it is negative.
                     RemoveEffect(oPlayer, eBad);
                 }
             eBad = GetNextEffect(oPlayer);
         }
         //Fire cast spell at event for the specified target
         SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF,
  SPELL_RESTORATION, FALSE));
         ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer);
  }
 
  void main()
  {
 
  object oPlayer = GetLastPlayerDied();
  string sArea = GetTag(GetArea(oPlayer));
 
  string sSelf = GetPCPlayerName(oPlayer);
  string sActiveDuel = GetLocalString(oPlayer, "ActiveDuel");
  int iAborted = GetLocalInt(oPlayer, "DuelAborted");
  object oOpponent;
 
  // * increment global tracking number of times that I died
  SetLocalInt(oPlayer, "NW_L_PLAYER_DIED", GetLocalInt(oPlayer,
  "NW_L_PLAYER_DIED") + 1);
 
  // * make friendly to Each of the 3 common factions
  AssignCommand(oPlayer, ClearAllActions());
     // * Note: waiting for Sophia to make SetStandardFactionReptuation to
  clear all personal reputation
  if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <=
  10)
     {
     SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
     SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer);
     }
  if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <=
  10)
     {
     SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
     SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer);
     }
  if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <=
  10)
     {
     SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
     SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer);
     }
 
  //If the dead PC was in a duel inform them that they lost and inform their
  opponent
  //of the win. If the dead PC aborted the duel inform them both of that.
  if (sActiveDuel != "")
     {
 
     oOpponent = GetFirstPC();
     while(oOpponent != OBJECT_INVALID)
         {
         if(GetLocalString(oOpponent, "ActiveDuel") == sSelf)
             {
             if(iAborted == 1)
                 {
                 FloatingTextStringOnCreature("You aborted the duel.",
  oPlayer);
                 FloatingTextStringOnCreature("Your opponent aborted the
  duel.", oOpponent);
                 DeleteLocalInt(oPlayer, "DuelAborted");
                 }
             DelayCommand(1.0, FloatingTextStringOnCreature("You won the
  duel.", oOpponent));
             SetPCLike(oPlayer, oOpponent);
             ForceRest(oOpponent);
             ExecuteScript("endduel", oOpponent);
             }
         oOpponent = GetNextPC();
         }
 
     DelayCommand(1.0, FloatingTextStringOnCreature("You lost the duel.",
  oPlayer));
     DelayCommand(6.1, ForceRest(oPlayer));
     ExecuteScript("endduel", oPlayer);
     }
 
  //Put the tags of the areas where duels are allowed.
  if (sArea == "AreaTag1" ||
     sArea == "AreaTag2")
     {
     DelayCommand(6.0, Raise(oPlayer));
     return;
     }
 
  DelayCommand(2.5, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH));
  }
 
 
 
  I had to add a couple lines to the modules OnClientEnter script, here is
  an example:
 
  QUOTE
  //Check "Official" status, give item to Officials
  //by: 420 6/25/04
  //Put in the OnClientEnter event trigger of the Module Properties
 
  void main()
  {
  object oTarget = GetEnteringObject();
  string sCDKey = GetPCPublicCDKey(oTarget);
  int iOfficial = GetCampaignInt("Official", sCDKey, oTarget);
 
  if(iOfficial == 1)
     {
     DelayCommand(1.0, CreateItemOnObject("itemsblueprintresref", oTarget));
     }
 
  ExecuteScript("420itemfilter", oTarget);
 
  //420 6/28/04 Set the account name as a local variable so it can be
  retrieved by
  //OnClientLeave
  SetLocalString(oTarget, "Account", GetPCPlayerName(oTarget));
 
  //420 6/29/04 If entering PC left during a duel, run the "endduel" script
  if (GetLocalString(oTarget, "ActiveDuel") != "")
     {
     ExecuteScript("endduel", oTarget);
     }
  }
 

Offline Blood Angel

  • Hero Member
  • *****
  • Posts: 1514
    • MSN Messenger - Blood Angel
    • View Profile
    • http://
    • Email
legit pvp server script
« Reply #2 on: November 19, 2004, 05:37:20 PM »
lol, how many pages of that can we expect if all is uploaded? just an approximate number ;)
"Some birds aren't meant to be caged,
their feathers are just too bright.
And when they fly away,
the part of you that knows it was a sin to lock them up does rejoyce.
But still,
the place you live in is that more drab an empty that they're gone.
I guess I just miss my friend."
-The Shawshank Redemption

LucidMagic
High Elf of Doriath
Alliance of Magi
Chill Touch of The Cold Alliance

Blood Angel, �§oulkeeper, Dawn The Lionheart and Shadowblade.

Offline gashmo

  • Sr. Member
  • ****
  • Posts: 268
    • View Profile
legit pvp server script
« Reply #3 on: November 19, 2004, 05:54:33 PM »
it's easy to get a script which works almost like gs

just go to nwvault and do a search for "mooscript" or "butcha" - they have posted 2 legit pvp scripts which will do most of what gs does. gs does a lot of very fine tweak checking - but its not really needed cos heck, a bit of tweaking is fun anyway.

if u want to make it mor elike gs, make sur eto go through the script and enbale all sections removing "resist" etc..


Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #4 on: November 19, 2004, 06:05:38 PM »
Quote
it's easy to get a script which works almost like gs
[snapback]10567[/snapback]
Can't agree whit that. Or we have completly different opinions about 'almost like'.
To have the same pvp as on gs you need quite a load of scripts. Just a basic filter won't do the job.

Anyway, it's a nice idea to check those script, they aren't bad and you have to start somewhere.

-Mel

Offline gashmo

  • Sr. Member
  • ****
  • Posts: 268
    • View Profile
legit pvp server script
« Reply #5 on: November 19, 2004, 06:22:44 PM »
ermm well "almost" like gs
as Mel said, gs scripts are really sophisticated
the one's i suggested, do the job pretty well but the "professionals" like Mel etc are entitled to disagree!!

(hugs Mel)

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #6 on: November 19, 2004, 06:31:11 PM »
Quote
ermm well "almost" like gs
as Mel said, gs scripts are really sophisticated
the one's i suggested, do the job pretty well but the "professionals" like Mel etc are entitled to disagree!!

(hugs Mel)
[snapback]10570[/snapback]
"pro-what", I'm just an amateur that knows a bit of computers.
For running a nice server you don't need much anyway. A basic filter, bit config on 2da's and the origenal game's Chapter1 was good for an average load of 10 players during the week. And a load of fun.

-Mel
« Last Edit: November 19, 2004, 06:31:37 PM by Tea-cup »

Offline |- Shion -|

  • Full Member
  • ***
  • Posts: 213
    • MSN Messenger - kai.beyblade@zipmail.com.br
    • AOL Instant Messenger - Not Have
    • Yahoo Instant Messenger - Not have
    • View Profile
    • http://Not Have
    • Email
legit pvp server script
« Reply #7 on: November 19, 2004, 08:19:00 PM »
Quote
it's easy to get a script which works almost like gs

just go to nwvault and do a search for "mooscript" or "butcha" - they have posted 2 legit pvp scripts which will do most of what gs does. gs does a lot of very fine tweak checking - but its not really needed cos heck, a bit of tweaking is fun anyway.

if u want to make it mor elike gs, make sur eto go through the script and enbale all sections removing "resist" etc..
[snapback]10567[/snapback]

Sorry but i need to say that , nwvault scripts indeed not is that good cuz exactly all , really "ALL" of them is bugged , them can be compiled and works pretty nice but always when get on the game gets bugged , the prob is mostly cuz than the ppl than make that scripts forgot things like "Constant" and "Object" on their script which one makes them bugged , like tea-cup told , ya need to make more things like constants variables objects ,etc.... to make the script perfectly conected to each function inside on the script , sometimes ya need to make 1 file of script connected to another file using #include "  " command . But seeing this at on good side , that scripts on nwvault is good to learn about how they make those scripts,etc... and yes tea-cup i agree 100% on what ya told before . I hope than ya understad that gashnmo. have fun!!!!

Anytime dudes!!!

"Why to be a Kage ...... is our dream"
"The Failure is a new opornutity to start again better unit ya reach the Perfection."
"The Failed one will go to surpass the Genius with hard work"
--------------------------------------------------------------------------------------------
|- Shion -| Lord of Doriath -=Master of the Order of Iluvatar=-

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #8 on: November 20, 2004, 05:02:50 AM »
hmm the duell manager script is not working...
I can't script so I can't adjust it either :(

and the sripts on nwvault one of them doesn't starts the scan and the other one doesn't boot the player if he failed...
Pazuul - Leader of Minions

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #9 on: November 20, 2004, 05:45:09 AM »
another script i could use is a good thing of the ondeath thingie that just lets the player respawn after 5 seconds or someting.

again the script above did not work for this i keep gettin errors while using it or i just dont know wich part of it i should use.

but I think it will show things like you lost the duell and such and I don't want that to show up i just want to player to die and respawn...
Pazuul - Leader of Minions

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #10 on: November 20, 2004, 12:56:01 PM »
//onenter item and charcheck
void main()
{
//making it onenter script
object oPC = GetEnteringObject();
/* Get's the first item in players inventory */
object oItem = GetFirstItemInInventory(oPC);
/* Players armor class */
int iAC = GetAC(oPC);
 /* Players hit points */
int iHP = GetCurrentHitPoints(oPC);
/* Players ability scores */
int iStr = GetAbilityScore(oPC, ABILITY_STRENGTH);
int iDex = GetAbilityScore(oPC, ABILITY_DEXTERITY);
int iWis = GetAbilityScore(oPC, ABILITY_WISDOM);
int iInt = GetAbilityScore(oPC, ABILITY_INTELLIGENCE);
int iCon = GetAbilityScore(oPC, ABILITY_CONSTITUTION);
int iCha = GetAbilityScore(oPC, ABILITY_CHARISMA);
/* Players saving throws */
int iFort = GetFortitudeSavingThrow(oPC);
int iRefl = GetReflexSavingThrow(oPC);
int iWill = GetWillSavingThrow(oPC);
/* Players skills */
int iSkill_1 = GetSkillRank(SKILL_ANIMAL_EMPATHY, oPC);
int iSkill_2 = GetSkillRank(SKILL_APPRAISE, oPC);
int iSkill_3 = GetSkillRank(SKILL_BLUFF, oPC);
int iSkill_4 = GetSkillRank(SKILL_CONCENTRATION, oPC);
int iSkill_5 = GetSkillRank(SKILL_CRAFT_ARMOR, oPC);
int iSkill_6 = GetSkillRank(SKILL_CRAFT_TRAP, oPC);
int iSkill_7 = GetSkillRank(SKILL_CRAFT_WEAPON, oPC);
int iSkill_8 = GetSkillRank(SKILL_DISABLE_TRAP, oPC);
int iSkill_9 = GetSkillRank(SKILL_DISCIPLINE, oPC);
int iSkill_10 = GetSkillRank(SKILL_HEAL, oPC);
int iSkill_11 = GetSkillRank(SKILL_HIDE, oPC);
int iSkill_12 = GetSkillRank(SKILL_INTIMIDATE, oPC);
int iSkill_13 = GetSkillRank(SKILL_LISTEN, oPC);
int iSkill_14 = GetSkillRank(SKILL_LORE, oPC);
int iSkill_15 = GetSkillRank(SKILL_MOVE_SILENTLY, oPC);
int iSkill_16 = GetSkillRank(SKILL_OPEN_LOCK, oPC);
int iSkill_17 = GetSkillRank(SKILL_PARRY, oPC);
int iSkill_18 = GetSkillRank(SKILL_PERFORM, oPC);
int iSkill_19 = GetSkillRank(SKILL_PERSUADE, oPC);
int iSkill_20 = GetSkillRank(SKILL_PICK_POCKET, oPC);
int iSkill_21 = GetSkillRank(SKILL_SEARCH, oPC);
int iSkill_22 = GetSkillRank(SKILL_SET_TRAP, oPC);
int iSkill_23 = GetSkillRank(SKILL_SPELLCRAFT, oPC);
int iSkill_24 = GetSkillRank(SKILL_SPOT, oPC);
int iSkill_25 = GetSkillRank(SKILL_TAUNT, oPC);
int iSkill_26 = GetSkillRank(SKILL_TUMBLE, oPC);
int iSkill_27 = GetSkillRank(SKILL_USE_MAGIC_DEVICE, oPC);
/* Players and items flag states */
int iPCPlot = GetPlotFlag(oPC);
int iPCImmortal = GetImmortal(oPC);
int iStolenItems = GetStolenFlag(oItem);
int iPlotItems = GetPlotFlag(oItem);
/* Get's how many times an item is stacked in players inventory */
int iItemsNumStacked = GetNumStackedItems(oItem);
/* Check for unwanted properties on items when a player enters the area */
int iItemPropertyType_1 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_BONUS_FEAT);
int iItemPropertyType_2 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION);
int iItemPropertyType_3 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY);
int iItemPropertyType_4 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DARKVISION);
int iItemPropertyType_5 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE);
int iItemPropertyType_6 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS);
int iItemPropertyType_7 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL);
int iItemPropertyType_8 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL);
int iItemPropertyType_9 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL);
int iItemPropertyType_10 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION);
int iItemPropertyType_11 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_KEEN);
int iItemPropertyType_12 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_MIND_BLANK);
int iItemPropertyType_13 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE);
int iItemPropertyType_14 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_NO_DAMAGE);
int iItemPropertyType_15 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION);
int iItemPropertyType_16 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC);
int iItemPropertyType_17 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPECIAL_WALK);
int iItemPropertyType_18 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP);
int iItemPropertyType_19 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_TURN_RESISTANCE);
int iItemPropertyType_20 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_21 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE);
int iItemPropertyType_22 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP);
int iItemPropertyType_23 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT);
int iItemPropertyType_24 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE);
int iItemPropertyType_25 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ARCANE_SPELL_FAILURE);
int iItemPropertyType_26 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE);
int iItemPropertyType_27 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC);
int iItemPropertyType_28 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS);
int iItemPropertyType_29 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC);
int iItemPropertyType_30 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER);
//int iItemPropertyType_31 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_HIT_CAST_SPELL);
int iItemPropertyType_32 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPELL_RESISTANCE);
int iItemPropertyType_33 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_34 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP);
int iItemPropertyType_35 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT);
int iItemPropertyType_36 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_37 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP);
int iItemPropertyType_38 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT);
int iItemPropertyType_39 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_40 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP);
//int iItemPropertyType_41 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNMENT);
//int iItemPropertyType_42 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_NO_COMBAT_DAMAGE);
/* If it's a PC this script will fire, if it's a DM it ignores */
if(GetIsPC(oPC) == TRUE && GetIsDM(oPC) == FALSE ){
/* Determain the variables */
if(iAC > 140 || iHP > 1100 || iStr > 70 ||
iDex > 70 || iWis > 70 || iInt > 70 ||
iCon > 70 || iCha > 70 || iFort > 70 ||
//iWill > 70 || IRefl > 70 || iSkill_1 > 120 ||
iSkill_2 > 120 || iSkill_3 > 120 || iSkill_4  > 120 ||
iSkill_5 > 120 || iSkill_6 > 120 || iSkill_7 > 120 ||
iSkill_8  > 120 || iSkill_9 > 120 || iSkill_10 > 120 ||
iSkill_11 > 120 || iSkill_12 > 120 || iSkill_13 > 120 ||
iSkill_14 > 120 || iSkill_15 > 120 || iSkill_16 > 120 ||
iSkill_17 > 120 || iSkill_18 > 120 || iSkill_19 > 120 ||
iSkill_20 > 120 || iSkill_21 > 120 || iSkill_22 > 120 ||
iSkill_23 > 120 || iSkill_24 > 120 || iSkill_25 > 120 ||
iSkill_26 > 120 || iSkill_27 > 120 ||
iItemPropertyType_1 == 1 || iItemPropertyType_2 == 1 || iItemPropertyType_3 == 1 ||
iItemPropertyType_4 == 1 || iItemPropertyType_5 == 1 || iItemPropertyType_6 == 1 ||
iItemPropertyType_7 == 1 || iItemPropertyType_8 == 1 || iItemPropertyType_9 == 1 ||
iItemPropertyType_10 == 1 || iItemPropertyType_11 == 1 || iItemPropertyType_12 == 1 ||
iItemPropertyType_13 == 1 || iItemPropertyType_14 == 1 || iItemPropertyType_15 == 1 ||
iItemPropertyType_16 == 1 || iItemPropertyType_17 == 1 || iItemPropertyType_18 == 1 ||
iItemPropertyType_19 == 1 || iItemPropertyType_20 == 1 || iItemPropertyType_21 == 1 ||
iItemPropertyType_22 == 1 || iItemPropertyType_23 == 1 || iItemPropertyType_24 == 1 ||
iItemPropertyType_25 == 1 || iItemPropertyType_26 == 1 || iItemPropertyType_27 == 1 ||
iItemPropertyType_28 == 1 || iItemPropertyType_29 == 1 || iItemPropertyType_30 == 1 ||
//iItemPropertyType_31 == 1 || iItemPropertyType_32 == 1 || iItemPropertyType_33 == 1 ||
iItemPropertyType_34 == 1 || iItemPropertyType_35 == 1 || iItemPropertyType_36 == 1 ||
iItemPropertyType_37 == 1 || iItemPropertyType_38 == 1 || iItemPropertyType_39 == 1)// ||
//iItemPropertyType_40 == 1 || iItemPropertyType_41 == 1 || iItemPropertyType_42 == 1 )
{
/* Get's the next item in players inventory */
oItem = GetNextItemInInventory(oPC);
/* This part of script will only fire if above settings matches */
SendMessageToPC(oPC, "Scanning your character and items please wait.");
DelayCommand(15.0, SendMessageToPC(oPC, "You do not meet the requirements!"));
DelayCommand(20.0, SendMessageToPC(oPC, "Prepare to get booted in 5 seconds!"));
DelayCommand(25.0, BootPC(oPC)); }
}
    }

Thats the scripts I made to check char and items.
There are just a few problems...

I putted some lines as comment cuz it gives an error if they are in the script.
If I run the script on my server nothing happens... (big problem :P)

so if somwone can fix those things for me ...
thx for helping guys
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #11 on: November 20, 2004, 04:03:54 PM »
For the check of the items you need a while loop. And the equiped items need to be checked. You also can go for a full unequip and requip ofther the scan.
Code: [Select]
object oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem))
{
         Filter(oItem);
         oItem = GetNextItemInInventory(oPC);
}
oItem = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);
Filter(oItem);
oItem = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC);
Filter(oItem);
oItem = GetItemInSlot(INVENTORY_SLOT_BELT,oPC);
Filter(oItem);
oItem = GetItemInSlot(INVENTORY_SLOT_(.....the rest....),oPC);
Filter(oItem);
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC);
Filter(oItem);
For the rest I would look out for syntax errors like:
Code: [Select]
iItemPropertyType_37 == 1 || iItemPropertyType_38 == 1 || iItemPropertyType_39 == 1)// ||
//iItemPropertyType_40 == 1 || iItemPropertyType_41 == 1 || iItemPropertyType_42 == 1 )
The first ' ) ' close the if(), the second one is too much at it. So you have to take out that first ' ) ' .

I would split the whole script in smaller parts. Bit like a filter_itemproperty() , filter_stats() , filter_skills()  That way you better can overlook evrything and get the errors out of it. It's also usefull if a other script only needs the filter_itemproperty() part for example, then a #include "nameofthescript" gives you acces to the fitler_itemproperty() in other scripts. For a onequip event for example. The way the script is written now is just 'ugly'. And btw, it's possible to have more than 1100hp more than 120 skillranks and 56 is the max in a stat as str as far I know, 70 leaves much space. Also, indentify items before checking, otherwise the filter won't do it's work.

-Mel

Offline Illutian

  • Who knows what evil lurks in the hearts of Man...
  • Hero Member
  • *****
  • Posts: 891
  • The Legend Begins...
    • View Profile
    • Illutian
    • Email
legit pvp server script
« Reply #12 on: November 20, 2004, 06:40:11 PM »
or....you could just use my method of checking*points to DM Client* =P ....could we maybe post some of these scripts in a thread(just for scripts that could be handy to have)  :(
Our greatest glory is not in never falling but in rising everytime we fall.

Offline gashmo

  • Sr. Member
  • ****
  • Posts: 268
    • View Profile
legit pvp server script
« Reply #13 on: November 21, 2004, 06:11:38 AM »
really no need to post the scripts

they r already all done on nwvault
just search for mooscript or butcha's legit pvp script
and they will have it

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #14 on: November 21, 2004, 07:13:10 AM »
ffs do you peaple read wat i posted before you reply???????????

btw the improvements you posted got errors in them and still doesn't explain wy the script doesn't starts scanning....
Pazuul - Leader of Minions

Offline gashmo

  • Sr. Member
  • ****
  • Posts: 268
    • View Profile
legit pvp server script
« Reply #15 on: November 21, 2004, 09:24:15 AM »
hrm u wrote at the end of ur request that u looke don nwvault and couldnt work them out..

ok.. there are 2 things about scripting which are good to  know :-
1) You r goign to have to learn some scripting urself or else when the bugs happen u wont know they are bugs. And bugs do happen. its natural!
2) The script language is in english. So if u can understand english u shud understand most of the nwvault scripts a bit.

ok - u wont get a perfect match to gs because 1) gs are private scripts and 2) talon tweaks his scripts quite often i think, so getting an exact and current copy isnt very likely.

As long as ur script takes out :-
immunes, regen, resists, reduction, on hit cast spells, feats on items, racials and alingment properties u shud be fine to match gs scripts. the rest of the shady hacks - ok just tell ur clan not to use leto for item properties and thatis sufficient. dont go exploring that bit with leto cos gs will stop it.


Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #16 on: November 21, 2004, 09:48:03 AM »
Quote
ffs do you peaple read wat i posted before you reply???????????

btw the improvements you posted got errors in them and still doesn't explain wy the script doesn't starts scanning....
[snapback]10778[/snapback]
Lol, you can't copy paste the code I wrote in a mod. It are suggestions how to fix things. the line
Code: [Select]
oItem = GetItemInSlot(INVENTORY_SLOT_(.....the rest....),oPC);will never run, I know that too. But I just say you should fill in all the other slots. Like 1*2*3*....*8=8! And it doesn't scans because it has errors in it and also doesn't scans the items but just the first item in the inventory. because it miss a while loop.

-Mel

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #17 on: November 23, 2004, 03:51:28 PM »
lolz I didn't just copy it, i changed those things, but the scan doesn't even starts thats the problem btw there already is a loop in it at the end...
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #18 on: November 23, 2004, 04:07:57 PM »
Quote
lolz I didn't just copy it, i changed those things, but the scan doesn't even starts thats the problem btw there already is a loop in it at the end...
[snapback]11069[/snapback]
I only see IF statements in your script. Where's that loop?
When placed in the onenter event it should boot off chars that don't meet the rules in it afther 25 seconds. But it won't check all items because it miss the loop. oItem = GetNextItemInInventory(oPC); does takes the next item but doesn't runs the script again.

-Mel


Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #19 on: November 24, 2004, 08:48:24 AM »
good to know, then how do i make a loop?
and how do i unequip all items to scan them...
and reequip after scan,
i also want to destroy items in stead of booting players...
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #20 on: November 24, 2004, 11:47:35 AM »
Quote
good to know, then how do i make a loop?
and how do i unequip all items to scan them...
and reequip after scan,
i also want to destroy items in stead of booting players...
[snapback]11163[/snapback]
Look here : [snapback]10666[/snapback]
I did put a example of a loop there. To destroy bad items you better split the script in smaller parts. Whit a DestroyObject(oItem); in the function to check items and a BootPC(oPC); in the function for the scan on the char itself. To equip and unequip use AssignCommand() whit ActionEquipItem() and ActionUnequipItem(). You just need to do some structured programming, it's one of the basics.

-Mel

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #21 on: November 24, 2004, 12:37:44 PM »
I wonder wich language you speak cuz  I kinda don't understand anyting of it :P
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #22 on: November 24, 2004, 01:35:49 PM »
Quote
I wonder wich language you speak cuz  I kinda don't understand anyting of it :P
[snapback]11174[/snapback]

Get a book about the C program langue, something like this.
And 10 seconds search on the web already gived me this small tutorial how to make a while loop.
I really can't start to give you whole lessons how to program in C.

-Mel

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #23 on: November 26, 2004, 04:29:08 PM »
wy not?  :blush:
Pazuul - Leader of Minions

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #24 on: November 27, 2004, 07:07:13 AM »
thx a lot all of you...
my filter finally works only a few properties seem not to work...

i found a new filter at nwvault and adjusted it and now it works :D

these properties seem not to work:

ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNMENT
ITEM_PROPERTY_NO_COMBAT_DAMAGE

I prolly just wrote them wrong or someting can somewone tell me how I should write them or wy they don't work?
Pazuul - Leader of Minions

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #25 on: November 27, 2004, 07:17:33 AM »
now I would also still like to BAN some spells how do I do that?
can't find anything bouth it on nwvault

and if somwone has lots of time you could explain me how you really make it legit so noone can adjust his char in leto...

you can also mail it to me if you want to its Pasc_Cl@hotmail.com
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #26 on: November 27, 2004, 02:57:12 PM »
Quote
now I would also still like to BAN some spells how do I do that?
[snapback]11511[/snapback]
Check the spells script in the spell.2da and go to the toolset and open it. Change it to give let it give a message like 'banned spell' on the cast and save it on the mod you want it in. Or export it, split the file so you get a .ncs file and add it in the overide dir of the server. Then it will be banned for the server, no matter what mod.

-Mel

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #27 on: November 27, 2004, 04:34:16 PM »
lolz...

How do i open a .2da file?
Pazuul - Leader of Minions

Offline Tea-cup

  • Hero Member
  • *****
  • Posts: 916
    • View Profile
legit pvp server script
« Reply #28 on: November 27, 2004, 04:47:08 PM »
Quote
lolz...

How do i open a .2da file?
[snapback]11557[/snapback]
Notepad, word, openoffice... whatever that can open a textfile.
If you miss spells in it, check the attachment. It has the 2da's from a hotu/sou install.

-Mel
« Last Edit: November 27, 2004, 04:49:17 PM by Tea-cup »

Offline Pazuul

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://
legit pvp server script
« Reply #29 on: November 27, 2004, 05:13:30 PM »
oh so thats how it works...   :huh:

nope don't get it...
you will have to explain it better to me cuz i don't understand anyting of it...
i figured out how to open it but then i get abouth 100 pages of strange texts...
Pazuul - Leader of Minions