Ir para conteúdo
  • Cadastre-se

(Resolvido)items inicias do Player


Ir para solução Resolvido por roriscrave,

Posts Recomendados

Toda vez que eu faço um persongem pelo site e vou entrar no ot

ele já vem como os items alguém poderia mim ajuda?


alguém?


alguém porfavor :D

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites

Como o Luan disse, é em creaturescripts... Tenho um de de exemplo aqui, mas tem que mudar os itens...

firstitems.lua

 local commonItems = {

  -- ITEMS ALL VOCS RECEIVE
  {itemid=2120, count=1}, -- rope
  {itemid=5710, count=1}, -- shovel
  {itemid=2420, count=1}, -- machete
  {itemid=2789, count=100}, -- brown mushrooms
  {itemid=2305, count=1}, -- fire bomb rune
  {itemid=2261, count=1}, -- destroy field rune
  {itemid=2160, count=5}, -- crystal
}
 
local firstItems = {
  { -- SORC ITEMS
    {itemid=9778, count=1}, -- 
    {itemid=8871, count=1}, -- focus cape
    {itemid=7894, count=1}, -- 
    {itemid=2195, count=1}, -- boots of haste
    {itemid=8918, count=1}, -- 
    {itemid=7958, count=1}, -- 
 
    {itemid=2268, count=1}, -- sd
    {itemid=2273, count=1}, -- uh
    {itemid=7590, count=1}, -- gmp
    {itemid=2293, count=1}, -- mw
  },
  { -- DRUID ITEMS
    {itemid=9778, count=1}, -- 
    {itemid=8871, count=1}, -- focus cape
    {itemid=7894, count=1}, -- 
    {itemid=2195, count=1}, -- boots of haste
    {itemid=8918, count=1}, -- 
    {itemid=7958, count=1}, -- hailstorm rod  
 
    {itemid=2268, count=1}, -- sd
    {itemid=2273, count=1}, -- uh
    {itemid=7590, count=1}, -- gmp
    {itemid=2293, count=1}, -- mw
    {itemid=2269, count=1}, -- wg
    {itemid=2278, count=1}, -- para
  },
  { -- PALADIN ITEMS
    {itemid=2343, count=1}, -- demon helmet
    {itemid=8888, count=1}, -- paladin armor
    {itemid=2495, count=1}, -- blue legs
    {itemid=2195, count=1}, -- boots of haste
    {itemid=8851, count=1}, -- 
    {itemid=6529, count=1}, -- 
 
    {itemid=2268, count=1}, -- sd
    {itemid=2273, count=1}, -- uh
    {itemid=8472, count=1}, -- gsp
    {itemid=7589, count=1}, -- smp
    {itemid=7588, count=1}, -- shp
    {itemid=2293, count=1}, -- mw
  },
  { -- KNIGHT ITEMS
    {itemid=2493, count=1}, -- demon helmet
    {itemid=8882, count=1}, -- magic plate armor
    {itemid=2495, count=1}, -- golden legs
    {itemid=2195, count=1}, -- boots of haste
    {itemid=6391, count=1}, -- mastermind shield
    {itemid=2454, count=1}, -- war axe
    {itemid=2408, count=1}, -- war sword
    {itemid=8927, count=1}, -- war clube
 
    {itemid=7620, count=1}, -- mp
    {itemid=7591, count=1}, -- ghp
    {itemid=8473, count=1}, -- uhp
    {itemid=2313, count=1}, -- explosion
    {itemid=2293, count=1}, -- mw
  }
}
 
for _, items in ipairs(firstItems) do
  for _, item in ipairs(commonItems) do
    table.insert(items, item)
  end
end
 
function onLogin(cid)
  if getPlayerGroupId(cid) < 2 then
    local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708)
 
    if hasReceivedFirstItems == -1 then
      --[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)
 
      local giveItems = firstItems[getPlayerVocation(cid)]
 
      if giveItems ~= nil then
        for _, v in ipairs(giveItems) do
          --doAddContainerItem(backpack, v.itemid, v.count or 1)
          doPlayerAddItem(cid, v.itemid, v.count or 1)
        end
 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bem-Vindo ao Rebuke-War!.")
        setPlayerStorageValue(cid, 67708, 1)  
      end
    end
  end
  return TRUE
