• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

The Forgotten Server v0.3 beta 1

Status
Not open for further replies.
What is this:

l.jpg


PK Rabit? ;>

omg omg its hugo he rlly is the demonbunny run run run no1 is safe anymore


Code:
[ CHANGELOG
	Project Name
		The Forgotten Server

	Version
		0.3 Beta 1

	Codenamed
		\

	License
		GNU GPLv3

	Forum
		http://otland.net/
]

[ File changes:
	D = Deleted,
	M = Modified,
	A = Added.

	A...
		data/
			actions/
				scripts/
					liquids/
						*.lua
							* Added liquids files
							* Added potions of 8.2 protocol
					tools/
						blessed_wooden_stake.lua
						obsidian_knife.lua
							* Added

					other/
						stuffeddragon.lua
							* Added as example of position param for doCreatureSay function
						highscores.lua
							* Added due to hardcoded highscores function deprecation

			creaturescripts/
				scripts/
					firstitems.lua
						* Moved first items script to creature events instead of move events

			globalevents/
				globalevents.xml
				lib/
				scripts/
					* Introduced global events
				scripts/
					*.lua
						* Added basic scripts
			lib/
				data.lua
				constant.lua
				function.lua
				compat.lua
				database.lua
				exhaustion.lua
					* Added files created from global.lua (organized)
				
			logs/
				server/
					* Created directory for GUI logs

			monsters/
				*/*.xml
					* Added most of 8.1 protocol monsters
					* Added missing monsters and bosses
					* Added few monsters of procotol 8.2
					* Added alot of protocol 8.3 monsters

			npc/
				*.xml
				lib/
					*.xml
						* Lightweight npc examples
				scripts/
					*.lua
						* Added more NPC's examples

			talkactions/
				scripts/
					shutdown.lua
					pvp.lua
						* Talkaction based on new LUA function
					position.lua
					money.lua
						* Talkaction deprecated from commands
					online.lua
					clean.lua
					broadcast.lua
						* Talkaction based on new LUA function, deprecated from commands
					broadcastclass.lua
					mode.lua
					multicheck.lua
					masskick.lua
						* Added (...)
					buypremium.lua
						* File name change
					*.lua
						* Deprecated commands

			weapons/
				scripts/
					burst_arrow.lua
						* Moved explosive_arrow.lua

			XML/
				servers.xml
					* GameServers class usage example

	M...
		data/
			actions/
				scripts/
					tools/
						fishing.lua
							* Fixed worms usage
						rope.lua
							* Protocol 8.2 rope spots
					other/
						constructionkits.lua
							* Fixed construction kits
						doors.lua
							* Fixed special doors
							* Fixed disappearing doors
					liquids/
						containers.lua
							* Fixed few issues of fluids
						mastermind_potion.lua
							* Fixed issue with not working condition

			creaturescripts/
				creaturescripts.xml
					* Moved first items script to creature events instead of move events
				scripts/
					playerdeath.lua
						* Updated due to changed escapeString return

			items/
				items.xml
					* Fixed formatting
					* Corrected alot of attribute values
					* Corrected alot of item names
					* Compatibility with protocol 8.22
					* Compatibility with OTBv3
					* Fixed construction kits
				items.otb
					* Compatibility with protocol 8.22
					* Compatibility with OTBv3

			lib/
				function.lua
					* Fixes and optimializations

			monster/
				monsters.xml
					* Added most 8.1 monsters
					* Added some 8.2 monsters
				*/*.xml
					* Fixed loots, voices, formating and introduced elemental weakness

			movements/
				movements.xml
					* Added swimming system
					* Moved first items script to creature events instead of move events
					* Added protocol 8.1 elemental armory with limitations
					* Added protocol 8.2 elemental armory with limitations
					* Fixed protocol 8.2 elemental armory due to OTBv3 update
					* Added items requiring vocation, level or magic level
					* Added 'shield'/'hand' slot
				scripts/
					swimming/
						*.lua
							* Added swimming system

			npc/
				*.xml
					* Lightweight npc compatibility
				lib/
					npc.lua
						* Protocol 8.22 npcsystem compatibility
						* Fixed some functions and added keyword tables support for 'msgcontains' function
					npcsystem/
						* Full protocol 8.31 npcsystem
				scripts/
					*.lua
						* 8.31 npcsystem compatibility

			spells/
				lib/
					spells.lua
						* Added all new corpses to the CORPSES array
						* Fixed some spell areas
				scripts/
					*.lua
						* Fixes
					support/
						magic rope.lua
							* Protocol 8.2 rope spots
						desintegrade rune.lua
							* Fixed issue with possibility of removing items from depots when standing outside depot
				spells.xml
					* Added "exhaustion=" back to spells.xml
					* Charges and names fixed
					* Fixed spell range
					* Fixed exhaustions

			talkactions/
				talkactions.xml
					* Added all the new talkactions
					* Added new access system tags (access="")
					* Added log="" tags responsible for talkaction logging
					* Added hardcoded functions
				scripts/
					*.lua
						* Removed permission checking from access needing talkactions
						* Fixed return values
						* Fixes regarding params
						* Fixed all talkactions, added access and ghost checks
					changesex.lua
						* Updated due to deprecated LUA function
						* Added a check for gratis premium account
					deathlist.lua
						* Updated due to changed escapeString return

			world/
				*.xml
				forgotten.otbm
					* Placed some NPC's on the map
					* Updated to OTBv3
					* Re-added spawns file

			XML/
				stages.xml
					* Deprecated configuration and moved to config.lua

				servers.xml
					* Changed 'ip' tag to 'address'

	D...
		data/
			global.lua
				* Moved to lib/ directory

			actions/
				scripts/
					fluids.lua
					potions.lua
						* New liquids system

			movements/
				scripts/
					firstitems.lua
						* Moved first items script to creature events instead of move events

			talkactions/
				scripts/
					buyprem.lua
						* Renamed

			weapons/
				scripts/
					explosive_arrow.lua
						* Renamed
]

