Full Distribution

This commit is contained in:
rasanpedromujica 2019-01-16 17:16:38 -05:00
commit 009a571331
1258 changed files with 185603 additions and 0 deletions

16
.gitignore vendored Normal file
View File

@ -0,0 +1,16 @@
vc14/.vs/theforgottenserver/v15/Browse.VC.db
vc14/.vs/theforgottenserver/v15/ipch/ba8106b03bee8153.ipch
<<<<<<< HEAD
*.lastbuildstate
*.tlog
*.ipch
=======
vc14/.vs/theforgottenserver/v15/Browse.VC.opendb
*.ipch
vc14/x64/
>>>>>>> stored_players
*.exe
vc14/theforgottenserver.vcxproj.user
vc14/.vs/
*.pdb
*.dll

48
CMakeLists.txt Normal file
View File

@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
project(tfs)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(cotire)
add_compile_options(-Wall -Werror -pipe -fvisibility=hidden)
if (CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-fno-strict-aliasing)
endif()
include(FindCXX11)
# Find packages.
find_package(GMP REQUIRED)
find_package(PugiXML REQUIRED)
find_package(LuaJIT)
find_package(MySQL)
find_package(Threads)
option(USE_LUAJIT "Use LuaJIT" ${LUAJIT_FOUND})
if(USE_LUAJIT)
find_package(LuaJIT REQUIRED)
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "-pagezero_size 10000 -image_base 100000000")
endif()
else()
find_package(Lua)
endif()
find_package(Boost 1.53.0 COMPONENTS system filesystem REQUIRED)
include(src/CMakeLists.txt)
add_executable(tfs ${tfs_SRC})
include_directories(${MYSQL_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PUGIXML_INCLUDE_DIR} ${GMP_INCLUDE_DIR})
target_link_libraries(tfs ${MYSQL_CLIENT_LIBS} ${LUA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FILESYSTEM_LIBRARIES} ${PUGIXML_LIBRARIES} ${GMP_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(tfs PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/otpch.h")
set_target_properties(tfs PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(tfs)

45
README.md Normal file
View File

@ -0,0 +1,45 @@
**Edit a file, create a new file, and clone from Bitbucket in under 2 minutes**
When you're done, you can delete the content in this README and update the file with details for others getting started with your repository.
*We recommend that you open this README in another tab as you perform the tasks below. You can [watch our video](https://youtu.be/0ocf7u76WSo) for a full demo of all the steps in this tutorial. Open the video in a new tab to avoid leaving Bitbucket.*
---
## Edit a file
Youll start by editing this README file to learn how to edit a file in Bitbucket.
1. Click **Source** on the left side.
2. Click the README.md link from the list of files.
3. Click the **Edit** button.
4. Delete the following text: *Delete this line to make a change to the README from Bitbucket.*
5. After making your change, click **Commit** and then **Commit** again in the dialog. The commit page will open and youll see the change you just made.
6. Go back to the **Source** page.
---
## Create a file
Next, youll add a new file to this repository.
1. Click the **New file** button at the top of the **Source** page.
2. Give the file a filename of **contributors.txt**.
3. Enter your name in the empty file space.
4. Click **Commit** and then **Commit** again in the dialog.
5. Go back to the **Source** page.
Before you move on, go ahead and explore the repository. You've already seen the **Source** page, but check out the **Commits**, **Branches**, and **Settings** pages.
---
## Clone a repository
Use these steps to clone from SourceTree, our client for using the repository command-line free. Cloning allows you to work on your files locally. If you don't yet have SourceTree, [download and install first](https://www.sourcetreeapp.com/). If you prefer to clone from the command line, see [Clone a repository](https://confluence.atlassian.com/x/4whODQ).
1. Youll see the clone button under the **Source** heading. Click that button.
2. Now click **Check out in SourceTree**. You may need to create a SourceTree account or log in.
3. When you see the **Clone New** dialog in SourceTree, update the destination path and name if youd like to and then click **Clone**.
4. Open the directory you just created to see your repositorys files.
Now that you're more familiar with your Bitbucket repository, go ahead and add a new file locally. You can [push your change back to Bitbucket with SourceTree](https://confluence.atlassian.com/x/iqyBMg), or you can [add, commit,](https://confluence.atlassian.com/x/8QhODQ) and [push from the command line](https://confluence.atlassian.com/x/NQ0zDQ).

21
cmake/FindCXX11.cmake Normal file
View File

@ -0,0 +1,21 @@
if(__FIND_CXX11_CMAKE__)
return()
endif()
set(__FIND_CXX11_CMAKE__ TRUE)
include(CheckCXXCompilerFlag)
enable_language(CXX)
check_cxx_compiler_flag("-std=c++11" COMPILER_KNOWS_CXX11)
if(COMPILER_KNOWS_CXX11)
add_compile_options(-std=c++11)
# Tested on Mac OS X 10.8.2 with XCode 4.6 Command Line Tools
# Clang requires this to find the correct c++11 headers
check_cxx_compiler_flag("-stdlib=libc++" COMPILER_KNOWS_STDLIB)
if(APPLE AND COMPILER_KNOWS_STDLIB)
add_compile_options(-stdlib=libc++)
endif()
else()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif()

14
cmake/FindGMP.cmake Normal file
View File

@ -0,0 +1,14 @@
# Locate GMP library
# This module defines
# GMP_FOUND
# GMP_INCLUDE_DIR
# GMP_LIBRARIES
find_path(GMP_INCLUDE_DIR NAMES gmp.h)
find_library(GMP_LIBRARIES NAMES gmp libgmp)
find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES GMPXX_LIBRARIES)
mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES GMPXX_LIBRARIES)

118
cmake/FindLua.cmake Normal file
View File

@ -0,0 +1,118 @@
# Locate Lua library
# This module defines
# LUA_EXECUTABLE, if found
# LUA_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
#
# Note that the expected include convention is
# #include "lua.h"
# and not
# #include <lua/lua.h>
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
# Modified to support Lua 5.2 by LuaDist 2012
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#
# The required version of Lua can be specified using the
# standard syntax, e.g. FIND_PACKAGE(Lua 5.1)
# Otherwise the module will search for any available Lua implementation
# Always search for non-versioned lua first (recommended)
SET(_POSSIBLE_LUA_INCLUDE include include/lua)
SET(_POSSIBLE_LUA_EXECUTABLE lua)
SET(_POSSIBLE_LUA_LIBRARY lua)
# Determine possible naming suffixes (there is no standard for this)
IF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
SET(_POSSIBLE_SUFFIXES "${Lua_FIND_VERSION_MAJOR}${Lua_FIND_VERSION_MINOR}" "${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}" "-${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}")
ELSE(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "51" "5.1" "-5.1")
ENDIF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
# Set up possible search names and locations
FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
LIST(APPEND _POSSIBLE_LUA_LIBRARY "lua${_SUFFIX}")
ENDFOREACH(_SUFFIX)
# Find the lua executable
FIND_PROGRAM(LUA_EXECUTABLE
NAMES ${_POSSIBLE_LUA_EXECUTABLE}
)
# Find the lua header
FIND_PATH(LUA_INCLUDE_DIR lua.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES ${_POSSIBLE_LUA_INCLUDE}
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
# Find the lua library
FIND_LIBRARY(LUA_LIBRARY
NAMES ${_POSSIBLE_LUA_LIBRARY}
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
IF(LUA_LIBRARY)
# include the math library for Unix
IF(UNIX AND NOT APPLE)
FIND_LIBRARY(LUA_MATH_LIBRARY m)
SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
ELSE(UNIX AND NOT APPLE)
SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
ENDIF(UNIX AND NOT APPLE)
ENDIF(LUA_LIBRARY)
# Determine Lua version
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
UNSET(lua_version_str)
ENDIF()
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY LUA_EXECUTABLE)

63
cmake/FindLuaJIT.cmake Normal file
View File

@ -0,0 +1,63 @@
# Locate LuaJIT library
# This module defines
# LUAJIT_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUAJIT_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
## Copied from default CMake FindLua51.cmake
find_path(LUA_INCLUDE_DIR luajit.h
HINTS
ENV LUA_DIR
PATH_SUFFIXES include/luajit-2.0 include
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
find_library(LUA_LIBRARY
NAMES luajit-5.1
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
)
if(LUA_LIBRARY)
# include the math library for Unix
if(UNIX AND NOT APPLE)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
else()
set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
endif()
endif()
if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
file(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" luajit_version_str REGEX "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT .+\"")
string(REGEX REPLACE "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${luajit_version_str}")
unset(luajit_version_str)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUAJIT_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)

118
cmake/FindMySQL.cmake Normal file
View File

@ -0,0 +1,118 @@
#--------------------------------------------------------
# Copyright (C) 1995-2007 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# There are special exceptions to the terms and conditions of the GPL
# as it is applied to this software. View the full text of the exception
# in file LICENSE.exceptions in the top-level directory of this software
# distribution.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# The MySQL Connector/ODBC is licensed under the terms of the
# GPL, like most MySQL Connectors. There are special exceptions
# to the terms and conditions of the GPL as it is applied to
# this software, see the FLOSS License Exception available on
# mysql.com.
##########################################################################
#-------------- FIND MYSQL_INCLUDE_DIR ------------------
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
$ENV{MYSQL_INCLUDE_DIR}
$ENV{MYSQL_DIR}/include
/usr/include/mysql
/usr/local/include/mysql
/opt/mysql/mysql/include
/opt/mysql/mysql/include/mysql
/opt/mysql/include
/opt/local/include/mysql5
/usr/local/mysql/include
/usr/local/mysql/include/mysql
$ENV{ProgramFiles}/MySQL/*/include
$ENV{SystemDrive}/MySQL/*/include)
#----------------- FIND MYSQL_LIB_DIR -------------------
IF (WIN32)
# Set lib path suffixes
# dist = for mysql binary distributions
# build = for custom built tree
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
SET(libsuffixDist debug)
SET(libsuffixBuild Debug)
ELSE (CMAKE_BUILD_TYPE STREQUAL Debug)
SET(libsuffixDist opt)
SET(libsuffixBuild Release)
ADD_DEFINITIONS(-DDBUG_OFF)
ENDIF (CMAKE_BUILD_TYPE STREQUAL Debug)
FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient
PATHS
$ENV{MYSQL_DIR}/lib/${libsuffixDist}
$ENV{MYSQL_DIR}/libmysql
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
$ENV{MYSQL_DIR}/client/${libsuffixBuild}
$ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
$ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
$ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist})
ELSE (WIN32)
FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient
PATHS
$ENV{MYSQL_DIR}/libmysql/.libs
$ENV{MYSQL_DIR}/lib
$ENV{MYSQL_DIR}/lib/mysql
/usr/lib/mysql
/usr/local/lib/mysql
/usr/local/mysql/lib
/usr/local/mysql/lib/mysql
/opt/local/mysql5/lib
/opt/local/lib/mysql5/mysql
/opt/mysql/mysql/lib/mysql
/opt/mysql/lib/mysql)
ENDIF (WIN32)
IF(MYSQL_LIB)
GET_FILENAME_COMPONENT(MYSQL_LIB_DIR ${MYSQL_LIB} PATH)
ENDIF(MYSQL_LIB)
IF (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
SET(MYSQL_FOUND TRUE)
INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR})
LINK_DIRECTORIES(${MYSQL_LIB_DIR})
FIND_LIBRARY(MYSQL_ZLIB zlib PATHS ${MYSQL_LIB_DIR})
FIND_LIBRARY(MYSQL_YASSL yassl PATHS ${MYSQL_LIB_DIR})
FIND_LIBRARY(MYSQL_TAOCRYPT taocrypt PATHS ${MYSQL_LIB_DIR})
SET(MYSQL_CLIENT_LIBS mysqlclient)
IF (MYSQL_ZLIB)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} zlib)
ENDIF (MYSQL_ZLIB)
IF (MYSQL_YASSL)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} yassl)
ENDIF (MYSQL_YASSL)
IF (MYSQL_TAOCRYPT)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} taocrypt)
ENDIF (MYSQL_TAOCRYPT)
# Added needed mysqlclient dependencies on Windows
IF (WIN32)
SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} ws2_32)
ENDIF (WIN32)
MESSAGE(STATUS "MySQL Include dir: ${MYSQL_INCLUDE_DIR} library dir: ${MYSQL_LIB_DIR}")
MESSAGE(STATUS "MySQL client libraries: ${MYSQL_CLIENT_LIBS}")
ELSE (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)
MESSAGE(FATAL_ERROR "Cannot find MySQL. Include dir: ${MYSQL_INCLUDE_DIR} library dir: ${MYSQL_LIB_DIR}")
ENDIF (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR)

