SphereCommunity
Farm problem - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Farm problem (/Thread-Farm-problem)



Farm problem - Van Glan Bloom - 03-15-2015 01:30 AM

Hi people,

I have a problem on my farm system I can not solve. I created farm deeds for the players can make their plantations, but when I turn off the server and I switch back on the multis disappear, leave these errors in the sphere:

Code:
ERROR: 'wooden fence' Bad Link to 0400018ed
ERROR: UID = 040001879, 088th id = 'wooden fence', Invalid code = 2205 (mislinked item)



RE: Farm problem - richm - 03-15-2015 07:27 AM

looks like the fences are linked to an item that has decayed?


RE: Farm problem - Van Glan Bloom - 03-15-2015 11:20 AM

I think that added the correct Attrs in the multi and in the deed, however the error keeps. Whenever I turn off and turn on the server the items disappear, leaving this error in the console sphere.

Multi of Farm :

Code:
[ITEMDEF i_multi_farm33]
NAME=Farm 3x3
TYPE=t_multi

MULTIREGION=0,1,0,0
tag.farm=1
COMPONENT=088b -2 0 0 0
COMPONENT=088b -2 1 0 0
COMPONENT=088b -2 2 0 0
COMPONENT=088b 1 2 0 0
COMPONENT=088b 1 1 0 0
COMPONENT=088b 1 0 0 0
COMPONENT=i_fence_wood_2 -1 -1 0 0
COMPONENT=i_fence_wood_2 0 -1 0 0
COMPONENT=i_fence_wood_2 1 -1 0 0
COMPONENT=i_fence_wood_2 -1 2 0 0
COMPONENT=i_fence_wood_2 1 2 0 0
COMPONENT=i_soil_unfertilized -1 0 0 0
COMPONENT=i_soil_unfertilized 0 0 0 0
COMPONENT=i_soil_unfertilized 1 0 0 0
COMPONENT=i_soil_unfertilized -1 1 0 0
COMPONENT=i_soil_unfertilized -1 2 0 0
COMPONENT=i_soil_unfertilized 0 1 0 0
COMPONENT=i_soil_unfertilized 0 2 0 0
COMPONENT=i_soil_unfertilized 1 1 0 0
COMPONENT=i_soil_unfertilized 1 2 0 0
TSPEECH spk_farm1

ON=@create
fix
attr=08010
src.tag.ihavefarms=<eval <src.tag.ihavefarms>+1>
src.newitem=i_farm_door
src.new.p=<src.targp>
src.new.move 0,2,0
src.new.attr=attr_move_never|attr_static|attr_decay
src.new.tag.uiddodono=<src.uid>
src.new.name=<src.name>'s Farm
src.var.uiddooraporta=<src.new.uid>
src.update
src.try uid.<src.var.uiddoor>.tag.uidfarm=<uid>
src.try uid.<src.var.uiddoor>.link=<uid.<src.var.uiddoor>.tag.uidfarm>

on=@click
if (<src.isgm>)
message @07a1 <uid.<more1>.name> (<more1>)
else
return 1
endif

Deed of Farm :

Code:
[ITEMDEF i_deed_farm33]
DEFNAME=i_deed_farm33
NAME=Deed para Farm 3x3
ID=i_deed
RESOURCES=i_deed,i_multi_farm33
VALUE=15000

CATEGORY=Isengard Shard
SUBSECTION=Farming
DESCRIPTION=Deed Farm 3x3

ON=@Create
MORE=i_multi_farm33
......
.....



RE: Farm problem - Extreme - 03-15-2015 01:15 PM

Check the MULTIREGION property in the MULTIDEF section.
Maybe 'outside the area' items aren't linked.


RE: Farm problem - Van Glan Bloom - 03-16-2015 01:19 AM

I have change the ATTR for attr=attr_move_never and now woking good.
Thx guys


RE: Farm problem - Van Glan Bloom - 06-11-2015 10:19 AM

Hi guys,
I added a plague system in plants for farming, but for some reason is not going well.

I have add a tag in the plant tag.plague=1

And this is my function :

[code]
[ITEMDEF i_plague]
ID=i_bee_swarm
TYPE=t_script
NAME=insects

on=@create
color=03b7
timer=10

on=@timer
serv.newitem=i_dryvegetation
new.p=<p>
new.timer=10
new.tag.uidfarm=<tag.uidfarm>
try uid.<tag.plague>.remove
remove
return 1

[FUNCTION plague]
serv.newitem i_plague
new.p=<p>
new.more1=<ARGS>

[code]


Wanted when dry vegetation was added to good plant was removed. I've tried to add timers and commands to remove but nothing works.

Can you help?


RE: Farm problem - Coruja - 06-12-2015 04:11 AM

you must make sure that these TAG's are properly set
try using ".xshow tag.plague" and click on the item to check if the tag value is correct


RE: Farm problem - Van Glan Bloom - 06-12-2015 11:57 AM

I could solve my previous problem.
However I wonder if it is possible to create a function where certain objects are removed from a title automatically.
For example in the field of harvest if a plant is infected with insects and if I use an insecticide in the plant, the animation of insects automatically removed