• 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 (alpha 1)

Status
Not open for further replies.
Nice Release, Cant Wait For Another Version
I have two questions...

1. Does this server contain the "New CM outfit?"

2. If I Import my NPC's to this, Everything should work? (From 0.2)
 
PHP:
[22/09/2008  19:27:42] Lua Script Error: [Npc interface] 
[22/09/2008  19:27:42] data/npc/scripts/runes.lua

[22/09/2008  19:27:42] luaGetItemName(). Item not found

[22/09/2008  19:27:42] Lua Script Error: [Npc interface] 
[22/09/2008  19:27:42] data/npc/scripts/runes.lua

UP
 
Nice Release, Cant Wait For Another Version
I have two questions...

1. Does this server contain the "New CM outfit?"

2. If I Import my NPC's to this, Everything should work? (From 0.2)

The "new CM outfit" isn't in the tibia.spr file so it couldn't exist...

Jo3
 
Last edited:
PHP:
[22/09/2008  19:27:42] Lua Script Error: [Npc interface] 
[22/09/2008  19:27:42] data/npc/scripts/runes.lua

[22/09/2008  19:27:42] luaGetItemName(). Item not found

[22/09/2008  19:27:42] Lua Script Error: [Npc interface] 
[22/09/2008  19:27:42] data/npc/scripts/runes.lua

UP

Are you using outdated script? Well, anyway replace 'getItemName' to 'getItemNameById'.
 
The "new CM outfit" isn't in the tibia.spr file so it couldn't exist...

Jo3
L0000L Rly ?

Nice Release, Cant Wait For Another Version
I have two questions...

1. Does this server contain the "New CM outfit?"

2. If I Import my NPC's to this, Everything should work? (From 0.2)

/newtype 266

How to set default CM outfit:
find in iologindata.cpp:
Code:
player->defaultOutfit.lookType = 75;
change to:
Code:
player->defaultOutfit.lookType = 266;
 
Last edited:
L0000L Rly ?



/newtype 266

How to set default CM outfit:
find in iologindata.cpp:
Code:
player->defaultOutfit.lookType = 75;
change to:
Code:
player->defaultOutfit.lookType = 266;

I'm pretty sure he was talking about the new GREEN cape outfit...which doesn't exist in the spr file yet. -.-

Jo3
 
[23/09/2008 07:38:05] Account Manager has logged in.
[23/09/2008 07:38:18] Account Manager has logged out.
[23/09/2008 07:38:23] Account Manager has logged in.
[23/09/2008 07:38:43] Account Manager has logged out.
[23/09/2008 07:38:49] Elite Lucao has logged in.
[23/09/2008 07:39:02] Elite Lucao has logged out.
[23/09/2008 07:39:02] sqlite3_step(): SQLITE ERROR: SQL logic error or missing database
[23/09/2008 07:39:02] sqlite3_step(): SQLITE ERROR: SQL logic error or missing database
[23/09/2008 07:39:02] sqlite3_step(): SQLITE ERROR: SQL logic error or missing database
[23/09/2008 07:39:02] sqlite3_step(): SQLITE ERROR: SQL logic error or missing database
[23/09/2008 07:39:02] sqlite3_step(): SQLITE ERROR: SQL logic error or missing database
[23/09/2008 07:39:02] Error while saving player: Elite Lucao

Please fix the bug that does not save the SQLite I tried to convert from MySQL to SQLite everything right but it converts the Xampp does not matter
 
Are you using outdated script? Well, anyway replace 'getItemName' to 'getItemNameById'.

NPC.xml
PHP:
<?xml version="1.0"?>
<npc name="Duran" script="data/npc/scripts/default.lua" walkinterval="0" floorchange="0">
	<mana now="800" max="800"/>
	<health now="200" max="200"/>
	<look type="128" head="20" body="100" legs="50" feet="99"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
		<parameter key="shop_buyable" value="parcel,2595,10;label,2599,5;letter,2597,10" />
	</parameters>
</npc>

Scripts/default.lua
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)        end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)        end
function onCreatureSay(cid, type, msg)    npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()                        npcHandler:onThink()                end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())



It has nothing different in my NPCs.
I looked inside the "libs" I found the following:
lib\npcsystem\modules.lua


PHP:
	function ShopModule:addBuyableItem(names, itemid, cost, subType, realName)
		if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then
			if(self.npcHandler.shopItems[itemid] == nil) then
				self.npcHandler.shopItems[itemid] = {buyPrice = 0, sellPrice = 0, subType = 0, realName = realName or getItemName(itemid)}
			end

			self.npcHandler.shopItems[itemid].buyPrice = cost
			self.npcHandler.shopItems[itemid].subType = subType or 0
		end
"self.npcHandler.shopItems[itemid] = {buyPrice = 0, sellPrice = 0, subType = 0, realName = realName or getItemName(itemid)}"

Thank you.
 
elf can u say me how to compile the sources to do that :"u can't spam magic wall on 0.2 mystic spirit version".i rly need it ...
 
NPC.xml
PHP:
<?xml version="1.0"?>
<npc name="Duran" script="data/npc/scripts/default.lua" walkinterval="0" floorchange="0">
	<mana now="800" max="800"/>
	<health now="200" max="200"/>
	<look type="128" head="20" body="100" legs="50" feet="99"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|."/>
		<parameter key="shop_buyable" value="parcel,2595,10;label,2599,5;letter,2597,10" />
	</parameters>
</npc>

Scripts/default.lua
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)        end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)        end
function onCreatureSay(cid, type, msg)    npcHandler:onCreatureSay(cid, type, msg)    end
function onThink()                        npcHandler:onThink()                end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())



It has nothing different in my NPCs.
I looked inside the "libs" I found the following:
lib\npcsystem\modules.lua


PHP:
	function ShopModule:addBuyableItem(names, itemid, cost, subType, realName)
		if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then
			if(self.npcHandler.shopItems[itemid] == nil) then
				self.npcHandler.shopItems[itemid] = {buyPrice = 0, sellPrice = 0, subType = 0, realName = realName or getItemName(itemid)}
			end

			self.npcHandler.shopItems[itemid].buyPrice = cost
			self.npcHandler.shopItems[itemid].subType = subType or 0
		end
"self.npcHandler.shopItems[itemid] = {buyPrice = 0, sellPrice = 0, subType = 0, realName = realName or getItemName(itemid)}"

Thank you.
Your data/npc/lib/npcsystem/modules.lua is outdated, from 0.2 I guess. It has changed alot, please update it.
 
Can someone say me how works the /attr command?
 
Status
Not open for further replies.
Back
Top