7
cmake/FindPugiXML.cmake Normal file
View File

@ -0,0 +1,7 @@
find_path(PUGIXML_INCLUDE_DIR NAMES pugixml.hpp)
find_library(PUGIXML_LIBRARIES NAMES pugixml)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PugiXML REQUIRED_VARS PUGIXML_INCLUDE_DIR PUGIXML_LIBRARIES)
mark_as_advanced(PUGIXML_INCLUDE_DIR PUGIXML_LIBRARIES)

3827
cmake/cotire.cmake Normal file

File diff suppressed because it is too large Load Diff

105
config.lua Normal file
View File

@ -0,0 +1,105 @@
-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
protectionLevel = 1
pzLocked = 60000
removeChargesFromRunes = true
stairJumpExhaustion = 0
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
-- Skull System
banLength = 30 * 24 * 60 * 60
whiteSkullTime = 15 * 60
redSkullTime = 30 * 24 * 60 * 60
killsDayRedSkull = 3
killsWeekRedSkull = 5
killsMonthRedSkull = 10
killsDayBanishment = 6
killsWeekBanishment = 10
killsMonthBanishment = 20
-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
ip = "127.0.0.1"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 0
motd = "Welcome to Nostalrius 4.5!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "RealOTS"
statusTimeout = 5000
replaceKickOnLogin = true
maxPacketsPerSecond = -1
autoStackCumulatives = false
moneyRate = 1
-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1
-- Houses
houseRentPeriod = "monthly"
-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000
-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "map"
mapAuthor = "CipSoft"
-- MySQL
mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = ""
mysqlDatabase = "nostalrius"
mysqlPort = 3306
mysqlSock = ""
-- Misc.
allowChangeOutfit = true
freePremium = false
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
showMonsterLoot = false
-- Character Rooking
-- Level threshold is the level requirement to teleport players back to newbie town
teleportNewbies = true
newbieTownId = 11
newbieLevelThreshold = 5
-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 1
rateSkill = 1
rateLoot = 1
rateMagic = 1
rateSpawn = 0
-- Monsters
deSpawnRange = 2
deSpawnRadius = 50
-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true
-- Startup
-- NOTE: defaultPriority only works on Windows and sets process
-- priority, valid values are: "normal", "above-normal", "high"
defaultPriority = "high"
startupDatabaseOptimization = true
-- Status server information
ownerName = ""
ownerEmail = ""
url = "https://otland.net/"
location = "Sweden"

6
data/XML/commands.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<commands>
<command cmd="/reload" group="2" acctype="5" log="yes" />
<command cmd="/raid" group="2" acctype="4" log="yes" />
<command cmd="!sellhouse" group="1" acctype="1" log="no" />
</commands>

6
data/XML/groups.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<groups>
<group id="1" name="player" flags="0" maxdepotitems="0" maxvipentries="0" access="0" />
<group id="2" name="gamemaster" flags="412316860415" maxdeoptitems="0" maxvipentries="0" access="1" />
<group id="3" name="god" flags="547608305658" maxdepotitems="0" maxvipentries="0" access="1" />
</groups>

9
data/XML/stages.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<stages>
<config enabled="0"/>
<stage minlevel="1" maxlevel="8" multiplier="7"/>
<stage minlevel="9" maxlevel="20" multiplier="6"/>
<stage minlevel="21" maxlevel="50" multiplier="5"/>
<stage minlevel="51" maxlevel="100" multiplier="4"/>
<stage minlevel="101" multiplier="5"/>
</stages>

84
data/XML/vocations.xml Normal file
View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" flagid="0" name="None" description="none" gaincap="10" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="70" soulmax="100" gainsoulticks="120" fromvoc="0">
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="1" flagid="1" name="Sorcerer" description="a sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" basespeed="70" soulmax="100" gainsoulticks="120" fromvoc="1">
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="2" flagid="2" name="Druid" description="a druid" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" basespeed="70" soulmax="100" gainsoulticks="120" fromvoc="2">
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="3" flagid="4" name="Paladin" description="a paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="1" gainmanaticks="4" gainmanaamount="2" manamultiplier="1.4" attackspeed="2000" basespeed="70" soulmax="100" gainsoulticks="120" fromvoc="3">
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="4" flagid="8" name="Knight" description="a knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" basespeed="70" soulmax="100" gainsoulticks="120" fromvoc="4">
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="5" flagid="1" name="Master Sorcerer" description="a master sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="1" gainmanaticks="2" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" basespeed="70" soulmax="200" gainsoulticks="15" fromvoc="1">
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="6" flagid="2" name="Elder Druid" description="an elder druid" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="1" gainmanaticks="2" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" basespeed="70" soulmax="200" gainsoulticks="15" fromvoc="2">
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="7" flagid="4" name="Royal Paladin" description="a royal paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.4" attackspeed="2000" basespeed="70" soulmax="200" gainsoulticks="15" fromvoc="3">
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="8" flagid="8" name="Elite Knight" description="an elite knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="1" gainmanaticks="4" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" basespeed="70" soulmax="200" gainsoulticks="15" fromvoc="4">
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
</vocations>

363
data/actions/actions.xml Normal file
View File

