• 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!

need snow script

chauffaille

New Member
Joined
Sep 10, 2009
Messages
198
Reaction score
1
hello ,


I need a script that when the player is walking on the tile of snow, up a text on it saying "cool!"

thx ;D
 
hello ,


I need a script that when the player is walking on the tile of snow, up a text on it saying "cool!"

thx ;D

Just edit the actual movement? Probably snow.lua at data/movements/scripts.

+doSendAnimatedText(toPosition, "Cool!", color(0-255))
 
hm, i will only appear when the player step? I was thinking of one that appears from time to time, when the player is walking in the snow
 
I will explain, the player is walking on tile snow, and occasionally, when he steps on a tile, it will appear that cold!, in light blue


i give rep ;D
 
Code:
    local rand = math.random(10)
    if(rand >= 8)
        doSendAnimatedText(toPosition, "Cold!", color(0-255))
    end

Get the color yourself :|
 
my snow.lua


local TILE_SNOW = 670
local TILE_FOOTPRINT_I = 6594
local 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

local rand = math.random(10)
if(rand >= 8)
doSendAnimatedText(toPosition, "Cold!", color(55))

end
 
LUA:
local TILE_SNOW = 670
local TILE_FOOTPRINT_I = 6594
local TILE_FOOTPRINT_II = 6598
local rand = math.random(1,10)

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
   if(rand >= 8)then
 doSendAnimatedText(toPosition, "Cold!", 55)
   end
                               return TRUE
end
 
Last edited:
is a follows:


local TILE_SNOW = 670
local TILE_FOOTPRINT_I = 6594
local 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

local rand = math.random(10)
if(rand >= 8)
doSendAnimatedText(toPosition, "Cold!", color(55))

return true

end




and not work =/
 
is a follows:
Code:
local TILE_SNOW = 670
local TILE_FOOTPRINT_I = 6594
local 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

    local rand = math.random(10)
    if(rand >= 8)
        doSendAnimatedText(toPosition, "Cold!", color(55))

	return true

end
and not work =/

Not color(55), only 55. (toPosition, "Cold!", 55)
 
You also missed an 'end' after doSendAnimatedText.
PHP:
local TILE_SNOW = 670
local TILE_FOOTPRINT_I = 6594
local 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

    local rand = math.random(10)
    if(rand >= 8)
        doSendAnimatedText(toPosition, "Cold!", 55)
	end
	
	return true
end
 
Back
Top