end



Em creaturescripts.xml coloque essa tag:

<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>



Ajudei? REP+

Link para o post
Compartilhar em outros sites

Creio que seja o script first items que dá os items inicias, fica em creaturescript/scripts/firstitems.lua

não tem nada disso no creaturescript

antes de eu instalar website não vinha esses items

 

 

Como o Luan disse, é em creaturescripts... Tenho um de de exemplo aqui, mas tem que mudar os itens...

firstitems.lua

 local commonItems = {

  -- ITEMS ALL VOCS RECEIVE
  {itemid=2120, count=1}, -- rope
  {itemid=5710, count=1}, -- shovel
  {itemid=2420, count=1}, -- machete
  {itemid=2789, count=100}, -- brown mushrooms
  {itemid=2305, count=1}, -- fire bomb rune
  {itemid=2261, count=1}, -- destroy field rune
  {itemid=2160, count=5}, -- crystal
}
 
local firstItems = {
  { -- SORC ITEMS
    {itemid=9778, count=1}, -- 
    {itemid=8871, count=1}, -- focus cape
    {itemid=7894, count=1}, -- 
    {itemid=2195, count=1}, -- boots of haste
    {itemid=8918, count=1}, -- 
    {itemid=7958, count=1}, -- 
 
    {itemid=2268, count=1}, -- sd
    {itemid=2273, count=1}, -- uh
    {itemid=7590, count=1}, -- gmp
    {itemid=2293, count=1}, -- mw
  },
  { -- DRUID ITEMS
    {itemid=9778, count=1}, -- 
    {itemid=8871, count=1}, -- focus cape
    {itemid=7894, count=1}, -- 
    {itemid=2195, count=1}, -- boots of haste
    {itemid=8918, count=1}, -- 
    {itemid=7958, count=1}, -- hailstorm rod  
 
    {itemid=2268, count=1}, -- sd
    {itemid=2273, count=1}, -- uh
    {itemid=7590, count=1}, -- gmp
    {itemid=2293, count=1}, -- mw
    {itemid=2269, count=1}, -- wg
    {itemid=2278, count=1}, -- para
  },
  { -- PALADIN ITEMS
    {itemid=2343, count=1}, -- demon helmet
    {itemid=8888, count=1}, -- paladin armor
    {itemid=2495, count=1}, -- blue legs
    {itemid=2195, count=1}, -- boots of haste
    {itemid=8851, count=1}, -- 
    {itemid=6529, count=1}, -- 
 
    {itemid=2268, count=1}, -- sd
    {itemid=2273, count=1}, -- uh
    {itemid=8472, count=1}, -- gsp
    {itemid=7589, count=1}, -- smp
    {itemid=7588, count=1}, -- shp
    {itemid=2293, count=1}, -- mw
  },
  { -- KNIGHT ITEMS
    {itemid=2493, count=1}, -- demon helmet
    {itemid=8882, count=1}, -- magic plate armor
    {itemid=2495, count=1}, -- golden legs
    {itemid=2195, count=1}, -- boots of haste
    {itemid=6391, count=1}, -- mastermind shield
    {itemid=2454, count=1}, -- war axe
    {itemid=2408, count=1}, -- war sword
    {itemid=8927, count=1}, -- war clube
 
    {itemid=7620, count=1}, -- mp
    {itemid=7591, count=1}, -- ghp
    {itemid=8473, count=1}, -- uhp
    {itemid=2313, count=1}, -- explosion
    {itemid=2293, count=1}, -- mw
  }
}
 
for _, items in ipairs(firstItems) do
  for _, item in ipairs(commonItems) do
    table.insert(items, item)
  end
end
 
