• 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!

Lua Warzone onKill

viking

Member
Joined
Aug 20, 2015
Messages
323
Reaction score
22
Hello My script dont removing the item crystals, someone knows why?

Creaturescripts when kill parasites HELPPPPPP
Code:
function onKill(cid, target)


if(string.lower(getCreatureName(target)) == "Parasite" and getGlobalStorageValue(3144) < 100) then
pos = {
{x = 33097, y = 31976, z = 11},
{x = 33097, y = 31977, z = 11},
{x = 33097, y = 31978, z = 11},
{x = 33097, y = 31979, z = 11}
}
barrier = false
for i = 1, 4 do
if(getCreaturePosition(target).x == pos.x and
getCreaturePosition(target).y == pos.y and
getCreaturePosition(target).z == pos.z
) then
barrier = true
end
end
last = false
if(barrier == true) then
for i = 1, 4 do
barrier = {
{x = 33098, y = 31976, z = 11},
{x = 33098, y = 31977, z = 11},
{x = 33098, y = 31978, z = 11},
{x = 33098, y = 31979, z = 11}
}
if(getTileItemById(barrier, 18459).uid > 0) then
doTransformItem(getTileItemById(barrier, 18459).uid, getTileItemById(barrier, 18459), 19460, 1)
elseif(getTileItemById(barrier, 18460).uid > 0) then
doTransformItem(getTileItemById(barrier, 18460).uid, getTileItemById(barrier, 18459), 19461, 1)
elseif(getTileItemById(barrier, 18459).uid > 0) then
doRemoveItem(getTileItemById(barrier, 18461).uid, 1)
addEvent(doCreateItem, 30 * 60 * 1000, 18459, 1, barrier)
last = true
end
end
end
if(barrier == true and last == true) then
setGlobalStorageValue(3144, 1)
addEvent(setGlobalStorageValue, 30 * 60 * 1000, 3144, 0)
--doSummonCreature("gnomevil", {x = 33114, y = 31953, z = 11})
--addEvent(teleportAllPlayersFromArea, 6 * 20 * 1000 + 30 * 60 * 1000, {
--{x = 33102, y = 31942, z = 11},
--{x = 33130, y = 31970, z = 11}
--}, {x = 33011, y = 31937, z = 11})
--addEvent(removeBoss, 6 * 20 * 1000 + 30 * 60 * 1000, {
--{x = 33102, y = 31942, z = 11},
--{x = 33130, y = 31970, z = 11}
--}, "gnomevil")
end
end
return true
end
 
Last edited:
Vesperoth dont remove Item ID: 18462 and dont transform the teleport (his corpose) back to 18463 == Help please peoples!!!

Code:
local teleportPosition = Position(33075, 31878, 12)
local function transformTeleport()
local teleportItem = Tile(teleportPosition):getItemById(1387)
if not teleportItem then
return
end
teleportItem:transform(18463)
end
function onKill(cid, target)
local targetMonster = Monster(target)
if not targetMonster then
return true
end
if targetMonster:getName():lower() ~= 'versperoth' then
return true
end
setGlobalStorageValue(3147, 2)
addEvent(setGlobalStorageValue, 30 * 60 * 1000, 3147, 0)
doRemoveItem(getTileItemById({x=33075, y=31878, z=12, stackpos = 253}, 18462).uid,1)
tp = doCreateItem(1387, teleportPosition)
doSetItemActionId(tp, 5161)
addEvent(transformTeleport, 45 * 1000)
return true
end
 
Last edited:
I'm waiting for the day that this guy will make one thread: "I'm need one Global Server with this features without bugs 100% made (I CAN PAY $$$$ because i'm naby and dont want to learn)"

xD
 
I assure you need to look very good at the code
Code:
string.lower(getCreatureName(target)) ==
[CODE]"Parasite" --> "parasite"
-- you have lowered the string..
[/CODE]
shouldn't it be like ?

I will examine the code , but idk. maybe in 1 hour..
 
and concentrating on this code,
Code:
Item:iransfrom()
-- you ended the line with -- , 19460, 1)

well  , Item:transform(item, itemex[, count, subtype])

-- so [, count, subtype]) count is 19460 ??
 
I'm waiting for the day that this guy will make one thread: "I'm need one Global Server with this features without bugs 100% made (I CAN PAY $$$$ because i'm naby and dont want to learn)"

xD

my otserver is online and have 200+ players, you are just one noob wanting money from forums, and was tried to stole me, leave from my threads and dont post with others accounts.

Slavi Dodo Thanks bro..
 
my otserver is online and have 200+ players, you are just one noob wanting money from forums, and was tried to stole me, leave from my threads and dont post with others accounts.

Slavi Dodo Thanks bro..
Well this code is almost wrong in almost things come on conversation or can you make a test server so that i test the script with you.
 
Back
Top