|
如何在烈焰私服里添加帮派召集令呢,这个物品起到什么作用呢?
这么说吧,此物品的用处在于可以第一时间内发出坐标,在帮派里喊话告知小伙伴你的地址,让小伙伴第一时间赶到现场助战!
那么该烈焰私服的帮派脚本要怎么写呢?请看下面代码:
--[[
1、脚本放在任意脚本目录即可
2、添加帮会召集令,items.data ,数据库items
3、默认物品ID 19200 如果冲突请修改
--]]
--[[
添加到items.data文件:
"19200": {
"entry": 19200,
"class": 0,
"subclass": 5,
"field4": "#FAD4D4",
"name1": "帮会召集令",
"displayid": 10100,
"quality": 1,
"flags": 0,
"flags2": 0,
"buyprice": 500000,
"sellprice": 500000,
"inventorytype": 0,
"allowableclass": 0,
"allowablerace": 0,
"itemlevel": 1,
"requiredlevel": 1,
"RequiredSkill": 0,
"RequiredSkillRank": 0,
"RequiredSpell": 0,
"RequiredPlayerRank1": 0,
"RequiredPlayerRank2": 0,
"RequiredFaction": 0,
"RequiredFactionStanding": 1,
"Unique": 0,
"maxcount": 0,
"ContainerSlots": -1,
"itemstatscount": 10,
"stat_type1": 0,
"stat_value1": 0,
"stat_type2": 0,
"stat_value2": 0,
"stat_type3": 0,
"stat_value3": 0,
"stat_type4": 0,
"stat_value4": 0,
"stat_type5": 0,
"stat_value5": 0,
"stat_type6": 0,
"stat_value6": 0,
"stat_type7": 0,
"stat_value7": 0,
"stat_type8": 0,
"stat_value8": 0,
"stat_type9": 0,
"stat_value9": 0,
"stat_type10": 0,
"stat_value10": 0,
"ScaledStatsDistributionId": 0,
"ScaledStatsDistributionFlags": 0,
"dmg_min1": 0,
"dmg_max1": 0,
"dmg_type1": 0,
"dmg_min2": 0,
"dmg_max2": 0,
"dmg_type2": 0,
"armor": 0,
"holy_res": 0,
"fire_res": 0,
"nature_res": 0,
"frost_res": 0,
"shadow_res": 0,
"arcane_res": 0,
"delay": 0,
"ammo_type": 0,
"range": 0,
"spellid_1": 0,
"spelltrigger_1": 0,
"spellcharges_1": 0,
"spellcooldown_1": 0,
"spellcategory_1": 0,
"spellcategorycooldown_1": 0,
"spellid_2": 0,
"spelltrigger_2": 0,
"spellcharges_2": 0,
"spellcooldown_2": 0,
"spellcategory_2": 0,
"spellcategorycooldown_2": 0,
"spellid_3": 0,
"spelltrigger_3": 0,
"spellcharges_3": 0,
"spellcooldown_3": 0,
"spellcategory_3": 0,
"spellcategorycooldown_3": 0,
"spellid_4": 0,
"spelltrigger_4": 0,
"spellcharges_4": 0,
"spellcooldown_4": 0,
"spellcategory_4": 0,
"spellcategorycooldown_4": 0,
"spellid_5": 0,
"spelltrigger_5": 0,
"spellcharges_5": 0,
"spellcooldown_5": 0,
"spellcategory_5": 0,
"spellcategorycooldown_5": 0,
"bonding": 0,
"description": "帮会管理人员使用<BR>召集全体在线帮会成员到使用者身边",
"page_id": 1,
"page_language": 99,
"page_material": 1,
"quest_id": 0,
"lock_id": 0,
"lock_material": 0,
"sheathID": 0,
"randomprop": 0,
"randomsuffix": 0,
"block": 0,
"itemset": 0,
"MaxDurability": 20,
"ZoneNameID": 0,
"mapid": 0,
"bagfamily": 0,
"TotemCategory": 0,
"socket_color_1": 0,
"unk201_3": 0,
"socket_color_2": 0,
"unk201_5": 0,
"socket_color_3": 0,
"unk201_7": 0,
"socket_bonus": 0,
"GemProperties": 0,
"ReqDisenchantSkill": -1,
"ArmorDamageModifier": 0,
"existingduration": 0,
"ItemLimitCategoryId": 0,
"HolidayId": 0,
"minphysicsattack": 0,
"maxphysicsattack": 0,
"minphysicsguard": 0,
"maxphysicsguard": 0,
"minspellattack": 0,
"maxspellattack": 0,
"minspellguard": 0,
"maxspellguard": 0,
"mintaoattack": 0,
"maxtaoattack": 0,
"duck": 0,
"right": 0,
"itemweight": 1,
"luck": 0,
"liferenew": 0,
"manarenew": 0,
"buybinggold": 0,
"sellbinggold": 0,
"buygoldmoney": 0,
"sellbinggoldmoney": 0,
"extrahurt": 0,
"extrarate": 0,
"recoverintervalue":0
},
数据库查询插入SQL语句:
INSERT INTO `items` (`entry`, `class`, `subclass`, `field4`, `name1`, `displayid`, `quality`, `flags`, `flags2`, `buyprice`, `sellprice`, `inventorytype`, `allowableclass`, `allowablerace`, `itemlevel`, `requiredlevel`, `RequiredSkill`, `RequiredSkillRank`, `RequiredSpell`, `RequiredPlayerRank1`, `RequiredPlayerRank2`, `RequiredFaction`, `RequiredFactionStanding`, `Unique`, `maxcount`, `ContainerSlots`, `itemstatscount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScaledStatsDistributionId`, `ScaledStatsDistributionFlags`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `range`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `page_id`, `page_language`, `page_material`, `quest_id`, `lock_id`, `lock_material`, `sheathID`, `randomprop`, `randomsuffix`, `block`, `itemset`, `MaxDurability`, `ZoneNameID`, `mapid`, `bagfamily`, `TotemCategory`, `socket_color_1`, `unk201_3`, `socket_color_2`, `unk201_5`, `socket_color_3`, `unk201_7`, `socket_bonus`, `GemProperties`, `ReqDisenchantSkill`, `ArmorDamageModifier`, `existingduration`, `ItemLimitCategoryId`, `HolidayId`, `minphysicsattack`, `maxphysicsattack`, `minphysicsguard`, `maxphysicsguard`, `minspellattack`, `maxspellattack`, `minspellguard`, `maxspellguard`, `mintaoattack`, `maxtaoattack`, `duck`, `right`, `itemweight`, `luck`, `liferenew`, `manarenew`, `buybinggold`, `sellbinggold`, `buygoldmoney`, `sellbinggoldmoney`, `extrahurt`, `extrarate`, `recoverintervalue`) VALUES ('19200', '0', '5', '0', '0', '10100', '1', '0', '0', '500000', '500000', '0', '0', '0', '1', '1', '0', '0', '0', '0', '0', '0', '1', '0', '0', '-1', '10', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '99', '1', '0', '0', '0', '0', '0', '0', '0', '0', '20', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '-1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
--]]
function item_19200(item,event,player) --帮会召集令
local bpg=player:get_guild(); --获取帮会地位
local bpn = player:GetGuildId(); --获取帮会ID
local pmapid = player:GetMapId(); --获取当前地图ID
local pmapx = player:GetX(); --获取当前X坐标
local pmapy = player:GetY(); --获取当前Y坐标
if bpg==100 or bpg==101 or bpg==102 then --判断是否为帮会管理人员100会长 101副会长 102长老
if pmapid==88 or pmapid==601 or pmapid==501 or pmapid==605 then --判断当前地图是否能使用召集令(自行修改,把前边的 -- 注释符号取消即可包括下边两行 --)
player:alert(110,0,0,"本地图不能使用召集令!");
return 1;
elseif pmapid==410 then
for k,v in pairs(GetPlayersInWorld()) do
if v:GetGuildId()==bpn and v:get_player_type()>=13 then
v:enter_map(pmapid,pmapx,pmapy);
end
end
g_alert(player:GetName().."在"..MapIdToMapName[pmapid].."("..pmapx..","..pmapy..")使用了帮派召集令,召集全体帮会成员,不知道想干啥坏事去了!",1,1000,0,1);
return 0;
elseif pmapid==430 then
for k,v in pairs(GetPlayersInWorld()) do
if v:GetGuildId()==bpn and v:get_player_type()>=15 then
v:enter_map(pmapid,pmapx,pmapy);
end
end
g_alert(player:GetName().."在"..MapIdToMapName[pmapid].."("..pmapx..","..pmapy..")使用了帮派召集令,召集全体帮会成员,不知道想干啥坏事去了!",1,1000,0,1);
return 0;
elseif pmapid==450 then
for k,v in pairs(GetPlayersInWorld()) do
if v:GetGuildId()==bpn and v:get_player_type()>=16 then
v:enter_map(pmapid,pmapx,pmapy);
end
end
g_alert(player:GetName().."在"..MapIdToMapName[pmapid].."("..pmapx..","..pmapy..")使用了帮派召集令,召集全体帮会成员,不知道想干啥坏事去了!",1,1000,0,1);
return 0;
else
for k,v in pairs(GetPlayersInWorld()) do
if v:GetGuildId()==bpn then
v:enter_map(pmapid,pmapx,pmapy);
end
end
g_alert(player:GetName().."在"..MapIdToMapName[pmapid].."("..pmapx..","..pmapy..")使用了帮派召集令,召集全体帮会成员,不知道想干啥坏事去了!",1,1000,0,1);
return 0;
end
else
player:alert(110,0,0,"您不是帮会管理人员,不能使用召集令!");
end
end
RegisterItemGossipEvent(19200,1,"item_19200")
|
|