function onLogin(cid)
  if getPlayerGroupId(cid) < 2 then
    local hasReceivedFirstItems = getPlayerStorageValue(cid, 67708)
 
    if hasReceivedFirstItems == -1 then
      --[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)
 
      local giveItems = firstItems[getPlayerVocation(cid)]
 
      if giveItems ~= nil then
        for _, v in ipairs(giveItems) do
          --doAddContainerItem(backpack, v.itemid, v.count or 1)
          doPlayerAddItem(cid, v.itemid, v.count or 1)
        end
 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bem-Vindo ao Rebuke-War!.")
        setPlayerStorageValue(cid, 67708, 1)  
      end
    end
  end
  return TRUE
end

Em creaturescripts.xml coloque essa tag:

<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>

Ajudei? REP+

 

não tem nada disso no creaturescript

antes de eu instalar website não vinha esses items

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites

aqui :

 

<?xml version="1.0" encoding="UTF-8"?>



<creaturescripts>

              <event type="look" name="HouseTranslation" script="house_translation.lua"/>

              <event type="joinchannel" name="ShowPokedex" event="script" value="newpokedex.lua"/>
    <event type="leavechannel" name="ClosePokedex" event="script" value="newpokedex.lua"/>

    <event type="kill" name="task_count" script="task.lua"/>
    <event type="kill" name="dropStone" script="dropStone.lua"/>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>


    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>

    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>

    <event type="death" name="Experience" event="script" value="pokeexp.lua"/>

    <event type="spawn" name="Spawn" event="script" value="spawn.lua"/>

    <event type="think" name="t" event="script" value="wildpoke.lua"/>

    <event type="statschange" name="GeneralConfiguration" event="script" value="exp2.0.lua"/>
    <event type="advance" name="EffectOnAdvance" event="script" value="levelup.lua"/>
        <event type="login" name="aloot_reg" event="script" value="aloot.lua"/>
        <event type="kill" name="aloot_kill" event="script" value="aloot.lua"/>

    <event type="direction" name="DirectionSystem" event="script" value="wildpoke.lua"/>
    <event type="attack" name="AttackSystem" event="script" value="wildpoke.lua"/>
    <event type="cast" name="CastSystem" event="script" value="wildpoke.lua"/>
    <event type="target" name="WildAttack" event="script" value="playerattack.lua"/>


    <event type="look" name="LookSystem" event="script" value="look.lua"/>


    <event type="death" name="SummonDeath" event="script" value="goback.lua"/>
    <event type="logout" name="PlayerLogout" event="script" value="goback.lua"/>


<!-- TV SYSTEM -->
    <event type="joinchannel" name="WatchTv" event="script" value="tvsys.lua"/>
    <event type="leavechannel" name="StopWatchingTv" event="script" value="tvsys.lua"/>

    <event type="walk" name="WalkTv" event="script" value="tvsys.lua"/>

    <event type="textedit" name="RecordTv" event="script" value="tvsys.lua"/>


    <event type="traderequest" name="T2" event="script" value="trade system.lua"/>

    <event type="tradeaccept" name="T1" event="script" value="trade system.lua"/>

        <event type="kill" name="KillAlavanca" event="script" value="outland alavanca 1.lua"/>

        <event type="login" name="viplogin" script="viplogin.lua"/>

        <event type="login" name="ExpVip" script="vipexp.lua"/>

        <event type="login" name="OutfitVip" script="outfitvip.lua"/>
        <event type="login" name="Outfit2" script="outfitvip2.lua"/>

        <event type="death" name="removewall" event="script" value="removewall.lua"/>

</creaturescripts>

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites

Login.lua

