Skrypty & Kody znikaj? przedmioty po wylogowaniu

emememsik

Advanced User
Zarejestrowany
Dołączył
Listopad 5, 2010
Posty
169
Liczba reakcji
17
Ot??, gdy zaloguje si? posta?, powiedzmy, ?e dostaje first eq, wyrzuci z siebie wszystko na ziemie, to gdy zrobi relog, to skrypt zn?w go rozpoznaje jakby by? nowym graczem i rozdaje zn?w te same eq, jakie? porady?
 
Odp: znikaj? przedmioty po wylogowaniu

Kod:
local storage = 67777
function onLogin(cid)
    local config = {
        voc_items = {
            { -- SORC
                {2190}, -- wand of vortex
                {2175}, -- spellbook
                {8820}, -- mage hat
                {8819} -- mage robe
            },
            { -- DRUID
                {2182}, -- snakebite rod
                {2175}, -- spellbook
                {8820}, -- mage hat
                {8819} -- mage robe
            },
            { -- PALADIN
                {2410}, -- throwing knife
                {2530}, -- copper shield
                {2480}, -- legion helmet
                {2464} -- chain armor
            },
            { -- KNIGHT
                {2409}, -- serpent sword
                {2530}, -- copper shield
                {2480}, -- legion helmet
                {2464} -- chain armor
            }
        },
        all_items = {
            {2468}, -- studded legs
            {2643} -- leather boots
        },
        extra_items = {
            {2789, 15},
            {2120},
            {5710}
        },
        knight_weapons = {
            {2423}, -- clerical mace
            {2429} -- barbarian axe
        }
    }
    if getPlayerGroupId(cid) < 3 then
        if getPlayerStorageValue(cid, storage) == -1 then
            local common = config.voc_items[getPlayerVocation(cid)]
            if common ~= nil then
                for _, v in ipairs(common) do
                    doPlayerAddItem(cid, v[1], v[2] or 1)
                end
            end
           
            local all = config.all_items
            if all ~= nil then
                for _, v in ipairs(all) do
                    doPlayerAddItem(cid, v[1], v[2] or 1)
                end
            end
           
            local extra = config.extra_items
            local bp = doPlayerAddItem(cid, 1988, 1)
            if extra ~= nil then
                for _, v in ipairs(extra) do
                    doAddContainerItem(bp, v[1], v[2] or 1)
                end
            end
           
            local weapons = config.knight_weapons
            if weapons ~= nil then
                for _, w in ipairs(weapons) do
                    if isKnight(cid) then
                        doAddContainerItem(bp, w[1], w[2] or 1)
                    end
                end
            end
           
            setPlayerStorageValue(cid, storage, 1)
        end
    end
    return true
end

i w creaturescripts jest to:
Kod:
	<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>

---------- Tre?? dodana o 16:33 ----------

nawet dodam, ?e gdy dodam na zwyk?ym playerze jaki? itemek, on go w?o?y do dp, wyloguje, zaloguje, to automatycznie ten przedmiot znika i cofka do temple. my?l?, ?e gdzie? indziej jest przyczyna, ni? tylko w tym skrypcie z firstitemami.
 
Odp: znikaj? przedmioty po wylogowaniu

Co to za silnik?
Modyfikacje jakie? w nim robi?e??
 
Odp: znikaj? przedmioty po wylogowaniu

Podmie? sobie tylko itemki

[LUA]function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50002) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)

doAddContainerItem(bag, 2120, 1) -- Rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2160, 10) -- 50 platinum coints

doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2190, 1) -- wand of wortex
doPlayerAddItem(cid, 2463, 1) -- p armor
doPlayerAddItem(cid, 2490, 1) -- dark helmet
doPlayerAddItem(cid, 2647, 1) -- p legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddItem(cid, 2273, 1) -- UH
doPlayerAddItem(cid, 2672, 100) -- DHam

setPlayerStorageValue(cid, 50002, 1)

elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2160, 10) -- 50 platinum coins

doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2182, 1) -- snakebite rod
doPlayerAddItem(cid, 2463, 1) -- p armor
doPlayerAddItem(cid, 2490, 1) -- dark helmet
doPlayerAddItem(cid, 2647, 1) -- p legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddItem(cid, 2273, 1) -- UH
doPlayerAddItem(cid, 2672, 100) -- DHam

setPlayerStorageValue(cid, 50002, 1)

elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2160, 10) -- 50 platinum coins

doPlayerAddItem(cid, 2389, 1) -- spear
doPlayerAddItem(cid, 2456, 1) -- bow
doPlayerAddItem(cid, 2544, 100) -- 100 arrows
doPlayerAddItem(cid, 2463, 1) -- p armor
doPlayerAddItem(cid, 2490, 1) -- dark helmet
doPlayerAddItem(cid, 2647, 1) -- p legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddItem(cid, 2273, 1) -- UH
doPlayerAddItem(cid, 2672, 100) -- DHam

setPlayerStorageValue(cid, 50002, 1)

elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2160, 10) -- 50 platinum coins
doAddContainerItem(bag, 2439, 1) -- daramanian mace
doAddContainerItem(bag, 8601, 1) -- steel axe

doPlayerAddItem(cid, 2509, 1) -- steel shield
doPlayerAddItem(cid, 8602, 1) -- jagged sword
doPlayerAddItem(cid, 2463, 1) -- p armor
doPlayerAddItem(cid, 2490, 1) -- dark helmet
doPlayerAddItem(cid, 2647, 1) -- p legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddItem(cid, 2273, 1) -- UH
doPlayerAddItem(cid, 2672, 100) -- DHam

setPlayerStorageValue(cid, 50002, 1)
end
end
return TRUE
end[/LUA]
 
Odp: znikaj? przedmioty po wylogowaniu

Co? wi?cej? Sk?d go masz? Nic nie przerabia?e?? :confused:
 
Odp: znikaj? przedmioty po wylogowaniu

Co? wi?cej? Sk?d go masz? Nic nie przerabia?e??

a przerabia? to wiadomo, co? tam si? przerabia?o.
Chodzi o to, ?e je?eli si? zaloguje, dam sobie 100cc, wyloguje, zn?w zaloguje - znika, nie ma tego + przenosi mnie do temple, nie zapami?tuje poprzedniej pozycji i przedmiot?w.
Powiedz mi jaki plik mo?e by? odpowiedzialny za takie rzeczy, to Ci wstawi?.
 
Ostatnia edycja:
Back
Do góry