Não conseguiu ver as imagens =[
- Fórum
- OTServ
- Recursos
- Scripting
- Mods, funções e outros
- Cart System (Andar de carrinho)
Cart System (Andar de carrinho)
Por Killua, 15 de abr. de 2014 em Mods, funções e outros
info
Grupo: Visconde
Registrado: 24/07/09
Posts: 356
Reputação: +28
Gênero: Masculino

info
Grupo: Herói
Registrado: 12/06/12
Posts: 1k
Reputação: +362
Gênero: Masculino
Char no Tibia: Aarow

Não conseguiu ver as imagens =[
As imagens ainda não foram postadas.
info
Grupo: Conde
Registrado: 03/06/08
Posts: 508
Reputação: +149

Muito bom, bem feito e bem explicado ótimo script.
info
Grupo: Marquês
Registrado: 16/06/07
Posts: 1.2k
Reputação: +377
Gênero: Masculino
Char no Tibia: Nenhum

É o melhor sistema gay que eu já vi! Parabéns
info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem

Já coloquei a imagem de exemplo ![]()
info
Grupo: Herói
Registrado: 12/06/12
Posts: 1k
Reputação: +362
Gênero: Masculino
Char no Tibia: Aarow

Ótimo Sistema sabe por que sei ?
#Eu Estive La ![]()
Gostei Muito Do systema Esse Lek e D+ Nota 10000
info
Grupo: Banidos
Registrado: 08/01/13
Posts: 105
Reputação: +19
Char no Tibia: LordParaibano

Muito bom >.< seria legal um trem em no lugar do "carrinho" ficaria show \o/





info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem
Olá amigos, nessa terça venho trazer um mod que criei... É aquele sistema que o carrinho vai andando com vc. Para ver os outros scripts de terça, clique aqui.
Explicando:
Os caminhos são definidos pelo ot admin, ou seja, o player não poderá andar livremente. Enquanto estiver no carrinho, o jogador não poderá logar, entrar em batalha e nem andar.
Instalando:
Crie Killua Cart System.xml em data/mods e coloque esse código:
<?xml version="1.0" encoding="UTF-8"?> <mod name="Walking Cart System" version="1.0" author="Killua (Vitor Bertolucci)" enabled="yes"> <config name="cartSystem"><![CDATA[ interval = 500 --============================================================= --== Walking Cart System, created by Killua (Vitor Bertolucci)= --== If you are planning to post this code, please contact me = --== first and/or keep my name in it ===== --== Based on TFS 0.4 ===== --== Created on 14/04/2014 (April 14th 2014) ===== --============================================================= --------------------------------------------------------------- --==================[[INSTRUCTIONS (read it)]]================= --== Action ID 5191 means NORTH ===== --== Action ID 5192 means EAST ===== --== Action ID 5193 means SOUTH ===== --== Action ID 5194 means WEST ===== --== Action ID 5195 means STOP ===== --== interval means the interval between car step(1000=1s)===== --== CHANGE interval VARIABLE IN THE TOP OF THE CODE ===== --============================================================= function moveCart(cid, dir) local sto_ = getPlayerStorageValue(cid, 1212123) if isInArray({0, 1, 2, 3}, dir) and sto_ == dir then local pos = getCreaturePosition(cid) if dir == 0 then doTeleportThing(cid, {x = pos.x, y = pos.y - 1, z = pos.z}, false) elseif dir == 1 then doTeleportThing(cid, {x = pos.x + 1, y = pos.y, z = pos.z}, false) elseif dir == 2 then doTeleportThing(cid, {x = pos.x, y = pos.y + 1, z = pos.z}, false) elseif dir == 3 then doTeleportThing(cid, {x = pos.x - 1, y = pos.y, z = pos.z}, false) end addEvent(moveCart, interval, cid, dir) end end ]]></config> <event type="login" name="cartsLogin" event="script"><![CDATA[ domodlib('cartSystem') function onLogin(cid) registerCreatureEvent(cid, "cartsStats") registerCreatureEvent(cid, "cartsCombat") if getPlayerStorageValue(cid,1212123) ~= -1 then setPlayerStorageValue(cid,1212123, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end ]]></event> <event type="combat" name="cartsCombat" event="script"><![CDATA[ domodlib('cartSystem') function onCombat(cid, target) if getPlayerStorageValue(cid, 1212123) ~= -1 then return false end return true end ]]></event> <event type="statschange" name="cartsStats" event="script"><![CDATA[ domodlib('cartSystem') function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 1212123) ~= -1 and type == 1 then return false end return true end ]]></event> <event type="logout" name="cartsLogout" event="script"><![CDATA[ domodlib('cartSystem') function onLogout(cid) if getPlayerStorageValue(cid, 1212123) ~= -1 then doPlayerSendCancel(cid, "You may not logout during your cart walking experience") return false end return true end ]]></event> <movement type="StepIn" actionid="5191;5192;5193;5194;5195" event="script"><![CDATA[ domodlib('cartSystem') function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if item.actionid == 5191 then doSetItemOutfit(cid, 7132) mayNotMove(cid, true) doPlayerSendTextMessage(cid, 20, "Moving North...") doPlayerSetStorageValue(cid, 1212123, 0) addEvent(moveCart, interval, cid, 0) elseif item.actionid == 5192 then doSetItemOutfit(cid, 7131) mayNotMove(cid, true) doPlayerSendTextMessage(cid, 20, "Moving East...") doPlayerSetStorageValue(cid, 1212123, 1) addEvent(moveCart, interval, cid, 1) elseif item.actionid == 5193 then doSetItemOutfit(cid, 7132) mayNotMove(cid, true) doPlayerSendTextMessage(cid, 20, "Moving South...") doPlayerSetStorageValue(cid, 1212123, 2) addEvent(moveCart, interval, cid, 2) elseif item.actionid == 5194 then doSetItemOutfit(cid, 7131) mayNotMove(cid, true) doPlayerSendTextMessage(cid, 20, "Moving West...") doPlayerSetStorageValue(cid, 1212123, 3) addEvent(moveCart, interval, cid, 3) elseif item.actionid == 5195 then mayNotMove(cid, false) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, 20, "You have reached your destiny, you may leave now...") doPlayerSetStorageValue(cid, 1212123, -1) end return true end]]></movement> </mod>Configurando:
Simplesmente coloque action ID 5191 no piso que player deve pisar para começar a andar para o NORTE;
action ID 5192 para LESTE (direita);
action ID 5193 para SUL;
action ID 5194 para OESTE (esquerda);
action ID 5195 para o player parar de andar e sair do carrinho.
Seguem imagem de exemplo:
Editado Abril 15 por Killua