local CAR_ID = {7266, 7267, 7266, 7267}
function onStepIn(cid, item, pos, frompos)
if isPlayer(cid) == TRUE then
if getPlayerVocation(cid) <= 4 then
doTeleportThing(cid, frompos)
return doPlayerSendTextMessage(cid, 27, "You need to be master sorcerer, elder druid, royal paladin or elite knight.")
end
local carpos = getThingPos(item.uid)
addEvent(carMove, 300, {cid = cid, oldpos = carpos})
end
end
function carMove(param)
local car = getThingfromPos(param.oldpos)
local newpos = getPlayerLookPos(param.cid)
if getDistanceBetween(getThingPos(param.cid), param.oldpos) == 0 then
if isInArray(CAR_ID, car.itemid) == TRUE then
local tmp = newpos
tmp.stackpos = 253
if doTileQueryAdd(car.uid, newpos) == 1 and getTilePzInfo(newpos) == FALSE and isCreature(getThingFromPos(tmp).uid) == FALSE then
local carid = CAR_ID[getPlayerLookDir(param.cid)+1]
local newcar = doCreateItem(carid, 1, newpos)
doSetItemActionId(newcar, car.actionid)
doSetItemSpecialDescription(newcar, car.description)
doRemoveItem(car.uid, 1)
doTeleportThing(param.cid, newpos, FALSE)
doSendMagicEffect(param.oldpos, CONST_ME_GROUNDSHAKER)
end
end
end
return TRUE
end
Testa isso, algum erro me contate



info
Grupo: Visconde
Registrado: 19/08/10
Posts: 379
Reputação: +161
Gênero: Masculino
Char no Tibia: Hexagrama
Oi, tenho um script de car system, pra quem nao sabe voce vai no item id 7266 e anda como um carro, ok vamos ao que interreça
o Script é esse:
Queria que apenas players com promotion 5, 6, 7 e 8 (elder druid, master sorcerer, elite knight e royal paladin) podessem usar esse carro, teria como alguém me ajudar?
Errei o nome, desculpe, o correto seria [PEDIDO] Script Promotion.