Error con firstitems
3 participantes
- God YoterMiembro
- Mensajes : 21
Error con firstitems
Vie Jun 15, 2012 5:08 pm
Hola amigos miren tengo un error con los items que te dan al crear un char el problemas es que no me dan los items de ninguna vocation ni los tira al piso ni nada nomas me da un bp cafe mi exe es el de otx
Aqui esta el script
Aqui esta el script
- Código:
local commonItems = {
-- ITEMS ALL VOCS RECEIVE
{itemid=2120, count=1}, -- rope
{itemid=2160, count=1}, -- cristal coin
{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
}
local firstItems = {
{ -- SORC ITEMS
{itemid=2323, count=1}, -- hat of the mad
{itemid=8871, count=1}, -- focus cape
{itemid=7730, count=1}, -- blue legs
{itemid=2195, count=1}, -- boots of haste
{itemid=8902, count=1}, -- spellbook of mind control
{itemid=2187, count=1}, -- wand of inferno
{itemid=2268, count=1}, -- sd
{itemid=2273, count=1}, -- uh
{itemid=7589, count=1}, -- smp
{itemid=2293, count=1}, -- mw
},
{ -- DRUID ITEMS
{itemid=2323, count=1}, -- hat of the mad
{itemid=8871, count=1}, -- focus cape
{itemid=7730, count=1}, -- blue legs
{itemid=2195, count=1}, -- boots of haste
{itemid=8902, count=1}, -- spellbook of mind control
{itemid=2183, count=1}, -- hailstorm rod
{itemid=2268, count=1}, -- sd
{itemid=2273, count=1}, -- uh
{itemid=7589, count=1}, -- smp
{itemid=2293, count=1}, -- mw
{itemid=2269, count=1}, -- wg
{itemid=2278, count=1}, -- para
},
{ -- PALADIN ITEMS
{itemid=2493, count=1}, -- demon helmet
{itemid=8891, count=1}, -- paladin armor
{itemid=7730, count=1}, -- blue legs
{itemid=2195, count=1}, -- boots of haste
{itemid=2514, count=1}, -- mastermind shield
{itemid=7368, count=10}, -- assassin stars
{itemid=2268, count=1}, -- sd
{itemid=2273, count=1}, -- uh
{itemid=7589, count=1}, -- smp
{itemid=7588, count=1}, -- shp
{itemid=2293, count=1}, -- mw
},
{ -- KNIGHT ITEMS
{itemid=2493, count=1}, -- demon helmet
{itemid=2472, count=1}, -- magic plate armor
{itemid=2470, count=1}, -- golden legs
{itemid=2195, count=1}, -- boots of haste
{itemid=2514, count=1}, -- mastermind shield
{itemid=2400, count=1}, -- magic sword
{itemid=2431, count=1}, -- Stonecutter Axe
{itemid=7620, count=1}, -- mp
{itemid=7588, count=1}, -- shp
{itemid=2313, count=1}, -- explosion
{itemid=7591, count=1}, -- ghp
{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, "You have recieved your equipment")
setPlayerStorageValue(cid, 67708, 1)
end
end
end
return TRUE
end
Re: Error con firstitems
Sáb Jun 16, 2012 8:25 am
Usa este MOD, De firstitems,
Debe de funcionar, ya que lo tiene por defecto al bajar el otx..
- Código:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Kaiser" contact="marranas6@gmail.com" enabled="yes">
<description><![CDATA[
Custom Fist Items
]]></description>
<config name="firstitems_config"><![CDATA[
config = {
storage = 40046,
items = {}
}
]]></config>
<event type="login" name="FirstItems" event="buffer"><![CDATA[
domodlib('firstitems_config')
if(getPlayerStorageValue(cid, config.storage) > 0) then
return
end
for _, id in ipairs(config.items) do
doPlayerAddItem(cid, id, 1)
end
-- All Vocation
-- BackPack -- Rope -- in Backpack
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2120, 1)
-- Brass Armor -- Body
doPlayerAddItem(cid, 2465, 1)
-- Steel Helmet -- Head
doPlayerAddItem(cid, 2457, 1)
-- Bonelord Shield -- Right Hand
doPlayerAddItem(cid, 2518, 1)
-- Sorcerer (Weapon) -- Hand
if isSorcerer(cid) then
doPlayerAddItem(cid, 2190, 1) -- Wand of Vortex -- Left Hand
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
-- Druid (Weapon) -- Hand
elseif isDruid(cid) then
doPlayerAddItem(cid, 2182, 1) -- Snake Bite Rod -- Left Hand
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
-- Paladin - Warrior (Weapon) -- Hand
elseif isPaladin(cid) then
doPlayerAddItem(cid, 2389, 20) -- Spear -- Left Hand
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
-- Knight (Weapon) -- Hand
elseif isKnight(cid) then
doPlayerAddItem(cid, 8602, 1) -- Jagged Sword -- Left Hand
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT," "..getPlayerName(cid).." now have the first items of "..getPlayerVocationName(cid)..".")
end
-- All Vocation
-- Brass Legs -- in Feet
doPlayerAddItem(cid, 2478, 1)
-- Leather Boots -- in Boots
doPlayerAddItem(cid, 2643, 1)
-- Scarf -- in Necklacke
doPlayerAddItem(cid, 2661, 1)
-- Platinum Coin -- in Arrows
doPlayerAddItem(cid, 2152, 1)
-- Health Potion -- in Backpack
doPlayerAddItem(cid, 7618, 10)
-- Shovel -- in Backpack
doPlayerAddItem(cid, 2554, 1)
-- Crystal Ring -- in Ring
doPlayerAddItem(cid, 2124, 1)
-- Mana Potion -- in Backpack
doPlayerAddItem(cid, 7620, 15)
-- Knight (Weapon) -- in Backpack
if isKnight(cid) then
doPlayerAddItem(cid, 8601, 1) -- Steel Axe
doPlayerAddItem(cid, 2439, 1) -- Daramanian mace
end
setPlayerStorageValue(cid, config.storage, 1)
]]></event>
</mod>
Debe de funcionar, ya que lo tiene por defecto al bajar el otx..
- "Ryukend"Miembro
- Mensajes : 120
Re: Error con firstitems
Miér Jun 20, 2012 7:42 pm
48 Horas sin respuesta y con una solución ,cerrado y muevo a Resueltos!.
Permisos de este foro:
No puedes responder a temas en este foro.