Pydar npc (wrong)
function phoenix(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
local player_gold = getPlayerItemCount(cid,2148)
local player_plat = getPlayerItemCount(cid,2152)*100
local player_crys = getPlayerItemCount(cid,2160)*10000
local player_money = player_gold + player_plat + player_crys
if player_money >= 10000 then
if doPlayerRemoveMoney(cid,10000) and getPlayerStorageValue(cid,8888888) <= 1 and getPlayerBlessing(cid, 2) then
npcHandler:say('Here is your blessing!', cid)
setPlayerStorageValue(cid,8888888,-1)
doSendMagicEffect(getCreaturePos(cid), 12)
doPlayerAddBlessing(cid, 2)
end
else
npcHandler:say('Alright then.', cid)
end
if getPlayerStorageValue (cid,8888888) == -1 then
npcHandler:say('You have already blessed you with this blessing.', cid)
end
end
local node1 = keywordHandler:addKeyword({'phoenix'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here you may receive the blessing {Spark of Phoenix}. But we must ask of you to sacrifice 10000 gold coins. Are you still interested?.'})
node1:addChildKeyword({'yes'}, phoenix, {})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then.', reset = true})
npcHandler:addModule(FocusModule:new())
Kawill npc -> i need Npc kawill give storage. and NPC pydar look storage, remove storage, give bless and speak "you already have the blessing"
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler
nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler
nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler
nCreatureSay(cid, type, msg) end
function onThink() npcHandler
nThink() end
function phoenix(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerStorageValue(cid,8888888) <= -1 then
npcHandler:say('So receive the blessing of the life-giving earth, pilgrim.!', cid)
doSendMagicEffect(getCreaturePos(cid), 12)
setPlayerStorageValue(cid,8888888, 1)
end
if getPlayerStorageValue(cid,8888888) == 1 then
npcHandler:say('you already have the blessing.', cid)
end
end
keywordHandler:addKeyword({'bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here you may receive the blessing {Spark of The Phoenix}'})
local node1 = keywordHandler:addKeyword({'phoenix'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'The Spark of the Phoenix is given by name and by the great pyromancer in the nearby fire temple. Do you wish to receive my part of the Spark if the Phoenix? '})
node1:addChildKeyword({'yes'}, phoenix, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then.', reset = true})
npcHandler:addModule(FocusModule:new())
I have function in tfs 1.2x
i need function in tfs 0.4 ( used to hit invisible monster with sd or hmm rune )
function onCastSpell(cid, var, isHotkey)
if Tile(var:getPosition()):getTopCreature() then
return doCombat(cid, combat, var)
end
end
and I would also like to know how do I speak the password in the default chat without being blocked....
Can someone help me? I'm new here in the forum