@ -0,0 +1,363 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<!-- Nostalrius Tibia Map Related Actions -->
<action actionid="1" script="nostalrius/1.lua" />
<action actionid="2" script="nostalrius/2.lua" />
<action actionid="3" script="nostalrius/3.lua" />
<action actionid="4" script="nostalrius/4.lua" />
<action actionid="5" script="nostalrius/5.lua" />
<action actionid="6" script="nostalrius/6.lua" />
<action actionid="7" script="nostalrius/7.lua" />
<action actionid="8" script="nostalrius/8.lua" />
<action actionid="9" script="nostalrius/9.lua" />
<action actionid="10" script="nostalrius/10.lua" />
<action actionid="11" script="nostalrius/11.lua" />
<action actionid="12" script="nostalrius/12.lua" />
<action actionid="13" script="nostalrius/13.lua" />
<action actionid="14" script="nostalrius/14.lua" />
<action actionid="15" script="nostalrius/15.lua" />
<action actionid="16" script="nostalrius/16.lua" />
<action actionid="17" script="nostalrius/17.lua" />
<action actionid="18" script="nostalrius/18.lua" />
<action actionid="19" script="nostalrius/19.lua" />
<action actionid="20" script="nostalrius/20.lua" />
<action actionid="21" script="nostalrius/21.lua" />
<action actionid="22" script="nostalrius/22.lua" />
<action actionid="23" script="nostalrius/23.lua" />
<action actionid="24" script="nostalrius/24.lua" />
<action actionid="25" script="nostalrius/25.lua" />
<action actionid="26" script="nostalrius/26.lua" />
<action actionid="27" script="nostalrius/27.lua" />
<action actionid="28" script="nostalrius/28.lua" />
<action actionid="29" script="nostalrius/29.lua" />
<action actionid="30" script="nostalrius/30.lua" />
<action actionid="31" script="nostalrius/31.lua" />
<action actionid="32" script="nostalrius/32.lua" />
<action actionid="33" script="nostalrius/33.lua" />
<action actionid="34" script="nostalrius/34.lua" />
<action actionid="35" script="nostalrius/35.lua" />
<action actionid="36" script="nostalrius/36.lua" />
<action actionid="37" script="nostalrius/37.lua" />
<action actionid="38" script="nostalrius/38.lua" />
<action actionid="39" script="nostalrius/39.lua" />
<action actionid="40" script="nostalrius/40.lua" />
<action actionid="41" script="nostalrius/41.lua" />
<action actionid="42" script="nostalrius/42.lua" />
<action actionid="43" script="nostalrius/43.lua" />
<action actionid="44" script="nostalrius/44.lua" />
<action actionid="45" script="nostalrius/45.lua" />
<action actionid="46" script="nostalrius/46.lua" />
<action actionid="47" script="nostalrius/47.lua" />
<action actionid="48" script="nostalrius/48.lua" />
<action actionid="49" script="nostalrius/49.lua" />
<action actionid="50" script="nostalrius/50.lua" />
<action actionid="51" script="nostalrius/51.lua" />
<action actionid="52" script="nostalrius/52.lua" />
<action actionid="53" script="nostalrius/53.lua" />
<action actionid="54" script="nostalrius/54.lua" />
<action actionid="55" script="nostalrius/55.lua" />
<action actionid="56" script="nostalrius/56.lua" />
<action actionid="57" script="nostalrius/57.lua" />
<action actionid="58" script="nostalrius/58.lua" />
<action actionid="59" script="nostalrius/59.lua" />
<action actionid="60" script="nostalrius/60.lua" />
<action actionid="61" script="nostalrius/61.lua" />
<action actionid="62" script="nostalrius/62.lua" />
<action actionid="63" script="nostalrius/63.lua" />
<action actionid="64" script="nostalrius/64.lua" />
<action actionid="65" script="nostalrius/65.lua" />
<action actionid="66" script="nostalrius/66.lua" />
<action actionid="67" script="nostalrius/67.lua" />
<action actionid="68" script="nostalrius/68.lua" />
<action actionid="69" script="nostalrius/69.lua" />
<action actionid="70" script="nostalrius/70.lua" />
<action actionid="71" script="nostalrius/71.lua" />
<action actionid="72" script="nostalrius/72.lua" />
<action actionid="73" script="nostalrius/73.lua" />
<action actionid="74" script="nostalrius/74.lua" />
<action actionid="75" script="nostalrius/75.lua" />
<action actionid="76" script="nostalrius/76.lua" />
<action actionid="77" script="nostalrius/77.lua" />
<action actionid="78" script="nostalrius/78.lua" />
<action actionid="79" script="nostalrius/79.lua" />
<action actionid="80" script="nostalrius/80.lua" />
<action actionid="81" script="nostalrius/81.lua" />
<action actionid="82" script="nostalrius/82.lua" />
<action actionid="83" script="nostalrius/83.lua" />
<!-- Nostalrius Default Actions -->
<!-- Furniture Parcels -->
<action fromid="2775" toid="2812" script="misc/furniture_parcels.lua" />
<action fromid="5086" toid="5088" script="misc/furniture_parcels.lua" />
<!-- Instruments -->
<action fromid="2948" toid="2950" script="misc/instruments.lua" />
<action fromid="2952" toid="2965" script="misc/instruments.lua" />
<action itemid="3219" script="misc/instruments.lua" />
<!-- Strange Levers -->
<action fromid="2566" toid="2567" script="misc/strange_lever.lua" />
<action fromid="2569" toid="2570" script="misc/strange_lever.lua" />
<!-- Teleporters -->
<action itemid="435" script="misc/teleporters.lua" />
<action itemid="1948" script="misc/teleporters.lua" />
<action itemid="1968" script="misc/teleporters.lua" />
<!-- Special Right -->
<action itemid="372" script="misc/special_rights.lua" />
<action itemid="386" script="misc/special_rights.lua" />
<action itemid="421" script="misc/special_rights.lua" />
<action itemid="593" script="misc/special_rights.lua" />
<action itemid="606" script="misc/special_rights.lua" />
<action itemid="608" script="misc/special_rights.lua" />
<action itemid="614" script="misc/special_rights.lua" />
<action itemid="3653" script="misc/special_rights.lua" />
<action itemid="3696" script="misc/special_rights.lua" />
<action itemid="3702" script="misc/special_rights.lua" />
<!-- Fun -->
<action itemid="611" script="misc/snowheap.lua" />
<action itemid="5080" script="misc/panda_teddy.lua" />
<action itemid="2974" script="misc/water_pipe.lua" />
<action itemid="2976" script="misc/birdcage.lua" />
<action itemid="3103" script="misc/cornucopia.lua" />
<action itemid="3699" script="misc/blueberry_bush.lua" />
<action itemid="3481" script="misc/closed_trap.lua" />
<action itemid="3482" script="misc/open_trap.lua" />
<action itemid="3218" script="misc/present.lua" />
<action itemid="2977" script="misc/pumpkin_head.lua" />
<action itemid="2916" script="misc/used_lamp.lua" />
<action itemid="3229" script="misc/helmet_of_the_ancients.lua" />
<action itemid="4835" script="misc/snake_destroyer.lua" />
<action itemid="4840" script="misc/spectral_stone.lua" />
<action itemid="4842" script="misc/sheet_of_tracing_paper.lua" />
<action itemid="4852" script="misc/ectoplasm_container.lua" />
<action itemid="3217" script="misc/letter_bag.lua" />
<action fromid="3603" toid="3605" script="misc/baking.lua" />
<action fromid="3264" toid="3276" script="misc/weapons.lua" />
<action fromid="3278" toid="3286" script="misc/weapons.lua" />
<action fromid="3288" toid="3297" script="misc/weapons.lua" />
<action fromid="3299" toid="3303" script="misc/weapons.lua" />
<action fromid="3305" toid="3307" script="misc/weapons.lua" />
<action fromid="3309" toid="3329" script="misc/weapons.lua" />
<action fromid="3331" toid="3348" script="misc/weapons.lua" />
<action itemid="3208" script="misc/weapons.lua" />
<action itemid="3059" script="misc/spellbook.lua" />
<!-- Keys -->
<action fromid="2967" toid="2973" script="misc/key.lua" />
<!-- Time -->
<action fromid="2445" toid="2448" script="misc/time.lua" />
<action fromid="2660" toid="2664" script="misc/time.lua" />
<action itemid="2668" script="misc/time.lua" />
<action itemid="2771" script="misc/time.lua" />
<action itemid="2906" script="misc/time.lua" />
<!-- Tools -->
<action itemid="3003" script="misc/rope.lua" />
<action itemid="3304" script="misc/crowbar.lua" />
<action itemid="3469" script="misc/knife.lua" />
<action itemid="3308" script="misc/machete.lua" />
<action itemid="3330" script="misc/machete.lua" />
<action itemid="3453" script="misc/scythe.lua" />
<action itemid="4872" script="misc/ice_pick.lua" />
<action itemid="3456" script="misc/pick.lua" />
<action itemid="3457" script="misc/shovel.lua" />
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.lua" />
<!-- Miscellaneous -->
<action itemid="4867" script="misc/botanist_container.lua" />
<action itemid="4863" script="misc/butterfly_conservation_kit.lua" />
<!-- Chests -->
<action itemid="2479" script="misc/chests.lua" />
<action itemid="2543" script="misc/chests.lua" />
<action itemid="2544" script="misc/chests.lua" />
<action itemid="2545" script="misc/chests.lua" />
<action itemid="2546" script="misc/chests.lua" />
<action itemid="2547" script="misc/chests.lua" />
<action itemid="2548" script="misc/chests.lua" />
<action itemid="2549" script="misc/chests.lua" />
<action itemid="2550" script="misc/chests.lua" />
<action itemid="2551" script="misc/chests.lua" />
<action itemid="2552" script="misc/chests.lua" />
<action itemid="2553" script="misc/chests.lua" />
<action itemid="2554" script="misc/chests.lua" />
<action itemid="2555" script="misc/chests.lua" />
<action itemid="2556" script="misc/chests.lua" />
<action itemid="2557" script="misc/chests.lua" />
<action itemid="2558" script="misc/chests.lua" />
<action itemid="2559" script="misc/chests.lua" />
<action itemid="2560" script="misc/chests.lua" />
<action itemid="2561" script="misc/chests.lua" />
<action itemid="2562" script="misc/chests.lua" />
<action itemid="2564" script="misc/chests.lua" />
<action itemid="2565" script="misc/chests.lua" />
<action itemid="4830" script="misc/chests.lua" />
<action itemid="4833" script="misc/chests.lua" />
<action itemid="4873" script="misc/chests.lua" />
<!-- Fluids -->
<action itemid="2524" script="misc/fluids.lua" />
<action itemid="2873" script="misc/fluids.lua" />
<action itemid="2874" script="misc/fluids.lua" />
<action itemid="2876" script="misc/fluids.lua" />
<action itemid="2877" script="misc/fluids.lua" />
<action itemid="2879" script="misc/fluids.lua" />
<action itemid="2880" script="misc/fluids.lua" />
<action itemid="2881" script="misc/fluids.lua" />
<action itemid="2882" script="misc/fluids.lua" />
<action itemid="2883" script="misc/fluids.lua" />
<action itemid="2884" script="misc/fluids.lua" />
<action itemid="2885" script="misc/fluids.lua" />
<action itemid="2893" script="misc/fluids.lua" />
<action itemid="2901" script="misc/fluids.lua" />
<action itemid="2902" script="misc/fluids.lua" />
<action itemid="2903" script="misc/fluids.lua" />
<action itemid="2904" script="misc/fluids.lua" />
<action itemid="3465" script="misc/fluids.lua" />
<action itemid="3477" script="misc/fluids.lua" />
<action itemid="3478" script="misc/fluids.lua" />
<action itemid="3479" script="misc/fluids.lua" />
<action itemid="3480" script="misc/fluids.lua" />
<!-- Food -->
<action itemid="3250" script="misc/food.lua" />
<action itemid="3577" script="misc/food.lua" />
<action itemid="3578" script="misc/food.lua" />
<action itemid="3579" script="misc/food.lua" />
<action itemid="3580" script="misc/food.lua" />
<action itemid="3581" script="misc/food.lua" />
<action itemid="3582" script="misc/food.lua" />
<action itemid="3583" script="misc/food.lua" />
<action itemid="3584" script="misc/food.lua" />
<action itemid="3585" script="misc/food.lua" />
<action itemid="3586" script="misc/food.lua" />
<action itemid="3587" script="misc/food.lua" />
<action itemid="3588" script="misc/food.lua" />
<action itemid="3589" script="misc/food.lua" />
<action itemid="3590" script="misc/food.lua" />
<action itemid="3591" script="misc/food.lua" />
<action itemid="3592" script="misc/food.lua" />
<action itemid="3593" script="misc/food.lua" />
<action itemid="3594" script="misc/food.lua" />
<action itemid="3595" script="misc/food.lua" />
<action itemid="3596" script="misc/food.lua" />
<action itemid="3597" script="misc/food.lua" />
<action itemid="3598" script="misc/food.lua" />
<action itemid="3599" script="misc/food.lua" />
<action itemid="3600" script="misc/food.lua" />
<action itemid="3601" script="misc/food.lua" />
<action itemid="3602" script="misc/food.lua" />
<action itemid="3606" script="misc/food.lua" />
<action itemid="3607" script="misc/food.lua" />
<action itemid="3723" script="misc/food.lua" />
<action itemid="3724" script="misc/food.lua" />
<action itemid="3725" script="misc/food.lua" />
<action itemid="3726" script="misc/food.lua" />
<action itemid="3727" script="misc/food.lua" />
<action itemid="3728" script="misc/food.lua" />
<action itemid="3729" script="misc/food.lua" />
<action itemid="3730" script="misc/food.lua" />
<action itemid="3731" script="misc/food.lua" />
<action itemid="3732" script="misc/food.lua" />
<!-- Passthrough -->
<action fromid="2334" toid="2341" script="misc/doors.lua" />
<!-- Locked Doors -->
<action itemid="1628" script="misc/doors.lua" />
<action itemid="1631" script="misc/doors.lua" />
<action itemid="1650" script="misc/doors.lua" />
<action itemid="1653" script="misc/doors.lua" />
<action itemid="1668" script="misc/doors.lua" />
<action itemid="1671" script="misc/doors.lua" />
<action itemid="1682" script="misc/doors.lua" />
<action itemid="1691" script="misc/doors.lua" />
<action itemid="5006" script="misc/doors.lua" />
<action itemid="5007" script="misc/doors.lua" />
<!-- Level Doors -->
<action itemid="1646" script="misc/doors.lua" />
<action itemid="1648" script="misc/doors.lua" />
<action itemid="1664" script="misc/doors.lua" />
<action itemid="1666" script="misc/doors.lua" />
<action itemid="1678" script="misc/doors.lua" />
<action itemid="1680" script="misc/doors.lua" />
<action itemid="1687" script="misc/doors.lua" />
<action itemid="1696" script="misc/doors.lua" />
<!-- Quest Doors -->
<action itemid="1642" script="misc/doors.lua" />
<action itemid="1644" script="misc/doors.lua" />
<action itemid="1660" script="misc/doors.lua" />
<action itemid="1662" script="misc/doors.lua" />
<action itemid="1674" script="misc/doors.lua" />
<action itemid="1676" script="misc/doors.lua" />
<action itemid="1689" script="misc/doors.lua" />
<action itemid="1698" script="misc/doors.lua" />
<!-- Closed Normal Doors -->
<action itemid="2177" script="misc/doors.lua" />
<action itemid="2179" script="misc/doors.lua" />
<action itemid="1629" script="misc/doors.lua" />
<action itemid="1632" script="misc/doors.lua" />
<action itemid="1638" script="misc/doors.lua" />
<action itemid="1640" script="misc/doors.lua" />
<action itemid="1651" script="misc/doors.lua" />
<action itemid="1654" script="misc/doors.lua" />
<action itemid="1656" script="misc/doors.lua" />
<action itemid="1658" script="misc/doors.lua" />
<action itemid="1669" script="misc/doors.lua" />
<action itemid="1672" script="misc/doors.lua" />
<action itemid="1683" script="misc/doors.lua" />
<action itemid="1685" script="misc/doors.lua" />
<action itemid="1692" script="misc/doors.lua" />
<action itemid="1694" script="misc/doors.lua" />
<action itemid="4912" script="misc/doors.lua" />
<action itemid="4913" script="misc/doors.lua" />
<action itemid="5082" script="misc/doors.lua" />
<action itemid="5084" script="misc/doors.lua" />
<!-- Open Vertical Doors -->
<action itemid="1630" script="misc/doors.lua" />
<action itemid="1639" script="misc/doors.lua" />
<action itemid="1643" script="misc/doors.lua" />
<action itemid="1647" script="misc/doors.lua" />
<action itemid="1652" script="misc/doors.lua" />
<action itemid="1657" script="misc/doors.lua" />
<action itemid="1661" script="misc/doors.lua" />
<action itemid="1665" script="misc/doors.lua" />
<action itemid="1670" script="misc/doors.lua" />
<action itemid="1675" script="misc/doors.lua" />
<action itemid="1679" script="misc/doors.lua" />
<action itemid="1693" script="misc/doors.lua" />
<action itemid="1695" script="misc/doors.lua" />
<action itemid="1697" script="misc/doors.lua" />
<action itemid="1699" script="misc/doors.lua" />
<action itemid="4914" script="misc/doors.lua" />
<action itemid="5083" script="misc/doors.lua" />
<action itemid="2178" script="misc/doors.lua" />
<!-- Open Horizontal Doors -->
<action itemid="1633" script="misc/doors.lua" />
<action itemid="1641" script="misc/doors.lua" />
<action itemid="1645" script="misc/doors.lua" />
<action itemid="1649" script="misc/doors.lua" />
<action itemid="1655" script="misc/doors.lua" />
<action itemid="1659" script="misc/doors.lua" />
<action itemid="1663" script="misc/doors.lua" />
<action itemid="1667" script="misc/doors.lua" />
<action itemid="1673" script="misc/doors.lua" />
<action itemid="1677" script="misc/doors.lua" />
<action itemid="1681" script="misc/doors.lua" />
<action itemid="1684" script="misc/doors.lua" />
<action itemid="1686" script="misc/doors.lua" />
<action itemid="1688" script="misc/doors.lua" />
<action itemid="1690" script="misc/doors.lua" />
<action itemid="4911" script="misc/doors.lua" />
<action itemid="5085" script="misc/doors.lua" />
<action itemid="2180" script="misc/doors.lua" />
</actions>

