Here Its My First Script THen i Sharing With Us I Hope Us Will Like IT And It Work 100% I tested On 0.2.5 It Should Work And On All 0.2.~ Wersions i Wanna Realy Hope This One, us Will Like IT.
Something About Script To Make IT U need 5 Peapols. And Will By Summoned 10 Juggernauts. i Showing Ss how Its Will Looks.
us Will Get The Idea How It Should Looks. I Posting IT From My OT And Reward Is The Rare Items I Will Give For Us That Too. Wanna Hope Us Will Like It And Mayby Someone Will Rep++ ? :blink:
Chest Lua.
My First Script.
Something About Script To Make IT U need 5 Peapols. And Will By Summoned 10 Juggernauts. i Showing Ss how Its Will Looks.
us Will Get The Idea How It Should Looks. I Posting IT From My OT And Reward Is The Rare Items I Will Give For Us That Too. Wanna Hope Us Will Like It And Mayby Someone Will Rep++ ? :blink:
Lua:
local playerPosition =
{
{x = 1102, y = 723, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 1102, y = 724, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 1102, y = 725, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 1102, y = 726, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 1102, y = 727, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
{x = 1099, y = 725, z = 8},
{x = 1098, y = 725, z = 8},
{x = 1097, y = 725, z = 8},
{x = 1096, y = 725, z = 8},
{x = 1095, y = 725, z = 8}
}
local monsterPosition =
{
{x = 1101, y = 725, z = 8},
{x = 1100, y = 725, z = 8},
{x = 1101, y = 723, z = 8},
{x = 1099, y = 723, z = 8},
{x = 1097, y = 723, z = 8},
{x = 1095, y = 723, z = 8},
{x = 1095, y = 727, z = 8},
{x = 1097, y = 727, z = 8},
{x = 1099, y = 727, z = 8},
{x = 1101, y = 727, z = 8}
}
local player = {0, 0, 0, 0, 0}
local failed = FALSE
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 9827 then
for i = 1, 5 do
failed = TRUE
player[i] = getThingfromPos(playerPosition[i])
if player[i].itemid > 0 then
if isPlayer(player[i].uid) == TRUE then
if getPlayerStorageValue(player[i].uid, queststorage) == -1 then
if getPlayerLevel(player[i].uid) >= 1 then
failed = FALSE
end
end
end
end
if failed == TRUE then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
end
for i = 1, 5 do
doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
doTeleportThing(player[i].uid, newPosition[i], FALSE)
doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
for m = 1, 10 do
doSummonCreature("Juggernaut", monsterPosition[m])
end
doTransformItem(item.uid, item.itemid + 1)
addEvent(CleanArea, 300000)
end
elseif item.itemid == 9828 then
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return TRUE
end
function CleanArea(startPos, endPos)
local startPos={x=1094, y=722, z=8, stackpos=253}
local endPos={x=1102, y=729, z=8, stackpos=253}
local creatures = {monsters = 0, monsterNames = {}}
for posX=startPos.x, endPos.x do
for posY=startPos.y, endPos.y do
for posZ=startPos.z, endPos.z do
local check = getThingfromPos({x=posX, y=posY, z=posZ, stackpos=253})
if isCreature(check.uid) == TRUE then
creatures.monsters = creatures.monsters+1
table.insert(creatures.monsterNames, getCreatureName(check.uid))
doRemoveCreature(check.uid)
addEvent(LeverBack, 0, param)
end
end
end
end
return creatures
end
function LeverBack(param)
l1 = {x=1102, y=722, z=7, stackpos=1}
getl1 = getThingfromPos(l1)
doTransformItem(getl1.uid, 9827)
end
Chest Lua.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 3000 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a winged helmet.")
doPlayerAddItem(cid,2474,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 3001 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a magic plate armor.")
doPlayerAddItem(cid,2472,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 3002 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon legs.")
doPlayerAddItem(cid,2495,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 3003 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a present.")
doPlayerAddItem(cid,10137,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end
My First Script.
Last edited: