- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
Hello!
I need a script;
you must be at least 6 players in order to pull a lever, and those 6 players needs to stand on those tiles (like anni):
and all of those players must be at least xxx lvl, also, when pulling the lever; 50 crystal coins will be removed
thanks!
edit: lol, forgot the most important thing
When the lever is pulled, a stone gets removed from a specific position. thanks!
edit2:
I got this script from Cykotitan but it doesn't work for some reason... no errors in console or anything.
thanks!
I need a script;
you must be at least 6 players in order to pull a lever, and those 6 players needs to stand on those tiles (like anni):
and all of those players must be at least xxx lvl, also, when pulling the lever; 50 crystal coins will be removed
thanks!
edit: lol, forgot the most important thing
When the lever is pulled, a stone gets removed from a specific position. thanks!
edit2:
I got this script from Cykotitan but it doesn't work for some reason... no errors in console or anything.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="idk" enabled="yes">
<action uniqueid="64317" event="script"><![CDATA[
local playerPosition = {
{x = 1144, y = 850, z = 5},
{x = 1144, y = 851, z = 5},
{x = 1144, y = 852, z = 5},
{x = 1144, y = 853, z = 5},
{x = 1144, y = 854, z = 5},
{x = 1144, y = 855, z = 5}
}
local players = {}
if item.itemid == 1945 then
for _, pos in ipairs(playerPosition) do
local c = getTopCreature(pos).uid
if c > 0 and isPlayer(c) then table.insert(players, c) end
end
if #players == 6 then
local stone, stonePos = 1304, {x = 1141, y = 856, z = 5}
local it = getTileItemById(stonePos, stone).uid
if it < 1 then
return doPlayerSendCancel(cid, "No stone to remove.")
end
for _, v in ipairs(players) do
if getPlayerItemCount(v, 155) < 100 or getPlayerLevel(v) < 150 then
for _, pid in ipairs(players) do
doPlayerSendCancel(pid, getPlayerName(v) .. (getPlayerLevel(v) >= 150 and " doesn't have enough money." or " isn't level 150."))
end
return true
end
end
for _, v in ipairs(players) do
doPlayerRemoveItem(v, 155, 100)
doPlayerSendTextMessage(v, MESSAGE_STATUS_CONSOLE_ORANGE, "You have removed the wall, but it costed you a lot of money!")
end
doRemoveItem(it)
else
return doPlayerSendCancel(#players > 0 and players[1] or cid, "You need to be at least 6 persons to pass the wall.")
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
]]></action>
</mod>
thanks!
Last edited: