Jump to content
Sign in to follow this  
Rafael

Buff in Chat Handle

Recommended Posts

I need help, i m when i use the buff for chat handle no work! the buffs come but dont give stats, just with buff note, what i can do?

 

using with another NPC (together)
      Talk (15, "Im Buffer page, if you want buff, you need pay me 100k!.")
     Text (15, "Buff me!", buff)
     Text (15, "Nevermind", CloseTalk)

Chat Handle Function
------------------------

function buffnpc(role,message)
    local ret, npc = GetEudemon()
    local name = GetCharName(npc)
   
    if name == "System" then
        JumpPage(role, npc, NpcInfoList[15].page, 15)
    else
        JumpPage(role, npc, NpcInfoList[NpcInfoList.count].page, 15)

end

end

 

Function

------------------------

function buff (role)

local money = HasMoney (role, 100000)

if money == 0 then
SystemNotice (role, "Do you have enough gold!")
end


local StateType = GetChaStateLv (role, STATE_XLZH)
local StateType = GetChaStateLv (role, STATE_SHPF)
local StateType = GetChaStateLv (role, STATE_TSHD)
local StateType = GetChaStateLv (role, STATE_MLCH)
local StateType = GetChaStateLv (role, STATE_FZLZ)
if StateType == 0 then
AddState (role, role, STATE_XLZH, 10, 600)
AddState (role, role, STATE_SHPF, 10, 600)
AddState (role, role, STATE_TSHD, 10, 600)
AddState (role, role, STATE_MLCH, 10, 600)
AddState (role, role, STATE_FZLZ, 10, 600) 


TakeMoney (role, nil, 100000)
SystemNotice (role, "You are buffed!")

end
end

Edited by Rafael

Share this post


Link to post
Share on other sites
function HandleChat(role, message)
		if (string.find(message, "/buff") ~= nil) then
			buff(role)
		end
end

I guess it should work, not sure tho.

Edited by iZae
  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...