alguem poderia coloca nesse script de npc que vende bless para vender todas as bless como uma so tipo all bless, e colocar para so player premium comprar bless
com uma msg ex: You not have(Premium account)!
local config ={--[bless]= preços [5]={"Blessing",500000}}local keywordHandler =KeywordHandler:new()local npcHandler =NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)local talkState ={}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid)endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid)endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg)endfunction onThink() npcHandler:onThink()endfunction creatureSayCallback(cid, type, msg)ifnot npcHandler:isFocused(cid)thenreturnfalseendlocal talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and0or cid for k, v in pairs(config)doif v[1]:lower():find(msg:lower())then selfSay("You are sure?", cid) talkState[talkUser]= k endif msgcontains(msg:lower(),"yes")thenif talkState[talkUser]== k thenifnot getPlayerBlessing(cid, k)thenif doPlayerRemoveMoney(cid, v[2])then doPlayerAddBlessing(cid, k) selfSay("You received the bless ".. v[1]:gsub("The ","",1).."!", cid) doSendMagicEffect(getThingPos(cid),10)else selfSay("You no have money.", cid)endelse selfSay("You have ".. v[1]..".", cid)end talkState[talkUser]=0endendendif msgcontains(msg:lower(),"no")and talkState[talkUser]>=1then selfSay("Bye!!", cid) talkState[talkUser]=0endreturntrueendnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new())
<?xml version="1.0" encoding="UTF-8"?><npcname="Blessed Tapion"script="bless.lua"walkinterval="2000"floorchange="0"><healthnow="100"max="100"/><looktype="557"head="20"body="39"legs="45"feet="7"addons="0"/><parameters><parameterkey="message_greet"value="I am here to bless you, say {bless}."/><parameterkey="message_farewell"value="Good bye, |PLAYERNAME|!"/><parameterkey="message_idletimeout"value="Good bye, |PLAYERNAME|!"/></parameters></npc>
Pergunta
Kirsch 18
alguem poderia coloca nesse script de npc que vende bless para vender todas as bless como uma so tipo all bless, e colocar para so player premium comprar bless
com uma msg ex: You not have(Premium account)!
Link para o comentário
Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados