trying to make house dclick

Trying to make a script in TUS 48e and need an answer or two? Ask here. Please don't request scripts be made here.

Moderators: Dezonus, Moderator

trying to make house dclick

Postby puffpuff21 on Sat Nov 26, 2005 5:33 pm

ok here is what i got so far what the problem is the key is blank and the sign does not work if some one could help me out that would be great .



[4200]
NAME=Deed to a Small Stone and Plaster House
ID=VENDOR_DEED
BUYVALUE=46000
SELLVALUE=34000

ontrigger=dclick
src.newitem=100e
src.act.amount=1
src.act.bounce
src.newitem 4064
src.newitem=06a5
src.amount=1
src.act.move 0,3,7
src.newitem=0bd2
src.amount=1
src.act.move 2,4,5
src.fix
remove

CATEGORY=Provisions - Deeds
SUBSECTION=House Deeds
DESCRIPTION=Small Stone and Plaster House
puffpuff21
n00b
n00b
 
Posts: 19
Joined: Mon Aug 30, 2004 12:51 am

Postby Bronx on Fri Dec 02, 2005 6:47 pm

You need to set the "More" of the key to the house's UID. Also the doors "More" and "Link" need to be set to the house's UID as well.

"Return 1" at the end would prevent the default house placement system to come up. If you are using UO Assist you will crash when you double click if you do not have "Return 1".

Regards,
User avatar
Bronx
Wannabe
Wannabe
 
Posts: 100
Joined: Thu Sep 02, 2004 10:15 am

Postby Barkley on Tue Dec 13, 2005 4:25 pm

ontrigger=dclick
src.newitem 4064
VAR.NEWHOUSE=<SRC.ACT.SERIAL>
src.newitem=06a5 //door
SRC.ACT.MORE1=<VAR.NEWHOUSE> //doors need more1 to enable key usage
SRC.ACT.MORE2=02710
SRC.ACT.LINK=<VAR.NEWHOUSE>
src.act.move 0,3,7
src.newitem=0bd2
SRC.ACT.LINK=<VAR.NEWHOUSE> //house signs need link to house
src.act.move 2,4,5
src.newitem=100e
SRC.ACT.MORE1=<VAR.NEWHOUSE>
SRC.ACT.LINK=<VAR.NEWHOUSE>
src.act.bounce
src.fix
remove
return 1


not tested..
User avatar
Barkley
Happy poster
Happy poster
 
Posts: 35
Joined: Tue Aug 10, 2004 7:59 am

Postby puffpuff21 on Thu Jan 05, 2006 2:18 am

ok now my only problem is it goes back to defalt after i redeed the house here is what mine looks like

ON=0 Get Another House Key
src.newitem copper_key
src.act.more=<src.targ.link>
src.act.attr=04

src.findlayer(30).morey=<src.act.weight> + <src.weight>
if <src.findlayer(30).morey> > (<src.str>*40)
src.act.p=<src.p>
src.sysmessage You put the <src.act.name> at your feet. It is too heavy..
sound 66
else
src.act.bounce
endif

src.update
ON=0 Redeed the House
if <src.targ.link.baseid>>0
src.newitem=vendor_deed
src.act.more <src.targ.link.baseid>
src.act.name deed to a <src.targ.link.name>
src.findlayer(30).morey=<src.act.weight> + <src.weight>
if <src.findlayer(30).morey> > (<src.str>*40)
src.act.p=<src.p>
src.sysmessage You put the <src.act.name> at your feet. It is too heavy..
sound 66
else
src.act.bounce
endif

src.targ.link.remove
else
src.sysmessage You cannot demolish a city house!
endif
ON=0 Nothing
return 1
puffpuff21
n00b
n00b
 
Posts: 19
Joined: Mon Aug 30, 2004 12:51 am

Postby Bronx on Thu Jan 05, 2006 8:28 pm

Not sure exactly what problems you are having, you don't really give enough information. But I noticed your code is missing RETURN's which could be your problem. If you use a TRIGGER/TYPE for your custom house placement then you should add a SRC.ACT.TYPE=# to the deed after src.newitem=vendor_deed .

