kjLotus wrote:it appears that you are unfamiliar with the language syntax of lua. i suggest you read a tutorial or read a book if you have questions on how to program in lua
http://www.lua.org/pil/contents.html
Code: Select all
-----------------------------------
-- Area: Norg
-- NPC: Andrause
-- Standard Info NPC
-----------------------------------
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:PrintToPlayer("Andrause: I can't help you right now.");
end
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
local count = player:addItem();
local prize = player:addItem(0);
local a1 = 0;
local a2 = 0;
local a3 = 0;
local a4 = 0;
local v1 = 0;
local v2 = 0;
local v3 = 0;
local v4 = 0;
player:addItem(16637);
if player:addItem(16637) then
a1 = 17,
v1 = 9
a2 = 18,
v2 = 9
a3 = 19,
v3 = 9
a4 = 20,
v4 = 9
end
if(player:getFreeSlotsCount() >= 1) then
player:addItemComplete();
player:addItem(prize,1,a1,v1,a2,v2,a3,v3,a4,v4);
player:messageSpecial(ITEM_OBTAINED,prize);
else
player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,prize);
end
end;
still cant get it to work, I'll do more reading. Thanks for link. If you can help though I'd appreciate it.