repo_name stringlengths 6 69 | path stringlengths 6 178 | copies stringclasses 278 values | size stringlengths 4 7 | content stringlengths 671 917k | license stringclasses 15 values |
|---|---|---|---|---|---|
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/player/construction/construction_player_house_naboo_small_style_02.lua | 3 | 2410 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_building_player_construction_construction_player_house_naboo_small_style_02 = object_building_player_construction_shared_construction_player_house_naboo_small_style_02:new {
gameObjectType = 4096
}
ObjectTemplates:addTemplate(object_building_player_construction_construction_player_house_naboo_small_style_02, "object/building/player/construction/construction_player_house_naboo_small_style_02.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c41722932.lua | 9 | 1352 | --ダーク・ジェノサイド・カッター
function c41722932.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c41722932.condition)
e1:SetTarget(c41722932.target)
e1:SetOperation(c41722932.activate)
c:RegisterEffect(e1)
end
function c41722932.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
end
function c41722932.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c41722932.cfilter,tp,LOCATION_MZONE,0,3,nil)
end
function c41722932.filter(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c41722932.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c41722932.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c41722932.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c41722932.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c41722932.activate(e)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/loot/items/wearables/shoes/shoes_s07.lua | 4 | 1242 | shoes_s07 = {
-- Sandals
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/shoes/shoes_s07.iff",
craftingValues = {},
skillMods = {},
customizationStringNames = {"/private/index_color_1","/private/index_color_2"},
customizationValues = {
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119},
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119}
},
junkDealerTypeNeeded = JUNKCLOTHESANDJEWELLERY,
junkMinValue = 35,
junkMaxValue = 70
}
addLootItemTemplate("shoes_s07", shoes_s07) | agpl-3.0 |
Whitechaser/darkstar | scripts/zones/Bastok_Mines/npcs/Parraggoh.lua | 5 | 2063 | -----------------------------------
-- Area: Bastok Mines
-- NPC: Parraggoh
-- Finishes Quest: Beauty and the Galka
-----------------------------------
package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/quests");
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/zones/Bastok_Mines/TextIDs");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
BeautyAndTheGalka = player:getQuestStatus(BASTOK,BEAUTY_AND_THE_GALKA);
BeautyAndTheGalkaDenied = player:getVar("BeautyAndTheGalkaDenied");
PalboroughMinesLogs = player:hasKeyItem(2);
if (PalboroughMinesLogs == true) then
player:startEvent(10);
elseif (BeautyAndTheGalka == QUEST_ACCEPTED) then
Message = math.random(0,1);
if (Message == 1) then
player:startEvent(8);
else
player:startEvent(9);
end
elseif (BeautyAndTheGalkaDenied == 1) then
player:startEvent(7);
elseif (BeautyAndTheGalka == QUEST_COMPLETED) then
player:startEvent(12);
else
player:startEvent(11);
end
end;
function onEventUpdate(player,csid,option)
-- printf("CSID2: %u",csid);
-- printf("RESULT2: %u",option);
end;
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if (csid == 7 and option == 0) then
player:addQuest(BASTOK,BEAUTY_AND_THE_GALKA);
elseif (csid == 10) then
FreeSlots = player:getFreeSlotsCount();
if (FreeSlots >= 1) then
player:completeQuest(BASTOK,BEAUTY_AND_THE_GALKA);
player:setVar("BeautyAndTheGalkaDenied",0);
player:delKeyItem(PALBOROUGH_MINES_LOGS);
player:addFame(BASTOK,75);
player:addItem(16465);
player:messageSpecial(ITEM_OBTAINED,16465);
else
player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,16465);
end
end
end;
| gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_patron_ishi_tib_01.lua | 3 | 2220 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_dressed_patron_ishi_tib_01 = object_mobile_shared_dressed_patron_ishi_tib_01:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_patron_ishi_tib_01, "object/mobile/dressed_patron_ishi_tib_01.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/weapon/ranged/creature/creature_spit_particle_beam.lua | 1 | 4121 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_weapon_ranged_creature_creature_spit_particle_beam = object_weapon_ranged_creature_shared_creature_spit_particle_beam:new {
playerRaces = {},
-- RANGEDATTACK, MELEEATTACK, FORCEATTACK, TRAPATTACK, GRENADEATTACK, HEAVYACIDBEAMATTACK,
-- HEAVYLIGHTNINGBEAMATTACK, HEAVYPARTICLEBEAMATTACK, HEAVYROCKETLAUNCHERATTACK, HEAVYLAUNCHERATTACK
attackType = RANGEDATTACK,
-- ENERGY, KINETIC, ELECTRICITY, STUN, BLAST, HEAT, COLD, ACID, FORCE, LIGHTSABER
damageType = ENERGY,
-- NONE, LIGHT, MEDIUM, HEAVY
armorPiercing = NONE,
-- combat_rangedspecialize_bactarifle, combat_rangedspecialize_rifle, combat_rangedspecialize_pistol, combat_rangedspecialize_heavy, combat_rangedspecialize_carbine
-- combat_meleespecialize_unarmed, combat_meleespecialize_twohand, combat_meleespecialize_polearm, combat_meleespecialize_onehand, combat_general,
-- combat_meleespecialize_twohandlightsaber, combat_meleespecialize_polearmlightsaber, combat_meleespecialize_onehandlightsaber
xpType = "combat_general",
-- See http://www.ocdsoft.com/files/certifications.xls
certificationsRequired = { },
-- See http://www.ocdsoft.com/files/accuracy.xls
creatureAccuracyModifiers = { "unarmed_accuracy" },
-- See http://www.ocdsoft.com/files/defense.xls
defenderDefenseModifiers = { "ranged_defense" },
-- can be dodge, counterattack, or block or a combination
-- Secondary defense when equipped
defenderSecondaryDefenseModifiers = { "dodge" },
-- See http://www.ocdsoft.com/files/speed.xls
speedModifiers = { "unarmed_speed" },
-- Leave blank for now
damageModifiers = { },
-- The values below are the default values. To be used for blue frog objects primarily
healthAttackCost = 0,
actionAttackCost = 0,
mindAttackCost = 0,
forceCost = 0,
pointBlankAccuracy = -5,
pointBlankRange = 0,
idealRange = 15,
idealAccuracy = 7,
maxRange = 45,
maxRangeAccuracy = -15,
minDamage = 50,
maxDamage = 150,
attackSpeed = 2.0,
woundsRatio = 5,
}
ObjectTemplates:addTemplate(object_weapon_ranged_creature_creature_spit_particle_beam, "object/weapon/ranged/creature/creature_spit_particle_beam.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c60953118.lua | 3 | 2814 | --アルカナフォースXIV-TEMPERANCE
function c60953118.initial_effect(c)
--no damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60953118,1))
e1:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c60953118.damcon)
e1:SetCost(c60953118.damcost)
e1:SetOperation(c60953118.damop)
c:RegisterEffect(e1)
--coin
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60953118,0))
e2:SetCategory(CATEGORY_COIN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c60953118.cointg)
e2:SetOperation(c60953118.coinop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c60953118.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetBattleDamage(tp)>0
end
function c60953118.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c60953118.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetOperation(c60953118.dop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c60953118.dop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,0)
end
function c60953118.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c60953118.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c60953118.arcanareg(c,res)
end
function c60953118.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetCondition(c60953118.rdcon1)
e1:SetValue(c60953118.rdval)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetTargetRange(0,1)
e2:SetCondition(c60953118.rdcon2)
c:RegisterEffect(e2)
c:RegisterFlagEffect(36690018,RESET_EVENT+0x1ff0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c60953118.rdcon1(e)
return e:GetHandler():GetFlagEffectLabel(36690018)==1
end
function c60953118.rdcon2(e)
return e:GetHandler():GetFlagEffectLabel(36690018)==0
end
function c60953118.rdval(e,re,val,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 then
return val/2
else
return val
end
end
| gpl-2.0 |
DailyShana/ygopro-scripts | c26949946.lua | 5 | 2886 | --幻獣機ヤクルスラーン
function c26949946.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x101b),aux.NonTuner(Card.IsSetCard,0x101b),1)
c:EnableReviveLimit()
--handes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26949946,0))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c26949946.hdcon)
e1:SetCost(c26949946.hdcost)
e1:SetTarget(c26949946.hdtg)
e1:SetOperation(c26949946.hdop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c26949946.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(26949946,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c26949946.setcon)
e4:SetTarget(c26949946.settg)
e4:SetOperation(c26949946.setop)
c:RegisterEffect(e4)
end
function c26949946.hdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c26949946.hdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,31533705)
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,ct,nil,31533705)
e:SetLabel(g:GetCount())
Duel.Release(g,REASON_COST)
end
function c26949946.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,e:GetLabel())
end
function c26949946.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
local sg=g:RandomSelect(1-tp,e:GetLabel())
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
end
function c26949946.indtg(e,c)
return c:IsSetCard(0x101b) and c~=e:GetHandler()
end
function c26949946.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetPreviousControler()==tp
end
function c26949946.filter(c)
return c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsSSetable()
end
function c26949946.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c26949946.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c26949946.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c26949946.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
| gpl-2.0 |
Whitechaser/darkstar | scripts/zones/Kazham/npcs/Bubupp.lua | 5 | 2959 | -----------------------------------
-- Area: Kazham
-- NPC: Bubupp
-- Standard Info NPC
-----------------------------------
package.loaded["scripts/zones/Kazham/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Kazham/TextIDs");
-----------------------------------
function onTrade(player,npc,trade)
-- item IDs
-- 483 Broken Mithran Fishing Rod
-- 22 Workbench
-- 1008 Ten of Coins
-- 1157 Sands of Silence
-- 1158 Wandering Bulb
-- 904 Giant Fish Bones
-- 4599 Blackened Toad
-- 905 Wyvern Skull
-- 1147 Ancient Salt
-- 4600 Lucky Egg
local OpoOpoAndIStatus = player:getQuestStatus(OUTLANDS, THE_OPO_OPO_AND_I);
local progress = player:getVar("OPO_OPO_PROGRESS");
local failed = player:getVar("OPO_OPO_FAILED");
local goodtrade = trade:hasItemQty(904,1);
local badtrade = (trade:hasItemQty(483,1) or trade:hasItemQty(22,1) or trade:hasItemQty(1008,1) or trade:hasItemQty(1157,1) or trade:hasItemQty(1158,1) or trade:hasItemQty(4599,1) or trade:hasItemQty(905,1) or trade:hasItemQty(1147,1) or trade:hasItemQty(4600,1));
if (OpoOpoAndIStatus == QUEST_ACCEPTED) then
if progress == 5 or failed == 6 then
if goodtrade then
player:startEvent(224);
elseif badtrade then
player:startEvent(234);
end
end
end
end;
function onTrigger(player,npc)
local OpoOpoAndIStatus = player:getQuestStatus(OUTLANDS, THE_OPO_OPO_AND_I);
local progress = player:getVar("OPO_OPO_PROGRESS");
local failed = player:getVar("OPO_OPO_FAILED");
local retry = player:getVar("OPO_OPO_RETRY");
if (OpoOpoAndIStatus == QUEST_ACCEPTED) then
if retry >= 1 then -- has failed on future npc so disregard previous successful trade
player:startEvent(202);
elseif (progress == 5 or failed == 6) then
player:startEvent(211); -- asking for giant fish bones
elseif (progress >= 6 or failed >= 7) then
player:startEvent(247); -- happy with giant fish bones
end
else
player:startEvent(202);
end
end;
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if (csid == 224) then -- correct trade, onto next opo
if player:getVar("OPO_OPO_PROGRESS") == 5 then
player:tradeComplete();
player:setVar("OPO_OPO_PROGRESS",6);
player:setVar("OPO_OPO_FAILED",0);
else
player:setVar("OPO_OPO_FAILED",7);
end
elseif (csid == 234) then -- wrong trade, restart at first opo
player:setVar("OPO_OPO_FAILED",1);
player:setVar("OPO_OPO_RETRY",6);
end
end;
| gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/attachment/weapon/kse_firespray_weapon2_s06.lua | 3 | 2316 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_ship_attachment_weapon_kse_firespray_weapon2_s06 = object_tangible_ship_attachment_weapon_shared_kse_firespray_weapon2_s06:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_attachment_weapon_kse_firespray_weapon2_s06, "object/tangible/ship/attachment/weapon/kse_firespray_weapon2_s06.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/naboo/swamp_rat.lua | 1 | 1136 | swamp_rat = Creature:new {
objectName = "@mob/creature_names:swamp_rat",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "swamp_rat",
faction = "swamp_rat",
level = 10,
chanceHit = 0.27,
damageMin = 90,
damageMax = 110,
baseXp = 430,
baseHAM = 675,
baseHAMmax = 825,
armor = 0,
resists = {0,0,0,0,0,0,10,-1,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = ATTACKABLE + AGGRESSIVE + ENEMY,
creatureBitmask = PACK + KILLER + STALKER,
diet = HERBIVORE,
templates = {"object/mobile/dressed_swamp_rat.iff"},
lootGroups = {
{
groups = {
{group = "junk", chance = 5500000},
{group = "rifles", chance = 1000000},
{group = "melee_weapons", chance = 1000000},
{group = "carbines", chance = 1000000},
{group = "pistols", chance = 1000000},
{group = "loot_kit_parts", chance = 500000}
}
}
},
weapons = {"pirate_weapons_medium"},
reactionStf = "@npc_reaction/slang",
attacks = merge(marksmannovice,brawlernovice)
}
CreatureTemplates:addCreatureTemplate(swamp_rat, "swamp_rat")
| agpl-3.0 |
DailyShana/ygopro-scripts | c37104630.lua | 3 | 1617 | --海皇の重装兵
function c37104630.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(c37104630.extg)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(37104630,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c37104630.descon)
e2:SetTarget(c37104630.destg)
e2:SetOperation(c37104630.desop)
c:RegisterEffect(e2)
end
function c37104630.extg(e,c)
return c:IsLevelBelow(4) and c:IsRace(RACE_SEASERPENT)
end
function c37104630.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():IsAttribute(ATTRIBUTE_WATER)
end
function c37104630.desfilter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c37104630.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c37104630.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c37104630.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c37104630.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/loot/loot_schematic/throwpillow_schematic.lua | 2 | 2601 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_loot_loot_schematic_throwpillow_schematic = object_tangible_loot_loot_schematic_shared_throwpillow_schematic:new {
templateType = LOOTSCHEMATIC,
objectMenuComponent = {"cpp", "LootSchematicMenuComponent"},
attributeListComponent = "LootSchematicAttributeListComponent",
requiredSkill = "crafting_artisan_domestic_01",
targetDraftSchematic = "object/draft_schematic/furniture/furniture_throwpillow.iff",
targetUseCount = 1,
}
ObjectTemplates:addTemplate(object_tangible_loot_loot_schematic_throwpillow_schematic, "object/tangible/loot/loot_schematic/throwpillow_schematic.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/furniture/all/frn_all_lamp_tbl_s02.lua | 3 | 2260 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_furniture_all_frn_all_lamp_tbl_s02 = object_tangible_furniture_all_shared_frn_all_lamp_tbl_s02:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_lamp_tbl_s02, "object/tangible/furniture/all/frn_all_lamp_tbl_s02.iff")
| agpl-3.0 |
Whitechaser/darkstar | scripts/zones/Sacrificial_Chamber/Zone.lua | 5 | 1155 | -----------------------------------
--
-- Zone: Sacrificial_Chamber (163)
--
-----------------------------------
package.loaded["scripts/zones/Sacrificial_Chamber/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/globals/missions");
require("scripts/zones/Sacrificial_Chamber/TextIDs");
-----------------------------------
function onInitialize(zone)
end;
function onConquestUpdate(zone, updatetype)
local players = zone:getPlayers();
for name, player in pairs(players) do
conquestUpdate(zone, player, updatetype, CONQUEST_BASE);
end
end;
function onZoneIn(player,prevZone)
local cs = -1;
if (player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0) then
player:setPos(316.848,-2.182,340.03,125);
end
return cs;
end;
function onRegionEnter(player,region)
end;
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
| gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/hair/human/hair_human_male_s28.lua | 3 | 2244 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_hair_human_hair_human_male_s28 = object_tangible_hair_human_shared_hair_human_male_s28:new {
}
ObjectTemplates:addTemplate(object_tangible_hair_human_hair_human_male_s28, "object/tangible/hair/human/hair_human_male_s28.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/dungeon/corellian_corvette/corvette_search_rebel_destroy_03.lua | 3 | 2360 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_dungeon_corellian_corvette_corvette_search_rebel_destroy_03 = object_tangible_dungeon_corellian_corvette_shared_corvette_search_rebel_destroy_03:new {
}
ObjectTemplates:addTemplate(object_tangible_dungeon_corellian_corvette_corvette_search_rebel_destroy_03, "object/tangible/dungeon/corellian_corvette/corvette_search_rebel_destroy_03.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/components/booster/bst_sorosuub_liberator_mk3.lua | 3 | 2324 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_ship_components_booster_bst_sorosuub_liberator_mk3 = object_tangible_ship_components_booster_shared_bst_sorosuub_liberator_mk3:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_components_booster_bst_sorosuub_liberator_mk3, "object/tangible/ship/components/booster/bst_sorosuub_liberator_mk3.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/ship/hutt_light_s01.lua | 3 | 2164 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_ship_hutt_light_s01 = object_ship_shared_hutt_light_s01:new {
}
ObjectTemplates:addTemplate(object_ship_hutt_light_s01, "object/ship/hutt_light_s01.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_stormtrooper_m.lua | 3 | 2204 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_dressed_stormtrooper_m = object_mobile_shared_dressed_stormtrooper_m:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_stormtrooper_m, "object/mobile/dressed_stormtrooper_m.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/corellia/drall_abbot.lua | 2 | 1054 | drall_abbot = Creature:new {
objectName = "@mob/creature_names:drall_abbot",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "drall",
faction = "drall",
level = 15,
chanceHit = 0.31,
damageMin = 160,
damageMax = 170,
baseXp = 831,
baseHAM = 2400,
baseHAMmax = 3000,
armor = 0,
resists = {0,0,0,0,0,0,0,-1,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = ATTACKABLE,
creatureBitmask = PACK,
optionsBitmask = 128,
diet = HERBIVORE,
templates = {
"object/mobile/drall_male.iff",
"object/mobile/drall_female.iff"},
lootGroups = {
{
groups = {
{group = "junk", chance = 7000000},
{group = "loot_kit_parts", chance = 2000000},
{group = "tailor_components", chance = 1000000}
}
}
},
weapons = {"pirate_weapons_medium"},
conversationTemplate = "",
reactionStf = "@npc_reaction/military",
attacks = merge(brawlermid,marksmanmid)
}
CreatureTemplates:addCreatureTemplate(drall_abbot, "drall_abbot")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/screenplays/tasks/corellia/ging_darjeek.lua | 1 | 2254 | ging_darjeek_missions =
{
{
missionType = "retrieve",
primarySpawns =
{
{ npcTemplate = "professor_minnet", planetName = "corellia", npcName = "\"Professor\" Minnet" }
},
secondarySpawns = {},
itemSpawns =
{
{ itemTemplate = "object/tangible/mission/quest_item/ging_darjeek_q1_needed.iff", itemName = "Minnet's Permit Data" }
},
rewards =
{
{ rewardType = "credits", amount = 1000 }
}
},
{
missionType = "escort",
primarySpawns =
{
{ npcTemplate = "sivrool_linnaie", planetName = "corellia", npcName = "Siv'rool Linnaie" }
},
secondarySpawns =
{
{ npcTemplate = "thug", planetName = "corellia", npcName = "a thug" },
{ npcTemplate = "thug", planetName = "corellia", npcName = "a thug" }
},
itemSpawns = {},
rewards =
{
{ rewardType = "credits", amount = 1000 }
}
},
{
missionType = "assassinate",
primarySpawns =
{
{ npcTemplate = "thug", planetName = "corellia", npcName = "Listening Post Guy" }
},
secondarySpawns =
{
{ npcTemplate = "smuggler", planetName = "corellia", npcName = "a smuggler" },
{ npcTemplate = "smuggler", planetName = "corellia", npcName = "a smuggler" },
{ npcTemplate = "smuggler", planetName = "corellia", npcName = "a smuggler" },
{ npcTemplate = "smuggler", planetName = "corellia", npcName = "a smuggler" }
},
itemSpawns = {},
rewards =
{
{ rewardType = "credits", amount = 1500 }
}
}
}
npcMapGingDarjeek =
{
{
spawnData = { planetName = "corellia", npcTemplate = "ging_darjeek", x = -24.6629, z = -0.519991, y = 6.12104, direction = -112, cellID = 3375365, position = STAND },
worldPosition = { x = 6708, y = -5783 },
npcNumber = 1,
stfFile = "@static_npc/corellia/ging_darjeek",
missions = ging_darjeek_missions
}
}
GingDarjeek = ThemeParkLogic:new {
numberOfActs = 1,
npcMap = npcMapGingDarjeek,
className = "GingDarjeek",
screenPlayState = "ging_darjeek_quest",
distance = 800
}
registerScreenPlay("GingDarjeek", true)
ging_darjeek_mission_giver_conv_handler = mission_giver_conv_handler:new {
themePark = GingDarjeek
}
ging_darjeek_mission_target_conv_handler = mission_target_conv_handler:new {
themePark = GingDarjeek
} | agpl-3.0 |
Whitechaser/darkstar | scripts/globals/regimeinfo.lua | 35 | 13239 | -------------------------------------------------
--
-- Regime Info Database
--
-- Stores details on the number of monsters to kill
-- as well as the suggested level range.
-- n1,n2,n3,n4 = Number of monsters needed
-- sl = Start Level range
-- el = Level range
--
-- Example:
-- n1=6, n2=0, n3=0, n4=0, sl=1, el=6, Regime ID=1, produces:
-- Defeat the following monsters:
-- 6 Worms
-- Level range 1 ~ 6
-- Area: West Ronfaure
-------------------------------------------------
function getRegimeInfo(regimeid)
local regimeinfo = {
[1] = {6,0,0,0,1,6},
[2] = {6,0,0,0,2,6},
[3] = {5,1,0,0,4,7},
[4] = {4,2,0,0,4,8},
[5] = {3,3,0,0,8,12},
[6] = {8,0,0,0,12,13},
[7] = {7,1,0,0,15,19},
[8] = {6,2,0,0,15,22},
[9] = {5,3,0,0,18,23},
[10] = {4,4,0,0,20,23},
[11] = {9,0,0,0,21,22},
[12] = {8,1,0,0,21,23},
[13] = {7,2,0,0,22,25},
[14] = {6,3,0,0,24,25},
[15] = {4,3,0,0,25,28},
[16] = {6,0,0,0,1,6},
[17] = {6,0,0,0,3,6},
[18] = {5,1,0,0,3,7},
[19] = {4,2,0,0,3,8},
[20] = {3,3,0,0,10,12},
[21] = {9,0,0,0,20,21},
[22] = {8,1,0,0,20,22},
[23] = {7,2,0,0,21,23},
[24] = {6,3,0,0,22,25},
[25] = {4,3,0,0,25,28},
[26] = {6,0,0,0,1,5},
[27] = {6,0,0,0,2,5},
[28] = {5,1,0,0,3,8},
[29] = {4,2,0,0,4,8},
[30] = {3,3,0,0,7,12},
[31] = {8,0,0,0,11,13},
[32] = {7,1,0,0,15,19},
[33] = {6,2,0,0,15,23},
[34] = {5,3,0,0,20,24},
[35] = {4,4,0,0,21,24},
[36] = {9,0,0,0,20,21},
[37] = {8,1,0,0,20,22},
[38] = {7,2,0,0,21,23},
[39] = {6,3,0,0,22,25},
[40] = {4,3,0,0,25,28},
-- Regime between 41-50
[41] = {9,1,0,0,26,29},
[42] = {8,2,0,0,26,29},
[43] = {7,3,0,0,28,29},
[44] = {6,4,0,0,28,30},
[45] = {5,4,1,0,28,34},
[46] = {9,2,0,0,34,38},
[47] = {8,3,0,0,34,39},
[48] = {7,4,0,0,37,42},
[49] = {6,4,1,0,37,43},
[50] = {5,4,2,0,40,43},
[51] = {9,3,0,0,42,46},
[52] = {8,4,0,0,42,45},
[53] = {7,4,1,0,42,48},
[54] = {6,4,2,0,42,48},
[55] = {5,4,3,0,45,52},
[56] = {6,1,0,0,4,8},
[57] = {4,2,0,0,22,25},
[58] = {8,2,0,0,15,18},
[59] = {3,4,0,0,3,8},
[60] = {5,4,1,0,22,25},
[61] = {4,2,0,0,4,8},
[62] = {4,3,0,0,22,27},
[63] = {3,5,0,0,25,27},
[64] = {6,0,0,0,1,5},
[65] = {6,0,0,0,2,5},
[66] = {7,0,0,0,2,6},
[67] = {4,2,0,0,3,6},
[68] = {4,2,0,0,4,8},
[69] = {3,5,0,0,11,13},
[70] = {5,3,0,0,11,14},
[71] = {5,3,0,0,10,15},
[72] = {5,2,0,0,23,26},
[73] = {5,2,0,0,23,28},
[74] = {5,2,2,0,26,32},
[75] = {9,0,0,0,31,32},
[76] = {6,0,0,0,1,6},
[77] = {7,0,0,0,2,5},
[78] = {3,3,0,0,3,6},
[79] = {7,0,0,0,3,6},
[80] = {5,2,0,0,4,8},
[81] = {4,2,0,0,8,11},
[82] = {4,2,0,0,9,12},
[83] = {6,0,0,0,9,15},
[84] = {2,2,2,0,12,14},
[85] = {5,2,0,0,25,26},
[86] = {6,2,0,0,26,32},
[87] = {6,2,0,0,27,33},
[88] = {5,0,0,0,36,37},
[89] = {6,0,0,0,1,6},
[90] = {6,0,0,0,1,8},
-- Regime 91-100
[91] = {6,0,0,0,2,6},
[92] = {4,2,0,0,3,6},
[93] = {4,3,0,0,3,6},
[94] = {4,2,0,0,7,11},
[95] = {3,3,0,0,8,12},
[96] = {3,4,0,0,12,16},
[97] = {4,4,0,0,26,32},
[98] = {2,5,0,0,26,34},
[99] = {3,5,0,0,27,33},
[100] = {5,3,0,0,36,38},
[101] = {3,2,0,0,41,44},
[102] = {3,2,0,0,41,46},
[103] = {3,2,0,0,43,47},
[104] = {4,4,0,0,62,66},
[105] = {4,5,0,0,64,68},
[106] = {4,5,0,0,64,69},
[107] = {7,3,0,0,66,74},
[108] = {4,5,0,0,71,79},
[109] = {10,0,0,0,30,34},
[110] = {3,1,7,0,35,40},
[111] = {3,1,7,0,35,44},
[112] = {5,2,2,1,44,49},
[113] = {3,3,2,1,45,49},
[114] = {7,2,0,0,40,44},
[115] = {7,3,0,0,41,46},
[116] = {7,3,0,0,41,46},
[117] = {7,3,0,0,42,47},
[118] = {3,5,0,0,44,50},
[119] = {3,3,0,0,60,65},
[120] = {7,0,0,0,64,69},
[121] = {7,0,0,0,65,69},
[122] = {6,1,0,0,78,82},
[123] = {6,1,0,0,79,82},
[124] = {4,5,0,0,30,35},
[125] = {7,4,0,0,32,37},
[126] = {10,0,0,0,34,36},
[127] = {4,6,0,0,34,38},
[128] = {4,6,0,0,34,41},
[129] = {3,6,0,0,35,39},
[130] = {3,6,0,0,35,40},
[131] = {10,0,0,0,40,44},
[132] = {7,3,0,0,40,46},
[133] = {10,0,0,0,45,49},
[134] = {7,3,0,0,40,45},
[135] = {5,1,4,0,44,49},
[136] = {10,1,0,0,47,53},
[137] = {2,8,0,0,51,56},
[138] = {4,6,0,0,54,58},
[139] = {5,2,0,0,66,72},
[140] = {5,1,0,0,66,74},
-- Regime 140-146
[141] = {4,1,0,0,69,74},
[142] = {8,3,0,0,72,76},
[143] = {8,3,0,0,73,78},
[144] = {11,0,0,0,75,78},
[145] = {2,2,2,0,78,79},
[146] = {2,2,2,0,78,79},
-- ---------------------------------------------------------
-- I know they prevent FoV/GoV page sign-up and FoV/GoV prevent registry.
-- Need confirmation of retail behavior - Do they display in menu?
-- ---------------------------------------------------------
-- I'm pretty sure you can have an active page and OP at same time.
-- They might still display on the review option though.
-- ---------------------------------------------------------
[602] = {4,1,0,0,3,5},
[603] = {5,1,0,0,25,30},
[604] = {4,2,0,0,26,30},
[605] = {4,2,0,0,26,30},
[606] = {4,2,0,0,30,34},
[607] = {5,2,0,0,87,92},
[608] = {3,3,0,0,88,90},
[609] = {3,3,0,0,88,90},
[610] = {5,0,0,0,52,54},
[611] = {4,2,0,0,52,59},
[612] = {5,1,0,0,56,63},
[613] = {9,0,0,0,65,68},
[614] = {6,1,0,0,94,97},
[615] = {6,1,0,0,95,97},
[616] = {6,0,0,0,96,97},
[617] = {2,5,0,0,95,99},
[618] = {3,3,0,0,47,52},
[619] = {2,2,2,0,52,57},
[620] = {3,3,0,0,53,57},
[621] = {3,4,0,0,60,65},
[622] = {4,3,0,0,95,97},
[623] = {5,2,0,0,95,98},
[624] = {5,2,0,0,96,98},
[625] = {8,2,0,0,94,99},
[626] = {3,0,0,0,1,3},
[627] = {3,0,0,0,2,4},
[628] = {5,2,0,0,75,78},
[629] = {5,2,0,0,75,79},
[630] = {5,2,0,0,75,80},
[631] = {3,3,0,0,3,8},
[632] = {4,2,0,0,5,11},
[633] = {2,2,2,0,12,16},
[634] = {3,3,0,0,14,17},
[635] = {2,2,2,0,21,23},
[636] = {6,1,0,0,78,80},
[637] = {5,2,0,0,77,80},
[638] = {5,2,0,0,80,83},
[639] = {4,1,0,0,3,8},
[640] = {3,2,0,0,5,9},
[641] = {3,2,0,0,11,14},
-- 642-651
[642] = {4,2,0,0,86,89},
[643] = {5,2,0,0,86,90},
[644] = {5,2,0,0,86,90},
[645] = {2,2,2,0,90,91},
[646] = {5,2,0,0,90,93},
[647] = {2,3,0,0,1,6},
[648] = {2,3,0,0,1,7},
[649] = {3,2,0,0,15,20},
[650] = {4,2,0,0,22,26},
[651] = {3,3,0,0,78,82},
[652] = {3,3,0,0,79,82},
[653] = {2,4,0,0,81,83},
[654] = {2,4,0,0,81,84},
[655] = {3,3,0,0,18,21},
[656] = {4,2,0,0,21,27},
[657] = {5,1,0,0,17,26},
[658] = {3,3,0,0,23,26},
[659] = {4,2,0,0,26,28},
[660] = {4,1,0,0,29,34},
[661] = {3,3,0,0,84,86},
[662] = {3,3,0,0,86,88},
[663] = {1,1,1,1,10,14},
[664] = {1,1,1,1,15,19},
[665] = {1,1,1,1,20,24},
[666] = {1,1,1,1,25,29},
[667] = {1,1,1,1,30,34},
[668] = {1,1,1,1,35,39},
[669] = {5,1,0,0,81,85},
[670] = {5,1,0,0,82,85},
[671] = {6,0,0,0,42,46},
[672] = {6,0,0,0,46,49},
[673] = {4,2,0,0,51,54},
[674] = {5,1,0,0,50,55},
[675] = {3,3,0,0,53,56},
[676] = {3,3,0,0,60,63},
[677] = {3,3,0,0,91,95},
[678] = {3,3,0,0,91,95},
[679] = {6,0,0,0,20,27},
[680] = {2,4,0,0,20,24},
[681] = {2,4,0,0,21,26},
[682] = {2,2,2,0,28,31},
[683] = {3,3,0,0,30,34},
[684] = {3,3,0,0,32,36},
[685] = {2,5,0,0,85,87},
[686] = {2,5,0,0,85,89},
[687] = {3,3,0,0,40,44},
[688] = {3,3,0,0,45,49},
[689] = {3,3,0,0,49,52},
[690] = {4,2,0,0,50,54},
[691] = {2,2,2,0,53,58},
-- 691-701
[692] = {3,3,0,0,59,63},
[693] = {4,3,0,0,91,93},
[694] = {4,3,0,0,92,96},
[695] = {3,2,0,0,15,18},
[696] = {4,2,0,0,18,23},
[697] = {2,4,0,0,22,26},
[698] = {2,4,0,0,26,31},
[699] = {4,2,0,0,26,31},
[700] = {5,1,0,0,27,33},
[701] = {3,3,0,0,83,85},
[702] = {3,3,0,0,86,88},
[703] = {4,2,0,0,40,43},
[704] = {4,2,0,0,40,44},
[705] = {2,4,0,0,46,49},
[706] = {4,2,0,0,51,55},
[707] = {3,3,0,0,52,58},
[708] = {2,2,1,0,59,62},
[709] = {5,2,0,0,91,96},
[710] = {4,3,0,0,92,96},
[711] = {4,2,0,0,40,43},
[712] = {4,2,0,0,43,46},
[713] = {5,1,0,0,50,55},
[714] = {4,2,0,0,50,56},
[715] = {5,1,0,0,50,58},
[716] = {3,3,0,0,59,63},
[717] = {4,2,0,0,95,99},
[718] = {4,3,0,0,95,99},
[719] = {3,3,0,0,60,63},
[720] = {4,3,0,0,62,66},
[721] = {4,3,0,0,62,67},
[722] = {4,2,0,0,72,75},
[723] = {3,4,0,0,72,76},
[724] = {4,3,0,0,72,78},
[725] = {3,3,0,0,74,78},
[726] = {2,2,2,0,102,105},
[727] = {2,4,0,0,20,26},
[728] = {3,3,0,0,22,30},
[729] = {4,2,0,0,23,31},
[730] = {6,0,0,0,28,31},
[731] = {3,3,0,0,29,33},
[732] = {4,0,0,0,30,33},
[733] = {6,0,0,0,35,37},
[734] = {4,3,0,0,87,91},
[735] = {3,3,0,0,60,64},
[736] = {5,1,0,0,60,66},
[737] = {3,3,0,0,60,66},
[738] = {4,2,0,0,60,67},
[739] = {3,3,0,0,63,69},
[740] = {3,3,0,0,65,69},
[741] = {3,3,0,0,77,80},
-- 741-751
[742] = {3,3,0,0,99,103},
[743] = {10,0,0,0,72,72},
[744] = {7,0,0,0,74,77},
[745] = {7,0,0,0,75,78},
[746] = {7,0,0,0,76,79},
[747] = {7,0,0,0,77,80},
[748] = {6,0,0,0,79,80},
[749] = {10,0,0,0,71,71},
[750] = {6,0,0,0,71,74},
[751] = {7,0,0,0,75,80},
[752] = {7,0,0,0,77,82},
[753] = {7,0,0,0,79,82},
[754] = {7,0,0,0,81,84},
[755] = {4,1,0,0,61,68},
[756] = {4,1,0,0,61,68},
[757] = {4,1,0,0,62,69},
[758] = {3,2,0,0,62,73},
[759] = {3,2,0,0,62,73},
[760] = {4,2,0,0,69,74},
[761] = {4,2,0,0,71,78},
[762] = {4,2,0,0,71,78},
[763] = {2,2,1,0,44,49},
[764] = {2,2,2,0,45,49},
[765] = {3,2,1,0,65,68},
[766] = {3,3,0,0,73,76},
[767] = {5,1,0,0,75,78},
[768] = {5,1,0,0,75,79},
[769] = {4,2,0,0,76,80},
[770] = {5,2,0,0,100,103},
[771] = {2,3,0,0,45,49},
[772] = {3,2,0,0,50,53},
[773] = {3,2,0,0,50,54},
[774] = {3,2,0,0,55,59},
[775] = {4,1,0,0,70,74},
[776] = {4,2,0,0,95,98},
[777] = {3,3,0,0,25,30},
[778] = {3,3,0,0,25,30},
[779] = {3,3,0,0,25,30},
[780] = {4,2,0,0,25,32},
[781] = {4,2,0,0,25,35},
[782] = {4,3,0,0,25,34},
[783] = {4,3,0,0,25,34},
[784] = {4,4,0,0,30,34},
[785] = {6,0,0,0,34,35},
[786] = {2,2,2,0,62,69},
[787] = {2,2,2,0,62,69},
[788] = {2,2,2,0,65,69},
[789] = {2,2,2,0,65,69},
[790] = {3,3,0,0,51,57},
[791] = {4,2,0,0,51,57},
[792] = {4,2,0,0,51,57},
[793] = {3,3,0,0,61,63},
-- 793-803
[794] = {3,3,0,0,61,67},
[795] = {3,3,0,0,61,68},
[796] = {3,3,0,0,60,64},
[797] = {4,2,0,0,60,67},
[798] = {6,0,0,0,62,69},
[799] = {4,2,0,0,62,69},
[800] = {4,2,0,0,62,76},
[801] = {5,1,0,0,73,81},
[802] = {3,3,0,0,74,79},
[803] = {4,2,0,0,75,80},
[804] = {3,3,0,0,35,39},
[805] = {2,4,0,0,37,41},
[806] = {5,1,0,0,41,45},
[807] = {4,2,0,0,43,48},
[808] = {4,2,0,0,44,48},
[809] = {3,3,0,0,62,67},
[810] = {3,3,0,0,62,69},
[811] = {3,3,0,0,66,69},
[812] = {3,3,0,0,51,55},
[813] = {3,3,0,0,51,58},
[814] = {3,3,0,0,51,59},
[815] = {7,0,0,0,52,59},
[816] = {3,3,0,0,52,59},
[817] = {3,3,0,0,56,59},
[818] = {3,3,0,0,62,65},
[819] = {3,3,0,0,65,69},
};
local a = {0,0,0,0,0,0};
if regimeinfo[regimeid] then
return regimeinfo[regimeid];
else
-- print("Warning: Regime ID not found! Returning blank array.");
return a;
end
end; | gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/structure/dantooine/dant_jedi_temple_pillar.lua | 3 | 2288 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_static_structure_dantooine_dant_jedi_temple_pillar = object_static_structure_dantooine_shared_dant_jedi_temple_pillar:new {
}
ObjectTemplates:addTemplate(object_static_structure_dantooine_dant_jedi_temple_pillar, "object/static/structure/dantooine/dant_jedi_temple_pillar.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/commands/retreat.lua | 4 | 2200 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--which carries forward this exception.
--true = 1, false = 0
RetreatCommand = {
name = "retreat",
action = "retreat",
--actionCRC = action.hashCode(),
combatSpam = "retreat_buff",
}
AddCommand(RetreatCommand)
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/droid/droid_mse.lua | 2 | 3414 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_droid_droid_mse = object_draft_schematic_droid_shared_droid_mse:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Deed for: MSE Droid",
craftingToolTab = 32, -- (See DraftSchemticImplementation.h)
complexity = 15,
size = 1,
xpType = "crafting_droid_general",
xp = 140,
assemblySkill = "droid_assembly",
experimentingSkill = "droid_experimentation",
customizationSkill = "droid_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n"},
ingredientTitleNames = {"primary_frame", "body_shell", "droid_brain", "engine_unit", "sensor_suite", "general_droid_module"},
ingredientSlotType = {0, 0, 0, 0, 0, 3},
resourceTypes = {"metal", "chemical", "metal", "metal", "metal", "object/tangible/component/droid/shared_droid_service_module_base.iff"},
resourceQuantities = {20, 15, 12, 15, 6, 1},
contribution = {100, 100, 100, 100, 100, 100},
targetTemplate = "object/tangible/deed/pet_deed/deed_mse_basic.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_droid_droid_mse, "object/draft_schematic/droid/droid_mse.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c88728507.lua | 5 | 2439 | --ヴァンパイア・ソーサラー
function c88728507.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88728507,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c88728507.condition)
e1:SetTarget(c88728507.target)
e1:SetOperation(c88728507.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88728507,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c88728507.sumcost)
e2:SetOperation(c88728507.sumop)
c:RegisterEffect(e2)
end
function c88728507.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetPreviousControler()==tp
end
function c88728507.filter(c)
return c:IsSetCard(0x8e) and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToHand()
end
function c88728507.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88728507.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88728507.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88728507.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c88728507.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c88728507.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,88728507)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(88728507,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCountLimit(1)
e1:SetCondition(c88728507.ntcon)
e1:SetTarget(c88728507.nttg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,88728507,RESET_PHASE+PHASE_END,0,1)
end
end
function c88728507.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c88728507.nttg(e,c)
return c:IsLevelAbove(5) and c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK)
end
| gpl-2.0 |
DailyShana/ygopro-scripts | c33550694.lua | 3 | 3418 | --フュージョン・ゲート
function c33550694.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33550694,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e2:SetTarget(c33550694.target)
e2:SetOperation(c33550694.operation)
c:RegisterEffect(e2)
end
function c33550694.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c33550694.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c33550694.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c33550694.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c33550694.filter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c33550694.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33550694.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
if not e:GetHandler():IsRelateToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c33550694.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c33550694.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
else
local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0)
local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil)
and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ShuffleHand(tp)
end
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/bio_engineer/creature/creature_bolle_bol.lua | 1 | 3391 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_bio_engineer_creature_creature_bolle_bol = object_draft_schematic_bio_engineer_creature_shared_creature_bolle_bol:new {
templateType = DRAFTSCHEMATIC,
disableFactoryRun = true,
customObjectName = "Bolle Bol",
craftingToolTab = 256, -- (See DraftSchemticImplementation.h)
complexity = 24,
size = 1,
xpType = "crafting_bio_engineer_creature",
xp = 220,
assemblySkill = "bio_engineer_assembly",
experimentingSkill = "bio_engineer_experimentation",
customizationSkill = "bio_engineer_experimentation",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_creature_ingredients_n", "craft_creature_ingredients_n", "craft_creature_ingredients_n"},
ingredientTitleNames = {"dna_template", "protein_base", "organic_nutrition_materials"},
ingredientSlotType = {1, 0, 0},
resourceTypes = {"object/tangible/component/dna/shared_dna_template_generic.iff", "creature_food", "flora_food"},
resourceQuantities = {1, 50, 65},
contribution = {100, 100, 100},
targetTemplate = "object/tangible/deed/pet_deed/bolle_bol_deed.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_bio_engineer_creature_creature_bolle_bol, "object/draft_schematic/bio_engineer/creature/creature_bolle_bol.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/components/engine/eng_moncal_ifs64.lua | 3 | 2280 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_ship_components_engine_eng_moncal_ifs64 = object_tangible_ship_components_engine_shared_eng_moncal_ifs64:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_components_engine_eng_moncal_ifs64, "object/tangible/ship/components/engine/eng_moncal_ifs64.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/clothing/clothing_armor_kashyyykian_black_mtn_bracer_r.lua | 2 | 4044 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_clothing_clothing_armor_kashyyykian_black_mtn_bracer_r = object_draft_schematic_clothing_shared_clothing_armor_kashyyykian_black_mtn_bracer_r:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Kashyyykian Black Mountain Right Bracer",
craftingToolTab = 2, -- (See DraftSchemticImplementation.h)
complexity = 40,
size = 4,
xpType = "crafting_clothing_armor",
xp = 360,
assemblySkill = "armor_assembly",
experimentingSkill = "armor_experimentation",
customizationSkill = "armor_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n"},
ingredientTitleNames = {"auxilary_coverage", "body", "liner", "hardware_and_attachments", "binding_and_reinforcement", "padding", "armor", "load_bearing_harness", "reinforcement"},
ingredientSlotType = {0, 0, 0, 0, 0, 1, 1, 1, 0},
resourceTypes = {"wood_deciduous_endor", "hide_leathery", "hide_wooly_naboo", "copper", "petrochem_inert_polymer", "object/tangible/component/clothing/shared_padding_segment.iff", "object/tangible/component/armor/shared_armor_segment_kashyyykian_black_mtn.iff", "object/tangible/component/clothing/shared_synthetic_cloth.iff", "fiberplast"},
resourceQuantities = {40, 40, 30, 25, 25, 2, 2, 1, 20},
contribution = {100, 100, 100, 100, 100, 100, 100, 100, 100},
targetTemplate = "object/tangible/wearables/armor/kashyyykian_black_mtn/armor_kashyyykian_black_mtn_bracer_r.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_clothing_clothing_armor_kashyyykian_black_mtn_bracer_r, "object/draft_schematic/clothing/clothing_armor_kashyyykian_black_mtn_bracer_r.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/components/engine/eng_qualdex_elite.lua | 3 | 2284 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_ship_components_engine_eng_qualdex_elite = object_tangible_ship_components_engine_shared_eng_qualdex_elite:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_components_engine_eng_qualdex_elite, "object/tangible/ship/components/engine/eng_qualdex_elite.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_criminal_thug_human_female_01.lua | 3 | 2264 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_dressed_criminal_thug_human_female_01 = object_mobile_shared_dressed_criminal_thug_human_female_01:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_criminal_thug_human_female_01, "object/mobile/dressed_criminal_thug_human_female_01.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/space_greeter_coronet_shipwright_impatient.lua | 3 | 2284 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_space_greeter_coronet_shipwright_impatient = object_mobile_shared_space_greeter_coronet_shipwright_impatient:new {
}
ObjectTemplates:addTemplate(object_mobile_space_greeter_coronet_shipwright_impatient, "object/mobile/space_greeter_coronet_shipwright_impatient.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/poi/naboo_impswamp_large1.lua | 2 | 2246 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_building_poi_naboo_impswamp_large1 = object_building_poi_shared_naboo_impswamp_large1:new {
gameObjectType = 531,
}
ObjectTemplates:addTemplate(object_building_poi_naboo_impswamp_large1, "object/building/poi/naboo_impswamp_large1.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/merek/lair_merek_swamp.lua | 2 | 2284 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_lair_merek_lair_merek_swamp = object_tangible_lair_merek_shared_lair_merek_swamp:new {
objectMenuComponent = {"cpp", "LairMenuComponent"},
}
ObjectTemplates:addTemplate(object_tangible_lair_merek_lair_merek_swamp, "object/tangible/lair/merek/lair_merek_swamp.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/component/droid/socket_bank.lua | 2 | 3580 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_component_droid_socket_bank = object_tangible_component_droid_shared_socket_bank:new {
templateType = DROIDCOMPONENT,
gameObjectType = 262148,
numberExperimentalProperties = {1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
experimentalProperties = {"XX", "XX", "CD", "OQ", "CD", "OQ", "CD", "OQ", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX", "XX"},
experimentalWeights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "exp_durability", "exp_durability", "exp_effectiveness", "null", "null", "null", "null", "null", "null", "null", "null", "null", "null", "null", "null", "null", "null", "null"},
experimentalSubGroupTitles = {"null", "null", "decayrate", "hitpoints", "mechanism_quality", "storage_module", "data_module", "medical_module", "crafting_module", "repair_module", "playback_module", "struct_module", "harvest_power", "trap_bonus", "merchant_barker", "bomb_level", "stimpack_capacity", "stimpack_speed", "auto_repair_power", "entertainer_effects"},
experimentalMin = {0, 0, 1, 100, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
experimentalMax = {0, 0, 100, 150, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
experimentalPrecision = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
experimentalCombineType = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
}
ObjectTemplates:addTemplate(object_tangible_component_droid_socket_bank, "object/tangible/component/droid/socket_bank.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c10028593.lua | 5 | 1028 | --輪廻天狗
function c10028593.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10028593,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c10028593.spcon)
e1:SetTarget(c10028593.sptg)
e1:SetOperation(c10028593.spop)
c:RegisterEffect(e1)
end
function c10028593.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
end
function c10028593.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10028593.spfilter(c,e,tp)
return c:IsCode(10028593) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10028593.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c10028593.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
| gpl-2.0 |
Whitechaser/darkstar | scripts/zones/Port_San_dOria/npcs/Bonmaurieut.lua | 5 | 1613 | -----------------------------------
-- Area: Port San d'Oria
-- NPC: Bonmaurieut
-- Only sells when San d'Oria controlls Elshimo Uplands
-----------------------------------
package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Port_San_dOria/TextIDs");
require("scripts/globals/conquest");
require("scripts/globals/quests");
require("scripts/globals/shop");
-----------------------------------
function onTrade(player,npc,trade)
-- "Flyers for Regine" conditional script
local FlyerForRegine = player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE);
if (FlyerForRegine == 1) then
local count = trade:getItemCount();
local MagicFlyer = trade:hasItemQty(532,1);
if (MagicFlyer == true and count == 1) then
player:messageSpecial(FLYER_REFUSED);
end
end
end;
function onTrigger(player,npc)
local RegionOwner = GetRegionOwner(ELSHIMOUPLANDS);
if (RegionOwner ~= NATION_SANDORIA) then
player:showText(npc,BONMAURIEUT_CLOSED_DIALOG);
else
player:showText(npc,BONMAURIEUT_OPEN_DIALOG);
local stock =
{
1413, 1656, -- Cattleya
628, 239, -- Cinnamon
4468, 73, -- Pamamas
721, 147 -- Rattan Lumber
}
showShop(player,SANDORIA,stock);
end
end;
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
| gpl-3.0 |
Whitechaser/darkstar | scripts/zones/Attohwa_Chasm/mobs/Sargas.lua | 1 | 1811 | -----------------------------------
-- Area: Attohwa Chasm
-- NM: Sargas
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/magic");
-----------------------------------
function onMobInitialize(mob)
mob:setMobMod(MOBMOD_ADD_EFFECT, 1);
mob:setMobMod(MOBMOD_AUTO_SPIKES,mob:getShortID());
mob:addStatusEffect(dsp.effects.SHOCK_SPIKES,50,0,0);
mob:getStatusEffect(dsp.effects.SHOCK_SPIKES):setFlag(32);
end;
function onAdditionalEffect(mob,target,damage)
-- Guestimating 2 in 3 chance to stun on melee.
if ((math.random(1,100) >= 66) or (target:hasStatusEffect(dsp.effects.STUN) == true)) then
return 0,0,0;
else
local duration = math.random(5,15);
target:addStatusEffect(dsp.effects.STUN,5,0,duration);
return SUBEFFECT_STUN,0,EFFECT_STUN;
end
end;
function onSpikesDamage(mob,target,damage)
local INT_diff = mob:getStat(MOD_INT) - target:getStat(MOD_INT);
if (INT_diff > 20) then
INT_diff = 20 + ((INT_diff - 20)*0.5); -- INT above 20 is half as effective.
end
local dmg = ((damage+INT_diff)*0.5); -- INT adjustment and base damage averaged together.
local params = {};
params.bonusmab = 0;
params.includemab = false;
dmg = addBonusesAbility(mob, ELE_THUNDER, target, dmg, params);
dmg = dmg * applyResistanceAddEffect(mob,target,ELE_THUNDER,0);
dmg = adjustForTarget(target,dmg,ELE_THUNDER);
dmg = finalMagicNonSpellAdjustments(mob,target,ELE_THUNDER,dmg);
if (dmg < 0) then
dmg = 0;
end
return SUBEFFECT_SHOCK_SPIKES,44,dmg;
end;
function onMobDeath(mob, player, isKiller)
end;
function onMobDespawn(mob)
-- UpdateNMSpawnPoint(mob:getID());
mob:setRespawnTime(math.random((7200),(10800))); -- 2 to 3 hrs
end; | gpl-3.0 |
Whitechaser/darkstar | scripts/zones/Northern_San_dOria/npcs/Attarena.lua | 5 | 1630 | -----------------------------------
-- Area: Northern San d'Oria
-- NPC: Attarena
-- Only sells when San d'Oria controlls Li'Telor Region
-----------------------------------
package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Northern_San_dOria/TextIDs");
require("scripts/globals/events/harvest_festivals");
require("scripts/globals/settings");
require("scripts/globals/conquest");
require("scripts/globals/quests");
require("scripts/globals/shop");
-----------------------------------
function onTrade(player,npc,trade)
-- "Flyers for Regine" conditional script
if (player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == 1) then
if (trade:hasItemQty(532,1) == true and trade:getItemCount() == 1) then
player:messageSpecial(FLYER_REFUSED);
end
else
onHalloweenTrade(player,trade,npc);
end
end;
function onTrigger(player,npc)
RegionOwner = GetRegionOwner(LITELOR);
if (RegionOwner ~= NATION_SANDORIA) then
player:showText(npc,ATTARENA_CLOSED_DIALOG);
else
player:showText(npc,ATTARENA_OPEN_DIALOG);
local stock = {0x026f,119, -- Bay Leaves
0x103a,6440} -- Holy Water
showShop(player,SANDORIA,stock);
end
end;
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
| gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/item/item_bowl_shallow.lua | 3 | 2204 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_static_item_item_bowl_shallow = object_static_item_shared_item_bowl_shallow:new {
}
ObjectTemplates:addTemplate(object_static_item_item_bowl_shallow, "object/static/item/item_bowl_shallow.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/military/military_imperial_detachment_hq.lua | 3 | 2288 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_building_military_military_imperial_detachment_hq = object_building_military_shared_military_imperial_detachment_hq:new {
}
ObjectTemplates:addTemplate(object_building_military_military_imperial_detachment_hq, "object/building/military/military_imperial_detachment_hq.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_mand_bunker_crazed_miner.lua | 3 | 2244 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_dressed_mand_bunker_crazed_miner = object_mobile_shared_dressed_mand_bunker_crazed_miner:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_mand_bunker_crazed_miner, "object/mobile/dressed_mand_bunker_crazed_miner.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/terrain/corellia/rock_crystl_shrpbush_sm.lua | 3 | 2276 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_static_terrain_corellia_rock_crystl_shrpbush_sm = object_static_terrain_corellia_shared_rock_crystl_shrpbush_sm:new {
}
ObjectTemplates:addTemplate(object_static_terrain_corellia_rock_crystl_shrpbush_sm, "object/static/terrain/corellia/rock_crystl_shrpbush_sm.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/furniture/all/frn_all_toolchest_med_s01.lua | 3 | 2719 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_furniture_all_frn_all_toolchest_med_s01 = object_tangible_furniture_all_shared_frn_all_toolchest_med_s01:new {
numberExperimentalProperties = {1, 1, 1, 2},
experimentalProperties = {"XX", "XX", "XX", "DR", "OQ"},
experimentalWeights = {1, 1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "null", "exp_quality"},
experimentalSubGroupTitles = {"null", "null", "hitpoints", "quality"},
experimentalMin = {0, 0, 1000, 1},
experimentalMax = {0, 0, 1000, 100},
experimentalPrecision = {0, 0, 0, 0},
experimentalCombineType = {0, 0, 4, 1},
}
ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_toolchest_med_s01, "object/tangible/furniture/all/frn_all_toolchest_med_s01.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/space/chassis/z95_wing_l.lua | 3 | 2248 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_space_chassis_z95_wing_l = object_draft_schematic_space_chassis_shared_z95_wing_l:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_space_chassis_z95_wing_l, "object/draft_schematic/space/chassis/z95_wing_l.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/wearables/belt/belt_s02.lua | 3 | 4976 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_wearables_belt_belt_s02 = object_tangible_wearables_belt_shared_belt_s02:new {
playerRaces = { "object/creature/player/bothan_male.iff",
"object/creature/player/bothan_female.iff",
"object/creature/player/human_male.iff",
"object/creature/player/human_female.iff",
"object/creature/player/ithorian_male.iff",
"object/creature/player/ithorian_female.iff",
"object/creature/player/moncal_male.iff",
"object/creature/player/moncal_female.iff",
"object/creature/player/rodian_male.iff",
"object/creature/player/rodian_female.iff",
"object/creature/player/sullustan_male.iff",
"object/creature/player/sullustan_female.iff",
"object/creature/player/trandoshan_male.iff",
"object/creature/player/trandoshan_female.iff",
"object/creature/player/twilek_male.iff",
"object/creature/player/twilek_female.iff",
"object/creature/player/wookiee_male.iff",
"object/creature/player/wookiee_female.iff",
"object/creature/player/zabrak_male.iff",
"object/creature/player/zabrak_female.iff",
"object/mobile/vendor/aqualish_female.iff",
"object/mobile/vendor/aqualish_male.iff",
"object/mobile/vendor/bith_female.iff",
"object/mobile/vendor/bith_male.iff",
"object/mobile/vendor/bothan_female.iff",
"object/mobile/vendor/bothan_male.iff",
"object/mobile/vendor/devaronian_male.iff",
"object/mobile/vendor/gran_male.iff",
"object/mobile/vendor/human_female.iff",
"object/mobile/vendor/human_male.iff",
"object/mobile/vendor/ishi_tib_male.iff",
"object/mobile/vendor/ithorian_female.iff",
"object/mobile/vendor/ithorian_male.iff",
"object/mobile/vendor/moncal_female.iff",
"object/mobile/vendor/moncal_male.iff",
"object/mobile/vendor/nikto_male.iff",
"object/mobile/vendor/quarren_male.iff",
"object/mobile/vendor/rodian_female.iff",
"object/mobile/vendor/rodian_male.iff",
"object/mobile/vendor/sullustan_female.iff",
"object/mobile/vendor/sullustan_male.iff",
"object/mobile/vendor/trandoshan_female.iff",
"object/mobile/vendor/trandoshan_male.iff",
"object/mobile/vendor/twilek_female.iff",
"object/mobile/vendor/twilek_male.iff",
"object/mobile/vendor/weequay_male.iff",
"object/mobile/vendor/wookiee_female.iff",
"object/mobile/vendor/wookiee_male.iff",
"object/mobile/vendor/zabrak_female.iff",
"object/mobile/vendor/zabrak_male.iff" },
numberExperimentalProperties = {1, 1, 1, 1},
experimentalProperties = {"XX", "XX", "XX", "XX"},
experimentalWeights = {1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "null", "null"},
experimentalSubGroupTitles = {"null", "null", "sockets", "hitpoints"},
experimentalMin = {0, 0, 0, 1000},
experimentalMax = {0, 0, 0, 1000},
experimentalPrecision = {0, 0, 0, 0},
experimentalCombineType = {0, 0, 4, 4},
}
ObjectTemplates:addTemplate(object_tangible_wearables_belt_belt_s02, "object/tangible/wearables/belt/belt_s02.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/rori/neo_cobral_thief.lua | 1 | 1221 | neo_cobral_thief = Creature:new {
objectName = "@mob/creature_names:cobral_thief",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "cobral",
faction = "cobral",
level = 13,
chanceHit = 0.3,
damageMin = 140,
damageMax = 150,
baseXp = 609,
baseHAM = 1500,
baseHAMmax = 1900,
armor = 0,
resists = {0,0,0,0,0,0,0,-1,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = ATTACKABLE,
creatureBitmask = PACK + STALKER,
optionsBitmask = 128,
diet = HERBIVORE,
templates = {
"object/mobile/dressed_cobral_thief_human_female_01.iff",
"object/mobile/dressed_cobral_thief_human_male_01.iff"},
lootGroups = {
{
groups = {
{group = "junk", chance = 2000000},
{group = "wearables_common", chance = 2000000},
{group = "pistols", chance = 2000000},
{group = "tailor_components", chance = 2000000},
{group = "loot_kit_parts", chance = 2000000}
}
}
},
weapons = {"pirate_weapons_light"},
conversationTemplate = "",
reactionStf = "@npc_reaction/slang",
attacks = merge(brawlermid,marksmanmid)
}
CreatureTemplates:addCreatureTemplate(neo_cobral_thief, "neo_cobral_thief")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/hair/twilek/hair_twilek_female_s08.lua | 3 | 2260 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_hair_twilek_hair_twilek_female_s08 = object_tangible_hair_twilek_shared_hair_twilek_female_s08:new {
}
ObjectTemplates:addTemplate(object_tangible_hair_twilek_hair_twilek_female_s08, "object/tangible/hair/twilek/hair_twilek_female_s08.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c16691074.lua | 3 | 2744 | --オッドアイズ・アブソリュート・ドラゴン
function c16691074.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2)
c:EnableReviveLimit()
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16691074,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,16691074)
e1:SetCost(c16691074.atkcost)
e1:SetOperation(c16691074.atkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16691074,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16691075)
e2:SetCondition(c16691074.spcon)
e2:SetTarget(c16691074.sptg)
e2:SetOperation(c16691074.spop)
c:RegisterEffect(e2)
end
function c16691074.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c16691074.spfilter1(c,e,tp)
return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c16691074.atkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
local g1=Duel.GetMatchingGroup(c16691074.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g1:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(16691074,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c16691074.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
end
function c16691074.spfilter2(c,e,tp)
return c:IsSetCard(0x99) and not c:IsCode(16691074) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16691074.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16691074.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16691074.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/screenplays/racetracks/keren.lua | 2 | 4035 | local ObjectManager = require("managers.object.object_manager")
RaceTrack = require("screenplays.racetracks.racetrackengine")
keren_racetrack_screenplay = RaceTrack:new {
trackConfig={
debugMode = 0, -- 0 = off, 1 = print debug messages
planetName = "naboo", -- The planet the Track is on
badgeToAward=BDG_RACING_KEREN_CITY, -- Badge to be awarded for best daily time
trackName="KERENRT", -- Internal trackname , should be unique to the track
className="keren_racetrack_screenplay", -- Class name of this class
trackCheckpoint="@theme_park/racing/racing:keren_waypoint_name_checkpoint", --Waypoint names
trackLaptime="@theme_park/racing/racing:keren_laptime_checkpoint", -- System message sent at each waypoint
timeResolution=2, -- number of decimal places to use for the laptimes 0 = none, 1 = well 1 etc
expiryTime = (1*3600), --Amount of time in seconds that a player will be expired from the track (stops silly times over this limit)
resetTime = (22*3600)+(10*60), --Time of day in seconds that track resets High Scores
waypointRadius=10, -- size of the waypoint observer
raceCoordinator = {x=1396,y=2686,z=13}, -- Location of the race coordinator. Note the Z coord is VERY important or conversations break
waypoints = { {x = 1518, y = 2732}, -- The coords of the waypoints
{x = 1607, y = 2705},
{x = 1864, y = 2709},
{x = 1932, y = 2707},
{x = 1805, y = 2493},
{x = 1900, y = 2614},
{x = 1990, y = 2683},
{x = 1996, y = 2798},
{x = 1813, y = 2809},
{x = 1663, y = 2785},
{x = 1396, y = 2686}
}
}
}
registerScreenPlay("keren_racetrack_screenplay", true)
--------------------------------------
-- Initialize screenplay -
--------------------------------------
function keren_racetrack_screenplay:start()
if (isZoneEnabled(self.trackConfig.planetName)) then
self:spawnMobiles()
self:createRaceTrack()
end
end
function keren_racetrack_screenplay:spawnMobiles()
local pCoord = spawnMobile(self.trackConfig.planetName, "keren_race_coordinator", 1, self.trackConfig.raceCoordinator.x, self.trackConfig.raceCoordinator.z, self.trackConfig.raceCoordinator.y, 35, 0)
end
function keren_racetrack_screenplay:enteredWaypoint(pActiveArea, pObject)
return self:processWaypoint(pActiveArea, pObject)
end
keren_racetrack_convo_handler = Object:new {}
function keren_racetrack_convo_handler:getNextConversationScreen(conversationTemplate, conversingPlayer, selectedOption)
local convosession = CreatureObject(conversingPlayer):getConversationSession()
local lastConversationScreen = nil
local conversation = LuaConversationTemplate(conversationTemplate)
local nextConversationScreen
if ( conversation ~= nil ) then
-- checking to see if we have a next screen
if ( convosession ~= nil ) then
local session = LuaConversationSession(convosession)
if ( session ~= nil ) then
lastConversationScreen = session:getLastConversationScreen()
else
print("session was not good in getNextScreen")
end
end
if ( lastConversationScreen == nil ) then
nextConversationScreen = conversation:getInitialScreen()
else
local luaLastConversationScreen = LuaConversationScreen(lastConversationScreen)
local optionLink = luaLastConversationScreen:getOptionLink(selectedOption)
nextConversationScreen = conversation:getScreen(optionLink)
end
end
return nextConversationScreen
end
function keren_racetrack_convo_handler:runScreenHandlers(conversationTemplate, conversingPlayer, conversingNPC, selectedOption, conversationScreen)
local screen = LuaConversationScreen(conversationScreen)
local screenID = screen:getScreenID()
if ( screenID == "cs_jsPlumb_1_116" ) then
keren_racetrack_screenplay:startRacing(conversingPlayer)
elseif ( screenID == "cs_jsPlumb_1_181" ) then -- Personal Best
keren_racetrack_screenplay:displayPersonalBestTime(conversingPlayer)
elseif ( screenID == "cs_jsPlumb_1_207" ) then -- Track Best
keren_racetrack_screenplay:displayTrackBestTime(conversingPlayer)
end
return conversationScreen
end
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/naboo/guild_commerce_naboo_style_01.lua | 3 | 2358 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_building_naboo_guild_commerce_naboo_style_01 = object_building_naboo_shared_guild_commerce_naboo_style_01:new {
gameObjectType = 526,
planetMapCategory = "guild",
planetMapSubCategory = "guild_commerce"
}
ObjectTemplates:addTemplate(object_building_naboo_guild_commerce_naboo_style_01, "object/building/naboo/guild_commerce_naboo_style_01.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/wearables/ithorian/ith_bandolier_s08.lua | 3 | 2474 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_wearables_ithorian_ith_bandolier_s08 = object_tangible_wearables_ithorian_shared_ith_bandolier_s08:new {
playerRaces = { "object/creature/player/ithorian_male.iff",
"object/creature/player/ithorian_female.iff",
"object/mobile/vendor/ithorian_female.iff",
"object/mobile/vendor/ithorian_male.iff" },
}
ObjectTemplates:addTemplate(object_tangible_wearables_ithorian_ith_bandolier_s08, "object/tangible/wearables/ithorian/ith_bandolier_s08.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/conversations/tasks/hero_of_tatooine/hero_of_tat_pirate_leader_conv.lua | 3 | 4378 | heroOfTatPirateLeaderConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "heroOfTatPirateLeaderConvoHandler",
screens = {}
}
intro = ConvoScreen:new {
id = "intro",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_7557e310", -- Whoa! Hold on! I give up! Whew... you're pretty tough, my friend. In fact... you'd be the perfect person to help us in our little dilemma we've been facing. Right boys? Are you interested in a little task we have for you?
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_446af42e", "little_skeptical"}, -- First, what's the task?
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_a6c6f57b", "lets_get_em"}, -- No! Die, fools!
}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(intro);
little_skeptical = ConvoScreen:new {
id = "little_skeptical",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_256d8f99", -- Little skeptical, eh? I guess I don't blame you. After all, we are pirates! Har, Har! Oh--the task, right. Some of our boys were looting a rancher's house when he walked in. He and his wife are holding our boys captive. We want you to go and help them escape. Well, what do you think?
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_48566ef9", "be_in_debt"}, -- What's in it for me?
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_abc7e09d", "is_that_so"}, -- I think they deserved it. Nope, I won't help you.
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_34bde7db", "made_me_happy"}, --I guess I'll help you out.
}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(little_skeptical);
lets_get_em = ConvoScreen:new {
id = "lets_get_em",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_cacfa6a2", -- I guess I was mistaken. Boys, let's show this peasant how real pirates plunder! Get 'em!
stopConversation = "true",
options = {}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(lets_get_em);
be_in_debt = ConvoScreen:new {
id = "be_in_debt",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_4575b29e", -- We'll be in debt to you. That's all we can offer. There might be some loot still left at the house.
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_da25a2d9", "teach_a_lesson"}, -- Bad deal. No, I won't help you.
{"@conversation/quest_hero_of_tatooine_pirate_leader:s_d57d668a", "be_quick"}, -- Yeah, I'll help.
}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(be_in_debt);
is_that_so = ConvoScreen:new {
id = "is_that_so",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_5a3d905f", -- Oh, is that so? Time to be taught a lesson. Boys!
stopConversation = "true",
options = {}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(is_that_so);
made_me_happy = ConvoScreen:new {
id = "made_me_happy",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_543c2619", -- You just made an old pirate happy. The location of the house is around here somewhere. I marked it on your map. Be careful. Them ranchers aren't the nicest people in the galaxy. But then again, neither are we! HA HA! Oh, and don't come looking for us. You won't find us here. We pirates like to keep ourselves "on the go" if you know what I mean. Now, scram!
stopConversation = "true",
options = {}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(made_me_happy);
teach_a_lesson = ConvoScreen:new {
id = "teach_a_lesson",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_d9706ae2", -- Won't help us? Boys, let's teach this peasant a lesson for wasting our time.
stopConversation = "true",
options = {}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(teach_a_lesson);
be_quick = ConvoScreen:new {
id = "be_quick",
leftDialog = "@conversation/quest_hero_of_tatooine_pirate_leader:s_e30e7484", -- Good. The rancher's house is around this location. I've marked in on your map. Be quick about it. Oh, and don't come looking for me after the deed is done. We pirates don't stay in the same place for long.
stopConversation = "true",
options = {}
}
heroOfTatPirateLeaderConvoTemplate:addScreen(be_quick);
addConversationTemplate("heroOfTatPirateLeaderConvoTemplate", heroOfTatPirateLeaderConvoTemplate); | agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/fishing/bait/objects.lua | 3 | 8800 | --Copyright (C) 2009 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--which carries forward this exception.
object_tangible_fishing_bait_shared_bait_chum = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/fishing/bait/shared_bait_chum.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/edb_con_tato_jar_guts_s01.apt",
arrangementDescriptorFilename = "",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 8215,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@item_n:fishing_bait",
gameObjectType = 8215,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@item_n:fishing_bait_chum",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 1907354318,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/fishing/bait/base/shared_bait_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_fishing_bait_shared_bait_chum, "object/tangible/fishing/bait/shared_bait_chum.iff")
object_tangible_fishing_bait_shared_bait_grub = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/fishing/bait/shared_bait_grub.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/edb_con_tato_jar_funk_s01.apt",
arrangementDescriptorFilename = "",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 8215,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@item_n:fishing_bait",
gameObjectType = 8215,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@item_n:fishing_bait_grub",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2852582475,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/fishing/bait/base/shared_bait_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_fishing_bait_shared_bait_grub, "object/tangible/fishing/bait/shared_bait_grub.iff")
object_tangible_fishing_bait_shared_bait_insect = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/fishing/bait/shared_bait_insect.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/edb_con_tato_jar_bugs_s01.apt",
arrangementDescriptorFilename = "",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 8215,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@item_n:fishing_bait",
gameObjectType = 8215,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@item_n:fishing_bait_insect",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 574609963,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/fishing/bait/base/shared_bait_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_fishing_bait_shared_bait_insect, "object/tangible/fishing/bait/shared_bait_insect.iff")
object_tangible_fishing_bait_shared_bait_worm = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/fishing/bait/shared_bait_worm.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/edb_con_tato_jar_funk_s01.apt",
arrangementDescriptorFilename = "",
certificationsRequired = {},
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 8215,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@item_n:fishing_bait",
gameObjectType = 8215,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@item_n:fishing_bait_worm",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 529269810,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/fishing/bait/base/shared_bait_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_fishing_bait_shared_bait_worm, "object/tangible/fishing/bait/shared_bait_worm.iff")
| agpl-3.0 |
DrCyber1167/CyberBot | plugins/language.lua | 1 | 7771 | local function reload_plugins( )
plugins = {}
load_plugins()
end
function run(msg, matches)
if is_sudo(msg) then
if msg.to.type == 'channel' then
if matches[1] == "setlang" and matches[2] == "fa" then
file1 = io.open("./langs/supergroup/supergroup-fa", "r")
local send1 = file1:read("*all")
local b = 1
while b ~= 0 do
send1 = send1:trim()
send1,b = send1:gsub('^!+','')
end
filea = io.open("./plugins/supergroup.lua", "w")
filea:write(send1)
filea:flush()
filea:close()
return "زبان سوپرگپ با موفقیت تغییر کرد\nبرای اعمال تغییرات از دستور زیر استفاده کنید:\n!update"
elseif matches[1] == "setlang" and matches[2] == "en" then
file2 = io.open("./langs/supergroup/supergroup-en", "r")
local send2 = file2:read("*all")
local b = 1
while b ~= 0 do
send2 = send2:trim()
send2,b = send2:gsub('^!+','')
end
fileb = io.open("./plugins/supergroup.lua", "w")
fileb:write(send2)
fileb:flush()
fileb:close()
return "Supergroup language has been changed\nFor the change of commands please use:\n!update"
elseif matches[1] == "setlang" and matches[2] == "فا" then
file3 = io.open("./langs/supergroup/supergroup-فا", "r")
local send3 = file3:read("*all")
local b = 1
while b ~= 0 do
send3 = send3:trim()
send3,b = send3:gsub('^!+','')
end
filec = io.open("./plugins/supergroup.lua", "w")
filec:write(send3)
filec:flush()
filec:close()
return "زبان سوپرگپ با موفقیت به فارسی با دستورات فارسی تغییر کرد\nبرای اعمال تغییرات از دستور زیر استفاده کنید:\n!update"
end
if matches[1] == "help" and matches[2] == "fa" then
file1 = io.open("./langs/helpSUPER/helpSUPER-fa", "r")
local send1 = file1:read("*all")
local b = 1
while b ~= 0 do
send1 = send1:trim()
send1,b = send1:gsub('^!+','')
end
filea = io.open("./helps/HelpSuper.txt", "w")
filea:write(send1)
filea:flush()
filea:close()
return "زبان هلپ ربات در سوپرگپ تغییر کرد\nحالا شما میتوانید از دستور !help استفاده کنید"
elseif matches[1] == "help" and matches[2] == "en" then
file2 = io.open("./langs/helpSUPER/helpSUPER-en", "r")
local send2 = file2:read("*all")
local b = 1
while b ~= 0 do
send2 = send2:trim()
send2,b = send2:gsub('^!+','')
end
fileb = io.open("./helps/HelpSuper.txt", "w")
fileb:write(send2)
fileb:flush()
fileb:close()
return "Language of help in supergroup has been changed,\nNow you can send !help commands"
elseif matches[1] == "help" and matches[2] == "فا" then
file3 = io.open("./langs/helpSUPER/helpSUPER-فا", "r")
local send3 = file3:read("*all")
local b = 1
while b ~= 0 do
send3 = send3:trim()
send3,b = send3:gsub('^!+','')
end
filec = io.open("./helps/HelpSuper.txt", "w")
filec:write(send3)
filec:flush()
filec:close()
return "زبان هلپ سوپرگپ به فارسی با دستورات فارسی تغییر کرد\nحالا شما میتوانید از دستور !help استفاده کنید"
end
end
if msg.to.type == 'chat' then
if matches[1] == "setlang" and matches[2] == "fa" then
file1 = io.open("./langs/ingroup/ingroup-fa", "r")
local send1 = file1:read("*all")
local b = 1
while b ~= 0 do
send1 = send1:trim()
send1,b = send1:gsub('^!+','')
end
filea = io.open("./plugins/ingroup.lua", "w")
filea:write(send1)
filea:flush()
filea:close()
return "زبان گپ معمولی با موفقیت تغییر کرد\nبرای اعمال تغییرات از دستور زیر استفاده کنید:\n!update"
elseif matches[1] == "setlang" and matches[2] == "en" then
file2 = io.open("./langs/ingroup/ingroup-en", "r")
local send2 = file2:read("*all")
local b = 1
while b ~= 0 do
send2 = send2:trim()
send2,b = send2:gsub('^!+','')
end
fileb = io.open("./plugins/ingroup.lua", "w")
fileb:write(send2)
fileb:flush()
fileb:close()
return "Chat language has been changed\nFor the change of commands please use:\n!update"
elseif matches[1] == "setlang" and matches[2] == "فا" then
file3 = io.open("./langs/ingroup/ingroup-فا", "r")
local send3 = file3:read("*all")
local b = 1
while b ~= 0 do
send3 = send3:trim()
send3,b = send3:gsub('^!+','')
end
filec = io.open("./plugins/ingroup.lua", "w")
filec:write(send3)
filec:flush()
filec:close()
return "زبان گپ معمولی با موفقیت به فارسی با دستورات فارسی تغییر کرد\nبرای اعمال تغییرات از دستور زیر استفاده کنید:\n!update"
end
if matches[1] == "help" and matches[2] == "fa" then
file1 = io.open("./langs/helpCHAT/helpCHAT-fa", "r")
local send1 = file1:read("*all")
local b = 1
while b ~= 0 do
send1 = send1:trim()
send1,b = send1:gsub('^!+','')
end
filea = io.open("./helps/HelpChat.txt", "w")
filea:write(send1)
filea:flush()
filea:close()
return "زبان هلپ ربات در گپ معمولی تغییر کرد\nحالا شما میتوانید از دستور !help استفاده کنید"
elseif matches[1] == "help" and matches[2] == "en" then
file2 = io.open("./langs/helpCHAT/helpCHAT-en", "r")
local send2 = file2:read("*all")
local b = 1
while b ~= 0 do
send2 = send2:trim()
send2,b = send2:gsub('^!+','')
end
fileb = io.open("./helps/HelpChat.txt", "w")
fileb:write(send2)
fileb:flush()
fileb:close()
return "Language of help in chat has been changed,\nNow you can send !help commands"
elseif matches[1] == "help" and matches[2] == "فا" then
file3 = io.open("./langs/helpCHAT/helpCHAT-فا", "r")
local send3 = file3:read("*all")
local b = 1
while b ~= 0 do
send3 = send3:trim()
send3,b = send3:gsub('^!+','')
end
filec = io.open("./helps/HelpChat.txt", "w")
filec:write(send3)
filec:flush()
filec:close()
return "زبان هلپ گپ معمولی به فارسی با دستورات فارسی تغییر کرد\nحالا شما میتوانید از دستور !help استفاده کنید"
end
end
if matches[1] == "update" then
txt = "Updated!"
send_msg("channel#id"..msg.to.id, txt, ok_cb, false)
send_msg("chat#id"..msg.to.id, txt, ok_cb, false)
return reload_plugins( )
end
if matches[1] == "lang" and matches[2] == "list" then
return [[
List of language:
⚓️ !setlang en
Change language to English
⚓️ !setlang fa
تغییر زبان به فارسی با دستورات انگلیسی
⚓️ !setlang فا
تغییر زبان به فارسی با دستورات فارسی
⚓️ !help en
Change language of groups's help to English
⚓️ !help fa
تغییر زبان هلپ گروه به فارسی با دستورات انگلیسی
⚓️ !help فا
تغییر زبان هلپ گروه به فارسی با دستورات فارسی
]]
end
elseif not is_sudo(msg) then
return "You cant change language (just for sudo!)"
end
end
return {
advan = {
"Created by: @DrCyber",
"Powered by: CyberTeam",
"CopyRight all right reserved",
},
patterns = {
"^[!#/](setlang) (fa)$",
"^[!#/](setlang) (en)$",
"^[!#/](setlang) (فا)$",
"^[!#/](help) (fa)$",
"^[!#/](help) (en)$",
"^[!#/](help) (فا)$",
"^[!#/](lang) (list)$",
"^[!#/](update)$",
},
run = run
}
| gpl-2.0 |
KingRaptor/Zero-K | LuaUI/Widgets/gfx_halo.lua | 12 | 10613 | -- $Id: gfx_halo.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: gfx_halo.lua
-- brief:
-- author: jK
--
-- Copyright (C) 2008.
-- Licensed under the terms of the GNU GPL, v2 or later.
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Halo",
desc = "Shows a halo in teamcolors around units. (Doesn't work on ati cards!)",
author = "jK",
date = "Jan, 2008",
license = "GNU GPL, v2 or later",
layer = -10,
enabled = false -- loaded by default?
}
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--// user var
local gAlpha = 0.7
local limitToCommanders = false
local limitToWorkers = false
--// app var
local offscreentex
local depthtex
local blurtex
local fbo
local blurShader_h
local blurShader_v
local uniformScreenX, uniformScreenY
local vsx, vsy = 0,0
local resChanged = false
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--// gl const
local GL_DEPTH_BITS = 0x0D56
local GL_DEPTH_COMPONENT = 0x1902
local GL_DEPTH_COMPONENT16 = 0x81A5
local GL_DEPTH_COMPONENT24 = 0x81A6
local GL_DEPTH_COMPONENT32 = 0x81A7
local GL_COLOR_ATTACHMENT0_EXT = 0x8CE0
local GL_COLOR_ATTACHMENT1_EXT = 0x8CE1
local GL_COLOR_ATTACHMENT2_EXT = 0x8CE2
local GL_COLOR_ATTACHMENT3_EXT = 0x8CE3
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--// speed ups
local ALL_UNITS = Spring.ALL_UNITS
local GetVisibleUnits = Spring.GetVisibleUnits
local GetUnitTeam = Spring.GetUnitTeam
local GL_FRONT = GL.FRONT
local GL_BACK = GL.BACK
local GL_MODELVIEW = GL.MODELVIEW
local GL_PROJECTION = GL.PROJECTION
local GL_COLOR_BUFFER_BIT = GL.COLOR_BUFFER_BIT
local glUnit = gl.Unit
local glCopyToTexture = gl.CopyToTexture
local glRenderToTexture = gl.RenderToTexture
local glCallList = gl.CallList
local glActiveFBO = gl.ActiveFBO
local glUseShader = gl.UseShader
local glUniform = gl.Uniform
local glUniformInt = gl.UniformInt
local glClear = gl.Clear
local glTexRect = gl.TexRect
local glColor = gl.Color
local glTexture = gl.Texture
local glCulling = gl.Culling
local glDepthTest = gl.DepthTest
local glResetMatrices = gl.ResetMatrices
local glMatrixMode = gl.MatrixMode
local glPushMatrix = gl.PushMatrix
local glLoadIdentity = gl.LoadIdentity
local glPopMatrix = gl.PopMatrix
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:Initialize()
if (not gl.CreateShader)or(not gl.CreateFBO) then
Spring.Echo("Halo widget: your card is unsupported!")
widgetHandler:RemoveWidget()
return
end
vsx, vsy = widgetHandler:GetViewSizes()
blurShader_h = gl.CreateShader({
fragment = [[
float kernel[7]; // = float[7]( 0.013, 0.054, 0.069, 0.129, 0.212, 0.301, 0.372);
uniform sampler2D tex0;
uniform int screenX;
void InitKernel(void) {
kernel[0] = 0.013;
kernel[1] = 0.054;
kernel[2] = 0.069;
kernel[3] = 0.129;
kernel[4] = 0.212;
kernel[5] = 0.301;
kernel[6] = 0.372;
}
void main(void) {
InitKernel();
int n;
float pixelsize = 1.0/float(screenX);
gl_FragColor = 0.4 * texture2D(tex0, gl_TexCoord[0].st );
vec2 tc1 = gl_TexCoord[0].st;
vec2 tc2 = gl_TexCoord[0].st;
for(n=6; n>= 0; --n){
tc1.s += pixelsize;
tc2.s -= pixelsize;
gl_FragColor += kernel[n] * ( texture2D(tex0, tc1 )+texture2D(tex0, tc2 ) );
}
}
]],
uniformInt = {
tex0 = 0,
screenX = math.ceil(vsx*0.5),
},
})
if (blurShader_h == nil) then
Spring.Log(widget:GetInfo().name, LOG.ERROR, "Halo widget: hblur shader error: "..gl.GetShaderLog())
widgetHandler:RemoveWidget()
return false
end
blurShader_v = gl.CreateShader({
fragment = [[
float kernel[7]; // = float[7]( 0.013, 0.054, 0.069, 0.129, 0.212, 0.301, 0.372);
uniform sampler2D tex0;
uniform int screenY;
void InitKernel(void) {
kernel[0] = 0.013;
kernel[1] = 0.054;
kernel[2] = 0.069;
kernel[3] = 0.129;
kernel[4] = 0.212;
kernel[5] = 0.301;
kernel[6] = 0.372;
}
void main(void) {
InitKernel();
int n;
float pixelsize = 1.0/float(screenY);
gl_FragColor = 0.4 * texture2D(tex0, gl_TexCoord[0].st );
vec2 tc1 = gl_TexCoord[0].st;
vec2 tc2 = gl_TexCoord[0].st;
for(n=6; n>= 0; --n){
tc1.t += pixelsize;
tc2.t -= pixelsize;
gl_FragColor += kernel[n] * ( texture2D(tex0, tc1 )+texture2D(tex0, tc2 ) );
}
}
]],
uniformInt = {
tex0 = 0,
screenY = math.ceil(vsy*0.5),
},
})
if (blurShader_v == nil) then
Spring.Log(widget:GetInfo().name, LOG.ERROR, "Halo widget: vblur shader error: "..gl.GetShaderLog())
widgetHandler:RemoveWidget()
return false
end
uniformScreenX = gl.GetUniformLocation(blurShader_h, 'screenX')
uniformScreenY = gl.GetUniformLocation(blurShader_v, 'screenY')
fbo = gl.CreateFBO()
self:ViewResize(vsx,vsy)
enter2d = gl.CreateList(function()
glUseShader(0)
glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity()
glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity()
end)
leave2d = gl.CreateList(function()
glMatrixMode(GL_PROJECTION); glPopMatrix()
glMatrixMode(GL_MODELVIEW); glPopMatrix()
glTexture(false)
glUseShader(0)
end)
end
function widget:ViewResize(viewSizeX, viewSizeY)
vsx = viewSizeX
vsy = viewSizeY
fbo.color0 = nil
gl.DeleteTexture(depthtex or 0)
gl.DeleteTextureFBO(offscreentex or 0)
gl.DeleteTextureFBO(blurtex or 0)
depthtex = gl.CreateTexture(vsx,vsy, {
border = false,
format = GL_DEPTH_COMPONENT24,
min_filter = GL.NEAREST,
mag_filter = GL.NEAREST,
})
offscreentex = gl.CreateTexture(vsx,vsy, {
border = false,
min_filter = GL.LINEAR,
mag_filter = GL.LINEAR,
wrap_s = GL.CLAMP,
wrap_t = GL.CLAMP,
fbo = true,
})
blurtex = gl.CreateTexture(math.floor(vsx*0.5),math.floor(vsy*0.5), {
border = false,
min_filter = GL.LINEAR,
mag_filter = GL.LINEAR,
wrap_s = GL.CLAMP,
wrap_t = GL.CLAMP,
fbo = true,
})
fbo.depth = depthtex
fbo.color0 = offscreentex
fbo.drawbuffers = GL_COLOR_ATTACHMENT0_EXT
resChanged = true
end
function widget:Shutdown()
gl.DeleteTexture(depthtex)
if (gl.DeleteTextureFBO) then
gl.DeleteTextureFBO(offscreentex)
gl.DeleteTextureFBO(blurtex)
end
if (gl.DeleteFBO) then
gl.DeleteFBO(fbo or 0)
end
if (gl.DeleteShader) then
gl.DeleteShader(blurShader_h or 0)
gl.DeleteShader(blurShader_v or 0)
end
gl.DeleteList(enter2d)
gl.DeleteList(leave2d)
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Spring.GetTeamColor = Spring.GetTeamColor or function(teamID) local _,_,_,_,_,_,r,g,b = Spring.GetTeamInfo(teamID); return r,g,b end
local teamColors = {}
local function SetTeamColor(teamID)
local teamColor = teamColors[teamID]
if (teamColor) then glColor(teamColor) return end
teamColors[teamID] = {Spring.GetTeamColor(teamID)}
glColor(teamColors[teamID])
end
local function DrawVisibleUnitsAll()
local visibleUnits = GetVisibleUnits(ALL_UNITS,nil,true)
for i=1,#visibleUnits do
local unitID = visibleUnits[i]
SetTeamColor(GetUnitTeam(unitID))
glUnit(unitID,true)
end
end
local function DrawVisibleUnitsLimited()
local teams = Spring.GetTeamList()
for _,teamID in ipairs(teams) do
glColor(Spring.GetTeamColor(teamID))
teamUnits = Spring.GetTeamUnitsSorted(teamID)
teamUnits.n = nil -- REMOVE IN 0.83
for unitDefID,unitIDs in pairs(teamUnits) do
local UnitDef = UnitDefs[unitDefID]
if (limitToCommanders and UnitDef.customParams.commtype)or
(limitToWorkers and UnitDef.isBuilder)
then
for _,unitID in ipairs(unitIDs) do
local losState = Spring.GetUnitLosState(unitID)
if (Spring.IsUnitInView(unitID))and(((losState)and(losState.los))or(true)) then
glUnit(unitID,true)
end
end
end
end
end
end
local DrawVisibleUnits
if (limitToCommanders or limitToWorkers) then
DrawVisibleUnits = DrawVisibleUnitsLimited
else
DrawVisibleUnits = DrawVisibleUnitsAll
end
local MyDrawVisibleUnits = function()
glClear(GL_COLOR_BUFFER_BIT,0,0,0,0)
--glCulling(GL_FRONT)
DrawVisibleUnits()
--glCulling(GL_BACK)
--glCulling(false)
glColor(1,1,1,1)
end
local blur_h = function()
glClear(GL_COLOR_BUFFER_BIT,0,0,0,0)
glUseShader(blurShader_h)
glTexRect(-1-0.25/vsx,1+0.25/vsy,1+0.25/vsx,-1-0.25/vsy)
end
local blur_v = function()
--glClear(GL_COLOR_BUFFER_BIT,0,0,0,0)
glUseShader(blurShader_v)
glTexRect(-1-0.25/vsx,1+0.25/vsy,1+0.25/vsx,-1-0.25/vsy)
end
function widget:DrawWorldPreUnit()
glCopyToTexture(depthtex, 0, 0, 0, 0, vsx, vsy)
if (resChanged) then
resChanged = false
if (vsx==1) or (vsy==1) then return end
glUseShader(blurShader_h)
glUniformInt(uniformScreenX, math.ceil(vsx*0.5) )
glUseShader(blurShader_v)
glUniformInt(uniformScreenY, math.ceil(vsy*0.5) )
end
glDepthTest(true)
glActiveFBO(fbo,MyDrawVisibleUnits)
glDepthTest(false)
glTexture(offscreentex)
glRenderToTexture(blurtex, blur_h)
glTexture(blurtex)
glRenderToTexture(offscreentex, blur_v)
glColor(1,1,1,gAlpha)
glCallList(enter2d)
glTexture(offscreentex)
glTexRect(-1-0.5/vsx,1+0.5/vsy,1+0.5/vsx,-1-0.5/vsy)
glCallList(leave2d)
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
| gpl-2.0 |
DailyShana/ygopro-scripts | c82693042.lua | 5 | 1662 | --混沌球体
function c82693042.initial_effect(c)
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_LIGHT)
c:RegisterEffect(e1)
--battle indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetValue(c82693042.valcon)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(82693042,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c82693042.thcon)
e3:SetTarget(c82693042.thtg)
e3:SetOperation(c82693042.thop)
c:RegisterEffect(e3)
end
function c82693042.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c82693042.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c82693042.filter(c)
return c:GetLevel()==3 and c:IsAbleToHand()
end
function c82693042.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c82693042.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c82693042.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c82693042.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/screenplays/cities/talus_dearic.lua | 1 | 17479 | TalusDearicScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "TalusDearicScreenPlay"
}
registerScreenPlay("TalusDearicScreenPlay", true)
function TalusDearicScreenPlay:start()
if (isZoneEnabled("talus")) then
self:spawnMobiles()
end
end
function TalusDearicScreenPlay:spawnMobiles()
--thugs
spawnMobile("talus", "chunker_nitwit", 300, 152, 6, -3013, 146, 0)
spawnMobile("talus", "chunker_nitwit", 300, 157, 6, -3017, 192, 0)
spawnMobile("talus", "chunker_nitwit", 300, 161, 6, -3007, 2, 0)
spawnMobile("talus", "chunker_nitwit", 300, 163, 6, -3016, 314, 0)
spawnMobile("talus", "chunker_nitwit", 300, 21, 6, -2826, 268, 0)
spawnMobile("talus", "chunker_nitwit", 300, 24, 6, -2823, 37, 0)
spawnMobile("talus", "chunker_nitwit", 300, 28, 6, -2823, 337, 0)
spawnMobile("talus", "chunker_nitwit", 300, 31, 6, -2836, 89, 0)
spawnMobile("talus", "chunker_nitwit", 300, 461, 6, -3112, 226, 0)
spawnMobile("talus", "chunker_nitwit", 300, 464, 6, -3106, 80, 0)
spawnMobile("talus", "chunker_nitwit", 300, 470, 6, -3110, 48, 0)
spawnMobile("talus", "chunker_nitwit", 300, 471, 6, -3106, 223, 0)
spawnMobile("talus", "chunker_punk", 300, 202, 6, -2860, 129, 0)
spawnMobile("talus", "chunker_punk", 300, 206, 6, -2867, 80, 0)
spawnMobile("talus", "chunker_punk", 300, 208, 6, -2860, 137, 0)
spawnMobile("talus", "chunker_punk", 300, 209, 6, -2864, 97, 0)
spawnMobile("talus", "chunker_punk", 300, 763, 6, -3279, 244, 0)
spawnMobile("talus", "chunker_punk", 300, 777, 6, -3285, 269, 0)
spawnMobile("talus", "chunker_punk", 300, 778, 6, -3287, 175, 0)
spawnMobile("talus", "chunker_punk", 300, 780, 6, -3286, 172, 0)
spawnMobile("talus", "chunker_swindler", 300, 101, 9, -3210, 232, 0)
spawnMobile("talus", "chunker_swindler", 300, 104, 8, -3206, 110, 0)
spawnMobile("talus", "chunker_swindler", 300, 113, 7, -3197, 15, 0)
spawnMobile("talus", "criminal", 300, 146, 6, -3066, 303, 0)
spawnMobile("talus", "criminal", 300, 155, 6, -3032, 72, 0)
spawnMobile("talus", "criminal", 300, 287, 6, -3055, 265, 0)
spawnMobile("talus", "criminal", 300, 373, 6, -2764, 333, 0)
spawnMobile("talus", "criminal", 300, 470, 6, -3222, 220, 0)
spawnMobile("talus", "criminal", 300, 636, 6, -2979, 141, 0)
spawnMobile("talus", "fed_dub_captain", 300, 286, 6, -3106, 318, 0)
spawnMobile("talus", "fed_dub_captain", 300, 718, 6, -2859, 171, 0)
spawnMobile("talus", "fed_dub_captain", 300, 730, 6, -3198, 179, 0)
spawnMobile("talus", "fed_dub_constable", 300, 138, 6, -2978, 113, 0)
spawnMobile("talus", "fed_dub_constable", 300, 283, 6, -3109, 179, 0)
spawnMobile("talus", "fed_dub_constable", 300, 500, 6, -3192, 357, 0)
spawnMobile("talus", "fed_dub_constable", 300, 517, 6, -3170, 152, 0)
spawnMobile("talus", "fed_dub_constable", 300, 537, 6, -3197, 85, 0)
spawnMobile("talus", "fed_dub_constable", 300, 539, 6, -3202, 115, 0)
spawnMobile("talus", "fed_dub_constable", 300, 563, 6, -2911, 10, 0)
spawnMobile("talus", "fed_dub_investigator", 300, 198, 6, -2794, 71, 0)
spawnMobile("talus", "fed_dub_investigator", 300, 201, 6, -3099, 318, 0)
spawnMobile("talus", "fed_dub_investigator", 300, 376, 6, -2923, 271, 0)
spawnMobile("talus", "fed_dub_investigator", 300, 390, 6, -3184, 180, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 144, 6, -3098, 134, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 200, 6, -2794, 88, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 200, 6, -3099, 275, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 201, 6, -2796, 225, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 202, 6, -3099, 359, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 287, 6, -3107, 218, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 287, 6, -3135, 184, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 287, 6, -3136, 10, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 289, 6, -2794, -96, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 377, 6, -2923, 267, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 532, 6, -3196, 146, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 541, 6, -2994, 270, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 586, 6, -3193, 271, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 635, 6, -3182, 85, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 715, 6, -2844, 180, 0)
spawnMobile("talus", "fed_dub_patrolman", 300, 716, 6, -2866, 318, 0)
--misc
spawnMobile("talus", "informant_npc_lvl_1",0,286,6,-3101,180,0)
spawnMobile("talus", "informant_npc_lvl_1",0,342,6,-2896,270,0)
spawnMobile("talus", "informant_npc_lvl_1",0,409,6,-2867,315,0)
spawnMobile("talus", "informant_npc_lvl_1",0,411,6,-3056,90,0)
spawnMobile("talus", "informant_npc_lvl_1",0,434,6,-2821,180,0)
spawnMobile("talus", "informant_npc_lvl_1",0,555,6,-2958,0,0)
spawnMobile("talus", "informant_npc_lvl_1",0,568,6,-3173,30,0)
spawnMobile("talus", "informant_npc_lvl_1",0,653,6,-2850,90,0)
spawnMobile("talus", "informant_npc_lvl_1",0,683,6,-2898,45,0)
spawnMobile("talus", "informant_npc_lvl_2",0,147,6,-2812,270,0)
spawnMobile("talus", "informant_npc_lvl_2",0,203,6,-2979,180,0)
spawnMobile("talus", "informant_npc_lvl_2",0,258.3,6,-3008.4,135,0)
spawnMobile("talus", "informant_npc_lvl_3",0,255,6,-3024,270,0)
spawnMobile("talus", "informant_npc_lvl_3",0,265,6,-2974,315,0)
spawnMobile("talus", "informant_npc_lvl_3",0,682,13,-3219,180,0)
--spawnMobile("talus", "junk_dealer",0,183.6,6,-3065.1,87,0)
spawnMobile("talus", "rebel_recruiter",60,-26,0,0,90,3175399)
spawnMobile("talus", "rebel_recruiter",60,17,3,-36,0,6255475)
--trainers
spawnMobile("talus", "trainer_1hsword",1,549,6,-2865,180,0)
spawnMobile("talus", "trainer_2hsword",1,552,6,-2865,180,0)
spawnMobile("talus", "trainer_architect",1,11,1,-14,0,3175561)
spawnMobile("talus", "trainer_armorsmith",1,-15,1,0,90,3175560)
spawnMobile("talus", "trainer_armorsmith",1,351,6,-2877,2,0)
spawnMobile("talus", "trainer_artisan",1,0,1,-14,0,3175386)
spawnMobile("talus", "trainer_brawler",1,-11,1,-14,0,3175377)
spawnMobile("talus", "trainer_carbine",1,583,6,-2873,0,0)
spawnMobile("talus", "trainer_chef",1,-11,1.1,-14,0,3175387)
spawnMobile("talus", "trainer_commando",1,-3,1,-9,90,3175376)
spawnMobile("talus", "trainer_dancer",1,18.0588,2.12871,53.9528,1,3175572)
spawnMobile("talus", "trainer_droidengineer",1,-11,1,-13,0,3175563)
spawnMobile("talus", "trainer_entertainer",1,29.7,2,73,270,3175572)
spawnMobile("talus", "trainer_imagedesigner",1,-21,2,73.5,90,3175573)
spawnMobile("talus", "trainer_marksman",1,0,1,-14,0,3175376)
spawnMobile("talus", "trainer_marksman",1,586,6,-2873,0,0)
spawnMobile("talus", "trainer_medic",1,-1.8295,0.184067,0.51949,87,3305354)
spawnMobile("talus", "trainer_merchant",1,12,1,6,180,3175559)
spawnMobile("talus", "trainer_merchant",1,331.5,6,-2914.5,90,0)
spawnMobile("talus", "trainer_musician",1,22.0619,2.12821,63.5,1,3175572)
spawnMobile("talus", "trainer_pistol",1,583,6,-2871,10,0)
spawnMobile("talus", "trainer_polearm",1,523,6,-2934,180,0)
spawnMobile("talus", "trainer_rifleman",1,587,6,-2870,0,0)
spawnMobile("talus", "trainer_scout",1,-12,1,5,180,3175374)
spawnMobile("talus", "trainer_scout",1,700,6,-2911,180,0)
spawnMobile("talus", "trainer_smuggler",1,167,6,-2892,263,0)
spawnMobile("talus", "trainer_smuggler",60,3,1,-8.5,270,3175376)
spawnMobile("talus", "trainer_squadleader",1,588,6,-2934,90,0)
spawnMobile("talus", "trainer_tailor",1,11,1.1,-14,45,3175385)
spawnMobile("talus", "trainer_tailor",1,-12,1,6,180,3175560)
spawnMobile("talus", "trainer_tailor",1,370.2,6,-2877.2,0,0)
spawnMobile("talus", "trainer_unarmed",1,-31,0,10,90,3175401)
spawnMobile("talus", "trainer_weaponsmith",1,0,1,-14,0,3175562)
spawnMobile("talus", "trainer_weaponsmith",1,519,6,-2913.5,180,0)
--Anything dashed out will need to be added here and removed from spawn manager once the spawnMobiles command is extended.
--More Outside Misc
spawnMobile("talus", "businessman",60,168.921,6,-2923.67,107.531,0)
spawnMobile("talus", "businessman",60,212.446,6,-2833.26,295.679,0)
spawnMobile("talus", "businessman",60,330.621,6,-2942.68,46.1291,0)
spawnMobile("talus", "businessman",60,319.846,6,-3145.97,109.968,0)
spawnMobile("talus", "businessman",60,446.267,6,-3130.33,249.001,0)
spawnMobile("talus", "businessman",60,420.006,6,-2986.86,200.69,0)
spawnMobile("talus", "businessman",60,504.641,6,-3046.27,251.225,0)
spawnMobile("talus", "businessman",60,595.655,6,-3108.96,298.007,0)
spawnMobile("talus", "commoner",60,127.174,6,-2798.56,170.604,0)
spawnMobile("talus", "commoner",60,161.414,6,-2868.57,162.125,0)
spawnMobile("talus", "commoner",60,163.969,6,-2835.69,126.296,0)
spawnMobile("talus", "commoner",60,127.295,6,-2995.11,290.038,0)
spawnMobile("talus", "commoner",60,133.107,6,-3092.87,277.887,0)
spawnMobile("talus", "commoner",60,156.527,6,-2960.7,69.2032,0)
spawnMobile("talus", "commoner",60,197.748,6,-3065.09,200.164,0)
spawnMobile("talus", "commoner",60,172.678,6,-3031.56,224.267,0)
spawnMobile("talus", "commoner",60,149.764,6,-3061.44,326.219,0)
spawnMobile("talus", "commoner",60,147.109,6,-3073.94,77.2345,0)
spawnMobile("talus", "commoner",60,212.011,6,-2937.69,234.669,0)
spawnMobile("talus", "commoner",60,280.418,6,-2806.91,62.6086,0)
spawnMobile("talus", "commoner",60,221.275,6,-2803.13,196.629,0)
spawnMobile("talus", "commoner",60,204.603,6,-2849.75,245.847,0)
spawnMobile("talus", "commoner",60,290.803,6,-3074.21,94.2295,0)
spawnMobile("talus", "commoner",60,237.39,6,-3077.78,201.248,0)
spawnMobile("talus", "commoner",60,319.448,6,-3001.55,222.459,0)
spawnMobile("talus", "commoner",60,371.949,6,-3059.95,126.195,0)
spawnMobile("talus", "commoner",60,353.709,6,-3051.79,286.987,0)
spawnMobile("talus", "commoner",60,386.941,6,-3047.4,106.431,0)
spawnMobile("talus", "commoner",60,315.145,6,-3159.78,102.564,0)
spawnMobile("talus", "commoner",60,367.172,6,-3173.12,183.221,0)
spawnMobile("talus", "commoner",60,363.643,6,-3101.79,116.839,0)
spawnMobile("talus", "commoner",60,397.992,6,-2971.09,265.851,0)
spawnMobile("talus", "commoner",60,396.539,6,-2766.72,177.32,0)
spawnMobile("talus", "commoner",60,394.154,6,-2881.56,326.692,0)
spawnMobile("talus", "commoner",60,300.998,6,-2834.76,229.521,0)
spawnMobile("talus", "commoner",60,461.645,6,-3102.23,29.1923,0)
spawnMobile("talus", "commoner",60,410.654,6,-3168.66,248.965,0)
spawnMobile("talus", "commoner",60,446.566,6,-3185.1,340.794,0)
spawnMobile("talus", "commoner",60,414.639,6,-3135.51,92.351,0)
spawnMobile("talus", "commoner",60,465.773,6,-3227.29,259.579,0)
spawnMobile("talus", "commoner",60,441.088,6,-3236.19,203.513,0)
spawnMobile("talus", "commoner",60,496.362,6,-3235.3,345.662,0)
spawnMobile("talus", "commoner",60,485.667,6,-3155.15,35.1869,0)
spawnMobile("talus", "commoner",60,490.398,6,-3116.09,342.67,0)
spawnMobile("talus", "commoner",60,443.804,6,-3086.88,280.17,0)
spawnMobile("talus", "commoner",60,414.592,6,-3050.06,165.662,0)
spawnMobile("talus", "commoner",60,428.685,6,-3062.96,186.141,0)
spawnMobile("talus", "commoner",60,401.557,6,-3077.13,306.839,0)
spawnMobile("talus", "commoner",60,486.25,6,-3086.37,147.836,0)
spawnMobile("talus", "commoner",60,496.245,6,-3023.32,306.267,0)
spawnMobile("talus", "commoner",60,445.781,6,-2804.69,34.2038,0)
spawnMobile("talus", "commoner",60,481.58,6,-2854.95,110.384,0)
spawnMobile("talus", "commoner",60,452.123,6,-2852.21,99.4841,0)
spawnMobile("talus", "commoner",60,502.633,6,-3188.62,344.156,0)
spawnMobile("talus", "commoner",60,577.79,6,-3188.06,96.2207,0)
spawnMobile("talus", "commoner",60,591.985,6,-3160.63,229.416,0)
spawnMobile("talus", "commoner",60,590.621,6,-3084.82,277.167,0)
spawnMobile("talus", "commoner",60,583.781,6,-3122.28,36.377,0)
spawnMobile("talus", "commoner",60,591.708,6,-2922.8,165,0)
spawnMobile("talus", "commoner",60,582.058,6,-2861.59,201.249,0)
spawnMobile("talus", "commoner",60,580.14,6,-2963.53,62.328,0)
spawnMobile("talus", "commoner",60,574.069,6,-2915.3,346.28,0)
spawnMobile("talus", "commoner",60,529.806,6,-3025.2,345.334,0)
spawnMobile("talus", "commoner",60,579.516,6,-3023.72,48.1011,0)
spawnMobile("talus", "commoner",60,503.439,6,-2948.04,199.091,0)
spawnMobile("talus", "commoner",60,628.7,6,-3182.04,146.936,0)
spawnMobile("talus", "commoner",60,618.663,6,-3101.85,207.963,0)
spawnMobile("talus", "commoner",60,616.017,6,-3121.62,86.0319,0)
spawnMobile("talus", "commoner",60,673,6,-3098.71,244.435,0)
spawnMobile("talus", "commoner",60,645.809,6,-3048.86,17.6429,0)
spawnMobile("talus", "commoner",60,659.973,6,-3064.88,165.982,0)
spawnMobile("talus", "commoner",60,649.197,6,-2940.29,14.1284,0)
spawnMobile("talus", "commoner",60,615.017,6,-3011.17,336.305,0)
spawnMobile("talus", "commoner",60,616.805,6,-2977.16,273.201,0)
spawnMobile("talus", "commoner",60,615.01,6,-2920.76,355.079,0)
spawnMobile("talus", "commoner",60,616.103,6,-2959.56,96.5293,0)
spawnMobile("talus", "commoner",60,692.188,6,-2861.6,143.991,0)
spawnMobile("talus", "commoner",60,620.471,6,-2861.4,170.911,0)
spawnMobile("talus", "commoner",60,639.942,6,-2913.13,154.28,0)
spawnMobile("talus", "commoner",60,709.053,6,-3036.35,323.442,0)
spawnMobile("talus", "commoner",60,721.819,6,-2892.41,331.474,0)
spawnMobile("talus", "commoner",60,709.441,6,-2967.7,167.877,0)
spawnMobile("talus", "eg6_power_droid",60,505.449,6,-3025.94,180.005,0)
spawnMobile("talus", "eg6_power_droid",60,380.738,6,-3030.24,268.183,0)
spawnMobile("talus", "noble",60,367.974,6,-2892.77,10.4074,0)
spawnMobile("talus", "noble",60,498.882,6,-3108.57,95.7697,0)
spawnMobile("talus", "noble",60,624.779,6,-2923.53,258.421,0)
spawnMobile("talus", "scientist",60,426.774,6,-2863.5,106.169,0)
spawnMobile("talus", "scientist",60,629.722,6,-3048.65,343.583,0)
--{"r2",60,207.078,6,-2800.53,272.222,0, "calm", "R2-R2"},
--{"r2",60,504.449,6,-3026.94,180.006,0, "calm", "R2-Y2"},
--{"r3",60,459.915,6,-3089.68,182.021,0, "calm", "R3-U6"},
--{"r3",60,457.915,6,-3090.68,270.018,0, "calm", "R3-W1"},
--{"r3",60,664.839,6,-3061.96,180.006,0, "calm", "R3-T0"},
--{"r5",60,411.254,6,-2862.25,208.889,0, "calm", "R5-D8"},
--{"r5",60,407.095,6,-3036.31,310.529,0, "calm", "R5-R2"},
--Starport
--{"commoner",60,0.904988,0.639421,56.083,180.007,3175356, "conversation", ""},
--{"farmer",60,-1.32019,0.639422,60.6488,180.001,3175356, "conversation", ""},
--{"gambler",60,-0.186001,0.639421,56.083,135.241,3175356, "conversation", ""},
--{"gambler",60,-1.32019,0.639422,59.6488,0,3175356, "conversation", ""},
--{"scoundrel",60,0.904988,0.639421,54.983,360.011,3175356, "conversation", ""},
--{"businessman",60,-32.0259,1.63942,62.9678,180.006,3175361, "conversation", ""},
--{"farmer",60,-32.0259,1.63942,61.8678,360.011,3175361, "conversation", ""},
--{"noble",60,-61.2565,2.63942,40.4022,0,3175364, "conversation", ""},
--{"vendor",60,-61.2565,2.63942,41.5022,180.005,3175364, "conversation", ""},
--{"explorer",60,-62.3565,2.63942,41.5022,135.004,3175364, "conversation", ""},
--{"chassis_broker",60,-56.7086,0.974563,8.24108,43.5461,3175366, "neutral", ""},
--Cantina
spawnMobile("talus", "bartender",60,7.8,-0.9,-1.4,119,3175391)
spawnMobile("talus", "businessman",60,-5.0724,-0.894996,21.4966,284.21,3175397)
--{"medic",60,-44.5373,0.105009,-20.8963,0,3175403, "conversation", ""},
--{"pilot",60,-44.5373,0.104709,-19.7963,180.005,3175403, "conversation", ""},
--{"agriculturalist",60,12.85,-0.894992,1.20077,360.011,3175391, "conversation", ""},
--{"scoundrel",300,12.85,-0.894992,2.30077,180.005,3175391, "conversation", ""},
--{"slicer",60,18.5617,-0.894992,17.5882,360.011,3175393, "conversation", ""},
--{"vendor",60,18.5617,-0.894992,18.6882,180.006,3175393, "conversation", ""},
--{"bounty_hunter",60,34.3579,0.105,2.70668,135.004,3175390, "conversation", ""},
--{"businessman",60,35.4579,0.105,2.70668,180.005,3175390, "conversation", ""},
--{"farmer",60,43.6156,0.104999,0.752079,0,3175389, "conversation", ""},
--{"smuggler",300,43.6156,0.104999,1.85208,180.005,3175389, "conversation", ""},
--Guild Hall
--{"bothan_information_broker",60,-2.33557,1.75,-12.7738,180.008,3175434, "conversation", ""},
--{"brawler",60,-2.33557,1.75,-13.8738,360.011,3175434, "conversation", ""},
--{"farmer",60,-1.18159,2.25,6.74,180.013,3175434, "conversation", ""},
--Guild Hall/Theater
--{"explorer",60,-2.83063,2.6,9.88899,180.005,3175570, "conversation", ""},
spawnMobile("talus", "noble",60,28.93,2.12878,58.19,222.007,3175571)
spawnMobile("talus", "noble",60,19.26,2.12847,56.13,266.008,3175572)
--Hotel
--{"bodyguard",300,-10.227,1.00006,-2.52106,360.011,3175594, "conversation", ""},
--{"brawler",60,-10.227,1.00005,-1.42106,180.007,3175594, "conversation", ""},
--{"commoner",60,25.6926,1.28309,6.24509,0,3175593, "conversation", ""},
--{"miner",60,21.574,1.28309,-2.39703,0,3175593, "conversation", ""},
--{"miner",60,21.574,1.28309,-1.29703,180.005,3175593, "conversation", ""},
--{"pilot",60,20.474,1.28309,-1.29703,135.003,3175593, "conversation", ""},
--{"scientist",60,25.6926,1.28309,7.24509,180.001,3175593, "conversation", ""},
--Capital
--{"bothan_diplomat",60,9.32783,0.3,-0.595898,180.007,6255467, "conversation", ""},
--{"businessman",60,8.22783,0.3,-0.595898,135.005,6255467, "conversation", ""},
--{"fringer",300,9.32783,0.3,-1.6959,360.011,6255467, "conversation", ""},
spawnMobile("talus", "noble",60,22.4751,3.22324,19.4502,107.651,6255473)
spawnMobile("talus", "businessman",60,-18.8153,3.22324,21.6509,252.41,6255472)
end
| agpl-3.0 |
Whitechaser/darkstar | scripts/zones/Sauromugue_Champaign_[S]/npcs/Bulwark_Gate.lua | 4 | 1477 | -----------------------------------
-- Area: Sauromugue Champaign [S]
-- NPC: Bulwark Gate
-- !pos -445 0 342
-- Quest NPC
-----------------------------------
package.loaded["scripts/zones/Sauromugue_Champaign_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/campaign");
require("scripts/zones/Sauromugue_Champaign_[S]/TextIDs");
require("scripts/globals/titles");
require("scripts/globals/quests");
require("scripts/globals/settings");
-----------------------------------
function onTrade(player,npc,trade)
if (player:getQuestStatus(CRYSTAL_WAR, KNOT_QUITE_THERE) == QUEST_ACCEPTED and player:getVar("KnotQuiteThere") == 1) then
if (trade:hasItemQty(2562,1) == true and trade:getGil() == 0 and trade:getItemCount() == 1) then
player:startEvent(106);
end
end
end;
function onTrigger(player,npc)
if (player:getQuestStatus(CRYSTAL_WAR, KNOT_QUITE_THERE) == QUEST_ACCEPTED) then
if (player:getVar("KnotQuiteThere") == 0) then
player:startEvent(105);
end
end
end;
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
function onEventFinish(player,csid,option)
-- printf("CSID:",csid);
-- printf("RESULT:",option);
if (csid == 105) then
player:setVar("KnotQuiteThere",1);
elseif (csid == 106) then
player:tradeComplete();
player:setVar("KnotQuiteThere",2);
end
end; | gpl-3.0 |
DailyShana/ygopro-scripts | c8643186.lua | 3 | 1505 | --DDリクルート
function c8643186.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,8643186+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c8643186.condition)
e1:SetTarget(c8643186.target)
e1:SetOperation(c8643186.operation)
c:RegisterEffect(e1)
end
function c8643186.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function c8643186.filter(c)
return ((c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0xae)) and c:IsAbleToHand()
end
function c8643186.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c8643186.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c8643186.filter,tp,LOCATION_GRAVE,0,1,nil) end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c8643186.filter,tp,LOCATION_GRAVE,0,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c8643186.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/commands/tip.lua | 4 | 2102 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--which carries forward this exception.
--true = 1, false = 0
TipCommand = {
name = "tip",
}
AddCommand(TipCommand)
| agpl-3.0 |
Whitechaser/darkstar | scripts/zones/Castle_Oztroja/npcs/_47l.lua | 5 | 1328 | -----------------------------------
-- Area: Castle Oztroja
-- NPC: _47l (Torch Stand)
-- Notes: Opens door _471 near password #3
-- !pos -45.228 -17.832 22.392 151
-----------------------------------
package.loaded["scripts/zones/Castle_Oztroja/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Castle_Oztroja/TextIDs");
require("scripts/globals/settings");
-----------------------------------
function onTrigger(player,npc)
local DoorID = npc:getID() - 3;
local DoorA = GetNPCByID(DoorID):getAnimation();
local TorchStandA = npc:getAnimation();
local Torch1 = npc:getID();
local Torch2 = npc:getID() + 1;
if (DoorA == 9 and TorchStandA == 9) then
player:startEvent(10);
end
end;
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;
function onEventFinish(player,csid,option)
local Torch1 = GetNPCByID(17396173):getID();
local Torch2 = GetNPCByID(Torch1):getID() + 1;
local DoorID = GetNPCByID(Torch1):getID() - 3;
if (option == 1) then
GetNPCByID(Torch1):openDoor(10); -- Torch Lighting
GetNPCByID(Torch2):openDoor(10); -- Torch Lighting
GetNPCByID(DoorID):openDoor(6);
end
end;
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option); | gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/structure/dantooine/dant_rack_spears.lua | 3 | 2260 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_static_structure_dantooine_dant_rack_spears = object_static_structure_dantooine_shared_dant_rack_spears:new {
}
ObjectTemplates:addTemplate(object_static_structure_dantooine_dant_rack_spears, "object/static/structure/dantooine/dant_rack_spears.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/vehicle/component/adv_hvy_blaster_power_handler.lua | 3 | 2340 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_vehicle_component_adv_hvy_blaster_power_handler = object_draft_schematic_vehicle_component_shared_adv_hvy_blaster_power_handler:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_vehicle_component_adv_hvy_blaster_power_handler, "object/draft_schematic/vehicle/component/adv_hvy_blaster_power_handler.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/mission/quest_item/serjix_arrogantus_q1_needed.lua | 3 | 2308 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_mission_quest_item_serjix_arrogantus_q1_needed = object_tangible_mission_quest_item_shared_serjix_arrogantus_q1_needed:new {
}
ObjectTemplates:addTemplate(object_tangible_mission_quest_item_serjix_arrogantus_q1_needed, "object/tangible/mission/quest_item/serjix_arrogantus_q1_needed.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/poi/corellia_swoop_large2.lua | 2 | 2246 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_building_poi_corellia_swoop_large2 = object_building_poi_shared_corellia_swoop_large2:new {
gameObjectType = 531,
}
ObjectTemplates:addTemplate(object_building_poi_corellia_swoop_large2, "object/building/poi/corellia_swoop_large2.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/food/dish_exo_protein_wafers.lua | 2 | 3257 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_food_dish_exo_protein_wafers = object_draft_schematic_food_shared_dish_exo_protein_wafers:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Exo-Protein Wafers",
craftingToolTab = 4, -- (See DraftSchemticImplementation.h)
complexity = 3,
size = 1,
xpType = "crafting_general",
xp = 30,
assemblySkill = "general_assembly",
experimentingSkill = "general_experimentation",
customizationSkill = "clothing_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_food_ingredients_n", "craft_food_ingredients_n", "craft_food_ingredients_n"},
ingredientTitleNames = {"protein_source", "preservative_wrap", "additive"},
ingredientSlotType = {0, 0, 3},
resourceTypes = {"meat", "hide", "object/tangible/food/crafted/additive/shared_additive_light.iff"},
resourceQuantities = {8, 7, 1},
contribution = {100, 100, 100},
targetTemplate = "object/tangible/food/crafted/dish_exo_protein_wafers.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_food_dish_exo_protein_wafers, "object/draft_schematic/food/dish_exo_protein_wafers.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c47233801.lua | 3 | 1191 | --黒蛇病
function c47233801.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47233801,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c47233801.damcon)
e2:SetTarget(c47233801.damtg)
e2:SetOperation(c47233801.damop)
c:RegisterEffect(e2)
end
function c47233801.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c47233801.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end
function c47233801.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local dam=c:GetFlagEffectLabel(47233801)
if dam==nil then
c:RegisterFlagEffect(47233801,RESET_EVENT+0x1fe0000,0,0,200)
dam=200
else
dam=dam*2
c:SetFlagEffectLabel(47233801,dam)
end
Duel.Damage(tp,dam,REASON_EFFECT)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/crafted/reactor/base_reactor_subcomponent_mk5.lua | 3 | 2324 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_ship_crafted_reactor_base_reactor_subcomponent_mk5 = object_tangible_ship_crafted_reactor_shared_base_reactor_subcomponent_mk5:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_crafted_reactor_base_reactor_subcomponent_mk5, "object/tangible/ship/crafted/reactor/base_reactor_subcomponent_mk5.iff")
| agpl-3.0 |
EddyK69/domoticz | dzVents/runtime/Domoticz.lua | 5 | 16885 | local scriptPath = globalvariables['script_path']
package.path = package.path .. ';' .. scriptPath .. '?.lua'
local Device = require('Device')
local Variable = require('Variable')
local Time = require('Time')
local TimedCommand = require('TimedCommand')
local utils = require('Utils')
local _ = require('lodash')
-- simple string splitting method
-- coz crappy LUA doesn't have this natively... *sigh*
function string:split(sep)
local sep, fields = sep or ":", {}
local pattern = string.format("([^%s]+)", sep)
self:gsub(pattern, function(c) fields[#fields + 1] = c end)
return fields
end
-- main class
local function Domoticz(settings)
local sNow, now, nowTime
if (_G.TESTMODE and _G.TESTTIME) then
sNow = 2017 .. '-' .. 6 .. '-' .. 13 .. ' ' .. 12 .. ':' .. 5 .. ':' .. 0
nowTime = Time(sNow)
else
nowTime = Time()
end
-- check if the user set a lat/lng
-- if not, then daytime, nighttime is incorrect
if (_G.timeofday['SunriseInMinutes'] == 0 and _G.timeofday['SunsetInMinutes'] == 0) then
utils.log('No information about sunrise and sunset available. Please set lat/lng information in settings.', utils.LOG_ERROR)
end
nowTime['isDayTime'] = timeofday['Daytime']
nowTime['isNightTime'] = timeofday['Nighttime']
nowTime['sunriseInMinutes'] = timeofday['SunriseInMinutes']
nowTime['sunsetInMinutes'] = timeofday['SunsetInMinutes']
-- the new instance
local self = {
['settings'] = settings,
['commandArray'] = {},
['devices'] = {},
['scenes'] = {},
['groups'] = {},
['changedDevices'] = {},
['changedVariables'] = {},
['security'] = globalvariables['Security'],
['radixSeparator'] = globalvariables['radix_separator'],
['time'] = nowTime,
['startTime'] = Time(globalvariables['domoticz_start_time']),
['systemUptime'] = tonumber(globalvariables['systemUptime']),
['variables'] = {},
['PRIORITY_LOW'] = -2,
['PRIORITY_MODERATE'] = -1,
['PRIORITY_NORMAL'] = 0,
['PRIORITY_HIGH'] = 1,
['PRIORITY_EMERGENCY'] = 2,
['SOUND_DEFAULT'] = 'pushover',
['SOUND_BIKE'] = 'bike',
['SOUND_BUGLE'] = 'bugle',
['SOUND_CASH_REGISTER'] = 'cashregister',
['SOUND_CLASSICAL'] = 'classical',
['SOUND_COSMIC'] = 'cosmic',
['SOUND_FALLING'] = 'falling',
['SOUND_GAMELAN'] = 'gamelan',
['SOUND_INCOMING'] = 'incoming',
['SOUND_INTERMISSION'] = 'intermission',
['SOUND_MAGIC'] = 'magic',
['SOUND_MECHANICAL'] = 'mechanical',
['SOUND_PIANOBAR'] = 'pianobar',
['SOUND_SIREN'] = 'siren',
['SOUND_SPACEALARM'] = 'spacealarm',
['SOUND_TUGBOAT'] = 'tugboat',
['SOUND_ALIEN'] = 'alien',
['SOUND_CLIMB'] = 'climb',
['SOUND_PERSISTENT'] = 'persistent',
['SOUND_ECHO'] = 'echo',
['SOUND_UPDOWN'] = 'updown',
['SOUND_NONE'] = 'none',
['HUM_NORMAL'] = 0,
['HUM_COMFORTABLE'] = 1,
['HUM_DRY'] = 2,
['HUM_WET'] = 3,
-- true mapping to numbers is done in the device adapters for
-- baro and temphumbaro devices
['BARO_STABLE'] = 'stable',
['BARO_SUNNY'] = 'sunny',
['BARO_CLOUDY'] = 'cloudy',
['BARO_UNSTABLE'] = 'unstable',
['BARO_THUNDERSTORM'] = 'thunderstorm',
['BARO_NOINFO'] = 'noinfo',
['BARO_PARTLYCLOUDY'] = 'partlycloudy',
['BARO_RAIN'] = 'rain',
['ALERTLEVEL_GREY'] = 0,
['ALERTLEVEL_GREEN'] = 1,
['ALERTLEVEL_YELLOW'] = 2,
['ALERTLEVEL_ORANGE'] = 3,
['ALERTLEVEL_RED'] = 4,
['SECURITY_DISARMED'] = 'Disarmed',
['SECURITY_ARMEDAWAY'] = 'Armed Away',
['SECURITY_ARMEDHOME'] = 'Armed Home',
['LOG_INFO'] = utils.LOG_INFO,
['LOG_MODULE_EXEC_INFO'] = utils.LOG_MODULE_EXEC_INFO,
['LOG_DEBUG'] = utils.LOG_DEBUG,
['LOG_ERROR'] = utils.LOG_ERROR,
['LOG_FORCE'] = utils.LOG_FORCE,
['EVENT_TYPE_TIMER'] = 'timer',
['EVENT_TYPE_DEVICE'] = 'device',
['EVENT_TYPE_VARIABLE'] = 'variable',
['EVENT_TYPE_SECURITY'] = 'security',
['EVENT_TYPE_SCENE'] = 'scene',
['EVENT_TYPE_GROUP'] = 'group',
['EVENT_TYPE_HTTPRESPONSE'] = 'httpResponse',
['EVOHOME_MODE_AUTO'] = 'Auto',
['EVOHOME_MODE_TEMPORARY_OVERRIDE'] = 'TemporaryOverride',
['EVOHOME_MODE_PERMANENT_OVERRIDE'] = 'PermanentOverride',
['INTEGER'] = 'integer',
['FLOAT'] = 'float',
['STRING'] = 'string',
['DATE'] = 'date',
['TIME'] = 'time',
['NSS_GOOGLE_CLOUD_MESSAGING'] = 'gcm',
['NSS_HTTP'] = 'http',
['NSS_KODI'] = 'kodi',
['NSS_LOGITECH_MEDIASERVER'] = 'lms',
['NSS_NMA'] = 'nma',
['NSS_PROWL'] = 'prowl',
['NSS_PUSHALOT'] = 'pushalot',
['NSS_PUSHBULLET'] = 'pushbullet',
['NSS_PUSHOVER'] = 'pushover',
['NSS_PUSHSAFER'] = 'pushsafer',
['BASETYPE_DEVICE'] = 'device',
['BASETYPE_SCENE'] = 'scene',
['BASETYPE_GROUP'] = 'group',
['BASETYPE_VARIABLE'] = 'variable',
['BASETYPE_SECURITY'] = 'security',
['BASETYPE_TIMER'] = 'timer',
['BASETYPE_HTTP_RESPONSE'] = 'httpResponse',
utils = {
_ = _,
toCelsius = function(f, relative)
if (relative) then
return f*(1/1.8)
end
return ((f-32) / 1.8)
end,
urlEncode = function(s, strSub)
return utils.urlEncode(s, strSub)
end,
round = function(x, n)
n = math.pow(10, n or 0)
x = x * n
if x >= 0 then
x = math.floor(x + 0.5)
else
x = math.ceil(x - 0.5)
end
return x / n
end,
osExecute = function(cmd)
utils.osExecute(cmd)
end,
fileExists = function(path)
return utils.fileExists(path)
end,
fromJSON = function(json)
return utils.fromJSON(json)
end,
toJSON = function(luaTable)
return utils.toJSON(luaTable)
end,
rgbToHSB = function(r, g, b)
return utils.rgbToHSB(r,g,b)
end
}
}
-- add domoticz commands to the commandArray
function self.sendCommand(command, value)
table.insert(self.commandArray, { [command] = value })
-- return a reference to the newly added item
return self.commandArray[#self.commandArray], command, value
end
-- have domoticz send a push notification
function self.notify(subject, message, priority, sound, extra, subSystems)
-- set defaults
if (priority == nil) then priority = self.PRIORITY_NORMAL end
if (message == nil) then message = '' end
if (sound == nil) then sound = self.SOUND_DEFAULT end
if (extra == nil) then extra = '' end
local _subSystem
if (subSystems == nil) then
_subSystem = ''
else
-- combine
if (type(subSystems) == 'table') then
_subSystem = table.concat(subSystems, ";")
elseif (type(subSystems) == 'string') then
_subSystem = subSystems
else
_subSystem = ''
end
end
local data = subject
.. '#' .. message
.. '#' .. tostring(priority)
.. '#' .. tostring(sound)
.. '#' .. tostring(extra)
.. '#' .. tostring(_subSystem)
self.sendCommand('SendNotification', data)
end
-- have domoticz send an email
function self.email(subject, message, mailTo)
if (mailTo == nil) then
utils.log('No mail-to is provided', utils.LOG_ERROR)
else
if (subject == nil) then subject = '' end
if (message == nil) then message = '' end
self.sendCommand('SendEmail', subject .. '#' .. message .. '#' .. mailTo)
end
end
-- have domoticz send an sms
function self.sms(message)
self.sendCommand('SendSMS', message)
end
-- have domoticz open a url
function self.openURL(options)
if (type(options) == 'string') then
options = {
url = options,
method = 'GET'
}
end
if (type(options) == 'table') then
local url = options.url
local method = string.upper(options.method or 'GET')
local callback = options.callback
local postData
-- process body data
if (method == 'POST') then
postData = ''
if (options.postData ~= nil) then
if (type(options.postData) == 'table') then
postData = utils.toJSON(options.postData)
if (options.headers == nil) then
options.headers = { ['Content-Type'] = 'application/json' }
end
else
postData = options.postData
end
end
end
local request = {
URL = url,
method = method,
headers = options.headers,
postdata = postData,
_trigger = callback,
}
utils.log('OpenURL: url = ' .. _.str(request.URL), utils.LOG_DEBUG)
utils.log('OpenURL: method = ' .. _.str(request.method), utils.LOG_DEBUG)
utils.log('OpenURL: post data = ' .. _.str(request.postdata), utils.LOG_DEBUG)
utils.log('OpenURL: headers = ' .. _.str(request.headers), utils.LOG_DEBUG)
utils.log('OpenURL: callback = ' .. _.str(request._trigger), utils.LOG_DEBUG)
return TimedCommand(self, 'OpenURL', request, 'updatedevice')
else
utils.log('OpenURL: Invalid arguments, use either a string or a table with options', utils.LOG_ERROR)
end
end
-- send a scene switch command
function self.setScene(scene, value)
utils.log('setScene is deprecated. Please use the scene object directly.', utils.LOG_INFO)
return TimedCommand(self, 'Scene:' .. scene, value, 'device', scene.state)
end
-- send a group switch command
function self.switchGroup(group, value)
utils.log('switchGroup is deprecated. Please use the group object directly.', utils.LOG_INFO)
return TimedCommand(self, 'Group:' .. group, value, 'device', group.state)
end
if (_G.TESTMODE) then
function self._getUtilsInstance()
return utils
end
end
function self.log(message, level)
utils.log(message, level)
end
local function dumpTable(t, level)
for attr, value in pairs(t) do
if (type(value) ~= 'function') then
if (type(value) == 'table') then
print(level .. attr .. ':')
dumpTable(value, level .. ' ')
else
print(level .. attr .. ': ' .. tostring(value))
end
else
print(level .. attr .. '()')
end
end
end
function self.toCelsius(f, relative)
utils.log('domoticz.toCelsius deprecated. Please use domoticz.utils.toCelsius.', utils.LOG_INFO)
return self.utils.toCelsius(f, relative)
end
function self.urlEncode(s, strSub)
utils.log('domoticz.urlEncode deprecated. Please use domoticz.utils.urlEncode.', utils.LOG_INFO)
return self.utils.urlEncode(s, strSub)
end
function self.round(x, n)
utils.log('domoticz.round deprecated. Please use domoticz.utils.round.', utils.LOG_INFO)
return self.utils.round(x, n)
end
-- doesn't seem to work well for some weird reasone
function self.logDevice(device)
dumpTable(device, '> ')
end
self.__devices = {}
self.__scenes = {}
self.__groups = {}
self.__variables = {}
function self._getItemFromData(baseType, id)
local res
for index, item in pairs(_G.domoticzData) do
if (item.baseType == baseType) then
if (item.id == id or item.name == id) then
if (res == nil) then
res = item
else
utils.log('Multiple items found for ' .. tostring(id) .. ' (' .. tostring(baseType) .. '). Please make sure your names are unique or use ids instead.', utils.LOG_ERROR)
end
end
end
end
return res
end
function self._getObject(baseType, id, data)
local cache
local constructor
if (baseType == 'device') then
cache = self.__devices
constructor = Device
elseif (baseType == 'group') then
cache = self.__groups
constructor = Device
elseif (baseType == 'scene') then
cache = self.__scenes
constructor = Device
elseif (baseType == 'uservariable') then
cache = self.__variables
constructor = Variable
else
-- ehhhh
end
local item = cache[id]
if (item ~= nil) then
return item
end
if (data == nil) then
data = self._getItemFromData(baseType, id)
end
if (data ~= nil) then
local newItem = constructor(self, data)
cache[data.id] = newItem
cache[data.name] = newItem
return newItem
end
-- special case for scenes and groups
-- as they may not be in the collection if Domoticz wasn't restarted after creating the scene or group.
if (baseType == 'scene' or baseType == 'group') then
utils.log('There is no group or scene with that name or id: ' ..
tostring(id) ..
'. If you just created the scene or group you may have to restart Domoticz to make it become visible to dzVents.', utils.LOG_ERROR)
else
utils.log('There is no ' .. baseType .. ' with that name or id: ' .. tostring(id), utils.LOG_ERROR)
end
end
function self._setIterators(collection, initial, baseType, filterForChanged, initalCollection)
local _collection
if (initial) then
if (initalCollection == nil) then
_collection = _G.domoticzData
else
_collection = initalCollection
end
else
_collection = collection
end
collection['forEach'] = function(func)
local res
for i, item in pairs(_collection) do
local _item
if (initial) then
if (item.baseType == baseType) and (filterForChanged == true and item.changed == true or filterForChanged == false) then
_item = self._getObject(baseType, item.id, item) -- create the device object or get it from the cache
end
else
_item = item
end
if (_item and type(_item) ~= 'function' and ((initial == true and type(i) == 'number') or (initial == false and type(i) ~= number))) then
res = func(_item)
if (res == false) then -- abort
return
end
end
end
end
collection['find'] = function(func)
local res
local ret
for i, item in pairs(_collection) do
local _item
if (initial) then
if (item.baseType == baseType) and (filterForChanged == true and item.changed == true or filterForChanged == false) then
_item = self._getObject(baseType, item.id, item) -- create the device object or get it from the cache
end
else
_item = item
end
if (_item and type(_item) ~= 'function' and ((initial == true and type(i) == 'number') or (initial == false and type(i) ~= number))) then
ret = func(_item)
if (ret == true) then
return _item
end
end
end
end
collection['reduce'] = function(func, accumulator)
for i, item in pairs(_collection) do
local _item
if (initial) then
if (item.baseType == baseType) and (filterForChanged == true and item.changed == true or filterForChanged == false) then
_item = self._getObject(baseType, item.id, item) -- create the device object or get it from the cache
end
else
_item = item
end
if (_item and type(_item) ~= 'function' and ((initial == true and type(i) == 'number') or (initial == false and type(i) ~= number))) then
accumulator = func(accumulator, _item)
end
end
return accumulator
end
collection['filter'] = function(filter)
local res = {}
for i, item in pairs(_collection) do
local _item
if (initial) then
if (item.baseType == baseType) and (filterForChanged == true and item.changed == true or filterForChanged == false) then
_item = self._getObject(baseType, item.id, item) -- create the device object or get it from the cache
end
else
_item = item
end
if (_item and type(_item) ~= 'function' and ( (initial == true and type(i) == 'number') or (initial == false and type(i) ~= number))) then
if (type(filter) == 'function') then
if (filter(_item)) then
res[i] = _item
end
elseif (type(filter) == 'table') then
-- assume a list of names
for i, filterItem in pairs(filter) do
if (_item[ (type(filterItem) == 'number') and 'id' or 'name' ] == filterItem) then
res[i] = _item
break
end
end
else
--unsupported
utils.log('Please provide either a function or a table with names/ids to the filter.', utils.LOG_ERROR)
end
end
end
self._setIterators(res, false, baseType)
return res
end
return collection
end
function self.devices(id)
if (id ~= nil) then
return self._getObject('device', id)
else
return self._setIterators({}, true, 'device', false)
end
end
function self.groups(id)
if (id ~= nil) then
return self._getObject('group', id)
else
return self._setIterators({}, true, 'group', false)
end
end
function self.scenes(id)
if (id ~= nil) then
return self._getObject('scene', id)
else
return self._setIterators({}, true, 'scene', false)
end
end
function self.variables(id)
if (id ~= nil) then
return self._getObject('uservariable', id)
else
return self._setIterators({}, true, 'uservariable', false)
end
end
function self.changedDevices(id)
if (id ~= nil) then
return self._getObject('device', id)
else
return self._setIterators({}, true, 'device', true)
end
end
function self.changedScenes(id)
if (id ~= nil) then
return self._getObject('scene', id)
else
return self._setIterators({}, true, 'scene', true)
end
end
function self.changedGroups(id)
if (id ~= nil) then
return self._getObject('group', id)
else
return self._setIterators({}, true, 'group', true)
end
end
function self.changedVariables(id)
if (id ~= nil) then
return self._getObject('uservariable', id)
else
return self._setIterators({}, true, 'uservariable', true)
end
end
return self
end
return Domoticz
| gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/clothing/component/clothing_synthetic_cloth.lua | 2 | 3370 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_clothing_component_clothing_synthetic_cloth = object_draft_schematic_clothing_component_shared_clothing_synthetic_cloth:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Synthetic Cloth",
craftingToolTab = 8, -- (See DraftSchemticImplementation.h)
complexity = 15,
size = 2,
xpType = "crafting_clothing_general",
xp = 45,
assemblySkill = "clothing_assembly",
experimentingSkill = "clothing_experimentation",
customizationSkill = "clothing_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n"},
ingredientTitleNames = {"fiber_stock", "strengthening_polymer", "enhancement"},
ingredientSlotType = {0, 0, 3},
resourceTypes = {"fiberplast", "petrochem_inert", "object/tangible/component/bio/shared_base_bio_component_clothing_casual.iff"},
resourceQuantities = {16, 4, 1},
contribution = {100, 100, 100},
targetTemplate = "object/tangible/component/clothing/synthetic_cloth.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_clothing_component_clothing_synthetic_cloth, "object/draft_schematic/clothing/component/clothing_synthetic_cloth.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/battlefield_marker/battlefield_marker_256m.lua | 3 | 2256 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_battlefield_marker_battlefield_marker_256m = object_battlefield_marker_shared_battlefield_marker_256m:new {
}
ObjectTemplates:addTemplate(object_battlefield_marker_battlefield_marker_256m, "object/battlefield_marker/battlefield_marker_256m.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/loot/loot_schematic/cantina_chair_schematic.lua | 2 | 2606 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_loot_loot_schematic_cantina_chair_schematic = object_tangible_loot_loot_schematic_shared_cantina_chair_schematic:new {
templateType = LOOTSCHEMATIC,
objectMenuComponent = {"cpp", "LootSchematicMenuComponent"},
attributeListComponent = "LootSchematicAttributeListComponent",
requiredSkill = "crafting_artisan_master",
targetDraftSchematic = "object/draft_schematic/furniture/furniture_chair_cantina.iff",
targetUseCount = 1,
}
ObjectTemplates:addTemplate(object_tangible_loot_loot_schematic_cantina_chair_schematic, "object/tangible/loot/loot_schematic/cantina_chair_schematic.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/structure/general/poi_tato_farm_32x32_s01.lua | 3 | 2280 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_static_structure_general_poi_tato_farm_32x32_s01 = object_static_structure_general_shared_poi_tato_farm_32x32_s01:new {
}
ObjectTemplates:addTemplate(object_static_structure_general_poi_tato_farm_32x32_s01, "object/static/structure/general/poi_tato_farm_32x32_s01.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c46181000.lua | 5 | 1314 | --前線基地
function c46181000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46181000,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(c46181000.target)
e1:SetOperation(c46181000.operation)
c:RegisterEffect(e1)
end
function c46181000.filter(c,e,sp)
return c:IsType(TYPE_UNION) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c46181000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c46181000.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c46181000.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c46181000.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
| gpl-2.0 |
Whitechaser/darkstar | scripts/globals/weaponskills/tachi_yukikaze.lua | 2 | 1860 | -----------------------------------
-- Tachi Yukikaze
-- Great Katana weapon skill
-- Skill Level: 200 (Samurai only.)
-- Blinds target. Damage varies with TP.
-- Blind effect duration is 60 seconds when unresisted.
-- Will stack with Sneak Attack.
-- Tachi: Yukikaze appears to have an attack bonus of 50%. http://www.bg-wiki.com/bg/Tachi:_Yukikaze
-- Aligned with the Snow Gorget & Breeze Gorget.
-- Aligned with the Snow Belt & Breeze Belt.
-- Element: None
-- Modifiers: STR:75%
-- 100%TP 200%TP 300%TP
-- 1.5625 2.6875 4.125
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/settings");
require("scripts/globals/weaponskills");
-----------------------------------
function onUseWeaponSkill(player, target, wsID, tp, primary, action, taChar)
local params = {};
params.numHits = 1;
params.ftp100 = 1.5625; params.ftp200 = 1.88; params.ftp300 = 2.5;
params.str_wsc = 0.75; params.dex_wsc = 0.0; params.vit_wsc = 0.0; params.agi_wsc = 0.0; params.int_wsc = 0.0; params.mnd_wsc = 0.0; params.chr_wsc = 0.0;
params.crit100 = 0.0; params.crit200 = 0.0; params.crit300 = 0.0;
params.canCrit = false;
params.acc100 = 0.0; params.acc200= 0.0; params.acc300= 0.0;
params.atkmulti = 1.33;
if (USE_ADOULIN_WEAPON_SKILL_CHANGES == true) then
params.ftp200 = 2.6875; params.ftp300 = 4.125;
params.atkmulti = 1.5;
end
local damage, criticalHit, tpHits, extraHits = doPhysicalWeaponskill(player, target, wsID, tp, primary, action, taChar, params);
if (damage > 0 and target:hasStatusEffect(dsp.effects.BLINDNESS) == false) then
local duration = 60 * applyResistanceAddEffect(player,target,ELE_DARK,0)
target:addStatusEffect(dsp.effects.BLINDNESS, 25, 0, duration);
end
return tpHits, extraHits, criticalHit, damage;
end
| gpl-3.0 |
Whitechaser/darkstar | scripts/zones/Apollyon/mobs/Ice_Elemental.lua | 35 | 2314 | -----------------------------------
-- Area: Apollyon SW
-- NPC: elemental
-----------------------------------
package.loaded["scripts/zones/Apollyon/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Apollyon/TextIDs");
-----------------------------------
function onMobSpawn(mob)
end;
function onMobEngaged(mob,target)
end;
function onMobDeath(mob, player, isKiller)
end;
function onMobDespawn(mob)
local mobID = mob:getID();
-- print(mobID);
local mobX = mob:getXPos();
local mobY = mob:getYPos();
local mobZ = mob:getZPos();
local elementalday = GetServerVariable("[SW_Apollyon]ElementalTrigger") - 1;
local correctelement=false;
switch (elementalday): caseof {
[0] = function (x)
if (mobID==16932913 or mobID==16932921 or mobID==16932929) then
correctelement=true;
end
end ,
[1] = function (x)
if (mobID==16932912 or mobID==16932920 or mobID==16932928 ) then
correctelement=true;
end
end ,
[2] = function (x)
if (mobID==16932916 or mobID==16932924 or mobID==16932932 ) then
correctelement=true;
end
end ,
[3] = function (x)
if (mobID==16932910 or mobID==16932918 or mobID==16932926 ) then
correctelement=true;
end
end ,
[4] = function (x)
if (mobID==16932914 or mobID==16932922 or mobID==16932930 ) then
correctelement=true;
end
end ,
[5] = function (x)
if (mobID==16932917 or mobID==16932925 or mobID==16932933 ) then
correctelement=true;
end
end ,
[6] = function (x)
if (mobID==16932931 or mobID==16932915 or mobID==16932923 ) then
correctelement=true;
end
end ,
[7] = function (x)
if (mobID==16932911 or mobID==16932919 or mobID==16932927 ) then
correctelement=true;
end
end ,
};
if (correctelement==true and IselementalDayAreDead() == true) then
GetNPCByID(16932864+313):setPos(mobX,mobY,mobZ);
GetNPCByID(16932864+313):setStatus(STATUS_NORMAL);
end
end; | gpl-3.0 |
Whitechaser/darkstar | scripts/zones/Apollyon/mobs/Air_Elemental.lua | 35 | 2314 | -----------------------------------
-- Area: Apollyon SW
-- NPC: elemental
-----------------------------------
package.loaded["scripts/zones/Apollyon/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/limbus");
require("scripts/zones/Apollyon/TextIDs");
-----------------------------------
function onMobSpawn(mob)
end;
function onMobEngaged(mob,target)
end;
function onMobDeath(mob, player, isKiller)
end;
function onMobDespawn(mob)
local mobID = mob:getID();
-- print(mobID);
local mobX = mob:getXPos();
local mobY = mob:getYPos();
local mobZ = mob:getZPos();
local elementalday = GetServerVariable("[SW_Apollyon]ElementalTrigger") - 1;
local correctelement=false;
switch (elementalday): caseof {
[0] = function (x)
if (mobID==16932913 or mobID==16932921 or mobID==16932929) then
correctelement=true;
end
end ,
[1] = function (x)
if (mobID==16932912 or mobID==16932920 or mobID==16932928 ) then
correctelement=true;
end
end ,
[2] = function (x)
if (mobID==16932916 or mobID==16932924 or mobID==16932932 ) then
correctelement=true;
end
end ,
[3] = function (x)
if (mobID==16932910 or mobID==16932918 or mobID==16932926 ) then
correctelement=true;
end
end ,
[4] = function (x)
if (mobID==16932914 or mobID==16932922 or mobID==16932930 ) then
correctelement=true;
end
end ,
[5] = function (x)
if (mobID==16932917 or mobID==16932925 or mobID==16932933 ) then
correctelement=true;
end
end ,
[6] = function (x)
if (mobID==16932931 or mobID==16932915 or mobID==16932923 ) then
correctelement=true;
end
end ,
[7] = function (x)
if (mobID==16932911 or mobID==16932919 or mobID==16932927 ) then
correctelement=true;
end
end ,
};
if (correctelement==true and IselementalDayAreDead() == true) then
GetNPCByID(16932864+313):setPos(mobX,mobY,mobZ);
GetNPCByID(16932864+313):setStatus(STATUS_NORMAL);
end
end; | gpl-3.0 |
DailyShana/ygopro-scripts | c91819979.lua | 6 | 2234 | --マジックブラスト
function c91819979.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c91819979.damtg)
e1:SetOperation(c91819979.damop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91819979,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c91819979.thcon)
e2:SetTarget(c91819979.thtg)
e2:SetOperation(c91819979.thop)
c:RegisterEffect(e2)
end
function c91819979.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c91819979.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c91819979.cfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=Duel.GetMatchingGroupCount(c91819979.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end
function c91819979.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(c91819979.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.Damage(p,ct*200,REASON_EFFECT)
end
function c91819979.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function c91819979.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
_replace_count=0
_replace_max=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c91819979.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
_replace_count=_replace_count+1
if _replace_count<=_replace_max and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
| gpl-2.0 |
KingRaptor/Zero-K | effects/gate.lua | 18 | 7475 | -- gate_teleport_smoke
-- gate_teleport
-- gate_teleport_circle_lightning
-- gate_teleport_glow
-- gate_teleport_rgroundflash
-- gate_teleport_circle_lightning_single
-- gate
-- gate_teleport_ygroundflash
return {
["gate_teleport_smoke"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
airdrag = 1,
colormap = [[0 0 0 0.01 0.3 0.3 0.3 0.3 0 0 0 0.01]],
directional = true,
emitrot = 0,
emitrotspread = 0,
emitvector = [[-0, 1, 0]],
gravity = [[0, 0.2, 0]],
numparticles = 1,
particlelife = 10,
particlelifespread = 20,
particlesize = 1,
particlesizespread = 0,
particlespeed = 0,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 1,
sizemod = 1.0,
texture = [[smokesmall]],
},
},
},
["gate_teleport"] = {
boom = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
delay = 0,
explosiongenerator = [[custom:PARIS]],
pos = [[0, 0, 0]],
},
},
glow = {
air = true,
class = [[CExpGenSpawner]],
count = 2,
ground = true,
water = true,
underwater = true,
properties = {
delay = [[0 i2]],
explosiongenerator = [[custom:GATE_TELEPORT_GLOW]],
pos = [[0, 0, 0]],
},
},
rcircle = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
delay = [[55 i10]], -- [[110 i20]],
explosiongenerator = [[custom:GATE_TELEPORT_RGROUNDFLASH]],
pos = [[0, 0, 0]],
},
},
smoke = {
air = true,
class = [[CExpGenSpawner]],
count = 30,
ground = true,
water = true,
underwater = true,
properties = {
delay = [[80r62]],
explosiongenerator = [[custom:GATE_TELEPORT_SMOKE]],
pos = [[120 r-240, 0, 120 r-240]],
},
},
ycircle = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
delay = [[30 r10]], -- [[60 r20]],
explosiongenerator = [[custom:GATE_TELEPORT_YGROUNDFLASH]],
pos = [[0, 0, 0]],
},
},
},
["gate_teleport_circle_lightning"] = {
["electric circle5"] = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
delay = 0,
explosiongenerator = [[custom:GATE_TELEPORT_CIRCLE_LIGHTNING_SINGLE]],
pos = [[26 r-52, 0, 26 r-52]],
},
},
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 0.3,
flashsize = 46,
ttl = 3,
underwater = true,
color = {
[1] = 0.5,
[2] = 0.5,
[3] = 1,
},
},
},
["gate_teleport_glow"] = {
glow = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
airdrag = 1,
colormap = [[0 0 0 0.01 1 1 1 1 0 0 0 0.01]],
directional = true,
emitrot = 0,
emitrotspread = 180,
emitvector = [[-0, 1, 0]],
gravity = [[0, 0.00, 0]],
numparticles = 1,
particlelife = 200,
particlelifespread = 0,
particlesize = 100,
particlesizespread = 10,
particlespeed = 0.1,
particlespeedspread = 0,
pos = [[0, 60, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[circularthingy]],
},
},
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 1,
flashsize = 200,
ttl = 90, --180,
underwater = true,
color = {
[1] = 0.80000001192093,
[2] = 0.80000001192093,
[3] = 1,
},
},
},
["gate_teleport_rgroundflash"] = {
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 1,
flashsize = 150,
ttl = 60, --120,
underwater = true,
color = {
[1] = 1,
[2] = 0.20000000298023,
[3] = 0,
},
},
},
["gate_teleport_circle_lightning_single"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
airdrag = 0.5,
colormap = [[1 1 1 0.01 1 1 1 0.01]],
directional = true,
emitrot = 0,
emitrotspread = 0,
emitvector = [[0, 1, 0]],
gravity = [[0.01 r-0.02, 0.01 r-0.02, 0.01 r-0.01]],
numparticles = 1,
particlelife = 2,
particlelifespread = 0,
particlesize = 10,
particlesizespread = 30,
particlespeed = 0,
particlespeedspread = 0,
pos = [[0, 1, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[lightb]],
},
},
},
["gate"] = {
boom = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
underwater = true,
properties = {
delay = 0,
explosiongenerator = [[custom:GATE_TELEPORT]],
pos = [[0, 0, 0]],
},
},
},
["gate_teleport_ygroundflash"] = {
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 1,
flashsize = 150,
ttl = 75, --150,
underwater = true,
color = {
[1] = 1,
[2] = 1,
[3] = 0.20000000298023,
},
},
},
}
| gpl-2.0 |
Whitechaser/darkstar | scripts/globals/abilities/pets/attachments/auto-repair_kit_ii.lua | 4 | 1133 | -----------------------------------
-- Attachment: Auto-repair Kit II
-----------------------------------
require("scripts/globals/status");
function onEquip(pet)
pet:addMod(MOD_HPP, 13)
end
function onUnequip(pet)
pet:delMod(MOD_HPP, 13)
end
function onManeuverGain(pet,maneuvers)
local bonus = 0
local frame = pet:getAutomatonFrame()
if frame == 0x20 or frame == 0x21 then bonus = 2 end
if (maneuvers == 1) then
pet:addMod(MOD_REGEN, 11 + bonus);
elseif (maneuvers == 2) then
if frame == 0x22 then bonus = 1 end
pet:addMod(MOD_REGEN, 11 + bonus);
elseif (maneuvers == 3) then
pet:addMod(MOD_REGEN, 11 + bonus);
end
end
function onManeuverLose(pet,maneuvers)
local bonus = 0
local frame = pet:getAutomatonFrame()
if frame == 0x20 or frame == 0x21 then bonus = 2 end
if (maneuvers == 1) then
pet:delMod(MOD_REGEN, 11 + bonus);
elseif (maneuvers == 2) then
if frame == 0x22 then bonus = 1 end
pet:delMod(MOD_REGEN, 11 + bonus);
elseif (maneuvers == 3) then
pet:delMod(MOD_REGEN, 11 + bonus);
end
end
| gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_cobral_bandit_bith_male_01.lua | 3 | 2252 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_dressed_cobral_bandit_bith_male_01 = object_mobile_shared_dressed_cobral_bandit_bith_male_01:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_cobral_bandit_bith_male_01, "object/mobile/dressed_cobral_bandit_bith_male_01.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c85505315.lua | 5 | 1958 | --インヴェルズ・マディス
function c85505315.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(85505315,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c85505315.condition)
e1:SetCost(c85505315.cost)
e1:SetTarget(c85505315.target)
e1:SetOperation(c85505315.operation)
c:RegisterEffect(e1)
--tribute check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c85505315.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c85505315.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x100a) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c85505315.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1
end
function c85505315.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c85505315.filter(c,e,tp)
return c:IsSetCard(0x100a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c85505315.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c85505315.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c85505315.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c85505315.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c85505315.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/piket/serverobjects.lua | 3 | 2158 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--Children folder includes
-- Server Objects
includeFile("tangible/lair/piket/lair_piket.lua")
includeFile("tangible/lair/piket/lair_piket_grassland.lua")
| agpl-3.0 |
DailyShana/ygopro-scripts | c24943456.lua | 9 | 1184 | --TG パワー・グラディエイター
function c24943456.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x27),1)
c:EnableReviveLimit()
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24943456,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c24943456.drcon)
e2:SetTarget(c24943456.drtg)
e2:SetOperation(c24943456.drop)
c:RegisterEffect(e2)
end
function c24943456.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c24943456.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c24943456.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/commands/eat.lua | 4 | 2102 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--which carries forward this exception.
--true = 1, false = 0
EatCommand = {
name = "eat",
}
AddCommand(EatCommand)
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/dathomir/nightsister_stalker.lua | 2 | 1513 | nightsister_stalker = Creature:new {
objectName = "@mob/creature_names:nightsister_stalker",
randomNameType = NAME_GENERIC_TAG,
socialGroup = "nightsister",
faction = "nightsister",
level = 96,
chanceHit = 0.85,
damageMin = 595,
damageMax = 900,
baseXp = 9150,
baseHAM = 20000,
baseHAMmax = 25000,
armor = 1,
resists = {45,100,45,100,100,100,100,100,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = AGGRESSIVE + ATTACKABLE + ENEMY,
creatureBitmask = PACK + KILLER + STALKER,
optionsBitmask = 128,
diet = HERBIVORE,
templates = {"object/mobile/dressed_dathomir_nightsister_stalker.iff"},
lootGroups = {
{
groups = {
{group = "crystals_okay", chance = 500000},
{group = "color_crystals", chance = 500000},
{group = "nightsister_common", chance = 2000000},
{group = "armor_attachments", chance = 250000},
{group = "clothing_attachments", chance = 250000},
{group = "melee_weapons", chance = 2500000},
{group = "rifles", chance = 1000000},
{group = "pistols", chance = 1000000},
{group = "carbines", chance = 1000000},
{group = "wearables_common", chance = 500000},
{group = "wearables_uncommon", chance = 500000}
}
}
},
weapons = {"mixed_force_weapons"},
conversationTemplate = "",
attacks = merge(pikemanmaster,brawlermaster,forcewielder)
}
CreatureTemplates:addCreatureTemplate(nightsister_stalker, "nightsister_stalker")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_untrained_wielder_of_the_darkside.lua | 3 | 2280 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_mobile_dressed_untrained_wielder_of_the_darkside = object_mobile_shared_dressed_untrained_wielder_of_the_darkside:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_untrained_wielder_of_the_darkside, "object/mobile/dressed_untrained_wielder_of_the_darkside.iff")
| agpl-3.0 |
DailyShana/ygopro-scripts | c54912977.lua | 3 | 2205 | --マジック・ランプ
function c54912977.initial_effect(c)
--change target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54912977,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetCondition(c54912977.condition)
e1:SetTarget(c54912977.target)
e1:SetOperation(c54912977.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54912977,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c54912977.sptg)
e2:SetOperation(c54912977.spop)
c:RegisterEffect(e2)
end
function c54912977.condition(e,tp,eg,ep,ev,re,r,rp)
return r~=REASON_REPLACE and Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():IsControler(1-tp)
and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE
end
function c54912977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,Duel.GetAttacker())
end
function c54912977.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.ChangeAttackTarget(tc)
end
end
function c54912977.spfilter(c,e,tp)
return c:IsCode(97590747) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c54912977.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c54912977.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c54912977.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c54912977.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/wearables/boots/boots_s34.lua | 3 | 4404 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_wearables_boots_boots_s34 = object_tangible_wearables_boots_shared_boots_s34:new {
playerRaces = { "object/creature/player/bothan_male.iff",
"object/creature/player/bothan_female.iff",
"object/creature/player/human_male.iff",
"object/creature/player/human_female.iff",
"object/creature/player/moncal_male.iff",
"object/creature/player/moncal_female.iff",
"object/creature/player/rodian_male.iff",
"object/creature/player/rodian_female.iff",
"object/creature/player/sullustan_male.iff",
"object/creature/player/sullustan_female.iff",
"object/creature/player/twilek_male.iff",
"object/creature/player/twilek_female.iff",
"object/creature/player/zabrak_male.iff",
"object/creature/player/zabrak_female.iff",
"object/mobile/vendor/aqualish_female.iff",
"object/mobile/vendor/aqualish_male.iff",
"object/mobile/vendor/bith_female.iff",
"object/mobile/vendor/bith_male.iff",
"object/mobile/vendor/bothan_female.iff",
"object/mobile/vendor/bothan_male.iff",
"object/mobile/vendor/devaronian_male.iff",
"object/mobile/vendor/gran_male.iff",
"object/mobile/vendor/human_female.iff",
"object/mobile/vendor/human_male.iff",
"object/mobile/vendor/ishi_tib_male.iff",
"object/mobile/vendor/moncal_female.iff",
"object/mobile/vendor/moncal_male.iff",
"object/mobile/vendor/nikto_male.iff",
"object/mobile/vendor/quarren_male.iff",
"object/mobile/vendor/rodian_female.iff",
"object/mobile/vendor/rodian_male.iff",
"object/mobile/vendor/sullustan_female.iff",
"object/mobile/vendor/sullustan_male.iff",
"object/mobile/vendor/twilek_female.iff",
"object/mobile/vendor/twilek_male.iff",
"object/mobile/vendor/weequay_male.iff",
"object/mobile/vendor/zabrak_female.iff",
"object/mobile/vendor/zabrak_male.iff" },
numberExperimentalProperties = {1, 1, 1, 1},
experimentalProperties = {"XX", "XX", "XX", "XX"},
experimentalWeights = {1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "null", "null"},
experimentalSubGroupTitles = {"null", "null", "sockets", "hitpoints"},
experimentalMin = {0, 0, 0, 1000},
experimentalMax = {0, 0, 0, 1000},
experimentalPrecision = {0, 0, 0, 0},
experimentalCombineType = {0, 0, 4, 4},
}
ObjectTemplates:addTemplate(object_tangible_wearables_boots_boots_s34, "object/tangible/wearables/boots/boots_s34.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/painting/painting_twilek_f_sm_s02.lua | 3 | 2256 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_painting_painting_twilek_f_sm_s02 = object_tangible_painting_shared_painting_twilek_f_sm_s02:new {
}
ObjectTemplates:addTemplate(object_tangible_painting_painting_twilek_f_sm_s02, "object/tangible/painting/painting_twilek_f_sm_s02.iff")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/bio_engineer/dna_template/dna_template_bantha.lua | 3 | 2332 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_draft_schematic_bio_engineer_dna_template_dna_template_bantha = object_draft_schematic_bio_engineer_dna_template_shared_dna_template_bantha:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_bio_engineer_dna_template_dna_template_bantha, "object/draft_schematic/bio_engineer/dna_template/dna_template_bantha.iff")
| agpl-3.0 |
AndyClausen/PNRP_HazG | postnukerp/entities/weapons/weapon_pnrp_flaregun/shared.lua | 1 | 7538 |
SWEP.Author = "LostInTheWired"
SWEP.Contact = "LostInTheWired@gmail.com"
SWEP.Purpose = "Flaregun. Send messages!"
SWEP.Instructions = "Right click for iron sights.\nWALK-Right click to hold passive."
SWEP.ViewModel = "models/weapons/v_pistol.mdl"
SWEP.WorldModel = "models/weapons/w_pistol.mdl"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.DrawCrosshair = false
SWEP.Base = "weapon_base"
SWEP.MuzzleAttachment = "muzzle" -- Should be "1" for CSS models or "muzzle" for hl2 models
SWEP.ShellEjectAttachment = "1" -- Should be "2" for CSS models or "1" for hl2 models
SWEP.Primary.Sound = Sound("suprise.wav")
SWEP.Primary.Recoil = 1.2
SWEP.Primary.Damage = 16
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.017
SWEP.Primary.ClipSize = -1
SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.HoldType = "pistol"
SWEP.ViewModelFlip = false
SWEP.IronSightsPos = Vector(-5.907, -7.008, 4.099)
SWEP.IronSightsAng = Vector(0, -1.379, 1.378)
function SWEP:Initialize()
util.PrecacheModel( self.ViewModel )
util.PrecacheModel( self.WorldModel )
util.PrecacheSound(self.Primary.Sound)
util.PrecacheSound("weapons/pistol/pistol_reload1.wav")
self:SetWeaponHoldType(self.HoldType)
end
function SWEP:SetupDataTables()
self:DTVar("Bool", 0, "Holsted")
self:DTVar("Bool", 1, "Ironsights")
end
function SWEP:Equip()
-- self.Weapon:SetNWBool("IronSights", false)
-- self.Weapon:SetNWBool("IsPassive", false)
self.Weapon:SetDTBool(0, false)
self.Weapon:SetDTBool(1, false)
end
function SWEP:PrimaryAttack()
if self.Owner:WaterLevel() > 2 then return end
if self.Weapon:GetDTBool(0) or self.Owner:KeyDown( IN_SPEED ) then return end
self.Weapon:EmitSound(self.Primary.Sound)
--self:TakePrimaryAmmo(self.Primary.NumShots)
self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
local handlingSkill = self.Owner:GetSkill("Weapon Handling")
if self.Weapon:GetDTBool(1) then
self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil - (0.1 * handlingSkill)), math.Rand(-1,1) * ((self.Primary.Recoil - (0.1 * handlingSkill)) / 2), 0))
if (SERVER) then
local flare = ents.Create("ent_pnrp_flare")
flare:SetOwner(self.Owner)
flare:SetPos(self.Owner:EyePos() + (self.Owner:GetAimVector()))
flare:SetAngles(self.Owner:GetAngles())
flare:Spawn()
flare:Activate()
local phys = flare:GetPhysicsObject()
phys:ApplyForceCenter(self.Owner:GetAimVector() * 10000)
end
else
self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil - (0.1 * handlingSkill)), math.Rand(-1,1) * (self.Primary.Recoil - (0.1 * handlingSkill)), 0))
if (SERVER) then
local flare = ents.Create("ent_pnrp_flare")
flare:SetOwner(self.Owner)
flare:SetPos(self.Owner:EyePos() + (self.Owner:GetAimVector()))
flare:SetAngles(self.Owner:GetAngles())
flare:Spawn()
flare:Activate()
local phys = flare:GetPhysicsObject()
phys:ApplyForceCenter(self.Owner:GetAimVector() * 10000)
end
end
if (SERVER) then self.Owner:StripWeapon("weapon_pnrp_flaregun") end
end
function SWEP:SecondaryAttack()
if self.Owner:KeyDown( IN_WALK ) then
-- local savedBool = (not self.Weapon:GetNWBool("IsPassive", false))
local savedBool = (not self.Weapon:GetDTBool(0))
if (SERVER) then
self.Weapon:SetDTBool(0, (not self.Weapon:GetDTBool(0)))
self.Owner:EmitSound("npc/combine_soldier/gear4.wav")
end
if savedBool then
self:SetWeaponHoldType("normal")
self.Owner:SetFOV( 0, 0.15 )
self.Weapon:SetDTBool(1, false)
else
self:SetWeaponHoldType(self.HoldType)
end
else
--if self.Weapon:GetNWBool("IsPassive", false) then return end
if self.Weapon:GetDTBool(0) then return end
-- local savedBool = (not self.Weapon:GetNWBool("IronSights", false))
local savedBool = (not self.Weapon:GetDTBool(1))
-- self.Weapon:SetNWBool("IronSights", (not self.Weapon:GetNWBool("IronSights", false)))
self.Weapon:SetDTBool(1, (not self.Weapon:GetDTBool(1)))
if savedBool then
self.Owner:SetFOV( 65, 0.15 )
else
self.Owner:SetFOV( 0, 0.15 )
end
end
self.Weapon:SetNextSecondaryFire(CurTime() + 0.5)
end
function SWEP:Reload()
-- if self.Weapon:Clip1() < self.Primary.ClipSize then
-- self.Weapon:SetDTBool(1, false)
-- self.Owner:SetFOV( 0, 0.15 )
-- -- self.Weapon:SetNextPrimaryFire(CurTime() + 1.5)
-- -- self.Weapon:SetNextSecondaryFire(CurTime() + 1.5)
-- self.Weapon:SetWeaponHoldType(self.HoldType)
-- self.Weapon:DefaultReload(ACT_VM_RELOAD)
-- self.Weapon:EmitSound("weapons/pistol/pistol_reload1.wav")
-- end
end
function SWEP:Deploy()
self.Weapon:SendWeaponAnim( ACT_VM_DRAW )
-- self.Owner:SetNWBool("IronSights", false)
-- self.Weapon:SetNWBool("IsPassive", false)
self.Weapon:SetDTBool(0, false)
self.Weapon:SetDTBool(1, false)
self.Weapon:SetNextPrimaryFire(CurTime() + 1)
return true
end
function SWEP:Think()
-- if self.Weapon:GetNWBool("IsPassive", false) or self.Owner:KeyDown( IN_SPEED ) then
-- self:SetWeaponHoldType("normal")
-- else
-- self:SetWeaponHoldType(self.HoldType)
-- end
end
-- Ironsights code, based on CSS Realistic
local IRONSIGHT_TIME = 0.15
function SWEP:GetViewModelPosition(pos, ang)
if self.Weapon:GetDTBool(0) or self.Owner:KeyDown( IN_SPEED ) then
ang = ang * 1
ang:RotateAroundAxis(ang:Right(), -37.2258)
ang:RotateAroundAxis(ang:Up(), 1.7237)
ang:RotateAroundAxis(ang:Forward(), 0)
local Offset = Vector(1.6428, 0, 6.2286)
local Right = ang:Right()
local Up = ang:Up()
local Forward = ang:Forward()
pos = pos + Offset.x * Right
pos = pos + Offset.y * Forward
pos = pos + Offset.z * Up
return pos, ang
end
if (not self.IronSightsPos) then return pos, ang end
local bIron = self.Weapon:GetDTBool(1)
if (bIron != self.bLastIron) then
self.bLastIron = bIron
self.fIronTime = CurTime()
if (bIron) then
self.SwayScale = 0.3
self.BobScale = 0.1
else
self.SwayScale = 1.0
self.BobScale = 1.0
end
end
local fIronTime = self.fIronTime or 0
if (not bIron and fIronTime < CurTime() - IRONSIGHT_TIME) then
return pos, ang
end
local Mul = 1.0
if (fIronTime > CurTime() - IRONSIGHT_TIME) then
Mul = math.Clamp((CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1)
if not bIron then Mul = 1 - Mul end
end
local Offset = self.IronSightsPos
if (self.IronSightsAng) then
ang = ang * 1
ang:RotateAroundAxis(ang:Right(), self.IronSightsAng.x * Mul)
ang:RotateAroundAxis(ang:Up(), self.IronSightsAng.y * Mul)
ang:RotateAroundAxis(ang:Forward(), self.IronSightsAng.z * Mul)
end
local Right = ang:Right()
local Up = ang:Up()
local Forward = ang:Forward()
pos = pos + Offset.x * Right * Mul
pos = pos + Offset.y * Forward * Mul
pos = pos + Offset.z * Up * Mul
return pos, ang
end
function SWEP:ShootEffects()
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) -- View model animation
self.Owner:MuzzleFlash() -- Crappy muzzle light
self.Owner:SetAnimation( PLAYER_ATTACK1 ) -- 3rd Person Animation
end | gpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/faction_perk/hq/hq_s02.lua | 3 | 2287 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_building_faction_perk_hq_hq_s02 = object_building_faction_perk_hq_shared_hq_s02:new {
lotSize = 1,
maintenanceCost = 1337,
allowedZones = {0,1,4,5,6,7,8}
}
ObjectTemplates:addTemplate(object_building_faction_perk_hq_hq_s02, "object/building/faction_perk/hq/hq_s02.iff")
| agpl-3.0 |
KingRaptor/Zero-K | scripts/cordoom.lua | 7 | 5402 | include "constants.lua"
--pieces
local base = piece "Base"
local shellbase = piece "ShellBase"
local shell_1 = piece "Shell_1"
local shell_2 = piece "Shell_2"
-- guns
local cannonbase = piece "CannonBase"
local cannon = piece "Cannon"
local flare1 = piece "flare1"
local heatraybase = piece "HeatrayBase"
local heatray = piece "Heatray"
local flare2 = piece "flare2"
local flare3 = piece "flare3"
local spGetUnitRulesParam = Spring.GetUnitRulesParam
local smokePiece = { shell_1, shell_2, cannonbase, heatray }
--variables
local heat = false
local on = false
--signals
local aim = 2
local aim2 = 4
local open = 8
local close = 16
local closeInterrupt = 32
local mainPitch = 0.5
local mainHeading = 0.8
local shellSpeed = 0.7
local position = 0
local tauOn16 = tau/16
local tauOn8 = tau/8
local function Open()
Signal(close) --kill the closing animation if it is in process
SetSignalMask(open) --set the signal to kill the opening animation
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
Spring.SetUnitArmored(unitID,false)
-- Open Main Shell
Move(shell_1, x_axis, 0, shellSpeed)
Move(shell_2, x_axis, 0, shellSpeed)
WaitForMove(shell_1, x_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
-- Unsquish heatray
Move(shellbase, y_axis, 0, 3)
Move(heatraybase, y_axis, 0, 1.5)
WaitForMove(shellbase, y_axis)
WaitForMove(heatraybase, y_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
-- Unstow Guns
Turn(cannonbase, x_axis, 0, mainPitch)
Move(heatray,z_axis, 0, 4)
WaitForTurn(cannonbase, x_axis)
WaitForMove(heatray, z_axis)
if spGetUnitRulesParam(unitID, "lowpower") == 1 then
return
end
-- Ready Cannon Head
Move(cannon, z_axis, 0, 10)
WaitForMove(cannon, z_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
on = true
end
local function FinalCloseInterrupt()
SetSignalMask(closeInterrupt)
while true do
if spGetUnitRulesParam(unitID, "lowpower") == 1 then
Move(shell_1,x_axis, 15, 0.000000001)
Move(shell_2,x_axis, -15, 0.000000001)
StartThread(Close)
return
end
Sleep(500)
end
end
--closing animation of the factory
function Close()
Signal(aim)
Signal(aim2)
Signal(closeInterrupt)
Signal(open) --kill the opening animation if it is in process
SetSignalMask(close) --set the signal to kill the closing animation
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
-- Prepare both guns to be stowed.
Move(cannon, z_axis, -10, 10)
Turn(heatray, x_axis, 0, 2)
WaitForTurn(heatray, x_axis)
WaitForMove(cannon, z_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
-- Stow Guns
Turn(cannonbase, x_axis, 1.57, mainPitch)
Move(heatray,z_axis, -10, 4)
WaitForTurn(cannonbase, x_axis)
WaitForMove(heatray, z_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
-- Squish Heatray area
Turn(shellbase, y_axis, tauOn8*position, mainHeading/4)
Turn(heatraybase, y_axis, tauOn8*position, 1)
WaitForTurn(shellbase, y_axis)
WaitForTurn(heatraybase, y_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
Move(shellbase, y_axis, -12.6, 3)
Move(heatraybase, y_axis, -6.3, 1.5)
WaitForMove(shellbase,y_axis)
WaitForMove(heatraybase,y_axis)
while spGetUnitRulesParam(unitID, "lowpower") == 1 do
Sleep(500)
end
-- Close Main Shell
Move(shell_1,x_axis, 5, shellSpeed)
Move(shell_2,x_axis, -5, shellSpeed)
StartThread(FinalCloseInterrupt)
WaitForMove(shell_1,x_axis)
WaitForMove(shell_2,x_axis)
Signal(closeInterrupt)
-- Set Armour
Spring.SetUnitArmored(unitID,true)
end
function script.Activate ()
StartThread(Open)
end
function script.Deactivate ()
on = false
StartThread(Close)
end
function script.Create()
StartThread(SmokeUnit, smokePiece)
end
local aimFromSet = {cannonbase, heatraybase}
function script.AimFromWeapon(num)
return aimFromSet[num]
end
function script.AimWeapon(num, heading, pitch)
if (not on) or (spGetUnitRulesParam(unitID, "lowpower") == 1) then
return false
end
if num == 1 then
Signal(aim)
SetSignalMask(aim)
position = math.floor((heading + tauOn16)/tauOn8)%8
Turn(shellbase, y_axis, heading, mainHeading)
Turn(cannonbase, x_axis, -pitch, mainPitch)
WaitForTurn (shellbase, y_axis)
WaitForTurn (cannonbase, x_axis)
return (spGetUnitRulesParam(unitID, "lowpower") == 0) --checks for sufficient energy in grid
elseif num == 2 then
Signal(aim2)
SetSignalMask(aim2)
Turn(heatraybase, y_axis, heading, 3)
Turn(heatray, x_axis, -pitch, 2)
WaitForTurn (heatraybase, y_axis)
WaitForTurn (heatray, x_axis)
return (spGetUnitRulesParam(unitID, "lowpower") == 0)
end
end
function script.QueryWeapon(num)
if num == 1 then
return flare1
elseif num == 2 then
if heat then
return flare2
else
return flare3
end
end
end
function script.FireWeapon(num)
if num == 1 then
EmitSfx(flare1, 1024)
Move(cannon, z_axis, -24)
Move(cannon, z_axis, 0, 10)
Sleep(20)
Hide(flare1)
elseif num == 2 then
heat = not heat
end
end
function script.Killed(recentDamage, maxHealth)
local severity = recentDamage / maxHealth
if (severity <= .25) then
return 1 -- corpsetype
elseif (severity <= .5) then
return 1 -- corpsetype
else
return 2 -- corpsetype
end
end
| gpl-2.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/sign/base/serverobjects.lua | 3 | 2096 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--Children folder includes
-- Server Objects
includeFile("tangible/sign/base/base_sign.lua")
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/commands/assignDroid.lua | 4 | 2126 | --Copyright (C) 2007 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
--which carries forward this exception.
--true = 1, false = 0
AssignDroidCommand = {
name = "assigndroid",
}
AddCommand(AssignDroidCommand)
| agpl-3.0 |
lasko2112/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/skill_buff/skill_buff_heavy_weapon_speed.lua | 2 | 2572 | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later version.
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--See the GNU Lesser General Public License for
--more details.
--You should have received a copy of the GNU Lesser General
--Public License along with this program; if not, write to
--the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--Linking Engine3 statically or dynamically with other modules
--is making a combined work based on Engine3.
--Thus, the terms and conditions of the GNU Lesser General Public License
--cover the whole combination.
--In addition, as a special exception, the copyright holders of Engine3
--give you permission to combine Engine3 program with free software
--programs or libraries that are released under the GNU LGPL and with
--code included in the standard release of Core3 under the GNU LGPL
--license (or modified versions of such code, with unchanged license).
--You may copy and distribute such a system following the terms of the
--GNU LGPL for Engine3 and the licenses of the other code concerned,
--provided that you include the source code of that other code when
--and as the GNU LGPL requires distribution of source code.
--Note that people who make modified versions of Engine3 are not obligated
--to grant this special exception for their modified versions;
--it is their choice whether to do so. The GNU Lesser General Public License
--gives permission to release a modified version without this exception;
--this exception also makes it possible to release a modified version
object_tangible_skill_buff_skill_buff_heavy_weapon_speed = object_tangible_skill_buff_shared_skill_buff_heavy_weapon_speed:new {
templateType = SKILLBUFF,
objectMenuComponent = {"cpp", "SkillBuffObjectMenuComponent"},
attributeListComponent = "SkillBuffObjectAttributeListComponent",
duration = 300,
useCount = 5,
modifiers = { "heavyweapon_speed", 10 },
buffName = "heavyweapon_speed",
buffCRC = 0x311A7044
}
ObjectTemplates:addTemplate(object_tangible_skill_buff_skill_buff_heavy_weapon_speed, "object/tangible/skill_buff/skill_buff_heavy_weapon_speed.iff")
| agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.