• 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.54] The Forgotten Server 0.3.6pl1 (Crying Damson)

Always when i try to buy somethink.
Aslo npc dont take money and dont give me item.

Code:
[26/12/2009 05:50:36] [Error - Npc interface] 
[26/12/2009 05:50:36] (Unknown script file)
[26/12/2009 05:50:36] Description: 
[26/12/2009 05:50:36] data/npc/lib/npcsystem/modules.lua:1156: bad argument #2 to 'error' (number expected, got string)
[26/12/2009 05:50:36] stack traceback:
[26/12/2009 05:50:36] 	[C]: in function 'error'
[26/12/2009 05:50:36] 	data/npc/lib/npcsystem/modules.lua:1156: in function 'callbackOnBuy'
[26/12/2009 05:50:36] 	data/npc/lib/npcsystem/npchandler.lua:263: in function 'processModuleCallback'
[26/12/2009 05:50:36] 	data/npc/lib/npcsystem/npchandler.lua:440: in function 'onBuy'
[26/12/2009 05:50:36] 	data/npc/lib/npcsystem/modules.lua:1292: in function <data/npc/lib/npcsystem/modules.lua:1291>

What do you want to sell?

Can you post the NPC script?
 
What do you want to sell?

Can you post the NPC script?




Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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:addBuyableItem({'leather armor'}, 2467, 40, 'leather armor')
shopModule:addBuyableItem({'studded armor'}, 2484, 60, 'studded armor')
shopModule:addBuyableItem({'leather boots'}, 2643, 10, 'leather boots')
shopModule:addBuyableItem({'leather helmet'}, 2461, 10, 'leather helmet')
shopModule:addBuyableItem({'studded helmet'}, 2482, 20, 'studded helmet')
shopModule:addBuyableItem({'leather legs'}, 2649, 10, 'leather legs')
shopModule:addBuyableItem({'wooden shield'}, 2512, 12, 'wooden shield')
shopModule:addBuyableItem({'studded shield'}, 2526, 40, 'studded shield')
shopModule:addBuyableItem({'hand axe'}, 2380, 20, 'hand axe')
shopModule:addBuyableItem({'club'}, 2382, 5, 'club')
shopModule:addBuyableItem({'spear'}, 2389, 10, 'spear')
shopModule:addBuyableItem({'machete'}, 2420, 35, 'machete')


shopModule:addSellableItem({'leather armor'}, 2467, 10, 'leather armor')
shopModule:addSellableItem({'studded armor'}, 2484, 20, 'studded armor')
shopModule:addSellableItem({'doublet'}, 2485, 5, 'doublet')
shopModule:addSellableItem({'chain armor'}, 2464, 40, 'chain armor')
shopModule:addSellableItem({'brass armor'}, 2465, 150, 'brass armor')
shopModule:addSellableItem({'leather helmet'}, 2461, 3, 'leather helmet')
shopModule:addSellableItem({'studded helmet'}, 2482, 12, 'studded helmet')
shopModule:addSellableItem({'chain helmet'}, 2458, 17, 'chain helmet')
shopModule:addSellableItem({'wooden shield'}, 2512, 3, 'wooden shield')
shopModule:addSellableItem({'studded shield'}, 2526, 10, 'studded shield')
shopModule:addSellableItem({'plate shield'}, 2510, 25, 'plate shield')
shopModule:addSellableItem({'brass shield'}, 2511, 15, 'brass shield')
shopModule:addSellableItem({'hand axe'}, 2380, 4, 'hand axe')
shopModule:addSellableItem({'axe'}, 2386, 7, 'axe')
shopModule:addSellableItem({'hatchet'}, 2388, 25, 'hatchet')
shopModule:addSellableItem({'mace'}, 2398, 30, 'mace')
shopModule:addSellableItem({'studded club'}, 2448, 4, 'studded club')
shopModule:addSellableItem({'spear'}, 2389, 3, 'spear')
shopModule:addSellableItem({'sword'}, 2376, 25, 'sword')
shopModule:addSellableItem({'spike sword'}, 2383, 200, 'spike sword')
shopModule:addSellableItem({'rapier'}, 2384, 5, 'rapier')
shopModule:addSellableItem({'sabre'}, 2385, 12, 'sabre')


