I have downlaoded 099 Alt_Distro from repo and when I create for example NPC banker an I try to say bank near him he do not react. Somebody can tell mi what is wrong?
use npc;
use os;
use uo;
use cfgfile;
use util;
include "util/bank";
include "include/eventID";
include "include/sysEvent";
include "include/client";
include "include/anchors";
include "include/dist";
include "include/begging";
var bank;
var me := Self();
var npccfg := ReadConfigFile("npcdesc");
program banker();
say("Hi!");
start_script("NPCKeeper", me);
var next_wander := ReadGameClock() + 30;
var myanchor := GetObjProperty(me, "Anchor");
if(myanchor)
MoveObjectToLocation(me, myanchor[1], myanchor[2], myanchor[3], me.realm, MOVEOBJECT_FORCELOCATION);
endif
drop_anchor();
myanchor := GetObjProperty(me, "Anchor");
EnableEvents(EVID_NODE);
DisableEvents(SYSEVENT_SPEECH);
var text;
while(1)
var ev;
ev := os::wait_for_event(120);
if(ev.type == EVID_NODE)
text := lower(ev.text);
if(text["bank"])
if(ev.source.criminal == 1)
say("I will not do business with criminals!");
else
OpenBank(ev.source);
endif
elseif(text["balance"])
if(ev.source.criminal == 1)
say("I will not do business with criminals!");
else
var bankbox := FindBankBox(ev.source);
var contents := EnumerateItemsInContainer(bankbox);
var amt := 0;
foreach item in contents
if(item.objtype == 0xeed)
amt := (amt + item.amount);
endif
endforeach
if(amt == 1)
PrintTextAbove(me,"" + ev.source.name + ", Your bank box holds " + amt + " gold coin.");
else
PrintTextAbove(me,"" + ev.source.name + ", Your bank box holds " + amt + " gold coins.");
endif
endif
endif
endif
if(ReadGameClock() >= next_wander)
begpurse(me);
wander();
if(coordist(me.x, me.y, myanchor[1], myanchor[2]) > 5)
MoveObjectToLocation(me, myanchor[1], myanchor[2], myanchor[3], me.realm, MOVEOBJECT_FORCELOCATION);
endif
next_wander := ReadGameClock() + 10;
endif
endwhile
endprogram
function OpenBank(you)
TurnToward(you);
var bankbox := FindBankBox(you);
if(bankbox)
var contents := EnumerateItemsInContainer(bankbox);
var amt := 0;
foreach item in contents
if((item.container.objtype != 0xefa) && (item.container.objtype != 0xe3b))
amt := (amt + 1);
endif
endforeach
printtextaboveprivate(me, "Your bank box holds " + amt + " items", you);
SendOpenSpecialContainer(you, bankbox);
else
say("You don't seem to have a bank box, "+ you.name);
endif
endfunction
First let me say thanks for downloading the alternate Distro. I was asked by Nando to provide it for those who want a "bare bones" shard which they can add to on their own. It's based on the POL 0.95 Distro but upgraded to work on the current version of POL Core. It is fully functional except for snooping and stealing skills but I am still organizing and cleaning up some of the code. I hadn't announced it yet because I was awaiting permission from Nando but he's not been around for a few weeks.
It is based on the an earlier Distro that used "nodes" as listeners for the merchants, bankers, and guards. The merchant, banker, and guards do not function unless they are created using a node.
There is documentation for the nodes in \distro-alt\docs\additional docs
the textfile named nodes.txt gives a description of the node system. Use the .createnode command to create a node. Select the type you wish to create, merchant or banker. Then place the node. Now double-click on the node. A gump will appear. Click on the checkbox in the upper left side where it says "Create a new merchant here?". If you created a banker node then type banker in when the gump disappears. You will get a target. Click the location you want the banker to appear and he/she should appear within a minute or so. If you created a merchant node rather than a banker node then you would enter the type of merchant you want to appear.
You can have multiple types of merchants attached to a single node. Simply double-click the node to add additional merchants.
Yukiko wrote:It is fully functional except for snooping and stealing skills but I am still organizing and cleaning up some of the code. I hadn't announced it yet because I was awaiting permission from Nando but he's not been around for a few weeks.
It will be something new? You think when you commit that?
You're not an idiot I'm sure but there is a .createnode command. If you're running on Linux that might be the issue because the text command is named createNode and as Linux is case based that could be the issue. Try using .createNode and see if that works. I will go through all of the commands and make sure they are all lowercase and update the repo. Your character has to be at least a GM for the command to work but I assume your character is using the default account which is higher than GM level,
It will be something new? You think when you commit that?
Yes, it's new and is intended as an alternate for those who don't want a "pre-made" type shard like the "Distro". There are still some of us that don't want a class system or that want to create our own for example. In the case of class systems if you want to create your own it's easier to start from fresh without one than it is to remove an existing class system.
Please let me know if the .createNode command doesn't work.
I went through the text commands on my local copy of the alternative Distro and made them all lowercase. I have a problem though when I try to get the GitHub client to allow me to commit the changes. Apparently the client doesn't see case changes made to file names as a valid change. For example changing createNode.src to createnode.src isn't seen as a change to the file. So I had to go through some maneuvers to get the name changes committed. I think the relevant files have now been updated.
Warning! merchantNodeDestroy.ecl does not exist!
Exception caught while loading script merchantNodeDestroy.ecl: Unable to open merchantNodeDestroy.ecl for reading.
Unable to read script 'merchantNodeDestroy.ecl'
Warning! merchantNodeDestroy.ecl does not exist!
Exception caught while loading script merchantNodeDestroy.ecl: Unable to open merchantNodeDestroy.ecl for reading.
Unable to read script 'merchantNodeDestroy.ecl'
Warning! merchantNodeDestroy.ecl does not exist!
Exception caught while loading script merchantNodeDestroy.ecl: Unable to open merchantNodeDestroy.ecl for reading.
Unable to read script 'merchantNodeDestroy.ecl'
Thanks. You found a bug. When I updated the alternative Distro to be HSA compliant I had to update the ObjType numbers for the nodes because they conflicted with new graphic art in the High Seas client. I changed them in the itemdesc file but the scripts, createnode.src for example, got overlooked. So it was using the old objtype number to create the node which corresponds to the ship parts in HSA. I've updated the repo. So just download and recompile.
It looks like from your console output that the scripts didn't compile properly. The merchant node system is in ...\pkg\systems\merchantnodes. Make sure those *.ecl files exist after you compile all the scripts.
I have found that using the starthere.bat, or starthere.sh, file to compile the scripts doesn't halt the process on an error. So some scripts may not compile and you aren't aware of it.I prefer running ecompile from the command line. That way it stops when it encounters an error.
Thanks Bodom. Yeah I figured it was because I'm using Windows. I thought that the Git client would be system agnostic but I suppose it uses Windows APIs which are case insensitive.
Yukiko wrote:
It looks like from your console output that the scripts didn't compile properly. The merchant node system is in ...\pkg\systems\merchantnodes. Make sure those *.ecl files exist after you compile all the scripts.
I have found that using the starthere.bat, or starthere.sh, file to compile the scripts doesn't halt the process on an error. So some scripts may not compile and you aren't aware of it.I prefer running ecompile from the command line. That way it stops when it encounters an error.
Check the case of the name of the merchantnodeDestroy script in \pkg\systems\ merchantnodes
It's probably the same issue as with the commands. I bet the itemdesc file has the destroy script spelled with the mixed case name but the actual script name is all lowercase. I'll look at it later today too.
I get the same errors. I haven't had time to research the problem yet. I'll look into it later today. By the way, I have the data files for the world that have all the decorations, doors etc. I can't remember if I uploaded the them to the repo but if I didn't I will later. I'm off to bed soon. Not sure where you are on the planet but I live in the US but I work nights. So please be patient.
I do appreciate your help in testing the Distro. It's never been run on a Linux machine and I didn't have a lot of testing after I made it HSA compliant. I still don't have custom housing or the large ships scripted. I might leave that for someone else to do.
aderal,
Here is a uoconvert.cfg file with the missing multis added. I want to thank Agata for posting his version of the World of Dreams scripts from which I drew some of these multi numbers. The other ones I added under houses. They technically aren't houses. They appear to be such things as ready made quest camps or small gardens. Unfortunately there are only three categories for multis and they certainly aren't boats or stairs. So that's why I placed them in the "houses" category. I will add this to the repo as well but I figured I'd post it here to help speed things up for you.
I am any getting any missing multis with the updated uoconvert.cfg file. What version of HSA are you running?
PS. I can not find 0x2*** IDs in UOFiddler
You mean multis above 0x2xxx? I don't see those either in Fiddler. But as I said I am not getting the errors you are getting. So maybe I don't have the same version of HSA that you do.
Your version is a little newer than mine. I am on 7.0.27.9
That might be why you are getting other errors from uoconvert.
I can make my version available for you to download if you need it but since yours is a newer one I don't think it would benefit you. I am downloading yours so I can add the additional missing multis to uoconvert.cfg
Thanks for the feedback on the Distro.
Hopefully the POL Core devs will include an HSA version of uoconvert.cfg in the Core repo once we get it finished.