• 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!

[8.4] The Forgotten Server v0.3 beta 2

Status
Not open for further replies.
Loool, what kind of inbred of a child spams the guy who's going to release the best ot otland.
If they spamed you for not releasing it, then they are really...
 
I got this message when i open the server :S "****" i wrote that because i get many and diffrent npc :S

[18/01/2009 02:11:56] luaGetItemName(). Item not found

[18/01/2009 02:11:56] Lua Script Error: [Npc interface]
[18/01/2009 02:11:56] data/npc/scripts/****.lua

Please can someone help me :S because i dont find GetItemById or something :S
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'stone skin amulet'}, 2197, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'stone skin amulet'}, 2197, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())

i dont know how i put it in like that "php code"
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'broken amulet'}, 2196, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())
try now

and use [CODE.] and [/CODE.] tags (without ".")
 
Code:
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

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'broken amulet'}, 2196, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())
 
I want TFS beta 3 Right now nananana, wish this now lalalala :x
Badly can wait for the release :D~~
 
I can't compile this on Ubuntu.
Code:
Makefile.am:10: *** brakujący separator. Stop.
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'broken amulet'}, 2196, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())
try now

and use [CODE.] and [/CODE.] tags (without ".")

i got the same error -.-
 
Corrected script @UP:
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandleronCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandleronCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandleronCreatureSay(cid, type, msg) end
function onThink() npcHandleronThink() end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'broken amulet'}, 2196, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())
 
OMG NOES CANT EDIT:
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandleronCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandleronCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandleronCreatureSay(cid, type, msg) end
function onThink() npcHandleronThink() end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'broken amulet'}, 2196, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())

Mod plx merge posts?
 
OMFG Again Error; Mod delete the posts and leave only this 1;
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'broken amulet'}, 2196, 1000, 'broken amulet')

shopModule:addBuyableItem({'stone skin amulet'}, 2197, 2000, 'stone skin amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 1000, 'elven amulet')
shopModule:addBuyableItem({'amulet of loss'}, 2173, 25000, 'amulet of loss')
shopModule:addBuyableItem({'red backpack'}, 2000, 10, 'red backpack')
shopModule:addBuyableItem({'machete'}, 2420, 50, 'machete')

shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 'bronze amulet')
shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 'silver amulet')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 'garlic necklace')
shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 'protection amulet')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 250, 'dragon necklace')
shopModule:addBuyableItem({'strange talisman'}, 2161, 250, 'strange talisman')
shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace')

npcHandler:addModule(FocusModule:new())
 
Status
Not open for further replies.
Back
Top