View File

@ -0,0 +1,20 @@
function doDestroyItem(target)
if not target:isItem() then
return false
end
local itemType = ItemType(target:getId())
if not itemType:isDestroyable() then
return false
end
if math.random(1,10) <= 3 then
target:transform(itemType:getDestroyTarget())
target:decay()
target:getPosition():sendMagicEffect(CONST_ME_BLOCKHIT)
else
target:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end

View File

@ -0,0 +1,45 @@
local ovens = {
2535, 2537, 2539, 2541, 3510
}
local milestone = {
1943, 1944, 1945, 1946
}
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if item:getId() == 3603 then
if (target:getId() == 2524 or target:getId() == 2873) and target:getFluidType() == FLUID_WATER then
target:transform(target:getId(), FLUID_NONE)
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3604, 1):decay()
else
Game.createItem(3604, 1, item:getPosition()):decay()
end
item:remove(1)
return true
end
elseif item:getId() == 3604 then
if table.contains(ovens, target:getId()) then
Game.createItem(3600, 1, target:getPosition())
item:remove(1)
return true
end
elseif item:getId() == 3605 then
if table.contains(milestone, target:getId()) then
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3603, 1):decay()
else
Game.createItem(3603, 1, item:getPosition()):decay()
end
item:remove(1)
return true
end
end
return false
end

View File

@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if math.random(1, 100) <= 1 and math.random(1, 100) <= 10 then
item:transform(2975, 0)
item:decay()
else
item:getPosition():sendMagicEffect(22)
end
return true
end

View File

@ -0,0 +1,6 @@
function onUse(player, item, fromPosition, target, toPosition)
item:transform(3700, 1)
item:decay()
Game.createItem(3588, 3, fromPosition)
return true
end

View File

@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3874 and player:getStorageValue(305) == 1 then
item:transform(4868, 1)
target:getPosition():sendMagicEffect(10)
return true
elseif target:getId() == 3885 and player:getStorageValue(305) == 3 then
item:transform(4870, 1)
target:getPosition():sendMagicEffect(10)
return true
elseif target:getId() == 3878 and player:getStorageValue(305) == 5 then
item:transform(4869, 1)
target:getPosition():sendMagicEffect(10)
return true
end
return false
end

View File

@ -0,0 +1,28 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4992 and player:getStorageValue(304) == 1 then
target:getPosition():sendMagicEffect(17)
item:transform(4865, 1)
item:decay()
target:remove()
elseif target:getId() == 4993 and player:getStorageValue(304) == 3 then
target:getPosition():sendMagicEffect(17)
item:transform(4866, 1)
item:decay()
target:remove()
elseif target:getId() == 4991 and player:getStorageValue(304) == 5 then
target:getPosition():sendMagicEffect(17)
item:transform(4864, 1)
item:decay()
target:remove()
elseif target:getId() == 5013 and player:getStorageValue(304) == 5 then
target:getPosition():sendMagicEffect(17)
item:transform(5089, 1)
item:decay()
target:remove()
end
return false
end

View File

@ -0,0 +1,49 @@
function onUse(player, item, fromPosition, target, toPosition)
local chestQuestNumber = item:getAttribute(ITEM_ATTRIBUTE_CHESTQUESTNUMBER)
if player:getStorageValue(chestQuestNumber) > 0 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "The " .. item:getName() .. " is empty.")
return true
end
local playerCapacity = player:getFreeCapacity()
if item:getSize() <= 0 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "The chest is empty. This is a bug, report it to a gamemaster.")
return true
end
local reward = item:getItem(0)
local stackable = reward:getType():isStackable()
local rewardName = reward:getName()
local rewardWeight = reward:getWeight()
if stackable then
if reward:getCount() > 1 then
rewardName = reward:getCount() .. " " .. reward:getPluralName()
else
rewardName = reward:getName()
end
end
if reward:getArticle():len() > 0 and reward:getCount() <= 1 then
rewardName = reward:getArticle() .. " " .. rewardName
end
if rewardWeight > playerCapacity and not getPlayerFlagValue(player, layerFlag_HasInfiniteCapacity) then
local term = "it is"
if stackable and reward:getCount() > 1 then
term = "they are"
end
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You have found %s. Weighing %d.%02d oz %s too heavy.", rewardName, rewardWeight / 100, rewardWeight % 100, term))
return true
end
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found " .. rewardName .. ".")
player:addItemEx(reward:clone(), true)
if not getPlayerFlagValue(player, PlayerFlag_HasInfiniteCapacity) then
player:setStorageValue(chestQuestNumber, 1)
end
return true
end

View File

