Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 12-07-2005, 03:30 AM   #1 (permalink)
 
Join Date: Dec 2005
Posts: 5
Default New to XMLSpawner, Problem loading npc file

Hi Guys,
First off, id like to say thanx to Arte for creating such a vast area of knowledge. The programs on the site and the forums have helped me press through a lot of the new scripting that im doing ( my first shard ) and i would be undoubtedly stuck at a BSOD had it not been for the forums.

To my point now tho, I have been using XMLSpawner ( latest Version ) to create quest NPC's, and when i save them, they save into my RunUO/XMLQuestNPC folder. My problem lies that when i try to lad the npc file that i created onto a spawner, it give me an error about format.

( oh nd this last one as a side note if anyone knows, how do i link a timed switch to a door? )

Thanks for the help guys, Love the site
aksnowking88 is offline   Reply With Quote
Old 12-07-2005, 06:58 AM   #2 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

to load a .npc file onto a spawned npc, just add a spawn entry like this

xmlquestnpc/configfile/yournpcfilename/loadconfig/true

to link a timed switch to a door, just set the Target0Item to point to the door and the Target0Property to

/open/true

you can also set the Target1Item to the door and the Target1Property to

/open/false

depending on what you want the door to do in the two switch states (0 and 1)

(edit)

I should point out that you can add XmlDialog attachments (the thing that the .npc specification is loaded into) to any object, not just xmlquestnpcs.
The xmlquestnpc just gives you a few extra features, like a context menu interaction option.

So if you wanted to spawn a dog that would implement your .npc specification you could spawn it as

dog/ATTACH/xmldialog,yournpcfilename

or even objects (they dont have to be mobiles)

metalchest/ATTACH/xmldialog,yournpcfilename

You can also just add them manually using the [addatt command, like

[addatt xmldialog yournpcfilename

and then target something
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum

Last edited by ArteGordon; 12-07-2005 at 10:02 AM.
ArteGordon is offline   Reply With Quote
Old 12-07-2005, 01:35 PM   #3 (permalink)
 
Join Date: Dec 2005
Posts: 5
Default Thanks

Thanks Arte, I been trying to get that switch workin for days, this will help me a lot. Thnks for taking the time to host such a fantastic site and help ppl with simple questions ( even if they arent that hard ) but hopefully ill be able to find something more challenging for you in the future.
aksnowking88 is offline   Reply With Quote
Old 12-07-2005, 02:25 PM   #4 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

here is some additional info taken from xmlspawner2.txt on those switches

Quote:
- added new items TimedSwitch, TimedLever, XmlLatch, and TimedSwitchableItem.
Similar to the SimpleSwitch and Simple lever, the TimedSwitch, TimedLever items add a reset timer to the switch/lever states with min/maxdelay properties and are derived from the XmlLatch which is a new class that supports resettable switching, and can be used as an item itself to implement a resettable latch (set the state externally and it will hold that state for some time and then reset).
The item TimedSwitchableItem is a TimedSwitch that allows you to specify the Item statics that will be assigned to each state, allowing flexible user-defined visuals during switching, such as a torch or a stone, or a wall section, etc. Because it is a TimedSwitch you can assign actions that are associated with each state as well, such as opening a door when double-clicking a torch, or opening a secret passage when double-clicking on a wall section, etc.
The current switching state of all of these items is contained in the State property, and the ResetState is the value that the State will be returned to after the reset timer expires.
and

Quote:
- added several new items for added content that are independent but enhance the use of the xmlspawners. They are a switch, a lever, and a combination lock.
The script SimpleSwitches.cs adds a 2or3-state lever, a 2 state switch with different facings determined by direction (not by flipping), and a combination lock. The states of the lever can be used to set properties on target items such as doors (locked/unlocked), or even to add items to containers.
By setting the TargetItem and TargetProperty properties, you link the switch/lever states to certain item properties. So, for example to use a switch to open a door when the switch is in the 1 state, set Target1Item to the door and then set Target1Property to /locked/false (note, it uses the same syntax as the xmlspawner2 property specification strings. Since it shares the same syntax, you can also have it do things like change the color of an item, or add items to a container using the ADD/<spec> string.)
SimpleCombinationLock simulates a multi-digit (max 8) combination lock. The state of each of the digits can be set using (for example) the lever or switch items. The combination is set in the Combination property. So the combination of 378, would correspond to digits 2,1,0 taking on values of 3,7, and 8 respectively. The Match property can be tested to determine when the target combination is matched by the combination of digits.
Note that digit number corresponds to significance, from least to most.
Each digit is a property (Digit0, Digit1, Digit2, ... Digit7) and can take on the values 0-9. You can set the property string to indicate either a property name on the target item (e.g. switchstate, or leverstate, or totalgold), or you can specify a test such as totalgold<100, or open=false, or locked=true.
You could use this item to look for certain combinations of switches or levers, door states, etc. or even combinations of levers, and weight of a container, or number of kills on a spawn etc., and then open a door, or add items to a container, or change the color of a stone, trigger a spawn, etc.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 12-09-2005, 06:21 AM   #5 (permalink)
 
Join Date: Jul 2003
Location: Poland
Posts: 48
Send a message via ICQ to Obsydian
Default

Guys... This is massive . Totally killed me with one single shot through the brain... This is like... Switching from POL to RunUO is not like changing cars... it's more like changing a bike to a plane. A very fast one too. Sorry for a post, that changes nothing in the discussion, but I just couldn't stop myselft after reading the quotes above...

Best wishes
Sid
Obsydian is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5