-
Total de itens
3406 -
Registro em
-
Última visita
-
Dias Ganhos
113
Tudo que Vodkart postou
-
Npc bless aqui: http://www.xtibia.com/forum/topic/140159-npc-blessing-seller/
-
O MARIO AQUELE QUE TE ESTUPROU ATRÁS DO ARMÁRIO SUBWAT CONHECE BEM RSRS
-
dúvida Varios Erros "problemas" Peço Ajuda...
pergunta respondeu ao lambreta123 de Vodkart em Scripts
2° link 2° http://tibia king.com/forum/topic/9232-resolvendo-temple-position-is-wrong-contact-the-administrator/page__p__38710#entry38710 retira o espaço do tibia king /\ 3° 1# erro é um MODS que está bugado, se vc postar ele aqui eu posso dar uma olhada OneNote alago assim o nome dele 1# erro é um MODS que está bugado, se vc postar ele aqui eu posso dar uma olhada OneNote alago assim o nome dele 3° 1# erro é um MODS que está bugado, se vc postar ele aqui eu posso dar uma olhada OneNote alago assim o nome dele -
tenta usar assim então: function onDeath(cid, corpse, deathList) local str = "" for _, pid in ipairs(deathList) do if isCreature(pid) == true then str = str.."".. (str == "" and "" or ",") ..""..getCreatureName(pid) else str = str.."".. (str == "" and "" or ",") .." a field item" end end str = str.."." death = str .. " ".. (getPlayerBlessing(cid, 5) and "[blessed]" or getPlayerSlotItem(cid, 2).itemid == 2173 and "[AOL]" or "") db.executeQuery("INSERT INTO `death_list` (`player_id`, `date`, `level`, `killer_name`) VALUES ('".. getPlayerGUID(cid).."', '".. os.time() .."', '".. getPlayerLevel(cid) .."', '".. death .."');") return true end
-
então olha se você colocou o script direito do onDeath, porque ta funcionando normal aqui, outra coisa... qual versão do seu ot?
-
agr funfo né? eu até testei aqui '-'
-
por isso ontem eu tinha modificado seu script e tinha ficado certo. local outfit = getPlayerSex(cid) == PLAYERSEX_FEMALE and {lookType = 78} or {lookType = 99} local tempo = 80 -- Tempo, nesse caso esta 60 segundos Lembrando que 1000 = 1 segundo local ml = 30 -- quantos ira aumentar o skill de ML local skillshield = 30 -- quantos ira aumentar o skill de Shield local health = 30 -- A cada 1 segundo quantos aumentar de vida local storage = 150262 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 34) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 350) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 5000) setCombatCondition(combat, condition) local sys = createConditionObject(CONDITION_OUTFIT) setConditionParam(sys, CONDITION_PARAM_TICKS, tempo*1000) addOutfitCondition(sys, outfit) setCombatCondition(combat, sys) function onCastSpell(cid, var) setPlayerStorageValue(cid, storage, os.time()+tempo) return doCombat(cid, combat, var) end
-
claro cara, olha a variável tempo local tempo = 80 * 1000 no os.time não precisa usar os mile segundos "1000", ai teria que ficar assim: local tempo = 80 setPlayerStorageValue(cid, storage, os.time()+tempo) -- 80 segundos e para outfits diferentes dependendo do sexo: local outfit = getPlayerSex(cid) == PLAYERSEX_FEMALE and {lookType = 78} or {lookType = 99}
-
1° Abra o programa Sqlite 2° Selecione a database do seu server, o arquivo é esse ".s3db", por exemplo o "forgottenserver.s3db" 3° na parte superior do programa tem a aba "Tools",clica nela e seleciona "Open SQL query editor" ou (ALT + E) se preferir 4° Vai abrir uma janela branca,nela você coloca isso: CREATE TABLE death_list ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, date INTEGER NOT NULL, level INTEGER NOT NULL, killer_name INTEGER NOT NULL, PRIMARY KEY ( id ) ); 5° Depois clica no ícone do raio ali na parte de cima ou aperta o botão F9 que vai fazer com que a query seja executada.
-
blz qualquer dúvida só postar
-
obrigado pelos comentários Bring Up My Post
-
dúvida Magia Só Pode Ser Usada Se O Player Estiver Usando Um Buff
pergunta respondeu ao pedrizito15 de Vodkart em Scripts
local outfit = {lookType = 308} -- Roupa que ira transformar no caso seu corpo ficara em choque local tempo = 80 -- Tempo, nesse caso esta 60 segundos Lembrando que 1000 = 1 segundo local ml = 30 -- quantos ira aumentar o skill de ML local skillshield = 30 -- quantos ira aumentar o skill de Shield local health = 30 -- A cada 1 segundo quantos aumentar de vida local storage = 150266 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 48) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 350) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 5000) setCombatCondition(combat, condition) local sys = createConditionObject(CONDITION_OUTFIT) setConditionParam(sys, CONDITION_PARAM_TICKS, tempo*1000) addOutfitCondition(sys, outfit) setCombatCondition(combat, sys) function onCastSpell(cid, var) setPlayerStorageValue(cid, storage, os.time()+tempo) return doCombat(cid, combat, var) end magia local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14) local area = createCombatArea(AREA_CROSS5X5) setCombatArea(combat, area) local storage = 150266 function onCastSpell(cid, var) if getPlayerStorageValue(cid, storage) >= os.time() then doCombat(cid, combat, var) else doPlayerSendCancel(cid, " Desculpe,você só pode usar essa magia se estiver com o BUFF O Algoz.") return false end return true end -
dúvida Magia Só Pode Ser Usada Se O Player Estiver Usando Um Buff
pergunta respondeu ao pedrizito15 de Vodkart em Scripts
fácil, só usar storage + os.time e colocar para checar na magia -
Mods: <?xml version="1.0" encoding="UTF-8"?> <mod name="Pvp Mode" version="1.0" author="Gevox" contact="xtibia.com" enabled="yes"> <config name="pvpmode_func"><![CDATA[ function getPlayerPVPMode(cid) local check = db.getResult("SELECT `pvpmode` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") return check:getDataInt("pvpmode") <= 0 and 0 or check:getDataInt("pvpmode") end function setPlayerPVPMode(cid, value) db.executeQuery("UPDATE `players` SET `pvpmode` = "..value.." WHERE `id` = "..getPlayerGUID(cid)) end ]]></config> <event type="login" name="PvpModeRegister" event="script"><![CDATA[ domodlib('pvpmode_func') function onLogin(cid) registerCreatureEvent(cid, "pvpProtection") if getPlayerPVPMode(cid) == 1 then doCreatureSetSkullType(cid, 1) end return true end]]></event> <event type="combat" name="pvpProtection" event="script"><![CDATA[ domodlib('pvpmode_func') if isPlayer(cid) and isPlayer(target) then if getPlayerPVPMode(cid) == 1 or getPlayerPVPMode(target) == 1 then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> </mod> npc: domodlib('pvpmode_func') 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 msg = string.lower(msg) local config = { price = {[0] = 100000,[1] = 300000}, level = 100, days = 7, storage = 321523 } if isInArray({"change","trocar", "pvp", "pk"}, msg) then npcHandler:say("You want "..(getPlayerPVPMode(cid) == 0 and "enable" or "disable").." your pvp now for "..config.price[getPlayerPVPMode(cid)].." gp(s)? {yes}", cid) talkState[talkUser] = 1 elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid,config.storage) <= os.time() then if doPlayerRemoveMoney(cid, config.price[getPlayerPVPMode(cid)]) then setPlayerPVPMode(cid, getPlayerPVPMode(cid) == 0 and 1 or 0) doCreatureSetSkullType(cid, getPlayerPVPMode(cid) == 1 and 1 or 0) setPlayerStorageValue(cid, config.storage, os.time()+config.days*86400) npcHandler:say("Now you set pvp mode to "..(getPlayerPVPMode(cid) == 0 and "off" or "on")..".", cid) else npcHandler:say("Sorry, You don't have money!", cid) talkState[talkUser] = 0 end else npcHandler:say("Sorry, but you must wait until "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,config.storage)).." to change your pvp again!", cid) talkState[talkUser] = 0 end else npcHandler:say("Sorry, You need level "..config.level.." or more to change your pvp!", cid) talkState[talkUser] = 0 end elseif isInArray({"no","nao"}, msg) then selfSay("Then not.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
wtf? uma semana é muito tempo cara.
-
pode usar o onCombat tbm function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerStorageValue(cid, timest) == getPlayerStorageValue(target, timest) then doPlayerSendCancel(cid, "You may not attack your team mates.") return false end end return true end
-
em talkactions vai lá e vê no comando que compra vip
-
e qual seu sistema vip?
-
mas quem disse que pode? if isPlayerPzLocked(cid) == FALSE and isInArray({SKULL_NONE,SKULL_YELLOW}, getCreatureSkullType(cid)) then faz checar essa função.
-
óbvio que tem, você diz trocar a talk por npc né.
-
<?xml version="1.0" encoding="UTF-8"?> <mod name="Pvp Mode" version="1.0" author="Gevox" contact="xtibia.com" enabled="yes"> <config name="pvpmode_func"><![CDATA[ function getPlayerPVPMode(cid) local check = db.getResult("SELECT `pvpmode` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") return check:getDataInt("pvpmode") <= 0 and 0 or check:getDataInt("pvpmode") end function setPlayerPVPMode(cid, value) db.executeQuery("UPDATE `players` SET `pvpmode` = "..value.." WHERE `id` = "..getPlayerGUID(cid)) end ]]></config> <talkaction words="/pvp;!pvp" event="buffer"><![CDATA[ domodlib('pvpmode_func') if isPlayerPzLocked(cid) == FALSE and isInArray({SKULL_NONE,SKULL_YELLOW}, getCreatureSkullType(cid)) then setPlayerPVPMode(cid, getPlayerPVPMode(cid) == 0 and 1 or 0) doCreatureSetSkullType(cid, getPlayerPVPMode(cid) == 1 and 1 or 0) doPlayerSendTextMessage(cid, 19, "Now you set pvp mode to "..(getPlayerPVPMode(cid) == 0 and "off" or "on").."!") else doPlayerSendCancel(cid, "You cannot set pvp mode when you are agressive.") end return true ]]></talkaction> <event type="login" name="PvpModeRegister" event="script"><![CDATA[ domodlib('pvpmode_func') function onLogin(cid) registerCreatureEvent(cid, "pvpProtection") if getPlayerPVPMode(cid) == 1 then doCreatureSetSkullType(cid, 1) end return true end]]></event> <event type="combat" name="pvpProtection" event="script"><![CDATA[ domodlib('pvpmode_func') if isPlayer(cid) and isPlayer(target) then if getPlayerPVPMode(cid) == 1 or getPlayerPVPMode(target) == 1 then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> </mod>
-
Se eu não me engano tem um bug, porque os dois jogadores tem que ta usando pra não poderem se atacar, ou seja se JOÃO tiver no modo seguro e MARIA não, MARIA ainda vai poder atacar o JOÃO... usa assim: query: ALTER TABLE `players` ADD `pvpmode` INT NOT NULL DEFAULT '0' e script fiz em MODS PvpMode.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="Pvp Mode" version="1.0" author="Gevox" contact="xtibia.com" enabled="yes"> <config name="pvpmode_func"><![CDATA[ function getPlayerPVPMode(cid) local check = db.getResult("SELECT `pvpmode` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") return check:getDataInt("pvpmode") <= 0 and 0 or check:getDataInt("pvpmode") end function setPlayerPVPMode(cid, value) db.executeQuery("UPDATE `players` SET `pvpmode` = "..value.." WHERE `id` = "..getPlayerGUID(cid)) end ]]></config> <talkaction words="/pvp;!pvp" event="buffer"><![CDATA[ domodlib('pvpmode_func') if isPlayerPzLocked(cid) == FALSE and getCreatureSkullType(cid) == SKULL_NONE then setPlayerPVPMode(cid, getPlayerPVPMode(cid) == 0 and 1 or 0) doPlayerSendTextMessage(cid, 19, "Now you set pvp mode to "..(getPlayerPVPMode(cid) == 0 and "off" or "on").."!") else doPlayerSendCancel(cid, "You cannot set pvp mode when you are agressive.") end return true ]]></talkaction> <event type="login" name="PvpModeRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "pvpProtection") return true end]]></event> <event type="combat" name="pvpProtection" event="script"><![CDATA[ domodlib('pvpmode_func') if isPlayer(cid) and isPlayer(target) then if getPlayerPVPMode(cid) == 1 or getPlayerPVPMode(target) == 1 then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> </mod> obs: ainda prefiro fazer por storage
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.