Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    111

Histórico de Reputação

  1. Upvote
    Vodkart deu reputação a comedinhasss em Passando Um Otserv Para 8.60   
    Fala ae galerinha do xtibia...
    Bom vejo que muitos programadores ainda estão em dúvida para passar o seu ot para 8.6 ...
    Bom então estou fazendo um tutorial...
    Testado em tfs 0.3.6pl1
     
    Sources:



    Em House.cpp:
    Procure:

    std::string metachars = ".[{}()\\+|^{:content:}quot;;
     
    Substitua por:

    std::string metachars = ".[{}()\\+|^$*?";
     
    Procure:

    if(metachars.find(*it) != std::string::npos) outExp += "\\";
     
    Subistitua por:

    if(metachars.find(*it) != std::string::npos) outExp += "";
     
    Procure:

    replaceString(outExp, "*", ".*"); replaceString(outExp, "?", ".?");
    Subistitua por:

    replaceString(outExp, "*", ""); replaceString(outExp, "?", "");
     
    Em resources.h:
    Procure:

    #define CLIENT_VERSION_MIN 854 #define CLIENT_VERSION_MAX 854 #define CLIENT_VERSION_STRING "Only clients with protocol 8.54 are allowed!" #define STATUS_SERVER_NAME "TheForgottenServer" #define STATUS_SERVER_VERSION "0.3.6" #define STATUS_SERVER_CODENAME "Crying Damson" #define STATUS_SERVER_PROTOCOL "8.54"
     
    Substitua por:

    #define CLIENT_VERSION_MIN 860 #define CLIENT_VERSION_MAX 860 #define CLIENT_VERSION_STRING "Only clients with protocol 8.60 are allowed!" #define STATUS_SERVER_NAME "TheForgottenServer" #define STATUS_SERVER_VERSION "0.3.6" #define STATUS_SERVER_CODENAME "Crying Damson" #define STATUS_SERVER_PROTOCOL "8.60"
     
    Em itemloader.h:
    Procure:

    CLIENT_VERSION_854 = 16
     
    Substitua e adicione por:

    CLIENT_VERSION_854 = 16, CLIENT_VERSION_855 = 17, CLIENT_VERSION_856 = 18, CLIENT_VERSION_857 = 19, CLIENT_VERSION_860 = 20
     
    Em items.cpp:
    Procure:

    else if(Items::dwMinorVersion != CLIENT_VERSION_854)
     
    Substitua e adicione por:

    else if(Items::dwMinorVersion != 19)
     
    Em protocolgame.cpp:
    Procure:

    void ProtocolGame::parseAttack(NetworkMessage& msg) { uint32_t creatureId = msg.GetU32(); addGameTask(&Game::playerSetAttackedCreature, player->getID(), creatureId); }
    Substitua por:

    void ProtocolGame::parseAttack(NetworkMessage& msg) { uint32_t creatureId = msg.GetU32(); msg.GetU32(); msg.GetU32(); addGameTask(&Game::playerSetAttackedCreature, player->getID(), creatureId); }
     
    Também procure:

    void ProtocolGame::sendCancelTarget() { NetworkMessage_ptr msg = getOutputBuffer(); if(msg) { TRACK_MESSAGE(msg); msg->AddByte(0xA3); } }
     
    Substitua por:

    void ProtocolGame::sendCancelTarget() { NetworkMessage_ptr msg = getOutputBuffer(); if(msg) { TRACK_MESSAGE(msg); msg->AddByte(0xA3); msg->AddU32(0); } }
     
    Em spells.cpp (somente em spells.cpp)
    Procure:

    g_game.transformItem(item, item->getID(), std::max((int32_t)0, ((int32_t)item->getCharges()) - 1));
     
    Substitua por:

    g_game.transformItem(item, item->getID(), std::max((int32_t)0, ((int32_t)item->getItemCount()) - 1));
     
    Em tools.cpp:
    Procure:

    {"insects", MAGIC_EFFECT_INSECTS}
     
    Substitua por:

    {"insects", MAGIC_EFFECT_INSECTS}, {"dragonhead", MAGIC_EFFECT_DRAGONHEAD}
     
    Em const.h:
    Procure:

    MAGIC_EFFECT_INSECTS = 0x44, //68 MAGIC_EFFECT_LAST = MAGIC_EFFECT_INSECTS,
     
    Substitua por:

    MAGIC_EFFECT_INSECTS = 0x44, //68, MAGIC_EFFECT_DRAGONHEAD = 0x45, //69 MAGIC_EFFECT_LAST = MAGIC_EFFECT_DRAGONHEAD,
     
    Em game.cpp:
    Procure:

    void Game::showHotkeyUseMessage(Player* player, Item* item) { int32_t subType = -1; if(item->hasSubType() && !item->hasCharges()) subType = item->getSubType(); const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), subType, false); char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); player->sendTextMessage(MSG_INFO_DESCR, buffer); }
     
    Substitua por:

    void Game::showHotkeyUseMessage(Player* player, Item* item) { const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), -1); char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); player->sendTextMessage(MSG_INFO_DESCR, buffer); }
     
    Em npc.cpp:
    Procure:

    li.itemId = intValue;
     
    Embaixo adicione:

    const ItemType& it = Item::items[li.itemId];
     
    Também procure:

    if(readXMLInteger(tmpNode, "subtype", intValue)) li.subType = intValue;
     
    Embaixo adicione:

    else { if(it.stackable) li.subType = 1; else if(it.isFluidContainer() || it.isSplash()) li.subType = 0; }
     
    Em item.cpp:
    Procure:

    s << "("; if(!it.runeSpellName.empty()) s << "\"" << it.runeSpellName << "\", "; s << "Charges:" << subType <<")";
     
    Embaixo adicione:

    if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")";
     
     
    Em luascript.cpp:
    Procure por:

    //getCreatureHealth(cid) lua_register(m_luaState, "getCreatureHealth", LuaScriptInterface::luaGetCreatureHealth);
     
    Embaixo adicione:

    //getItemParent(uid) lua_register(m_luaState, "getItemParent", LuaScriptInterface::luaGetItemParent);
     
    Também procure por:

    int32_t LuaScriptInterface::luaGetCreatureHealth(lua_State* L) { //getCreatureHealth(cid) ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushnumber(L, creature->getHealth()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; }
     
    Substitua por:

    int32_t LuaScriptInterface::luaGetItemParent(lua_State* L) { //getItemParent(uid) ScriptEnviroment* env = getEnv(); Item* item = env->getItemByUID(popNumber(L)); if(!item) { errorEx(getError(LUA_ERROR_ITEM_NOT_FOUND)); lua_pushnil(L); return 1; } Item* container = item->getParent()->getItem(); pushThing(L, container, env->addThing(container)); return 1; }
     
    Em luascript.h:
    Procure por:

    static int32_t luaDoRemoveItem(lua_State* L);
     
    Embaixo adicione:

    static int32_t luaGetItemParent(lua_State* L);
     

    Pasta Data:


    Na pasta data\actions\scripts\liquids\potions.lua:

    Delete tudo e adicione:

    local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return true end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) local v = getItemParent(item.uid) if(not potion.empty or config.removeOnUse) then return true end if fromPosition.x == CONTAINER_POSITION then for _, slot in ipairs({CONST_SLOT_LEFT, CONST_SLOT_RIGHT, CONST_SLOT_AMMO}) do local tmp = getPlayerSlotItem(cid, slot) if tmp.itemid == potion.empty and tmp.type < 100 then doChangeTypeItem(item.uid, item.type - 1) return getPlayerFreeCap(cid) >= getItemInfo(potion.empty).weight and doChangeTypeItem(tmp.uid, tmp.type + 1) or doPlayerAddItem(cid, potion.empty, 1) end end else doChangeTypeItem(item.uid, item.type - 1) doCreateItem(potion.empty, 1, fromPosition) return true end if v.uid == 0 then if item.type == 1 and isInArray({CONST_SLOT_LEFT, CONST_SLOT_RIGHT, CONST_SLOT_AMMO}, fromPosition.y) then doTransformItem(item.uid, potion.empty) else -- serversided autostack should take care of this doPlayerAddItem(cid, potion.empty, 1) doChangeTypeItem(item.uid, item.type - 1) end return true else doChangeTypeItem(item.uid, item.type - 1) local size = getContainerSize(v.uid) for i = 0, size-1 do local tmp = getContainerItem(v.uid, i) if tmp.itemid == potion.empty and tmp.type < 100 then return getPlayerFreeCap(cid) >= getItemInfo(potion.empty).weight and doChangeTypeItem(tmp.uid, tmp.type + 1) or doPlayerAddItem(cid, potion.empty, 1) end end if getContainerSize(v.uid) < getContainerCap(v.uid) then doAddContainerItem(v.uid, potion.empty) else doPlayerAddItem(cid, potion.empty, 1) end end return true end

     

    Na pasta data\lib\000-constant.lua:

    Procure


    maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335} femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336}

     

    Subistitua por:


    maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367} femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 366}

     

    Em Data\xml\outfit.xml:

    Delete tudo e Adicione


    <?xml version="1.0"?> <outfits> <outfit id="1"> <list gender="0" lookType="136" name="Citizen"/> <list gender="1" lookType="128" name="Citizen"/> </outfit> <outfit id="2"> <list gender="0" lookType="137" name="Hunter"/> <list gender="1" lookType="129" name="Hunter"/> </outfit> <outfit id="3"> <list gender="0" lookType="138" name="Mage"/> <list gender="1" lookType="130" name="Mage"/> </outfit> <outfit id="4"> <list gender="0" lookType="139" name="Knight"/> <list gender="1" lookType="131" name="Knight"/> </outfit> <outfit id="5" premium="yes"> <list gender="0" lookType="140" name="Noblewoman"/> <list gender="1" lookType="132" name="Nobleman"/> </outfit> <outfit id="6" premium="yes"> <list gender="0" lookType="141" name="Summoner"/> <list gender="1" lookType="133" name="Summoner"/> </outfit> <outfit id="7" premium="yes"> <list gender="0" lookType="142" name="Warrior"/> <list gender="1" lookType="134" name="Warrior"/> </outfit> <outfit id="8" premium="yes"> <list gender="0" lookType="147" name="Barbarian"/> <list gender="1" lookType="143" name="Barbarian"/> </outfit> <outfit id="9" premium="yes"> <list gender="0" lookType="148" name="Druid"/> <list gender="1" lookType="144" name="Druid"/> </outfit> <outfit id="10" premium="yes"> <list gender="0" lookType="149" name="Wizard"/> <list gender="1" lookType="145" name="Wizard"/> </outfit> <outfit id="11" premium="yes"> <list gender="0" lookType="150" name="Oriental"/> <list gender="1" lookType="146" name="Oriental"/> </outfit> <outfit id="12" premium="yes"> <list gender="0" lookType="155" name="Pirate"/> <list gender="1" lookType="151" name="Pirate"/> </outfit> <outfit id="13" premium="yes"> <list gender="0" lookType="156" name="Assassin"/> <list gender="1" lookType="152" name="Assassin"/> </outfit> <outfit id="14" premium="yes"> <list gender="0" lookType="157" name="Beggar"/> <list gender="1" lookType="153" name="Beggar"/> </outfit> <outfit id="15" premium="yes"> <list gender="0" lookType="158" name="Shaman"/> <list gender="1" lookType="154" name="Shaman"/> </outfit> <outfit id="16" premium="yes"> <list gender="0" lookType="252" name="Norsewoman"/> <list gender="1" lookType="251" name="Norseman"/> </outfit> <outfit id="17" premium="yes"> <list gender="0" lookType="269" name="Nightmare"/> <list gender="1" lookType="268" name="Nightmare"/> </outfit> <outfit id="18" premium="yes"> <list gender="0" lookType="270" name="Jester"/> <list gender="1" lookType="273" name="Jester"/> </outfit> <outfit id="19" premium="yes"> <list gender="0" lookType="279" name="Brotherhood"/> <list gender="1" lookType="278" name="Brotherhood"/> </outfit> <outfit id="20" premium="yes"> <list gender="0" lookType="288" name="Demonhunter"/> <list gender="1" lookType="289" name="Demonhunter"/> </outfit> <outfit id="21" premium="yes"> <list gender="0" lookType="324" name="Yalaharian"/> <list gender="1" lookType="325" name="Yalaharian"/> </outfit> <outfit id="22" premium="yes"> <list gender="0" lookType="336" name="Warmaster"/> <list gender="1" lookType="335" name="Warmaster"/> </outfit> <outfit id="23" default="0"> <list gender="0" lookType="329" name="Wife"/> <list gender="1" lookType="328" name="Husband"/> </outfit> <outfit id="24" premium="yes"> <list gender="0" lookType="366" name="Wayfarer"/> <list gender="1" lookType="367" name="Wayfarer"/> </outfit> </outfits>

     

    Em data\items\items.xml:

    Delete onde estão configurada as runas a seguinte linha (Em Todas)


    <attribute key="charges" value="x" />

    X: Qualquer numero

     


    Arquivos para procurar e repassar:

    Bom gente eu não gravei como era o antigo desse então procure uma frase e repasse

     


    Em container.cpp:

    Procure e repasse:


    Cylinder* Container::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t&) { if(index == 254 /*move up*/) { index = INDEX_WHEREEVER; *destItem = NULL; Container* parentContainer = dynamic_cast<Container*>(getParent()); if(parentContainer) return parentContainer; return this; } else if(index == 255 /*add wherever*/){ index = INDEX_WHEREEVER; *destItem = NULL; } else if(index >= (int32_t)capacity()){ /* if you have a container, maximize it to show all 20 slots then you open a bag that is inside the container you will have a bag with 8 slots and a "grey" area where the other 12 slots where from the container if you drop the item on that grey area the client calculates the slot position as if the bag has 20 slots */ index = INDEX_WHEREEVER; *destItem = NULL; } const Item* item = thing->getItem(); if(item == NULL){ return this; } if(item->isStackable()){ if(item->getParent() != this){ //try find a suitable item to stack with uint32_t n = 0; for(ItemList::iterator cit = itemlist.begin(); cit != itemlist.end(); ++cit){ if((*cit) != item && (*cit)->getID() == item->getID() && (*cit)->getItemCount() < 100){ *destItem = (*cit); index = n; return this; } ++n; } } } if(index != INDEX_WHEREEVER){ Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); Cylinder* subCylinder = dynamic_cast<Cylinder*>(*destItem); if(subCylinder){ index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } } return this; }






    Em item.cpp:
    Procure e repasse:

    void Item::setDefaultSubtype() { setItemCount(1); const ItemType& it = items[id]; if(it.charges) setCharges(it.charges); }
     
    Em player.cpp:
    Procure e repasse:

    Cylinder* Player::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags) { if(index == 0 /*drop to capacity window*/ || index == INDEX_WHEREEVER){ *destItem = NULL; const Item* item = thing->getItem(); if(item == NULL){ return this; } //find an appropiate slot std::list<Container*> containerList; for(int i = SLOT_FIRST; i < SLOT_LAST; ++i){ Item* inventoryItem = inventory[i]; if(inventoryItem == tradeItem){ continue; } if(inventoryItem == tradeItem){ continue; } if(inventoryItem){ //try find an already existing item to stack with if(inventoryItem != item && item->isStackable() && inventoryItem->getID() == item->getID() && inventoryItem->getItemCount() < 100){ *destItem = inventoryItem; index = i; return this; } //check sub-containers else if(Container* subContainer = inventoryItem->getContainer()){ Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if(tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR){ index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } containerList.push_back(subContainer); } } //empty slot else if(__queryAdd(i, item, item->getItemCount(), flags) == RET_NOERROR){ index = i; *destItem = NULL; return this; } } //check deeper in the containers for(std::list<Container*>::iterator it = containerList.begin(); it != containerList.end(); ++it){ for(ContainerIterator iit = (*it)->begin(); iit != (*it)->end(); ++iit){ if(Container* subContainer = (*iit)->getContainer()){ if(subContainer == tradeItem){ continue; } Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if(tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR){ index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } } } } return this; } Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); Cylinder* subCylinder = dynamic_cast<Cylinder*>(destThing); if(subCylinder){ index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } else return this; }
     

    Downloads:



    Items.otb (8.6): Clique Aqui
    Items.xml (8.6): Clique aqui
     
     
    Creditos á:
    darkhaos - Sources
    Tauku - Sources
    BlueSilver - Sources
    Doidin - Data
    Cykotitan (O do xtibia) - Sources/Data
    Eu - Data/Sources
    Outros - Data/Sources
    Tutorial atualizado: 24/09/2010



    Agora Funciona 99,9% perfeito (deve estar faltando um detalhe ou outro)


    Recomendo fazer tudo o que está mandando para não ocorrer erros



  2. Upvote
    Vodkart recebeu reputação de Alissow em Quest - Que Possa Ser Feita Apenas 1 Vez   
    simples
     
    todo báu da uma storage,então poe para o script fazer essa checagem.
    Se o jogador NÃO tiver essa storage ele será teleportado.
     
    caso o jogador tenha essa storage(que ele pegou na quest) vai aparecer uma mensagem dizendo que ele já fez essa quest.
     
     
    obs: aconselho a fazer uma Porta ou um Tile.
     
    script para ser usado como porta,placa... :
     

    function onUse(cid, item, fromPosition) local Storage = 11543 -- storage do seu bau local Ppos = {x=160, y=54, z=7} -- coordenada para onde vai if getPlayerStorageValue(cid, Storage) <= 0 then doTeleportThing(cid,Ppos) else doPlayerSendCancel(cid,"You have already done this quest.") end return TRUE end
  3. Upvote
    Vodkart recebeu reputação de geovanejr em Script Spell   
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 41) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -84, -2.4, -108) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 45) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.3, -160, -3, -2220) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 36) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2.3, -170, -3, -230) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 37) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -2.3, -180, -3, -240) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr3 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr4 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 200, parameters) addEvent(onCastSpell2, 500, parameters) addEvent(onCastSpell3, 900, parameters) addEvent(onCastSpell4, 1300, parameters) end
  4. Upvote
    Vodkart recebeu reputação de BaiakZik em Como Tirar Vocação De Items   
    é em movements.xml
     
    lá tem umas linhas assim:
     

    <movevent type="Equip" itemid="2487" slot="armor" event="function" value="onEquipItem"> <vocation id="4"/> <vocation id="8" showInDescription="0"/> <vocation id="3"/> <vocation id="7" showInDescription="0"/> </movevent>
     
    soh editar
     
    para qual voc vai usar os items
  5. Upvote
    Vodkart recebeu reputação de fenix123 em Premium Door   
    http://www.xtibia.com/forum/topic/134873-actions-algumas-portas/
  6. Upvote
    Vodkart recebeu reputação de Rimer Lathar em [Oficial] We Do Ots 0.1.1 (Beta Version)   
    Npc de addons:
    obs: só arrumem os itens que precisa para conseguir a outfir.
     
    vá até a pasta NPC/script/addon.lua remova tudo que estiver lá e coloque este:
     
     
     
    Nova outfit no seu Ot.
     
    vá até a pasta XML/outfits.xml renova tudo que estiver lá dentro e coloque:
     
     
  7. Upvote
    Vodkart deu reputação a Doidin em [Oficial] We Do Ots 0.1.1 (Beta Version)   
    A partir de agora não é mais Real Server e sim We Do OTS, para você conferir mais clique aqui.
     
    Até mais,
    Doidin.
  8. Upvote
    Vodkart recebeu reputação de Alissow em Script Spell   
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 41) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -84, -2.4, -108) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 45) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.3, -160, -3, -2220) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 36) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2.3, -170, -3, -230) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 37) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -2.3, -180, -3, -240) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr3 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr4 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 200, parameters) addEvent(onCastSpell2, 500, parameters) addEvent(onCastSpell3, 900, parameters) addEvent(onCastSpell4, 1300, parameters) end
  9. Upvote
    Vodkart recebeu reputação de LorDz em Dúvida Sobre Spell!   
    sinceramente eu não sei absolutamente nada sobre website...
     
    oque eu sei é que dá para fazer o seguinte,ele clica lá compra o item talz ai ele usa o item ganha a storage...
     
    mais esse do storage por site vo ficar devendo
     
    abraços
  10. Upvote
    Vodkart recebeu reputação de LorDz em [ Resolvido ] Tile Q Tira Pz   
    function onStepIn(cid, item, position, fromPosition) local config = { RemoveBattle = "yes", texto = "Seu battle foi removido!" } if (config.RemoveBattle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT)) then doRemoveCondition(cid, CONDITION_INFIGHT) doPlayerSendTextMessage(cid,19,config.texto) return TRUE end end
  11. Upvote
    Vodkart recebeu reputação de Alissow em Quando Completar A Quest Podera Entrar Em Tal Lugar?   
    nem
     
    tipo eu fiz 2 script para você.
     
    no caso eu fiz uma Porta e um Piso...
     
    ai caso vc escolha uma porta
     
    vc coloca no ActionID da sua porta 7089
     
     
    -------------------------------------------------
     
     
    caso escolhar usar o piso
     
    vc coloca no UniqueID do seu piso 13870
  12. Upvote
    Vodkart recebeu reputação de davialves em [ Talkaction ]Teleport Por Talk. Para Vip   
    sim fico bem simples,mais o resultado ficou ótimo
     
    oque eu colocaria ai é para ser teleportado em Pz mesmo,se não ficaria ruim o pvp dp ot os cara tudo fugindo
     
    abraços
  13. Upvote
    Vodkart recebeu reputação de brutpc em Ajuda Com Um Script De Npc   
    edita ai
     

    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 talkState = {} 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 pos = {x=152,y=58,z=7} -------------- Pos para onde o player sera levado local itemid = 2468 ----------------- Id do item que vai ser removido do player if msgcontains(msg, "travel") then selfSay("Eu posso te levar a TAL lugar por um "..getItemNameById(itemid).." item, fale {passage} se quizer viajar.", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "passage") then selfSay("Are you sure? {yes} ", cid) talkState[talkUser] = 2 elseif msgcontains(msg, "yes") then if doPlayerRemoveItem(cid, itemid, 1) then selfSay("Boa viagem.", cid) doTeleportThing(cid, pos) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) else selfSay('You don\'t have '.. getItemNameById(itemid) ..'', cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end elseif msg == "no" and talkState[talkUser] == 2 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  14. Upvote
    Vodkart deu reputação a MarcelloMendes em [Action] Magic Teleport'   
    Bom galera, vim trazer pra vcs um script criado POR MIM, (é um dos meus primeiros)...
     
    E reparado por Kydrai... '
     
    Ele e um 'Teleport Magico' , que quando usado, irá teleportar o player para sua 'townId' ou para cidade principal, onde vc colocará as cordenadas...
     
    Então Vamos la:
     
     
     

    --[[ SCRIPT BY: MarcelloMkez ]] function onUse(cid, item, pos, item2, topos) config = { ptemp ="no", --[[ Teleportar para ciade principal "yes ou no". ]] townp ="yes", --[[ Teleportar para Cidade onde o player mora, "yes ou no". ]] rmvitem ="yes", --[[ Remover item quando for usado? "yes ou no". ]] vip ="no", --[[ Precisa ser Premium Account para usar o item? "yes ou no" ]] batlle ="yes", --[[ Precisa estar sem Batlle para usar o item? "yes ou no "]] possibilidade = 10 , --[[ Possibilidade do player ser teleportado em porcentagem. ]] princ = {x=100, y=40, z=7}, --[[ Posição da Cidade Principal. ]] pz ="yes" --[[ Precisa estar em Protection Zone para Usar o Magic Teleport? "yes ou no"]] } local p = getPlayerTown(cid) local townpos = getTownTemplePosition(p) local cityname = getTownName(p) local chance = math.random(1, 100) --[[ de 1 a 100 % de chance, Não mude. ]] local msgp ="~ "..getPlayerName(cid).." Foi Teleportado para Cidade Principal. ~" local msgt ="~ "..getPlayerName(cid).." Foi Teleportado para "..cityname..". ~" local fail ="'O Teleport Falhou.'" if(config.vip =="yes") and not isPremium(cid) then doPlayerSendCancel(cid, "Você precisa ser Premium Account Para usar o Teleport Magico.") return 1 elseif (config.batlle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendCancel(cid, "Você precisa estar sem o batlle para usar o Teleport Magico.") return 1 elseif (config.pz =="yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendCancel(cid, "Você precisa estar em Protection Zone para usar o Teleport Magico.") return 1 elseif (config.ptemp =="yes" and config.townp =="yes") then doPlayerPopupFYI(cid, "'ERROR': Não é Possivel teleportar para duas cidades ao mesmo tempo.") return 1 --[[ Menssagem quando o player marcar 'yes' para as duas opçoes de teleport. ]] elseif chance >= 1 and chance <= config.possibilidade then doCreatureSay(cid, fail, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return 1 elseif(config.ptemp == "yes") then doTeleportThing(cid, config.princ) doCreatureSay(cid, msgp, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED) return 1 elseif(config.townp == "yes") then doTeleportThing(cid, townpos) doCreatureSay(cid, msgt, TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED) return 1 end if(config.rmvitem =="yes") then doRemoveItem(item.uid, 1) end return TRUE end
     
    Tag: <action itemid="2349" script="teleportmagico.lua"/>
     
    Vermelho: Id do item quer vc quer usar como Teleport Magico.
     
    Bom como ta explicando ali no script...
     
    Qualquer duivida poste e irei ajuda-los...
     
    Muito Obrigado Galera
    Espero que gostem!!!
     
    o/
  15. Upvote
    Vodkart recebeu reputação de davialves em [ Action ]Regeneração Potion   
    creditos: jestemPolakiem
     

     
    Explicação:
     
    está Potion contem 5 cargas,que quando usada ela durante 30 segundos regenera do player Mana e Hp.
    em NPC poderá vir mais carga.
     
    actions\script crie um arquivo.lua e renomeie para
    regenera.lua

    function onUse(cid, item, fromPos, itemEx, toPos) local function doRegeneration(cid, formula, count) doCreatureAddHealth(cid, formula.health) doCreatureAddMana(cid, formula.mana) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) if (count ~= 1) then addEvent(doRegeneration, 1000, cid, formula, count - 1) end return TRUE end local tempo = 30 -- tempo que a potion ira ficar healando (tempo em segundos) local storage = 11148 -- não mexa aqui local exhaust = 30 -- Tempo para player poder usar o item novamente! (tempo em segundos) local form = {health = getCreatureMaxHealth(cid) * 0.2 + 50, mana = getCreatureMaxMana(cid) * 0.15 + 40} if (getPlayerStorageValue(cid, storage) <= os.time()) then doRegeneration(cid, form, tempo) doChangeTypeItem(item.uid, item.type - 1) setPlayerStorageValue(cid, storage, os.time()+exhaust) else doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.") end return TRUE end
     
    actions.xml adicione a tag:

    <action itemid="7443" event="script" value="regenera.lua" override="yes"/>
     
     
     
    em items.xml Substitua:
     

    <item id="7443" article="a" name="bullseye potion"> <attribute key="weight" value="200" /> <attribute key="description" value="Drinking this potion increases temporarily your distance skill while decreasing your defense." /> </item>
     
    por:
     

    <item id="7443" article="a" name="Regeneração Potion" override="yes"> <attribute key="description" value="Poção de regenerar sua vida e mana em um determinado tempo."/> <attribute key="decayTo" value="7636"/> <attribute key="charges" value="5"/> <attribute key="showcharges" value="1"/> <attribute key="weight" value="300"/> </item>
  16. Upvote
    Vodkart recebeu reputação de helinholima em [Pedido] Perder Exp   
    tem sim.
     
    noloot.lua

    function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then doCreatureSetDropLoot(cid, false) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) return TRUE end return TRUE end
     
    em data\creaturescripts\scripts\login.lua adiciona a linha:

    registerCreatureEvent(cid, "onPrepareLoot")
     
    creaturescripts.xml adicione:
     

    <event type="preparedeath" name="onPrepareLoot" event="script" value="noloot.lua"/>
     
     
     
     
    -------------------------//---------------
     
    caso queira colocar para não perder exp tbm só adicionar
     

    doPlayerSetLossPercent(cid, experience, 0)
  17. Upvote
    Vodkart recebeu reputação de helinholima em Ajuda Com Um Script De Npc   
    edita ai
     

    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 talkState = {} 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 pos = {x=152,y=58,z=7} -------------- Pos para onde o player sera levado local itemid = 2468 ----------------- Id do item que vai ser removido do player if msgcontains(msg, "travel") then selfSay("Eu posso te levar a TAL lugar por um "..getItemNameById(itemid).." item, fale {passage} se quizer viajar.", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "passage") then selfSay("Are you sure? {yes} ", cid) talkState[talkUser] = 2 elseif msgcontains(msg, "yes") then if doPlayerRemoveItem(cid, itemid, 1) then selfSay("Boa viagem.", cid) doTeleportThing(cid, pos) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) else selfSay('You don\'t have '.. getItemNameById(itemid) ..'', cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end elseif msg == "no" and talkState[talkUser] == 2 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  18. Upvote
    Vodkart recebeu reputação de ToT67 em Level Door !   
    Não precisa de nenhum script
     
    vai no mapper editor e coloca a porta lá.
     
    depois que coloco a porta,com o botão direito vai na Propriedade da porta e coloca
     
    ActionID = 1100
     
    Pronto
  19. Upvote
    Vodkart recebeu reputação de helinholima em [Pedido] Npc Para Vip   
    NPC:
     

    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 talkState = {} 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 price = 1000000 local days = 30 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13540) local timenow = os.time() if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if msgcontains(msg, "vip") then selfSay("you buy " .. days .. " vip for " .. price .. " Are you sure?", cid) talkState[talkUser] = 1 elseif(msgcontains(msg, "yes") and talkState[talkUser] == 1)then if doPlayerRemoveMoney(cid, price) == TRUE then selfSay('From now, you are vip!', cid) setPlayerStorageValue(cid, 13540, time) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) else selfSay('You don\'t have '.. price ..'', cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end elseif msg == "no" and talkState[talkUser] == 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
     
     
     
    chão só para vips passar:
     
     
    vipe.lua

    function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Vc nao e vip , compre com o NPC.", msgWelcome = "Seja Bem Vindo a Area vip." } if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end
     

    <movevent type="StepIn" uniqueid="13700" event="script" value="vipe.lua"/>
  20. Upvote
    Vodkart deu reputação a joaohd em Alguem Tem Uma Scripts Assim.   
    Isso(?):
     

    function onStepIn(cid, item, pos, frompos) return doSummonCreature("Demon", frompos) end
     
     
    flw
  21. Upvote
    Vodkart recebeu reputação de LorDz em Alguem Tem Uma Scripts Assim.   
    é em movements brother ^^
  22. Upvote
    Vodkart recebeu reputação de adrianjunior em Mudar O Nome Ao Comprar Vip.   
    testa ai
     
     
     
    coloquei o script para kikar ele mais talvezo char tenha que relogar mesmo
  23. Upvote
    Vodkart recebeu reputação de Pereirinha1 em [Problema]Exp Ring   
    ah ta entendi...
    tenta inverter ai
     
     
     
     

    local rate = 1.5 function onEquip(cid, item, slot) if(item.itemid ~= 7708) then doPlayerSendTextMessage(cid, 22, 'BONUS EXP ON') doPlayerSetExperienceRate(cid, rate) doTransformItem(item.uid, 7697 ) return TRUE end return TRUE end function onDeEquip(cid, item, slot) if(item.itemid ~= 7697 ) then return TRUE end doPlayerSetExperienceRate(cid, 1.0) doPlayerSendTextMessage(cid, 22, 'BONUS EXP OFF.') doTransformItem(item.uid, 7708) return TRUE end
     

    <movevent type="Equip" itemid="7708" slot="ring" event="function" value="onEquipItem"/> <movevent type="Equip" itemid="7697" slot="ring" event="script" value="bonusring/bonusring.lua"/> <movevent type="DeEquip" itemid="7697" slot="ring" event="script" value="bonusring/bonusring.lua"/>
  24. Upvote
    Vodkart recebeu reputação de SkyDangerous em Algumas Dúvidas   
    <attribute key="breakChance" value="0"/>
     
    Server também para armas e armors sim.
     
     
     
     
     
    aol para red skull :
     
    http://www.xtibia.com/forum/topic/133412-red-skull-amulet/
  25. Upvote
    Vodkart recebeu reputação de Oapocalipse em Item Que Muda O Lootype Do Player Que Da Use   
    function onUse(cid, item, frompos, item2, topos) local price = 900000 local outfit_male = {lookType=309,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} local outfit_female = {lookType=310,lookHead=0,lookAddons=0,lookLegs=0,lokBody=0,lookFeet=0} local time = 1 -- em minutos local storage = getPlayerStorageValue(cid,52525) -- n mexa local male = 309 local female = 310 -- ? local addon = 1 if storage == -1 then if(doPlayerRemoveMoney(cid,price) == TRUE) then if(getPlayerSex(cid) == 1) then doPlayerAddOutfit(cid, male, addon) doSetCreatureOutfit(cid, outfit_male, time*60*1000) doPlayerSetStorageValue(cid,52525,1) doPlayerSendTextMessage (cid, 22, 'Traje especial comprado! Você perdeu 90 crystal coins') elseif(getPlayerSex(cid) == 0) then doPlayerAddOutfit(cid, female, addon) doSetCreatureOutfit(cid, outfit_female, time*60*1000) doPlayerSetStorageValue(cid,52525,1) doPlayerSendTextMessage (cid, 22, 'Traje especial comprado! Você perdeu 90 crystal coins') end else doPlayerSendTextMessage (cid, 22, 'Você não tem dinheiro suficiente para comprar o traje, 90 crystal coins') end else doPlayerSendTextMessage (cid, 22, 'Você já possui essa outfit') end return TRUE end
  • Quem Está Navegando   0 membros estão online

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