• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

po przesunieciu dzwigni teleportuje

Status
Not open for further replies.

tibiek

Banned User
Joined
Jun 3, 2009
Messages
320
Reaction score
0
Location
Poland
kto da skrypcik ze jak uzyje ten switch 1945 to mnie przeteleportuje do wspolrzednych jakie usatwie w skrypcie da sie wogole takie cos zrobic :p
jak tak to plz
 
edytuj annihilator questa
function onUse(cid, item, fromPosition, itemEx, toPosition)
local all_ready, monsters, player, level = 0, 0, {}, 0
if item.itemid == 1945 then
for i = 1, #players_pos do
table.insert(player, 0)
end
for i = 1, #players_pos do
player = getThingfromPos(players_pos)
if player.itemid > 0 then
if string.lower(playersOnly) == "yes" then
if isPlayer(player.uid) == TRUE then
all_ready = all_ready+1
else
monsters = monsters+1
end
else
all_ready = all_ready+1
end
end
end
if all_ready == #players_pos then
for i = 1, #players_pos do
player = getThingfromPos(players_pos)
if isPlayer(player.uid) == TRUE then
if getPlayerLevel(player.uid) >= questLevel then
level = level+1
end
else
level = level+1
end
end
if level == #players_pos then
if string.lower(playersOnly) == "yes" and monsters == 0 or string.lower(playersOnly) == "no" then
for _, area in pairs(monster_pos) do
doSummonCreature(area.monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]})
end
for i = 1, #players_pos do
doSendMagicEffect(players_pos, CONST_ME_POFF)
doTeleportThing(player.uid, new_player_pos, FALSE)
doSendMagicEffect(new_player_pos, CONST_ME_ENERGYAREA)
doTransformItem(item.uid,1946)
end
else
doPlayerSendTextMessage(cid,19,"Only players can do this quest.")
end
else
doPlayerSendTextMessage(cid,19,"All Players have to be level "..questLevel.." to do this quest.")
end
else
doPlayerSendTextMessage(cid,19,"You need "..table.getn(players_pos).." players to do this quest.")
end
elseif item.itemid == 1946 then
local player_room = 0
for x = room.fromX, room.toX do
for y = room.fromY, room.toY do
for z = room.fromZ, room.toZ do
local pos = {x=x, y=y, z=z,stackpos = 253}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
if isPlayer(thing.uid) == TRUE then
player_room = player_room+1
end
end
end
end
end
if player_room >= 1 then
doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.")
elseif player_room == 0 then
for x = room.fromX, room.toX do
for y = room.fromY, room.toY do
for z = room.fromZ, room.toZ do
local pos = {x=x, y=y, z=z,stackpos = 253}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
doRemoveCreature(thing.uid)
end
end
end
end
doTransformItem(item.uid,1945)
end
end
return TRUE
end
 
kto da skrypcik ze jak uzyje ten switch 1945 to mnie przeteleportuje do wspolrzednych jakie usatwie w skrypcie da sie wogole takie cos zrobic :p
jak tak to plz

Podstawy podstaw lua napisał byś to w około 5 linijkach.
 
ta no gdzie ja to sie na lua nie znam;/ to jak napisalo by sie w5 linijkach to napisz reput dla kazdego bedzie :)
 
Zarys.

Code:
[QUOTE]function onUse(cid, item, fromPosition, itemEx, toPosition)
doTeleportThing(cid, {}, false)
return true
end[/QUOTE]
 
yy zarys moze i dobry ale nie mam poejcia bez kitu co pisac tam i gdzie :O
 
yy zarys moze i dobry ale nie mam poejcia bez kitu co pisac tam i gdzie :O

jak nie wiesz o co chdozi to porostu edytuj pozycje w tym skrypcie co podałem wyżej i zmień ilość potrzebnych osób do teleportnięcia
 
No to się nie zajmuj OTSami, proste - jeśli nie potrafisz zrozumieć podstaw, a co gorsza, nie kwapisz się , aby usiąść i poczytać trochę o LUA w OT to jesteś przegrany na starcie.
 
ej kuna jak ja juz otsy robie tyko nie robie swoich skryptow nie robilem a tera chcialem sie troche poduczyc dalbys mi gotowca to ja bym go sobie przestudiowal :)
 
LUA:
local pos = { x = 0, y = 0, z = 7 }

function onUse(cid)
	return doTeleportThing(cid, pos, TRUE)
end

sorry chłopaki xd
 
ta takie cos nie bedzie dzialac bo ja chce jak sie przesunie dzwignie dopiero teleport a tu nic o id ani uniqeid nie ma wspomniane ;/
 
kurna spokojniej nie dziala ten skrypcik twoj tam nic nie ma prawie biore dziwgnia i nie ma reakcji przecie wymyslone uid nie moze chyba byc
 
jak w tym skrypcie nic nie ma praktycznie aby wspolrzedne ;/
 
Status
Not open for further replies.
Back
Top