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

Problem zawasowane skrypty

redbull915

I learn...
Joined
Oct 10, 2008
Messages
235
Reaction score
0
Location
Poland/Radom
mam prozbe do ludzi znajacych sie dobrze na skryptach mam problem z dwoma skryptami uzywam TFs 0.3b1pl2
1 nie teleportuje mnie tam gdzie powino
Code:
function onAddItem(moveitem, tileitem, pos)
newpos = {x=1114, y=1140, z=10}
cidtile1 = {x=pos.x, y=pos.y+1, z=pos.z, stackpos=253}
cidtile2 = {x=pos.x+1, y=pos.y+1, z=pos.z, stackpos=253}
cid1 = getThingfromPos(cidtile1)
cid2 = getThingfromPos(cidtile2)

if tileitem.uid == 10200 then
	   if moveitem.itemid == 2025 and moveitem.type == 2 and cid1.uid > 0 and cid2.uid ~= cid1.uid then
      doRemoveItem(moveitem.uid, 1)
      doSendMagicEffect(pos,13)
      doTeleportThing(cid1.uid,newpos)
      doSendMagicEffect(newpos,10)
elseif tileitem.uid == 10200 then
	   if moveitem.itemid == 2025 and moveitem.type == 2 and cid1.uid ~= cid2.uid and cid2.uid > 0 then
      doRemoveItem(moveitem.uid, 1)
      doSendMagicEffect(pos,13)
      doTeleportThing(cid2.uid,newpos)
      doSendMagicEffect(newpos,10)
else
doSendMagicEffect(pos,2)
doRemoveItem(moveitem.uid, 1)
end
end
end
end
2 to nie znajduje mi danego itemu ktory zostal podany
Code:
function onStepIn(cid, item, pos)
	BOOK_ID = 1970
	ACTION_ID = 10201 -- Actionid of the tile that teleport you if you have the Holy Tible
	if (item.actionid == 10201) then
		if (getPlayerItemCount(cid, 1970) ~= 1) then
			doTeleportThing(cid, {x=1114, y=1135, z=10})
		else
			doTeleportThing(cid, {x=1114, y=1140, z=10})
		end
	end
end

za pomoc dziekuje
 
Code:
function onStepIn(cid, item, pos)
    local BOOK_ID = 1970
    local ACTION_ID = 10201
    if(item.actionid == ACTION_ID) then
        if(getPlayerItemCount(cid, BOOK_ID) >= 1) then
            doTeleportThing(cid, {x = 1114, y = 1135, z = 10}, FALSE)
        else
            doTeleportThing(cid, {x = 1114, y = 1140, z = 10}, FALSE)
        end
    end
    return TRUE
end
 
Back
Top Bottom