学着写LUA脚本(二)

来源:互联网 发布:苹果一键刷机软件 编辑:程序博客网 时间:2024/06/08 18:11

Player:GossipMenuAddItem( icon, msg, sender, intid )

Player:GossipMenuAddItem( icon, msg, sender, intid, code )

Player:GossipMenuAddItem( icon, msg, sender, intid, code, popup )

Player:GossipMenuAddItem( icon, msg, sender, intid, code, popup, money )

local buff = 2local function OnHello(event, player, creature)    player:GossipMenuAddItem(0, "Armor + 10%", buff, 23767)    player:GossipMenuAddItem(0, "Damage + 1 - 10%", buff, 23768)    player:GossipMenuAddItem(0, "Resistances + 25", buff, 23769)    player:GossipMenuAddItem(0, "Agility + 10%", buff, 23736)    player:GossipMenuAddItem(0, "Intelligence + 10%", buff, 23766)    player:GossipMenuAddItem(0, "Spirit + 10%", buff, 23738)    player:GossipMenuAddItem(0, "Strength + 10%", buff, 23735)    player:GossipMenuAddItem(0, "Stamina + 10%", buff, 23737)    player:GossipMenuAddItem(0, "Heal Me", buff, 25840)    player:GossipSendMenu(100, creature)endlocal function OnSelect(event, player, creature, id, intid, code)    if (id == buff) then        player:CastSpell(player, intid, true)    end    OnHello(event, player, creature)endRegisterCreatureGossipEvent(555000, 1, OnHello)RegisterCreatureGossipEvent(555000, 2, OnSelect)
0 0
原创粉丝点击