
Tudo que Snowsz postou
-
(Resolvido)como tira opção de troca de idioma do OTclient?
No seu otclient em \modules\client_options no arquivo game.otui remova isso e salve: Button id: changeLocale !text: tr('Change language') @onClick: modules.client_locales.createWindow() anchors.top: prev.bottom anchors.left: prev.left margin-top: 5 width: 120
-
Com criar novas janelas?
No da CipSoft dá sim, só que por DLLs, no Otclient, já é fácil
- [C++] Malformed File
-
[Showoff] - TheJokerKing
Eu curti bastante, hehe, que tal seções? Tipo "Geral, Items para addon, Items para quest, Ofertas via MENSAGEM!, etc..." ?
-
(Resolvido)Ajuda com porta automática
meu deus Você não editou o arquivo.lua ? Reveja o que fez errado.
-
Tópico do quote
O meu ou o dele ? Por precaução, vou passar os dois kk My: adelsojunior1 Summ: flavio.mdt
-
Tópico do quote
VC QUE INVENTOU ISSO INFELIZ, AGORA AGUENTE! KKKKKKKKKKKKKK SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO... SPAM BRANCO...
- Tópico do quote
-
Segunda promotion VIP e NPC [TFS 1.0]
Sim, eu acho...
-
Tópico do quote
Hoje sim infeliz! kkk
-
Tópico do quote
Quem quotar por último vence!
-
Tópico do quote
- Tópico do quote
- (Resolvido)[Pedido] Npcs Guild Points
Qual sistema de guild points você usa ?- (Resolvido)Ajuda calculo de mana gasta spell
local manaporlevel = 3 local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) local area = createCombatArea(AREA_SQUARE1X1) setCombatArea(combat, area) function onGetFormulaValues(cid, level, maglevel) min = ( (maglevel * 30) * 0.5 ) * -1 max = ( (maglevel * 30) * 1.0 ) * -1 return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getPlayerMana(cid) >= (getPlayerLevel(cid)*manaporlevel) then doPlayerAddMana(cid, -(getPlayerLevel(cid)*manaporlevel)) return doCombat(cid, combat, var) end return doPlayerSendCancel(cid, "You don't have mana. ["..tostring(getPlayerLevel(cid)*manaporlevel).."]") end- [ACTIONS] Use em ITEM
e a tag dele no xml <action uniqueid="Id unique que sera colocado no item x que ira teleportar" event="script" value="Nome do Arquivo criado.lua"/> bom se alguém conseguir arrumar o erro eu agradeço xD Qual o erro, você nem coloca isso- Segunda promotion VIP e NPC [TFS 1.0]
Testa lá...- (Resolvido)Ajuda com porta automática
Você está confundindo tudo, explique tudo melhor por favor.- Segunda promotion VIP e NPC [TFS 1.0]
Não queria fazer tabela, mas... Tenta assim então: local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local promotions = { --[id da vocação atual] = id da vocação ganha, [1] = 1, [2] = 1, [3] = 1, [4] = 1, } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say("You have already received the promotion.", cid) return true end if msgcontains(msg:lower(), "promotion") then npcHandler:say("You are sure?", cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), "yes") and npcHandler.topic[cid] == 1 then if player:getStorageValue(STORAGEVALUE_PROMOTION) == 1 then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say("You just received a new promotion.", cid) player:setVocation(promotions[player:getVocation():getId()]) player:setStorageValue(STORAGEVALUE_PROMOTION, 2) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have money.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("You don't have any vip days.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("You don't have the first promotion.", cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), "no") and npcHandler.topic[cid] == 1 then npcHandler:say('Bye!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Configuração: local promotions = { --[id da vocação atual] = id da vocação ganha, [1] = 1, [2] = 1, [3] = 1, [4] = 1, } Onde tem [ ] fica o id da vocação atual que o player tem, e onde tem = 1, é o id da vocação promovida, vê se agora resolve...- (Resolvido)Comando !stamina
Tag: <talkaction words="!stamina" event="script" value="staminarefil.lua"/> Crie um arquivo com o nome staminarefil.lua em data/talkactions/scripts e troque tudo que tem dentro por isso: local money = 5000 function onSay(cid, words, param) if getPlayerMoney(cid) >= money then doPlayerRemoveMoney(cid, money) setPlayerStamina(cid, 2880) else doPlayerSendCancel(cid, "You don't have money to refil your stamina.") end return true end- Segunda promotion VIP e NPC [TFS 1.0]
A sim, faltou uma função, tenta agora: local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say("You have already received the promotion.", cid) return true end if msgcontains(msg:lower(), "promotion") then npcHandler:say("You are sure?", cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), "yes") and npcHandler.topic[cid] == 1 then if player:getStorageValue(STORAGEVALUE_PROMOTION) == 1 then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say("You just received a new promotion.", cid) player:setVocation(player:getVocation():getPromotion():getId()) player:setStorageValue(STORAGEVALUE_PROMOTION, 2) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have money.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("You don't have any vip days.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("You don't have the first promotion.", cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), "no") and npcHandler.topic[cid] == 1 then npcHandler:say('Bye!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())- (Resolvido)[Pedido] Efeitos texto animado ao upar skill,level,etc.
Em creaturescripts.xml adicione essa tag: <event type="advance" name="SkillUpText" event="script" value="skilluptext.lua"/> Em creaturescripts/scripts crie um arquivo com o nome "skilluptext.lua" e troque tudo que tem dentro por isso: local config = { [0] = {msg = "Fist UP!", textcolor = 0}, [1] = {msg = "Club UP!", textcolor = 0}, [2] = {msg = "Sword UP!", textcolor = 0}, [3] = {msg = "Axe UP!", textcolor = 0}, [4] = {msg = "Dist UP!", textcolor = 0}, [5] = {msg = "Shield UP!", textcolor = 0}, [6] = {msg = "Fish UP!", textcolor = 0}, [7] = {msg = "Magic UP!", textcolor = 0}, [8] = {msg = "Level UP!", textcolor = 0} } function onAdvance(cid, skill, oldlevel, newlevel) if config[skill] then doSendAnimatedText(getThingPos(cid), config[skill].msg, config[skill].textcolor) end return true end Em creaturescripts/scripts abra o login.lua e antes do último return true adicione essa função: registerCreatureEvent(cid, "SkillUpText")- (Resolvido)[PEDIDO] Criar NPC com função de teletransportar [TFS 1.0]
No arquivo xml que você quer seu npc coloque isso: <?xml version="1.0" encoding="UTF-8"?> <npc name="Questeiro" script="questeiro.lua" walkinterval="0" speechbubble="1" floorchange="0"> <health now="100" max="100" /> <look typeex="9242" head="98" body="95" legs="115" feet="114" addons="0"/> <parameters> <parameter key="message_greet" value="Ola jogador voce deseja me ajudar? Diga {quest}" /> </parameters> </npc> No arquivo .lua que você vai utilizar no seu npc, coloque isso: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 msg = msg:lower() local config = { pos = {x = 1020, y = 1030, z = 7}, mensagens = { ["quest"] = "Então, você quer saber sobre a quest eim... Bom vou lhe contar blablablablablablablabla...", ["yes"] = "Você foi teleportado.", ["no"] = "Adeus então.", } } if msgcontains(msg, "quest") then npcHandler:say(config.mensagens["quest"], cid) elseif msgcontains(msg, "yes") then npcHandler:say(config.mensagens["yes"], cid) doTeleportThing(cid, config.pos) elseif msgcontains(msg, "no") then npcHandler:say(config.mensagens["no"], cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Configuração: Troque o nome do seu npc aqui: name="Questeiro" e aqui script="questeiro.lua" você troca para o nome do arquivo.lua que criou para seu npc, não esqueça do ".lua" no final. Acho o resto está obvio não?- Segunda promotion VIP e NPC [TFS 1.0]
Tenta dessa vez assim kk: local money = xxxx -- Quanto vai custar local storage = 14542 -- Não mexer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local player = Player(cid) if player:getStorageValue(storage) == 1 then npcHandler:say("You have already received the promotion.", cid) return true end if msgcontains(msg:lower(), "promotion") then npcHandler:say("You are sure?", cid) npcHandler.topic[cid] = 1 end if msgcontains(msg:lower(), "yes") and npcHandler.topic[cid] == 1 then if player:getStorageValue(STORAGEVALUE_PROMOTION) == 1 then if player:getVipDays() >= 1 then if player:removeMoney(money) then npcHandler:say("You just received a new promotion.", cid) player:setVocation(player:getVocation():getPromotion()) player:setStorageValue(STORAGEVALUE_PROMOTION, 2) player:setStorageValue(storage, 1) npcHandler.topic[cid] = 0 else npcHandler:say("You don't have money.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("You don't have any vip days.", cid) npcHandler.topic[cid] = 0 end else npcHandler:say("You don't have the first promotion.", cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg:lower(), "no") and npcHandler.topic[cid] == 1 then npcHandler:say('Bye!', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())- (Resolvido)(AJUDA) Começando com addons full
Tenta isso: Crie um arquivo chamado "loginaddon" em data/creaturescripts/scripts com a extensão ".lua", ficando: "loginaddon.lua" e troque tudo que tem dentro por isso: local storage = 15984 function onLogin(cid) if getPlayerStorageValue(cid, storage) <= 0 then doPlayerAddAddons(cid, 1) doPlayerAddAddons(cid, 2) setPlayerStorageValue(cid, storage, 1) end return true end Em creaturescripts.xml adicione essa tag: <event type="login" name="AddonLogin" event="script" value="loginaddon.lua"/> - Tópico do quote
Informação Importante
Confirmação de Termo