ZeeBeast
Preferable Beta Tester
Every time I die, I lose all the items I had before death, and get the starter items again. Even if I take all items off and die, I get the starter items back. Can anyone help me?
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 5710, 1) --Light Shovel--
doAddContainerItem(bag, 7731, 1) --Elvenhair Rope--
doAddContainerItem(bag, 2160, 2) --Crystal Coin--
doAddContainerItem(bag, 7620, 25) --Mana Pot--
doAddContainerItem(bag, 2789, 10) --Brown Mushroom--
doAddContainerItem(bag, 7618, 5) --Health Potion--
doPlayerAddItem(cid, 2525, 1) --Dwarven Shield--
doPlayerAddItem(cid, 2190, 1) --Wand Of Vortex --
doPlayerAddItem(cid, 8871, 1) --Focus Cape--
doPlayerAddItem(cid, 2323, 1) --Hat of the Mad--
doPlayerAddItem(cid, 7730, 1) --Blue Legs--
doPlayerAddItem(cid, 2643, 1) --Leather Boots
setPlayerStorageValue(cid, 50000, 1)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 5710, 1)
doAddContainerItem(bag, 7731, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 7620, 25)
doAddContainerItem(bag, 2789, 10)
doAddContainerItem(bag, 7618, 5)
doPlayerAddItem(cid, 2525, 1)
doPlayerAddItem(cid, 2182, 1)
doPlayerAddItem(cid, 8871, 1)
doPlayerAddItem(cid, 2323, 1)
doPlayerAddItem(cid, 7730, 1)
doPlayerAddItem(cid, 2643, 1)
setPlayerStorageValue(cid, 50000, 1)
elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 5710, 1)
doAddContainerItem(bag, 7731, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 7620, 10)
doAddContainerItem(bag, 2789, 10)
doAddContainerItem(bag, 7618, 25)
doPlayerAddItem(cid, 2389, 3)
doPlayerAddItem(cid, 2528, 1)
doPlayerAddItem(cid, 2497, 1)
doPlayerAddItem(cid, 2643, 1)
doPlayerAddItem(cid, 2477, 1)
doPlayerAddItem(cid, 2476, 1)
setPlayerStorageValue(cid, 50000, 1)
elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 9774, 1)
doAddContainerItem(bag, 5710, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 7731, 1)
doAddContainerItem(bag, 8601, 1)
doAddContainerItem(bag, 7620, 10)
doAddContainerItem(bag, 2789, 10)
doAddContainerItem(bag, 7618, 25)
doPlayerAddItem(cid, 2528, 1)
doPlayerAddItem(cid, 2476, 1)
doPlayerAddItem(cid, 2497, 1)
doPlayerAddItem(cid, 2477, 1)
doPlayerAddItem(cid, 2643, 1)
setPlayerStorageValue(cid, 50000, 1)
end
end
return TRUE
end
I'll try this. But does anyone have a script for a door that you cannot open unless you are a certain voc?That might help indeed.
You could also remove the first item list and make a starting point with chests for each vocation
I'll try this. But does anyone have a script for a door that you cannot open unless you are a certain voc?
You can add actionid 100 + vocid to a gate of expertise door.I'll try this. But does anyone have a script for a door that you cannot open unless you are a certain voc?
Does this mean if I make the actionid 104, it will only work for knights and not elite knights?You can add actionid 100 + vocid to a gate of expertise door.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray(questDoors, item.itemid) == TRUE then
if getPlayerStorageValue(cid, item.actionid) ~= -1 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, TRUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
end
return TRUE
elseif isInArray(levelDoors, item.itemid) == TRUE then
if item.actionid > 0 and getPlayerLevel(cid) >= item.actionid - 1000 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, TRUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
end
return TRUE
elseif isInArray(keys, item.itemid) == TRUE then
if itemEx.actionid > 0 then
if item.actionid == itemEx.actionid then
if doors[itemEx.itemid] ~= nil then
doTransformItem(itemEx.uid, doors[itemEx.itemid])
return TRUE
end
end
doPlayerSendCancel(cid, "The key does not match.")
return TRUE
end
return FALSE
elseif isInArray(horizontalOpenDoors, item.itemid) == TRUE then
local newPosition = toPosition
newPosition.y = newPosition.y + 1
local doorPosition = fromPosition
doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local doorCreature = getThingfromPos(doorPosition)
if doorCreature.itemid ~= 0 then
if getTilePzInfo(doorPosition) == TRUE and getTilePzInfo(newPosition) == FALSE and doorCreature.uid ~= cid then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doTeleportThing(doorCreature.uid, newPosition, TRUE)
if isInArray(openSpecialDoors, item.itemid) ~= TRUE then
doTransformItem(item.uid, item.itemid - 1)
end
end
return TRUE
end
doTransformItem(item.uid, item.itemid - 1)
return TRUE
elseif isInArray(verticalOpenDoors, item.itemid) == TRUE then
local newPosition = toPosition
newPosition.x = newPosition.x + 1
local doorPosition = fromPosition
doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local doorCreature = getThingfromPos(doorPosition)
if doorCreature.itemid ~= 0 then
if getTilePzInfo(doorPosition) == TRUE and getTilePzInfo(newPosition) == FALSE and doorCreature.uid ~= cid then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doTeleportThing(doorCreature.uid, newPosition, TRUE)
if isInArray(openSpecialDoors, item.itemid) ~= TRUE then
doTransformItem(item.uid, item.itemid - 1)
end
end
return TRUE
end
doTransformItem(item.uid, item.itemid - 1)
return TRUE
elseif doors[item.itemid] ~= nil then
if item.actionid == 0 then
doTransformItem(item.uid, doors[item.itemid])
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
end
return TRUE
end
return FALSE
end
dude?Which server do you use? Can you post your doors.lua?