Tudo que klipstyle postou
- [Help] Shop System Nao para de chegar item
-
Colocar LocalStorage na VIP Account.
realmente amigo não possui storage recomendo você usar VIP System by Mock! http://www.tibiaking.com/forum/topic/20589-vip-system-by-mock-100/
-
[Help] Shop System Nao para de chegar item
em shop.lua use este código. SHOP_MSG_TYPE = 19 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 id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE 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 full_weight = getItemWeightById(itemtogive_id, 1) 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) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') 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 .. ";") doPlayerSave(cid) else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end registre a tag em globalevents.xml <globalevent name="shop" interval="30000" script="shop.lua"/>
-
(Resolvido)[PEDIDO] Spell de "Correr"
o script do que pode usar "" troque por este veja se funciona. (desculpa por não poder colocar em code ou spoiler pois meu navegador esta um lixo) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 20000) setConditionFormula(condition, 1.7, -36, 1.7, -36) function onSay(cid, words, param) if exhaustion.get(cid, 502) then doPlayerSendCancel(cid, 'aguarde '..exhaustion.get(cid, 502)..' segundos para usar novamente.') return true end local pos = getThingPos(cid) if(param == '') then doSendMagicEffect(pos, 14) doAddCondition(cid, condition) exhaustion.set(cid, 502, 10) -- 10 e o tempo em segundos do intervalo para usar return true end local t = string.explode(param, '"') if(t[2]) then doCreatureSay(cid, "Strong Haste: ".. t[2], 20, false, 0, pos) doSendMagicEffect(pos, 14) doAddCondition(cid, condition) exhaustion.set(cid, 502, 10) -- 10 e o tempo em segundos do intervalo para usar end return true end
-
checagem de criatura ou retornar outro valor. damage!
fala galera estou com um problema que por mais que eu tenha pesquisado não encontrei uma forma de verificar se a criatura existe ou não. valor = math.abs(valor) if isSummon(attacker) then if combat == COMBAT_PHYSICALDAMAGE then doTargetCombatHealth(getCreatureMaster(attacker), cid, PHYSICALDAMAGE, -valor, -valor, 255) addEvent(doDoubleHit, 1000, attacker, cid, valor, races) else doTargetCombatHealth(getCreatureMaster(attacker), cid, damageCombat, -valor, -valor, 255) end else if combat ~= COMBAT_PHYSICALDAMAGE then if damageCombat and combats[damageCombat] then doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor) else doCreatureAddHealth(cid, -math.abs(valor), 3, combats[getMonsterInfo(getCreatureName(cid)).race].cor) ---- (luaGetMonsterInfo) Monster not found addEvent(doDoubleHit, 1000, attacker, cid, valor, races) end end quando jogador morre para muitos monstros ele não verifica ha tempo se o monstro ou jogador existe antes de efetuar a verificação do ataque. alguém saberia uma forma de mudar isso? EDIT: Valeu a todos pode fechar problema resolvido Bug exp2.0 PDA fixado (:
-
(Resolvido)[PEDIDO] Spell de "Correr"
com a mensagem após "" http://www.tibiaking.com/forum/topic/44601-correr-poketibia/ sem mensagem : http://www.tibiaking.com/forum/topic/37534-talkaction-de-correr/?p=226233 com mensagem nunca testei, o segundo sem "" eu ja usei muito e funciona normalmente.
-
(Resolvido)[PEDIDO] Spell de "Correr"
via spells mesmo ex: correr "tibiaking ou pode ser talkactions onde sai apenas "correr"?
-
(Resolvido)[PEDIDO] Spell de "Correr"
explique melhor pois nem todos jogam OTP.
-
Magia de monstro pegando nos outros
em data\creaturescripts\scripts salve como noattack.lua function onStatsChange(cid, attacker) if isMonster(cid) and isMonster(attacker) then return false end return true end registre a tag em creaturescripts.xml <event type="statschange" name="noattack" event="script" value="noattack.lua"/> e registre o evento em login.lua registerCreatureEvent(cid, "noattack")
-
Tem como fazer este script?
quando eu usava esse sistema ele funcionava 100% pelo visto sua distro nao possui a função "doRemoveItem" qual distro você usa?
-
Como configurar este CONFIG.LUA
pelo que da pra notar 1 ip pra cada world na parte superior diz sobre a database pra cada world. você tera apenas 1 world configuro somente ip principal e configure apenas uma database para seu world.
-
Tem como fazer este script?
desculpe Snowsz, quando tento usar Spoiler ou Code a pagina do google chrome para de responder e da erro. Assim que voltar ao normal edito.
-
Tem como fazer este script?
qualquer erro poste aqui
-
Tem como fazer este script?
em data\npc\ crie um npc.xml chamado Dicer dentro coloque o codigo. <?xml version="1.0"?> <npc name="Dicer" script="data/npc/scripts/dicer.lua" walkinterval="1000" floorchange="0"> <health now="100" max="100"/> <look type="132" head="114" body="0" legs="0" feet="114" addons="3"/> <parameters> <parameter key="message_greet" value="Ola {|PLAYERNAME|}, caso queria tentar a sorte diga {L} ou {Low} para apostar nos numeros {1}, {2} ou {3} ||| {H} ou {High} para apostar nos numeros {4}, {5} ou {6}!" /> </parameters> </npc> em data\npc\scripts crie um arquivo dicer.lua e dentro cole. 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local coins = {[2148] = 1, [2152] = 100, [2160] = 10000} function countMoneyOnPos(pos) local money = 0 for stack = 1, 5 do pos.stackpos = stack local item = getThingFromPos(pos) if item and item.uid > 0 then if coins[item.itemid] then money = money + coins[item.itemid] * item.type end end end return money end local posCoal = {x = 169, y = 51, z = 7} -- POSIÇÃO DO COAL, ONDE O GOLD DEVE ESTAR local posNpc = {x = 169, y = 50, z = 7} -- POSIÇÃO DO NPC local pos = getPosByDir(getThingPos(cid), getCreatureLookDirection(cid), 1) -- NÃO ALTERAR if msgcontains(msg, 'l') or msgcontains(msg, 'L') or msgcontains(msg, 'low') or msgcontains(msg, 'Low') then if countMoneyOnPos(pos) > 0 then if math.random(1, 6) <= 3 then doPlayerAddMoney(cid, countMoneyOnPos(pos)*2) doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 26) doSendMagicEffect(posNpc, 28) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(1, 3)..', parabéns!', TALKTYPE_ORANGE_1) else doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 2) doSendMagicEffect(posNpc, 26) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(4, 6)..', tente novamente!', TALKTYPE_ORANGE_1) end else doCreatureSay(getNpcId(), getCreatureName(cid)..', coloque uma quantia de gold no recipiente para começar a apostar!', TALKTYPE_ORANGE_1) end elseif msgcontains(msg, 'h') or msgcontains(msg, 'H') or msgcontains(msg, 'high') or msgcontains(msg, 'High') then if countMoneyOnPos(pos) > 0 then if math.random(1, 6) <= 3 then doPlayerAddMoney(cid, countMoneyOnPos(pos)*2) doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 26) doSendMagicEffect(posNpc, 28) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(4, 6)..', parabéns!', TALKTYPE_ORANGE_1) else doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 2) doSendMagicEffect(posNpc, 26) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(1, 3)..', tente novamente!', TALKTYPE_ORANGE_1) end else doCreatureSay(getNpcId(), getCreatureName(cid)..', coloque uma quantia de gold no recipiente para começar a apostar!', TALKTYPE_ORANGE_1) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Colocar LocalStorage na VIP Account.
1º \data\talkactions\scripts crie um arquivo chamado bookinfo.lua dentro cole. function onSay(cid, words, param) local text = 'Informações que você deseja que apareça' -- \n função usada para quebrar linhas (EX: 123\n456\n789) doShowTextDialog(cid, 2160, text) -- 2160 foto do item q ira aparecer no topo da janela return true end registre a tag em talkactions.xml <talkaction log="yes" words="!info" hide="yes" script="bookinfo.lua"/> 2º verifique em data\creaturescripts\scripts\ o arquivo sobre o fim da vip, pois o sistema do Mock também utiliza verificação por conta toda e pela data base porem possui uma storage sim. Poste o arquivo referente ao fim da vip ou o link do sistema utilizado.
- (Resolvido)[PEDIDO] Script comando !sellhouse pra vender house
- (Resolvido)[Ajuda] Client Anti BOT
-
[ajuda] Anti-hack
usando sql injector proteja seu vertrigo para nao poder acessar de fora do localhost.
-
[Itemeditor]error.
amigo se for o itemeditor que eu estou pensando, quando abrir va em File > Preferences > Browser e navegue ate encontrar o client, após isso File > Open > e abra o item.otb q deseja.
- (Resolvido)[PEDIDO] Script comando !sellhouse pra vender house
- (Resolvido)[Ajuda] Client Anti BOT
-
(Resolvido)[erro pz,pk]
realmente muito estranho pois eu uso o primeiro script que passei no meu server sem problemas ele bloqueia logout com fly surf etc.
-
(Resolvido)[erro pz,pk]
function onLogout(cid) if getPlayerSkullType(cid) == SKULL_WHITE or isPlayerPzLocked(cid) or getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Voce nao pode deslogar enquanto esta em battle.") return true end return true end se esse nao funcionar ja nao sei oque checar ou como checar ç.ç
-
(Resolvido)[erro pz,pk]
tente assim.
-
(Resolvido)[erro pz,pk]
manda uma foto de 1 player com battle pra eu ver.