Can you say me just where i must it put?
I know how to make it, but in modules only or in global too?
Thanks for releasing the advanced one too..I'ts really nice.
Thanks man really help.
thanks, this is really helpful, i wish i could make so nice scripts by myself for my server :'(
keep trying an learning, 3 weaks ago i was an newbie in this
but now many people see me as the Npc's King
:thumbup:
i think u forgot the part in global.luathats true, just one question, is this version of code working in 0.2.6? i made all that you said in 1st post and i am getting this,
Lua Script Error: [Npc interface]
data/npc/scripts/sam.lua
data/npc/scripts/sam.lua:3: attempt to index global 'NpcSystem' (a nil value)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/sam.lua
i think u forgot the part in global.lua
i will try to make all things again, and i add added all in global
[COLOR="Red"]elseif[/COLOR](parameters.eventType == SHOPMODULE_BUY_CONTAINER) then
local msg = module.npcHandler:getMessage(MESSAGE_BUY)
msg = module.npcHandler:parseMessage(msg, parseInfo)
selfSay(msg)
shopModule:addBuyableItem({'sd'}, 2268, 200, 5, 'Sudden death')
shopModule:buyContainer({'bp sd'}, 2003, 2268, 4000, 5, 'Backpack of sudden death')
I can guess the answer but, what if I write this?
PHP:shopModule:addBuyableItem({'sd'}, 2268, 200, 5, 'Sudden death') shopModule:buyContainer({'bp sd'}, 2003, 2268, 4000, 5, 'Backpack of sudden death')
If I say bp sd, I won't get a bp, but just 1 sd. So, am I right if I think we cannot mix words from them?
Lua Script Error: [Npc interface]
data/npc/scripts/runas.lua:onCreatureSay
luaDoAddContainerItem(). Could not add item
Haha, i'v just checked and i forgot to add cap check/slot check
maybe you can update it ;p
and i give you rep + o/