Tudo que joadson postou
-
Item Bonus
Só adicionar um doPlayerAddItem(cid, ITEM_ID, ITEM_QUANT) abaixo de setPlayerStorageValue(cid, bonus_contador, 0) ficando assim doPlayerSendTextMessage(cid, 19, "Seus ".. bonus_max .." Online Bonus foram convertidos em 1 dia de Premium Account!") setPlayerStorageValue(cid, bonus_contador, 0) doPlayerAddItem(cid, ITEM_ID, ITEM_QUANT) Troque o item_ID e quant pelo item e quantidade e o sistema não tem nenhuma linha que fala sobre premium days
-
PokeAimar (Level System) 8.54 2020
Só alterar pra: #define CLIENT_VERSION_MIN 854 #define CLIENT_VERSION_MAX 854 e estará apto para rodar em qualquer otc 854
-
VPS - AJUDA
Ele cria um novo user, só logar com ele ou então compila tua sourcer com permissão de ser executada com root troca o root@teuip por userCriado@teuip
-
VPS - AJUDA
adduser novo usario
-
Adaptar source - Eu pago!
Me chame no Discord ou WhatsApp para passar todos os detalhes. Aion#1921 Discord 73991388451 - WhatsApp
-
database bugando
Só adicionar world_id na tabela global_storage por se tratar de sqlite nao sei como procede, mas deve ter o botao de add fields no editor;
-
Sistema de Medalhões! Solicite aqui!
Aguardando ?
-
Pagina em branco character=name gesior
Olha os logs de erro em var/logs/apache2 no linux. lá vai dizer a causa de nao carregar as infos, mas provavelmente são os samples sem skills
-
player morre ou reloga e os items não ativam
Deve ter algum script/mod com a função de remover as conditions. procure nos scripts por doRemoveCondition(cid, true) remova a linha ou mude para remover apenas tal condição. CONDITION_OUTFIT, ETC...
-
(Resolvido)[PEDIDO] Item que dá Health
function onUse(cid, item, frompos, item2, topos) setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+10000)) setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+10000)) doPlayerSendTextMessage(cid,19,"Foram Adicionados 10k de HP e MP no seu personagem") doRemoveItem(item.uid,1) return true end Não perde, é adionada "forever" pra perder ao morrer precisa de outro script
-
(Resolvido)[PEDIDO] Item que dá Health
Vá em action.xml e adicione <action itemid="IDDOITEM" script="extraHP.lua" /> e crie um arquivo extraHP.lua function onUse(cid, item, frompos, item2, topos) setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+10000)) doPlayerSendTextMessage(cid,19,"Foram Adicionados 10k de HP no seu personagem") doRemoveItem(item.uid,1) return true end faça o mesmo com MANA só mude setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+10000)) para setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+10000))
-
(Resolvido)Force OpenChat
Esse erro mesmo... http://www.tibiaking.com/forum/forums/topic/73679-036-função-doplayeropenchannel/ a função
-
(Resolvido)Force OpenChat
Vá em data/creaturevents/scripts e crie um arquivo chamado deathchannel.lua e coloque isso function onLogin(cid) if isPlayer(cid) and getPlayerAccountManager(cid) == MANAGER_NONE then doPlayerOpenChannel(cid, 9) doPlayerOpenChannel(cid, 10) registerCreatureEvent(cid, "playerDeathChannel") -- função do seu deathchannel end return true end abra seu login.lua e registerCreatureEvent(cid, "playerDeathChannelLogin") agora abra creaturevents.xml e coloque <event type="login" name="playerDeathChannelLogin" event="script" value="deathchannel.lua"/> Caso dê algum erro é porque sua sourcer não tem o código para chamar a função, ai terá que adicionar. Aqui funcionou sem nenhum erro.
-
(Resolvido)Force OpenChat
Vou fazer aqui... Só queres que apareça ao logar né? por padrão, como o default ne?
-
(Resolvido)[PEDIDO] "Reborn" modificado
EDIT... Crie o arquivo XML do npc. <?xml version="1.0" encoding="UTF-8"?> <npc name="Rebornar" script="rebornar.lua" walkinterval="0"> <health now="100" max="100"/> <look type="446"/> <parameters> <parameter key="message_greet" value="Olá, |PLAYERNAME|! Eu posso te {Rebornar}." /> </parameters> </npc> e crie um arquivo rebornar.lua na pasta scripts local hpADD = 10000 -- HP adicionado ao rebornar local mpADD = 10000 -- MP adicionado... local function doPlayerReborn(cid, level, looktype, vocation) setGlobalStorageValue(1000,getPlayerGUID(cid)) setPlayerStorageValue(cid, 30023, 4) setPlayerStorageValue(cid, 30024, getPlayerLevel(cid)) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+hpADD) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+mpADD) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.query("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.query("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") return TRUE end ----------------------------funções padrão do NPC----- local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('???') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Olá! Se voce está pronto, diga "reborn".') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Hey!.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then selfSay('Desculpe, mas voce já é rebornado.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and (getPlayerLevel(cid) < 200 and getPlayerStorageValue(cid,30023) ~= 4) or (getPlayerLevel(cid) > 400 and getPlayerStorageValue(cid,30023) ~= 4) then selfSay('Apenas level 200 ao 400 podem rebornar.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') then selfSay('Realmente quer isto?') talk_state = 2 -- configuração da vocação elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) <= 400 and getPlayerVocation(cid) == 8 then -- mude o 8 para o numero da ultima transformação doPlayerReborn(cid,1,10,9)-- explicação: 1 é o level que ficará após rebornar, 10 é o looktype e 9 é a nova vocação talk_state = 0 elseif msgcontains(msg, 'yes') and talk_state == 2 then selfSay('Desculpe, ' .. getCreatureName(cid) .. '! Voce deve estar na ultima transformação.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Adeus!') focus = 0 talk_start = 0 end end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Próximo por favor...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Adeus!') focus = 0 end end end
-
(Resolvido)[PEDIDO] "Reborn" modificado
Poste seu script de reborn pra modificar em cima dele.
-
(Resolvido)Force OpenChat
Terá que criar uma nova função pra chamar apenas esse chat, tem um tutorial meu sobre o chat do cast, caso queira tomar como base. Vou precisar desse death channel, então irei fazer e depois posto no fórum.
-
Mapper Quests - Contratando
Olá, estou "contratando" mapper para criação de algumas Quest, nada muito rebuscado, porém, nada tão simples. Mapas 8.60 Cliente Normal. Formas de pagamento: Paypal, Picpal, PagSeguro, Deposito (em último caso). Não tenho muito pra oferecer, eu te ajudo e você me ajuda. Caso tenha interesse, mandei PM que passarei meu contato.
-
[Resolvido] [Pedido] NPC dá storage e outro que reconhece
Não entendi, explique um pouco melhor que talvez possa ajudar
-
erro cast system
Posta o seu script do cast no globalevents.
-
erro cast system
Tem certeza que tem o cast system? Porque o getPlayerSpector fica na sourcer, confere se tem um arquivo chamado spectors.cpp e spectors.h s na pasta da sourcer
-
erro cast system
Provavelmente falta funções na sua LIB. Qual versão é TFS ou OTX?
-
OpenPrivateChannel
Olá, estarei disponibilzando o código para abrir o ChannelPrivate, se você usa o CastSystem seja do OTX ou do TFS 0.4, será util se for usar o Cast System para abrir ao fazer login(Irei disponibilizar o script também). Eu fiz esse código com base em outro da própria sourcer, funciona perfeitamente. Explicando um pouco sobre o AutoCast, como irei usar o CastSystem, pude notar que em muitos OT's, mesmo com CastSystem, os players não ativavam a função, então coloquei para abrir automaticamente, sendo que o player terá que usar o comando para desativar, meu intuito é fazer com que os novos jogadores venham conhecer um pouco sobre o OT mesmo antes de jogar(essa função pode ser "inutil" para alguns, mas sei que servirá para outros assim como serviu para mim. Todos códigos foram feitos por mim, caso copie, coloque os créditos. PS: Script AutoCast para OTX, se usa outra versão é só mudar as funções que chamam o Cast ou me envie PM que irei modificar. Vamos lá. Procure static int32_t luaL_errors(lua_State* L); e abaixo coloque static int32_t luaOpenPrivateChannel(lua_State* L); depois procure por lua_register(m_luaState, "doPlayerSendCancel", LuaInterface::luaDoPlayerSendCancel); e acima coloque //OpenPrivateChannel(cid) lua_register(m_luaState, "openPrivateChannel", LuaInterface::luaOpenPrivateChannel); Depois procure por int32_t LuaInterface::luaGetTileInfo(lua_State* L) e coloque acima int32_t LuaInterface::luaOpenPrivateChannel(lua_State* L) { ScriptEnviroment* env = getEnv(); uint32_t cid = popNumber(L); Player* player = env->getPlayerByUID(cid); if (!player || player->isRemoved() || !player->isPremium()) return false; ChatChannel* channel = g_chat.createChannel(player, 0xFFFF); if (!channel || !channel->addUser(player)) return false; player->sendCreatePrivateChannel(channel->getId(), channel->getName()); return true; } Agora vamos ao script para abrir o Live/Cast ao fazer logon. Vá em data/Creatureevents e crie um arquivo chamado live.lua e coloque o código abaixo function onLogin(cid) local t, data = 1, getPlayerSpectators(cid) if getPlayerAccountManager(cid) == MANAGER_NONE and getPlayerAccess(cid) <= 4 then -- Account Manager não irá iniciar o Cast e GM também não, mude apenas o Acess caso seja diferente data.broadcast = true doPlayerSetSpectators(cid, data) db.executeQuery("UPDATE `players` SET `broadcasting` = 1 WHERE `id` = " .. getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Seu Cast foi ativado automaticamente, para desativar digite /live off.") openPrivateChannel(cid) -- A função para abrir o PrivateChannel end return true end Depois abra o login.lua e coloque registerCreatureEvent(cid, "AutoCast") Feito isso, abra o creaturescript.xml e coloque <event type="login" name="AutoCast" event="script" value="live.lua"/>
-
Danos por Level
Tem que alterar na sourcer ou reeditar todas as spells com uma nova definição. Caso queira alterar nas spells, te dou uma spells como base e você edita nos seus(é bem chato e trabalhoso, pois já fiz isso no meu server)
-
[DUVIDA] Removedor de frag tirando PK
-- [( Script created by Matheus for TibiaKing.com )] -- function onUse(cid, item, fromPosition, item2, toPosisition) if getTilePzInfo(getPlayerPosition(cid)) == TRUE then doRemoveCondition(cid,CONDITION_INFIGHT) else doPlayerSendCancel(cid,"Só pode usar em Area PZ.") return TRUE end local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK} if isInArray(rskulls, getPlayerSkullType(cid)) then doPlayerSendCancel(cid,"You don't remover your frags and skulls.") doSendMagicEffect(getPlayerPosition(cid), 2) else db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") doCreatureSetSkullType(cid, 0) doCreatureSay(cid, "Your frags and skulls is cleaned!", 19) doSendMagicEffect(getPlayerPosition(cid), 26) doRemoveItem(item.uid, 1) return TRUE end end Coloquei pra ser usado só em PZ.