[ Milestone
	[ Note
		Some of the features were added to Mystic Spirit (0.2) due popularity of them.
	]

	Always up-to-date with OpenTibia branch, Avesta, changes (*)
	Alot new configurables (*)
	Replaced config manager values (mostly strings) used as booleans with new, boolean type (Elf, Talaturen)
	White skull time configurable on config.lua (Talaturen)
	Time to decrease frags on config.lua (Talaturen)
	Added most of monsters of protocol 8.1 and some of 8.2 (OpenTibia SVN, Lithium)
	Attackspeed for items in items.xml (Talaturen)
	Basespeed in vocations.xml (Talaturen)
	onLook(cid, pos) creaturescript event (Talaturen)
	/pvp command to change worldtype (Talaturen)
	/goto command (/goto x y z) (Talaturen)
	Configurable level to form guild (Talaturen)
	Replaced party system with the party system from OpenTibias avesta branch (Talaturen)
	Added more NPC's and placed in the map (Lithium, Elf)
	Swimming system (Lithium, OpenTibia SVN)
	Global Storage values saving in database (Elf, OpenTibia SVN)
	Configurable level to buy and sell house (Elf)
	Configurable amount (0 to disable) of houses per each account (Elf)
	/send command (/send player, x y z) (Elf)
	Configurable permission for talkactions in talkactions.xml (Elf)
	Ingame guild management 'switch' on config.lua (Elf)
	House buying and selling disabling on config.lua (Elf)
	Namelock Manager while Account Manager is disabled configurable in config.lua (Elf)
	Dropped LuaSQL and replaced with LuaDatabase (Elf, OpenLua-Distro)
	onKill(cid, target) creaturescript event (Elf)
	onAdvance(cid, skill, oldlevel, newlevel) creaturescript event (Elf)
	onThink creaturescript event for creatures (Elf)
	onThink and onLook events aren't fired global anymore (Elf)
	/squelch command to disable private messages receiving (Elf)
	Dropped account types and replaced it with access levels (Elf, Talaturen)
	Custom flags system (Elf, Talaturen)
	Possibility to move items from far, push not pushable items and throw items anywhere (nfries88, Elf)
	Configurable commands and talkactions logging (Elf)
	Ghost Mode [with disabled effects] (Pedro B, Elf)
	Cascading actions (Elf, OpenTibia SVN)
	Rewritten ban class (Elf, Talaturen, OpenTibia SVN)
	/baninfo command (Elf)
	Advanced /unban command (Talaturen, Elf)
	Bank system (OpenTibia SVN, Elf)
	Stamina system (Elf)
	Moved players record and motd to database (Elf)
	Moved CTRL + Z bug reports to database, written /reports command (Elf)
	Lighweight NPC system (Talaturen, OpenTibia SVN)
	OTBv3 (OpenTibia SVN, Talaturen, Elf)
	Monsters with elemental weaknesses (Marcinek Paladinek, Lithium)
	Marriage 'system' (Elf)
	Construction kits (Elf)
	Global events (Elf)
	Thing attribute changing (Kiper)
	onAttack creaturescript (Elf)
	Database Manager - http://otland.net/f123/built-database-manager-12642/ (Talaturen)
	Autotools (Talaturen)
	Filesystem Hierarchy Standard (Kiper)
	Promotion levels (Kiper, Talaturen, Elf)
	Account names (Elf)
	Full protocol 8.31 NPC Shop window behaviour (Elf)
	Group outfits (Elf)
	Mapclick teleportation (Kiper)
	MySQL keepalive for servers with timeout (Elf)
	isValidName working Tibia-like (Talaturen)
	Skulls and Shields for NPCs and Monsters (Elf)
	doPlayerAddExperience supporting negative values (Elf)
	House Kick supporting wildcards (Elf)
	Deprecated most possible commands and rewritten them in Lua (Elf)
	Raids position may be now stored under one tag, which will be exploded- *x"="10" *y="10" *z="7"; can be now added as *pos="10;10;7" (Elf)
	Merged Commands class with TalkActions, hardcoded commands may be now used as functions (Elf)
	House information being stored at database, houses table (Elf)
	onDeath event has now also new parameter- creature, that did most damage to dying creature (Elf)
	New icon! ;-) (Macroman)
	DescriptionHideLevel flag replaced with HideLevel, which is used now also for hiding player level in chat (Elf)
	Signal handler, basic control signals (Elf, Kiper)
	Revamped talkactions- more errors printing, more checks, more compatibility (Elf)
	New Quest System and core support of it (Elf)
	getClosestFreeTile function bumps - possibility to check does destination tile belongs to a house and extended position addon (Elf)
	Spell parameters working as in Tibia (Elf)
	Quest outfits (Elf)
	NPC descriptions (Elf)
	New onPrepareDeath creature event- no overflows and FALSE return denies death (Elf)
	onStatsChange creature event (Elf)
	Player and Global Storage now supports strings as values (Elf)
	Deprecated hardcoded highscores function and rewritten as Lua function (Elf)
]

[ Deprecated
	[ Note
		All deprecated Lua functions are stored in compat.lua and use their equivalents, nevertheless please use proper ones for new scripts.
	]

	LuaFunction: savePlayers(), use saveData().
	LuaFunction: doPlayerAddMana(cid, mana), use doCreatureAddMana(cid, mana)
	LuaFunction: broadcastMessage(cid, type), use doBroadcastMessage(cid, type)
	LuaFunction: getPlayerPosition(cid), use getCreaturePosition(cid)
	LuaFunction: getPlayerName(cid), use getCreatureName(cid)
	LuaFunction: getCreaturePos(cid) [fake], use getCreaturePosition(cid)
	LuaFunction: saveData(), use saveServer()
	LuaFunction: doPlayerRemovePremiumDays(cid, days), use: doPlayerAddPremiumDays(cid, -days) [negative values]
	LuaFunction: doPlayerRemOutfit(cid, looktype, addons), use: doPlayerRemoveOutfit(cid, looktype, addons)
	LuaFunction: doSetCreatureDropLoot(cid, doDrop), use: doCreatureSetDropLoot(cid, doDrop)
	LuaFunction: doPlayerAddManaSpent(cid, mana), use: doPlayerAddSpentMana(cid, amount)
	LuaFunction: getPromotedVocation(vocId), use: getVocationInfo(id).promotedVocation
]

