Tudo que PsyMcKenzie postou
-
(Um npc qualquer)
function onKill(cid, target, lastHit) if(isMonster(cid)) and (getCreatureName(cid) == "NOMEDOBOSS") then setPlayerStorageValue(lastHit, 15001, 1) doTeleportThing(lastHit,{x=POS DO NPC, y=POS DO NPC, z=POS DO NPC}) end return true end Opa, faltou um "(" aqui, tenta agora.
-
(Um npc qualquer)
NPC1: <?xml version="1.0" encoding="UTF-8"?> <npc name="Npc um" script="NPC1.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="139" head="132" body="79" legs="97" feet="132" corpse="2212"/> <parameters> <parameter key="message_greet" value="Olá, |PLAYERNAME|. Você quer me {ajudar}? Eu posso te recompensar..."/> </parameters> </npc> 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 if(msgcontains(msg, 'ajudar')) then selfSay('Você pode me ajudar? Preciso que mate um {boss} para mim e assim eu lhe darei uma recompensa!', cid) end --------------------------------------------------------- if(msgcontains(msg, 'boss')) then if (getPlayerStorageValue(cid,15001) == -1) then selfSay('Mate o boss e eu irei te recompensar!', cid) doTeleportThing(cid,{x=160, y=54, z=7}) elseif (getPlayerStorageValue(cid,15001) == 1) then selfSay('Você já matou o boss!', cid) end return true end --------------------------------------------------------- if(msgcontains(msg, 'recompensa')) then if (getPlayerStorageValue(cid,15001) == -1) then selfSay('Você ainda não matou o boss!', cid) elseif (getPlayerStorageValue(cid,15001) == 1) then local itemr = doPlayerAddItem(cid, 4863, 1) doSetItemActionId(itemr, 10213) selfSay('Parabéns, aqui está sua recompensa!', cid) end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agora vai em creaturescripts/scripts, crie um arquivo com o nome de boss e adicione: function onKill(cid, target, lastHit) if(isMonster(cid)) and getCreatureName(cid) == "NOMEDOBOSS") then setPlayerStorageValue(lastHit, 15001, 1) doTeleportThing(lastHit,{x=POS DO NPC, y=POS DO NPC, z=POS DO NPC}) end return true end Em creaturescripts.xml adicione a tag: <event type="kill" name="BossKill" event="script" value="boss.lua"/> Em login.lua adicione: registerCreatureEvent(cid, "BossKill") NPC2: <?xml version="1.0" encoding="UTF-8"?> <npc name="Npc dois" script="NPC2.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="139" head="132" body="79" legs="97" feet="132" corpse="2212"/> <parameters> <parameter key="message_greet" value="Olá, |PLAYERNAME|!"/> </parameters> </npc> 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 itemRemove = 105 -- Item que irár "perder" local Outfits = { ["citizen"]={136} } function Remove(cid) if doPlayerRemoveItem(cid,itemRemove, 1) then if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, Outfits[param][1], 3) selfSay("Parabéns, você ganhou um novo outfit!", cid) talkState[talkUser] = 0 else doPlayerPopupFYI(cid, "Você não pode receber o outfit, pois está faltando o item!") return false end end end if getPlayerStorageValue(cid, 15001) == -1 then selfSay("Fale com o outro NPC e volte depois!!") talkState[talkUser] = 0 elseif (msgcontains(msg, 'mission')) then selfSay("Você quer receber seu outfit?") talkState[talkUser] = 1 elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if Remove(cid) then elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Bye!", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) O NPC3 vou tentar fazer e posto aqui. Testa esses e me diz se funcionou.
-
Problema com runa de UH
Não ta healando mais e agora ta healando uma quantidade só, quero que varie um pouco!
-
Pedido sistema descanço
Vai subir life e mana durante esse tempo?
-
Problema com runa de UH
Ainda não funcionou brother, o heal não passa de 700k, coloquei 20 no lugar do 4 e não aumentou quase nada!
-
Problema com runa de UH
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, 35) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 2, 1, 2, 1) function onCastSpell(cid, var) return doCombat(cid, combat, var) end Como faço para aumenta o heal dessa runa? o máximo que consegui foi assim, mas quero que heale mais e de acordo com o level. Tentei colocar negativo, mas não heala nada! Alguém pode me ajudar?
- Exori Mas Frigo [NEW ANIMATION] - BAIAKS
-
[Ajuda] Talkaction /clean não limpa pz
Isso tem que alterar nas sources em map.cpp uint32_t Map::clean() { uint64_t start = OTSYS_TIME(); uint32_t count = 0, tiles = 0; if (g_game.getGameState() == GAME_STATE_NORMAL) { g_game.setGameState(GAME_STATE_MAINTAIN); } for (int32_t z = 0; z < (int32_t)MAP_MAX_LAYERS; z++) { for (uint32_t y = 1; y <= mapHeight; y++) { for (uint32_t x = 1; x <= mapWidth; x++) { Tile* tile = getTile(x, y, z); if (!tile || tile->hasFlag(TILESTATE_HOUSE) || !tile->getItemList()) { continue; } ++tiles; TileItemVector* itemList = tile->getItemList(); ItemVector::iterator it = itemList->begin(), end = itemList->end(); while (it != end) { if ((*it)->isCleanable()) { g_game.internalRemoveItem(*it, -1); it = itemList->begin(); end = itemList->end(); ++count; } else { ++it; } } } } } if (g_game.getGameState() == GAME_STATE_MAINTAIN) { g_game.setGameState(GAME_STATE_NORMAL); } std::cout << "> CLEAN: Removed " << count << " item" << (count != 1 ? "s" : "") << " from " << tiles << " tile" << (tiles != 1 ? "s" : "") << " in " << (OTSYS_TIME() - start) / (1000.) << " seconds." << std::endl; return count; }
-
pedido de client
Cara, quase 100% das pessoas que jogam poketibia preferem o OTClient.
-
.
Também tava precisando disso ae e uso o mesmo sistema!
-
(Resolvido)Perde tudo quando morre
Posta o xml aqui do creaturescripts! Tem algum item editado no server que previne de perder itens?
- BAIAK 8.6 NOVO - VIP15 - AURA SYSTEM - EVENTOS - MAGIAS NOVAS - REFINAMENTO
- [Floresta Encantada] New Event - Exclusivo
-
[PEDIDO] PET System Diferente
O que to testando também, acho que até amanhã já terminei, mas não tem nada demais. Apenas o pet e o npc para revivê-lo. Aí as alterações são com você.
-
[PEDIDO] PET System Diferente
Qual a versão do tfs? Tenho um aqui, quase 100%, mas não usa talk e não tem level. Com algumas alterações da pra deixar mais ou menos como você quer..
-
Problema com item que da vip e promotion
Não funcionou brother, infelizmente ele volta como elder druid, que no caso foi a vocação que escolhi pra testar.
-
Criar acc no phpMyAdmin
Alguém pode me ensinar como faço isso? Acho que por eu trocar de xampp no meio do processo, a minha conta foi apagada, pois agora o phpMyAdmin está configurado para não precisar de senha.
-
Instalei site, mas server continua sql
Galera, eu instalei meu site, mas meu server continua sql, alguém sabe o que pode estar acontecendo ou se tem algo que ainda não fiz?
-
[ENQUETE] POT trapando player versão 8.60
Também penso o mesmo.
-
Problema com item que da vip e promotion
A vip continua, só a promotion mesmo que sai. vip = { name = "Vip system"; author = "Mock"; version = "1.0.0.0"; query="ALTER TABLE `accounts` ADD `vip_time` INTEGER"; query2="ALTER TABLE `accounts` ADD `vip_time` INT(15) NOT NULL" } function vip.setTable() dofile('config.lua') if sqlType == "sqlite" then db.executeQuery(vip.query) else db.executeQuery(vip.query2) end end function vip.getVip(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == FALSE then error('Player don\'t find') end; ae = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..getPlayerAccount(cid).."';") if ae:getID() == -1 then return 0 end local retee = ae:getDataInt("vip_time") or 0 ae:free() return retee end function vip.getVipByAcc(acc) assert(acc,'Account is nil') local a = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';") if a:getID() ~= -1 then return a:getDataInt("vip_time") or 0, a:free() else error('Account don\'t find.') end end function vip.setVip(cid,time) dofile("config.lua") assert(tonumber(cid),'Parameter must be a number') assert(tonumber(time),'Parameter must be a number') if isPlayer(cid) == FALSE then error('Player don\'t find') end; db.executeQuery("UPDATE `"..sqlDatabase.."`.`accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='".. getPlayerAccount(cid).."';") end function vip.getVipByAccount(acc) assert(acc,'Account is nil') return db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';"):getDataInt("vip_time") or 0 end function vip.hasVip(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == FALSE then error('Player don\'t find') end; local t = vip.getVip(cid) or 0 if os.time(day) < t then return TRUE else return FALSE end end function vip.accountHasVip(acc) assert(acc,'Account is nil') if os.time() < vip.getVipByAccount(acc) then return TRUE else return FALSE end end function vip.getDays(days) return (3600 * 24 * days) end function vip.addVipByAccount(acc,time) assert(acc,'Account is nil') assert(tonumber(time),'Parameter must be a number') local a = vip.getVipByAcc(acc) a = os.difftime(a,os.time()) if a < 0 then a = 0 end; a = a+time return vip.setVipByAccount(acc,a) end function vip.setVipByAccount(acc,time) dofile("config.lua") assert(acc,'Account is nil') assert(tonumber(time),'Parameter must be a number') db.executeQuery("UPDATE `accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='"..acc.."';") return TRUE end function vip.returnVipString(cid) assert(tonumber(cid),'Parameter must be a number') if isPlayer(cid) == TRUE then return os.date("%d %B %Y %X ", vip.getVip(cid)) end end
-
Colocar OT online - Problema
Cara, vou ligar na empresa da minha net para liberarem essas portas de onde? Não entendi o que disse.
-
Problema com item que da vip e promotion
Amigo, não funcionou Não adiciona promotion ao player. Tipo, adiciona na hora, mas quando o player reloga volta pra promotion normal.
-
Erro na instalação do site Gesior
Warning: parse_ini_file(C:\Users\User\Desktop\Soft OTconfig.lua) [function.parse-ini-file]: failed to open stream: No such file or directory in C:\xampp\htdocs\config-and-functions.php on line 13 Database error. Unknown database type in C:\Users\User\Desktop\Soft OTconfig.lua . Must be equal to: "mysql" or "sqlite". Now is: "" Fui instalar o site e apareceu esse erro. Alguém sabe como posso arrumar?
- BAIAK 8.6 NOVO - VIP15 - AURA SYSTEM - EVENTOS - MAGIAS NOVAS - REFINAMENTO
-
Colocar OT online - Problema
Galera, to tentando colocar meu servidor online, mas não ta dando certo, já liberei as portas no firewall, troquei o ip no config.lua, criei o ipfixo, mas nada adianta. Uso fibra ótica e estou com o modem conectado diretamente no computador, não estou usando o roteador. Alguém sabe o que pode ser?