@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if Tile(item:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then
item:getPosition():sendMagicEffect(3)
else
item:transform(3482, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,61 @@
function onUse(player, item, fromPosition, target, toPosition)
if math.random(1, 100) <= 95 then
item:getPosition():sendMagicEffect(19)
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
else
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
end
else
item:getPosition():sendMagicEffect(19)
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
else
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
end
item:transform(3592, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,36 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4848 and player:getStorageValue(297) == 0 then
player:setStorageValue(297, 1)
target:getPosition():sendMagicEffect(1)
target:transform(4849, 1)
target:decay()
return true
elseif target:getId() == 4848 and player:getStorageValue(297) == 1 then
player:setStorageValue(297, 2)
target:getPosition():sendMagicEffect(1)
target:transform(4849, 1)
target:decay()
return true
elseif target:getId() == 4848 and player:getStorageValue(297) == 2 then
player:setStorageValue(297, 3)
target:getPosition():sendMagicEffect(1)
target:transform(4849, 3)
target:decay()
return true
elseif target:getId() == 1628 and toPosition.x == 32680 and toPosition.y == 32083 and toPosition.z == 09 then
Game.transformItemOnMap({x = 32680, y = 32083, z = 09}, 1628, 1630)
return true
elseif target:getId() == 3501 and toPosition.x == 32013 and toPosition.y == 31562 and toPosition.z == 04 and player:getStorageValue(228) == 1 then
Game.sendMagicEffect({x = 32013, y = 31562, z = 04}, 15)
player:setStorageValue(228, 2)
return true
elseif target:getId() == 3501 and toPosition.x == 32013 and toPosition.y == 31562 and toPosition.z == 04 then
Game.sendMagicEffect({x = 32013, y = 31562, z = 04}, 3)
return true
end
return doDestroyItem(target)
end

View File

@ -0,0 +1,175 @@
local lockedDoors = {
1628, 1631, 1650, 1653, 1668, 1671, 1682, 1691, 5006, 5007
}
local closedNormalDoors = {
[1629] = 1630,
[1632] = 1633,
[1638] = 1639,
[1640] = 1641,
[1651] = 1652,
[1654] = 1655,
[1656] = 1657,
[1658] = 1659,
[1669] = 1670,
[1672] = 1673,
[1683] = 1684,
[1685] = 1686,
[1692] = 1693,
[1694] = 1695,
[4912] = 4911,
[4913] = 4914,
[5082] = 5083,
[5084] = 5085,
[2177] = 2178,
[2179] = 2180,
}
local openVerticalDoors = {
[1630] = 1629,
[1639] = 1638,
[1643] = 1642,
[1647] = 1646,
[1652] = 1651,
[1657] = 1656,
[1661] = 1660,
[1665] = 1664,
[1670] = 1669,
[1675] = 1674,
[1679] = 1678,
[1693] = 1692,
[1695] = 1694,
[1697] = 1696,
[1699] = 1698,
[4914] = 4913,
[5083] = 5082,
[2178] = 2177,
}
local openHorizontalDoors = {
[1633] = 1632,
[1641] = 1640,
[1645] = 1644,
[1649] = 1648,
[1655] = 1654,
[1659] = 1658,
[1663] = 1662,
[1667] = 1666,
[1673] = 1672,
[1677] = 1676,
[1681] = 1680,
[1684] = 1683,
[1686] = 1685,
[1688] = 1687,
[1690] = 1689,
[4911] = 4912,
[5085] = 5084,
[2180] = 2179,
}
local levelDoors = {
[1646] = 1647,
[1648] = 1649,
[1664] = 1665,
[1666] = 1667,
[1678] = 1679,
[1680] = 1681,
[1687] = 1688,
[1696] = 1697,
}
local questDoors = {
[1642] = 1643,
[1644] = 1645,
[1660] = 1661,
[1662] = 1663,
[1674] = 1675,
[1676] = 1677,
[1689] = 1690,
[1698] = 1699,
}
local passthrough = {
[2334] = 2335,
[2335] = 2334,
[2336] = 2337,
[2337] = 2336,
[2338] = 2339,
[2339] = 2338,
[2340] = 2341,
[2341] = 2340,
}
function onUse(player, item, fromPosition, target, toPosition)
if table.contains(lockedDoors, item:getId()) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "It is locked.")
return true
end
local door = closedNormalDoors[item:getId()]
if door then
item:transform(door, 1)
item:decay()
return true
end
door = openVerticalDoors[item:getId()]
if door then
local doorCreature = Tile(item:getPosition()):getTopCreature()
if doorCreature then
doorCreature:teleportTo(item:getPosition():moveRel(1, 0, 0), true)
end
item:transform(door, 1)
item:decay()
return true
end
door = openHorizontalDoors[item:getId()]
if door then
local doorCreature = Tile(item:getPosition()):getTopCreature()
if doorCreature then
doorCreature:teleportTo(item:getPosition():moveRel(0, 1, 0), true)
end
item:transform(door, 1)
item:decay()
return true
end
door = levelDoors[item:getId()]
if door then
if player:getLevel() < item:getAttribute(ITEM_ATTRIBUTE_DOORLEVEL) then
player:sendTextMessage(MESSAGE_INFO_DESCR, item:getType():getDescription() .. ".")
return true
end
player:teleportTo(item:getPosition(), true)
item:transform(door, 1)
item:decay()
return true
end
door = questDoors[item:getId()]
if door then
local questNumber = item:getAttribute(ITEM_ATTRIBUTE_DOORQUESTNUMBER)
local questValue = item:getAttribute(ITEM_ATTRIBUTE_DOORQUESTVALUE)
if questNumber > 0 then
if player:getStorageValue(questNumber) ~= questValue then
player:sendTextMessage(MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
return true
end
end
player:teleportTo(item:getPosition(), true)
item:transform(door, 1)
item:decay()
return true
end
door = passthrough[item:getId()]
if door then
item:transform(door, 1)
item:decay()
return true
end
return true
end

View File

@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4094 then
item:transform(4853, 1)
item:decay()
target:getPosition():sendMagicEffect(12)
item:getPosition():sendMagicEffect(13)
return true
end
return false
end

View File

@ -0,0 +1,39 @@
local water = {
4597, 4598, 4599, 4600, 4601, 4602,
4609, 4610, 4611, 4612, 4613, 4614,
4615, 4616, 4617, 4618, 4619, 4620,
622
}
local fishableWater = {
4597, 4598, 4599, 4600, 4601, 4602
}
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if not table.contains(water, target:getId()) then
return false
end
if not Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then
if player:getItemCount(3492) >= 1 then
player:addSkillTries(SKILL_FISHING, 1)
if math.random(1, 100) <= math.min(math.max(10 + (player:getEffectiveSkillLevel(SKILL_FISHING) - 10) * 0.597, 10), 50) then
player:addItem(3578, 1)
if target:getId() ~= 622 then
target:transform(4609, 1)
end
target:decay()
player:removeItem(3492, 1)
end
end
end
target:getPosition():sendMagicEffect(2)
return true
end

View File

@ -0,0 +1,102 @@
local drunk = Condition(CONDITION_DRUNK)
drunk:setParameter(CONDITION_PARAM_TICKS, 60000)
local poison = Condition(CONDITION_POISON)
poison:setParameter(CONDITION_PARAM_DELAYED, true)
poison:setParameter(CONDITION_PARAM_MINVALUE, -50)
poison:setParameter(CONDITION_PARAM_MAXVALUE, -120)
poison:setParameter(CONDITION_PARAM_STARTVALUE, -5)
poison:setParameter(CONDITION_PARAM_TICKINTERVAL, 5000)
poison:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
local messages = {
[FLUID_WATER] = "Gulp.",
[FLUID_WINE] = "Aah...",
[FLUID_BEER] = "Aah...",
[FLUID_MUD] = "Gulp.",
[FLUID_BLOOD] = "Gulp.",
[FLUID_SLIME] = "Urgh!",
[FLUID_OIL] = "Gulp.",
[FLUID_URINE] = "Urgh!",
[FLUID_MILK] = "Mmmh.",
[FLUID_MANAFLUID] = "Aaaah...",
[FLUID_LIFEFLUID] = "Aaaah...",
[FLUID_LEMONADE] = "Mmmh."
}
function onUse(player, item, fromPosition, target, toPosition)
local targetItemType = ItemType(target:getId())
if targetItemType and targetItemType:isFluidContainer() then
if target:getFluidType() == 0 and item:getFluidType() ~= 0 then
target:transform(target:getId(), item:getFluidType())
item:transform(item:getId(), 0)
return true
elseif target:getFluidType() ~= 0 and item:getFluidType() == 0 then
target:transform(target:getId(), 0)
item:transform(item:getId(), target:getFluidType())
return true
end
end
if target:isCreature() then
if item:getFluidType() == FLUID_NONE then
player:sendCancelMessage("It is empty.")
else
local self = target == player
if self and item:getFluidType() == FLUID_BEER or item:getFluidType() == FLUID_WINE then
player:addCondition(drunk)
elseif self and item:getFluidType() == FLUID_SLIME then
player:addCondition(slime)
elseif item:getFluidType() == FLUID_MANAFLUID then
target:addMana(math.random(50, 100))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
elseif item:getFluidType() == FLUID_LIFEFLUID then
target:addHealth(math.random(25, 50))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
end
if not self then
if item:getFluidType() ~= FLUID_MANAFLUID and item:getFluidType() ~= FLUID_LIFEFLUID then
if toPosition.x == CONTAINER_POSITION then
toPosition = player:getPosition()
end
Game.createItem(2886, item:getFluidType(), toPosition):decay()
return true
end
end
local message = messages[item:getFluidType()]
if message then
target:say(message, TALKTYPE_MONSTER_SAY)
else
target:say("Gulp.", TALKTYPE_MONSTER_SAY)
end
item:transform(item:getId(), FLUID_NONE)
end
else
if toPosition.x == CONTAINER_POSITION then
toPosition = player:getPosition()
end
local tile = Tile(toPosition)
if not tile then
return false
end
if item:getFluidType() ~= FLUID_NONE and tile:hasFlag(TILESTATE_IMMOVABLEBLOCKSOLID) then
return false
end
local fluidSource = targetItemType and targetItemType:getFluidSource() or FLUID_NONE
if fluidSource ~= FLUID_NONE then
item:transform(item:getId(), fluidSource)
elseif item:getFluidType() == FLUID_NONE then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "It is empty.")
else
Game.createItem(2886, item.type, toPosition):decay()
item:transform(item:getId(), 0)
end
end
return true
end

View File

@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
local itemType = ItemType(item:getId())
local condition = player:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT)
if condition and math.floor(condition:getTicks() / 1000 + (itemType:getNutrition() * 12)) >= 1200 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You are full.")
else
player:feed(itemType:getNutrition() * 12)
item:remove(1)
end
return true
end

View File

@ -0,0 +1,61 @@
local parcels = {
[2775] = 2374,
[2776] = 2378,
[2777] = 2358,
[2778] = 2382,
[2779] = 2366,
[2780] = 2418,
[2781] = 2422,
[2782] = 2319,
[2783] = 2316,
[2784] = 2315,
[2785] = 2314,
[2786] = 2346,
[2787] = 2349,
[2788] = 2351,
[2789] = 2433,
[2790] = 2441,
[2791] = 2449,
[2792] = 2524,
[2793] = 2523,
[2794] = 2483,
[2795] = 2465,
[2796] = 2976,
[2797] = 2979,
[2798] = 2934,
[2799] = 3485,
[2800] = 2998,
[2801] = 2445,
[2802] = 2025,
[2803] = 2029,
[2804] = 2030,
[2805] = 2904,
[2806] = 3510,
[2807] = 2959,
[2808] = 2963,
[2809] = 2426,
[2810] = 2352,
[2811] = 2982,
[2812] = 2986,
[5086] = 5046,
[5087] = 5055,
[5088] = 5056,
}
function onUse(player, item, fromPosition, target, toPosition)
local parcel = parcels[item:getId()]
if not parcel then
return false
end
if not item:getParent():isTile() then
item:getPosition():sendMagicEffect(CONST_ME_POFF)
elseif not Tile(fromPosition):getHouse() then
item:getPosition():sendMagicEffect(CONST_ME_POFF)
else
item:transform(parcel)
item:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end

View File

@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3030 then
item:getPosition():sendMagicEffect(14)
item:transform(3230, 1)
item:decay()
target:remove(1)
return true
end
return false
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4994 and player:getStorageValue(306) == 1 and player:getStorageValue(307) == 0 then
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(4837, 1)
else
Game.createItem(4837, 1, item:getPosition())
end
target:getPosition():sendMagicEffect(2)
player:setStorageValue(307, 1)
return true
end
return false
end

View File

@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() >= 2948 and item:getId() <= 2950 or item:getId() >= 2952 and item:getId() <= 2958 or
item:getId() >= 2963 and item:getId() <= 2964 then
item:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN)
elseif (item:getId() >= 2959 and item:getId() <= 2962 or item:getId() == 2965) and math.random(1, 100) <= 50 then
item:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN)
elseif item:getId() >= 2959 and item:getId() <= 2962 or item:getId() == 2965 then
item:getPosition():sendMagicEffect(CONST_ME_SOUND_PURPLE)
elseif item:getId() == 3219 then
item:getPosition():sendMagicEffect(19)
end
return true
end

View File

@ -0,0 +1,56 @@
local closedDoors = {
[1628] = 1630,
[1629] = 1628,
[1631] = 1633,
[1632] = 1631,
[1650] = 1652,
[1651] = 1650,
[1653] = 1655,
[1654] = 1653,
[1668] = 1670,
[1669] = 1668,
[1671] = 1673,
[1672] = 1671,
[1682] = 1684,
[1683] = 1682,
[1691] = 1693,
[1692] = 1691,
}
local openDoors = {
[1630] = 1628,
[1633] = 1631,
[1652] = 1650,
[1655] = 1653,
[1670] = 1668,
[1673] = 1671,
[1684] = 1682,
[1693] = 1691,
}
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
local door = closedDoors[target:getId()]
if not door then
door = openDoors[target:getId()]
end
if not door then
return false
end
local keyNumber = item:getAttribute(ITEM_ATTRIBUTE_KEYNUMBER)
local keyHoleNumber = target:getAttribute(ITEM_ATTRIBUTE_KEYHOLENUMBER)
if keyHoleNumber == 0 or keyNumber ~= keyHoleNumber then
player:sendCancelMessage("The key does not match.")
return true
end
target:transform(door)
target:decay()
return true
end

