Sentielo
Advanced OT User
- Joined
- Feb 3, 2008
- Messages
- 2,388
- Reaction score
- 226
Hej mates,
A few months ago I made a script for peoples which needed "a first wand/rod".
What does it do?
If you are a sorcerer or druid, and you say first wand (for sorcs) or first druid (for druids), than he will give you one time a free wand/rod .
But, this script isn't working for 8.4 anymore.
So could anybody paste his npc or remake this one?
The script for 8.4:
Thanks in advance,
Sentielo
A few months ago I made a script for peoples which needed "a first wand/rod".
What does it do?
If you are a sorcerer or druid, and you say first wand (for sorcs) or first druid (for druids), than he will give you one time a free wand/rod .
But, this script isn't working for 8.4 anymore.
So could anybody paste his npc or remake this one?
The script for 8.4:
Code:
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182}
if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then
if(isSorcerer(cid) or isDruid(cid)) then
if(getPlayerStorageValue(cid, 30002) == -1) then
selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid)
talkState[talkUser] = 1
else
selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid)
end
else
selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid)
end
elseif(msgcontains(msg, 'yes')) then
if(talkState[talkUser] == 1) then
doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1)
selfSay('Here you are young adept, take care yourself.', cid)
setPlayerStorageValue(cid, 30002, 1)
end
talkState[talkUser] = 0
elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then
selfSay('Ok then.', cid)
talkState[talkUser] = 0
end
return true
end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Thanks in advance,
Sentielo