[ Fixed issues with...
	House warnings (OpenTibia SVN, Elf)
	High CPU usage (Everyone, OpenTibia SVN)
	Skill loss and item drop in [pvp-]zone area (Talaturen, Elf, OpenTibia SVN)
	Bed sleepers not being loaded (Elf)
	Items with 0 charges acting infinite (Elf, Kiper)
	Blessings (Talaturen, Elf)
	Crash when saving non-existing VIP (Elf)
	Huge writables crash-ability (Elf)
	Custom item attributes not displayed and/or crashing server (Elf)
	No timestamp in __GUI_LOGS__ (Elf)
	Item absorb abilities (Elf, OpenTibia SVN, Gesior)
	House Doors not being updated when player changes name (Elf)
	MySQL reconnecting- dirty way... (Elf)
	Brackets not being removed from publicized NPC speak (Elf)
	Old protocols support (OpenTibia SVN, Elf)
	Waterpolo Ball being removed from Trasholder (Elf)
	Account Manager variables and return values (Elf)
	Healing damage being displayed for Ghost player (Elf)
	GUI logs date being saved unpropperly (Elf)
	spellNameInsteadOfWords configurable working properly (Elf)
	Shop goods being constantly updated no matter was it item or creature at post* (Elf)
	BuyContainer fix (Elf, Gesior)
	Guild name not being validated when creating guild (Elf)
	Liquids issue (Elf)
	No possibility to logout without account name and password when Account Manager was enabled (Elf)
	Unaccurate conditions length (Elf, OpenTibia SVN)
	Players being unable to throw items at borders (Elf, OpenTibia SVN)
]

well its sorta far from the beginning of the thread but here is the change log
 
ERROR 1064 (42000) at line 282: You have an error in your SQL syntax; check the manual that corresp onds to your MySQL server version for the right syntax to use near 'TINYIT(2) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`count`' at line 4

While importing database :/
 
Last edited:
Stuiped question -_-

Whats the talk action for ip ban, i dont see it in the talkactions.xml and ive tried /B /b /ban and nothin has worked. A little help please
 
