Full Version : XMLQUEST 4 dummies
xmlspawner >>XMLSpawner - Tutorials >>XMLQUEST 4 dummies


<< Prev | Next >>

ArteGordon- 05-15-2006
QUOTE (BiO_ZeRg @ May 15, 2006 02:02 pm)
1 more how i make the playes cant kill the npc(bobo) just the players are making the quest

check out this thread
http://xmlspawner.15.forumer.com/index.php?showtopic=410

BiO_ZeRg- 05-15-2006
Can you explain me a little bit about clothes i dont understand very well the post you give me

ArteGordon- 05-15-2006
QUOTE (BiO_ZeRg @ May 15, 2006 02:06 pm)
Can you explain me a little bit about clothes i dont understand very well the post you give me

you would use the EQUIP keyword to dress them with clothes, or armor, or weapons, but if they already have something on the layer then you first have to UNEQUIP that layer. For example

banker/UNEQUIP,OneHanded/EQUIP/longsword

BiO_ZeRg- 05-15-2006
i this case "bobo" is a person and spawn like this npc,2/name/bobo then i do this?
npc,2/name/bobo/UNEQUIP,OneHanded/EQUIP/longsword ???

ArteGordon- 05-15-2006
yes, except you probably want to use xmlquestnpc instead of npc.

(edit)

oh, and make sure that if you are equipping them with items that have a str requirement, that you set their rawstr high enough to equip it. By default the npcs are very weak.

xmlquestnpc,2/name/bobo/rawstr/50/UNEQUIP,OneHanded/EQUIP/longsword

BiO_ZeRg- 05-15-2006
why xmlquestnpc?

ArteGordon- 05-15-2006
QUOTE (BiO_ZeRg @ May 15, 2006 02:24 pm)
why xmlquestnpc?

that is the type of mobile used as a standard quest npc that is included in the xmlspawner package. There is no 'npc' class mobile by default unless you have scripted it yourself.

BiO_ZeRg- 05-15-2006
user posted image i have this error you have the PlayerMobile.cs and BaseCreature.cs with the code?
QUOTE
public override bool CanBeHarmful( Mobile target, bool message, bool ignoreOurBlessedness )
  {
  // ARTEGORDONMOD
  // allow quest specific attack status for mobs
  // if the mob has a RestrictAttack xmldata attachment, then the data on that attachment
  // will give the name of the carried item that will allow the creature to be attacked

  XmlData a = (XmlData)XmlAttach.FindAttachment(target, typeof(XmlData), "RestrictAttack");

  if (a != null)
  {
    // if you have the item then you can attack the target, otherwise you cant
    return (BaseXmlSpawner.SearchMobileForItem(this, a.Data, null, false) != null);
  }

  if ( m_DesignContext != null || (target is PlayerMobile && ((PlayerMobile)target).m_DesignContext != null) )
    return false;

  if ( (target is BaseVendor && ((BaseVendor)target).IsInvulnerable) || target is PlayerVendor || target is TownCrier )
  {
    if ( message )
    {
    if ( target.Title == null )
      SendMessage( "{0} the vendor cannot be harmed.", target.Name );
    else
      SendMessage( "{0} {1} cannot be harmed.", target.Name, target.Title );
    }

    return false;
  }

  return base.CanBeHarmful( target, message, ignoreOurBlessedness );
  }

ArteGordon- 05-15-2006
add this to the top of your scripts
CODE

using Server.Engines.XmlSpawner2;



BiO_ZeRg- 05-15-2006
what part plz make a exampple ( i dont now nothing about scripts i just copy and paste) plz a little help biggrin.gif

ArteGordon- 05-15-2006
QUOTE (BiO_ZeRg @ May 15, 2006 03:14 pm)
what part plz make a exampple ( i dont now nothing about scripts i just copy and paste) plz a little help biggrin.gif


Open up your basecreature.cs and playermobile.cs scripts and look at the beginning of each. You will see a number of statements that begin with 'using'.
You need to add

using Server.Engines.XmlSpawner2;

along with the rest of them, like

QUOTE

using System;
using System.Data;
using System.IO;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
using Server.Gumps;
using Server.Targeting;
using System.Reflection;
using Server.Scripts.Commands;
using CPA = Server.CommandPropertyAttribute;
using System.Xml;
using Server.Spells;
using System.Text;
using System.Globalization;
using Server.Engines.XmlSpawner2;

BiO_ZeRg- 05-15-2006
thx you always save me biggrin.gif

BiO_ZeRg- 05-15-2006
Problems wiht samurais armors

Invalid ADD. No such item : Platemail Battle Kabuto FIXED

How i make the quest cant be repetead

ArteGordon- 05-15-2006
QUOTE (BiO_ZeRg @ May 15, 2006 04:38 pm)
Problems wiht samurais armors

Invalid ADD. No such item : Platemail Battle Kabuto FIXED

How i make the quest cant be repetead

set the Repeatable property on the questholder to false as in this example

questholder/name/onlyone/objective1/KILL,balron/autoreward/true/rewardstring/ARMOR,4,5/repeatable/false

QUOTE

- added support for flagging quests as either non-repeatable, or repeatable but only after some time period.  If the Repeatable property is set to false on a questholder or questnote item, when the quest is completed and deleted, the player will be given a quest attachment (XmlQuestAttachment)  that will flag the player as having completed the quest.  If the Repeatable property is set to true (the default) and the NextRepeatable property is set to a TimeSpan value, then the attachment will be set to expire after that time.  As long as the XmlQuestAttachment with the quest name is attached to the player, objectives for that quest cannot be completed. The quest can still be held by the player and when the attachment expires, the player can then repeat the quest.  Note, staff can add or remove these attachments in-game using [addatt and [delatt to manually control whether specific players can repeat specific quests. The repeatability status of a quest will be shown at the bottom of the quest status gump.
For example spawning a quest as

questholder/name/waitforme/objective1/KILL,orc/autoreward/true/rewardstring/ARMOR,1,2/nextrepeatable/10:00

would make a quest named 'waitforme' with the objective to kill an orc and a random armor auto reward that could only be repeated once every 10 hours.

questholder/name/onlyone/objective1/KILL,balron/autoreward/true/rewardstring/ARMOR,4,5/repeatable/false

would make a quest named 'onlyone' with the objective to kill a balron and a random armor auto reward that could only be done once.

- added the .xml example repeatquest.xml that spawns a quest that can be repeated once a day and gives 2 hours of life drain ability as a reward.

BiO_ZeRg- 05-15-2006
i think the ronin/ATTACH/xmldata,RestrictAttack,Kill Shinobi doesnt work i can kill the npc FIXED