Ir para conteúdo

Danihcv

Conde
  • Total de itens

    926
  • Registro em

  • Última visita

  • Dias Ganhos

    17

Histórico de Reputação

  1. Upvote
    Danihcv recebeu reputação de leozinpbb em [PEDINDO] Base NTO Server Aquela Base Igual a do NTO WAR   
    Download removido, a pedido de suposto autor do conteúdo. E como ninguem mais reivindicou a autoria deste conteúdo, resolvi remover o conteúdo, conforme solicitado.
  2. Upvote
    Danihcv recebeu reputação de Spring Trap em [PEDIDO] modificaçao desse script pfv   
    Tópico movido para dúvidas / pedidos resolvidos.
  3. Upvote
    Danihcv recebeu reputação de Spring Trap em ADDVip   
    Tópico movido para dúvidas / pedidos resolvidos.
  4. Upvote
    Danihcv recebeu reputação de Elias Palermo em Teleport que muda outfit   
    ahuahuahu, que nada. ^^
     
    Para usar esse sistema em outros portais, vc deve mudar o action id (lembrando que os portais de fim/inicio do circuito devem conter sempre a msm action id entre si) e eu tb aconselho a vc mudar o str, da seguinte forma:
    No 1° sistema vc deixa do jeito que está:
    No 2° sistema vc já muda:
    No 3°, a msm coisa:
    E assim por diante.
  5. Upvote
    Danihcv recebeu reputação de Elias Palermo em Teleport que muda outfit   
    Vê qual erro dá agr.. sauhsahusahusa
     
    local posEntrada = {x = 69691, y= 73731, z= 7} --posicao para onde o player será levado ao entrar no 1 portallocal posSaida = {x = 69691, y= 73731, z= 7} --posicao para onde o player será levado ao sair pelo 2 portallocal outfitfemale = 136 --outfit que o player recebera ao entrar no portal, se for femealocal outfitmale = 128 --outfit que o player recebera ao entrar no portal, se for macholocal info = {} --deixe isso da forma como estalocal str = "dentroDoTp" --deixe da forma que estafunction onStepIn(cid, position) if getPlayerStorageValue(cid, str) < 1 then setPlayerStorageValue(cid, str, 1) doTeleportThing(cid, posEntrada) table.insert(info, getPlayerGUID(cid), getCreatureOutfit(cid)) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, {lookType=outfitfemale}) doSendMagicEffect(getPlayerPosition(cid), 12) else doCreatureChangeOutfit(cid, {lookType=outfitmale}) doSendMagicEffect(getPlayerPosition(cid), 12) end else setPlayerStorageValue(cid, str, 0) doTeleportThing(cid, posSaida) doSendMagicEffect(getPlayerPosition(cid), 12) outfitOld = info[getPlayerGUID(cid)] doCreatureChangeOutfit(cid, outfitOld) table.remove(info, getPlayerGUID(cid)) endreturn trueend  
  6. Upvote
    Danihcv recebeu reputação de PsyMcKenzie em Diferença nas versões   
    Sim, são as funções. As vezes as funções mudam sua forma de serem escritas, as vezes certas funções são removidas, outras são adicionadas...
    A seguir tem 3 tópicos com todas as funções do tfs nas versões 0.2, 0.3/0.4 e 1.0 para que vc possa observar essas mudanças:
    tfs 0.2
    tfs 0.3/0.4
    tfs 1.0
  7. Upvote
    Danihcv recebeu reputação de Leopard em Unknown column 'key' in 'field list'   
    @Leopard, tenta:
    ALTER TABLE accounts ADD key VARCHAR(32) NOT NULL DEFAULT '0';  
  8. Upvote
    Danihcv recebeu reputação de Furabio em Unknown column 'key' in 'field list'   
    @Leopard, tenta:
    ALTER TABLE accounts ADD key VARCHAR(32) NOT NULL DEFAULT '0';  
  9. Upvote
    Danihcv deu reputação a Skulls em [Attack!] Histórias   
    Confira o que há de novo [Attack!] Histórias.
     
    , Confira o que há de novo [Attack!] Histórias.
  10. Upvote
    Danihcv deu reputação a Skulls em [Attack!] Apresentação   
    Confira o que há de novo [Attack!] Apresentação.
     
    , Confira o que há de novo [Attack!] Apresentação.
  11. Upvote
    Danihcv recebeu reputação de Furabio em Ajuda Script   
    wtf. Foi meu auto-complete. Malz sahusahusahuas
     
    local failout = {73,75,302,266,45,10} -- outfits proibidaslocal storagevip = 85258 --storage da vipfunction onSay(cid, words, param, channel)local t = string.explode(param, ",")t[1] = tonumber(t[1])if getPlayerStorageValue(cid, storagevip) < os.time() thendoPlayerSendCancel(cid,"Você precisa ser VIP para usar este comando.")elseif(param == '') thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")elseif not(t[1]) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")elseif isInArray(failout, t[1]) thendoPlayerSendCancel(cid,"Não pode usar estas outfit.")elseif(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")elselocal tmp = getCreatureOutfit(cid)tmp.lookType = t[1]doCreatureChangeOutfit(cid, tmp)endreturn trueend  
  12. Upvote
    Danihcv recebeu reputação de Adriez em Ajuda Script   
    wtf. Foi meu auto-complete. Malz sahusahusahuas
     
    local failout = {73,75,302,266,45,10} -- outfits proibidaslocal storagevip = 85258 --storage da vipfunction onSay(cid, words, param, channel)local t = string.explode(param, ",")t[1] = tonumber(t[1])if getPlayerStorageValue(cid, storagevip) < os.time() thendoPlayerSendCancel(cid,"Você precisa ser VIP para usar este comando.")elseif(param == '') thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")elseif not(t[1]) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")elseif isInArray(failout, t[1]) thendoPlayerSendCancel(cid,"Não pode usar estas outfit.")elseif(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")elselocal tmp = getCreatureOutfit(cid)tmp.lookType = t[1]doCreatureChangeOutfit(cid, tmp)endreturn trueend  
  13. Upvote
    Danihcv recebeu reputação de Adriez em Comando Vip   
    Não testei. Vê se funfa:
    local days = 2 --dias que o player irá ganhar de vipfunction onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Por favor, não esqueça de informar o nome do membro.") return false end player = getPlayerByNameWildcard(tostring(param)) if not (isInArray(getPlayersOnline(), player)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O membro informado não existe ou não está online.") return false endsetPlayerStorageValue(player, 85258, (os.time()+(days*24*60*60)))doSendMagicEffect(getPlayerPosition(player), math.random(28,30))local quantity = math.floor((getPlayerStorageValue(player, 85258) - os.time())/(24 * 60 * 60))doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você ganhou mais "..days.." dias de VIP. Agora lhe restam "..quantity.." dias de VIP.")return trueend  
     
    Se não souber instalar a talkaction basta falar q eu te ajudo.
  14. Upvote
    Danihcv recebeu reputação de luciano0223 em Level inicial e itens iniciais   
    Para configurar o level, vc tem que ir no seu config.lua
    Procure por algo do tipo:
    newPlayerLevel = 8 Agora os itens iniciais. O server geralmente tem um script responsável por isso. Mande o seu creaturescripts.xml e também diga quais são os mods que vc tem dentro da sua pasta mods para que eu possa identificar onde o seu script de first items está.
  15. Upvote
    Danihcv deu reputação a miguel223 em Item que heala   
    Em actions.xml, adicione a seguinte linha: 
     
          <action itemid="7716" script="regitem.lua"/>
     
    Em actions/scripts/, crie um arquivo chamado regitem.lua e adicione:
     
    function onUse(cid, item, fromPosition, itemEx, toPosition)
     
    if getPlayerStorageValue(cid, 12543) <= os.time() then
    setPlayerStorageValue(cid, 12543, os.time() + 10*60)
    setPlayerStorageValue(cid, 12544, 1)
    doPlayerSendTextMessage(cid, 22, "Voce usou um regeneration item. Durante 10 min, voce invocara forcas e, depois, restaurara sua vida e mana maximas. Ate la, aguarde.")
    doRemoveItem(item.uid, 1)
    doCreateItem(7717, 1, fromPosition)
    else
    doPlayerSendCancel(cid, "Voce ainda esta invocando forcas jogador. Nao podera usar outro regeneration item ate acabar esta invocacao.")
    end
     
    return true
    end
     
    Em creaturescripts/scripts/, crie um arquivo chamado regitem.lua e adicione:
     
     
     
  16. Upvote
    Danihcv recebeu reputação de Skulls em [Evento] Manda Bugues!   
    Ótima forma de todos participarem da evolução do fórum. Parabéns pela iniciativa.
  17. Upvote
    Danihcv recebeu reputação de Liipe Silva3 em [TFS 1.1] Lua functions - funções   
    Olá, xTibianos. Hoje lhes trago mais uma lista de funções. Dessa vez é do TFS 1.1.
     
    Source functions - Funções da source addDamageCondition(condition, rounds, time, value) addEvent(callback, delay, ...) addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet) addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet[, lookAddons, lookMount]) canJoin(player) cleanMap() closeShopWindow(cid) Combat() combat:execute(creature, variant) combat:setArea(area) combat:setCallback(key, function) combat:setCondition(condition) combat:setFormula(type, mina, minb, maxa, maxb) combat:setOrigin(origin) combat:setParameter(key, value) Condition(conditionType[, conditionId = CONDITIONID_COMBAT]) condition:addDamage(rounds, time, value) condition:clone() condition:delete() condition:getEndTime() condition:getIcons() condition:getId() condition:getSubId() condition:getTicks() condition:getType() condition:setFormula(mina, minb, maxa, maxb) condition:setOutfit(lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet[, lookAddons[, lookMount]]) condition:setOutfit(outfit) condition:setParameter(key, value) condition:setTicks(ticks) Container(uid) container:addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]]) container:addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]]) container:getCapacity() container:getEmptySlots([recursive = false]) container:getItem(index) container:getItemCountById(itemId[, subType = -1]) container:getItemHoldingCount() container:getSize() container:hasItem(item) createCombatArea( {area}, <optional> {extArea} ) createCombatObject() createConditionObject(type) Creature(id or name or userdata) creature:addCondition(condition[, force = false]) creature:addHealth(healthChange) creature:addMana(manaChange[, animationOnLoss = false]) creature:canSee(position) creature:canSeeCreature(creature) creature:changeSpeed(delta) creature:getBaseSpeed() creature:getCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0]]) creature:getDamageMap() creature:getDescription(distance) creature:getDirection() creature:getFollowCreature() creature:getHealth() creature:getId() creature:getLight() creature:getMana() creature:getMaster() creature:getMaxHealth() creature:getMaxMana() creature:getName() creature:getOutfit() creature:getParent() creature:getPathTo(pos[, minTargetDist = 0[, maxTargetDist = 1[, fullPathSearch = true[, clearSight = true[, maxSearchDist = 0]]]]]) creature:getPosition() creature:getSkull() creature:getSpeed() creature:getSummons() creature:getTarget() creature:getTile() creature:isCreature() creature:isHealthHidden() creature:isInGhostMode() creature:isRemoved() Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive) Creature:onChangeOutfit(outfit) or Creature.onChangeOutfit(self, outfit) Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target) creature:registerEvent(name) creature:remove() creature:removeCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0[, force = false]]]) creature:say(text, type[, ghost = false[, target = nullptr[, position]]]) creature:setDirection(direction) creature:setDropLoot(doDrop) creature:setFollowCreature(followedCreature) creature:setHiddenHealth(hide) creature:setLight(color, level) creature:setMaster(master) creature:setMaxHealth(maxHealth) creature:setOutfit(outfit) creature:setSkull(skull) creature:setTarget(target) creature:teleportTo(position[, pushMovement = false]) creature:unregisterEvent(name) debugPrint(text) doAddContainerItem(uid, itemid, <optional> count/subtype) doAreaCombatCondition(cid, pos, area, condition, effect) doAreaCombatDispel(cid, pos, area, type, effect) doAreaCombatHealth(cid, type, pos, area, min, max, effect) doAreaCombatHealth(cid, type, pos, area, min, max, effect[, origin = ORIGIN_SPELL]) doAreaCombatMana(cid, pos, area, min, max, effect) doAreaCombatMana(cid, pos, area, min, max, effect[, origin = ORIGIN_SPELL]) doChallengeCreature(cid, target) doCombat(cid, combat, param) doCreateItem(itemid, <optional> type/count, pos) doCreateItem(itemid, type/count, pos) doCreateItemEx(itemid, <optional> count/subtype) doMoveCreature(cid, direction) doNpcSetCreatureFocus(cid) doPlayerAddItem(cid, itemid, <optional: default: 1> count, <optional: default: 1> canDropOnMap, <optional: default: 1>subtype) doPlayerAddItem(cid, itemid, <optional: default: 1> count/subtype, <optional: default: 1> canDropOnMap) doPlayerAddItem(uid, itemid, <optional: default: 1> count/subtype) doPlayerSetOfflineTrainingSkill(cid, skill) doPlayerSetOfflineTrainingSkill(cid, skillid) doSellItem(cid, itemid, amount, <optional> subtype, <optional> actionid, <optional: default: 1> canDropOnMap) doSetCreatureLight(cid, lightLevel, lightColor, time) doSetCreatureOutfit(cid, outfit, time) doSetItemOutfit(cid, item, time) doSetMonsterOutfit(cid, name, time) doTargetCombatCondition(cid, target, condition, effect) doTargetCombatDispel(cid, target, type, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect[, origin = ORIGIN_SPELL]) doTargetCombatMana(cid, target, min, max, effect) doTargetCombatMana(cid, target, min, max, effect[, origin = ORIGIN_SPELL) doTileAddItemEx(pos, uid) Game.createContainer(itemId, size[, position]) Game.createItem(itemId[, count[, position]]) Game.createMonster(monsterName, position[, extended = false[, force = false]]) Game.createNpc(npcName, position[, extended = false[, force = false]]) Game.createTile(position[, isDynamic = false]) Game.createTile(x, y, z[, isDynamic = false]) Game.getExperienceStage(level) Game.getGameState() Game.getHouses() Game.getMonsterCount() Game.getNpcCount() Game.getPlayerCount() Game.getPlayers() Game.getReturnMessage(value) Game.getSpectators(position[, multifloor = false[, onlyPlayer = false[, minRangeX = 0[, maxRangeX = 0[, minRangeY = 0[, maxRangeY = 0]]]]]]) Game.getTowns() Game.getWorldType() Game.loadMap(path) Game.setGameState(state) Game.setWorldType(type) Game.startRaid(raidName) getCreatureCondition(cid, condition[, subId]) getDepotId(uid) getDistanceTo(uid) getNpcCid() getNpcParameter(paramKey) getPlayerFlagValue(cid, flag) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getWaypointPosition(name) getWaypointPositionByName(name) getWorldLight() getWorldTime() getWorldUpTime() Group(id) group:getAccess() group:getFlags() group:getId() group:getMaxDepotItems() group:getMaxVipEntries() group:getName() Guild(id) guild:addMember(player) guild:addRank(id, name, level) guild:getId() guild:getMembersOnline() guild:getMotd() guild:getName() guild:getRankById(id) guild:getRankByLevel(level) guild:removeMember(player) guild:setMotd(motd) House(id) house:getAccessList(listId) house:getBedCount() house:getBeds() house:getDoorCount() house:getDoors() house:getExitPosition() house:getId() house:getName() house:getOwnerGuid() house:getRent() house:getTileCount() house:getTiles() house:getTown() house:setAccessList(listId, list) house:setOwnerGuid(guid[, updateDatabase = true]) isDepot(uid) isInArray(array, value) isInWar(cid, target) isMovable(uid) isMoveable(uid) isType(derived, base) isValidUID(uid) Item(uid) item:clone() item:decay() item:getActionId() item:getArticle() item:getAttribute(key) item:getCharges() item:getCount() item:getDescription(distance) item:getFluidType() item:getId() item:getName() item:getParent() item:getPluralName() item:getPosition() item:getSubType() item:getTile() item:getTopParent() item:getUniqueId() item:getWeight() item:hasAttribute(key) item:hasProperty(property) item:isItem() item:moveTo(position or cylinder) item:remove([count = -1]) item:removeAttribute(key) item:setActionId(actionId) item:setAttribute(key, value) item:split([count = 1]) item:transform(itemId[, count/subType = -1]) ItemType(id or name) itemType:getArmor() itemType:getArticle() itemType:getAttack() itemType:getCapacity() itemType:getCharges() itemType:getClientId() itemType:getDecayId() itemType:getDefense() itemType:getDescription() itemType:getElementDamage() itemType:getElementType() itemType:getExtraDefense() itemType:getFluidSource() itemType:getHitChance() itemType:getId() itemType:getName() itemType:getPluralName() itemType:getRequiredLevel() itemType:getShootRange() itemType:getSlotPosition() itemType:getTransformDeEquipId() itemType:getTransformEquipId() itemType:getType() itemType:getWeaponType() itemType:getWeight([count = 1]) itemType:hasSubType() itemType:isContainer() itemType:isCorpse() itemType:isDoor() itemType:isFluidContainer() itemType:isMovable() itemType:isReadable() itemType:isRune() itemType:isStackable() itemType:isWritable() ModalWindow(id, title, message) modalWindow:addButton(id, text) modalWindow:addChoice(id, text) modalWindow:getButtonCount() modalWindow:getChoiceCount() modalWindow:getDefaultEnterButton() modalWindow:getDefaultEscapeButton() modalWindow:getId() modalWindow:getMessage() modalWindow:getTitle() modalWindow:hasPriority() modalWindow:sendToPlayer(player) modalWindow:setDefaultEnterButton(buttonId) modalWindow:setDefaultEscapeButton(buttonId) modalWindow:setMessage(text) modalWindow:setPriority(priority) modalWindow:setTitle(text) Monster(id or userdata) monster:addFriend(creature) monster:addTarget(creature[, pushFront = false]) monster:getFriendCount() monster:getFriendList() monster:getSpawnPosition() monster:getTargetCount() monster:getTargetList() monster:getType() monster:isFriend(creature) monster:isIdle() monster:isInSpawnRange([position]) monster:isMonster() monster:isOpponent(creature) monster:isTarget(creature) monster:removeFriend(creature) monster:removeTarget(creature) monster:searchTarget([searchType = TARGETSEARCH_DEFAULT]) monster:selectTarget(creature) monster:setIdle(idle) MonsterType(id or name) monsterType:canPushCreatures() monsterType:canPushItems() monsterType:getArmor() monsterType:getAttackList() monsterType:getBaseSpeed() monsterType:getChangeTargetChance() monsterType:getChangeTargetSpeed() monsterType:getCombatImmunities() monsterType:getConditionImmunities() monsterType:getCorpseId() monsterType:getCreatureEvents() monsterType:getDefense() monsterType:getDefenseList() monsterType:getElementList() monsterType:getExperience() monsterType:getHealth() monsterType:getLight() monsterType:getLoot() monsterType:getManaCost() monsterType:getMaxHealth() monsterType:getMaxSummons() monsterType:getName() monsterType:getNameDescription() monsterType:getOutfit() monsterType:getRace() monsterType:getRunHealth() monsterType:getStaticAttackChance() monsterType:getSummonList() monsterType:getTargetDistance() monsterType:getVoices() monsterType:getYellChance() monsterType:getYellSpeedTicks() monsterType:isAttackable() monsterType:isConvinceable() monsterType:isHealthShown() monsterType:isHostile() monsterType:isIllusionable() monsterType:isPushable() monsterType:isSummonable() NetworkMessage() networkMessage:addByte(number) networkMessage:addDouble(number) networkMessage:addItem(item) networkMessage:addItemId(itemId) networkMessage:addPosition(position) networkMessage:addString(string) networkMessage:addU16(number) networkMessage:addU32(number) networkMessage:addU64(number) networkMessage:getByte() networkMessage:getPosition() networkMessage:getString() networkMessage:getU16() networkMessage:getU32() networkMessage:getU64() networkMessage:reset() networkMessage:sendToPlayer(player) networkMessage:skipBytes(number) Npc([id or name or userdata]) npc:closeShopWindow(player) npc:getParameter(key) npc:getSpeechBubble() npc:isNpc() npc:openShopWindow(cid, items, buyCallback, sellCallback) npc:setFocus(creature) npc:setMasterPos(pos[, radius]) npc:setSpeechBubble(speechBubble) onaddItem(moveitem, tileitem, pos) onAdvance(player, skill, oldLevel, newLevel) onBuy(player, itemid, count, amount, ignore, inbackpacks) onCastSpell(creature, var) onCastSpell(creature, var, isHotkey) onCreatureAppear(creature) onCreatureAppear(self, creature) onCreatureDisappear(creature) onCreatureDisappear(self, creature) onCreatureMove(creature, oldPos, newPos) onCreatureMove(self, creature, oldPosition, newPosition) onCreatureSay(creature, type, msg) onCreatureSay(self, creature, type, message) onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified) onDeEquip(player, item, slot) onEquip(player, item, slot) onExtendedOpcode(player, opcode, buffer) onGetPlayerMinMaxValues(...) onGetPlayerMinMaxValues(player, attackSkill, attackValue, attackFactor) onGetPlayerMinMaxValues(player, level, maglevel) onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) onJoin(player) onKill(creature, target) onLeave(player) onLogin(player) onLogout(player) onManaChange(creature, attacker, manaChange, origin) onModalWindow(player, modalWindowId, buttonId, choiceId) onPlayerCloseChannel(player) onPlayerEndTrade(player) onPrepareDeath(creature, killer) onRaid() onRecord(current, old) onRemoveItem(moveitem, tileitem, pos) onSay(player, words, param, type) onSpeak(player, type, message) onStepIn(creature, item, pos, fromPosition) onStepOut(creature, item, pos, fromPosition) onTargetCombat(creature, target) onTextEdit(player, item, text) onThink() onThink(creature, interval) onThink(self, interval) onTileCombat(creature, pos) onUse(player, item, fromPosition, target, toPosition, isHotkey) onUseWeapon(player, var) openShopWindow(cid, items, onBuy callback, onSell callback) os.mtime() party:addInvite(player) party:addMember(player) party:disband() party:getInviteeCount() party:getInvitees() party:getLeader() party:getMemberCount() party:getMembers() party:isSharedExperienceActive() party:isSharedExperienceEnabled() Party:onDisband() or Party.onDisband(self) Party:onJoin(player) or Party.onJoin(self, player) Party:onLeave(player) or Party.onLeave(self, player) party:removeInvite(player) party:removeMember(player) party:setLeader(player) party:setSharedExperience(active) party:shareExperience(experience) Player(id or name or userdata) player:addBlessing(blessing) player:addExperience(experience[, sendText = false]) player:addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]]) player:addItemEx(item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]]) player:addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]]) player:addManaSpent(amount) player:addMapMark(position, type, description) player:addMoney(money) player:addMount(mountId) player:addOutfit(lookType) player:addOutfitAddon(lookType, addon) player:addPremiumDays(days) player:addSkillTries(skillType, tries) player:addSoul(soulChange) player:canLearnSpell(spellName) player:channelSay(speaker, type, text, channelId) player:forgetSpell(spellName) player:getAccountId() player:getAccountType() player:getBankBalance() player:getBaseMagicLevel() player:getCapacity() player:getClient() player:getContainerById(id) player:getContainerId(container) player:getContainerIndex(id) player:getDeathPenalty() player:getDepotChest(depotId[, autoCreate = false]) player:getEffectiveSkillLevel(skillType) player:getExperience() player:getFreeCapacity() player:getGroup() player:getGuid() player:getGuild() player:getGuildLevel() player:getGuildNick() player:getHouse() player:getInbox() player:getIp() player:getItemById(itemId, deepSearch[, subType = -1]) player:getItemCount(itemId[, subType = -1]) player:getLastLoginSaved() player:getLastLogout() player:getLevel() player:getMagicLevel() player:getManaSpent() player:getMaxSoul() player:getMoney() player:getParty() player:getPremiumDays() player:getSex() player:getSkillLevel(skillType) player:getSkillPercent(skillType) player:getSkillTries(skillType) player:getSkullTime() player:getSlotItem(slot) player:getSoul() player:getStamina() player:getStorageValue(key) player:getTown() player:getVocation() player:hasBlessing(blessing) player:hasLearnedSpell(spellName) player:hasMount(mountId) player:hasOutfit(lookType[, addon = 0]) player:isPlayer() player:isPzLocked() player:learnSpell(spellName) Player:onBrowseField(position) or Player.onBrowseField(self, position) Player:onGainExperience(source, exp, rawExp) Player:onGainSkillTries(skill, tries) Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance) Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance) Player:onLookInShop(itemType, count) or Player.onLookInShop(self, itemType, count) Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance) Player:onLoseExperience(exp) Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition) Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition) Player:onTradeAccept(target, item, targetItem) Player:onTradeRequest(target, item) Player:onTurn(direction) or Player.onTurn(self, direction) player:openChannel(channelId) player:popupFYI(message) player:removeBlessing(blessing) player:removeExperience(experience[, sendText = false]) player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]]) player:removeMoney(money) player:removeMount(mountId) player:removeOutfit(lookType) player:removeOutfitAddon(lookType, addon) player:removePremiumDays(days) player:save() player:sendChannelMessage(author, text, type, channelId) player:sendOutfitWindow() player:sendPrivateMessage(speaker, text[, type]) player:sendTextMessage(type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]]) player:sendTutorial(tutorialId) player:setAccountType(accountType) player:setBankBalance(bankBalance) player:setCapacity(capacity) player:setGhostMode(enabled) player:setGroup(group) player:setGuild(guild) player:setGuildLevel(level) player:setGuildNick(nick) player:setMaxMana(maxMana) player:setSex(newSex) player:setSkullTime(skullTime) player:setStamina(stamina) player:setStorageValue(key, value) player:setTown(town) player:setVocation(id or name or userdata) player:showTextDialog(itemId[, text[, canWrite[, length]]]) Position([position]) Position([x = 0[, y = 0[, z = 0[, stackpos = 0]]]]) position:getDistance(positionEx) position:isSightClear(positionEx[, sameFloor = true]) position:sendDistanceEffect(positionEx, distanceEffect[, player = nullptr]) position:sendMagicEffect(magicEffect[, player = nullptr]) rawgetmetatable(metatableName) registerClass(className, baseClass, newFunction) registerEnum(value) registerEnumIn(tableName, value) registerGlobalMethod(functionName, function) registerGlobalVariable(name, value) registerMetaMethod(className, functionName, function) registerMethod(className, functionName, function) registerTable(tableName) registerVariable(tableName, name, value) saveServer() selfFollow(player) selfMove(direction) selfMoveTo(x,y,z) selfSay(words[, target]) selfTurn(direction) sendChannelMessage(channelId, type, message) sendGuildChannelMessage(guildId, type, message) setCombatArea(combat, area) setCombatCallBack(combat, key, function_name) setCombatCondition(combat, condition) setCombatFormula(combat, type, mina, minb, maxa, maxb) setCombatParam(combat, key, value) setConditionFormula(combat, mina, minb, maxa, maxb) setConditionFormula(condition, mina, minb, maxa, maxb) setConditionParam(condition, key, value) setmetatable(className, methodsTable) stopEvent(eventid) table.create(arrayLength, keyLength) Teleport(uid) teleport:getDestination() teleport:setDestination(position) Tile(position) Tile(x, y, z) tile:getBottomCreature() tile:getBottomVisibleCreature(creature) tile:getCreatureCount() tile:getCreatures() tile:getDownItemCount() tile:getFieldItem() tile:getGround() tile:getHouse() tile:getItemById(itemId[, subType = -1]) tile:getItemByTopOrder(topOrder) tile:getItemByType(itemType) tile:getItemCount() tile:getItemCountById(itemId[, subType = -1]) tile:getItems() tile:getPosition() tile:getThing(index) tile:getThingCount() tile:getThingIndex(thing) tile:getTopCreature() tile:getTopDownItem() tile:getTopItemCount() tile:getTopTopItem() tile:getTopVisibleCreature(creature) tile:getTopVisibleThing(creature) tile:hasFlag(flag) tile:hasProperty(property[, item]) tile:queryAdd(thing[, flags]) Town(id or name) town:getId() town:getName() town:getTemplePosition() Variant(number or string or position or thing) Variant:getNumber() Variant:getPosition() Variant:getString() version(CLIENT_VERSION_MIN) Vocation(id or name) vocation:getAttackSpeed() vocation:getBaseSpeed() vocation:getCapacityGain() vocation:getClientId() vocation:getDemotion() vocation:getDescription() vocation:getHealthGain() vocation:getHealthGainAmount() vocation:getHealthGainTicks() vocation:getId() vocation:getManaGain() vocation:getManaGainAmount() vocation:getManaGainTicks() vocation:getMaxSoul() vocation:getName() vocation:getPromotion() vocation:getRequiredManaSpent(magicLevel) vocation:getRequiredSkillTries(skillType, skillLevel) vocation:getSoulGainTicks() Data functions - Funções pra LUA Container.isContainer(self) Creature.getClosestFreePosition(self, position, extended) Creature.getPlayer(self) Creature.isItem(self) Creature.isMonster(self) Creature.isNpc(self) Creature.isPlayer(self) Creature.isTile(self) Creature:onAreaCombat(tile, isAggressive) Creature:onChangeOutfit(outfit) Creature:onTargetCombat(target) CreatureIndex(self, key) FocusModule.messageMatcher(keywords, message) FocusModule.onFarewell(cid, message, keywords, parameters) FocusModule.onGreet(cid, message, keywords, parameters) FocusModule:init(handler) FocusModule:new() Game.broadcastMessage(message, messageType) Game.convertIpToString(ip) Game.getReverseDirection(direction) Game.getSkillType(weaponType) Game.getStorageValue(key) Game.setStorageValue(key, value) Item.getType(self) Item.isContainer(self) Item.isCreature(self) Item.isPlayer(self) Item.isTeleport(self) Item.isTile(self) ItemIndex(self, key) ItemType.usesSlot(self, slot) KeywordHandler:addKeyword(keys, callback, parameters) KeywordHandler:getLastNode(cid) KeywordHandler:getRoot() KeywordHandler:moveUp(cid, steps) KeywordHandler:new() KeywordHandler:processMessage(cid, message) KeywordHandler:processNodeMessage(node, cid, message) KeywordHandler:reset(cid) KeywordModule:addKeyword(keywords, reply) KeywordModule:init(handler) KeywordModule:new() KeywordModule:parseKeywords(data) KeywordModule:parseParameters() KeywordNode:addChildKeyword(keywords, callback, parameters) KeywordNode:addChildKeywordNode(childNode) KeywordNode:checkMessage(message) KeywordNode:getKeywords() KeywordNode:getParameters() KeywordNode:getParent() KeywordNode:new(keys, func, param) KeywordNode:processMessage(cid, message) NpcHandler:addFocus(newFocus) NpcHandler:addModule(module) NpcHandler:cancelNPCTalk(events) NpcHandler:doNPCTalkALot(msgs, interval, pcid) NpcHandler:getCallback(id) NpcHandler:getMessage(id) NpcHandler:greet(cid) NpcHandler:isFocused(focus) NpcHandler:isInRange(cid) NpcHandler:new(keywordHandler) NpcHandler:onBuy(creature, itemid, subType, amount, ignoreCap, inBackpacks) NpcHandler:onCreatureAppear(creature) NpcHandler:onCreatureDisappear(creature) NpcHandler:onCreatureSay(creature, msgtype, msg) NpcHandler:onFarewell(cid) NpcHandler:onGreet(cid) NpcHandler:onPlayerCloseChannel(creature) NpcHandler:onPlayerEndTrade(creature) NpcHandler:onSell(creature, itemid, subType, amount, ignoreCap, inBackpacks) NpcHandler:onThink() NpcHandler:onTradeRequest(cid) NpcHandler:onWalkAway(cid) NpcHandler:parseMessage(msg, parseInfo) NpcHandler:processModuleCallback(id, ...) NpcHandler:releaseFocus(focus) NpcHandler:resetNpc(cid) NpcHandler:say(message, focus, publicize, shallDelay, delay) NpcHandler:setCallback(id, callback) NpcHandler:setKeywordHandler(newHandler) NpcHandler:setMaxIdleTime(newTime) NpcHandler:setMessage(id, newMessage) NpcHandler:unGreet(cid) NpcHandler:updateFocus() NpcSystem.getParameter(key) NpcSystem.parseParameters(npcHandler) Party:onDisband() Party:onJoin(player) Party:onLeave(player) Player.addSkillTries(...) Player.feed(self, food) Player.getClosestFreePosition(self, position, extended) Player.getDepotItems(self, depotId) Player.getLossPercent(self) Player.isPremium(self) Player.isUsingOtClient(self) Player.sendCancelMessage(self, message) Player.sendExtendedOpcode(self, opcode, buffer) Player:isPremium() Player:onBrowseField(position) Player:onGainExperience(source, exp, rawExp) Player:onGainSkillTries(skill, tries) Player:onLook(thing, position, distance) Player:onLookInBattleList(creature, distance) Player:onLookInShop(itemType, count) Player:onLookInTrade(partner, item, distance) Player:onLoseExperience(exp) Player:onMoveCreature(creature, fromPosition, toPosition) Player:onMoveItem(item, count, fromPosition, toPosition) Player:onTradeAccept(target, item, targetItem) Player:onTradeRequest(target, item) Player:onTurn(direction) Position.getNextPosition(self, direction, steps) Position.getTile(self) Position:getNextPosition(direction, steps) Position:moveUpstairs() ShopModule.messageMatcher(keywords, message) ShopModule.onConfirm(cid, message, keywords, parameters, node) ShopModule.onDecline(cid, message, keywords, parameters, node) ShopModule.requestTrade(cid, message, keywords, parameters, node) ShopModule.tradeItem(cid, message, keywords, parameters, node) ShopModule:addBuyableItem(names, itemid, cost, itemSubType, realName) ShopModule:addBuyableItemContainer(names, container, itemid, cost, subType, realName) ShopModule:addSellableItem(names, itemid, cost, realName, itemSubType) ShopModule:callbackOnBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) ShopModule:callbackOnModuleReset() ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreEquipped, _) ShopModule:getCount(message) ShopModule:getShopItem(itemId, itemSubType) ShopModule:init(handler) ShopModule:new() ShopModule:parseBuyable(data) ShopModule:parseBuyableContainers(data) ShopModule:parseParameters() ShopModule:parseSellable(data) ShopModule:reset() StdModule.bless(cid, message, keywords, parameters, node) StdModule.learnSpell(cid, message, keywords, parameters, node) StdModule.promotePlayer(cid, message, keywords, parameters, node) StdModule.say(cid, message, keywords, parameters, node) StdModule.travel(cid, message, keywords, parameters, node) Teleport.isTeleport(self) Tile.isCreature(self) Tile.isItem(self) Tile.isTile(self) TravelModule.bringMeTo(cid, message, keywords, parameters, node) TravelModule.listDestinations(cid, message, keywords, parameters, node) TravelModule.onConfirm(cid, message, keywords, parameters, node) TravelModule.onDecline(cid, message, keywords, parameters, node) TravelModule.travel(cid, message, keywords, parameters, node) TravelModule:addDestination(name, position, price, premium) TravelModule:init(handler) TravelModule:new() TravelModule:parseDestinations(data) TravelModule:parseParameters() broadcastMessage(message, messageType) canJoin(player) canPlayerLearnInstantSpell(cid, name) canPlayerWearOutfit(cid, lookType, addons) creatureSayCallback(cid, type, msg) destroyItem(cid, target, toPosition) doAddCondition(cid, conditionId) doAddContainerItemEx(uid, virtualId) doAddMapMark(cid, pos, type, description) doChangeSpeed(cid, delta) doChangeTypeItem(uid, newType) doConvinceCreature(cid, target) doCreateNpc(name, pos, ...) doCreateTeleport(itemId, destination, position) doCreatureAddHealth(cid, health) doCreatureChangeOutfit(cid, outfit) doCreatureSay(cid, text, type, ...) doCreatureSayWithDelay(cid, text, type, delay, e, pcid) doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position) doCreatureSetLookDir(cid, direction) doDecayItem(uid) doForceSummonCreature(name, pos) doMonsterChangeTarget(cid) doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack) doPlayerAddBlessing(cid, blessing) doPlayerAddExp(cid, exp, useMult, ...) doPlayerAddItemEx(cid, uid, ...) doPlayerAddMana(cid, mana, ...) doPlayerAddManaSpent(cid, mana) doPlayerAddMoney(cid, money) doPlayerAddMount(cid, mountId) doPlayerAddOutfit(cid, lookType, addons) doPlayerAddPremiumDays(cid, days) doPlayerAddSkillTry(cid, skillid, n) doPlayerAddSoul(cid, soul) doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges) doPlayerFeed(cid, food) doPlayerJoinParty(cid, leaderId) doPlayerPopupFYI(cid, message) doPlayerRemOutfit(cid, lookType, addons) doPlayerRemoveItem(cid, itemid, count, ...) doPlayerRemoveMoney(cid, money) doPlayerRemoveMount(cid, mountId) doPlayerRemovePremiumDays(cid, days) doPlayerSellItem(cid, itemid, count, cost) doPlayerSendCancel(cid, text) doPlayerSendTextMessage(cid, type, text, ...) doPlayerSetBalance(cid, balance) doPlayerSetGuildLevel(cid, level) doPlayerSetGuildNick(cid, nick) doPlayerSetSex(cid, sex) doPlayerSetTown(cid, town) doPlayerSetVocation(cid, vocation) doPlayerTakeItem(cid, itemid, count) doRelocate(fromPos, toPos) doRemoveCondition(cid, conditionType, subId) doRemoveCreature(cid) doRemoveItem(uid, ...) doSendAnimatedText() doSendDistanceShoot(fromPos, toPos, distanceEffect, ...) doSendMagicEffect(pos, magicEffect, ...) doSendTutorial(cid, tutorialId) doSetCreatureDropLoot(cid, doDrop) doSetItemActionId(uid, actionId) doSetItemSpecialDescription(uid, desc) doSetItemText(uid, text) doSetMonsterTarget(cid, target) doShowTextDialog(cid, itemId, text) doSummonCreature(name, pos, ...) doTeleportThing(uid, dest, pushMovement) doTransformItem(uid, newItemId, ...) firstServerSaveWarning() getAccountNumberByPlayerName(name) getArticle(str) getBlessingsCost(level) getConfigInfo(info) getContainerCap(uid) getContainerCapById(itemId) getContainerItem(uid, slot) getContainerSize(uid) getCount(string) getCreatureBaseSpeed(cid) getCreatureHealth(cid) getCreatureMaster(cid) getCreatureMaxHealth(cid) getCreatureName(cid) getCreatureOutfit(cid) getCreaturePosition(cid) getCreatureSpeed(cid) getCreatureSummons(cid) getCreatureTarget(cid) getDistanceBetween(firstPosition, secondPosition) getExpForLevel(level) getFluidSourceType(itemId) getFormattedWorldTime() getGlobalStorageValue(key) getGuildId(guildName) getHouseAccessList(id, listId) getHouseByPlayerGUID(playerGUID) getHouseEntry(houseId) getHouseName(houseId) getHouseOwner(houseId) getHouseRent(id) getHouseTilesSize(houseId) getHouseTown(houseId) getIPByPlayerName(name) getItemDescriptions(itemId) getItemIdByName(name) getItemName(itemId) getItemRWInfo(uid) getItemWeight(itemId, ...) getItemWeightByUID(uid, ...) getMonsterFriendList(cid) getMonsterTargetList(cid) getMonthDayEnding(day) getMonthString(m) getOnlinePlayers() getPartyMembers(cid) getPlayerAccess(cid) getPlayerAccountType(cid) getPlayerBalance(cid) getPlayerBlessing(cid, blessing) getPlayerByName(name) getPlayerDepotItems(cid, depotId) getPlayerFood(cid) getPlayerFreeCap(cid) getPlayerGUID(cid) getPlayerGUIDByName(name) getPlayerGroupId(cid) getPlayerGuildId(cid) getPlayerGuildLevel(cid) getPlayerGuildName(cid) getPlayerGuildNick(cid) getPlayerGuildRank(cid) getPlayerIp(cid) getPlayerItemById(cid, deepSearch, itemId, ...) getPlayerItemCount(cid, itemId, ...) getPlayerLastLoginSaved(cid) getPlayerLearnedInstantSpell(cid, name) getPlayerLevel(cid) getPlayerLight(cid) getPlayerLookDir(cid) getPlayerLossPercent(cid) getPlayerMagLevel(cid) getPlayerMana(cid) getPlayerMasterPos(cid) getPlayerMaxMana(cid) getPlayerMoney(cid) getPlayerMount(cid, mountId) getPlayerName(cid) getPlayerParty(cid) getPlayerPosition(cid) getPlayerPremiumDays(cid) getPlayerSex(cid) getPlayerSkill(cid, skillId) getPlayerSkullType(cid) getPlayerSlotItem(cid, slot) getPlayerSoul(cid) getPlayerStorageValue(cid, key) getPlayerTown(cid) getPlayerVocation(cid) getPlayersByAccountNumber(accountNumber) getPlayersByIPAddress(ip, mask) getPromotedVocation(vocationId) getPvpBlessingCost(level) getSkillId(skillName) getSpectators(centerPos, rangex, rangey, multifloor, onlyPlayers) getThing(uid) getThingPos(uid) getThingfromPos(pos) getTibianTime() getTileHouseInfo(pos) getTileInfo(position) getTileItemById(position, itemId, ...) getTileItemByType(position, itemType) getTilePzInfo(position) getTileThingByPos(position) getTileThingByTopOrder(position, topOrder) getTopCreature(position) getTownId(townName) getTownName(townId) getTownTemplePosition(townId) getWorldCreatures(type) greetCallback(cid) hasProperty(uid, prop) internalBedTransform(item, targetItem, toPosition, ids) isContainer(uid) isCorpse(uid) isCreature(cid) isDruid(cid) isInRange(pos, fromPos, toPos) isItem(uid) isItemContainer(itemId) isItemDoor(itemId) isItemFluidContainer(itemId) isItemMovable(itemId) isItemRune(itemId) isItemStackable(itemId) isKnight(cid) isMonster(cid) isNpc(cid) isNumber(str) isPaladin(cid) isPlayer(cid) isPlayerGhost(cid) isPlayerPzLocked(cid) isPremium(cid) isSightClear(fromPos, toPos, floorCheck) isSorcerer(cid) isSummon(cid) msgcontains(message, keyword) onAddFocus(cid) onAddItem(moveitem, tileitem, position) onCastSpell(cid, var) onCastSpell(cid, var, isHotkey) onCastSpell(creature, var) onCastSpell(creature, var, isHotkey) onCastSpell(creature, variant, isHotkey) onCreatureAppear(cid) onCreatureDisappear(cid) onCreatureSay(cid, type, msg) onDeath(player, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) onDeath(player, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) onExtendedOpcode(player, opcode, buffer) onGetFormulaValues(cid, level, maglevel) onGetFormulaValues(cid, skill, attack, factor) onGetFormulaValues(player, level, attack, factor) onLogin(player) onLogout(player) onRecord(current, old) onReleaseFocus(cid) onRemoveItem(item, tile, position) onSay(player, words, param) onSpeak(player, type, message) onStartup() onStepIn(creature, item, position, fromPosition) onStepOut(creature, item, position, fromPosition) onTargetCreature(creature, target) onTargetTile(creature, pos) onThink() onTime(interval) onUpdateDatabase() onUse(cid, item, fromPosition, target, toPosition, isHotkey) onUse(player, item, fromPosition, target, toPosition, isHotkey) onUseWeapon(player, var) playerLearnInstantSpell(cid, name) pushThing(thing) queryTileAddThing(thing, position, ...) registerCreatureEvent(cid, name) secondServerSaveWarning() serverSave() setGlobalStorageValue(key, value) setHouseAccessList(id, listId, listText) setHouseOwner(id, guid) setPlayerGroupId(cid, groupId) setPlayerStorageValue(cid, key, value) spellCallback(param) targetPositionToVariant(position) unregisterCreatureEvent(cid, name) useStamina(player) Créditos
    felzan
  18. Upvote
    Danihcv deu reputação a Tony Araujo em Ponto de partida - criando um sistema   
    Eu vou fazer outro "tutorial" mais elaborado, explicando detalhadamente como seria a forma "certa" de ter o pensamento para o ponto da idéia.

  19. Upvote
    Danihcv deu reputação a Tony Araujo em Ponto de partida - criando um sistema   
    Ponto de partida - criando um sistema.
    de: Tony Araújo (OrochiElf)
     
     
    Olá pessoal, hoje eu vou dar uma dica/ensinar a vocês a como inicializar um sistema (como sair daquela parte chata "Onde eu faço isso? Como eu faço isso?")
     
    Então, eu vi aqui no fórum que a maioria das pessoas, não conseguem pensar de forma (abrangente) e é essa a grande dificuldade dos iniciantes, porque na programação é mais do que necessário você conseguir pensar de forma grande, várias possibilidades possíveis kkkk.
     
    Exemplo: Eu ultimamente estou desenvolvendo um sistema de market para 0.3.6, pro meu servidor de pokémon e muitas pessoas não tem nem ideia de como "iniciar" o pensamento para desenvolver este sistema simples, então vamos lá.. pensar um pouquinho.
     
     
    Inicio da ideia.
    1º Onde eu começo a criar este sistema?
    Ideia: Então, como o sistema de market usa basicamente o sistema de canais (channels), obviamente que seria na parte de canais do servidor, mas pera ai.. no datapack (pasta data) do meu servidor, não tem nenhum arquivo além do Channels.xml, que seja para manipular os canais..
    Resolução 1/2: Depois que eu perceber que eu não é no datapack, eu já sei que é nas sources do servidor.
     
    Duvida: mas pera ai, em que local/arquivo da source?
    Resolução 2/2: Já que o meu sistema é usando os canais (Channels), eu vou pesquisar algo haver com channels (já que é em inglês kkk), maas... eu não irei encontrar nenhum arquivo chamado channels, porém eu encontrei um chamado (chat), então.. eu ja tenho uma ideia de que o meu sistema iria inicializar ali.
     
     
    2º Como eu começo a criar este sistema?
    Ideia: Então.. para começar a criar o sistema eu preciso saber PRIMEIRAMENTE como funciona o sistema de canais (NÃO TENTE PULAR ESTA ETAPA).
    Resolução: É necessário o estudo da área antes de começar o seu sistema, para garantir que irá pelo caminho certo.
     
    3º Inicializando o sistema / Finalizando a ideia de inicialização.
    Depois que eu aprendi como funciona o sistema de canais, eu ja posso me arriscar a editar ou escrever no arquivo, SEMPRE FAÇA UM BACKUP.
     
    OBS: Lembre-se nada é COMPLICADO, se você pensa de maneira SIMPLES.
     
     
    Bom galera.. isso não é um TUTORIAL, mas eu creio que possa ajudar a algumas pessoas a terem a "fagulha" que precisam para colocarem suas ideias em ação.
  20. Upvote
    Danihcv deu reputação a Skulls em [BETA] Basic Attack System   
    Boa noite galera, 
     
    Trago hoje um gifzinho rápido do sistema de basic attack que estou desenvolvendo. Ele consiste em uma customização completa do ataque básico do jogador sem precisar de armas. A customização abrange desde efeitos, dano base, tipo de dano, distância e skill base até critical, dodge, rajadas, cleave e outros. 
    O inicio desse sistema foi postado aqui no fórum por mim, mostro pra vocês agora a evolução dele e o leque de possibilidades que aquele sisteminha que postei abre quando alterado.
     

     
    Espero que gostem.
     
    Abraços,
     
  21. Upvote
    Danihcv recebeu reputação de vh1normando0 em Npc que dá informações/conta histórias   
    Opa, xTibianos. hoje venho lhes trazer um npc simples que eu havia feito um tempo atrás pra um membro aqui do fórum. Só fiz dar uma completada nele hoje... E adicionar 2 tipos de restrições (opicionais): restringir para apenas X vocações poderem falar com o npc; ou apenas para jogadores com X level conseguirem falar com ele.
     
       Este npc funciona da seguinte maneira: o player fala uma palavra(s)-gatilho que fará(ão) com que o npc dê uma resposta à essa(s) palavra(s). No próprio título deste tópico eu citei 2 exemplos que servem para esse npc: dar informações sobre certo item, certa localidade, etc; ou mesmo contar histórias: numa frase do npc ele pode citar um macaco dourado (palavra-gatilho), aí quando o player falar "macaco dourado" o npc descreverá o que está por trás deste macaco dourado, podendo até mesmo citar uma localidade onde ele foi visto pela última vez, e quando o player falar essa localidade o npc pode descrever a rota para se chegar nela, etc.

       Bom, vai da imaginação de cada um. sahusahusasah
     
       Agora seguiremos para a instalação: Vá até a pasta data\npc e crie um arquivo chamado informante.xml e coloque isso dentro:
    <?xml version="1.0" encoding="UTF-8"?><npc name="Informante" script="data/npc/scripts/informante.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0"><health max="100" now="100"/><look type="130" head="19" body="47" legs="132" feet="114" addons="0" mount="0"/><parameters> <parameter key="message_farewell" value="Até a próxima, |PLAYERNAME|."/></parameters></npc>  
    Agora vá até a pasta data\npc\scripts e crie um arquivo chamado informante.lua e coloque isso dentro:
    ----------------------------------------------------------NPC feito por: Danihcv ; para: xTibia.com----------------------------------------------------------local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() end------------------------------PARTE CONFIGURAVEL------------------------------local msgs = { --["AQUI VOCÊ PÕE AS PALAVRAS-GATILHO QUE FARÃO O NPC DAR UMA RESPOSTA"] = "AQUI VOCÊ PÕE A FRASE À PALAVRA-GATILHO"["informacoes"] = "Sobre o que você quer saber? Sobre a {mysterious island} ou sobre a {second promotion}?",["mysterious island"] = 'É uma ilha que antigos diziam ficar ao sudoeste de Carlin. Há um teleport que dizem aparecer nos pântanos de Venore, talvez, ele leve a essa ilha.',["second promotion"] = 'Há um NPC que vem de muito longe e fica a caminhas pelos campos de Thais, dizem que ele pode dar a segunda vocação para os aventureiros.',}local vocs = {} --vocações que podem falar com o npc. Caso vc queira deixar sem restrição de vocação, deixe vaziolocal levelMin = 0 --caso vc queira definir um nivel minimo para falar com o npc coloque o nivel, caso não, deixe em 0-------------------------------FIM DA PARTE CONFIGURAVEL-------------------------------function greetCallback(cid)--------------------------------PARTE 2 CONFIGURAVEL--------------------------------local msgGreet = 'Olá, '..getCreatureName(cid)..'. O que você procura? {Informacoes}?' --mensagem de boas-vindaslocal msgBye = 'Até a próxima, '..getCreatureName(cid)..'.' --mensagem de despedida---------------------------------FIM DA PARTE 2 CONFIGURAVEL--------------------------------- if #vocs > 0 then if not isInArray(vocs, getPlayerVocation(cid)) then npcHandler:say('Eu não falo com '..getVocationInfo(getPlayerVocation(cid)).name..'s.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end if getPlayerLevel(cid) < levelMin then npcHandler:say('Eu não falo com jogadores com nivel menor que '..levelMin..'.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end npcHandler:say(msgGreet, cid) npcHandler:addFocus(cid) return falseendfunction creatureSayCallback(cid, type, msg) if #vocs > 0 then if not isInArray(vocs, getPlayerVocation(cid)) then npcHandler:say('Eu ja disse que não falo com '..getVocationInfo(getPlayerVocation(cid)).name..'s.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end if getPlayerLevel(cid) < levelMin then npcHandler:say('Eu já disse que não falo com jogadores com nivel menor que '..levelMin..'.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end for k, v in pairs(msgs) do if msgcontains(msg, k) then npcHandler:say(msgs[k], cid) elseif msgcontains(msg, 'bye') or msgcontains(msg, 'goodbye') or msgcontains(msg, 'xau') or msgcontains(msg, 'tchau') then npcHandler:say(msgBye, cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end return trueendnpcHandler:setCallback(CALLBACK_GREET, greetCallback)npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) ***ATENÇÃO NESSE SCRIPT /\ Pois ele possui 2 partes para configurar. Uma logo abaixo da outra.

    Por hoje é tudo, pessoal!
    Espero que gostem e façam bom uso.
    Abraços, Danihcv!
  22. Upvote
    Danihcv deu reputação a Deadpool em Npc que dá informações/conta histórias   
    "Por hoje é tudo pessoal" que nostalgia da wanerbros Kkkk
    Muito bom o NPC z já até tive umas idéias pra melhorar ele haha
  23. Upvote
    Danihcv recebeu reputação de disso em Npc que dá informações/conta histórias   
    Opa, xTibianos. hoje venho lhes trazer um npc simples que eu havia feito um tempo atrás pra um membro aqui do fórum. Só fiz dar uma completada nele hoje... E adicionar 2 tipos de restrições (opicionais): restringir para apenas X vocações poderem falar com o npc; ou apenas para jogadores com X level conseguirem falar com ele.
     
       Este npc funciona da seguinte maneira: o player fala uma palavra(s)-gatilho que fará(ão) com que o npc dê uma resposta à essa(s) palavra(s). No próprio título deste tópico eu citei 2 exemplos que servem para esse npc: dar informações sobre certo item, certa localidade, etc; ou mesmo contar histórias: numa frase do npc ele pode citar um macaco dourado (palavra-gatilho), aí quando o player falar "macaco dourado" o npc descreverá o que está por trás deste macaco dourado, podendo até mesmo citar uma localidade onde ele foi visto pela última vez, e quando o player falar essa localidade o npc pode descrever a rota para se chegar nela, etc.

       Bom, vai da imaginação de cada um. sahusahusasah
     
       Agora seguiremos para a instalação: Vá até a pasta data\npc e crie um arquivo chamado informante.xml e coloque isso dentro:
    <?xml version="1.0" encoding="UTF-8"?><npc name="Informante" script="data/npc/scripts/informante.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0"><health max="100" now="100"/><look type="130" head="19" body="47" legs="132" feet="114" addons="0" mount="0"/><parameters> <parameter key="message_farewell" value="Até a próxima, |PLAYERNAME|."/></parameters></npc>  
    Agora vá até a pasta data\npc\scripts e crie um arquivo chamado informante.lua e coloque isso dentro:
    ----------------------------------------------------------NPC feito por: Danihcv ; para: xTibia.com----------------------------------------------------------local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() end------------------------------PARTE CONFIGURAVEL------------------------------local msgs = { --["AQUI VOCÊ PÕE AS PALAVRAS-GATILHO QUE FARÃO O NPC DAR UMA RESPOSTA"] = "AQUI VOCÊ PÕE A FRASE À PALAVRA-GATILHO"["informacoes"] = "Sobre o que você quer saber? Sobre a {mysterious island} ou sobre a {second promotion}?",["mysterious island"] = 'É uma ilha que antigos diziam ficar ao sudoeste de Carlin. Há um teleport que dizem aparecer nos pântanos de Venore, talvez, ele leve a essa ilha.',["second promotion"] = 'Há um NPC que vem de muito longe e fica a caminhas pelos campos de Thais, dizem que ele pode dar a segunda vocação para os aventureiros.',}local vocs = {} --vocações que podem falar com o npc. Caso vc queira deixar sem restrição de vocação, deixe vaziolocal levelMin = 0 --caso vc queira definir um nivel minimo para falar com o npc coloque o nivel, caso não, deixe em 0-------------------------------FIM DA PARTE CONFIGURAVEL-------------------------------function greetCallback(cid)--------------------------------PARTE 2 CONFIGURAVEL--------------------------------local msgGreet = 'Olá, '..getCreatureName(cid)..'. O que você procura? {Informacoes}?' --mensagem de boas-vindaslocal msgBye = 'Até a próxima, '..getCreatureName(cid)..'.' --mensagem de despedida---------------------------------FIM DA PARTE 2 CONFIGURAVEL--------------------------------- if #vocs > 0 then if not isInArray(vocs, getPlayerVocation(cid)) then npcHandler:say('Eu não falo com '..getVocationInfo(getPlayerVocation(cid)).name..'s.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end if getPlayerLevel(cid) < levelMin then npcHandler:say('Eu não falo com jogadores com nivel menor que '..levelMin..'.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end npcHandler:say(msgGreet, cid) npcHandler:addFocus(cid) return falseendfunction creatureSayCallback(cid, type, msg) if #vocs > 0 then if not isInArray(vocs, getPlayerVocation(cid)) then npcHandler:say('Eu ja disse que não falo com '..getVocationInfo(getPlayerVocation(cid)).name..'s.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end if getPlayerLevel(cid) < levelMin then npcHandler:say('Eu já disse que não falo com jogadores com nivel menor que '..levelMin..'.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end for k, v in pairs(msgs) do if msgcontains(msg, k) then npcHandler:say(msgs[k], cid) elseif msgcontains(msg, 'bye') or msgcontains(msg, 'goodbye') or msgcontains(msg, 'xau') or msgcontains(msg, 'tchau') then npcHandler:say(msgBye, cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end return trueendnpcHandler:setCallback(CALLBACK_GREET, greetCallback)npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) ***ATENÇÃO NESSE SCRIPT /\ Pois ele possui 2 partes para configurar. Uma logo abaixo da outra.

    Por hoje é tudo, pessoal!
    Espero que gostem e façam bom uso.
    Abraços, Danihcv!
  24. Upvote
    Danihcv recebeu reputação de gabriel28 em Npc que dá informações/conta histórias   
    Opa, xTibianos. hoje venho lhes trazer um npc simples que eu havia feito um tempo atrás pra um membro aqui do fórum. Só fiz dar uma completada nele hoje... E adicionar 2 tipos de restrições (opicionais): restringir para apenas X vocações poderem falar com o npc; ou apenas para jogadores com X level conseguirem falar com ele.
     
       Este npc funciona da seguinte maneira: o player fala uma palavra(s)-gatilho que fará(ão) com que o npc dê uma resposta à essa(s) palavra(s). No próprio título deste tópico eu citei 2 exemplos que servem para esse npc: dar informações sobre certo item, certa localidade, etc; ou mesmo contar histórias: numa frase do npc ele pode citar um macaco dourado (palavra-gatilho), aí quando o player falar "macaco dourado" o npc descreverá o que está por trás deste macaco dourado, podendo até mesmo citar uma localidade onde ele foi visto pela última vez, e quando o player falar essa localidade o npc pode descrever a rota para se chegar nela, etc.

       Bom, vai da imaginação de cada um. sahusahusasah
     
       Agora seguiremos para a instalação: Vá até a pasta data\npc e crie um arquivo chamado informante.xml e coloque isso dentro:
    <?xml version="1.0" encoding="UTF-8"?><npc name="Informante" script="data/npc/scripts/informante.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0"><health max="100" now="100"/><look type="130" head="19" body="47" legs="132" feet="114" addons="0" mount="0"/><parameters> <parameter key="message_farewell" value="Até a próxima, |PLAYERNAME|."/></parameters></npc>  
    Agora vá até a pasta data\npc\scripts e crie um arquivo chamado informante.lua e coloque isso dentro:
    ----------------------------------------------------------NPC feito por: Danihcv ; para: xTibia.com----------------------------------------------------------local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() end------------------------------PARTE CONFIGURAVEL------------------------------local msgs = { --["AQUI VOCÊ PÕE AS PALAVRAS-GATILHO QUE FARÃO O NPC DAR UMA RESPOSTA"] = "AQUI VOCÊ PÕE A FRASE À PALAVRA-GATILHO"["informacoes"] = "Sobre o que você quer saber? Sobre a {mysterious island} ou sobre a {second promotion}?",["mysterious island"] = 'É uma ilha que antigos diziam ficar ao sudoeste de Carlin. Há um teleport que dizem aparecer nos pântanos de Venore, talvez, ele leve a essa ilha.',["second promotion"] = 'Há um NPC que vem de muito longe e fica a caminhas pelos campos de Thais, dizem que ele pode dar a segunda vocação para os aventureiros.',}local vocs = {} --vocações que podem falar com o npc. Caso vc queira deixar sem restrição de vocação, deixe vaziolocal levelMin = 0 --caso vc queira definir um nivel minimo para falar com o npc coloque o nivel, caso não, deixe em 0-------------------------------FIM DA PARTE CONFIGURAVEL-------------------------------function greetCallback(cid)--------------------------------PARTE 2 CONFIGURAVEL--------------------------------local msgGreet = 'Olá, '..getCreatureName(cid)..'. O que você procura? {Informacoes}?' --mensagem de boas-vindaslocal msgBye = 'Até a próxima, '..getCreatureName(cid)..'.' --mensagem de despedida---------------------------------FIM DA PARTE 2 CONFIGURAVEL--------------------------------- if #vocs > 0 then if not isInArray(vocs, getPlayerVocation(cid)) then npcHandler:say('Eu não falo com '..getVocationInfo(getPlayerVocation(cid)).name..'s.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end if getPlayerLevel(cid) < levelMin then npcHandler:say('Eu não falo com jogadores com nivel menor que '..levelMin..'.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end npcHandler:say(msgGreet, cid) npcHandler:addFocus(cid) return falseendfunction creatureSayCallback(cid, type, msg) if #vocs > 0 then if not isInArray(vocs, getPlayerVocation(cid)) then npcHandler:say('Eu ja disse que não falo com '..getVocationInfo(getPlayerVocation(cid)).name..'s.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end if getPlayerLevel(cid) < levelMin then npcHandler:say('Eu já disse que não falo com jogadores com nivel menor que '..levelMin..'.', cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end for k, v in pairs(msgs) do if msgcontains(msg, k) then npcHandler:say(msgs[k], cid) elseif msgcontains(msg, 'bye') or msgcontains(msg, 'goodbye') or msgcontains(msg, 'xau') or msgcontains(msg, 'tchau') then npcHandler:say(msgBye, cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) return false end end return trueendnpcHandler:setCallback(CALLBACK_GREET, greetCallback)npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) ***ATENÇÃO NESSE SCRIPT /\ Pois ele possui 2 partes para configurar. Uma logo abaixo da outra.

    Por hoje é tudo, pessoal!
    Espero que gostem e façam bom uso.
    Abraços, Danihcv!
  25. Upvote
    Danihcv recebeu reputação de atakashi em Matar Monstro e ganhar 1 Premium Point   
    @@atakashi, ok, vamo lá. Vá em creaturescripts.xml (data\creaturescripts) e adicione essa tag:
    <event type="kill" name="PPkill" event="script" value="PPkill.lua"/> Agora vá na pasta scripts (data\creaturescripts) e crie um arquivo chamado PPkill.lua e coloque isso dentro:
    local m = {"crystalcrusher", "cliff strider", "demon"} local pointQntd = 1 function onKill(cid, target) if(isMonster(target) == true) then local n = getCreatureName(target) if isInArray(m, string.lower(n)) then db.query('UPDATE `accounts` SET `premium_points` = `premium_points` + '..pointQntd..' WHERE `id`= '.. getPlayerAccountId(cid) ..'') doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você ganhou '..pointQntd..' Premium Point por matar '..getCreatureName(target)..'.') end end return true end  
     
     
     
     
    Agora ainda dentro da pasta scritps, procure o arquivo login.lua e adicione isso, antes do ultimo return true:
    registerCreatureEvent(cid, "PPkill")
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...