View File

@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3594 then
target:transform(2977, 1)
target:decay()
return true
end
return false
end

View File

@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if target:getId() == 3221 and toPosition.x == 31948 and toPosition.y == 31711 and toPosition.z == 06 then
item:transform(2859, 1)
item:decay()
player:setStorageValue(244, 2)
Game.sendMagicEffect({x = 31948, y = 31711, z = 06}, 19)
return true
end
return false
end

View File

@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3696 then
target:transform(3695, 1)
target:decay()
return true
elseif target:getId() == 3702 then
target:transform(3701, 1)
target:decay()
return true
elseif target:getId() == 2130 then
target:remove()
return true
end
return false
end

View File

@ -0,0 +1,6 @@
function onUse(player, item, fromPosition, target, toPosition)
item:transform(3481, 1)
item:decay()
item:getPosition():sendMagicEffect(3)
return true
end

View File

@ -0,0 +1,4 @@
function onUse(player, item, fromPosition, target, toPosition)
player:sendCancelMessage("Hug me ^^")
return true
end

View File

@ -0,0 +1,34 @@
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
local ground = tile:getGround()
if not ground then
return false
end
if ground:getId() == 372 then
ground:transform(394, 1)
ground:decay()
return true
elseif target:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 and math.random(1, 100) <= 40 then
Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
Game.removeItemOnMap({x = 32648, y = 32134, z = 10}, 1772)
return true
elseif target:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 then
Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -40, -40)
return true
elseif target:getId() == 1791 and toPosition.x == 32356 and toPosition.y == 32074 and toPosition.z == 10 and math.random(1, 100) <= 40 then
Game.sendMagicEffect({x = 32356, y = 32074, z = 10}, 3)
Game.removeItemOnMap({x = 32356, y = 32074, z = 10}, 1791)
return true
elseif target:getId() == 1791 and toPosition.x == 32356 and toPosition.y == 32074 and toPosition.z == 10 then
Game.sendMagicEffect({x = 32356, y = 32074, z = 10}, 3)
doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -50, -50)
return true
end
return false
end

View File

@ -0,0 +1,5 @@
function onUse(player, item, fromPosition, target, toPosition)
item:getPosition():sendMagicEffect(3)
item:remove()
return true
end

View File

@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 2917 then
item:transform(2978, 1)
item:decay()
target:remove()
return true
end
return false
end

View File

@ -0,0 +1,46 @@
local ropeSpots = {
386, 421
}
local holeSpots = {
293, 294, 369, 370, 385, 394, 411, 412,
421, 432, 433, 435, 482, 5081, 483, 594,
595, 607, 609, 610, 615, 1066, 1067, 1080
}
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
if not tile:getGround() then
return false
end
if table.contains(ropeSpots, tile:getGround():getId()) then
player:teleportTo(target:getPosition():moveRel(0, 1, -1))
return true
elseif table.contains(holeSpots, tile:getGround():getId()) or target:getId() == 435 then
local tile = Tile(target:getPosition():moveRel(0, 0, 1))
if not tile then
return false
end
local thing = tile:getTopCreature()
if not thing then
thing = tile:getTopVisibleThing()
end
if thing:isCreature() then
thing:teleportTo(target:getPosition():moveRel(0, 1, 0), false)
return true
end
if thing:isItem() and thing:getType():isMovable() then
thing:moveTo(target:getPosition():moveRel(0, 1, 0))
return true
end
return true
end
return false
end

View File

@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3652 then
player:sendCancelMessage(target:getType():getDescription() .. ".")
return true
elseif target:getId() == 3653 then
target:transform(3651, 1)
target:decay()
Game.createItem(3605, 1, target:getPosition())
return true
end
return doDestroyItem(target)
end

View File

@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if target:getId() == 2199 and toPosition.x == 32754 and toPosition.y == 32559 and toPosition.z == 09 and player:getStorageValue(315) == 1 then
item:transform(4843, 1)
item:decay()
player:setStorageValue(316, 1)
target:getPosition():sendMagicEffect(4)
return true
end
return false
end

View File

@ -0,0 +1,57 @@
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
local ground = tile:getGround()
if not ground then
return false
end
local toTarget = target;
local itemType = ItemType(target:getId())
if itemType:isSplash() then
toTarget = ground
end
if toTarget:getId() == 231 then
toTarget:getPosition():sendMagicEffect(3)
return true
elseif toTarget:getId() == 593 then
toTarget:transform(594, 1)
toTarget:decay()
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
return true
elseif toTarget:getId() == 606 then
toTarget:transform(607, 1)
toTarget:decay()
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
return true
elseif toTarget:getId() == 608 then
toTarget:transform(609, 1)
toTarget:decay()
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
elseif toTarget:getId() == 614 and math.random(1, 100) <= 50 then
toTarget:transform(615, 1)
toTarget:decay()
toTarget:getPosition():sendMagicEffect(3)
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
elseif toTarget:getId() == 614 then
toTarget:getPosition():sendMagicEffect(3)
elseif toTarget:getId() == 616 and math.random(1, 100) <= 95 then
toTarget:transform(617, 1)
toTarget:decay()
toTarget:getPosition():sendMagicEffect(3)
Game.createMonster("scarab", toTarget:getPosition())
elseif toTarget:getId() == 616 then
toTarget:getPosition():sendMagicEffect(3)
Game.createItem(3042, 1, toTarget:getPosition())
toTarget:transform(617, 1)
toTarget:decay()
elseif toTarget:getId() == 617 then
toTarget:getPosition():sendMagicEffect(3)
end
return false
end

View File

@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4850 and player:getStorageValue(293) == 17 then
target:transform(4851, 1)
target:decay()
player:setStorageValue(299, 1)
item:remove()
target:getPosition():sendMagicEffect(7)
return true
end
return false
end

View File

@ -0,0 +1,4 @@
function onUse(player, item, fromPosition, target, toPosition)
Game.createItem(2992, 1, fromPosition)
return true
end

View File

@ -0,0 +1,37 @@
function onUse(player, item, fromPosition, target, toPosition)
if player:hasFlag(PlayerFlag_SpecialMoveUse) then
if item:getId() == 372 then
item:transform(394, 1)
item:decay()
elseif item:getId() == 386 or item:getId() == 421 then
local relPos = item:getPosition():moveRel(0, 1, -1)
player:teleportTo(relPos)
elseif item:getId() == 593 then
item:transform(594, 1)
item:decay()
doRelocate(item:getPosition(),item:getPosition():moveRel(0, 0, 1))
elseif item:getId() == 606 or item:getId() == 608 then
item:transform(607, 1)
item:decay()
doRelocate(item:getPosition(), item:getPosition():moveRel(0, 0, 1))
elseif item:getId() == 614 then
item:transform(615, 1)
item:decay()
item:getPosition():sendMagicEffect(3)
doRelocate(item:getPosition(), item:getPosition():moveRel(0, 0, 1))
elseif item:getId() == 3653 then
item:transform(3651, 1)
item:decay()
Game.createItem(3605, 1, item:getPosition())
elseif item:getId() == 3696 then
item:transform(3695, 1)
item:decay()
elseif item:getId() == 3702 then
item:transform(3701, 1)
item:decay()
end
else
return false
end
return true
end

View File

@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if target:getId() == 599 and toPosition.x == 32665 and toPosition.y == 32736 and toPosition.z == 06 and player:getStorageValue(320) == 5 then
player:setStorageValue(321,1)
target:getPosition():sendMagicEffect(13)
return true
elseif target:getId() == 599 and toPosition.x == 32497 and toPosition.y == 31622 and toPosition.z == 06 and player:getStorageValue(320) == 5 then
player:setStorageValue(322,1)
target:getPosition():sendMagicEffect(13)
return true
end
return false
end

View File

@ -0,0 +1,32 @@
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local count = getPlayerInstantSpellCount(player)
local text = ""
local spells = {}
for i = 0, count - 1 do
local spell = getPlayerInstantSpellInfo(player, i)
if spell.level ~= 0 then
if spell.manapercent > 0 then
spell.mana = spell.manapercent .. "%"
end
spells[#spells + 1] = spell
end
end
table.sort(spells, function(a, b) return a.level < b.level end)
local prevLevel = -1
for i, spell in ipairs(spells) do
local line = ""
if prevLevel ~= spell.level then
if i ~= 1 then
line = "\n"
end
line = line .. "Spells for Level " .. spell.level .. "\n"
prevLevel = spell.level
end
text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"
end
player:showTextDialog(item:getId(), text)
return true
end

View File

@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2566 then
item:transform(2567, 1)
item:decay()
elseif item:getId() == 2567 then
player:sendCancelMessage("It doesn't move.")
elseif item:getId() == 2569 then
item:transform(2570, 1)
item:decay()
elseif item:getId() == 2570 then
item:transform(2569, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,16 @@
local downstairs = {
435
}
local upstairs = {
1948, 1968
}
function onUse(player, item, fromPosition, target, toPosition)
if table.contains(downstairs, item:getId()) then
player:teleportTo(item:getPosition():moveRel(0, 0, 1))
elseif table.contains(upstairs, item:getId()) then
player:teleportTo(item:getPosition():moveRel(0, 1, -1))
end
return true
end

View File

@ -0,0 +1,4 @@
function onUse(player, item, fromPosition, target, toPosition)
player:sendTextMessage(MESSAGE_INFO_DESCR, "The time is " .. getFormattedWorldTime() .. ".")
return true
end

View File

@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 2874 and target:getFluidType() == FLUID_OIL then
target:transform(target:getId(), FLUID_NONE)
item:transform(2914, 1)
item:decay()
return true
end
return false
end

View File

@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if math.random(1, 100) <= 90 then
item:getPosition():sendMagicEffect(3)
return true
else
player:getPosition():sendMagicEffect(3)
end
return true
end

View File

@ -0,0 +1,3 @@
function onUse(player, item, fromPosition, target, toPosition)
return doDestroyItem(target)
end

View File

@ -0,0 +1,26 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32627, y = 31699, z = 10}, 1771) then
item:transform(2773, 1)
item:decay()
doRelocate({x = 32627, y = 31699, z = 10},{x = 32626, y = 31699, z = 10})
doRelocate({x = 32628, y = 31699, z = 10},{x = 32626, y = 31699, z = 10})
doRelocate({x = 32629, y = 31699, z = 10},{x = 32626, y = 31699, z = 10})
Game.transformItemOnMap({x = 32627, y = 31699, z = 10}, 1771, 622)
Game.createItem(4788, 1, {x = 32627, y = 31699, z = 10})
Game.transformItemOnMap({x = 32628, y = 31699, z = 10}, 1771, 622)
Game.transformItemOnMap({x = 32629, y = 31699, z = 10}, 1771, 622)
Game.createItem(4786, 1, {x = 32629, y = 31699, z = 10})
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32628, y = 31699, z = 10}, 622) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32627, y = 31699, z = 10}, 622, 1771)
Game.transformItemOnMap({x = 32628, y = 31699, z = 10}, 622, 1771)
Game.transformItemOnMap({x = 32629, y = 31699, z = 10}, 622, 1771)
Game.removeItemOnMap({x = 32627, y = 31699, z = 10}, 4788)
Game.removeItemOnMap({x = 32629, y = 31699, z = 10}, 4786)
end
return true
end