function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end

	return true
end

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


I can selling, buy i can't buy anythink from this NPC
This is the another NPC what works correctly
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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:addBuyableItem({'magic lightwand'}, 2163, 200, 'magic lightwand')

shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion')
shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion')
shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion')

shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask')

shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'fireball'}, 2302, 90, 4, 'fireball rune')

shopModule:addBuyableItemContainer({'bp slhp'}, 2000, 8704, 400, 1, 'backpack of small health potions')
shopModule:addBuyableItemContainer({'bp hp'}, 2000, 7618, 900, 1, 'backpack of health potions')
shopModule:addBuyableItemContainer({'bp mp'}, 2001, 7620, 1000, 1, 'backpack of mana potions')
shopModule:addBuyableItemContainer({'bp ap'}, 2002, 8474, 2000, 1, 'backpack of antidote potions')

shopModule:addSellableItem({'dead rabbit', 'rabbit'}, 3119, 2, 'dead rabbit')
shopModule:addSellableItem({'dead wolf', 'wolf'}, 3086, 5, 'dead wolf')
shopModule:addSellableItem({'dead rat', 'rat'}, 2813, 2, 'dead rat')

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	return true
end

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

I no see differnts ;/
 
the browse source isnt working, sometimes opens empty window and sometimes looks like binary file in notepad
 
some one knows whay this spell dont cause any damage in this version ?

local scom1 = createCombatObject()
local scom2 = createCombatObject()



local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 36)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, -10.1, -110, -10.3, -110)



local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 0)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, -10, -110, -10.3, -110)

arr1 = {
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}
}



arr2 = {
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)

function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end
setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
return TRUE
end
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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:addBuyableItem({'leather armor'}, 2467, 40, 'leather armor')
shopModule:addBuyableItem({'studded armor'}, 2484, 60, 'studded armor')
shopModule:addBuyableItem({'leather boots'}, 2643, 10, 'leather boots')
shopModule:addBuyableItem({'leather helmet'}, 2461, 10, 'leather helmet')
shopModule:addBuyableItem({'studded helmet'}, 2482, 20, 'studded helmet')
shopModule:addBuyableItem({'leather legs'}, 2649, 10, 'leather legs')
shopModule:addBuyableItem({'wooden shield'}, 2512, 12, 'wooden shield')
shopModule:addBuyableItem({'studded shield'}, 2526, 40, 'studded shield')
shopModule:addBuyableItem({'hand axe'}, 2380, 20, 'hand axe')
shopModule:addBuyableItem({'club'}, 2382, 5, 'club')
shopModule:addBuyableItem({'spear'}, 2389, 10, 'spear')
shopModule:addBuyableItem({'machete'}, 2420, 35, 'machete')


shopModule:addSellableItem({'leather armor'}, 2467, 10, 'leather armor')
shopModule:addSellableItem({'studded armor'}, 2484, 20, 'studded armor')
shopModule:addSellableItem({'doublet'}, 2485, 5, 'doublet')
shopModule:addSellableItem({'chain armor'}, 2464, 40, 'chain armor')
shopModule:addSellableItem({'brass armor'}, 2465, 150, 'brass armor')
shopModule:addSellableItem({'leather helmet'}, 2461, 3, 'leather helmet')
shopModule:addSellableItem({'studded helmet'}, 2482, 12, 'studded helmet')
shopModule:addSellableItem({'chain helmet'}, 2458, 17, 'chain helmet')
shopModule:addSellableItem({'wooden shield'}, 2512, 3, 'wooden shield')
shopModule:addSellableItem({'studded shield'}, 2526, 10, 'studded shield')
shopModule:addSellableItem({'plate shield'}, 2510, 25, 'plate shield')
shopModule:addSellableItem({'brass shield'}, 2511, 15, 'brass shield')
shopModule:addSellableItem({'hand axe'}, 2380, 4, 'hand axe')
shopModule:addSellableItem({'axe'}, 2386, 7, 'axe')
shopModule:addSellableItem({'hatchet'}, 2388, 25, 'hatchet')
shopModule:addSellableItem({'mace'}, 2398, 30, 'mace')
shopModule:addSellableItem({'studded club'}, 2448, 4, 'studded club')
shopModule:addSellableItem({'spear'}, 2389, 3, 'spear')
shopModule:addSellableItem({'sword'}, 2376, 25, 'sword')
shopModule:addSellableItem({'spike sword'}, 2383, 200, 'spike sword')
shopModule:addSellableItem({'rapier'}, 2384, 5, 'rapier')
shopModule:addSellableItem({'sabre'}, 2385, 12, 'sabre')


