Full Version : bod time remaining
xmlspawner >>Scripting Support >>bod time remaining
<< Prev | Next >>
Greypurple- 02-13-2006
Firstly thanks for creating this forum.This is a lovely place for xmlspawner fans.Thank you Artegordon for making this script.
Here is my question.In my shard bod time is 6 hours.I want to make a command which when typed shows a gump and shows the Remaining time for tailor and bs bod.For example the person take his bods then typed this command.He will get a gump that shows how many time remains for the next tailor and bs bods.It have to show it like hour:minute:seconds.Are there any people can help me?The gump is not important it can be very basic.
Note:If the player hasnt got tailor and bs skills than he can see the gump like this
Tailor:
You dont have required skill to see your remaining bod time.
Blacksmith:
You dont have required skill to see your remaining bod time.
or if he only got one of it .the gump can show like this
Tailor:
You dont have required skill to see your remaining bod time.
Blacksmith:
00:53:20
ArteGordon- 02-14-2006
here is something to consider. You can use a .npc specification to do this quite easily.
I have attached one that you can try out. Just save it to your XmlQuestNPC folder or the main RunUO folder and do a
[loadnpc tailorbodtime
and target an object.
Then when a player is within 3 tiles of the object and says the word "when", it will pop up a gump with the remaining time.
If they have less than 20 skill it will pop up a gump saying that they dont have enough skill.
You could do the same thing for a smith.
This is more RP than just having a command that can be executed anywhere.
Greypurple- 02-14-2006
ohh this is wonderfull but the only problem is that i try and it didnt work .
ArteGordon- 02-14-2006
make sure that you test it as a player. By default it will not respond to staff. You can use the StaffCloak included in the xmlspawner support package to quickly switch between player and staff accesslevels.
Greypurple- 02-14-2006
i used the staff cloak and stills not working.
Greypurple- 02-14-2006
and now it says xmlquestnpc/tailorbodtime.npc not reading.
the file is in the xmlquestnpc directory in runuo root directory
Galfaroth- 02-14-2006
Type .loadnpc xmlquestnpc/tailorbodtime without .xml - maybe will work. It has to show message: xmlquestnpc/tailorbodtime succesfuly loaded, and name of npc should change. If it is finished type .xmledit and target your bod mobile to watch how the code works.
Greypurple- 02-14-2006
i am trying it with not typing xml but it stills dont read it.
ArteGordon- 02-14-2006
and you are typing in the command just like this?
[loadnpc tailorbodtime
Are you able to load other .npc files in your XmlQuestNPC folder?
You might try placing the file in your main RunUO folder instead and issuing the same command.
Greypurple- 02-14-2006
should i have to target a npc or anything else?
ArteGordon- 02-14-2006
you can target anything you want. It can be an npc or an item. The dialog attachments work on both.
For actual use, you would probably want to just spawn your vendor npc with the attachment like
tailor/ATTACH/xmldialog,tailorbodtime
that way it would appear as though the tailor was giving them the information.
Greypurple- 02-16-2006
ok now it works but it show the time like this 05:49:48.8906250
what is the 8906250 part?i dont want it.
and this is not working always when i say when the gump appears but then i try about 50 times and its not appearing
ArteGordon- 02-16-2006
that is just the default formatting for times. If you want more control over it you can format it manually like
GUMP,Next Tailor BOD,0/{GETONTRIGMOB,NextTailorBulkOrder.hours}:{GETONTRIGMOB,NextTailorBulkOrder.minutes} remaining until your next Bulk Order
Greypurple- 02-16-2006
this is not working always when i say when the gump appears but then i try about 50 times and its not appearing.and my players trying it and they dont got any gumps .i think this is not working clear..can i make a command script for this?
ArteGordon- 02-16-2006
how have you set it up?
spawn the vendor like this
tailor/ATTACH/xmldialog,tailorbodtime
and it will work just fine.