View File

@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32792, y = 31581, z = 07},1282) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32792, y = 31581, z = 07}, 1282)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32792, y = 31581, z = 07}, 1282) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32792, y = 31581, z = 07},{x = 32792, y = 31582, z = 07})
Game.createItem(1282, 1, {x = 32792, y = 31581, z = 07})
end
return true
end

View File

@ -0,0 +1,32 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32685, y = 32084, z = 09}, 1771) then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32687, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
doRelocate({x = 32686, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
doRelocate({x = 32685, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
doRelocate({x = 32684, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
Game.transformItemOnMap({x = 32687, y = 32084, z = 09}, 1771, 727)
Game.createItem(4798, 1, {x = 32687, y = 32084, z = 09})
Game.transformItemOnMap({x = 32686, y = 32084, z = 09}, 1771, 727)
Game.transformItemOnMap({x = 32685, y = 32084, z = 09}, 1771, 727)
Game.transformItemOnMap({x = 32684, y = 32084, z = 09}, 1771, 727)
Game.createItem(4800, 1, {x = 32684, y = 32084, z = 09})
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2772 and Game.isItemThere({x = 32685, y = 32084, z = 09},727) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32684, y = 32084, z = 09}, 4800)
Game.transformItemOnMap({x = 32684, y = 32084, z = 09}, 727, 1771)
Game.transformItemOnMap({x = 32685, y = 32084, z = 09}, 727, 1771)
Game.removeItemOnMap({x = 32687, y = 32084, z = 09}, 4798)
Game.transformItemOnMap({x = 32687, y = 32084, z = 09}, 727, 1771)
Game.transformItemOnMap({x = 32686, y = 32084, z = 09}, 727, 1771)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,26 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32673, y = 32085, z = 08},430) and Game.isItemThere ({x = 32669, y = 32089, z = 08},430) and Game.isItemThere ({x = 32673, y = 32093, z = 08},430) and Game.isItemThere ({x = 32677, y = 32089, z = 08},430) and Game.isItemThere ({x = 32673, y = 32083, z = 08},3349) and Game.isItemThere ({x = 32667, y = 32089, z = 08},3585) and Game.isItemThere ({x = 32673, y = 32094, z = 08},3264) and Game.isItemThere ({x = 32679, y = 32089, z = 08},3059) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32673, y = 32083, z = 08}, 3349)
Game.removeItemOnMap({x = 32667, y = 32089, z = 08}, 3585)
Game.removeItemOnMap({x = 32673, y = 32094, z = 08}, 3264)
Game.removeItemOnMap({x = 32679, y = 32089, z = 08}, 3059)
Game.sendMagicEffect({x = 32673, y = 32083, z = 08}, 11)
Game.sendMagicEffect({x = 32667, y = 32089, z = 08}, 11)
Game.sendMagicEffect({x = 32673, y = 32094, z = 08}, 11)
Game.sendMagicEffect({x = 32679, y = 32089, z = 08}, 11)
doRelocate({x = 32673, y = 32093, z = 08},{x = 32671, y = 32069, z = 08})
doRelocate({x = 32669, y = 32089, z = 08},{x = 32672, y = 32069, z = 08})
doRelocate({x = 32673, y = 32085, z = 08},{x = 32671, y = 32070, z = 08})
doRelocate({x = 32677, y = 32089, z = 08},{x = 32672, y = 32070, z = 08})
Game.sendMagicEffect({x = 32671, y = 32069, z = 08}, 11)
Game.sendMagicEffect({x = 32672, y = 32069, z = 08}, 11)
Game.sendMagicEffect({x = 32671, y = 32070, z = 08}, 11)
Game.sendMagicEffect({x = 32672, y = 32070, z = 08}, 11)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32568, y = 32078, z = 12},2185) and Game.isItemThere ({x = 32569, y = 32078, z = 12},2185) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32568, y = 32078, z = 12}, 2185)
Game.removeItemOnMap({x = 32569, y = 32078, z = 12}, 2185)
elseif item:getId() == 2773 and Game.isItemThere({x = 32568, y = 32078, z = 12},2185) and Game.isItemThere ({x = 32569, y = 32078, z = 12}, 2185) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.createItem(2185, 1, {x = 32568, y = 32078, z = 12})
Game.createItem(2185, 1, {x = 32569, y = 32078, z = 12})
end
return true
end

View File

@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33314, y = 31592, z = 15}, 1842)
doRelocate({x = 33316, y = 31591, z = 15},{x = 33317, y = 31591, z = 15})
Game.createItem(1949, 1, {x = 33316, y = 31591, z = 15})
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33314, y = 31592, z = 15},{x = 33315, y = 31592, z = 15})
Game.createItem(1842, 1, {x = 33314, y = 31592, z = 15})
Game.removeItemOnMap({x = 33316, y = 31591, z = 15}, 1949)
end
return true
end

View File

@ -0,0 +1,31 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 33295, y = 31677, z = 15},1791) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33295, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33296, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33297, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33298, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33299, y = 31677, z = 15}, 1791)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 33295, y = 31677, z = 15}, 1791) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33295, y = 31677, z = 15},{x = 33295, y = 31678, z = 15})
doRelocate({x = 33296, y = 31677, z = 15},{x = 33296, y = 31678, z = 15})
doRelocate({x = 33297, y = 31677, z = 15},{x = 33297, y = 31678, z = 15})
doRelocate({x = 33298, y = 31677, z = 15},{x = 33298, y = 31678, z = 15})
doRelocate({x = 33299, y = 31677, z = 15},{x = 33299, y = 31678, z = 15})
Game.createItem(1791, 1, {x = 33295, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33296, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33297, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33298, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33299, y = 31677, z = 15})
end
return true
end

View File

@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33171, y = 31897, z = 08}, 1772)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33171, y = 31897, z = 08},{x = 33171, y = 31898, z = 08})
Game.createItem(1772, 1, {x = 33171, y = 31897, z = 08})
end
return true
end

View File

@ -0,0 +1,31 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 33222, y = 31671, z = 13},430) and Game.isItemThere ({x = 33223, y = 31671, z = 13},430) and Game.isItemThere ({x = 33224, y = 31671, z = 13},430) and Game.isItemThere ({x = 33225, y = 31671, z = 13},430) and Game.isItemThere ({x = 33220, y = 31659, z = 13},1772) then
item:transform(2772, 1)
item:decay()
Game.removeItemOnMap({x = 33220, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33221, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33222, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33223, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33224, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33219, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33219, y = 31657, z = 13}, 1772)
Game.removeItemOnMap({x = 33221, y = 31657, z = 13}, 1772)
Game.removeItemOnMap({x = 33220, y = 31661, z = 13}, 1772)
Game.removeItemOnMap({x = 33222, y = 31661, z = 13}, 1772)
Game.createMonster("Demon", {x = 33224, y = 31659, z = 13})
Game.createMonster("Demon", {x = 33223, y = 31659, z = 13})
Game.createMonster("Demon", {x = 33219, y = 31657, z = 13})
Game.createMonster("Demon", {x = 33221, y = 31657, z = 13})
Game.createMonster("Demon", {x = 33220, y = 31661, z = 13})
Game.createMonster("Demon", {x = 33222, y = 31661, z = 13})
doRelocate({x = 33222, y = 31671, z = 13},{x = 33219, y = 31659, z = 13})
doRelocate({x = 33223, y = 31671, z = 13},{x = 33220, y = 31659, z = 13})
doRelocate({x = 33224, y = 31671, z = 13},{x = 33221, y = 31659, z = 13})
doRelocate({x = 33225, y = 31671, z = 13},{x = 33222, y = 31659, z = 13})
Game.sendMagicEffect({x = 33219, y = 31659, z = 13}, 11)
Game.sendMagicEffect({x = 33220, y = 31659, z = 13}, 11)
Game.sendMagicEffect({x = 33221, y = 31659, z = 13}, 11)
Game.sendMagicEffect({x = 33222, y = 31659, z = 13}, 11)
end
return true
end

View File

@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32483, y = 31633, z = 09}, 385) then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32483, y = 31633, z = 09}, 355, 385)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:remove()
Game.createItem(2126, 1, {x = 32487, y = 31628, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31629, z = 13})
Game.createItem(2126, 1, {x = 32488, y = 31629, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31627, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31627, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31628, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31629, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31630, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31630, z = 13})
Game.createItem(2126, 1, {x = 32488, y = 31630, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31626, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31626, z = 13})
Game.createItem(2126, 1, {x = 32488, y = 31626, z = 13})
Game.sendMagicEffect({x = 32488, y = 31628, z = 13}, 3)
end
return true
end

View File

@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if Game.isItemThere({x = 33211, y = 32698, z = 13}, 1306) then
Game.removeItemOnMap({x = 33211, y = 32698, z = 13}, 1306)
else
doRelocate({x = 33211, y = 32698, z = 13}, {x = 33211, y = 32697, z = 13})
Game.createItem(1306, 1, {x = 33211, y = 32698, z = 13})
end
return true
end

View File

@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32259, y = 31891, z = 10},2129) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32259, y = 31891, z = 10}, 2129)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32259, y = 31891, z = 10}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32259, y = 31891, z = 10},{x = 32259, y = 31892, z = 10})
Game.createItem(2129, 1, {x = 32259, y = 31891, z = 10})
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32313, y = 31975, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31975, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32313, y = 31975, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31975, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32313, y = 31976, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31976, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32313, y = 31976, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31976, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32311, y = 31976, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31976, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32311, y = 31976, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31976, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32311, y = 31975, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31975, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32311, y = 31975, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31975, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32309, y = 31976, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31976, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32309, y = 31976, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31976, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32309, y = 31975, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31975, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32309, y = 31975, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31975, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32266, y = 31860, z = 11},2129) then
Game.removeItemOnMap({x = 32266, y = 31860, z = 11}, 2129)
Game.transformItemOnMap({x = 32266, y = 31860, z = 11}, 410, 411)
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32266, y = 31860, z = 11}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32266, y = 31860, z = 11}, 411, 410)
Game.createItem(2129, 1, {x = 32266, y = 31860, z = 11})
end
return true
end

View File

@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32259, y = 31890, z = 10},2129) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32259, y = 31890, z = 10}, 2129)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32259, y = 31890, z = 10}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32259, y = 31890, z = 10},{x = 32259, y = 31889, z = 10})
Game.createItem(2129, 1, {x = 32259, y = 31890, z = 10})
end
return true
end

View File

