• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Problem with snow

ligus

New Member
Joined
Apr 26, 2010
Messages
253
Reaction score
0
Heey, I have problem with map. When I start server snow tiles are bugged:
snow.jpg


Could anyone tell me how repair it to normal snow tiles? :)
 
Ok, I'll show 3 tiles:

IN RME: id 6585
On the server:
ItemID: [6598].
DecayTo: [6594].
the same tile, some seconds later:
ItemID: [6594].
DecayTo: [670].
the same tile, some seconds later:
ItemID: [670].

in RME: id 670
On the server:
ItemID: [6598].
DecayTo: [6594].
and no changes

in RME: id 670
On the server:
ItemID: [6588].
ItemID: [6598].
ItemID: [6603].
(it's changing)

Rest tiles looks similar...
 
I have this same issue, well its fine when i first start the server, but if i walk on one square of snow it turns loads of others into foot prints that i havent walked on and wont decay
 
Look if they decay in snow.lua and items.xml. If they appear as footprints already before you walked on it, look in randomization.xml if the snowids randomize till 6593.
 
Ye, footprints appear on map before someone walked on it and it doesn't decay to normal snow tile

snow.lua
Code:
TILE_SNOW = 670
TILE_FOOTPRINT_I = 6594
TILE_FOOTPRINT_II = 6598

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(isPlayerGhost(cid)) then
		return true
	end

	if(item.itemid == TILE_SNOW) then
		doTransformItem(item.uid, TILE_FOOTPRINT_I)
		doDecayItem(item.uid)
	elseif(item.itemid == TILE_FOOTPRINT_I) then
		doTransformItem(item.uid, TILE_FOOTPRINT_II)
		doDecayItem(item.uid)
	else
		doTransformItem(item.uid, TILE_FOOTPRINT_I)
	end

	return true
end

randomization.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<randomization>
	<config defaultChance="50"/>
	<palette itemid="101" randomize="5711;5726" chance="70"/>
	<palette fromid="351" toid="353" randomize="352;354"/>
	<palette fromid="708" toid="711" randomize="709;711"/>
	<palette fromid="3153" toid="3157" randomize="3154;3157"/>
	<palette fromid="7062" toid="7066" randomize="7063;7066"/>
	<palette itemid="670" randomize="6580;6593"/>
	<palette fromid="6580" toid="6593" randomize="6580;6593"/>
	<palette itemid="671" randomize="6683;6686"/>
	<palette fromid="6683" toid="6686" randomize="6683;6686"/>
	<palette itemid="4405" randomize="4406;4421"/>
	<palette itemid="4422" randomize="4423;4438"/>
	<palette fromid="4526" toid="4541" randomize="4527;4541"/>
	<palette itemid="4756" randomize="4527;4541"/>
	<palette fromid="4608" toid="4619" randomize="4609;4619"/>
	<palette fromid="4691" toid="4701" randomize="4692;4701"/>
	<palette fromid="5405" toid="5410" randomize="5406;5410"/>
	<palette fromid="6804" toid="6809" randomize="6805;6809"/>
</randomization>


I think that everything is ok...
 
Try to use your items.otb and items.xml from your server in Remere and check if the footprint snowids also decay in items.xml.
 
I copied items.xml and items.otb from TFS to RME and everything look ok:
snow2.jpg


but on the server its bugged :/

items.xml
Code:
        <item id="670" name="snow">
	<attribute key="cache" value="1"/>
        </item>
        <item id="4737-4748" name="snow"/>
	<item id="6580-6593" name="snow"/>
	<item id="6594" name="snow">
		<attribute key="description" value="Someone must have walked here recently."/>
		<attribute key="decayTo" value="670"/>
		<attribute key="duration" value="30"/>
	</item>
	<item id="6595-6597" name="snow">
		<attribute key="description" value="Someone must have walked here recently."/>
	</item>
	<item id="6598" name="snow">
		<attribute key="description" value="Someone must have walked here recently."/>
		<attribute key="decayTo" value="6594"/>
		<attribute key="duration" value="10"/>
	</item>
	<item id="6599-6608" name="snow">
		<attribute key="description" value="Someone must have walked here recently."/>
	</item>
	<item id="6609" name="snow drift"/>
	<item id="6610-6626" name="snow"/>
	<item id="6627-6682" name="shallow water">
		<attribute key="allowpickupable" value="1"/>
		<attribute key="fluidSource" value="water"/>
	</item>
        <item id="6756-6760" name="snow"/>
        <item id="6822-6838" name="snow"/>
        <item id="6939-6950" name="snow"/>
 
Did you added it to the right client? Be sure you also opened the map with that client.
Which footprint ids do you get ingame, is it just 6594 and 6598 or also 6595-6597 and 6599-6608?
 
Yeah i added items.xml and items.otb to C:\Program Files (x86)\Remere's Map Editor2.2\data\860 and map is saved as 8.60 and I'm using client 8.60.
In game i have footprint ID: 6598, 6594 and also
Code:
You see snow.
ItemID: [670].
And I see here 2 footprint, hmm...
 
Last edited:
Try to add decay and duration in items.xml to all footprint snowids that appear ingame and decay to snowids without footprints ingame.
 
Hmm it's really weird because all snow tiles are: 6598, 6594 and 670 and they are changing. Both footprint and normal snow tile have the same ID in game...

- - - Updated - - -

Does anyone know whats going on?
 
Last edited:
Also happening to me, tryed using different snow tiles but after some time all snow tiles get footprints.
 
If I use this

Code:
<movevent type="StepOut" itemid="670" event="script" value="snow.lua"/>

It "works", not all snow tiles get footprints but there is nothing else bugging.

If I add

Code:
<movevent type="StepOut" fromid="6580" toid="6593" event="script" value="snow.lua"/>

When something steps in one tile of that kind, it seems like every tile in the server with that id kind will get footprints.

Using the snow.lua and movements.xml from the other thread.
http://otland.net/f16/movements-snow-tiles-186549/#post1818277
 
Last edited:
so with 670, your footprints work correctly but as soon as you add
XML:
<movevent type="StepOut" fromid="6580" toid="6593" event="script" value="snow.lua"/>
if you step on a snow tile it changes all snowtiles in server?


If this is true then maybe try changing that line to this line.
XML:
<movevent type="StepOut" itemid="6580-6593" event="script" value="snow.lua"/>
or
XML:
<movevent type="StepOut" itemid="6580;6581;6582;6583;6584;6586;6587;6588;6589;6590;6591;6592;6593" event="script" value="snow.lua"/>
 

Similar threads

Back
Top