• 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] doTeleportThing

Joined
Jun 29, 2010
Messages
151
Reaction score
7
Witajcie.
Mam sobie taki skrypcik:
Lua:
local fix = {
	[8641] = { x = 1005, y = 999, z = 7 }, -- Temple
	[8642] = { x = 1005, y = 999, z = 7 }, -- Tomb, z = 9
	[8643] = { x = 1005, y = 999, z = 7 } -- Tomb, z = 10
}

function onStepIn(cid, item)
	if(isPlayer(cid) and fix[item.actionid])then
		doTeleportThing(cid, fix[item.actionid], true)
	end
end
I chcę dodać do niego taką opcję, że po stanięciu na kratką z danym ACTIONID oprócz teleportu gracz obróci się 'twarzą' w odpowiednią stronę... podpowie ktoś jak albo edytuje mój skrypt? :p

Aa i jeszcze pytanie:
Code:
doTeleportThing(cid, fix[item.actionid], true)
Co w powyższym czyni true lub false na końcu?

Dzięki,
Pozdro!
 
Witajcie.
Aa i jeszcze pytanie:
Code:
doTeleportThing(cid, fix[item.actionid], true)
Co w powyższym czyni true lub false na końcu?
Dzięki,
Pozdro!
Code:
doTeleportThing(cid, newpos[, pushMove = true[, fullTeleport = true]])
 
a ja tez mam takie pytanko...

czy funkcja "doCreatureAddMana" zadziala tez negatywnie, tzn odejmie mane?
 
Tak lepiej pierdlnac na forum niz to sprawdzic, nawet jak ma sie to zamiar wykorzystac.

Tak, zadziala.
 
Lua:
local fix = {
	[8641] = { x = 1005, y = 999, z = 7, tpType = false, dir = NORTH }, -- Temple
	[8642] = { x = 982, y = 968, z = 10, tpType = true, dir = SOUTH }, -- Tomb
	[8643] = { x = 982, y = 986, z = 9, tpType = true, dir = SOUTH } -- Tomb
}

function onStepIn(cid, item)
	if(isPlayer(cid) and fix[item.actionid])then
		doTeleportThing(cid, fix[item.actionid], [item.actionid][tpType])
		doCreatureSetLookDirection(cid, [item.actionid][dir])
	end
end
To jest dobrze napisane?
 
Lua:
local fix = {
	[8641] = { x = 1005, y = 999, z = 7, tpType = false, dir = NORTH }, -- Temple
	[8642] = { x = 982, y = 968, z = 10, tpType = true, dir = SOUTH }, -- Tomb
	[8643] = { x = 982, y = 986, z = 9, tpType = true, dir = SOUTH } -- Tomb
}

function onStepIn(cid, item)
	if(isPlayer(cid) and fix[item.actionid])then
		doTeleportThing(cid, fix[item.actionid], [item.actionid][tpType])
		doCreatureSetLookDirection(cid, [COLOR="red"]fix[/COLOR][item.actionid][dir])
	end
end
 
Lua:
local fix = {
	[8641] = { x = 1005, y = 999, z = 7, tpType = false, dir = NORTH }, -- Temple
	[8642] = { x = 982, y = 968, z = 10, tpType = true, dir = SOUTH }, -- Tomb
	[8643] = { x = 982, y = 986, z = 9, tpType = true, dir = SOUTH } -- Tomb
}
 
function onStepIn(cid, item)
	if(isPlayer(cid) and fix[item.actionid])then
		doTeleportThing(cid, fix[item.actionid], fix[item.actionid].tpType)
		doCreatureSetLookDirection(cid, fix[item.actionid].dir)
	end
end
 
Code:
local fix = {
	[8641] = { {x = 1005, y = 999, z = 7}, false, NORTH }, -- Temple
	[8642] = { {x = 982, y = 968, z = 10}, true, SOUTH }, -- Tomb
	[8643] = { {x = 982, y = 986, z = 9}, true, SOUTH } -- Tomb
}
 
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	local v = fix[item.itemid]
	if isPlayer(cid) and v then
		doTeleportThing(cid, v[1], v[2])
		doCreatureSetLookDirection(cid, v[3])
	end
	return true
end
 
Sorki, to ja się jebnąłem. Już wszystko działa - dzięki panowie.

Temat można zamknąć.
 
Tak lepiej pierdlnac na forum niz to sprawdzic, nawet jak ma sie to zamiar wykorzystac.

Tak, zadziala.

nie sprawdze bo nie mam zadnego silniku pod reka ; )
 
Back
Top