Rafael 0 Report post Posted May 21, 2017 (edited) 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 May 21, 2017 by Rafael Quote Share this post Link to post Share on other sites
iZae 55 Report post Posted May 22, 2017 (edited) function HandleChat(role, message) if (string.find(message, "/buff") ~= nil) then buff(role) end end I guess it should work, not sure tho. Edited May 22, 2017 by iZae 2 Quote Share this post Link to post Share on other sites