582240 39 Postado Agosto 1, 2011 Share Postado Agosto 1, 2011 (editado) Itrodução: Bom o titulo e o video ja disem td ne? Videos: http://www.youtube.com/watch?v=3piYf0ieD2E Mais deveria ser assim veja: Sistema: <action itemid="7131" event="script" value="railbymock.lua" /> <action itemid="7134" event="script" value="railbymock.lua" /> --Script by mock the bear--Configlocal SPEED = 200local PLAYERSPEED = 250--Endlocal RAILS = {7121, 7122, 7123, 7124, 7125, 7126, 7127, 7128, 7129, 7130} --Thxy rails itemid by nord local CART = {[0] = 7132, [2] = 7132, [3] =7131, [1] =7131}local CONFIG = { [7121] = 0,[7122] = 0, [7123] = {EAST, SOUTH}, [7124] = {WEST, SOUTH}, [7125] = {EAST, NORTH}, [7126] = {WEST, NORTH}, [7127] = 0,[7128] = 0, [7129] = 0,[7130] = 0, --Random}local reverse = {[0] = 2, 3, 0, 1} -- All that table was made by nord.local function moveTrain(cid, frompos, direc) local tab if not isPlayer(cid) then return end local pos = getCreaturePosition(cid) local rar = findRail(pos) if not rar then doPlayerSetNoMove(cid, false) doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -PLAYERSPEED) doMoveCreature(cid, direc) else tab = CONFIG[rar] if tab and type(tab) == 'table' then direc = tab[tab[1] == reverse[direc] and 2 or 1] -- by nord here end doSetItemOutfit(cid, CART[direc], -1) doMoveCreature(cid, direc) addEvent(moveTrain, SPEED, cid, pos,direc) endendfunction findRail(p) local p_ = {x=p.x, y=p.y, z=p.z} for i=0,10 do p_.stackpos = i local t = getTileThingByPos(p_) if isInArray(RAILS, t.itemid) then return t.itemid,t.uid end endendfunction onUse(cid, item, frompos) --Script by mock the bear if hasCondition(cid, CONDITION_OUTFIT) or (item.actionid < 500 and item.actionid > 503) then return false end doTeleportThing(cid, frompos, false) doPlayerSetNoMove(cid, true) doChangeSpeed(cid, PLAYERSPEED) addEvent(moveTrain, SPEED, cid, frompos, item.actionid-500) return trueend Prêmio: 1 Rep++ Verssão: Tibia 8.6 Editado Agosto 1, 2011 por 582240 Link para o comentário https://xtibia.com/forum/topic/163567-porfavor-me-ajuda-bug-no-train-system-do-mock/ Compartilhar em outros sites More sharing options...
582240 39 Postado Agosto 5, 2011 Autor Share Postado Agosto 5, 2011 @up Link para o comentário https://xtibia.com/forum/topic/163567-porfavor-me-ajuda-bug-no-train-system-do-mock/#findComment-1079828 Compartilhar em outros sites More sharing options...
peckets 0 Postado Agosto 28, 2011 Share Postado Agosto 28, 2011 Olá Amigo , Modifique o Script do rallbymock por esse que vai pegar .. o tags são os mesmos.. : --Script by mock the bear--Config local SPEED = 100 local PLAYERSPEED = 200 --End local RAILS = {7121, 7122, 7123, 7124, 7125, 7126, 7127, 7128, 7129, 7130} --Thxy rails itemid by nord <img src="images/smilies/tongue.gif" style="vertical-align: middle;" border="0" alt="Tongue" title="Tongue" /> local CART = {[0] = 7132, [2] = 7132, [3] =7131, [1] =7131} local CONFIG = { [7121] = 0,[7122] = 0, [7123] = {EAST, SOUTH}, [7124] = {WEST, SOUTH}, [7125] = {EAST, NORTH}, [7126] = {WEST, NORTH}, [7127] = 0,[7128] = 0, [7129] = 0,[7130] = 0, --Random } local reverse = {[0] = 2, 3, 0, 1} -- All that table was made by nord. local function moveTrain(cid, frompos, direc) local tab if not isPlayer(cid) then return end local pos = getCreaturePosition(cid) local rar = findRail(pos) if not rar then doPlayerSetNoMove(cid, false) doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -PLAYERSPEED) doMoveCreature(cid, direc) else tab = CONFIG[rar] if tab and type(tab) == 'table' then direc = tab[tab[1] == reverse[direc] and 2 or 1] -- by nord here end doSetItemOutfit(cid, CART[direc], -1) doMoveCreature(cid, direc) addEvent(moveTrain, SPEED, cid, pos,direc) end end function findRail(p) local p_ = {x=p.x, y=p.y, z=p.z} for i=0,10 do p_.stackpos = i local t = getTileThingByPos(p_) if isInArray(RAILS, t.itemid) then return t.itemid,t.uid end end end function onUse(cid, item, frompos) --Script by mock the bear if hasCondition(cid, CONDITION_OUTFIT) or (item.actionid < 500 and item.actionid > 503) then return false end doTeleportThing(cid, frompos, false) doPlayerSetNoMove(cid, true) doChangeSpeed(cid, PLAYERSPEED) addEvent(moveTrain, SPEED, cid, frompos, item.actionid-500) return true end Ajudei ? RP + !! Link para o comentário https://xtibia.com/forum/topic/163567-porfavor-me-ajuda-bug-no-train-system-do-mock/#findComment-1093233 Compartilhar em outros sites More sharing options...
582240 39 Postado Agosto 30, 2011 Autor Share Postado Agosto 30, 2011 ok irei teestar se funcionar leva meu tanks nem funcionou cara :S Link para o comentário https://xtibia.com/forum/topic/163567-porfavor-me-ajuda-bug-no-train-system-do-mock/#findComment-1094448 Compartilhar em outros sites More sharing options...
peckets 0 Postado Setembro 3, 2011 Share Postado Setembro 3, 2011 Tente Mudar o Tag do Action por esse : <action itemid="7131" event="script" value="railbymock.lua" /> <action itemid="7132" event="script" value="railbymock.lua" /> Link para o comentário https://xtibia.com/forum/topic/163567-porfavor-me-ajuda-bug-no-train-system-do-mock/#findComment-1096670 Compartilhar em outros sites More sharing options...
582240 39 Postado Setembro 3, 2011 Autor Share Postado Setembro 3, 2011 @Peckets o bug está no script e n no xml eu ja testei para provar e n deu certo Link para o comentário https://xtibia.com/forum/topic/163567-porfavor-me-ajuda-bug-no-train-system-do-mock/#findComment-1096785 Compartilhar em outros sites More sharing options...
Posts Recomendados