Solutions
-
Danihcv's post in (Resolvido)[pedido] Chance de 20% de invasão a cada hora was marked as the answerTenta assim:
local monsters = { --[ORDEM]={name="NOME-DO-MONSTRO", pos={POSICAO DO MONSTRO}} [1]={name="Demon", pos={x=32368, y=32216, z=7}} } local chance = 20 --A chance em porcentagem function onThink(interval) a = math.random(1, 100) if a <= chance then for e, f in pairs(monsters) do doCreateMonster(monsters[e].name, monsters[e].pos) end end return true end -
Danihcv's post in (Resolvido)Travadas em meu otserve : e como mecher nas contas do meu otserve was marked as the answerPra acessar o phpmyadmin, basta digitar ali na parte de endereço no navegador: localhost/phpmyadmin e dar enter.
@Edit, amigo tem 3 eventos que estão ocorrendo o tempo todo, e isso pode lagar o seu server, pois podem estar exigindo muito da máquina.
Os eventos são:
<globalevent name="save" interval="500" event="script" value="save.lua"/> *Esse de save eu não recomendo deixar ele tão rápido assim. Recomendo deixar pelo menos 1800000 para que o server salve a cada meia hora*
<globalevent name="napis" interval="1" script="napis.lua"/> *Esse eu não sei do que se trata, porém está muito muito muito rápido e isso deve estar exigindo muuuito da máquina. Vc sabe pra que serve esse evento?*
<globalevent name="mensagem" interval="500" script="mensagem.lua"/> *Esse eu tb não sei do que se trata e também pode estar exigindo muuuito da maqina. Vc sabe do que esse se trata tb?*
-
Danihcv's post in (Resolvido)Script !promote was marked as the answerDesculpe o descuido amigo.
Distro é na vdd o seu executável, tipo tfs (The Forgotten Server) e a versão do mesmo. Tudo isso pode ser visto nas primeiras linhas do console assim que vc executa ele.
Segue um tutorial mais explicado de como instalar:
Va na pasta data\talkactions e adicione essa tag ao arquivo talkactions.xml:
<talkaction words="!promote;/promote" event="script" value="promote.lua"/> Agora va na pasta data\talkactions\scripts e crie um arquivo chamado promote.lua e coloque isso dentro:
function onSay(cid) if getPlayerPromotionLevel(cid) < 1 then setPlayerPromotionLevel(cid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already promoted.") end return true end -
Danihcv's post in TK Clients Bugado was marked as the answerAmigo, a equipe já tem conhecimento do problema e a solução do mesmo está sendo providenciada.
O tópico foi movido para a área correta, preste mais atenção da próxima vez!
Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680
Este tópico foi movido:
De: "OTServ → OTServ Geral"
Para: "Tibia King → Atendimento Geral"
-
Danihcv's post in (Resolvido)Como tiro Msg "Aaaah..." das potions? was marked as the answerTenta assim:
O que eu fiz? Eu apenas deixei as linhas que tinham a function de mandar o player "dizer" "Aahhhh" como comentário, para caso futuramente vc quiser voltar atrás. Aí é só apagar os " -- " (dois hifens) das linhas 80 e 76
-
Danihcv's post in (Resolvido)Tile que remove storage do player was marked as the answerVá no seu editor de mapa e coloque o action id 256900 no tile que vc qr que remova a storage.
Agora adicione essa tag ao arquivo movements.xml (data\movements):
<movevent type="StepIn" actionid="256900" event="script" value="rStorage.lua"/> Agora crie um arquivo chamado rStorage.lua dentro da pasta data\movements\scripts e coloque isso dentro:
function onStepIn(cid) if isPlayer(cid) then setPlayerStorageValue(cid, 6598799, 0) end return true end -
Danihcv's post in (Resolvido)Comandos GOD was marked as the answer/skill NOME-DO-PLAYER, level, QUANTIDADE
Tb pode ser /addskill
Depende do seu ot.
@edit: ou vc qr saber como muda o level pra o player poder usar o item?
-
Danihcv's post in (Resolvido)[AJUDA] Mudar o IP do Website was marked as the answerO endereço do seu website será o ip que vc colocar no config.lua.
Ou então um ip que esteja vinculado à sua maquina (um ip fixo, mesmo que não esteja no config.lua).
Baixe o no-ip: www.no-ip.com
Se cadastre, crie um host e deixe ele ligado. Pronto. Agora as pessoas podem entrar no seu site pelo ip que vc criou no no-ip.
-
Danihcv's post in (Resolvido)[Dúvida] Possivel Passar Outfit's de 10.53 para 8.60? was marked as the answer@Brunds, tem sim amigo. Basta vc exportar as sprites dos outfits 10.53 que vc qr usar. E abrir o .dat e .spr no editor (recomendo Object Builder pra fazer todo o processo) e adicionar na parte de Outfits as sprites numa outfit nova/vazia.
-
Danihcv's post in Esta Dando Erro no TK Tools/Clients TK was marked as the answerO pessoal da equipe ja tem conhecimento desse problema. Em breve esse problema será solucionado.
-
Danihcv's post in (Resolvido)Dúvida movement was marked as the answerfunction onStepIn(cid, item, position, fromPosition) local pos_principal = {x=435, y=545, z=6} -- EDITAR POSIÇÃO DO TEMPLO local storage_guild = getGlobalStorageValue(13340) -- A 3ª storage configurada em Castle.lua if getPlayerGuildId(cid) ~= storage_guild then if getPlayerGuildId(cid) > 0 then broadcastMessage("O player ".. getPlayerName(cid) .." da guild ".. getPlayerGuildName(cid) .." está invadindo o gran castle, aviso ao donos atuais para protegerem a Gran Tower.") else broadcastMessage("O player ".. getPlayerName(cid) .." está invadindo o gran castle, aviso ao donos atuais para protegerem a Gran Tower.") end end return true end
-
Danihcv's post in (Resolvido)[AJUDA] DATABASE XAMMP was marked as the answerExecuta esse comando:
INSERT INTO `accounts` VALUES (1, '1', '1', '', 65535, 0, '', '0', 0, 0, 1, 65535); Se não pegar, executa esse:
DROP TABLE IF EXISTS `accounts`; CREATE TABLE `accounts` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(32) NOT NULL DEFAULT '', `password` VARCHAR(255) NOT NULL/* VARCHAR(32) NOT NULL COMMENT 'MD5'*//* VARCHAR(40) NOT NULL COMMENT 'SHA1'*/, `salt` VARCHAR(40) NOT NULL DEFAULT '', `premdays` INT NOT NULL DEFAULT 5, `lastday` INT UNSIGNED NOT NULL DEFAULT 0, `email` VARCHAR(255) NOT NULL DEFAULT '', `key` VARCHAR(32) NOT NULL DEFAULT '0', `blocked` TINYINT(1) NOT NULL DEFAULT FALSE COMMENT 'internal usage', `warnings` INT NOT NULL DEFAULT 0, `group_id` INT NOT NULL DEFAULT 1, `viptime` INT( 11 ) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE = InnoDB; INSERT INTO `accounts` VALUES (1, '1', '1', '', 65535, 0, '', '0', 0, 0, 1, 65535); Ao invés desse que vc tentou.
-
Danihcv's post in (Resolvido)Script Exp VIP Comedinha was marked as the answerfunction onLogin(cid) local rate = 1.3 -- 30% local config = { vip = "Você tem "..((rate - 1)*100).."% de exp a mais agora!", notvip = "Tornesse vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!", } if (getPlayerPremiumDays(cid) < 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.notvip) else doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.vip) end return true end
-
Danihcv's post in (Resolvido)Script para sorteio de item was marked as the answerAqui está o script pra pegar o item e ser teleportado para o cp:
local pos = {x=1, y=1, z=1} --Posicao do cp local items = {2160, 2161} --ID's dos items function onUse(cid, position) a = math.random(1, #items) doPlayerAddItem(cid, items[a], 1) doTeleportThing(cid, pos) return true end Fiz algo bem simples por não saber se era só isso que vc desejava... Mas ele dá o item aleatório e teleporta pro cp. Basta configurar as coisas.
-
Danihcv's post in (Resolvido)[Pedido] Surprise Bag - Alguem Lembra? rs was marked as the answerOk, eu fiz outro para apenas 1 surprise bag.
Vá em data/actions/scripts e crie um arquivo chamado surprisebag.lua e coloque isso dentro:
local items = { --[numeração] = {id = ID DO ITEM, count = QUANTIDADE DO ITEM} [1]={id=2687, count=10}, [2]={id=6394, count=3}, [3]={id=6280, count=1}, [4]={id=6574, count=1}, [5]={id=6578, count=1}, [6]={id=6575, count=1}, [7]={id=6577, count=1}, [8]={id=6569, count=1}, [9]={id=6576, count=1}, [10]={id=6572, count=1} } function onUse(cid, item, fromPosition, itemEx, toPosition) a = math.random(1, #items) doPlayerAddItem(cid, items[a].id, items[a].count) doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS) doRemoveItem(item.uid, 1) return true end Agora va na pasta data/actions e adicione essa tag ao arquivo actions.xml:
<action itemid="ID DA SUA SURPRISE BAG" script="surprisebag.lua"/> Não esqueça de colocar o devido id no local apropriado nessa tag.
-
Danihcv's post in (Resolvido)Adicionando um Amuleto com atributos. [Por Favor HELP!] was marked as the answerVc adicionou as devidas tags no arquivo movements.xml?
Se não o fez, adicione essa tag:
<movevent type="Equip" itemid="2138" slot="necklace" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="2138" slot="necklace" event="function" value="onDeEquipItem"/> -
Danihcv's post in (Resolvido)[URGENTE] Player Não Salva Erro MYSQL [SOccorro ajuda] was marked as the answerExecuta esse comando na sua data base:
DROP TABLE IF EXISTS `players`; CREATE TABLE `players` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `world_id` tinyint(4) unsigned NOT NULL DEFAULT '0', `group_id` int(11) NOT NULL DEFAULT '1', `account_id` int(11) NOT NULL DEFAULT '0', `level` int(11) NOT NULL DEFAULT '10', `vocation` int(11) NOT NULL DEFAULT '0', `health` int(11) NOT NULL DEFAULT '150', `healthmax` int(11) NOT NULL DEFAULT '150', `experience` bigint(20) unsigned NOT NULL DEFAULT '0', `lookbody` int(11) NOT NULL DEFAULT '0', `lookfeet` int(11) NOT NULL DEFAULT '0', `lookhead` int(11) NOT NULL DEFAULT '0', `looklegs` int(11) NOT NULL DEFAULT '0', `looktype` int(11) NOT NULL DEFAULT '136', `lookaddons` int(11) NOT NULL DEFAULT '0', `lookmount` int(11) NOT NULL DEFAULT '0', `maglevel` int(11) NOT NULL DEFAULT '0', `mana` int(11) NOT NULL DEFAULT '0', `manamax` int(11) NOT NULL DEFAULT '0', `manaspent` bigint(20) unsigned NOT NULL DEFAULT '0', `soul` int(10) unsigned NOT NULL DEFAULT '0', `town_id` int(11) NOT NULL DEFAULT '2', `posx` int(11) NOT NULL DEFAULT '32369', `posy` int(11) NOT NULL DEFAULT '32241', `posz` int(11) NOT NULL DEFAULT '7', `conditions` blob NOT NULL, `cap` int(11) NOT NULL DEFAULT '0', `sex` int(11) NOT NULL DEFAULT '0', `lastlogin` bigint(20) unsigned NOT NULL DEFAULT '0', `lastip` int(10) unsigned NOT NULL DEFAULT '0', `save` tinyint(1) NOT NULL DEFAULT '1', `skull` tinyint(1) unsigned NOT NULL DEFAULT '0', `skulltime` int(11) NOT NULL DEFAULT '0', `rank_id` int(11) NOT NULL DEFAULT '0', `guildnick` varchar(255) NOT NULL DEFAULT '', `lastlogout` bigint(20) unsigned NOT NULL DEFAULT '0', `blessings` tinyint(2) NOT NULL DEFAULT '0', `pvp_blessing` tinyint(1) NOT NULL DEFAULT '0', `balance` bigint(20) unsigned NOT NULL DEFAULT '0', `stamina` bigint(20) unsigned NOT NULL DEFAULT '151200000' COMMENT 'stored in miliseconds', `direction` int(11) NOT NULL DEFAULT '2', `loss_experience` int(11) NOT NULL DEFAULT '100', `loss_mana` int(11) NOT NULL DEFAULT '100', `loss_skills` int(11) NOT NULL DEFAULT '100', `loss_containers` int(11) NOT NULL DEFAULT '100', `loss_items` int(11) NOT NULL DEFAULT '100', `premend` int(11) NOT NULL DEFAULT '0' COMMENT 'NOT IN USE BY THE SERVER', `online` tinyint(1) NOT NULL DEFAULT '0', `marriage` int(10) unsigned NOT NULL DEFAULT '0', `promotion` int(11) NOT NULL DEFAULT '0', `deleted` int(11) NOT NULL DEFAULT '0', `description` varchar(255) NOT NULL DEFAULT '', `comment` text NOT NULL, `create_ip` int(11) NOT NULL DEFAULT '0', `create_date` int(11) NOT NULL DEFAULT '0', `hide_char` int(11) NOT NULL DEFAULT '0', `signature` text NOT NULL, `offlinetraining_time` smallint(5) unsigned NOT NULL DEFAULT '43200', `offlinetraining_skill` int(11) NOT NULL DEFAULT '-1', `cast` tinyint(4) NOT NULL DEFAULT '0', `castViewers` int(11) NOT NULL DEFAULT '0', `castDescription` varchar(255) NOT NULL, `created` int(11) NOT NULL DEFAULT '0', `nick_verify` int(11) NOT NULL DEFAULT '0', `old_name` varchar(255) NOT NULL DEFAULT '', `worldtransfer` int(11) NOT NULL DEFAULT '0', `show_outfit` tinyint(4) NOT NULL DEFAULT '1', `show_eq` tinyint(4) NOT NULL DEFAULT '1', `show_bars` tinyint(4) NOT NULL DEFAULT '1', `show_skills` tinyint(4) NOT NULL DEFAULT '1', `show_quests` tinyint(4) NOT NULL DEFAULT '1', `stars` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`deleted`), KEY `account_id` (`account_id`), KEY `group_id` (`group_id`), KEY `online` (`online`), KEY `deleted` (`deleted`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; -
Danihcv's post in (Resolvido)[Ajuda] Erro na Distro was marked as the answerlocal starterpokes = { ["Cyndaquil"] = {x = 167, y = 593, z = 7}, ["Totodille"] = {x = 166, y = 593, z = 7}, ["Chikorita"] = {x = 168, y = 593, z = 7} } local level = 5 local extrastr = 1.5 local btype = "normal" function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) > 10 then return true end local pokemon = "" for a, b in pairs (starterpokes) do if isPosEqualPos(topos, b) then pokemon = a end end if pokemon == "" then return true end local gender = getRandomGenderByName(pokemon) local mypoke = getPokemonStatus(pokemon) if not mypoke then return true end local offense = mypoke.off * level * extrastr local defense = mypoke.def * level * extrastr local speed = mypoke.agi * level * extrastr local vit = mypoke.vit * level * extrastr local spatk = mypoke.spatk * level * extrastr local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) doPlayerAddItem(cid, 2152, 2) doPlayerAddItem(cid, 2394, 10) doPlayerAddItem(cid, 12344, 2) local balls = doPlayerAddItem(cid, 2394, 10) doItemSetAttribute(balls, "unique", cid) local item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", pokemon) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "level", level) doItemSetAttribute(item, "exp", leveltable[level]) doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(item, "offense", offense) doItemSetAttribute(item, "defense", defense) doItemSetAttribute(item, "speed", speed) doItemSetAttribute(item, "vitality", vit) doItemSetAttribute(item, "specialattack", spatk) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "description", "Contains a "..pokemon..".") doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".") doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v2.6 doPlayerAddItemEx(cid, item, true) doTransformItem(item, pokeballs[btype].on) doPlayerSendTextMessage(cid, 27, "Você achou um novo pokemon, boa jornada.") doPlayerSendTextMessage(cid, 27, "Não esqueca de usar a pokedex neste novo pokemon.") doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return TRUE endpokemon)doItemSetAttribute(item, "hp", 1)doItemSetAttribute(item, "level", level)doItemSetAttribute(item, "exp", leveltable[level])doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])doItemSetAttribute(item, "offense", offense)doItemSetAttribute(item, "defense", defense)doItemSetAttribute(item, "speed", speed)doItemSetAttribute(item, "vitality", vit)doItemSetAttribute(item, "specialattack", spatk)doItemSetAttribute(item, "happy", happy)doItemSetAttribute(item, "gender", gender)doItemSetAttribute(item, "description", "Contains a "..pokemon..".")doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v2.6doPlayerAddItemEx(cid, item, true)doTransformItem(item, pokeballs[btype].on)doPlayerSendTextMessage(cid, 27, "Você achou um novo pokemon, boa jornada.")doPlayerSendTextMessage(cid, 27, "Não esqueca de usar a pokedex neste novo pokemon.")doSendMagicEffect(getThingPos(cid), 29)doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))doSendMagicEffect(getThingPos(cid), 27)doSendMagicEffect(getThingPos(cid), 29)return TRUEendTente assim
Tente assim.
@edit, acabei de ver q o viting foi mais rapido que eu. Hsushau
-
Danihcv's post in (Resolvido)Erro Nova Quest was marked as the answerTente salvar o script usando um editor de texto diferente. Por exemplo, se vc salvou ele com o bloco de notas, apague e tente salvar ele com o notepad++. E vice-versa.
-
Danihcv's post in (Resolvido)Bug gesior offline mesmo com ot on was marked as the answerExclua a linha 643
<?php echo creditos(); ?> -
Danihcv's post in (Resolvido)Duvidas sobre host! was marked as the answerSource é um conjunto de arquivos "de texto" que juntos vc pode compilar e ao compilar vc formará um arquivo executavel, que é a distro do seu server.
TFS é uma distro para server. TFS significa The Forgotten Server (é o nome da distro).
Aqui tem explicando o que é FTP: http://pt.wikipedia.org/wiki/File_Transfer_Protocol
Vps é um tipo de maquina (pc) virtual onde vc pode deixar seu server rodando 24horas por dia.
-
Danihcv's post in (Resolvido)Resetar SQLite was marked as the answerEntão cara, aqui tá sua data base "zerada" contendo apenas o acc manager e os samples: http://www.4shared.com/file/To5WPSB7ce/matanoob.html
Sobre essa spell, como assim só heala qm estiver dentro de vc?
Se eu demorar pra te responder, peço desculpa, pois estou um pouco abarrotado. :s
-
Danihcv's post in (Resolvido)Me Ajudem Spells.Lua was marked as the answerTroca essa parte do seu spells.xml:
<rune name="Donation Life" id="2281" allowfaruse="1" charges="5" lvl="80" exhaustion="300" maglv="1" aggressive="0" needtarget="1" blocktype="solid" script="healing/Donation Life.lua"/> Por essa:
<rune name="Donation Life" id="2281" allowfaruse="1" charges="5" lvl="80" exhaustion="300" maglv="1" aggressive="0" needtarget="1" blocktype="solid" script="healing/Donation Life.lua"> <vocation id="3"/> <vocation id="4"/> </rune> -
Danihcv's post in (Resolvido)[PEDIDO] - NPC Bank was marked as the answerSe ngm.te ajudar até hj de noite. Eu vejo o que posso fazer. Mas peço pra que vc me lembre por pm... shuashuas :s
@Edit:
Aqui está o script que uso em meu server e que faz tudo certo, sem bug nenhum:
-
Danihcv's post in (Resolvido)Girar Sprites was marked as the answerNão amigo... Pq as sprites são apenas pixels... Não eh um objeto 3d que daria pra usar alguma ferramenta de auto complete em certas partes, sacas?
Então sinto informar que não existe tal programa. Vc terá que fazer todos angulos na mão. :/