function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end

	return true
end

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


I can selling, buy i can't buy anythink from this NPC
This is the another NPC what works correctly
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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:addBuyableItem({'magic lightwand'}, 2163, 200, 'magic lightwand')

shopModule:addBuyableItem({'small health'}, 8704, 20, 1, 'small health potion')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion')
shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion')
shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 1, 'antidote potion')

shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask')

shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'fireball'}, 2302, 90, 4, 'fireball rune')

shopModule:addBuyableItemContainer({'bp slhp'}, 2000, 8704, 400, 1, 'backpack of small health potions')
shopModule:addBuyableItemContainer({'bp hp'}, 2000, 7618, 900, 1, 'backpack of health potions')
shopModule:addBuyableItemContainer({'bp mp'}, 2001, 7620, 1000, 1, 'backpack of mana potions')
shopModule:addBuyableItemContainer({'bp ap'}, 2002, 8474, 2000, 1, 'backpack of antidote potions')

shopModule:addSellableItem({'dead rabbit', 'rabbit'}, 3119, 2, 'dead rabbit')
shopModule:addSellableItem({'dead wolf', 'wolf'}, 3086, 5, 'dead wolf')
shopModule:addSellableItem({'dead rat', 'rat'}, 2813, 2, 'dead rat')

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	return true
end

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

I no see differnts ;/

The rune/wand seller was bugged for me.
You can't buy wands/rods using TRADE window.
 
I fix all my npc problens using /npc/lib from 0.3.5 and npcs too.

this spell dont do damage in last version , someone knows whow to fix ?

some one knows whay this spell dont cause any damage in this version ?

local scom1 = createCombatObject()
local scom2 = createCombatObject()



local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 36)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, -10.1, -110, -10.3, -110)



local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 0)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatFormula(combat2, COMBAT_FORMULA_SKILL, -10, -110, -10.3, -110)

arr1 = {
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}
}



arr2 = {
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)

function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end
setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
return TRUE
end
 
animated dead and undead legion spells doesnt work

[26/12/2009 21:54:51] Lua Script Error: [Spell Interface]
[26/12/2009 21:54:51] data/spells/scripts/summon/animate dead rune.lua:eek:nCastSpell

[26/12/2009 21:54:51] luaDoConvinceCreature(). Creature not found
 
@andu:
Change:
Code:
local creature = doCreateMonster(cid, "Skeleton", pos)
doConvinceCreature(cid, creature)

To:
Code:
doConvinceCreature(cid, doCreateMonster("Skeleton", pos))

In ./data/spells/scripts/summon/animate dead rune.lua
 
elf, my kaspersky found a Trojan at Crying Damson, look the log

Kaspersky
Internet Security 2010
ACESSO NEGADO
Não foi possível recuperar o URL solicitado

Ao tentar recuperar o URL:

http://www6.speedy*****malware.localhost/data/
633718469/19960796/99495381/force/
cryingdamson6pl1-gui.7z

Foi encontrada a seguinte ameaça:

O objeto solicitado está INFECTADO pelos seguintes vírus: Trojan.Win32.Delf.slc
 
I fixed my problem above, Whe i changed connection ip to 127.0.0.1 i could login, but when i use my global ip, it cant connect,
I have opened port 80 for apache and 7171 for tibia. It still dosent work!

I have no clue why...
It works on 127.0.0.1 but not my global..
 
Back
Top