Page 1 of 1
CreateMulti txtcommand
Posted: Sat May 12, 2018 11:19 am
by ghibli1983
Hi everybody,
I'm trying to create a command (.createmulti), the code is this here:
Code: Select all
use uo;
program textcommand_createmulti(who, text)
if(!text)
SendSysMessage(who, "Usage is .createmulti [serial].");
return;
endif
while (1)
SendSysMessage(who, "Where do you want to build?");
var tgt := TargetMultiPlacement( who, CInt(text) );
SendSysMessage(who, "" + tgt);
var x := CInt(tgt.x);
var y := CInt(tgt.y);
var z := CInt(tgt.z);
if(!tgt)
SendSysMessage(who, "Cancelled.");
return;
endif
CreateMultiAtLocation( x, y, z, CInt(text));
endwhile
endprogram
when I try it in game inserting a code of my multi for example "0x19" comes out this error message
- Error Message
- errormulti.PNG (15.47 KiB) Viewed 7756 times
where is the error?
I thank everyone for their help
Re: CreateMulti txtcommand
Posted: Sat May 12, 2018 6:57 pm
by Yukiko
According to the docs CreateMultiAtLocation requires the ObjType or the Name member for the multi not the multi ID that you find in UO Fiddler.
Here is part of my itemdesc.cfg file in my housing package where I have the various multi houses defined:
Code: Select all
House 0x16060
{
Name smallstoneandplasterhouse
Graphic 0x4064
MultiID 0x64
}
House 0x16061
{
Name smallstonehouse
WalkOnScript houseBanning
Graphic 0x4066
MultiID 0x66
}
House 0x16073
{
Name smallbrickhouse
WalkOnScript houseBanning
Graphic 0x4068
MultiID 0x68
}
House 0x16062
{
Name smallwoodenhouse
WalkOnScript houseBanning
Graphic 0x406a
MultiID 0x6a
}
So to create the
smallbrickhouse using your script I would enter 0x16073 not the MultiID of 0x68. If you perform a test in your script on the
text parameter and allow either strings or integers you could also pass
smallbrickhouse to CreateMultiAtLocation to create the multi.
I hope that helps.
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 3:21 am
by ghibli1983
Thank you Yukiko,
i understand the problem now, but i have another question,
I created with UOA more building and i import the UOA File in UO Fiddler
when read a grafic HEX?
Exemple:
Code: Select all
House 0x607A <------HEX CALLING IN GAME
{
Name twostoryvilla
WalkOnScript houseBanning
Graphic 0x409E <------- ????
MultiID 0x9E <------ OK! I UNDERSTAND IS A MULTI HEX
}
Thank's for the important tips !!!
Bye
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 5:34 am
by Turley
The graphic entry for houses/boats is no more needed since pol099. So just define the multiid as you added it via fiddler and choose a free object type.
(P.s. you can also create multis via fiddler, no need to use uoa
)
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 5:40 am
by ghibli1983
Thankyou Turley,
i'm have a POL95 ,
usually used a OSI House , now i create varius House for add in my Vendor Architect.
Before Chenge my DeedScript i need to try a build from a multicommand text.
But now , where discovery the Graphic ID for my new building?
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 7:10 am
by Turley
Then you should really update.
If I remember correctly just use the same graphic as your choosen objtype.
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 7:33 am
by ghibli1983
Thank you, now try to add this line!
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 7:55 am
by ghibli1983
OK i add all in the ItemInfo.cfg in my System/Housing pkg, and add a new house in my multis.cfg,
When call in game a new house is all ok, i'm see the new building in transparency, move my target on a free areas (example: green acres), but ....not build
,
when click with my target
See the image below:
- NO BUILD
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 9:26 am
by Turley
Use a print around your createmultiatlocation function and check your console why it fails.
Re: CreateMulti txtcommand
Posted: Sun May 13, 2018 11:04 am
by ghibli1983
E see the error , but i tgt a house in a open space area (green acres)
attach the image below:
- errore_multi.PNG (10.08 KiB) Viewed 7728 times
Re: CreateMulti txtcommand
Posted: Mon May 14, 2018 1:46 pm
by ghibli1983
I have a update for the createmulti problem,
house compare in strasparance but no build,
in the console not compare an error, but compare a build message,
but the house not compare in game
- console createmulti
Re: CreateMulti txtcommand
Posted: Mon May 14, 2018 4:48 pm
by Yukiko
What I recommend is setting up a test server with POL 099.1 and the Distro.Add your custom building to the Distro housing package and use your modified client to log in and attempt to place your house in a that test server. If it works then it is an issue with the obsolete Core you are using. Though POL 095 was a great version of POL it is no longer supported.
I truly do not like being the bearer of difficult news but you should be using a current Core.
Maybe Turley or another developer will know if this is an issue with POL 095 or maybe some problem with your script.