@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31845, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31842, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@ -0,0 +1,28 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 33148, y = 32867, z = 09}, 2129) and Game.isItemThere ({x = 33149, y = 32867, z = 09}, 2129) and Game.isItemThere ({x = 33148, y = 32868, z = 09}, 2129) and Game.isItemThere ({x = 33149, y = 32868, z = 09}, 2129) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33148, y = 32867, z = 09}, 2129)
Game.removeItemOnMap({x = 33149, y = 32867, z = 09}, 2129)
Game.removeItemOnMap({x = 33148, y = 32868, z = 09}, 2129)
Game.removeItemOnMap({x = 33149, y = 32868, z = 09}, 2129)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 33148, y = 32867, z = 09}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33148, y = 32867, z = 09}, {x = 33148, y = 32869, z = 09})
doRelocate({x = 33149, y = 32867, z = 09}, {x = 33149, y = 32869, z = 09})
doRelocate({x = 33148, y = 32868, z = 09}, {x = 33148, y = 32869, z = 09})
doRelocate({x = 33149, y = 32868, z = 09},{x = 33149, y = 32869, z = 09})
Game.createItem(2129, 1, {x = 33148, y = 32867, z = 09})
Game.createItem(2129, 1, {x = 33149, y = 32867, z = 09})
Game.createItem(2129, 1, {x = 33148, y = 32868, z = 09})
Game.createItem(2129, 1, {x = 33149, y = 32868, z = 09})
end
return true
end

View File

@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31843, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32220, y = 31843, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@ -0,0 +1,21 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31842, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31842, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31846, z = 14}, 12)
Game.transformItemOnMap({x = 32214, y = 31850, z = 15}, 2114, 2113)
Game.transformItemOnMap({x = 32215, y = 31850, z = 15}, 2114, 2113)
Game.transformItemOnMap({x = 32216, y = 31850, z = 15}, 2114, 2113)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31844, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31846, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32220, y = 31846, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31844, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31842, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31841, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32220, y = 31845, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@ -0,0 +1,28 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
doRelocate({x = 32636, y = 31881, z = 07},{x = 32636, y = 31881, z = 02})
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
elseif item:getId() == 2772 then
doRelocate({x = 32636, y = 31881, z = 07},{x = 32636, y = 31881, z = 02})
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
elseif item:getId() == 2773 then
doRelocate({x = 32636, y = 31881, z = 02},{x = 32636, y = 31881, z = 07})
item:transform(2772, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32636, y = 31881, z = 02},{x = 32636, y = 31881, z = 07})
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
end
return true
end

View File

@ -0,0 +1,22 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32604, y = 31905, z = 03}, 1789)
Game.removeItemOnMap({x = 32605, y = 31905, z = 03}, 1790)
Game.removeItemOnMap({x = 32604, y = 31904, z = 03}, 1787)
Game.removeItemOnMap({x = 32605, y = 31904, z = 03}, 1788)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32604, y = 31904, z = 03},{x = 32604, y = 31906, z = 03})
doRelocate({x = 32604, y = 31905, z = 03},{x = 32604, y = 31906, z = 03})
doRelocate({x = 32605, y = 31904, z = 03},{x = 32605, y = 31906, z = 03})
doRelocate({x = 32605, y = 31905, z = 03},{x = 32605, y = 31906, z = 03})
Game.createItem(1787, 1, {x = 32604, y = 31904, z = 03})
Game.createItem(1789, 1, {x = 32604, y = 31905, z = 03})
Game.createItem(1788, 1, {x = 32605, y = 31904, z = 03})
Game.createItem(1790, 1, {x = 32605, y = 31905, z = 03})
end
return true
end

View File

@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.transformItemOnMap({x = 32605, y = 31902, z = 04}, 436, 432)
item:transform(2773, 1)
item:decay()
doRelocate({x = 32605, y = 31902, z = 04},{x = 32605, y = 31902, z = 05})
elseif item:getId() == 2773 then
Game.transformItemOnMap({x = 32605, y = 31902, z = 04}, 432, 436)
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
doRelocate({x = 32636, y = 31881, z = 07},{x = 32636, y = 31881, z = 02})
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32636, y = 31881, z = 02},{x = 32636, y = 31881, z = 07})
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
end
return true
end

View File

@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32566, y = 32119, z = 07}, 1270)
Game.transformItemOnMap({x = 32566, y = 32118, z = 07}, 1270, 1274)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32566, y = 32119, z = 07},{x = 32567, y = 32119, z = 07})
Game.createItem(1270, 1, {x = 32566, y = 32119, z = 07})
Game.transformItemOnMap({x = 32566, y = 32118, z = 07}, 1274, 1270)
end
return true
end

View File

@ -0,0 +1,26 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
doRelocate({x = 32426, y = 32202, z = 14},{x = 32426, y = 32200, z = 14})
doRelocate({x = 32426, y = 32201, z = 14},{x = 32426, y = 32200, z = 14})
doRelocate({x = 32427, y = 32202, z = 14},{x = 32427, y = 32200, z = 14})
doRelocate({x = 32427, y = 32201, z = 14},{x = 32427, y = 32200, z = 14})
Game.removeItemOnMap({x = 32426, y = 32202, z = 14}, 1771)
Game.removeItemOnMap({x = 32426, y = 32201, z = 14}, 1771)
Game.removeItemOnMap({x = 32427, y = 32202, z = 14}, 1771)
Game.removeItemOnMap({x = 32427, y = 32201, z = 14}, 1771)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.createTile({x = 32426, y = 32201, z = 14}, true)
Game.createTile({x = 32427, y = 32201, z = 14}, true)
Game.createTile({x = 32426, y = 32202, z = 14}, true)
Game.createTile({x = 32427, y = 32202, z = 14}, true)
Game.createItem(1771, 1, {x = 32426, y = 32201, z = 14})
Game.createItem(1771, 1, {x = 32427, y = 32201, z = 14})
Game.createItem(1771, 1, {x = 32426, y = 32202, z = 14})
Game.createItem(1771, 1, {x = 32427, y = 32202, z = 14})
end
return true
end

View File

@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.transformItemOnMap({x = 32313, y = 31928, z = 08}, 2772, 2773)
Game.sendMagicEffect({x = 32314, y = 31928, z = 08}, 12)
elseif item:getId() == 2773 then
Game.transformItemOnMap({x = 32313, y = 31928, z = 08}, 2773, 2772)
Game.sendMagicEffect({x = 32314, y = 31928, z = 08}, 12)
end
return true
end

View File

@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:remove()
Game.removeItemOnMap({x = 32186, y = 31626, z = 08}, 2129)
Game.removeItemOnMap({x = 32187, y = 31626, z = 08}, 2129)
Game.removeItemOnMap({x = 32188, y = 31626, z = 08}, 2129)
Game.removeItemOnMap({x = 32189, y = 31626, z = 08}, 2129)
Game.sendMagicEffect({x = 32180, y = 31633, z = 08}, 3)
Game.sendMagicEffect({x = 32186, y = 31626, z = 08}, 3)
Game.sendMagicEffect({x = 32187, y = 31626, z = 08}, 3)
Game.sendMagicEffect({x = 32188, y = 31626, z = 08}, 3)
Game.sendMagicEffect({x = 32189, y = 31626, z = 08}, 3)
end
return true
end

View File

@ -0,0 +1,22 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32915, y = 32076, z = 06},388) then
Game.removeItemOnMap({x = 32915, y = 32076, z = 06}, 388)
Game.removeItemOnMap({x = 32915, y = 32080, z = 06}, 388)
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and not Game.isItemThere({x = 32915, y = 32076, z = 06}, 388) then
doRelocate({x = 32915, y = 32076, z = 06},{x = 32916, y = 32076, z = 06})
doRelocate({x = 32915, y = 32080, z = 06},{x = 32916, y = 32080, z = 06})
Game.createItem(388, 1, {x = 32915, y = 32076, z = 06})
Game.createItem(388, 1, {x = 32915, y = 32080, z = 06})
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32780, y = 32231, z = 08}, 389)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32780, y = 32231, z = 08},{x = 32780, y = 32232, z = 08})
Game.createItem(389, 1, {x = 32780, y = 32231, z = 08})
end
return true
end

View File

@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.removeItemOnMap({x = 32649, y = 32923, z = 08}, 1822)
Game.transformItemOnMap({x = 32649, y = 32923, z = 08}, 351, 385)
Game.transformItemOnMap({x = 32652, y = 32922, z = 08}, 2772, 2773)
elseif item:getId() == 2773 then
Game.transformItemOnMap({x = 32649, y = 32923, z = 08}, 385, 351)
Game.createItem(1822, 1, {x = 32649, y = 32923, z = 08})
Game.transformItemOnMap({x = 32652, y = 32922, z = 08}, 2773, 2772)
end
return true
end

View File

@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2774 and Game.isItemThere({x = 33151, y = 32866, z = 08},1345) then
Game.removeItemOnMap({x = 33151, y = 32866, z = 08}, 1345)
Game.sendMagicEffect({x = 33151, y = 32862, z = 07}, 14)
elseif item:getId() == 2774 then
Game.sendMagicEffect({x = 33151, y = 32862, z = 07}, 3)
end
return true
end

View File

@ -0,0 +1,42 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32614, y = 32209, z = 10},2523) then
Game.removeItemOnMap({x = 32614, y = 32209, z = 10}, 2523)
Game.removeItemOnMap({x = 32614, y = 32208, z = 10}, 1270)
doRelocate({x = 32614, y = 32209, z = 10},{x = 32614, y = 32208, z = 10})
Game.createItem(2523, 1, {x = 32614, y = 32208, z = 10})
Game.createItem(1270, 1, {x = 32614, y = 32209, z = 10})
Game.removeItemOnMap({x = 32614, y = 32206, z = 10}, 1791)
Game.removeItemOnMap({x = 32614, y = 32205, z = 10}, 1270)
Game.createItem(1810, 1, {x = 32614, y = 32204, z = 10})
Game.removeItemOnMap({x = 32614, y = 32221, z = 10}, 1270)
Game.removeItemOnMap({x = 32615, y = 32223, z = 10}, 1946)
Game.createItem(1796, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32615, y = 32221, z = 10})
Game.createItem(2124, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32613, y = 32220, z = 10})
Game.sendMagicEffect({x = 32613, y = 32220, z = 10}, 9)
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32613, y = 32220, z = 10}, 3050)
Game.createItem(1823, 1, {x = 32614, y = 32205, z = 10})
Game.createItem(1270, 1, {x = 32614, y = 32206, z = 10})
Game.sendMagicEffect({x = 32615, y = 32224, z = 10}, 16)
Game.sendMagicEffect({x = 32614, y = 32224, z = 10}, 16)
elseif item:getId() == 2772 then
doRelocate({x = 32614, y = 32209, z = 10},{x = 32613, y = 32209, z = 10})
Game.removeItemOnMap({x = 32614, y = 32221, z = 10}, 1270)
Game.removeItemOnMap({x = 32615, y = 32223, z = 10}, 1946)
Game.createItem(1796, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32615, y = 32221, z = 10})
Game.createItem(2124, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32613, y = 32220, z = 10})
Game.sendMagicEffect({x = 32613, y = 32220, z = 10}, 9)
Game.createItem(1270, 1, {x = 32614, y = 32209, z = 10})
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32613, y = 32220, z = 10}, 3050)
elseif item:getId() == 2773 then
Game.sendMagicEffect({x = 32616, y = 32222, z = 10}, 3)
end
return true
end

Some files were not shown because too many files have changed in this diff Show More