mial123
Advanced User
- Joined
- Apr 2, 2009
- Messages
- 307
- Reaction score
- 24
Witam, szukam skryptu na winde, jednak nie znalaz?em takiego jakiego bym chcia?, mam skrypt kt?ry chcia?bym poprawi? ?eby w?a?nie dzia?a? jak winda, powinien: zabiera? wszystkich ludzi z pozycji XYZ x XYZ(danego obszaru) po naduszeniu przycisku, tp po kolei na pietra, wy?wietla? komunikat kt?re to pi?tro(+je?eli to mo?liwe, mo?liwo?? wyj?cia na danym pietrze[nie wymagane]), za pomoc oczywi?cie Rep+ :d
[LUA]local config =
{
positions =
{
[1] = {x = 932, y = 1066, z = 7},
[2] = {x = 932, y = 1065, z = 8},
[3] = {x = 932, y = 1065, z = 9},
[4] = {x = 933, y = 1067, z = 7}
},
timeToTeleport = 5,
freezAfterTeleport = false
}
local function teleportAfterTime(cid, i)
if(i == 0) then
if(config.freezAfterTeleport == true) then
doCreatureSetNoMove(cid, false)
end
return true
end
if(config.freezAfterTeleport == true) then
doCreatureSetNoMove(cid, true)
end
doTeleportThing(cid, config.positions)
addEvent(teleportAfterTime, config.timeToTeleport * 1000, cid, i-1)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(isPlayer(itemEx.uid) == false or getCreatureName(cid) ~= getCreatureName(itemEx.uid)) then
return false
end
teleportAfterTime(cid, #config.positions)
return true
end
[/LUA]
[LUA]local config =
{
positions =
{
[1] = {x = 932, y = 1066, z = 7},
[2] = {x = 932, y = 1065, z = 8},
[3] = {x = 932, y = 1065, z = 9},
[4] = {x = 933, y = 1067, z = 7}
},
timeToTeleport = 5,
freezAfterTeleport = false
}
local function teleportAfterTime(cid, i)
if(i == 0) then
if(config.freezAfterTeleport == true) then
doCreatureSetNoMove(cid, false)
end
return true
end
if(config.freezAfterTeleport == true) then
doCreatureSetNoMove(cid, true)
end
doTeleportThing(cid, config.positions)
addEvent(teleportAfterTime, config.timeToTeleport * 1000, cid, i-1)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(isPlayer(itemEx.uid) == false or getCreatureName(cid) ~= getCreatureName(itemEx.uid)) then
return false
end
teleportAfterTime(cid, #config.positions)
return true
end
[/LUA]