local config = {


    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)

    if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 10 then   --alterado v1.8
       doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
    else     
       doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) )
    end
    doCreatureSetDropLoot(cid, false)

    local accountManager = getPlayerAccountManager(cid)

    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Sua ultima visita foi em " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
    end

    if getCreatureName(cid) == "Account Manager" then
        local outfit = {}
        if accountManagerRandomPokemonOutfit then
            outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}
        else
            outfit = accountManagerOutfit
        end
    
        doSetCreatureOutfit(cid, outfit, -1)
    return true
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    local outfit = {}

    if getPlayerVocation(cid) == 0 then
        doPlayerSetMaxCapacity(cid, 0)
        doPlayerSetVocation(cid, 1)
        setCreatureMaxMana(cid, 6)
        doPlayerAddSoul(cid, -getPlayerSoul(cid))
        setPlayerStorageValue(cid, 19898, 0)
            if getCreatureOutfit(cid).lookType == 128 then
                outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            elseif getCreatureOutfit(cid).lookType == 136 then
                outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
            end
        doCreatureChangeOutfit(cid, outfit)
    end

    registerCreatureEvent(cid, "dropStone")  
    registerCreatureEvent(cid, "ShowPokedex")
    registerCreatureEvent(cid, "ClosePokedex")
    registerCreatureEvent(cid, "WatchTv")
    registerCreatureEvent(cid, "StopWatchingTv")
    registerCreatureEvent(cid, "WalkTv")
    registerCreatureEvent(cid, "RecordTv")
    registerCreatureEvent(cid, "PlayerLogout")
    registerCreatureEvent(cid, "WildAttack")
    registerCreatureEvent(cid, "Idle")
    registerCreatureEvent(cid, "EffectOnAdvance")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "SaveReportBug")   
    registerCreatureEvent(cid, "LookSystem")
    registerCreatureEvent(cid, "T1")
    registerCreatureEvent(cid, "T2")
    registerCreatureEvent(cid, "task_count")
        registerCreatureEvent(cid, "KillAlavanca")
        registerCreatureEvent(cid, "ExpVip")
        registerCreatureEvent(cid, "HouseTranslation")

    

    if getPlayerStorageValue(cid, 99284) == 1 then
        setPlayerStorageValue(cid, 99284, -1)
    end

    if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
       setPlayerStorageValue(cid, 6598754, -1)
       setPlayerStorageValue(cid, 6598755, -1)
       doRemoveCondition(cid, CONDITION_OUTFIT)             --alterado v1.9 \/
       doTeleportThing(cid, posBackPVP, false)
       doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    end
    
    doChangeSpeed(cid, -(getCreatureSpeed(cid)))
    
    --///////////////////////////////////////////////////////////////////////////--
    local storages = {17000, 63215, 17001, 13008, 5700}
    for s = 1, #storages do
        if not tonumber(getPlayerStorageValue(cid, storages)) then
           if s == 3 then
              setPlayerStorageValue(cid, storages, 1)
           elseif s == 4 then
              setPlayerStorageValue(cid, storages, -1)
           else   
              if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then
                 setPlayerStorageValue(cid, storages, 1)                 
              else
                 setPlayerStorageValue(cid, storages, -1)
              end
           end
           doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright")
        end
    end
    --/////////////////////////////////////////////////////////////////////////--
    if getPlayerStorageValue(cid, 17000) >= 1 then -- fly
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        doRemoveCondition(cid, CONDITION_OUTFIT)
        doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

    local apos = getFlyingMarkedPos(cid)
    apos.stackpos = 0
        
            if getTileThingByPos(apos).itemid <= 2 then
                doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)
                doCreateItem(460, 1, getFlyingMarkedPos(cid))
            end

    doTeleportThing(cid, apos, false)
    if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
       sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
    end  
 
    local posicao = getTownTemplePosition(getPlayerTown(cid))
    markFlyingPos(cid, posicao)
    
    elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6
        doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
        if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
           sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
        end

    elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride
        
        local item = getPlayerSlotItem(cid, 8)
        local poke = getItemAttribute(item.uid, "poke")
        
        
        if rides[poke] then
           doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
           doRemoveCondition(cid, CONDITION_OUTFIT)
           doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)
           if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
              sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
           end
        else
           setPlayerStorageValue(cid, 17001, -1)
           doRegainSpeed(cid)   
        end
    
        local posicao2 = getTownTemplePosition(getPlayerTown(cid))
        markFlyingPos(cid, posicao2)
        
    elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive
       if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then
            setPlayerStorageValue(cid, 13008, 0)
            doRegainSpeed(cid)              
            doRemoveCondition(cid, CONDITION_OUTFIT)
        return true
        end   
          
       if getPlayerSex(cid) == 1 then
          doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       else
          doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       end
       doChangeSpeed(cid, 800)

     elseif getPlayerStorageValue(cid, 5700) > 0 then   --bike
        doChangeSpeed(cid, -getCreatureSpeed(cid))
        doChangeSpeed(cid, getPlayerStorageValue(cid, 5700))  --alterado v1.8
        if getPlayerSex(cid) == 1 then
           doSetCreatureOutfit(cid, {lookType = 1394}, -1)
        else
           doSetCreatureOutfit(cid, {lookType = 1393}, -1)
        end
     
     elseif getPlayerStorageValue(cid, 75846) >= 1 then     --alterado v1.9 \/
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)  
        setPlayerStorageValue(cid, 75846, -1)
        sendMsgToPlayer(cid, 20, "You have been moved to your town!")
     else
        doRegainSpeed(cid)  
     end
    
    if getPlayerStorageValue(cid, 22545) >= 1 then
       setPlayerStorageValue(cid, 22545, -1)              
       doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
       setPlayerRecordWaves(cid)     
    end

    
    if useKpdoDlls then
        doUpdateMoves(cid)
        doUpdatePokemonsBar(cid)
    end
    return true