Try this:

Notice the BOLD are where my changes/additions are.

ON=0 Get Another House Key
src.newitem copper_key
src.act.more=<src.targ.link>
src.act.attr=04
src.findlayer(30).morey=<src.act.weight> + <src.weight>

if <src.findlayer(30).morey> > (<src.str>*40)
src.act.p=<src.p>
src.sysmessage You put the <src.act.name> at your feet. It is too heavy..
sound 66
SRC.UPDATE
RETURN 1
else
src.act.bounce
SRC.UPDATE
RETURN 1
endif

ON=0 Redeed the House
if <src.targ.link.baseid>>0
src.newitem=vendor_deed
src.act.more <src.targ.link.baseid>
src.act.name deed to a <src.targ.link.name>
src.targ.link.remove
src.findlayer(30).morey=<src.act.weight> + <src.weight>
ELSE
SRC.SYSMESSAGE You cannot demolish a city house!
RETURN 1
ENDIF

if <src.findlayer(30).morey> > (<src.str>*40)
src.act.p=<src.p>
src.sysmessage You put the <src.act.name> at your feet. It is too heavy..
sound 66
SRC.UPDATE
RETURN 1
else
src.act.bounce
SRC.UPDATE
RETURN 1
endif

RETURN 1

ON=0 Nothing
return 1


P.S.: You should really try to be more organized with your scripting, it will make it much easier to edit or add things to it later on.

Regards,
User avatar
Bronx
Wannabe
Wannabe
 
Posts: 100
Joined: Thu Sep 02, 2004 10:15 am

Postby puffpuff21 on Fri Jan 06, 2006 3:08 am

well what it is doing when i redeed house it turns the deed back to defult
witch makes that targortor witch i wanna get rid of :P i hope that is a bit more info
puffpuff21
n00b
n00b
 
Posts: 19
Joined: Mon Aug 30, 2004 12:51 am

Postby Barkley on Fri Jan 06, 2006 2:09 pm

Well you would have to make a mega-check for each and every house multi against the house and if its the right one have it create the original deed. something like

Code: Select all
IF (<SRC.TARG.LINK.BASEID>==4064)
SRC.NEWITEM=4200
SRC.FINDLAYER(30).MOREY=<SRC.ACT.WEIGHT> + <SRC.WEIGHT>
IF <SRC.FINDLAYER(30).MOREY> > (<SRC.STR>*40)
SRC.ACT.P=<SRC.P>
SRC.SYSMESSAGE You put the <SRC.ACT.NAME> at your feet. It is too heavy..
SOUND 66
RETURN 1
ELSE
SRC.ACT.BOUNCE
RETURN 1
ENDIF
ENDIF

IF (<SRC.TARG.LINK.BASEID>==****) //next multi id
SRC.NEWITEM=**** //next deed id
SRC.FINDLAYER(30).MOREY=<SRC.ACT.WEIGHT> + <SRC.WEIGHT>
IF <SRC.FINDLAYER(30).MOREY> > (<SRC.STR>*40)
SRC.ACT.P=<SRC.P>
SRC.SYSMESSAGE You put the <SRC.ACT.NAME> at your feet. It is too heavy..
SOUND 66
RETURN 1
ELSE
SRC.ACT.BOUNCE
RETURN 1
ENDIF
ENDIF

ect....


Untested. Hope this helps
User avatar
Barkley
Happy poster
Happy poster
 
Posts: 35
Joined: Tue Aug 10, 2004 7:59 am

Postby puffpuff21 on Sat Jan 07, 2006 3:10 am

i got it i just tweaked around with it till i read what u put bronx set a type then it hit me :D thanks man
puffpuff21
n00b
n00b
 
Posts: 19
Joined: Mon Aug 30, 2004 12:51 am


Return to TUS48e/Sphere51a help

Who is online

Users browsing this forum: yfewtjdfopaw and 0 guests

cron