Can you post a npc / action script so i can edit them for you. Haven't used 0.3.6 in a while so i don't have any on my comp.
Regards Alw
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Pentas" script="data/npc/scripts/Pentas.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="128" head="79" body="10" legs="127" feet="127" addons="1"/>
<voices>
<voice text="Petros is here for help." interval2="100" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="message_farewell" value="Good bye. Recommend us if you were satisfied with our service." />
<parameter key="message_walkaway" value="Good bye. Recommend us if you were satisfied with our service." />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="name;darashia;job;" />
<parameter key="keyword_reply1" value="My name is Petros from the Royal Tibia Line." />
<parameter key="keyword_reply2" value="Ohh. i don't work as a ship captain any more now I work as one from the quest helpers like helping you or something" />
<parameter key="keyword_reply2" value="I left my old work as a ship captain in darashia due to a rich company bought all the boats in {Tibia} but now i got a nice job helping people to give them advices about the famous quest {Inquisition} and give them rewards for helping thiere town of the attacks of the monsters in Teuana" />
<parameter key="message_greet" value="Welcome on board, |PLAYERNAME|. What should I help you with?"/>
</parameters>
</npc>
doPlayerSetStorageValue(uid, key, newValue)
getPlayerStorageValue(uid, key)
I just stripped down the npc rune scriptCan you post a npc / action script so i can edit them for you. Haven't used 0.3.6 in a while so i don't have any on my comp.
Regards Alw
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 playerMsg = 'something'
local playerStorage = 30000
local valueToSet = 1
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, playerMsg) and getPlayerStorageValue(cid, playerStorage) <= 0 then
selfSay('Here ya go!', cid)
doPlayerSetStorageValue(cid, playerStorage, valueToSet)
else
selfSay('Storage value already set :(!', cid)
talkState[talkUser] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())