end

 

aloot.lua

function onLogin(cid)


    registerCreatureEvent(cid, "aloot_kill")
    return true
end
 
local stor = 7575
 
function autoloot(cid, target, pos)
    local function doStack(cid, itemid, new)
        local count = getPlayerItemCount(cid, itemid)
        if (count > 100) then
            count = count - math.floor(count / 100) * 100
        end
        local newCount = count + new
        if (count ~= 0) then
            local find = getPlayerItemById(cid, true, itemid, count).uid
            if (find > 0) then
                doRemoveItem(find)
            else
                newCount = new
            end
        end
        local item = doCreateItemEx(itemid, newCount)
        doPlayerAddItemEx(cid, item, true)
    end
 
    local function scanContainer(cid, uid, list)
        for k = (getContainerSize(uid) - 1), 0, -1 do
            local tmp = getContainerItem(uid, k)
            if (isInArray(list, tmp.itemid)) then
                if isItemStackable(tmp.itemid) and (getPlayerItemCount(cid, tmp.itemid) > 0) then
                    doStack(cid, tmp.itemid, tmp.type)
                else
                    local item = doCreateItemEx(tmp.itemid, tmp.type)
                    doPlayerAddItemEx(cid, item, true)
                end
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Looted ' .. tmp.type .. ' ' .. getItemNameById(tmp.itemid) .. '.')
                doRemoveItem(tmp.uid)
            elseif isContainer(tmp.uid) then
                scanContainer(cid, tmp.uid, list)
            end
        end
    end
 
    local items = {}
    for i = getTileInfo(pos).items, 1, -1 do
        pos.stackpos = i
        table.insert(items, getThingFromPos(pos))
    end
 
    if (#items == 0) then
        return
    end
 
    local corpse = -1
    for _, item in ipairs(items) do
        local name = getItemName(item.uid):lower()
        if name:find(target:lower()) then
            corpse = item.uid
            break
        end
    end
 
    if (corpse ~= -1) and isContainer(corpse) then
        scanContainer(cid, corpse, tostring(getPlayerStorageValue(cid, stor)):gsub('_', ''):explode(','))
    end
end
 
function onKill(cid, target, lastHit)
    if not isPlayer(target) then
        local infos = getPlayerStorageValue(cid, stor)
        if (infos == -1) then
            return true
        end
        local list = tostring(infos):explode(',')
        if (#list == 0) then
            return true
        end
        addEvent(autoloot, 150, cid, getCreatureName(target), getCreaturePosition(target))
    end
    return true
end

 

Viplogin.lua

function onLogin(cid)


    local vip = isVip(cid)
    if getVipTime(cid) > 0  and vip == FALSE then
        local townid = 1
        doPlayerSetTown(cid, townid)
        local templePos = getTownTemplePosition(getPlayerTown(cid))
        doTeleportThing(cid, templePos, false)
        setVipTime(cid, 0)
        doTeleportPlayers(cid, templePos)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua Vip acabou!")
    elseif vip == TRUE then
        local duration = getVipDate(cid)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela ira durar ate "..duration..".") or ""))
    end
    return TRUE
end

 

vipexp.lua

function onLogin(cid)



local rate = 1.5 -- 50%
local config = {
welvip = "voce tem "..((rate - 1)*100).."% de exp a mais agora!",
not_vip = "Tornesse vip e ganhe "..((rate - 1)*100).."% a mais de experiencia!",
vip = isVip(cid)
}

if (config.vip == TRUE) then
doPlayerSetExperienceRate(cid, rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.welvip)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.not_vip)
end
return TRUE
end

 

outfitvip.lua

--[[ Script By Vodkart]]--


function onLogin(cid)

local x = {
[0] = {lookType = 1190, lookHead =  getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = 0}, -- Outfit Female caso acabe a vip (n precisa mexer)
[1] = {lookType = 1191, lookHead =  getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = 0} -- Outfit Male caso acabe a vip (n precisa mexer)  
}
quest_storage = 11322 -- numero da sua storage escolhida

if isVip(cid) == TRUE and getPlayerStorageValue(cid, quest_storage) == -1  then
setPlayerStorageValue(cid, quest_storage, 1)
elseif isVip(cid) == FALSE and getPlayerStorageValue(cid, quest_storage) >= 1 then
setPlayerStorageValue(cid, quest_storage, -1)
doCreatureChangeOutfit(cid, x[getPlayerSex(cid)])
end
return TRUE
end

 

outfit2.lua

--[[ Script By Vodkart]]--


function onLogin(cid)

local x = {
[0] = {lookType = 1442, lookHead =  getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = 0}, -- Outfit Female caso acabe a vip (n precisa mexer)
[1] = {lookType = 1441, lookHead =  getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = 0} -- Outfit Male caso acabe a vip (n precisa mexer)  
}
quest_storage = 11323 -- numero da sua storage escolhida

if isVip(cid) == TRUE and getPlayerStorageValue(cid, quest_storage) == -1  then
setPlayerStorageValue(cid, quest_storage, 1)
elseif isVip(cid) == FALSE and getPlayerStorageValue(cid, quest_storage) >= 1 then
setPlayerStorageValue(cid, quest_storage, -1)
doCreatureChangeOutfit(cid, x[getPlayerSex(cid)])
end
return TRUE
end

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites

Mano vá em mods na pasta do servidor, dentro há o arquivo firstitems.xml é ele.

Já tentei mais não é ver ai, quando cria a conta que o player loga ele vem com 10 pokeballs e 1 pokemon

 

firstitems.xml

<?xml version="1.0" encoding="UTF-8"?>

<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">

    <config name="firstitems_config">

<![CDATA[        config = {

            storage = 30001,

            items = {1988, 1987, 2382, 2120, 2580, 2550, 7385, 2395, 2547}

            -- 7385 (pokeinfo)

            -- 2395 (portfoil)  ok

            -- 2382    (pokedex)    ok

            -- 2547 (coin case)    ok

            -- 2550 (order)        ok

            -- 1987 (bag)        ok

            -- 1988 (badge case)    ok

            -- 2120 (rope)        ok

            -- 2580 (fishing rod)    ok

        }

    ]]>

</config>

    <event type="login" name="FirstItems" event="script">

<![CDATA[

        domodlib('firstitems_config')

        function onLogin(cid)

            if getCreatureName(cid) == "Account Manager" then

                doSetCreatureOutfit(cid, {lookType = 655}, -1)

            return true

            end

            if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then

            return true

            end

            for _, id in ipairs(config.items) do

                doPlayerAddItem(cid, id, 1)

            end

            local bag = getPlayerItemById(cid, false, 1988).uid

            doAddContainerItem(bag, 12267, 1)

            doAddContainerItem(bag, 12266, 1)

            doAddContainerItem(bag, 12264, 1)

            doAddContainerItem(bag, 12265, 1)

            doAddContainerItem(bag, 12263, 1)

            doAddContainerItem(bag, 12262, 1)

            doAddContainerItem(bag, 12261, 1)

            doAddContainerItem(bag, 12260, 1)

            return true

        end

    ]]></event>

</mod>

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites

cara, sao seus samples, logue com eles e retire os items

Obrigado d+ :D

resolvido tag adicionada

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo