
leonardobo
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
leonardobo recebeu reputação de felippepsa em A Database Errornewsticker.sql
Vai no seu localhost/phpmyadmin clica na sua database vai em Importar e já era seja feliz !
-
leonardobo recebeu reputação de acesso123 em Adicionar itens.Um vamos ver:
Primeiramente baixe isso:
https://www.mediafire.com/?7mqta5oafraqo6e
Depois extraia abra a pasta descompilada e jogue seu Tibia.dat e Tibia.spr dentro da pasta do OTItemEditor 854.
Feito isso abra o otitemeditor.exe vá em data/items abra o arquivo items.otb abrira todas sprite de itens do seu server.
Clique no +Other vai abrir milhares de sprites, você desce na ultima no caso a minha é 11389 a sua pode ser diferente, clique em tools la encima depois em Add Item.
Feito isso voltara no inicio clique no +Other novamente, vá até no final note que criou um novo item para ser editado no caso o meu era 11389 criou o 11390 e esta todo em branco.
Vai aparecer uma janela você clique em cid e digita o ItemType da sua sprite no caso a minha é 10482 depois marque a caixinha Pickupable (Somente ela pois se marcar outra coisa sem saber pode bugar seu item) vá em File depois em Save as e salva o seu item.otb encima do outro.
Pronto seu item ta criado ops mais espera ai, ainda falta a parte escrita
Abra a pasta data/items abre o arquivo items.xml
Feito isso Copie esse código e cola ai no seu items.xml
<item id="11390" article="a" name="Goku Armor"> <attribute key="description" value="Health/Mana Increase 5k" /> <attribute key="weight" value="3500" /> <attribute key="armor" value="20" /> <attribute key="manaGain" value="5000" /> <attribute key="healthGain" value="5000" /> <attribute key="showattributes" value="1" /> <attribute key="slotType" value="body" /> </item> SlotTypes meio traduzidos
head = CAPACETE necklace = LOCAL AONDE COLOCA AOL backpack = MOCHILA armor - LOCAL AONDE FICA A ARMADURA right-hand = MÃO DIREITA left-hand = MÃO ESQUERDA two-handed, = ARMA DE DUAS MÃOS hand/shield = MÃO / ESCUDO legs = CALÇA feet = BOTA ring = REGIÃO AONDE COLOCA RING ammo = MUNIÇÃO Explicações:
ItemID = Item do ID Criado no OTItemEditor Name = Nome do item desejado Description = Descrição do item Weigth = Peso do item Armor = Arm do item ManaGain = Quantidade de Mana Aumentada do Personagem HealthGain = Quantidade de Vida Aumentada do Personagem ShowAttributes = 1 Mostrar Atributos do item [Magic Level, Skills e outros atributos como absorb] SlotType = Local que o item vai ficar -
leonardobo recebeu reputação de lucas1 em [Talkaction] PrenderA pedido de um carinha do fórum no PM eu decidi fazer o script.
Como Funciona:
http://youtu.be/08o9uoM6bQA
Em data/talkactions/scripts crie um arquivo chamado prisiontp.lua e adicione o seguinte código:
--[[ By leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !prender Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end pos = {x=1017, y=1034, z=7} -- POSIÇÃO AONDE SERA TELEPORTADO. if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(pos, CONST_ME_TELEPORT) if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_WARNING, "Voce foi preso !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce prendeu ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions/scripts crie um arquivo chamado liberartp.lua e adicione o seguinte código:
--[[ By Enself = leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !liberar Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end local pos = getPlayerTown(tid) if(doTeleportThing(tid, getTownTemplePosition(pos), true) and not isPlayerGhost(tid)) then if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce foi liberado !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce liberou ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions em talkactions.xml adicione as seguintes tags:
<talkaction log="yes" words="/prender" access="5" event="script" value="prisiontp.lua"/> <talkaction log="yes" words="/liberar" access="5" event="script" value="liberartp.lua.lua"/>
Para configurar a posição, é no script prisiontp.lua, que no caso seria a sua prisão, o centro dela ou sei la.
{x=1017, y=1034, z=7}
Bom galera é o meu primeiro script, postado evidentemente e o meu primeiro vídeo, aceito criticas construtivas, Abraços.
-
leonardobo recebeu reputação de Jonnieh em (Resolvido)Vocações no site NarutibiaFicou muito chiado mais e isso ai não sou bom com videos mas acho q da pra entender '-'
https://www.youtube.com/watch?v=2tT6DDQoz-0
-
leonardobo recebeu reputação de LoadingGo em Erro Ao Liga o ServidorEu nao entendo de POKEMON nunca tive servidor e nem vontade.
Pode me explicar se e por SQLITE ou MYSQL ? Com site ou sem site?
-
leonardobo deu reputação a Fir3element em (Resolvido)Player passando dentro do outroplayer.cpp, função canWalkthrough:
TFS 0.3.6:
TFS 0.4:
-
leonardobo deu reputação a zipter98 em [SPELL] Magia De Trap em Arealocal config = { wallArea = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, effect = xxx, --Efeito. wallId = xxx, --ID da parede. time = 5, --Duração da parede. cooldown = {20, 10}, --{sucessCooldown, failCooldown}, chance = 30, --Chance da spell funcionar. storage = 9571, } function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosfromArea(cid, area) --by Dokmos icenter = math.floor(table.getn(area)/2)+1 jcenter = math.floor(table.getn(area[1])/2)+1 center = area[icenter] ivar = table.getn(area) jvar = table.getn(area[1]) i = table.getn(area)^2 j = table.getn(area[1])^2 local mydir = isCreature(getCreatureTarget(cid)) and getCreatureDirectionToTarget(cid, getCreatureTarget(cid)) or getCreatureLookDir(cid) setPlayerStorageValue(cid, 21101, -1) if center[jcenter] == 3 then if mydir == 0 then signal = {-1,1,1,2} elseif mydir == 1 then signal = {1,-1,2,1} elseif mydir == 2 then signal = {1,-1,1,2} elseif mydir == 3 then signal = {-1,1,2,1} end else signal = {-1,1,1,2} end POSITIONS = {} P = 0 repeat pvar = {0,0} I = area[ivar] J = I[jvar] i = i-1 j = j-1 if J == 1 then if jvar < jcenter then pvar[signal[3]] = signal[1]*math.abs((jcenter-jvar)) elseif jvar > jcenter then pvar[signal[3]] = signal[2]*math.abs((jcenter-jvar)) end if ivar < icenter then pvar[signal[4]] = signal[1]*math.abs((icenter-ivar)) elseif ivar > icenter then pvar[signal[4]] = signal[2]*math.abs((icenter-ivar)) end end if jvar > 1 then jvar = (jvar-1) elseif ivar > 1 then jvar = table.getn(area[1]) ivar = (ivar-1) end local pos = getThingPos(cid) local areapos = {x=pos.x+(pvar[1]),y=pos.y+(pvar[2]),z=pos.z} if pos.x ~= areapos.x or pos.y ~= areapos.y then P = P+1 POSITIONS[P] = areapos end until i <= 0 and j <= 0 return POSITIONS end function onCastSpell(cid) if getPlayerStorageValue(cid, config.storage) > os.time() then doPlayerSendCancel(cid, "Wait "..getPlayerStorageValue(cid, config.storage) - os.time().." second(s).") else if math.random(1, 100) > config.chance then doPlayerSendCancel(cid, "Your spell failed.") doSendAnimatedText(getThingPos(cid), "FAIL!", 215) setPlayerStorageValue(cid, config.storage, os.time() + config.cooldown[2]) else local positions = {} setPlayerStorageValue(cid, config.storage, os.time() + config.cooldown[1]) for _, pos in pairs(getPosfromArea(cid, config.wallArea)) do if isWalkable(pos) and not getTileInfo(pos).protection then doCreateItem(config.wallId, 1, pos) doSendMagicEffect(pos, config.effect) table.insert(positions, pos) end end if #positions > 0 then addEvent(function() for i = 1, #positions do local item = getTileItemById(positions[i], config.wallId).uid if item > 0 then doRemoveItem(item) end end end, config.time * 1000) end end end return true end
-
leonardobo recebeu reputação de ZwhiteDog em Spell cura mana e lifeEm Spells/Spells.xml adicione a seguinte tag:
<instant name="Hibrido" words="hibrido" lvl="10" mana="100" prem="0" aggressive="0" exhaustion="1000" needlearn="0" blockwalls="1" enabled="1" event="script" value="manavida.lua"> </instant> Em Spells/Scripts crie um arquivo chamado manavida.lua e adicione o seguinte código.
local vida = 500 local mana = 500 function onCastSpell(cid, var) doCreatureAddHealth(cid, vida) doCreatureAddMana(cid, mana) return true end Testei aqui pra ver se tava funcionando direitinho ta pegando deboa bem simples mesmo o script.
-
leonardobo deu reputação a Caronte em (Resolvido)[SPELL] TrapdoPlayerSendCancel(cid, "You are exhausted in Doton Doryu Heki for: "..(getPlayerStorageValue(cid, 2343) - os.time() ).." seconds.")
-
leonardobo deu reputação a Caronte em (Resolvido)[SPELL] Traplocal remove_time = 5 -- tempo em segundos para remover as magic wall local item_id = 5750 -- id da magic wall function onCastSpell(cid, var) if math.random(0, 100) <= 30 then if (getPlayerStorageValue(cid, 2343) - os.time()) < 0 then setPlayerStorageValue(cid, 2343, (os.time() + 15)) end return doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "You are exhausted in Doton Doryu Heki for: "..(getPlayerStorageValue(cid, 2343) - os.time() ).." seconds.") and false end if (getPlayerStorageValue(cid, 2343) - os.time()) > 0 then return doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "You are exhausted in Doton Doryu Heki for: "..(getPlayerStorageValue(cid, 2343) - os.time() ).." seconds.") and false end setPlayerStorageValue(cid, 2343, (os.time() + 30)) local pos = getThingPosition(getCreatureTarget(cid)) posTile1 = {x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1} posTile2 = {x=pos.x+1,y=pos.y,z=pos.z,stackpos=1} posTile3 = {x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1} posTile4 = {x=pos.x,y=pos.y-1,z=pos.z,stackpos=1} posTile5 = {x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1} posTile6 = {x=pos.x-1,y=pos.y,z=pos.z,stackpos=1} posTile7 = {x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1} posTile8 = {x=pos.x,y=pos.y+1,z=pos.z,stackpos=1} posAll = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8} for i=1, #posAll do if isWalkable(posAll[i]) then doCreateItem(item_id, 1, posAll[i]) end end addEvent(removeItem, remove_time*1000, posAll) return true end function isWalkable(pos, creature, pz, proj) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end local creature = getTopCreature(pos) if creature.type > 0 then return false end if getTilePzInfo(pos) and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function removeItem(posAll) for i=1, #posAll do for j=0, 255 do pos_stack = {x=posAll[i].x,y=posAll[i].y,z=posAll[i].z,stackpos=j} removeTile = getThingfromPos(pos_stack) if removeTile.itemid == item_id then doRemoveItem(removeTile.uid) end end end end Aqui ta pegando direito,
você quer que não fale as words ?
coloquei para não falar a magia.
-
leonardobo recebeu reputação de leozincorsair em (Resolvido)[PEDIDO] SpellEm data/spells/scripts crie um arquivo chamado power down.lua e coloque isso.
function onCastSpell(cid, var) local mana = getCreatureMana(cid) if doCreatureAddMana(cid, -mana) then if doPlayerAddSpentMana(cid, mana) then doSendMagicEffect(getCreaturePosition(cid), 14) return false else doCreatureAddMana(cid, mana) end end doSendMagicEffect(getCreaturePosition(cid), 2) return false end em data/spells/ spells.xml coloque a seguinte tag:
<instant name="Power Down" words="power down" lvl="1" mana="0" prem="0" aggressive= "0" exhaustion="1000" needlearn="0" blockwalls="1" enabled="1" event="script" value="power down.lua"> </instant> -
leonardobo recebeu reputação de Weeber em (Resolvido)[PEDIDO] SpellEm data/spells/scripts crie um arquivo chamado power down.lua e coloque isso.
function onCastSpell(cid, var) local mana = getCreatureMana(cid) if doCreatureAddMana(cid, -mana) then if doPlayerAddSpentMana(cid, mana) then doSendMagicEffect(getCreaturePosition(cid), 14) return false else doCreatureAddMana(cid, mana) end end doSendMagicEffect(getCreaturePosition(cid), 2) return false end em data/spells/ spells.xml coloque a seguinte tag:
<instant name="Power Down" words="power down" lvl="1" mana="0" prem="0" aggressive= "0" exhaustion="1000" needlearn="0" blockwalls="1" enabled="1" event="script" value="power down.lua"> </instant> -
leonardobo deu reputação a Gantz em [TFS 1.0] addCooldown(spellid, time) - getCooldown(spellid)Bom eu criei essas duas funções para usar no meu OT, elas forçam o uso do cooldown do sistema do tibia, você pode usa lo mesmo que não tenha executado nenhuma spell.
por exemplo:
player:addCooldown(87, 10000) sendo 87 o código da spell, ou seja a imagem que ira aparecer no cooldown, lembrando que estas imagens podem ser editadas no tibia.pic.
E 10000 o tempo do cooldown, lembrando a cada 1000 equivale a 1 segundo.
resultado:
e a função get ele retorna true ou false, para caso o cooldown estiver sendo executado:
player:getCooldown(87) Vamos la.
em luascript.cpp procure por:
registerMethod("Player", "getMoney", LuaScriptInterface::luaPlayerGetMoney); registerMethod("Player", "addMoney", LuaScriptInterface::luaPlayerAddMoney); registerMethod("Player", "removeMoney", LuaScriptInterface::luaPlayerRemoveMoney); e logo depois dessas linhas de códigos adicione:
registerMethod("Player", "addCooldown", LuaScriptInterface::luaPlayerAddCooldown); registerMethod("Player", "getCooldown", LuaScriptInterface::luaPlayerGetCooldown); ainda em luascript.cpp procure por:
int32_t LuaScriptInterface::luaPlayerRemoveMoney(lua_State* L) e após a ultima linha desta função adicione:
int32_t LuaScriptInterface::luaPlayerAddCooldown(lua_State* L) { // player:addCooldown(spellid, cooldown) Player* player = getUserdata<Player>(L, 1); if (player) { uint8_t spellId = getNumber<uint8_t>(L, 2); uint32_t cooldown = getNumber<uint32_t>(L, 3); Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, cooldown, 0, false, spellId); player->addCondition(condition); pushBoolean(L, true); } else { lua_pushnil(L); } return 1; } int32_t LuaScriptInterface::luaPlayerGetCooldown(lua_State* L) { // player:getCooldown(spellid) Player* player = getUserdata<Player>(L, 1); if (!player) { lua_pushnil(L); return 1; } uint32_t spellid = getNumber<uint32_t>(L, 2); if (player->hasCondition(CONDITION_SPELLCOOLDOWN, spellid)) { pushBoolean(L, true); } else { pushBoolean(L, false); } return 1; } agora em luascript.h procure por:
static int32_t luaPlayerGetMoney(lua_State* L); static int32_t luaPlayerAddMoney(lua_State* L); static int32_t luaPlayerRemoveMoney(lua_State* L); e logo após estes código adicione:
static int32_t luaPlayerAddCooldown(lua_State* L); static int32_t luaPlayerGetCooldown(lua_State* L); depois é só compilar e usar !
-
leonardobo recebeu reputação de 88105882 em Oque é 1 tfs? como saber qual tfs tem no meu ot?na inicialização eu acho que mostra a versão.
-
leonardobo deu reputação a Gantz em (Resolvido)[Pedido] Exiva Normal & Exiva Aguçadotesta ae amigo:
bool InstantSpell::SearchPlayer(const InstantSpell* spell, Creature* creature, const std::string& param) { Player* player = creature->getPlayer(); if(!player || player->isRemoved()) return false; Player* targetPlayer = NULL; ReturnValue ret = g_game.getPlayerByNameWildcard(param, targetPlayer); if(ret != RET_NOERROR || !targetPlayer || targetPlayer->isRemoved()) { player->sendCancelMessage(ret); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); return false; } if(targetPlayer->hasCustomFlag(PlayerCustomFlag_NotSearchable) && !player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)) { player->sendCancelMessage(RET_PLAYERWITHTHISNAMEISNOTONLINE); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); return false; } std::stringstream ss; const Position& pos = player->getPosition(); const Position& targetPos = targetPlayer->getPosition(); uint32_t distance = std::max(std::abs(pos.x - targetPos.x), std::abs(pos.y - targetPos.y)); if(pos.z != targetPos.z) distance = distance + 9 + 6; ss << targetPlayer->getName() << " " << g_game.getSearchString(player->getPosition(), targetPlayer->getPosition(), true, true) << " [" << distance << " sqm]"; player->sendTextMessage(MSG_INFO_DESCR, ss.str().c_str()); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_WRAPS_BLUE); return true; } -
leonardobo recebeu reputação de mateusmaia98 em (Resolvido)[Pedido] Exiva Normal & Exiva AguçadoBom estou aqui pra pedir um pedido que eu não achei em nenhum lugar bom é o seguinte.
No meu server eu pensei em uma ideia de colocar o exiva normal e o exiva aguçado, funciona da seguinte maneira:
Exiva Normal:
Se o player exivado estivesse a 100 SQM's ou mais de distancia, apareceria: 10:26 Jose is too far away.
Se o player exivado estivesse a 100 SQM's ou menos de distancia, apareceria: 10:26 Jose is far to the south-west.
Se o player exivado estivesse a 50 SQM's ou menos de distancia, apareceria: 10:26 Jose is to the south-west.
Exiva Aguçado:
Se o player exivado estiver a muitos SQM's a distancia, apareceria: 10:23 Jose is very far to the north-west [724 sqm]
Se o player exivado estiver a 100 SQM's ou menos de distancia, apareceria: 10:23 Jose is far to the north-west [99 sqm]
Se o player exivado estiver a 50 SQM's ou menos de distancia, apareceria: 10:23 Jose is to the north-west [49 sqm]
E assim vai de acordo com oque o player anda vai mudando os SQM de distancia a cada vez que usar o exiva.
Bom se alguém conseguir me ajudar ficarei muito grato, acho que é um pedido grande não sei, mas oque puderem fazer pra ajudar ta valendo, se não estiver bem explicado, comentem sua duvida sobre o pedido.
-
leonardobo recebeu reputação de Cain Jorge em [Talkaction] PrenderA pedido de um carinha do fórum no PM eu decidi fazer o script.
Como Funciona:
http://youtu.be/08o9uoM6bQA
Em data/talkactions/scripts crie um arquivo chamado prisiontp.lua e adicione o seguinte código:
--[[ By leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !prender Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end pos = {x=1017, y=1034, z=7} -- POSIÇÃO AONDE SERA TELEPORTADO. if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(pos, CONST_ME_TELEPORT) if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_WARNING, "Voce foi preso !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce prendeu ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions/scripts crie um arquivo chamado liberartp.lua e adicione o seguinte código:
--[[ By Enself = leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !liberar Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end local pos = getPlayerTown(tid) if(doTeleportThing(tid, getTownTemplePosition(pos), true) and not isPlayerGhost(tid)) then if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce foi liberado !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce liberou ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions em talkactions.xml adicione as seguintes tags:
<talkaction log="yes" words="/prender" access="5" event="script" value="prisiontp.lua"/> <talkaction log="yes" words="/liberar" access="5" event="script" value="liberartp.lua.lua"/>
Para configurar a posição, é no script prisiontp.lua, que no caso seria a sua prisão, o centro dela ou sei la.
{x=1017, y=1034, z=7}
Bom galera é o meu primeiro script, postado evidentemente e o meu primeiro vídeo, aceito criticas construtivas, Abraços.
-
leonardobo recebeu reputação de matheuspeixoto12 em (Resolvido)Editar esta spelllocal config = { --[[ [IDdaVocação] ~ NomeDoSummom No caso voce tera que colocar todas as vocations tipo: [30] = {"Gamabunta"}, [31] = {"Gamabunta"} Sempre a ultima voce deixa sem vírgula. ]]-- -- Naruto -- [1] = {"Gamabunta"}, -- Sasuke -- [2] = {"Manda"}, -- Sakura -- [3] = {"Katsuyu"} } function onCastSpell(cid, var) local playerpos = getPlayerPosition(cid) local position1 = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z} local position2 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} local MaximoSummon = 1 local summons = getCreatureSummons(cid) local voc = config[getPlayerVocation(cid)] if(table.maxn(summons) < MaximoSummon) then if voc then local clone1 = doCreateMonster(voc[1], playerpos) doConvinceCreature(cid, clone1) doSendMagicEffect(position1, 111) end return TRUE end end Simplifiquei.
-
leonardobo recebeu reputação de mateusmaia98 em [DUVIDA] EfeitosBom pessoal eu to com um servidor de Narutibia 8.60, atualmente eu migrei do 8.54 pro 8.60 por que tem mais recursos, e bom eu compilei até efeitos 254 no meu servidor só que eu tenho uma sprite 240 no meu servidor, mas não é só ela, quando uso como spell o servidor não lê ela não entendo o por que ? Mesmo eu adicionando nas lib/constant e nas sources não le nem o /z e nem as sprites não funciona, não sei se tem a haver mais com o Object Builder eu transformei o Client 8.54 e compilei na versão 8.60 v1 e v2 testei as duas e não deram certo alguém pode me salvar?
Bom lembrando acho que não tem nada a ver com as sources, por que a compilação foi um sucesso help-me PLEASE.
-
leonardobo recebeu reputação de TsplayerT em (Resolvido)Não Consigo Usar Item! - URGENTEhttps://www.youtube.com/watch?v=Noexr-FXsLM&feature=youtu.be
-
leonardobo recebeu reputação de Cook em (Resolvido)[PEDIDO] SCRIPT !Em data/actions/scripts crie um arquivo chamado itemlevel.lua e adicione o seguinte código:
function onUse(cid, item) local config = { leveladd = 300, -- Quantidade de level ao clicar no item. item = 11389, -- ID do item Usado. tempo = 10, -- Tempo para usar novamente caso não queira deixa um zero storage = 241123 } if os.time() - getPlayerStorageValue(cid, config.storage) >= config.tempo then doPlayerSetStorageValue(cid, config.storage, os.time()) else doPlayerSendCancel(cid, "Voce so pode usar apos "..(config.tempo - (os.time() - getPlayerStorageValue(cid, config.storage))).." segundos.") return true end doPlayerAddLevel(cid, config.leveladd) doRemoveItem(item.uid, 1) return true end em data/actions no arquivo actions.xml adicione a seguinte tag:
<action itemid="1138" script="itemlevel.lua"/> ItemID é o ID do item que você vai usar para executar a função.
Função do Script:
Ao usar sera acrescentado +300 leveis no player que utilizou o item, o item sera removido, e se o player tentar usar novamente terá um Tempo de 10 segundos.
OBS: Eu testei e funciono perfeitamente aqui.
Abraços,
Se quiser o script de outra forma, diga que eu faço, se ajudei deixa aquele gostei e melhor resposta ai .
-
leonardobo recebeu reputação de mini45 em [Talkaction] PrenderA pedido de um carinha do fórum no PM eu decidi fazer o script.
Como Funciona:
http://youtu.be/08o9uoM6bQA
Em data/talkactions/scripts crie um arquivo chamado prisiontp.lua e adicione o seguinte código:
--[[ By leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !prender Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end pos = {x=1017, y=1034, z=7} -- POSIÇÃO AONDE SERA TELEPORTADO. if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(pos, CONST_ME_TELEPORT) if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_WARNING, "Voce foi preso !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce prendeu ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions/scripts crie um arquivo chamado liberartp.lua e adicione o seguinte código:
--[[ By Enself = leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !liberar Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end local pos = getPlayerTown(tid) if(doTeleportThing(tid, getTownTemplePosition(pos), true) and not isPlayerGhost(tid)) then if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce foi liberado !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce liberou ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions em talkactions.xml adicione as seguintes tags:
<talkaction log="yes" words="/prender" access="5" event="script" value="prisiontp.lua"/> <talkaction log="yes" words="/liberar" access="5" event="script" value="liberartp.lua.lua"/>
Para configurar a posição, é no script prisiontp.lua, que no caso seria a sua prisão, o centro dela ou sei la.
{x=1017, y=1034, z=7}
Bom galera é o meu primeiro script, postado evidentemente e o meu primeiro vídeo, aceito criticas construtivas, Abraços.
-
leonardobo recebeu reputação de Teuzin em [URGENTE] Dev-C++Bom galera estou tentando compilar ja tentei muitas sources mas acho que o problema é no programa.
Bom meu Windows é o Windows 7 64 bits ja usei 2 Devs e um completo passado pelo meu amigo e falo que estava com todas as libs para compilar.
e acontece o que não estava acontecendo ao apertar Alt+P ou ir em Project > Project Options acontece isso.
Lembrando os dois Dev's testados são 64 bits
E os outros error's são quando vou compilar a source, não é a source por que já testei varias.
Segundo error no Compiler Log caso precise.
Alguém me ajuda por favor é urgente.
-
leonardobo recebeu reputação de Pinduca da RBC em [Talkaction] PrenderA pedido de um carinha do fórum no PM eu decidi fazer o script.
Como Funciona:
http://youtu.be/08o9uoM6bQA
Em data/talkactions/scripts crie um arquivo chamado prisiontp.lua e adicione o seguinte código:
--[[ By leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !prender Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end pos = {x=1017, y=1034, z=7} -- POSIÇÃO AONDE SERA TELEPORTADO. if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(pos, CONST_ME_TELEPORT) if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_WARNING, "Voce foi preso !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce prendeu ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions/scripts crie um arquivo chamado liberartp.lua e adicione o seguinte código:
--[[ By Enself = leonardobo Diretamente para o Tibia King. http://www.tibiaking.com/forum/index ]]-- function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de um nome Exemplo: !liberar Joao") return true end local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " nao encontrado.") return true end end local pos = getPlayerTown(tid) if(doTeleportThing(tid, getTownTemplePosition(pos), true) and not isPlayerGhost(tid)) then if tid then doPlayerSendTextMessage(tid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce foi liberado !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce liberou ".. getPlayerName(tid) ..". ") end end return true end Em data/talkactions em talkactions.xml adicione as seguintes tags:
<talkaction log="yes" words="/prender" access="5" event="script" value="prisiontp.lua"/> <talkaction log="yes" words="/liberar" access="5" event="script" value="liberartp.lua.lua"/>
Para configurar a posição, é no script prisiontp.lua, que no caso seria a sua prisão, o centro dela ou sei la.
{x=1017, y=1034, z=7}
Bom galera é o meu primeiro script, postado evidentemente e o meu primeiro vídeo, aceito criticas construtivas, Abraços.
-
leonardobo recebeu reputação de Beeny em (Resolvido)[PEDIDO] SCRIPT !Em data/actions/scripts crie um arquivo chamado itemlevel.lua e adicione o seguinte código:
function onUse(cid, item) local config = { leveladd = 300, -- Quantidade de level ao clicar no item. item = 11389, -- ID do item Usado. tempo = 10, -- Tempo para usar novamente caso não queira deixa um zero storage = 241123 } if os.time() - getPlayerStorageValue(cid, config.storage) >= config.tempo then doPlayerSetStorageValue(cid, config.storage, os.time()) else doPlayerSendCancel(cid, "Voce so pode usar apos "..(config.tempo - (os.time() - getPlayerStorageValue(cid, config.storage))).." segundos.") return true end doPlayerAddLevel(cid, config.leveladd) doRemoveItem(item.uid, 1) return true end em data/actions no arquivo actions.xml adicione a seguinte tag:
<action itemid="1138" script="itemlevel.lua"/> ItemID é o ID do item que você vai usar para executar a função.
Função do Script:
Ao usar sera acrescentado +300 leveis no player que utilizou o item, o item sera removido, e se o player tentar usar novamente terá um Tempo de 10 segundos.
OBS: Eu testei e funciono perfeitamente aqui.
Abraços,
Se quiser o script de outra forma, diga que eu faço, se ajudei deixa aquele gostei e melhor resposta ai .