Rizz
Quited with Tibia/OT
http://otland.net/f312/lucia-list-items-you-can-get-17300/#post175832
Lucia.lua
Lucia.xml
Mainly just for fun.
The messages are from 'Famous Swedish Lucia Songs'.
Lucia.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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return FALSE
end
present = getPlayerStorageValue(cid, 67003)
chance = math.random(1, 500)
if msgcontains(msg, 'present') then
if present == -1 then
if (chance == 1) then
doPlayerAddItem(cid, 2361, 1)
elseif (chance >= 2 and chance <= 100) then
doPlayerAddItem(cid, 2162, 1)
elseif (chance >= 101 and chance <= 200) then
doPlayerAddItem(cid, 2048, 1)
elseif (chance >= 201 and chance <= 300) then
doPlayerAddItem(cid, 2044, 1)
elseif (chance >= 301 and chance <= 400) then
doPlayerAddItem(cid, 2041, 1)
elseif (chance >= 401 and chance <= 500) then
doPlayerAddItem(cid, 2050, 1)
end
setPlayerStorageValue(cid, 67003, 1)
selfSay('Tand mina vita ljus!')
end
end
return 1
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Lucia.xml
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lucia" script="data/npc/scripts/lucia.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<look type="138" head="0" body="0" legs="94" feet="0" addons="2"/>
<parameters>
<parameter key="message_greet" value="Da i vart morka hus stiger med tanda ljus."/>
<parameter key="message_farewell" value="Se pa var troskel star vitkladd med ljus i har." />
<parameter key="message_placedinqueue" value="Wait please." />
<parameter key="message_walkaway" value="Se pa var troskel star vitkladd med ljus i har." />
<parameter key="message_idletimeout" value="Se pa var troskel star vitkladd med ljus i har." />
</parameters>
</npc>
Mainly just for fun.
The messages are from 'Famous Swedish Lucia Songs'.