• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[SOLUCIONADO] ¿Como cambio los items de un nuevo character?

R0B3RT0

New Member
Joined
Aug 23, 2010
Messages
8
Reaction score
0
Location
México.
Necesito cambiar los items que te dan al crear un nuevo personaje, como que aparesca con unos 5cc en la bp, cuerda, pala, y si en verdad traen ganas de presumir lo que saben pss que a cada vocación tuviera cosas distintas.

Agradeceré su ayuda. :3
 
Last edited:
Eso necesita un script, intenta el que viene con mi server Advanced War

No necesariamente.
ON: Si tienes web entonces hazlo con las samples, y sino en firstitems que creo que esta en creaturescripts.
[En el foro ahi algunos MODS tambien]
 
first go to data/creature script/scripts
and make a lua whit the name >> Firstitems.lua
and put this

Code:
local commonItems = {
  -- ITEMS ALL VOCS RECEIVE          [COLOR="Lime"]-- all vocs will recive this items[/COLOR]
  {itemid=here the id of item, count=here how much items}, 
  {itemid=here the id of item, count=}here how much items, 
  {itemid=here the id of item, count=}here how much items, 
  {itemid=here the id of item, count=}here how much items, 
  {itemid=here the id of item, count=}here how much items, 
  {itemid=here the id of item, count=}here how much items, 
  {itemid=here the id of item, count=}here how much items, 
}

local firstItems = {
  { -- SORC ITEMS           [COLOR="Blue"]--sorc items[/COLOR]
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 

    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},
  },
  { -- DRUID ITEMS              [COLOR="Blue"]--druid items[/COLOR]
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},  

    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
  },
  { -- PALADIN ITEMS    [COLOR="Blue"]--pala items[/COLOR]
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 

    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
  },
  { -- KNIGHT ITEMS      [COLOR="Blue"]--knight items[/COLOR]
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 

    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
  }
}

for _, items in ipairs(firstItems) do
  for _, item in ipairs(commonItems) do
    table.insert(items, item)
  end
end

function onLogin(cid)
  if getPlayerGroupId(cid) < 4 then
    local hasReceivedFirstItems = getPlayerStorageValue(cid, 6771408)

    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, "You have recieved your first items! GoGoGoGoGoGo war!!!!")
      end
      setPlayerStorageValue(cid, 67708, 1)
    end
  end
  return TRUE
end


then go to data\creature scirpt \creature script.xml

and put this

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


hope I helped :thumbup:

para eso esta algo llamado 'search' :p
 
Oh puedes hacer un login check storage, y si es primera vez que entra, le pasas los items que tu quieras y es facil de modificar.
 
Back
Top