
Tudo que Sekk postou
-
ip change
static.otland.net/ipchanger.exe
-
Colocar uma "Pos" na script e Aparecer efeito diferente se for x vocation
como assim mano? adicionar uma pos? q
-
[PEDIDO] Stamina para todos
N sei se funfa mas tenta ai staminarfl.lua local rfl = 42 * 60 * 1000 local sto = 1010102 function onUse(cid, item, frompos, item2, topos) if not isPlayer(cid) then return true end if (getPlayerStorageValue(cid, sto) <= 0 and getPlayerStorageValue(cid, sto) < 2) then setPlayerStorageValue(cid, sto, 1) doPlayerSetStamina(cid, rfl) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(MESSAGE_INFO_DESCR, "Your stamina is refueled.") else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Sorry, you cannot use this stamina refuel anymore.") end if getPlayerStorageValue(cid, sto) == 1 then setPlayerStorageValue(cid, sto, 2) doPlayerSetStamina(cid, rfl) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(MESSAGE_INFO_DESCR, "Your stamina is refueled.") else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Sorry, you cannot use this stamina refuel anymore.") end return true end <action actionid="2828" event="script" value="staminarfl.lua"/> em actionid vc coloca qualquer actionid, ai no item pelo rme vc coloca o numero que vc escolheu em actionid
-
(Resolvido)Não reconhecer do group 4+
tenho quase certeza que é edição na source, nada a ver com criar conta e bla bla bla
-
Script Exp Scroll
function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) ~= 1 then doPlayerSendCancel(cid, "Sorry, only players level 1 can use this item.") else local amount = getExperienceForLevel(80) - getPlayerExperience(cid) doPlayerAddExperience(cid, amount) doRemoveItem(item.uid, 1) end return true end o script faz o calculo: exp do lvl 80 - exp do lvl atual do player, o resultado é o exp q vai add pro player
-
Script Exp Scroll
Atualizei o codigo la pra remover o item ao usar, revê ele
-
Script Exp Scroll
Cria um arquivo em actions/scripts chamado pergaminho.lua e coloque aquele código dentro, ai no actions.xml vc coloca isso: <action itemid="8306" event="script" value="pergaminho.lua"/> no lugar de 8306 vc coloca o id do item que vai usar
-
Script Exp Scroll
Presumo que você saiba adicionar a tag do actions.xml function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) ~= 1 then doPlayerSendCancel(cid, "Sorry, only players level 1 can use this item.") return true else local amount = getExperienceForLevel(80) - getPlayerExperience(cid) doPlayerAddExperience(cid, amount) doRemoveItem(item.uid, 1) end return true end
-
Secure Mode Pvp não funciona
Consegui resolver registrando isso no luascript.cpp também: //getPlayerSecureMode lua_register(m_luaState, "getPlayerSecureMode", LuaInterface::luaGetPlayerSecureMode); //getPlayerFightMode lua_register(m_luaState, "getPlayerFightMode", LuaInterface::luaGetPlayerFightMode); E também no creaturescripts, só usei isso: function onCombat(cid, target) if (target and isPlayer(target) and getPlayerSecureMode(cid) == 0) then doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.") return false elseif (target and isPlayer(target) and getPlayerSecureMode(cid) == 1) then return true end return true end obrigado ao @robi123 Mas estou com outro problema: Se algum player pegar skull(white, red ou black) ele ainda n pode ser atacado se a mão estiver aberta, preciso fechá-la para atacar e também quando um player ataca alguem que tenha skull, ele não pega pz(espadas vermelhas cruzadas), e n sei como arrumar isso... Preciso da ajuda de vcs Ja tentei deixar o script desse modo, só uma gambiarra pra ter uma noção, ta mal feito, se funcionasse eu melhoraria um pouco ele, mas não funcionou, veja: function onCombat(cid, target) if (target and isPlayer(target) and getPlayerSecureMode(cid) == 0) then doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.") return false elseif (target and isPlayer(target) and getPlayerSecureMode(cid) == 1) then return true elseif (target and isPlayer(target) and getPlayerSecureMode(cid) == 0 and getCreatureSkullType(target) == SKULL_WHITE) then return true elseif (target and isPlayer(target) and getPlayerSecureMode(cid) == 0 and getCreatureSkullType(target) == SKULL_RED) then return true elseif (target and isPlayer(target) and getPlayerSecureMode(cid) == 0 and getCreatureSkullType(target) == SKULL_BLACK) then return true end return true end E nem assim: function onCombat(cid, target) if (target and isPlayer(target) and getPlayerSecureMode(cid) == 0) then doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.") return false elseif (target and isPlayer(target) and getPlayerSecureMode(cid) == 1) then return true elseif (getPlayerSecureMode(cid) == 0 and getCreatureSkullType(target) == SKULL_WHITE) then return true elseif (getPlayerSecureMode(cid) == 0 and getCreatureSkullType(target) == SKULL_RED) then return true elseif (getPlayerSecureMode(cid) == 0 and getCreatureSkullType(target) == SKULL_BLACK) then return true end return true end @xWhiteWolf @Fir3element @Vodkart podem ajudar?
-
(Resolvido)Erro end, else, function... help?
function onUse(cid, item, frompos, item2, topos) if (isInArray({2, 6, 10}, getPlayerVocation(cid))) then AtiveGem(cid, item) elseif getPlayerStorageValue(cid, 45783) > 0 then doPlayerSendCancel(cid, "Você já está sob o efeito de uma Magic Gem.") end return true end
-
(Resolvido)Impedir que script deixe de funcionar ao logar
Quando o playere desloga, o script logout entra em ação. Deleta esse creaturescript <event type="logout" name="perderefeito" event="script" value="perderefeito.lua"/> e o script referente a ele tbm, alem de tirar o registro do login.lua
-
Safe Mod para tibia 8.6
@robi123 vlw mano, criei ate um topico pq eu tava com um problema e vc arrumou uahsudha Mas outra coisa... @xWhiteWolf To usando esse sistema q o robi colocou, mas tipo, eu to com a mãozinha aberta, o target é PK, n tem como deixar possivel pra atacar ele msm estando com a mão aberta? ou também, ao fechar a mão e atacar o pk, pegar pz(espada vermelha cruzada sabe?) vlw Obs.: Tive que adicionar um ultimo return true no script, ficando assim: function onCombat(cid, target) if(target and isPlayer(target) and getPlayerSecureMode(cid) == 0) then doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.") return false elseif(target and isPlayer(target) and getPlayerSecureMode(cid) == 1) then return true end return true end
-
Secure Mode Pvp não funciona
Já coloquei na source
-
(Resolvido)Não reconhecer do group 4+
No lugar da linha do IF coloca isso: if (getPlayerLevel(cid) < 130 and getPlayerGroupId(cid) < 4) then To fora de casa, se vc n entendeu eu explico dps
-
Secure Mode Pvp não funciona
Bom gente, segui esse tutorial sobre um pvp seguro, tipo, o player deixa a 'mãozinha' aberta, entao nenhuma magia q ele solta em area e nem com target atinge um player, e nem pode mirar no player. A parte da magia ta normal, mas quando eu fecho a 'mãozinha' e tento bater no player aparece isso aqui: [3:0:33.226] [Error - CreatureScript Interface] [3:0:33.228] data/creaturescripts/scripts/pvprotect1.lua:onCombat [3:0:33.231] Description: [3:0:33.232] data/creaturescripts/scripts/pvprotect1.lua:2: attempt to call global 'getPlayerSecureMode' (a nil value) [3:0:33.241] stack traceback: [3:0:33.242] data/creaturescripts/scripts/pvprotect1.lua:2: in function <data/creaturescripts/scripts/pvprotect1.lua:1> Lembrando que quando eu fechasse a mãozinha era pra ser possível atingir players tanto quanto ataques melees, magic e as spells em area também, mas nada afeta ainda, e mirar no player aparece o erro a cima. Meu arquivo pvprotect1 é esse: function onCombat(cid, target) if(target and isPlayer(target) and getPlayerSecureMode(cid)) then doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.") return false end return true end Adicionei os códigos na source corretamente, segue abaixo os mesmos: luascript.cpp int32_t LuaInterface::luaGetPlayerSecureMode(lua_State* L) { //getPlayerSecureMode(cid) ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID((uint32_t)popNumber(L)); if(!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player->getSecureMode()); return 1; } int32_t LuaInterface::luaGetPlayerFightMode(lua_State* L) { //getPlayerFightMode(cid) ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID((uint32_t)popNumber(L)); if(!player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player->getAttackFactor()); return 1; } luascript.h //getPlayerFightMode(cid) static int32_t luaGetPlayerFightMode(lua_State* L); //getPlayerSecureMode(cid) static int32_t luaGetPlayerSecureMode(lua_State* L); @Vodkart @Absolute @zipter98 @Fir3element Obrigado desde ja Edit: Esse é o link do tópico do sistema pvp https://otland.net/threads/securemode-pvp-system.128600/
-
(Resolvido)Fail Compilation TFS 0.4 com nova function
funcionou vlw uahuahs
-
(Resolvido)Add [DNT] Vip System
tenta digitiar com o god: /reload creaturescripts
-
(Resolvido)Add [DNT] Vip System
@ledcar tenta assim entao function onLogin(cid) if getPlayerStorageValue(cid, 13500) >= 1 then local vdays = math.floor((getPlayerStorageValue(cid, 13500) - os.time()) / (24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem ".. vdays .." dias vip restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem dias vip.") end return true end
-
(Resolvido)Alguém pode me dar uma força?
Ali ta indicando q vc n tem o arquivo. Voce tem certeza absoluta que seu actions.xml ta assim <action itemid="9004" event="script" value="vipkyndrai.lua"/> que voce criou um arquivo em actions/scripts chamado vipkyndrai.lua?
-
(Resolvido)Alguém pode me dar uma força?
<action itemid="9004" event="script" value="vipkyndrai.lua"/> e n esquece de colocar aquele codigo num arquivo com esse nome ai
-
(Resolvido)Fail Compilation TFS 0.4 com nova function
up @Fir3element @Absolute
-
(Resolvido)Alguém pode me dar uma força?
na tag do xml q eu passei esqueci de por .lua no nome do arquivo, é só colocar la value="vipkyndrai.lua"
-
(Resolvido)Alguém pode me dar uma força?
@tirso <action itemid="9004" event="script" value="vipkyndrai"/> Tenta ai, se funcionar acho q vc tem uma noção de como alterar o script
-
(Resolvido)[[[ Save Player ]]]]
Boa mlk marca a sua resposta como melhor resposta pra fechar o tópico
-
(Resolvido)[[[ Save Player ]]]]
tenta deixar assim doPlayerSave(cid, true)