-Skrypt Samoch?d 8.6

Status
Zamknięty.

Mikaschi

Active User
Zarejestrowany
Dołączył
Marzec 26, 2009
Posty
116
Liczba reakcji
1
Witam. Poszukuje skryptu na samoch?d do tfs'a pod tibie 8.6

Z g?ry dzi?kuje za pomoc, wszystkie skrypty jakie znalaz?em nie dzia?aj? pod t? wersje tfs'a.
 
Odp: Samoch?d 8.6

nigdy takiego skryptu nie widzia?em ale ja bym zrobi? tak:
?ci?gn? bym sprites samochodu, zrobi?bym looktype i samoch?d na przyk?ad na czar lub komende ;d
 
Odp: Samoch?d 8.6

plik car.lua w talkactions/scripts :
[LUA]function onSay(cid, words, param)
local status =
{
isMoving = getPlayerStorageValue(cid, storages.isMoving),
direction = getPlayerStorageValue(cid, storages.direction),
speed = getPlayerStorageValue(cid, storages.speed)
}
local controls =
{
["up"] = {storage = storages.direction, new = 3, txt = "up"},
["down"] = {storage = storages.direction, new = 4, txt = "down"},
["left"] = {storage = storages.direction, new = 1, txt = "left"},
["right"] = {storage = storages.direction, new = 2, txt = "right"},
["speedup"] = {storage = storages.speed, new = status.speed - 50, txt = "fast"},
["speeddown"] = {storage = storages.speed, new = status.speed + 50, txt = "slow"},
["stop"] = {storage = storages.direction, new = -1, txt = "stop"}
}
if status.isMoving == 1 then
local ctrl = controls[param]
if ctrl then
setPlayerStorageValue(cid, ctrl.storage, ctrl.new)
doCreatureSay(cid, ctrl.txt, TALKTYPE_SAY)
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendCancel(cid, "Invalid operation.")
end
else
doPlayerSendCancel(cid, "You are not in a car.")
end
return TRUE
end[/LUA][/QUOTE]

to do movents/...
[LUA]local storages = {isMoving = 12550, direction = 12551, speed = 12552}

local SpeedMeter = {Default = 800, Max = 0, Min = 2500}

function tileChecker(pos, type_)
local myTable = {}
if (type(pos) == 'table') then
for i = 1, 5 do
pos.stackpos = i
local Thing = getThingFromPos(pos)
local thisID, thisUID = Thing.itemid, Thing.uid
if thisID > 1 then
if type_ == "itemID" then
table.insert(myTable, thisID)
elseif type_ == "itemUID" then
table.insert(myTable, thisUID)
end
end
end
end
return #myTable > 0 and myTable or nil
end

local function findItem(pos, t)
if (type(pos) == 'table' and type(t) == 'table') then
for _i, i in ipairs(tileChecker(pos, "itemID")) do
if isInArray(t, i) then
pos.stackpos = _i
ret = getThingFromPos(pos).uid
break
end
end
end
return ret
end

function moveCar(x)
if x.Dir ~= -1 then
doCreateItem(isInArray({1, 2}, x.Dir) == TRUE and 7267 or 7266, 1, x.nPos)
doTeleportThing(x.cid, x.nPos, FALSE)
doRemoveItem(findItem(x.pos, {7266, 7267}))
end
end

function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
local status =
{
isMoving = getPlayerStorageValue(cid, storages.isMoving),
direction = getPlayerStorageValue(cid, storages.direction),
speed = getPlayerStorageValue(cid, storages.speed)
}[/LUA]

no i wpisy :p

[LUA]<movevent type="StepIn" itemid="7267" event="script" value="car.lua"/>[/LUA]

i drugi :
[LUA]<talkaction words="car" script="car.lua"/>[/LUA]
Znalaz?em ten skrypt, ale nie dzia?a bo auto nie chce jecha? chocia? nie wywala ?adnych b??d?w w konsoli ;/
 
Status
Zamknięty.
Back
Do góry