Ir para conteúdo

CirocReturn

Membro
  • Registro em

  • Última visita

Tudo que CirocReturn postou

  1. NOME DO SERVIDOR: Kingslave PREFIXO:Baiak FIRULAS/ENFEITES: Dragão
  2. NOME DO SERVIDOR: Really PREFIXO: Baiak ou World FIRULAS/ENFEITES: Como sua criatividade mandar kk
  3. tenta assim local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", "This item can only be used by the player ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'Voce recebeu >> '.. add_item_name ..' << do Dramonio Shop.Obrigado pela compra, volte sempre!') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return true end
  4. add skype rike.sexy
  5. seu servidor o global? vai nas storages na pasta lib e ve se existe a storage combatProtectionStorage, eu não investiguei se é direto na source ou por script esse sistema mas não achei script dele, teste e veja se funciona assim e se caso não funcione eu procuro onde o sistema funciona e te passo.
  6. Gesior é o melhor ou Znote outro nem rola..
  7. Procura no seu login.lua se tem essas linhas: local function onMovementRemoveProtection(cid, oldPosition, time) local player = Player(cid) if not player then return true end local playerPosition = player:getPosition() if (playerPosition.x ~= oldPosition.x or playerPosition.y ~= oldPosition.y or playerPosition.z ~= oldPosition.z) or player:getTarget() then player:setStorageValue(Storage.combatProtectionStorage, 0) return true end addEvent(onMovementRemoveProtection, 1000, cid, oldPosition, time - 1) end e essas: if player:getStorageValue(Storage.combatProtectionStorage) <= os.time() then player:setStorageValue(Storage.combatProtectionStorage, os.time() + 10) onMovementRemoveProtection(playerId, player:getPosition(), 10) end caso tenha essas linhas então já existe o sistema no seu servidor, muitas vezes a gente não percebe eu mesmo demorei pra ver que já tinha, se já tiver as linhas teste da seguinte maneira, de exit em char nos treiners e fique com outro do lado de mc pra ver se os monstros param de atacar e em seguida o player toma kick, se isso ocorrer o sistema já está ativo.
  8. qual o id do piso? pode ter algum script no id desse piso, tenta trocar o piso. hahah
  9. creio que não vai da muitos erros não, mas você precisa testar, depois resolvemos os erros, uma coisa de cada vez HAHAH
  10. só colocar uma distro 8.6 ou atualizar a sua se você tiver as sources.
  11. não está carregando o template tem algo errado, coloca o config ai pra eu ver.
  12. eu creio que o numero da action que você está usando para o evento,seja o mesmo de outro script de movement, confere e troca, se funcionar me avise.
  13. sim o script do movements
  14. manda o script, não da erro no distro? qual tfs? essa msg é igual do script das portas pode tar tendo confusão de action, mande script
  15. Fiz esse script pra um Baiak de um amigo, porem ele é cor fica e para player vip,vou colocar a base e você edita como quiser, se você procurar tem um que usa sistema de lib por vocações aqui no TK mesmo, só tem que achar. Em creaturescripts.xml adicione: <event type="login" name="vipeffect" event="script" value="vipeffect.lua"/> <event type="logout" name="vipeffect2" event="script" value="vipeffect.lua"/> Crie um arquivo chamado vipeffect.lua na pasta scripts: function effectvip(cid) if isPlayer(cid) then doSendAnimatedText(getThingPos(cid), "´ .´ ", 204) eventCheck = addEvent(effectvip, 2000, cid) end end function onLogin(cid) if isPlayer(cid) then if vip.hasVip(cid) == true then doSendAnimatedText(getThingPos(cid), "´ .´ ", 204) doPlayerSendTextMessage(cid, 27, "A cada 1 minuto treinando voce ganhara 5 minutos de stamina.") eventCheck = addEvent(effectvip, 2000, cid) end end return true end function onLogout(cid) if vip.hasVip(cid) == true then stopEvent(effectvip) end return true end
  16. Todas as ultimas versões do TFS 1.2 já tem isso, basta colocar para dar a storage do sistema no login.lua no creaturescripts.
  17. CirocReturn postou uma resposta no tópico em Suporte Tibia OTServer
  18. CirocReturn postou uma resposta no tópico em Suporte Tibia OTServer
    Mais fácil você baixar uma base pronta aqui do TK,trocar o mapa e ir editando a sua maneira, pra criar o mapa você vai precisar do Remers map editor base você pega na seção de downloads aqui do tk. Remers Map Editor 10.95: Servidores 10.95 prontos: http://www.tibiaking.com/forum/search/?type=forums_topic&nodes=162&tags=9.x+-+10.x
  19. provavelmente tem algum bug, veja se aparece algo no distro quando você fala ela e post o erro aqui.
  20. tem vários aqui no TK, o melhor que vi foi esse:
  21. CirocReturn postou uma resposta no tópico em Suporte Tibia OTServer
    Pegae ta na coordenada (1107,1039,7) mas não é a coordenada correta do global é (32316,31942,7). Se ajudei REP+.
  22. Isso ai é na source, sua source tem que ter esse recurso, é 0.4, 8.6?
  23. O Script que eu uso é diferente e não me lembro de acontecer esse erro, se quiser testar: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function delayMoneyRemoval(item, pos) doRemoveItem(getTileItemById(pos, item).uid) return true end local function placeMoney(amount, table_middle_pos) local remain = amount local crystal_coins = 0 local platinum_coins = 0 if (math.floor(amount / 10000) >= 1) then crystal_coins = math.floor(amount / 10000) remain = remain - crystal_coins * 10000 end if ((remain / 100) >= 1) then platinum_coins = remain / 100 end addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos) addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos) end local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc) local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797} local random_rollval = math.random(1,6) local total_g = (10000 * cc_count) + (100 * pc_count) local prize_percent = 0.8 -- 80% if ((total_g) <= 300000 and (total_g) >= 5000) then doSendMagicEffect(table_left_pos, CONST_ME_CRAPS) for _, itemId in pairs(dice_ids) do if(getTileItemById(table_left_pos, itemId).uid > 0) then doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval]) end end if (roll == 1 and random_rollval <= 3) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0) elseif (roll == 2 and random_rollval >= 4) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0) else addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doCreatureSay, 500, npc, "Better luck next time.", TALKTYPE_SAY, false, 0) end doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos) else addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos) addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos) doCreatureSay(npc, "The minimum wager is 5K and the maximum wager is 300K.", TALKTYPE_SAY, false, 0) end return true end function creatureSayCallback(cid, type, msg) -- NPC userdata instance local npc = getNpcCid() -- Game table position userdata instances local table_left_pos = {x = 32260, y = 32274, z = 12} -- Pos da frente do Npc onde gira o dado local table_middle_pos = {x = 32261, y = 32274, z = 12} -- Pos do meio onde vai o dinheiro -- Search for coins on the left and middle tables and create item userdata instances local table_middle_cc = getTileItemById(table_middle_pos, 2160) local table_middle_pc = getTileItemById(table_middle_pos, 2152) -- Other variables local cc_count = 0 local pc_count = 0 local ROLL, LOW, HIGH = 0, 1, 2 posplayer = {x=32262, y=32275, z=12} -- Pos onde o player precisa estar local ppos = getPlayerPosition(cid) if ppos.x == posplayer.x and ppos.y == posplayer.y then if isInArray({"H", "HIGH", "high", "h"}, msg) then ROLL = HIGH elseif isInArray({"L", "LOW", "l", "low"}, msg) then ROLL = LOW else return false end if (table_middle_cc.uid ~= 0) then cc_count = table_middle_cc.type doTeleportThing(table_middle_cc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2160, table_left_pos) end if (table_middle_pc.uid ~= 0) then pc_count = table_middle_pc.type doTeleportThing(table_middle_pc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2152, table_left_pos) end addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc) else return false end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  24. Bom dia queridos amigos do Tibia King, estou voltando ao fórum e desta vez irei trazer bastante conteúdo novo e ajudar bastante, para começar trarei o DotA Event para TFS 1.x, ele funciona exatamente igual o antigo do TFS 0.4. Segue download de scripts + mapa, o script globalevents está todo comentado para você conseguir configura-lo corretamente caso queira mudar a posição do mapa. Imagens: Download em anexo no tópico. Gostou? deixe seu rep+ para que eu traga mais conteúdo. DotA Event.zip

Informação Importante

Confirmação de Termo