I passed al alpha 4 to this and just changed some functions and working 99%, just the highscores book isnt working =(
 
go to actions.xml and replace highscorebook.lua with highscores.lua
 
I did... I reloaded talkactions, I restarted server, but seems that it isnt working :S
 
ERROR 1064 (42000) at line 282: You have an error in your SQL syntax; check the manual that corresp onds to your MySQL server version for the right syntax to use near 'TINYIT(2) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`count`' at line 4

While importing database :/


change:

TINYIT

for TINYINT

BTW:


Code:
CREATE  TABLE  `tile_items` ( `tile_id` INT NOT  NULL ,
 `sid` INT NOT  NULL ,
 `pid` INT NOT  NULL DEFAULT  0,
 `itemtype` INT NOT  NULL ,
 `count` INT NOT  NULL DEFAULT  0,
 `attributes` BLOB NOT  NULL ,
 KEY (  `sid`  ) ,
 FOREIGN  KEY (  `tile_id`  )  REFERENCES  `tiles` (  `id`  )  ON  DELETE  CASCADE 
) ENGINE  = InnoDB;

           [B]MySQL ha dicho: [/B][URL="http://dev.mysql.com/doc/refman/5.0/es/error-messages-server.html"][IMG]http://localhost/phpmyadmin/themes/original/img/b_help.png[/IMG][/URL] 
  #1005 - Can't create table '.\tfs\tile_items.frm' (errno: 150)

o_O using latest phpMyAdmin
 
Last edited:
how do i use monster skulls? nothing shows up when i fight monsters..
 
1.- How does onStatsChange(cid, attacker, type, combat, value) work?
2.- I know this is not new, but how do the the 'player' variable in doSendMagicEffect works?
3.- How does getSearchString(fromPosition, toPosition[, isPlayer]) work?
4.- How does quest outfit work?
 
Last edited:
Awesome :D
Thx.

PD:
A rabbit red skull is very funny xDDDDD
 
How does onStatsChange(cid, attacker, type, combat, value) work?

type = HEALTHGAIN, HEALTHLOSS, MANAGAIN, MANALOSS

combat = NONE, PHYSICALDAMAGE, ENERGYDAMAGE, EARTHDAMAGE, FIREDAMAGE, UNDEFINEDDAMAGE, LIFEDRAIN, MANADRAIN, HEALING, DROWNDAMAGE, ICEDAMAGE, HOLYDAMAGE, DEATHDAMAGE

So maybe something like this:
In creaturescripts.xml
Code:
<event type="statschange" name="xxxx" script="xxxx.lua" />
Then our script
Code:
onStatsChange(cid, attacker, type, combat, value)
    if isPlayer(cid) == TRUE and isCreature(attacker) == TRUE then
        if combat == COMBAT_LIFEDRAIN and type == HEALTHGAIN then
            doPlayerBroadcastMessage(cid, 'wtf! is that possible?')
        end
    end
end

*EDIT* - Thanks elf I forgot, put COMBAT_ at the beginning of each combat type. (ie. COMBAT_NONE)

Jo3
 
Last edited:
@up lol

rabbit.xml

use this: <flag skull="white"/>


<?xml version="1.0" encoding="UTF-8"?>
<monster name="rabbit" nameDescription="a rabbit" race="blood" experience="0" speed="180" manacost="220">
<health now="15" max="15"/>
<look type="74" head="20" body="30" legs="40" feet="50" corpse="6017"/>
<targetchange interval="5000" chance="20"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="1"/>
<flag attackable="1"/>
<flag hostile="0"/>
<flag illusionable="1"/>
<flag convinceable="1"/>
<flag pushable="1"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="15"/>
<flag skull="white"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="0" attack="0"/>
</attacks>
<defenses armor="1" defense="2"/>
<immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity poison="0"/>
<immunity lifedrain="0"/>
<immunity paralyze="0"/>
<immunity outfit="0"/>
<immunity drunk="0"/>
<immunity invisible="0"/>
</immunities>
<loot>
<item id="2684" countmax="4" chance1="70000" chancemax="0"/>
<item id="2666" countmax="2" chance1="20000" chancemax="0"/>
</loot>
</monster>

nice ;>
 
lol ok
btw <flag shield="1-10"/> for shields..

what is the point with those skulls rly? :p
 
you quoted my post but forgot to answer it I think :p

the bug is that it takes a storage for a string...

PHP:
    -- if he did not make full arena 1 he must start from zero
    if getPlayerStorageValue(cid, 42309) < 1 then

ERROR:
PHP:
[01/12/2008 00:27:28] Lua Script Error: [CreatureScript Interface]  
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua nLogin 

[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: attempt to compare string with number 
[01/12/2008 00:27:28] stack traceback: 
[01/12/2008 00:27:28]     data/creaturescripts/scripts/login.lua:12: in function <data/creaturescripts/scripts/login
I've answered to two posts one time.
Well, I've just tested storage values, and working fine for me :blink:

What is this:

l.jpg


PK Rabit? ;>

Thats an example of skull usage, Kornholijo commited it.

Check this thing (Exausted in distance weapons and not weapons Melee)
Alpha 4. Not passing it

Because only distance weapons interrupt swing.

EDIT: bah, i know now whats with storage ;)
 
@Tufte:

<flag skull="white"/> for skull ( monster or npc. add this flag )

btw. white/green/red/yelow
 
1.- How does onStatsChange(cid, attacker, type, combat, value) work?
2.- I know this is not new, but how do the the 'player' variable in doSendMagicEffect works?
3.- How does getSearchString(fromPosition, toPosition[, isPlayer]) work?
4.- How does quest outfit work?

1. As Jo3 said, but COMBAT_ before fe COMBAT_LIFEDRAIN
2. doSendMagicEffect(getCreaturePosition(elf), CONST_ME_POFF, elf) will display effect only to creature with cid = elf
3. doPlayerSendTextMessage(cid, 22, "Treasure is " .. getSearchString(getCreaturePosition(cid), {x = 500, y = 500, z = 7}) will return something like: "Treasure is to north-east." or "Treasure is above you.".
4. There's an example in outfits.xml for Archdemon outfit, you put quest="storageId", where storageId is key which should player have set to '1' in storage.
 
Status
Not open for further replies.
Back
Top