| @@ -0,0 +1,95 @@ | |||
| 1 | + | SPELL_ID = 00 | |
| 2 | + | local min = 0 | |
| 3 | + | local max = 0 | |
| 4 | + | ||
| 5 | + | -- =============== COMBAT VARS =============== | |
| 6 | + | -- Areas/Combat for 0ms | |
| 7 | + | local combat0_Brush = createCombatObject() | |
| 8 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) | |
| 9 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) | |
| 10 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) | |
| 11 | + | setCombatArea(combat0_Brush,createCombatArea({{3}})) | |
| 12 | + | function getDmg_Brush(cid, level, maglevel) | |
| 13 | + | ||
| 14 | + | return -min, -max | |
| 15 | + | end | |
| 16 | + | setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 17 | + | ||
| 18 | + | -- Areas/Combat for 300ms | |
| 19 | + | local combat3_Brush = createCombatObject() | |
| 20 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) | |
| 21 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) | |
| 22 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) | |
| 23 | + | setCombatArea(combat3_Brush,createCombatArea({{3}})) | |
| 24 | + | function getDmg_Brush(cid, level, maglevel) | |
| 25 | + | ||
| 26 | + | return -min, -max | |
| 27 | + | end | |
| 28 | + | setCombatCallback(combat3_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 29 | + | ||
| 30 | + | -- Areas/Combat for 600ms | |
| 31 | + | local combat6_Brush = createCombatObject() | |
| 32 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) | |
| 33 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) | |
| 34 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) | |
| 35 | + | setCombatArea(combat6_Brush,createCombatArea({{3}})) | |
| 36 | + | function getDmg_Brush(cid, level, maglevel) | |
| 37 | + | ||
| 38 | + | return -min, -max | |
| 39 | + | end | |
| 40 | + | setCombatCallback(combat6_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 41 | + | ||
| 42 | + | -- =============== CORE FUNCTIONS =============== | |
| 43 | + | local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part | |
| 44 | + | if (isCreature(cid)) then | |
| 45 | + | doCombat(cid, c, var) | |
| 46 | + | if (dirList ~= nil) then -- Emit distance effects | |
| 47 | + | local i = 2; | |
| 48 | + | while (i < #dirList) do | |
| 49 | + | doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) | |
| 50 | + | i = i + 2 | |
| 51 | + | end | |
| 52 | + | end | |
| 53 | + | end | |
| 54 | + | end | |
| 55 | + | function checkSpell47(cid) | |
| 56 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 57 | + | local CHECK_SLOT_01 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_04) | |
| 58 | + | local CHECK_SLOT_02 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_05) | |
| 59 | + | local CHECK_SLOT_03 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_06) | |
| 60 | + | SPELL_ID = 47 | |
| 61 | + | ||
| 62 | + | if GUN_ID > 0 then | |
| 63 | + | if CHECK_SLOT_01 == SPELL_ID then | |
| 64 | + | cid:sendCancelMessage("@SpellCooldown 01") | |
| 65 | + | return true | |
| 66 | + | elseif CHECK_SLOT_02 == SPELL_ID then | |
| 67 | + | cid:sendCancelMessage("@SpellCooldown 02") | |
| 68 | + | return true | |
| 69 | + | elseif CHECK_SLOT_03 == SPELL_ID then | |
| 70 | + | cid:sendCancelMessage("@SpellCooldown 03") | |
| 71 | + | return true | |
| 72 | + | else | |
| 73 | + | return false | |
| 74 | + | end | |
| 75 | + | else | |
| 76 | + | return false | |
| 77 | + | end | |
| 78 | + | end | |
| 79 | + | function onCastSpell(cid, var) | |
| 80 | + | if checkSpell47(cid) or cid:getGroup():getAccess() then | |
| 81 | + | local startPos = getCreaturePosition(cid) | |
| 82 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 83 | + | local starGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_03) | |
| 84 | + | local levelGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_07) | |
| 85 | + | min = onDamage(cid, GUN_ID, levelGun, starGun, "SKILL_MIN", SPELL_ID) | |
| 86 | + | max = min | |
| 87 | + | RunPart(combat0_Brush,cid,var) | |
| 88 | + | addEvent(RunPart,300,combat3_Brush,cid.uid,var) | |
| 89 | + | addEvent(RunPart,600,combat6_Brush,cid.uid,var) | |
| 90 | + | return true | |
| 91 | + | else | |
| 92 | + | cid:getPosition():sendMagicEffect(03) | |
| 93 | + | return false | |
| 94 | + | end | |
| 95 | + | end |
| @@ -0,0 +1,177 @@ | |||
| 1 | + | SPELL_ID = 00 | |
| 2 | + | local min = 0 | |
| 3 | + | local max = 0 | |
| 4 | + | ||
| 5 | + | -- =============== COMBAT VARS =============== | |
| 6 | + | -- Areas/Combat for 100ms | |
| 7 | + | local combat1_Brush_2 = createCombatObject() | |
| 8 | + | setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) | |
| 9 | + | setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 10 | + | setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1}, | |
| 11 | + | {1, 2, 1}, | |
| 12 | + | {1, 1, 1}})) | |
| 13 | + | function getDmg_Brush_2(cid, level, maglevel) | |
| 14 | + | ||
| 15 | + | return -min, -max | |
| 16 | + | end | |
| 17 | + | setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") | |
| 18 | + | ||
| 19 | + | -- Areas/Combat for 0ms | |
| 20 | + | local combat0_Brush = createCombatObject() | |
| 21 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) | |
| 22 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) | |
| 23 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 24 | + | setCombatArea(combat0_Brush,createCombatArea({{3}})) | |
| 25 | + | function getDmg_Brush(cid, level, maglevel) | |
| 26 | + | ||
| 27 | + | return -min, -max | |
| 28 | + | end | |
| 29 | + | setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 30 | + | ||
| 31 | + | -- Areas/Combat for 200ms | |
| 32 | + | local combat2_Brush_2 = createCombatObject() | |
| 33 | + | setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) | |
| 34 | + | setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 35 | + | setCombatArea(combat2_Brush_2,createCombatArea({{0, 0, 1, 0, 0}, | |
| 36 | + | {0, 1, 0, 1, 0}, | |
| 37 | + | {1, 0, 2, 0, 1}, | |
| 38 | + | {0, 1, 0, 1, 0}, | |
| 39 | + | {0, 0, 1, 0, 0}})) | |
| 40 | + | function getDmg_Brush_2(cid, level, maglevel) | |
| 41 | + | ||
| 42 | + | return -min, -max | |
| 43 | + | end | |
| 44 | + | setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") | |
| 45 | + | ||
| 46 | + | -- Areas/Combat for 300ms | |
| 47 | + | local combat3_Brush_2 = createCombatObject() | |
| 48 | + | setCombatParam(combat3_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) | |
| 49 | + | setCombatParam(combat3_Brush_2, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 50 | + | setCombatArea(combat3_Brush_2,createCombatArea({{0, 0, 0, 1, 0, 0, 0}, | |
| 51 | + | {0, 0, 1, 0, 1, 0, 0}, | |
| 52 | + | {0, 1, 0, 0, 0, 1, 0}, | |
| 53 | + | {1, 0, 0, 2, 0, 0, 1}, | |
| 54 | + | {0, 1, 0, 0, 0, 1, 0}, | |
| 55 | + | {0, 0, 1, 0, 1, 0, 0}, | |
| 56 | + | {0, 0, 0, 1, 0, 0, 0}})) | |
| 57 | + | function getDmg_Brush_2(cid, level, maglevel) | |
| 58 | + | ||
| 59 | + | return -min, -max | |
| 60 | + | end | |
| 61 | + | setCombatCallback(combat3_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") | |
| 62 | + | ||
| 63 | + | -- Areas/Combat for 600ms | |
| 64 | + | local combat6_Brush_3 = createCombatObject() | |
| 65 | + | setCombatParam(combat6_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) | |
| 66 | + | setCombatParam(combat6_Brush_3, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 67 | + | setCombatArea(combat6_Brush_3,createCombatArea({{0, 0, 0, 1, 0, 0, 0}, | |
| 68 | + | {0, 0, 1, 0, 1, 0, 0}, | |
| 69 | + | {0, 1, 0, 0, 0, 1, 0}, | |
| 70 | + | {1, 0, 0, 2, 0, 0, 1}, | |
| 71 | + | {0, 1, 0, 0, 0, 1, 0}, | |
| 72 | + | {0, 0, 1, 0, 1, 0, 0}, | |
| 73 | + | {0, 0, 0, 1, 0, 0, 0}})) | |
| 74 | + | function getDmg_Brush_3(cid, level, maglevel) | |
| 75 | + | ||
| 76 | + | return -min, -max | |
| 77 | + | end | |
| 78 | + | setCombatCallback(combat6_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") | |
| 79 | + | ||
| 80 | + | -- Areas/Combat for 800ms | |
| 81 | + | local combat8_Brush_3 = createCombatObject() | |
| 82 | + | setCombatParam(combat8_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) | |
| 83 | + | setCombatParam(combat8_Brush_3, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 84 | + | setCombatArea(combat8_Brush_3,createCombatArea({{0, 0, 1, 0, 0}, | |
| 85 | + | {0, 1, 0, 1, 0}, | |
| 86 | + | {1, 0, 2, 0, 1}, | |
| 87 | + | {0, 1, 0, 1, 0}, | |
| 88 | + | {0, 0, 1, 0, 0}})) | |
| 89 | + | function getDmg_Brush_3(cid, level, maglevel) | |
| 90 | + | ||
| 91 | + | return -min, -max | |
| 92 | + | end | |
| 93 | + | setCombatCallback(combat8_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") | |
| 94 | + | ||
| 95 | + | -- Areas/Combat for 1000ms | |
| 96 | + | local combat10_Brush_3 = createCombatObject() | |
| 97 | + | setCombatParam(combat10_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) | |
| 98 | + | setCombatParam(combat10_Brush_3, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 99 | + | setCombatArea(combat10_Brush_3,createCombatArea({{0, 1, 0}, | |
| 100 | + | {1, 2, 1}, | |
| 101 | + | {0, 1, 0}})) | |
| 102 | + | function getDmg_Brush_3(cid, level, maglevel) | |
| 103 | + | ||
| 104 | + | return -min, -max | |
| 105 | + | end | |
| 106 | + | setCombatCallback(combat10_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") | |
| 107 | + | ||
| 108 | + | -- Areas/Combat for 1200ms | |
| 109 | + | local combat12_Brush_3 = createCombatObject() | |
| 110 | + | setCombatParam(combat12_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) | |
| 111 | + | setCombatParam(combat12_Brush_3, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) | |
| 112 | + | setCombatArea(combat12_Brush_3,createCombatArea({{3}})) | |
| 113 | + | function getDmg_Brush_3(cid, level, maglevel) | |
| 114 | + | ||
| 115 | + | return -min, -max | |
| 116 | + | end | |
| 117 | + | setCombatCallback(combat12_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") | |
| 118 | + | ||
| 119 | + | -- =============== CORE FUNCTIONS =============== | |
| 120 | + | local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part | |
| 121 | + | if (isCreature(cid)) then | |
| 122 | + | doCombat(cid, c, var) | |
| 123 | + | if (dirList ~= nil) then -- Emit distance effects | |
| 124 | + | local i = 2; | |
| 125 | + | while (i < #dirList) do | |
| 126 | + | doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) | |
| 127 | + | i = i + 2 | |
| 128 | + | end | |
| 129 | + | end | |
| 130 | + | end | |
| 131 | + | end | |
| 132 | + | function checkSpell58(cid) | |
| 133 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 134 | + | local CHECK_SLOT_01 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_04) | |
| 135 | + | local CHECK_SLOT_02 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_05) | |
| 136 | + | local CHECK_SLOT_03 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_06) | |
| 137 | + | SPELL_ID = 58 | |
| 138 | + | ||
| 139 | + | if GUN_ID > 0 then | |
| 140 | + | if CHECK_SLOT_01 == SPELL_ID then | |
| 141 | + | cid:sendCancelMessage("@SpellCooldown 01") | |
| 142 | + | return true | |
| 143 | + | elseif CHECK_SLOT_02 == SPELL_ID then | |
| 144 | + | cid:sendCancelMessage("@SpellCooldown 02") | |
| 145 | + | return true | |
| 146 | + | elseif CHECK_SLOT_03 == SPELL_ID then | |
| 147 | + | cid:sendCancelMessage("@SpellCooldown 03") | |
| 148 | + | return true | |
| 149 | + | else | |
| 150 | + | return false | |
| 151 | + | end | |
| 152 | + | else | |
| 153 | + | return false | |
| 154 | + | end | |
| 155 | + | end | |
| 156 | + | function onCastSpell(cid, var) | |
| 157 | + | if checkSpell58(cid) or cid:getGroup():getAccess() then | |
| 158 | + | local startPos = getCreaturePosition(cid) | |
| 159 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 160 | + | local starGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_03) | |
| 161 | + | local levelGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_07) | |
| 162 | + | min = onDamage(cid, GUN_ID, levelGun, starGun, "SKILL_MIN", SPELL_ID) | |
| 163 | + | max = min | |
| 164 | + | addEvent(RunPart,100,combat1_Brush_2,cid.uid,var) | |
| 165 | + | RunPart(combat0_Brush,cid,var) | |
| 166 | + | addEvent(RunPart,200,combat2_Brush_2,cid.uid,var) | |
| 167 | + | addEvent(RunPart,300,combat3_Brush_2,cid.uid,var) | |
| 168 | + | addEvent(RunPart,600,combat6_Brush_3,cid.uid,var) | |
| 169 | + | addEvent(RunPart,800,combat8_Brush_3,cid.uid,var) | |
| 170 | + | addEvent(RunPart,1000,combat10_Brush_3,cid.uid,var) | |
| 171 | + | addEvent(RunPart,1200,combat12_Brush_3,cid.uid,var) | |
| 172 | + | return true | |
| 173 | + | else | |
| 174 | + | cid:getPosition():sendMagicEffect(03) | |
| 175 | + | return false | |
| 176 | + | end | |
| 177 | + | end |
| @@ -0,0 +1,303 @@ | |||
| 1 | + | SPELL_ID = 00 | |
| 2 | + | local min = 0 | |
| 3 | + | local max = 0 | |
| 4 | + | ||
| 5 | + | -- =============== COMBAT VARS =============== | |
| 6 | + | -- Areas/Combat for 100ms | |
| 7 | + | local combat1_Brush = createCombatObject() | |
| 8 | + | setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 9 | + | setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 10 | + | setCombatArea(combat1_Brush,createCombatArea({{0, 2}, | |
| 11 | + | {1, 0}})) | |
| 12 | + | function getDmg_Brush(cid, level, maglevel) | |
| 13 | + | ||
| 14 | + | return -min, -max | |
| 15 | + | end | |
| 16 | + | setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 17 | + | local dfcombat1_Brush = {CONST_ANI_SUDDENDEATH,-1,1} | |
| 18 | + | ||
| 19 | + | -- Areas/Combat for 0ms | |
| 20 | + | local combat0_Brush = createCombatObject() | |
| 21 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 22 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 23 | + | setCombatArea(combat0_Brush,createCombatArea({{2, 0, 0}, | |
| 24 | + | {0, 0, 0}, | |
| 25 | + | {0, 0, 1}})) | |
| 26 | + | function getDmg_Brush(cid, level, maglevel) | |
| 27 | + | ||
| 28 | + | return -min, -max | |
| 29 | + | end | |
| 30 | + | setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 31 | + | local dfcombat0_Brush = {CONST_ANI_SUDDENDEATH,2,2} | |
| 32 | + | ||
| 33 | + | -- Areas/Combat for 200ms | |
| 34 | + | local combat2_Brush = createCombatObject() | |
| 35 | + | setCombatParam(combat2_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 36 | + | setCombatParam(combat2_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 37 | + | setCombatArea(combat2_Brush,createCombatArea({{0, 1}, | |
| 38 | + | {0, 0}, | |
| 39 | + | {2, 0}})) | |
| 40 | + | function getDmg_Brush(cid, level, maglevel) | |
| 41 | + | ||
| 42 | + | return -min, -max | |
| 43 | + | end | |
| 44 | + | setCombatCallback(combat2_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 45 | + | local dfcombat2_Brush = {CONST_ANI_SUDDENDEATH,1,-2} | |
| 46 | + | ||
| 47 | + | -- Areas/Combat for 300ms | |
| 48 | + | local combat3_Brush = createCombatObject() | |
| 49 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 50 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 51 | + | setCombatArea(combat3_Brush,createCombatArea({{1, 0, 0}, | |
| 52 | + | {0, 0, 0}, | |
| 53 | + | {0, 0, 2}})) | |
| 54 | + | function getDmg_Brush(cid, level, maglevel) | |
| 55 | + | ||
| 56 | + | return -min, -max | |
| 57 | + | end | |
| 58 | + | setCombatCallback(combat3_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 59 | + | local dfcombat3_Brush = {CONST_ANI_SUDDENDEATH,-2,-2} | |
| 60 | + | ||
| 61 | + | -- Areas/Combat for 400ms | |
| 62 | + | local combat4_Brush = createCombatObject() | |
| 63 | + | setCombatParam(combat4_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 64 | + | setCombatParam(combat4_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 65 | + | setCombatArea(combat4_Brush,createCombatArea({{2, 0, 1}})) | |
| 66 | + | function getDmg_Brush(cid, level, maglevel) | |
| 67 | + | ||
| 68 | + | return -min, -max | |
| 69 | + | end | |
| 70 | + | setCombatCallback(combat4_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 71 | + | local dfcombat4_Brush = {CONST_ANI_SUDDENDEATH,2,0} | |
| 72 | + | ||
| 73 | + | -- Areas/Combat for 500ms | |
| 74 | + | local combat5_Brush = createCombatObject() | |
| 75 | + | setCombatParam(combat5_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 76 | + | setCombatParam(combat5_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 77 | + | setCombatArea(combat5_Brush,createCombatArea({{2}, | |
| 78 | + | {0}, | |
| 79 | + | {1}})) | |
| 80 | + | function getDmg_Brush(cid, level, maglevel) | |
| 81 | + | ||
| 82 | + | return -min, -max | |
| 83 | + | end | |
| 84 | + | setCombatCallback(combat5_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 85 | + | local dfcombat5_Brush = {CONST_ANI_SUDDENDEATH,0,2} | |
| 86 | + | ||
| 87 | + | -- Areas/Combat for 600ms | |
| 88 | + | local combat6_Brush = createCombatObject() | |
| 89 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 90 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 91 | + | setCombatArea(combat6_Brush,createCombatArea({{1, 0}, | |
| 92 | + | {0, 2}})) | |
| 93 | + | function getDmg_Brush(cid, level, maglevel) | |
| 94 | + | ||
| 95 | + | return -min, -max | |
| 96 | + | end | |
| 97 | + | setCombatCallback(combat6_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 98 | + | local dfcombat6_Brush = {CONST_ANI_SUDDENDEATH,-1,-1} | |
| 99 | + | ||
| 100 | + | -- Areas/Combat for 700ms | |
| 101 | + | local combat7_Brush = createCombatObject() | |
| 102 | + | setCombatParam(combat7_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 103 | + | setCombatParam(combat7_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 104 | + | setCombatArea(combat7_Brush,createCombatArea({{1, 0, 2}})) | |
| 105 | + | function getDmg_Brush(cid, level, maglevel) | |
| 106 | + | ||
| 107 | + | return -min, -max | |
| 108 | + | end | |
| 109 | + | setCombatCallback(combat7_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 110 | + | local dfcombat7_Brush = {CONST_ANI_SUDDENDEATH,-2,0} | |
| 111 | + | ||
| 112 | + | -- Areas/Combat for 800ms | |
| 113 | + | local combat8_Brush = createCombatObject() | |
| 114 | + | setCombatParam(combat8_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 115 | + | setCombatParam(combat8_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 116 | + | setCombatArea(combat8_Brush,createCombatArea({{0, 0, 1}, | |
| 117 | + | {2, 0, 0}})) | |
| 118 | + | function getDmg_Brush(cid, level, maglevel) | |
| 119 | + | ||
| 120 | + | return -min, -max | |
| 121 | + | end | |
| 122 | + | setCombatCallback(combat8_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 123 | + | local dfcombat8_Brush = {CONST_ANI_SUDDENDEATH,2,-1} | |
| 124 | + | ||
| 125 | + | -- Areas/Combat for 900ms | |
| 126 | + | local combat9_Brush = createCombatObject() | |
| 127 | + | setCombatParam(combat9_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 128 | + | setCombatParam(combat9_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 129 | + | setCombatArea(combat9_Brush,createCombatArea({{2, 0}, | |
| 130 | + | {0, 1}})) | |
| 131 | + | function getDmg_Brush(cid, level, maglevel) | |
| 132 | + | ||
| 133 | + | return -min, -max | |
| 134 | + | end | |
| 135 | + | setCombatCallback(combat9_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 136 | + | local dfcombat9_Brush = {CONST_ANI_SUDDENDEATH,1,1} | |
| 137 | + | ||
| 138 | + | -- Areas/Combat for 1000ms | |
| 139 | + | local combat10_Brush = createCombatObject() | |
| 140 | + | setCombatParam(combat10_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 141 | + | setCombatParam(combat10_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 142 | + | setCombatArea(combat10_Brush,createCombatArea({{2, 0}, | |
| 143 | + | {0, 0}, | |
| 144 | + | {0, 0}, | |
| 145 | + | {0, 1}})) | |
| 146 | + | function getDmg_Brush(cid, level, maglevel) | |
| 147 | + | ||
| 148 | + | return -min, -max | |
| 149 | + | end | |
| 150 | + | setCombatCallback(combat10_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 151 | + | local dfcombat10_Brush = {CONST_ANI_SUDDENDEATH,1,3} | |
| 152 | + | ||
| 153 | + | -- Areas/Combat for 1100ms | |
| 154 | + | local combat11_Brush = createCombatObject() | |
| 155 | + | setCombatParam(combat11_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 156 | + | setCombatParam(combat11_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 157 | + | setCombatArea(combat11_Brush,createCombatArea({{0, 0, 0, 1}, | |
| 158 | + | {0, 0, 0, 0}, | |
| 159 | + | {2, 0, 0, 0}})) | |
| 160 | + | function getDmg_Brush(cid, level, maglevel) | |
| 161 | + | ||
| 162 | + | return -min, -max | |
| 163 | + | end | |
| 164 | + | setCombatCallback(combat11_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 165 | + | local dfcombat11_Brush = {CONST_ANI_SUDDENDEATH,3,-2} | |
| 166 | + | ||
| 167 | + | -- Areas/Combat for 1200ms | |
| 168 | + | local combat12_Brush = createCombatObject() | |
| 169 | + | setCombatParam(combat12_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 170 | + | setCombatParam(combat12_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 171 | + | setCombatArea(combat12_Brush,createCombatArea({{0, 0, 2}, | |
| 172 | + | {1, 0, 0}})) | |
| 173 | + | function getDmg_Brush(cid, level, maglevel) | |
| 174 | + | ||
| 175 | + | return -min, -max | |
| 176 | + | end | |
| 177 | + | setCombatCallback(combat12_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 178 | + | local dfcombat12_Brush = {CONST_ANI_SUDDENDEATH,-2,1} | |
| 179 | + | ||
| 180 | + | -- Areas/Combat for 1300ms | |
| 181 | + | local combat13_Brush = createCombatObject() | |
| 182 | + | setCombatParam(combat13_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 183 | + | setCombatParam(combat13_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 184 | + | setCombatArea(combat13_Brush,createCombatArea({{0, 0, 2}, | |
| 185 | + | {0, 0, 0}, | |
| 186 | + | {1, 0, 0}})) | |
| 187 | + | function getDmg_Brush(cid, level, maglevel) | |
| 188 | + | ||
| 189 | + | return -min, -max | |
| 190 | + | end | |
| 191 | + | setCombatCallback(combat13_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 192 | + | local dfcombat13_Brush = {CONST_ANI_SUDDENDEATH,-2,2} | |
| 193 | + | ||
| 194 | + | -- Areas/Combat for 1400ms | |
| 195 | + | local combat14_Brush = createCombatObject() | |
| 196 | + | setCombatParam(combat14_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 197 | + | setCombatParam(combat14_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 198 | + | setCombatArea(combat14_Brush,createCombatArea({{1}, | |
| 199 | + | {2}})) | |
| 200 | + | function getDmg_Brush(cid, level, maglevel) | |
| 201 | + | ||
| 202 | + | return -min, -max | |
| 203 | + | end | |
| 204 | + | setCombatCallback(combat14_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 205 | + | local dfcombat14_Brush = {CONST_ANI_SUDDENDEATH,0,-1} | |
| 206 | + | ||
| 207 | + | -- Areas/Combat for 1500ms | |
| 208 | + | local combat15_Brush = createCombatObject() | |
| 209 | + | setCombatParam(combat15_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 210 | + | setCombatParam(combat15_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 211 | + | setCombatArea(combat15_Brush,createCombatArea({{2, 1}})) | |
| 212 | + | function getDmg_Brush(cid, level, maglevel) | |
| 213 | + | ||
| 214 | + | return -min, -max | |
| 215 | + | end | |
| 216 | + | setCombatCallback(combat15_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 217 | + | local dfcombat15_Brush = {CONST_ANI_SUDDENDEATH,1,0} | |
| 218 | + | ||
| 219 | + | -- Areas/Combat for 1600ms | |
| 220 | + | local combat16_Brush = createCombatObject() | |
| 221 | + | setCombatParam(combat16_Brush, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) | |
| 222 | + | setCombatParam(combat16_Brush, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) | |
| 223 | + | setCombatArea(combat16_Brush,createCombatArea({{0, 1, 0, 0}, | |
| 224 | + | {0, 0, 0, 0}, | |
| 225 | + | {1, 2, 0, 0}, | |
| 226 | + | {0, 1, 0, 0}, | |
| 227 | + | {0, 0, 0, 1}})) | |
| 228 | + | function getDmg_Brush(cid, level, maglevel) | |
| 229 | + | ||
| 230 | + | return -min, -max | |
| 231 | + | end | |
| 232 | + | setCombatCallback(combat16_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 233 | + | local dfcombat16_Brush = {CONST_ANI_SUDDENDEATH,-1,0,2,2,0,1,0,-2} | |
| 234 | + | ||
| 235 | + | -- =============== CORE FUNCTIONS =============== | |
| 236 | + | local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part | |
| 237 | + | if (isCreature(cid)) then | |
| 238 | + | doCombat(cid, c, var) | |
| 239 | + | if (dirList ~= nil) then -- Emit distance effects | |
| 240 | + | local i = 2; | |
| 241 | + | while (i < #dirList) do | |
| 242 | + | doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) | |
| 243 | + | i = i + 2 | |
| 244 | + | end | |
| 245 | + | end | |
| 246 | + | end | |
| 247 | + | end | |
| 248 | + | function checkSpell26(cid) | |
| 249 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 250 | + | local CHECK_SLOT_01 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_04) | |
| 251 | + | local CHECK_SLOT_02 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_05) | |
| 252 | + | local CHECK_SLOT_03 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_06) | |
| 253 | + | SPELL_ID = 26 | |
| 254 | + | ||
| 255 | + | if GUN_ID > 0 then | |
| 256 | + | if CHECK_SLOT_01 == SPELL_ID then | |
| 257 | + | cid:sendCancelMessage("@SpellCooldown 01") | |
| 258 | + | return true | |
| 259 | + | elseif CHECK_SLOT_02 == SPELL_ID then | |
| 260 | + | cid:sendCancelMessage("@SpellCooldown 02") | |
| 261 | + | return true | |
| 262 | + | elseif CHECK_SLOT_03 == SPELL_ID then | |
| 263 | + | cid:sendCancelMessage("@SpellCooldown 03") | |
| 264 | + | return true | |
| 265 | + | else | |
| 266 | + | return false | |
| 267 | + | end | |
| 268 | + | else | |
| 269 | + | return false | |
| 270 | + | end | |
| 271 | + | return true | |
| 272 | + | end | |
| 273 | + | function onCastSpell(cid, var) | |
| 274 | + | if checkSpell26(cid) or cid:getGroup():getAccess() then | |
| 275 | + | local startPos = getCreaturePosition(cid) | |
| 276 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 277 | + | local starGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_03) | |
| 278 | + | local levelGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_07) | |
| 279 | + | min = onDamage(cid, GUN_ID, levelGun, starGun, "SKILL_MIN", SPELL_ID) | |
| 280 | + | max = min | |
| 281 | + | addEvent(RunPart,100,combat1_Brush,cid.uid,var,dfcombat1_Brush,startPos) | |
| 282 | + | RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) | |
| 283 | + | addEvent(RunPart,200,combat2_Brush,cid.uid,var,dfcombat2_Brush,startPos) | |
| 284 | + | addEvent(RunPart,300,combat3_Brush,cid.uid,var,dfcombat3_Brush,startPos) | |
| 285 | + | addEvent(RunPart,400,combat4_Brush,cid.uid,var,dfcombat4_Brush,startPos) | |
| 286 | + | addEvent(RunPart,500,combat5_Brush,cid.uid,var,dfcombat5_Brush,startPos) | |
| 287 | + | addEvent(RunPart,600,combat6_Brush,cid.uid,var,dfcombat6_Brush,startPos) | |
| 288 | + | addEvent(RunPart,700,combat7_Brush,cid.uid,var,dfcombat7_Brush,startPos) | |
| 289 | + | addEvent(RunPart,800,combat8_Brush,cid.uid,var,dfcombat8_Brush,startPos) | |
| 290 | + | addEvent(RunPart,900,combat9_Brush,cid.uid,var,dfcombat9_Brush,startPos) | |
| 291 | + | addEvent(RunPart,1000,combat10_Brush,cid.uid,var,dfcombat10_Brush,startPos) | |
| 292 | + | addEvent(RunPart,1100,combat11_Brush,cid.uid,var,dfcombat11_Brush,startPos) | |
| 293 | + | addEvent(RunPart,1200,combat12_Brush,cid.uid,var,dfcombat12_Brush,startPos) | |
| 294 | + | addEvent(RunPart,1300,combat13_Brush,cid.uid,var,dfcombat13_Brush,startPos) | |
| 295 | + | addEvent(RunPart,1400,combat14_Brush,cid.uid,var,dfcombat14_Brush,startPos) | |
| 296 | + | addEvent(RunPart,1500,combat15_Brush,cid.uid,var,dfcombat15_Brush,startPos) | |
| 297 | + | addEvent(RunPart,1600,combat16_Brush,cid.uid,var,dfcombat16_Brush,startPos) | |
| 298 | + | return true | |
| 299 | + | else | |
| 300 | + | cid:getPosition():sendMagicEffect(03) | |
| 301 | + | return false | |
| 302 | + | end | |
| 303 | + | end |
| @@ -0,0 +1,116 @@ | |||
| 1 | + | SPELL_ID = 00 | |
| 2 | + | local min = 0 | |
| 3 | + | local max = 0 | |
| 4 | + | ||
| 5 | + | -- =============== COMBAT VARS =============== | |
| 6 | + | -- Areas/Combat for 900ms | |
| 7 | + | local combat9_Brush = createCombatObject() | |
| 8 | + | setCombatParam(combat9_Brush, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) | |
| 9 | + | setCombatParam(combat9_Brush, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) | |
| 10 | + | setCombatArea(combat9_Brush,createCombatArea({{3}})) | |
| 11 | + | function getDmg_Brush(cid, level, maglevel) | |
| 12 | + | ||
| 13 | + | return -min, -max | |
| 14 | + | end | |
| 15 | + | setCombatCallback(combat9_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 16 | + | ||
| 17 | + | -- Areas/Combat for 600ms | |
| 18 | + | local combat6_Brush = createCombatObject() | |
| 19 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) | |
| 20 | + | setCombatParam(combat6_Brush, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) | |
| 21 | + | setCombatArea(combat6_Brush,createCombatArea({{1, 0, 1}, | |
| 22 | + | {0, 2, 0}, | |
| 23 | + | {1, 0, 1}})) | |
| 24 | + | function getDmg_Brush(cid, level, maglevel) | |
| 25 | + | ||
| 26 | + | return -min, -max | |
| 27 | + | end | |
| 28 | + | setCombatCallback(combat6_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 29 | + | ||
| 30 | + | -- Areas/Combat for 300ms | |
| 31 | + | local combat3_Brush = createCombatObject() | |
| 32 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) | |
| 33 | + | setCombatParam(combat3_Brush, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) | |
| 34 | + | setCombatArea(combat3_Brush,createCombatArea({{1, 0, 0, 0, 1}, | |
| 35 | + | {0, 0, 0, 0, 0}, | |
| 36 | + | {0, 0, 2, 0, 0}, | |
| 37 | + | {0, 0, 0, 0, 0}, | |
| 38 | + | {1, 0, 0, 0, 1}})) | |
| 39 | + | function getDmg_Brush(cid, level, maglevel) | |
| 40 | + | ||
| 41 | + | return -min, -max | |
| 42 | + | end | |
| 43 | + | setCombatCallback(combat3_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 44 | + | ||
| 45 | + | -- Areas/Combat for 0ms | |
| 46 | + | local combat0_Brush = createCombatObject() | |
| 47 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) | |
| 48 | + | setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) | |
| 49 | + | setCombatArea(combat0_Brush,createCombatArea({{1, 0, 0, 0, 0, 0, 1}, | |
| 50 | + | {0, 0, 0, 0, 0, 0, 0}, | |
| 51 | + | {0, 0, 0, 0, 0, 0, 0}, | |
| 52 | + | {0, 0, 0, 2, 0, 0, 0}, | |
| 53 | + | {0, 0, 0, 0, 0, 0, 0}, | |
| 54 | + | {0, 0, 0, 0, 0, 0, 0}, | |
| 55 | + | {1, 0, 0, 0, 0, 0, 1}})) | |
| 56 | + | function getDmg_Brush(cid, level, maglevel) | |
| 57 | + | ||
| 58 | + | return -min, -max | |
| 59 | + | end | |
| 60 | + | setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") | |
| 61 | + | ||
| 62 | + | -- =============== CORE FUNCTIONS =============== | |
| 63 | + | local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part | |
| 64 | + | if (isCreature(cid)) then | |
| 65 | + | doCombat(cid, c, var) | |
| 66 | + | if (dirList ~= nil) then -- Emit distance effects | |
| 67 | + | local i = 2; | |
| 68 | + | while (i < #dirList) do | |
| 69 | + | doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) | |
| 70 | + | i = i + 2 | |
| 71 | + | end | |
| 72 | + | end | |
| 73 | + | end | |
| 74 | + | end | |
| 75 | + | function checkSpell69(cid) | |
| 76 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 77 | + | local CHECK_SLOT_01 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_04) | |
| 78 | + | local CHECK_SLOT_02 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_05) | |
| 79 | + | local CHECK_SLOT_03 = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_06) | |
| 80 | + | SPELL_ID = 69 | |
| 81 | + | ||
| 82 | + | if GUN_ID > 0 then | |
| 83 | + | if CHECK_SLOT_01 == SPELL_ID then | |
| 84 | + | cid:sendCancelMessage("@SpellCooldown 01") | |
| 85 | + | return true | |
| 86 | + | elseif CHECK_SLOT_02 == SPELL_ID then | |
| 87 | + | cid:sendCancelMessage("@SpellCooldown 02") | |
| 88 | + | return true | |
| 89 | + | elseif CHECK_SLOT_03 == SPELL_ID then | |
| 90 | + | cid:sendCancelMessage("@SpellCooldown 03") | |
| 91 | + | return true | |
| 92 | + | else | |
| 93 | + | return false | |
| 94 | + | end | |
| 95 | + | else | |
| 96 | + | return false | |
| 97 | + | end | |
| 98 | + | end | |
| 99 | + | function onCastSpell(cid, var) | |
| 100 | + | if checkSpell69(cid) or cid:getGroup():getAccess() then | |
| 101 | + | local startPos = getCreaturePosition(cid) | |
| 102 | + | local GUN_ID = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_01) | |
| 103 | + | local starGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_03) | |
| 104 | + | local levelGun = cid:getStorageValue(_SYSTEM.INVENTARIO[04].UID_07) | |
| 105 | + | min = onDamage(cid, GUN_ID, levelGun, starGun, "SKILL_MIN", SPELL_ID) | |
| 106 | + | max = min | |
| 107 | + | addEvent(RunPart,900,combat9_Brush,cid.uid,var) | |
| 108 | + | addEvent(RunPart,600,combat6_Brush,cid.uid,var) | |
| 109 | + | addEvent(RunPart,300,combat3_Brush,cid.uid,var) | |
| 110 | + | RunPart(combat0_Brush,cid,var) | |
| 111 | + | return true | |
| 112 | + | else | |
| 113 | + | cid:getPosition():sendMagicEffect(03) | |
| 114 | + | return false | |
| 115 | + | end | |
| 116 | + | end |
| @@ -0,0 +1,279 @@ | |||
| 1 | + | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | + | <spells> | |
| 3 | + | ||
| 4 | + | <!-- Gon Spells --> | |
| 5 | + | <!-- Gon Spells level 1 --> | |
| 6 | + | <instant group="attack" name="Gon Basic Punch" words="@#$0" level="1" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" needlearn="0" script="gon/1.lua"> | |
| 7 | + | <vocation name="Gon" /> | |
| 8 | + | </instant> | |
| 9 | + | <!-- Gon Spells level 10 --> | |
| 10 | + | <instant group="attack" name="Gon Sequence Punch" words="@#$1" level="5" range="1" casterTargetOrDirection="1" blockwalls="1" needlearn="0" exhaustion="0" script="gon/10.lua"> | |
| 11 | + | <vocation name="Gon" /> | |
| 12 | + | </instant> | |
| 13 | + | <!-- Gon Spells level 15 --> | |
| 14 | + | <instant group="attack" name="Jajanken Gu" words="@#$2" level="15" range="2" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" cooldown="0" needlearn="0" script="gon/15.lua"> | |
| 15 | + | <vocation name="Gon" /> | |
| 16 | + | </instant> | |
| 17 | + | <!-- Gon Spells level 20 --> | |
| 18 | + | <instant group="attack" name="Ren" words="@#$3" level="20" manapercent="25" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" cooldown="0" needlearn="0" script="gon/20.lua"> | |
| 19 | + | <vocation name="Gon" /> | |
| 20 | + | </instant> | |
| 21 | + | <!-- Gon Spells level 25 --> | |
| 22 | + | <instant group="attack" name="Dash" words="@#$4" level="25" manapercent="25" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" cooldown="0" needlearn="0" script="gon/dash.lua"> | |
| 23 | + | <vocation name="Gon" /> | |
| 24 | + | </instant> | |
| 25 | + | <!-- Gon Spells level 35 --> | |
| 26 | + | <instant group="attack" name="Rock Smash" words="@#$5" level="35" manapercent="50" range="3" premium="0" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" cooldown="0" needlearn="0" script="gon/35.lua"> | |
| 27 | + | <vocation name="Gon" /> | |
| 28 | + | </instant> | |
| 29 | + | <!-- Gon Spells level 50 --> | |
| 30 | + | <instant group="attack" name="Jajaken Chi" words="@#$6" level="50" manapercent="50" premium="0" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" cooldown="0" needlearn="0" script="gon/50.lua"> | |
| 31 | + | <vocation name="Gon" /> | |
| 32 | + | </instant> | |
| 33 | + | <!-- Gon Spells level 55 --> | |
| 34 | + | <instant group="attack" name="Jajaken Pa" words="@#$7" level="55" manapercent="30" premium="0" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" cooldown="0" needlearn="0" script="gon/55.lua"> | |
| 35 | + | <vocation name="Gon" /> | |
| 36 | + | </instant> | |
| 37 | + | <!-- Killua --> | |
| 38 | + | ||
| 39 | + | <!-- Killua Spells level 1 --> | |
| 40 | + | <instant group="attack" name="Claws" words="Claws" level="1" range="1" casterTargetOrDirection="1" blockwalls="1" script="killua/Claws.lua"> | |
| 41 | + | <vocation name="killua" /> | |
| 42 | + | </instant> | |
| 43 | + | <!-- Killua Spells level 10 --> | |
| 44 | + | <instant group="attack" name="Double Claws" words="Double Claws" level="10" range="1" casterTargetOrDirection="1" blockwalls="1" script="killua/Double Claws.lua"> | |
| 45 | + | <vocation name="killua" /> | |
| 46 | + | </instant> | |
| 47 | + | <!-- killua Spells level 15 --> | |
| 48 | + | <instant group="attack" name="Critical Claws" words="Critical Claws" level="15" range="2" casterTargetOrDirection="1" blockwalls="1" script="killua/Critical Claws.lua"> | |
| 49 | + | <vocation name="Killua" /> | |
| 50 | + | </instant> | |
| 51 | + | <!-- killua Spells level 20 --> | |
| 52 | + | <instant group="attack" name="Dark Steps" words="Dark Steps" level="20" range="1" casterTargetOrDirection="1" blockwalls="1" script="killua/Dark Steps.lua"> | |
| 53 | + | <vocation name="killua" /> | |
| 54 | + | </instant> | |
| 55 | + | <instant group="attack" name="Ren" words="Ren" level="20" script="killua/Ren.lua"> | |
| 56 | + | <vocation name="killua" /> | |
| 57 | + | </instant> | |
| 58 | + | <!-- killua Spells level 25 --> | |
| 59 | + | <instant group="attack" name="Rhythm Echo" words="Rhythm Echo" level="25" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/Rhythm Echo.lua"> | |
| 60 | + | <vocation name="killua" /> | |
| 61 | + | </instant> | |
| 62 | + | <!-- killua Spells level 40 --> | |
| 63 | + | <instant group="attack" name="Kanden shi" words="Kanden shi" level="40" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/Kanden shi.lua"> | |
| 64 | + | <vocation name="killua" /> | |
| 65 | + | </instant> | |
| 66 | + | <!-- killua Spells level 55 --> | |
| 67 | + | <instant group="attack" name="God Speed" words="God Speed" level="55" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/God Speed.lua"> | |
| 68 | + | <vocation name="killua" /> | |
| 69 | + | </instant> | |
| 70 | + | <!-- killua Spells level 55 --> | |
| 71 | + | <instant group="attack" name="sdpeed" words="sdpeed" level="55" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/some.lua"> | |
| 72 | + | <vocation name="killua" /> | |
| 73 | + | </instant> | |
| 74 | + | ||
| 75 | + | ||
| 76 | + | <!-- GodSpeed Spells level 50 --> | |
| 77 | + | <instant group="attack" name="Denkosekka no supido" words="Denkosekka no Supido" level="50" casterTargetOrDirection="1" blockwalls="1" script="killua/godspeed/Denkosekka No Supido.lua"> | |
| 78 | + | <vocation name="GodSpeed" /> | |
| 79 | + | </instant> | |
| 80 | + | <instant group="attack" name="Narukami" words="Narukami" level="50" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/godspeed/Narukami.lua"> | |
| 81 | + | <vocation name="GodSpeed" /> | |
| 82 | + | </instant> | |
| 83 | + | <instant group="attack" name="Denki Tenohira" words="Denki Tenohira" level="50" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/godspeed/Denki Tenohira.lua"> | |
| 84 | + | <vocation name="GodSpeed" /> | |
| 85 | + | </instant> | |
| 86 | + | <instant group="attack" name="Denki Inparusu" words="Denki Inparusu" level="50" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/godspeed/Denki Inparusu.lua"> | |
| 87 | + | <vocation name="GodSpeed" /> | |
| 88 | + | </instant> | |
| 89 | + | <instant group="attack" name="Cancelar" words="Cancelar" level="55" range="4" casterTargetOrDirection="1" blockwalls="1" script="killua/God Speed.lua"> | |
| 90 | + | <vocation name="GodSpeed" /> | |
| 91 | + | </instant> | |
| 92 | + | ||
| 93 | + | ||
| 94 | + | <!-- Kurapika Spells level 1 --> | |
| 95 | + | <instant group="attack" name="Double Sowrd" words="$$$$0" level="1" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" needlearn="0" script="gon/1.lua"> | |
| 96 | + | <vocation name="Kurapika" /> | |
| 97 | + | </instant> | |
| 98 | + | ||
| 99 | + | <!-- Kurapika Spells level 10 --> | |
| 100 | + | <instant group="attack" name="Gon Sequence Punch" words="@#$01" level="5" range="1" casterTargetOrDirection="1" blockwalls="1" needlearn="0" exhaustion="0" script="gon/10.lua"> | |
| 101 | + | <vocation name="Kurapika" /> | |
| 102 | + | </instant> | |
| 103 | + | ||
| 104 | + | <!-- Kurapika Spells level 15 --> | |
| 105 | + | <instant group="attack" name="Jajanken Gu" words="@#$02" level="15" range="2" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" needlearn="0" script="gon/15.lua"> | |
| 106 | + | <vocation name="Kurapika" /> | |
| 107 | + | </instant> | |
| 108 | + | ||
| 109 | + | <!-- Kurapika Spells level 20 --> | |
| 110 | + | <instant group="attack" name="Ren" words="$$$$3" level="20" manapercent="25" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" needlearn="0" script="gon/20.lua"> | |
| 111 | + | <vocation name="Kurapika" /> | |
| 112 | + | </instant> | |
| 113 | + | ||
| 114 | + | <!-- Kurapika Spells level 25 --> | |
| 115 | + | <instant group="attack" name="Dash" words="@#$03" level="25" manapercent="25" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" needlearn="0" script="gon/dash.lua"> | |
| 116 | + | <vocation name="Kurapika" /> | |
| 117 | + | </instant> | |
| 118 | + | ||
| 119 | + | <!-- Kurapika Spells level 35 --> | |
| 120 | + | <instant group="attack" name="Holy Chain" words="Holy Chain" level="35" manapercent="50" premium="0" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" needlearn="0" script="kurapika/Holy Chain.lua"> | |
| 121 | + | <vocation name="Kurapika" /> | |
| 122 | + | </instant> | |
| 123 | + | ||
| 124 | + | <!-- Kurapika Spells level 50 --> | |
| 125 | + | <instant group="attack" name="Chain Jail" words="Chain Jail" level="50" manapercent="50" premium="0" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="0" cooldown="0" groupexhaustion="2000" needlearn="0" script="kurapika/Chain Jail.lua"> | |
| 126 | + | <vocation name="Kurapika" /> | |
| 127 | + | </instant> | |
| 128 | + | ||
| 129 | + | <!-- Custom - Ice Spells --> | |
| 130 | + | <instant group="attack" spellid="01" aggressive="1" name="Seal of Chaotic Disruption" words="skill 1" level="01" range="5" needtarget="0" cooldown="15000" script="seal_of_chaotic_disruption.lua"/> | |
| 131 | + | <instant group="attack" spellid="02" aggressive="1" name="Frozen Cataclysm" words="skill 2" level="01" range="5" needtarget="1" cooldown="14000" script="frozen_cataclysm.lua"/> | |
| 132 | + | <instant group="attack" spellid="03" aggressive="1" name="Lunar Orbs" words="skill 3" level="01" range="5" needtarget="1" cooldown="20000" script="lunar_orbs.lua"/> | |
| 133 | + | <instant group="attack" spellid="04" aggressive="1" name="Delusion Wave" words="skill 4" level="01" range="5" needtarget="1" cooldown="10000" script="delusion_wave.lua"/> | |
| 134 | + | <instant group="attack" spellid="05" aggressive="1" name="Duplicity of Insanity" words="skill 5" level="01" range="5" needtarget="0" cooldown="16000" script="duplicity_of_insanity.lua"/> | |
| 135 | + | <instant group="attack" spellid="06" aggressive="1" name="Frostfire Hail" words="skill 6" level="01" range="5" needtarget="1" cooldown="9000" script="frostfire_hail.lua"/> | |
| 136 | + | <instant group="attack" spellid="07" aggressive="1" name="Frostfire Torrent" words="skill 7" level="01" range="5" needtarget="1" cooldown="15000" script="frostfire_torrent.lua"/> | |
| 137 | + | <instant group="attack" spellid="08" aggressive="1" name="Imbuement Spellshield" words="skill 8" level="01" range="5" needtarget="0" cooldown="13000" script="imbuement_spellshield.lua"/> | |
| 138 | + | <instant group="attack" spellid="09" aggressive="1" name="Eruption Bolt" words="skill 9" level="01" range="5" needtarget="1" cooldown="16000" script="eruption_bolt.lua"/> | |
| 139 | + | <instant group="attack" spellid="10" aggressive="1" name="Arcane Rage" words="skill 10" level="01" range="5" needtarget="0" cooldown="15000" script="arcane_rage.lua"/> | |
| 140 | + | ||
| 141 | + | <!-- Custom - Fire Spells --> | |
| 142 | + | <instant group="attack" spellid="11" aggressive="1" name="Fire Rush" words="skill 11" level="01" range="5" needtarget="0" cooldown="5000" script="fire_rush.lua"/> | |
| 143 | + | <instant group="attack" spellid="12" aggressive="1" name="Ball of Pain" words="skill 12" level="01" range="5" needtarget="1" cooldown="20000" script="ball_of_pain.lua"/> | |
| 144 | + | <instant group="attack" spellid="13" aggressive="1" name="Banish Elemental" words="skill 13" level="01" range="5" needtarget="0" cooldown="15000" script="banish_elemental.lua"/> | |
| 145 | + | <instant group="attack" spellid="14" aggressive="1" name="Fiery Surge" words="skill 14" level="01" range="5" needtarget="1" cooldown="10000" script="fiery_surge.lua"/> | |
| 146 | + | <instant group="attack" spellid="15" aggressive="1" name="Suffering" words="skill 15" level="01" range="5" needtarget="1" cooldown="23000" script="suffering.lua"/> | |
| 147 | + | <instant group="attack" spellid="16" aggressive="1" name="Soul Blaze" words="skill 16" level="01" range="5" needtarget="0" cooldown="19000" script="soul_blaze.lua"/> | |
| 148 | + | <instant group="attack" spellid="17" aggressive="1" name="Decay of Knowledge" words="skill 17" level="01" range="5" needtarget="0" cooldown="20000" script="decay_of_knowledge.lua"/> | |
| 149 | + | <instant group="attack" spellid="18" aggressive="1" name="Carnage of Armor" words="skill 18" level="01" range="5" needtarget="0" cooldown="24000" script="carnage_of_armor.lua"/> | |
| 150 | + | <instant group="attack" spellid="19" aggressive="1" name="Slow Fire" words="skill 19" level="01" range="5" needtarget="1" cooldown="9000" script="slow_fire.lua"/> | |
| 151 | + | <instant group="attack" spellid="20" aggressive="1" name="Lava Burst" words="skill 20" level="01" range="5" needtarget="0" cooldown="4000" script="lava_burst.lua"/> | |
| 152 | + | ||
| 153 | + | ||
| 154 | + | <!-- Custom - Death Spells --> | |
| 155 | + | <instant group="attack" spellid="21" aggressive="1" name="Curse of Soul Draining" words="skill 21" level="01" range="5" needtarget="1" cooldown="24000" script="curse_of_soul_draining.lua"/> | |
| 156 | + | <instant group="attack" spellid="22" aggressive="1" name="Soul Hail" words="skill 22" level="01" range="5" needtarget="1" cooldown="5000" script="soul_hail.lua"/> | |
| 157 | + | <instant group="attack" spellid="23" aggressive="1" name="Cursed Misery" words="skill 23" level="01" range="5" needtarget="0" cooldown="11000" script="cursed_misery.lua"/> | |
| 158 | + | <instant group="attack" spellid="24" aggressive="1" name="Blast of the Ancestors" words="skill 24" level="01" range="5" needtarget="1" cooldown="25000" script="blast_of_the_ancestors.lua"/> | |
| 159 | + | <instant group="attack" spellid="25" aggressive="1" name="Curse of Ancestral Fury" words="skill 25" level="01" range="5" needtarget="1" cooldown="26000" script="curse_of_ancestral_fury.lua"/> | |
| 160 | + | <instant group="attack" spellid="26" aggressive="1" name="Void Frenzy" words="skill 26" level="01" range="5" needtarget="0" cooldown="18000" script="void_frenzy.lua"/> | |
| 161 | + | <instant group="attack" spellid="27" aggressive="1" name="Flash Cursed" words="skill 27" level="01" range="5" needtarget="1" cooldown="19000" script="flash_cursed.lua"/> | |
| 162 | + | <instant group="attack" spellid="28" aggressive="1" name="Perversion Beam" words="skill 28" level="01" range="5" needtarget="0" cooldown="25000" script="perversion_beam.lua"/> | |
| 163 | + | <instant group="attack" spellid="29" aggressive="1" name="Death Shock" words="skill 29" level="01" range="5" needtarget="0" cooldown="5000" script="death_shock.lua"/> | |
| 164 | + | <instant group="attack" spellid="30" aggressive="1" name="Death Salvo" words="skill 30" level="01" range="5" needtarget="0" cooldown="20000" script="death_salvo.lua"/> | |
| 165 | + | ||
| 166 | + | <!-- Custom - Physical Spells --> | |
| 167 | + | <instant group="attack" spellid="31" aggressive="1" name="Rain Sword" words="skill 31" level="01" range="5" needtarget="0" cooldown="18000" script="rain_sword.lua"/> | |
| 168 | + | <instant group="attack" spellid="32" aggressive="1" name="Fury Impact" words="skill 32" level="01" range="5" needtarget="0" cooldown="5000" script="fury_impact.lua"/> | |
| 169 | + | <instant group="attack" spellid="33" aggressive="1" name="Blood Punish" words="skill 33" level="01" range="5" needtarget="0" cooldown="14000" script="blood_punish.lua"/> | |
| 170 | + | <instant group="attack" spellid="34" aggressive="1" name="Blood Dawn" words="skill 34" level="01" range="5" needtarget="1" cooldown="16000" script="blood_dawn.lua"/> | |
| 171 | + | <instant group="attack" spellid="35" aggressive="1" name="Double Punch" words="skill 35" level="01" range="5" needtarget="1" cooldown="8000" script="double_punch.lua"/> | |
| 172 | + | <instant group="attack" spellid="36" aggressive="1" name="Death Bleeding" words="skill 36" level="01" range="5" needtarget="1" cooldown="10000" script="death_bleeding.lua"/> | |
| 173 | + | <instant group="attack" spellid="37" aggressive="1" name="Cyclone Beast" words="skill 37" level="01" range="5" needtarget="1" cooldown="9000" script="cyclone_beast.lua"/> | |
| 174 | + | <instant group="attack" spellid="38" aggressive="1" name="Obliteration Bomb" words="skill 38" level="01" range="5" needtarget="0" cooldown="27000" script="obliteration_bomb.lua"/> | |
| 175 | + | <instant group="attack" spellid="39" aggressive="1" name="Beast Bit" words="skill 39" level="01" range="5" needtarget="1" cooldown="9000" script="beast_bit.lua"/> | |
| 176 | + | <instant group="attack" spellid="40" aggressive="1" name="Solitude of Chaos" words="skill 40" level="01" range="5" needtarget="0" cooldown="10000" script="solitude_of_chaos.lua"/> | |
| 177 | + | ||
| 178 | + | <!-- Custom - Holy Spells --> | |
| 179 | + | <instant group="attack" spellid="41" aggressive="1" name="Runic Blast" words="skill 41" level="01" range="5" needtarget="0" cooldown="15000" script="runic_blast.lua"/> | |
| 180 | + | <instant group="attack" spellid="42" aggressive="1" name="Holy Impact" words="skill 42" level="01" range="5" needtarget="1" cooldown="4000" script="holy_impact.lua"/> | |
| 181 | + | <instant group="attack" spellid="43" aggressive="1" name="Holy Void" words="skill 43" level="01" range="5" needtarget="0" cooldown="10000" script="holy_void.lua"/> | |
| 182 | + | <instant group="attack" spellid="44" aggressive="1" name="Blessed Hammer" words="skill 44" level="01" range="5" needtarget="1" cooldown="16000" script="blessed_hammer.lua"/> | |
| 183 | + | <instant group="attack" spellid="45" aggressive="1" name="Barrier of Holy" words="skill 45" level="01" range="5" needtarget="0" cooldown="28000" script="barrier_of_holy.lua"/> | |
| 184 | + | <instant group="attack" spellid="46" aggressive="1" name="Judgement of the Spirit" words="skill 46" level="01" range="5" needtarget="0" cooldown="16000" script="judgement_of_the_spirit.lua"/> | |
| 185 | + | <instant group="attack" spellid="47" aggressive="1" name="Triple Spirit" words="skill 47" level="01" range="5" needtarget="1" cooldown="21000" script="triple_spirit.lua"/> | |
| 186 | + | <instant group="attack" spellid="48" aggressive="1" name="Sunlight Strike" words="skill 48" level="01" range="5" needtarget="0" cooldown="25000" script="sunlight_strike.lua"/> | |
| 187 | + | <instant group="attack" spellid="49" aggressive="1" name="Manifest Soul" words="skill 49" level="01" range="5" needtarget="0" cooldown="28000" script="manifest_soul.lua"/> | |
| 188 | + | <instant group="attack" spellid="50" aggressive="1" name="Protection of the Spirit" words="skill 50" level="01" range="5" needtarget="0" cooldown="26000" script="protection_of_the_spirit.lua"/> | |
| 189 | + | ||
| 190 | + | <!-- Custom - Earth Spells --> | |
| 191 | + | <instant group="attack" spellid="51" aggressive="1" name="Toxic Punch" words="skill 51" level="01" range="5" needtarget="1" cooldown="5000" script="toxic_punch.lua"/> | |
| 192 | + | <instant group="attack" spellid="52" aggressive="1" name="Moss Smash" words="skill 52" level="01" range="5" needtarget="1" cooldown="16000" script="moss_smash.lua"/> | |
| 193 | + | <instant group="attack" spellid="53" aggressive="1" name="Carnivore Shield" words="skill 53" level="01" range="5" needtarget="0" cooldown="5000" script="carnivore_shield.lua"/> | |
| 194 | + | <instant group="attack" spellid="54" aggressive="1" name="Plant Attack" words="skill 54" level="01" range="5" needtarget="1" cooldown="8000" script="plant_attack.lua"/> | |
| 195 | + | <instant group="attack" spellid="55" aggressive="1" name="Triple Poison" words="skill 55" level="01" range="5" needtarget="1" cooldown="20000" script="triple_poison.lua"/> | |
| 196 | + | <instant group="attack" spellid="56" aggressive="1" name="Dishonor of Seals" words="skill 56" level="01" range="5" needtarget="0" cooldown="20000" script="dishonor_of_seals.lua"/> | |
| 197 | + | <instant group="attack" spellid="57" aggressive="1" name="Deflection of Venom" words="skill 57" level="01" range="5" needtarget="0" cooldown="25000" script="deflection_of_venom.lua"/> | |
| 198 | + | <instant group="attack" spellid="58" aggressive="1" name="Void Eruption" words="skill 58" level="01" range="5" needtarget="0" cooldown="20000" script="void_eruption.lua"/> | |
| 199 | + | <instant group="attack" spellid="59" aggressive="1" name="Nature Wave" words="skill 59" level="01" range="5" needtarget="0" cooldown="15000" script="nature_wave.lua"/> | |
| 200 | + | <instant group="attack" spellid="60" aggressive="1" name="Burst of Venom" words="skill 60" level="01" range="5" needtarget="0" cooldown="6000" script="burst_of_venom.lua"/> | |
| 201 | + | ||
| 202 | + | <!-- Custom - Energy Spells --> | |
| 203 | + | <instant group="attack" spellid="61" aggressive="1" name="Soul Ray" words="skill 61" level="01" range="5" needtarget="0" cooldown="5000" script="soul_ray.lua"/> | |
| 204 | + | <instant group="attack" spellid="62" aggressive="1" name="Bolt of Energy" words="skill 62" level="01" range="5" needtarget="1" cooldown="11000" script="bolt_of_energy.lua"/> | |
| 205 | + | <instant group="attack" spellid="63" aggressive="1" name="Spectral Bolt" words="skill 63" level="01" range="5" needtarget="1" cooldown="15000" script="spectral_bolt.lua"/> | |
| 206 | + | <instant group="attack" spellid="64" aggressive="1" name="Arcane Nova" words="skill 64" level="01" range="5" needtarget="0" cooldown="25000" script="arcane_nova.lua"/> | |
| 207 | + | <instant group="attack" spellid="65" aggressive="1" name="Small Storm" words="skill 65" level="01" range="5" needtarget="1" cooldown="6000" script="small_storm.lua"/> | |
| 208 | + | <instant group="attack" spellid="66" aggressive="1" name="Ball of Shattering" words="skill 66" level="01" range="5" needtarget="0" cooldown="27000" script="ball_of_shattering.lua"/> | |
| 209 | + | <instant group="attack" spellid="67" aggressive="1" name="Rain Chaos" words="skill 67" level="01" range="5" needtarget="0" cooldown="20000" script="rain_chaos.lua"/> | |
| 210 | + | <instant group="attack" spellid="68" aggressive="1" name="Energy Rocket" words="skill 68" level="01" range="5" needtarget="1" cooldown="19000" script="attacks_moves/attack_spell.lua"/> | |
| 211 | + | <instant group="attack" spellid="75" aggressive="1" name="Byakuya Spell" words="skill 75" level="01" range="7" needtarget="1" cooldown="60000" script="attacks_moves/byakuya_spell.lua"/> | |
| 212 | + | <instant group="attack" spellid="69" aggressive="1" name="X Eletric" words="skill 69" level="01" range="5" needtarget="1" cooldown="15000" script="x_eletric.lua"/> | |
| 213 | + | <instant group="attack" spellid="70" aggressive="1" name="Barrier of Energy" words="skill 70" level="01" range="5" needtarget="0" cooldown="10000" script="barrier_of_energy.lua"/> | |
| 214 | + | ||
| 215 | + | <!-- Magias de Suporte --> | |
| 216 | + | <instant group="support" spellid="71" aggressive="0" name="Speed of Gods" words="skill 71" level="01" range="5" needtarget="0" cooldown="15000" script="speed_of_gods.lua"/> | |
| 217 | + | <instant group="healing" spellid="72" aggressive="0" name="Intense Recovery" words="skill 72" level="01" range="5" needtarget="0" cooldown="1000" script="intense_recovery.lua"/> | |
| 218 | + | <instant group="attack" spellid="73" aggressive="1" name="Maestria" words="skill 73" level="01" range="5" needtarget="0" cooldown="15000" script="maestria.lua"/> | |
| 219 | + | <instant group="attack" spellid="76" aggressive="1" name="BackstepBarrage" words="skill 76" level="80" range="1" needtarget="0" cooldown="8000" script="gon/dash.lua"/> | |
| 220 | + | ||
| 221 | + | ||
| 222 | + | <!-- Monster Spells --> | |
| 223 | + | <instant name="ghastly dragon curse" words="###1" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/ghastly_dragon_curse.lua" /> | |
| 224 | + | <instant name="djinn electrify" words="###2" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/djinn_electrify.lua" /> | |
| 225 | + | <instant name="energy elemental electrify" words="###3" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/energy_elemental_electrify.lua" /> | |
| 226 | + | <instant name="massive energy elemental electrify" words="###4" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/massive_energy_elemental_electrify.lua" /> | |
| 227 | + | <instant name="massive fire elemental soulfire" words="###5" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/massive_fire_elemental_soulfire.lua" /> | |
| 228 | + | <instant name="hellfire fighter soulfire" words="###6" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/hellfire_fighter_soulfire.lua" /> | |
| 229 | + | <instant name="hellspawn soulfire" words="###7" aggressive="1" blockwalls="1" range="7" needtarget="1" needlearn="1" script="monster/hellspawn_soulfire.lua" /> | |
| 230 | + | <instant name="spectre drown" words="###8" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/spectre_drown.lua" /> | |
| 231 | + | <instant name="phantasm drown" words="###9" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/phantasm_drown.lua" /> | |
| 232 | + | <instant name="undead dragon curse" words="###10" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/undead_dragon_curse.lua" /> | |
| 233 | + | <instant name="draken abomination curse" words="###11" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/draken_abomination_curse.lua" /> | |
| 234 | + | <instant name="lancer beetle curse" words="###12" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/lancer_beetle_curse.lua" /> | |
| 235 | + | <instant name="lizard magistratus curse" words="###13" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/lizard_magistratus_curse.lua" /> | |
| 236 | + | <instant name="death blob curse" words="###14" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/death_blob_curse.lua" /> | |
| 237 | + | <instant name="choking fear drown" words="###15" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/choking_fear_drown.lua" /> | |
| 238 | + | <instant name="blightwalker curse" words="###16" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/blightwalker_curse.lua" /> | |
| 239 | + | <instant name="sea serpent drown" words="###17" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/sea_serpent_drown.lua" /> | |
| 240 | + | <instant name="young sea serpent drown" words="###18" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/young_sea_serpent_drown.lua" /> | |
| 241 | + | <instant name="quara constrictor freeze" words="###19" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/quara_constrictor_freeze.lua" /> | |
| 242 | + | <instant name="quara constrictor electrify" words="###20" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/quara_constrictor_electrify.lua" /> | |
| 243 | + | <instant name="cliff strider electrify" words="###21" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/cliff_strider_electrify.lua" /> | |
| 244 | + | <instant name="war golem electrify" words="###22" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/war_golem_electrify.lua" /> | |
| 245 | + | <instant name="souleater drown" words="###23" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/souleater_drown.lua" /> | |
| 246 | + | <instant name="mutated bat curse" words="###24" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/mutated_bat_curse.lua" /> | |
| 247 | + | <instant name="vulcongra soulfire" words="###25" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/vulcongra_soulfire.lua" /> | |
| 248 | + | <instant name="lava golem soulfire" words="###26" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/lava_golem_soulfire.lua" /> | |
| 249 | + | <instant name="magma crawler soulfire" words="###27" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/magma_crawler_soulfire.lua" /> | |
| 250 | + | <instant name="war golem skill reducer" words="###28" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/war_golem_skill_reducer.lua" /> | |
| 251 | + | <instant name="silencer skill reducer" words="###29" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/silencer_skill_reducer.lua" /> | |
| 252 | + | <instant name="warlock skill reducer" words="###30" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/warlock_skill_reducer.lua" /> | |
| 253 | + | <instant name="cliff strider skill reducer" words="###31" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/cliff_strider_skill_reducer.lua" /> | |
| 254 | + | <instant name="stampor skill reducer" words="###32" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/stampor_skill_reducer.lua" /> | |
| 255 | + | <instant name="diabolic imp skill reducer" words="###33" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/diabolic_imp_skill_reducer.lua" /> | |
| 256 | + | <instant name="dark torturer skill reducer" words="###34" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/dark_torturer_skill_reducer.lua" /> | |
| 257 | + | <instant name="forest fury skill reducer" words="###35" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/forest_fury_skill_reducer.lua" /> | |
| 258 | + | <instant name="demon outcast skill reducer" words="###36" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/demon_outcast_skill_reducer.lua" /> | |
| 259 | + | <instant name="fury skill reducer" words="###37" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/fury_skill_reducer.lua" /> | |
| 260 | + | <instant name="barbarian brutetamer skill reducer" words="###38" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/barbarian_brutetamer_skill_reducer.lua" /> | |
| 261 | + | <instant name="deepling spellsinger skill reducer" words="###39" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/deepling_spellsinger_skill_reducer.lua" /> | |
| 262 | + | <instant name="werewolf skill reducer" words="###40" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/werewolf_skill_reducer.lua" /> | |
| 263 | + | <instant name="ice golem skill reducer" words="###41" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/ice_golem_skill_reducer.lua" /> | |
| 264 | + | <instant name="feversleep skill reducer" words="###42" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/feversleep_skill_reducer.lua" /> | |
| 265 | + | <instant name="shock head skill reducer 1" words="###43" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/shock_head_skill_reducer_1.lua" /> | |
| 266 | + | <instant name="shock head skill reducer 2" words="###44" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/shock_head_skill_reducer_2.lua" /> | |
| 267 | + | <instant name="enslaved dwarf skill reducer 1" words="###45" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/enslaved_dwarf_skill_reducer_1.lua" /> | |
| 268 | + | <instant name="enslaved dwarf skill reducer 2" words="###46" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/enslaved_dwarf_skill_reducer_2.lua" /> | |
| 269 | + | <instant name="djinn cancel invisibility" words="###47" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/djinn_cancel_invisibility.lua" /> | |
| 270 | + | <instant name="betrayed wraith skill reducer" words="###48" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/betrayed_wraith_skill_reducer.lua" /> | |
| 271 | + | <instant name="pirate corsair skill reducer" words="###49" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/pirate_corsair_skill_reducer.lua" /> | |
| 272 | + | <instant name="monster soulfire" words="###50" aggressive="1" blockwalls="1" range="7" needtarget="1" needlearn="1" script="monster/monster_soulfire.lua" /> | |
| 273 | + | <instant name="dipthrah skill reducer" words="###51" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/dipthrah_skill_reducer.lua" /> | |
| 274 | + | <instant name="rustheap golem electrify" words="###368" aggressive="1" blockwalls="1" needtarget="1" needlearn="1" script="monster/rustheap golem electrify.lua"/> | |
| 275 | + | <instant name="rustheap golem wave" words="###369" direction="1" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/rustheap golem wave.lua"/> | |
| 276 | + | <instant name="frazzlemaw paralyze" words="###356" aggressive="1" blockwalls="1" needtarget="0" needlearn="1" script="monster/frazzlemaw paralyze.lua"/> | |
| 277 | + | <instant name="glooth anemone summon" words="##372" aggressive="0" blockwalls="1" needtarget="0" needlearn="1" script="monster/glooth anemone summon.lua"/> | |
| 278 | + | <instant name="soldier challenger" words="##373" aggressive="0" blockwalls="1" needtarget="0" needlearn="1" script="support/challenge.lua"/> | |
| 279 | + | </spells> |
| @@ -0,0 +1,12 @@ | |||
| 1 | + | local logFormat = "[%s] %s %s" | |
| 2 | + | ||
| 3 | + | function logCommand(player, words, param) | |
| 4 | + | local file = io.open("data/logs/" .. player:getName() .. " commands.log", "a") | |
| 5 | + | if not file then | |
| 6 | + | return | |
| 7 | + | end | |
| 8 | + | ||
| 9 | + | io.output(file) | |
| 10 | + | io.write(logFormat:format(os.date("%d/%m/%Y %H:%M"), words, param):trim() .. "\n") | |
| 11 | + | io.close(file) | |
| 12 | + | end |
| @@ -0,0 +1,57 @@ | |||
| 1 | + | local function getSkillId(skillName) | |
| 2 | + | if skillName == "club" then | |
| 3 | + | return SKILL_CLUB | |
| 4 | + | elseif skillName == "sword" then | |
| 5 | + | return SKILL_SWORD | |
| 6 | + | elseif skillName == "axe" then | |
| 7 | + | return SKILL_AXE | |
| 8 | + | elseif skillName:sub(1, 4) == "dist" then | |
| 9 | + | return SKILL_DISTANCE | |
| 10 | + | elseif skillName:sub(1, 6) == "shield" then | |
| 11 | + | return SKILL_SHIELD | |
| 12 | + | elseif skillName:sub(1, 4) == "fish" then | |
| 13 | + | return SKILL_FISHING | |
| 14 | + | else | |
| 15 | + | return SKILL_FIST | |
| 16 | + | end | |
| 17 | + | end | |
| 18 | + | ||
| 19 | + | local function getExpForLevel(level) | |
| 20 | + | level = level - 1 | |
| 21 | + | return ((50 * level * level * level) - (150 * level * level) + (400 * level)) / 3 | |
| 22 | + | end | |
| 23 | + | ||
| 24 | + | function onSay(player, words, param) | |
| 25 | + | if player:getGroup():getId() < 3 then | |
| 26 | + | return false | |
| 27 | + | end | |
| 28 | + | local split = param:splitTrimmed(",") | |
| 29 | + | if not split[2] then | |
| 30 | + | player:sendCancelMessage("Insufficient parameters.") | |
| 31 | + | return false | |
| 32 | + | end | |
| 33 | + | ||
| 34 | + | local target = Player(split[1]) | |
| 35 | + | if not target then | |
| 36 | + | player:sendCancelMessage("A player with that name is not online.") | |
| 37 | + | return false | |
| 38 | + | end | |
| 39 | + | ||
| 40 | + | local count = 1 | |
| 41 | + | if split[3] then | |
| 42 | + | count = tonumber(split[3]) | |
| 43 | + | end | |
| 44 | + | ||
| 45 | + | local ch = split[2]:sub(1, 1) | |
| 46 | + | for i = 1, count do | |
| 47 | + | if ch == "l" or ch == "e" then | |
| 48 | + | target:addExperience(getExpForLevel(target:getLevel() + 1) - target:getExperience(), false) | |
| 49 | + | elseif ch == "m" then | |
| 50 | + | target:addManaSpent(target:getVocation():getRequiredManaSpent(target:getBaseMagicLevel() + 1) - target:getManaSpent()) | |
| 51 | + | else | |
| 52 | + | local skillId = getSkillId(split[2]) | |
| 53 | + | target:addSkillTries(skillId, target:getVocation():getRequiredSkillTries(skillId, target:getSkillLevel(skillId) + 1) - target:getSkillTries(skillId)) | |
| 54 | + | end | |
| 55 | + | end | |
| 56 | + | return false | |
| 57 | + | end |
| @@ -0,0 +1,21 @@ | |||
| 1 | + | function onSay(player, words, param) | |
| 2 | + | if player:getGroup():getId() < 3 then | |
| 3 | + | return false | |
| 4 | + | end | |
| 5 | + | ||
| 6 | + | local target = Player(param) | |
| 7 | + | if not target then | |
| 8 | + | player:sendCancelMessage("A player with that name is not online.") | |
| 9 | + | return false | |
| 10 | + | end | |
| 11 | + | ||
| 12 | + | if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then | |
| 13 | + | player:sendCancelMessage("You can only promote a normal player to a tutor.") | |
| 14 | + | return false | |
| 15 | + | end | |
| 16 | + | ||
| 17 | + | target:setAccountType(ACCOUNT_TYPE_TUTOR) | |
| 18 | + | target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been promoted to a tutor by " .. player:getName() .. ".") | |
| 19 | + | player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have promoted " .. target:getName() .. " to a tutor.") | |
| 20 | + | return false | |
| 21 | + | end |
| @@ -0,0 +1,29 @@ | |||
| 1 | + | function onSay(player, words, param) | |
| 2 | + | if player:getGroup():getId() < 3 then | |
| 3 | + | return false | |
| 4 | + | end | |
| 5 | + | ||
| 6 | + | local effect = tonumber(param) | |
| 7 | + | local position = player:getPosition() | |
| 8 | + | local toPositionLow = {z = position.z} | |
| 9 | + | local toPositionHigh = {z = position.z} | |
| 10 | + | ||
| 11 | + | toPositionLow.x = position.x - 7 | |
| 12 | + | toPositionHigh.x = position.x + 7 | |
| 13 | + | for i = -5, 5 do | |
| 14 | + | toPositionLow.y = position.y + i | |
| 15 | + | toPositionHigh.y = toPositionLow.y | |
| 16 | + | position:sendDistanceEffect(toPositionLow, effect) | |
| 17 | + | position:sendDistanceEffect(toPositionHigh, effect) | |
| 18 | + | end | |
| 19 | + | ||
| 20 | + | toPositionLow.y = position.y - 5 | |
| 21 | + | toPositionHigh.y = position.y + 5 | |
| 22 | + | for i = -6, 6 do | |
| 23 | + | toPositionLow.x = position.x + i | |
| 24 | + | toPositionHigh.x = toPositionLow.x | |
| 25 | + | position:sendDistanceEffect(toPositionLow, effect) | |
| 26 | + | position:sendDistanceEffect(toPositionHigh, effect) | |
| 27 | + | end | |
| 28 | + | return false | |
| 29 | + | end |
| @@ -0,0 +1,39 @@ | |||
| 1 | + | local banDays = 7 | |
| 2 | + | ||
| 3 | + | function onSay(player, words, param) | |
| 4 | + | if player:getGroup():getId() < 3 then | |
| 5 | + | return false | |
| 6 | + | end | |
| 7 | + | ||
| 8 | + | local name = param | |
| 9 | + | local reason = '' | |
| 10 | + | ||
| 11 | + | local separatorPos = param:find(',') | |
| 12 | + | if separatorPos then | |
| 13 | + | name = param:sub(0, separatorPos - 1) | |
| 14 | + | reason = string.trim(param:sub(separatorPos + 1)) | |
| 15 | + | end | |
| 16 | + | ||
| 17 | + | local accountId = getAccountNumberByPlayerName(name) | |
| 18 | + | if accountId == 0 then | |
| 19 | + | return false | |
| 20 | + | end | |
| 21 | + | ||
| 22 | + | local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) | |
| 23 | + | if resultId ~= false then | |
| 24 | + | result.free(resultId) | |
| 25 | + | return false | |
| 26 | + | end | |
| 27 | + | ||
| 28 | + | local timeNow = os.time() | |
| 29 | + | db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. | |
| 30 | + | accountId .. ", " .. db.escapeString(reason) .. ", " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") | |
| 31 | + | ||
| 32 | + | local target = Player(name) | |
| 33 | + | if target then | |
| 34 | + | player:sendTextMessage(MESSAGE_EVENT_ADVANCE, target:getName() .. " has been banned.") | |
| 35 | + | target:remove() | |
| 36 | + | else | |
| 37 | + | player:sendTextMessage(MESSAGE_EVENT_ADVANCE, name .. " has been banned.") | |
| 38 | + | end | |
| 39 | + | end |
| @@ -0,0 +1,26 @@ | |||
| 1 | + | function onSay(player, words, param) | |
| 2 | + | if not player:hasFlag(PlayerFlag_CanBroadcast) then | |
| 3 | + | return true | |
| 4 | + | end | |
| 5 | + | ||
| 6 | + | if param == '' then | |
| 7 | + | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") | |
| 8 | + | return true | |
| 9 | + | end | |
| 10 | + | ||
| 11 | + | -- Permitir formato: color | mensaje | |
| 12 | + | local color, message = param:match("^(%w+)%s*|%s*(.+)$") | |
| 13 | + | if color and message then | |
| 14 | + | param = color .. "|" .. message | |
| 15 | + | end | |
| 16 | + | ||
| 17 | + | local MESSAGE_STATUS_WARNING = 20 | |
| 18 | + | ||
| 19 | + | -- Enviar el mensaje a todos los jugadores con el modo correcto. | |
| 20 | + | for _, targetPlayer in ipairs(Game.getPlayers()) do | |
| 21 | + | targetPlayer:sendTextMessage(MESSAGE_STATUS_WARNING, param) | |
| 22 | + | end | |
| 23 | + | ||
| 24 | + | print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".") | |
| 25 | + | return false | |
| 26 | + | end |
| @@ -0,0 +1,12 @@ | |||
| 1 | + | function onSay(cid, words, param, channel) | |
| 2 | + | if(param == '') then | |
| 3 | + | doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") | |
| 4 | + | return true | |
| 5 | + | end | |
| 6 | + | if doBroadcastMessage then | |
| 7 | + | doBroadcastMessage(param) | |
| 8 | + | else | |
| 9 | + | Game.broadcastMessage(param) | |
| 10 | + | end | |
| 11 | + | return true | |
| 12 | + | end |
| @@ -0,0 +1,11 @@ | |||
| 1 | + | function onSay(player, words, param) | |
| 2 | + | if player:getGroup():getId() < 3 then | |
| 3 | + | return false | |
| 4 | + | end | |
| 5 | + | ||
| 6 | + | local itemCount = cleanMap() | |
| 7 | + | if itemCount > 0 then | |
| 8 | + | player:sendTextMessage(MESSAGE_STATUS_WARNING, "Cleaned " .. itemCount .. " item" .. (itemCount > 1 and "s" or "") .. " from the map.") | |
| 9 | + | end | |
| 10 | + | return false | |
| 11 | + | end |
| @@ -0,0 +1,13 @@ | |||
| 1 | + | function onSay(player, words, param) | |
| 2 | + | if player:getGroup():getId() < 3 then | |
| 3 | + | return false | |
| 4 | + | end | |
| 5 | + | ||
| 6 | + | if param == "shutdown" then | |
| 7 | + | Game.setGameState(GAME_STATE_SHUTDOWN) | |
| 8 | + | else | |
| 9 | + | Game.setGameState(GAME_STATE_CLOSED) | |
| 10 | + | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Server is now closed.") | |
| 11 | + | end | |
| 12 | + | return false | |
| 13 | + | end |
| @@ -0,0 +1,7 @@ | |||
| 1 | + | -- data/scripts/commands/titles.lua | |
| 2 | + | function onSay(player, words, param) | |
| 3 | + | dofile("data/scripts/modules/title_sender.lua") | |
| 4 | + | sendPlayerTitles(player) | |
| 5 | + | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Títulos enviados para o cliente.") | |
| 6 | + | return false | |
| 7 | + | end |
| @@ -0,0 +1,81 @@ | |||
| 1 | + | function onSay(player, words, param) | |
| 2 | + | if player:getGroup():getId() < 3 then | |
| 3 | + | return false | |
| 4 | + | end | |
| 5 | + | --[[ /i 1001, true, 1, 2, 3]]-- | |
| 6 | + | --[[ [01] = ItemID | |
| 7 | + | [02] = Definir status do item manualmente ou deixar zerado (false/true) | |
| 8 | + | [03] = Quantidade | |
| 9 | + | [04] = Se o [02] tiver true, aqui fica RARIDADE do item. Se [02] for falso, n�o precisa colocar nada aqui. | |
| 10 | + | [05] = Se o [02] tiver true, aqui fica STAR do item. Se [02] for falso, n�o precisa colocar nada aqui. | |
| 11 | + | ]]-- | |
| 12 | + | local split = param:splitTrimmed(" ") | |
| 13 | + | if _ITEMS[tonumber(split[01])] then | |
| 14 | + | local default = false | |
| 15 | + | if split[02] ~= nil then | |
| 16 | + | default = true | |
| 17 | + | end | |
| 18 | + | ||
| 19 | + | local iid = tonumber(split[01]) | |
| 20 | + | local slo = _ITEMS[iid].SLOT_EQUIP | |
| 21 | + | local rar = 00 | |
| 22 | + | local sta = 00 | |
| 23 | + | local qnt = 01 | |
| 24 | + | local ext = 00 | |
| 25 | + | ||
| 26 | + | if default then | |
| 27 | + | if split[03] ~= nil then | |
| 28 | + | if isNumber(split[03]) then | |
| 29 | + | qnt = tonumber(split[03]) | |
| 30 | + | else | |
| 31 | + | qnt = 01 | |
| 32 | + | end | |
| 33 | + | else | |
| 34 | + | qnt = 01 | |
| 35 | + | end | |
| 36 | + | if split[04] ~= nil then | |
| 37 | + | if isNumber(split[04]) then | |
| 38 | + | rar = tonumber(split[04]) | |
| 39 | + | end | |
| 40 | + | end | |
| 41 | + | if split[05] ~= nil then | |
| 42 | + | if isNumber(split[05]) then | |
| 43 | + | sta = tonumber(split[05]) | |
| 44 | + | end | |
| 45 | + | end | |
| 46 | + | end | |
| 47 | + | ||
| 48 | + | if slo > 9 or slo == 0 then slo = 3 end | |
| 49 | + | if iid == 3218 then | |
| 50 | + | PlayerVipCoins(player, 02, qnt) | |
| 51 | + | player:sendCancelMessage("@LootMSG 3218 3 0 " ..qnt) | |
| 52 | + | doBackpack(player, 11) | |
| 53 | + | return false | |
| 54 | + | end | |
| 55 | + | if doBackpack(player, 00, slo, ext, 01) then | |
| 56 | + | if slo == 3 then | |
| 57 | + | doBackpack(player, 03, slo, ext, 01, iid) -- Procurar | |
| 58 | + | if doBackpack(player, 01, slo, ext, 0, iid, rar, sta, qnt) then | |
| 59 | + | player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� recebeu o item [ " .._ITEMS[iid].NAME.. ", x" ..qnt.." ].") | |
| 60 | + | player:getPosition():sendMagicEffect(14) | |
| 61 | + | end | |
| 62 | + | else | |
| 63 | + | if doBackpack(player, 01, slo, ext, 0, iid, rar, sta) then | |
| 64 | + | player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voc� recebeu o item [ " .._ITEMS[iid].NAME.. " ].") | |
| 65 | + | player:getPosition():sendMagicEffect(14) | |
| 66 | + | end | |
| 67 | + | end | |
| 68 | + | else | |
| 69 | + | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Sua Backpack esta cheia.") | |
| 70 | + | player:getPosition():sendMagicEffect(03) | |
| 71 | + | return false | |
| 72 | + | end | |
| 73 | + | --else | |
| 74 | + | -- player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Par�metro errado. Ap�s o ID, � preciso definir [true ou false].") | |
| 75 | + | -- return false | |
| 76 | + | --end | |
| 77 | + | else | |
| 78 | + | player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Item n�o encontrado.") | |
| 79 | + | return false | |
| 80 | + | end | |
| 81 | + | end |
| @@ -0,0 +1,1417 @@ | |||
| 1 | + | function playerExists(name) | |
| 2 | + | return (getPlayerGUIDByName(name) ~= 0) | |
| 3 | + | end | |
| 4 | + | function onSay(player, words, param) | |
| 5 | + | if player:getGroup():getId() < 2 then | |
| 6 | + | return false | |
| 7 | + | end | |
| 8 | + | local split = param:splitTrimmed("-") | |
| 9 | + | -- Se reproduce el sonido en cualquier interacción | |
| 10 | + | playSoundPlayer(player, "depot.ogg") | |
| 11 | + | if not split[01] then | |
| 12 | + | player:sendCancelMessage("@AdmPanel 0") | |
| 13 | + | return false | |
| 14 | + | end | |
| 15 | + | ||
| 16 | + | local tid = Player(split[01]) | |
| 17 | + | local PlayOn = true | |
| 18 | + | local PlayLabel = 01 | |
| 19 | + | if(not tid) then | |
| 20 | + | PlayOn = false | |
| 21 | + | PlayLabel = 00 | |
| 22 | + | if getPlayerGUIDByName(split[01]) > 0 then | |
| 23 | + | tid = getPlayerGUIDByName(split[01]) | |
| 24 | + | else | |
| 25 | + | player:popupFYI("Este jugador n�o existe.") | |
| 26 | + | player:sendCancelMessage("@AdmPanel 0") | |
| 27 | + | return false | |
| 28 | + | end | |
| 29 | + | end | |
| 30 | + | if split[02] then | |
| 31 | + | if _DEBUG_MODE then | |
| 32 | + | local _TYPE = { | |
| 33 | + | ["00"] = 'Inventario abierto', | |
| 34 | + | ["01"] = 'Destruccion de articulos del inventario', | |
| 35 | + | ["02"] = 'Destruccion de habilidades de armas del inventario', | |
| 36 | + | ["03"] = 'Lleva mochila', | |
| 37 | + | ["04"] = 'Destruyendo objeto en la mochila', | |
| 38 | + | ["05"] = 'Quitar o agregar dinero', | |
| 39 | + | ["06"] = 'Habilidad de destruccion de armas dentro de la mochila', | |
| 40 | + | ["07"] = 'Reiniciando cliente', | |
| 41 | + | ["08"] = 'Cerrando Cliente', | |
| 42 | + | ["09"] = 'Cambio de maestría', | |
| 43 | + | ["10"] = 'Especialista en cambio', | |
| 44 | + | ["11"] = 'Cambiando GoTo', | |
| 45 | + | } | |
| 46 | + | ||
| 47 | + | if _TYPE[split[02]] then | |
| 48 | + | print("[TALK - ADM] " ..player:getName().. " - " .._TYPE[split[02]]) | |
| 49 | + | else | |
| 50 | + | print("[TALK - ADM] " ..player:getName().. " - " ..split[02]) | |
| 51 | + | end | |
| 52 | + | end | |
| 53 | + | if split[02] == "00" then -- ABRIR INVENTARIO | |
| 54 | + | local GOLD = 0 | |
| 55 | + | local ONLI = 0 | |
| 56 | + | for _INVENTARIO = 01, 09 do | |
| 57 | + | if PlayOn then | |
| 58 | + | local A = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_01) | |
| 59 | + | local B = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_02) | |
| 60 | + | local C = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_03) | |
| 61 | + | local D = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_04) | |
| 62 | + | local E = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_05) | |
| 63 | + | local F = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_06) | |
| 64 | + | local G = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_07) | |
| 65 | + | local H = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_08) | |
| 66 | + | local I = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_09) | |
| 67 | + | local J = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_10) | |
| 68 | + | ||
| 69 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 70 | + | else | |
| 71 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 72 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 73 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 74 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 75 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 76 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 77 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 78 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 79 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 80 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 81 | + | ||
| 82 | + | if A then | |
| 83 | + | A = result.getDataInt(A, "value") | |
| 84 | + | else | |
| 85 | + | A = 0 | |
| 86 | + | end | |
| 87 | + | if B then | |
| 88 | + | B = result.getDataInt(B, "value") | |
| 89 | + | else | |
| 90 | + | B = 0 | |
| 91 | + | end | |
| 92 | + | if C then | |
| 93 | + | C = result.getDataInt(C, "value") | |
| 94 | + | else | |
| 95 | + | C = 0 | |
| 96 | + | end | |
| 97 | + | if D then | |
| 98 | + | D = result.getDataInt(D, "value") | |
| 99 | + | else | |
| 100 | + | D = 0 | |
| 101 | + | end | |
| 102 | + | if E then | |
| 103 | + | E = result.getDataInt(E, "value") | |
| 104 | + | else | |
| 105 | + | E = 0 | |
| 106 | + | end | |
| 107 | + | if F then | |
| 108 | + | F = result.getDataInt(F, "value") | |
| 109 | + | else | |
| 110 | + | F = 0 | |
| 111 | + | end | |
| 112 | + | if G then | |
| 113 | + | G = result.getDataInt(G, "value") | |
| 114 | + | else | |
| 115 | + | G = 0 | |
| 116 | + | end | |
| 117 | + | if H then | |
| 118 | + | H = result.getDataInt(H, "value") | |
| 119 | + | else | |
| 120 | + | H = 0 | |
| 121 | + | end | |
| 122 | + | if I then | |
| 123 | + | I = result.getDataInt(I, "value") | |
| 124 | + | else | |
| 125 | + | I = 0 | |
| 126 | + | end | |
| 127 | + | if J then | |
| 128 | + | J = result.getDataInt(J, "value") | |
| 129 | + | else | |
| 130 | + | J = 0 | |
| 131 | + | end | |
| 132 | + | ||
| 133 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 134 | + | end | |
| 135 | + | end | |
| 136 | + | if PlayOn then | |
| 137 | + | GOLD = PlayerGoldCoins(tid, 00) | |
| 138 | + | ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN) | |
| 139 | + | else | |
| 140 | + | local G_1 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[01].. ' AND `player_id` = ' ..tid .. ';') | |
| 141 | + | local G_2 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[02].. ' AND `player_id` = ' ..tid .. ';') | |
| 142 | + | local G_3 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[03].. ' AND `player_id` = ' ..tid .. ';') | |
| 143 | + | local G_4 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[04].. ' AND `player_id` = ' ..tid .. ';') | |
| 144 | + | local G_5 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[05].. ' AND `player_id` = ' ..tid .. ';') | |
| 145 | + | local G_6 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[06].. ' AND `player_id` = ' ..tid .. ';') | |
| 146 | + | local G_7 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[07].. ' AND `player_id` = ' ..tid .. ';') | |
| 147 | + | local G_8 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[08].. ' AND `player_id` = ' ..tid .. ';') | |
| 148 | + | local G_9 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[09].. ' AND `player_id` = ' ..tid .. ';') | |
| 149 | + | local G_10 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[10].. ' AND `player_id` = ' ..tid .. ';') | |
| 150 | + | local ONL = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.ONLINE_COIN.. ' AND `player_id` = ' ..tid .. ';') | |
| 151 | + | ||
| 152 | + | if G_1 then | |
| 153 | + | G_1 = result.getDataInt(G_1, "value") | |
| 154 | + | else | |
| 155 | + | G_1 = 0 | |
| 156 | + | end | |
| 157 | + | if G_2 then | |
| 158 | + | G_2 = result.getDataInt(G_2, "value") | |
| 159 | + | else | |
| 160 | + | G_2 = 0 | |
| 161 | + | end | |
| 162 | + | if G_3 then | |
| 163 | + | G_3 = result.getDataInt(G_3, "value") | |
| 164 | + | else | |
| 165 | + | G_3 = 0 | |
| 166 | + | end | |
| 167 | + | if G_4 then | |
| 168 | + | G_4 = result.getDataInt(G_4, "value") | |
| 169 | + | else | |
| 170 | + | G_4 = 0 | |
| 171 | + | end | |
| 172 | + | if G_5 then | |
| 173 | + | G_5 = result.getDataInt(G_5, "value") | |
| 174 | + | else | |
| 175 | + | G_5 = 0 | |
| 176 | + | end | |
| 177 | + | if G_6 then | |
| 178 | + | G_6 = result.getDataInt(G_6, "value") | |
| 179 | + | else | |
| 180 | + | G_6 = 0 | |
| 181 | + | end | |
| 182 | + | if G_7 then | |
| 183 | + | G_7 = result.getDataInt(G_7, "value") | |
| 184 | + | else | |
| 185 | + | G_7 = 0 | |
| 186 | + | end | |
| 187 | + | if G_8 then | |
| 188 | + | G_8 = result.getDataInt(G_8, "value") | |
| 189 | + | else | |
| 190 | + | G_8 = 0 | |
| 191 | + | end | |
| 192 | + | if G_9 then | |
| 193 | + | G_9 = result.getDataInt(G_9, "value") | |
| 194 | + | else | |
| 195 | + | G_9 = 0 | |
| 196 | + | end | |
| 197 | + | if G_10 then | |
| 198 | + | G_10 = result.getDataInt(G_10, "value") | |
| 199 | + | else | |
| 200 | + | G_10 = 0 | |
| 201 | + | end | |
| 202 | + | if ONL then | |
| 203 | + | ONL = result.getDataInt(ONL, "value") | |
| 204 | + | else | |
| 205 | + | ONL = 0 | |
| 206 | + | end | |
| 207 | + | ||
| 208 | + | GOLD = G_1 + G_2 + G_3 + G_4 + G_5 + G_6 + G_7 + G_8 + G_9 + G_10 | |
| 209 | + | ONLI = ONL | |
| 210 | + | end | |
| 211 | + | ||
| 212 | + | player:sendCancelMessage("@AdmPanel 1 " ..GOLD.. " " ..ONLI.. " " ..PlayLabel) | |
| 213 | + | return false | |
| 214 | + | end | |
| 215 | + | if split[02] == "01" then -- DESTRUINDO ITENS DO INVENTARIO | |
| 216 | + | local _INVENTARIO = tonumber(split[03]) | |
| 217 | + | if PlayOn then | |
| 218 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_01, nil) | |
| 219 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_02, nil) | |
| 220 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_03, nil) | |
| 221 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_04, nil) | |
| 222 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_05, nil) | |
| 223 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_06, nil) | |
| 224 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_07, nil) | |
| 225 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_08, nil) | |
| 226 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_09, nil) | |
| 227 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_10, nil) | |
| 228 | + | ||
| 229 | + | doInventario(tid, 00, 04, 00) | |
| 230 | + | tid:sendCancelMessage("@StarCliente") | |
| 231 | + | else | |
| 232 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_01.. " AND `player_id` = " ..tid.. ");") | |
| 233 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_02.. " AND `player_id` = " ..tid.. ");") | |
| 234 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_03.. " AND `player_id` = " ..tid.. ");") | |
| 235 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_04.. " AND `player_id` = " ..tid.. ");") | |
| 236 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_05.. " AND `player_id` = " ..tid.. ");") | |
| 237 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_06.. " AND `player_id` = " ..tid.. ");") | |
| 238 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_07.. " AND `player_id` = " ..tid.. ");") | |
| 239 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_08.. " AND `player_id` = " ..tid.. ");") | |
| 240 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_09.. " AND `player_id` = " ..tid.. ");") | |
| 241 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[_INVENTARIO].UID_10.. " AND `player_id` = " ..tid.. ");") | |
| 242 | + | end | |
| 243 | + | addEvent(function() | |
| 244 | + | for _INVENTARIO = 01, 09 do | |
| 245 | + | if PlayOn then | |
| 246 | + | local A = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_01) | |
| 247 | + | local B = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_02) | |
| 248 | + | local C = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_03) | |
| 249 | + | local D = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_04) | |
| 250 | + | local E = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_05) | |
| 251 | + | local F = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_06) | |
| 252 | + | local G = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_07) | |
| 253 | + | local H = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_08) | |
| 254 | + | local I = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_09) | |
| 255 | + | local J = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_10) | |
| 256 | + | ||
| 257 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 258 | + | else | |
| 259 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 260 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 261 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 262 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 263 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 264 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 265 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 266 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 267 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 268 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 269 | + | ||
| 270 | + | if A then | |
| 271 | + | A = result.getDataInt(A, "value") | |
| 272 | + | else | |
| 273 | + | A = 0 | |
| 274 | + | end | |
| 275 | + | if B then | |
| 276 | + | B = result.getDataInt(B, "value") | |
| 277 | + | else | |
| 278 | + | B = 0 | |
| 279 | + | end | |
| 280 | + | if C then | |
| 281 | + | C = result.getDataInt(C, "value") | |
| 282 | + | else | |
| 283 | + | C = 0 | |
| 284 | + | end | |
| 285 | + | if D then | |
| 286 | + | D = result.getDataInt(D, "value") | |
| 287 | + | else | |
| 288 | + | D = 0 | |
| 289 | + | end | |
| 290 | + | if E then | |
| 291 | + | E = result.getDataInt(E, "value") | |
| 292 | + | else | |
| 293 | + | E = 0 | |
| 294 | + | end | |
| 295 | + | if F then | |
| 296 | + | F = result.getDataInt(F, "value") | |
| 297 | + | else | |
| 298 | + | F = 0 | |
| 299 | + | end | |
| 300 | + | if G then | |
| 301 | + | G = result.getDataInt(G, "value") | |
| 302 | + | else | |
| 303 | + | G = 0 | |
| 304 | + | end | |
| 305 | + | if H then | |
| 306 | + | H = result.getDataInt(H, "value") | |
| 307 | + | else | |
| 308 | + | H = 0 | |
| 309 | + | end | |
| 310 | + | if I then | |
| 311 | + | I = result.getDataInt(I, "value") | |
| 312 | + | else | |
| 313 | + | I = 0 | |
| 314 | + | end | |
| 315 | + | if J then | |
| 316 | + | J = result.getDataInt(J, "value") | |
| 317 | + | else | |
| 318 | + | J = 0 | |
| 319 | + | end | |
| 320 | + | ||
| 321 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 322 | + | end | |
| 323 | + | end | |
| 324 | + | if PlayOn then | |
| 325 | + | GOLD = PlayerGoldCoins(tid, 00) | |
| 326 | + | ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN) | |
| 327 | + | else | |
| 328 | + | local G_1 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[01].. ' AND `player_id` = ' ..tid .. ';') | |
| 329 | + | local G_2 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[02].. ' AND `player_id` = ' ..tid .. ';') | |
| 330 | + | local G_3 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[03].. ' AND `player_id` = ' ..tid .. ';') | |
| 331 | + | local G_4 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[04].. ' AND `player_id` = ' ..tid .. ';') | |
| 332 | + | local G_5 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[05].. ' AND `player_id` = ' ..tid .. ';') | |
| 333 | + | local G_6 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[06].. ' AND `player_id` = ' ..tid .. ';') | |
| 334 | + | local G_7 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[07].. ' AND `player_id` = ' ..tid .. ';') | |
| 335 | + | local G_8 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[08].. ' AND `player_id` = ' ..tid .. ';') | |
| 336 | + | local G_9 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[09].. ' AND `player_id` = ' ..tid .. ';') | |
| 337 | + | local G_10 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[10].. ' AND `player_id` = ' ..tid .. ';') | |
| 338 | + | local ONL = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.ONLINE_COIN.. ' AND `player_id` = ' ..tid .. ';') | |
| 339 | + | ||
| 340 | + | if G_1 then | |
| 341 | + | G_1 = result.getDataInt(G_1, "value") | |
| 342 | + | else | |
| 343 | + | G_1 = 0 | |
| 344 | + | end | |
| 345 | + | if G_2 then | |
| 346 | + | G_2 = result.getDataInt(G_2, "value") | |
| 347 | + | else | |
| 348 | + | G_2 = 0 | |
| 349 | + | end | |
| 350 | + | if G_3 then | |
| 351 | + | G_3 = result.getDataInt(G_3, "value") | |
| 352 | + | else | |
| 353 | + | G_3 = 0 | |
| 354 | + | end | |
| 355 | + | if G_4 then | |
| 356 | + | G_4 = result.getDataInt(G_4, "value") | |
| 357 | + | else | |
| 358 | + | G_4 = 0 | |
| 359 | + | end | |
| 360 | + | if G_5 then | |
| 361 | + | G_5 = result.getDataInt(G_5, "value") | |
| 362 | + | else | |
| 363 | + | G_5 = 0 | |
| 364 | + | end | |
| 365 | + | if G_6 then | |
| 366 | + | G_6 = result.getDataInt(G_6, "value") | |
| 367 | + | else | |
| 368 | + | G_6 = 0 | |
| 369 | + | end | |
| 370 | + | if G_7 then | |
| 371 | + | G_7 = result.getDataInt(G_7, "value") | |
| 372 | + | else | |
| 373 | + | G_7 = 0 | |
| 374 | + | end | |
| 375 | + | if G_8 then | |
| 376 | + | G_8 = result.getDataInt(G_8, "value") | |
| 377 | + | else | |
| 378 | + | G_8 = 0 | |
| 379 | + | end | |
| 380 | + | if G_9 then | |
| 381 | + | G_9 = result.getDataInt(G_9, "value") | |
| 382 | + | else | |
| 383 | + | G_9 = 0 | |
| 384 | + | end | |
| 385 | + | if G_10 then | |
| 386 | + | G_10 = result.getDataInt(G_10, "value") | |
| 387 | + | else | |
| 388 | + | G_10 = 0 | |
| 389 | + | end | |
| 390 | + | if ONL then | |
| 391 | + | ONL = result.getDataInt(ONL, "value") | |
| 392 | + | else | |
| 393 | + | ONL = 0 | |
| 394 | + | end | |
| 395 | + | ||
| 396 | + | GOLD = G_1 + G_2 + G_3 + G_4 + G_5 + G_6 + G_7 + G_8 + G_9 + G_10 | |
| 397 | + | ONLI = ONL | |
| 398 | + | end | |
| 399 | + | ||
| 400 | + | player:sendCancelMessage("@AdmPanel 1 " ..GOLD.. " " ..ONLI.. " " ..PlayLabel) | |
| 401 | + | return false | |
| 402 | + | end, 500) | |
| 403 | + | return false | |
| 404 | + | end | |
| 405 | + | if split[02] == "02" then -- DESTRUINDO SKILLS DA ARMA DO INVENTARIO | |
| 406 | + | local SKILL_POS = tonumber(split[03]) | |
| 407 | + | if SKILL_POS == 01 then | |
| 408 | + | if PlayOn then | |
| 409 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[04].UID_04, nil) | |
| 410 | + | else | |
| 411 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[04].UID_04.. " AND `player_id` = " ..tid.. ");") | |
| 412 | + | end | |
| 413 | + | end | |
| 414 | + | if SKILL_POS == 02 then | |
| 415 | + | if PlayOn then | |
| 416 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[04].UID_05, nil) | |
| 417 | + | else | |
| 418 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[04].UID_05.. " AND `player_id` = " ..tid.. ");") | |
| 419 | + | end | |
| 420 | + | end | |
| 421 | + | if SKILL_POS == 03 then | |
| 422 | + | if PlayOn then | |
| 423 | + | tid:setStorageValue(_SYSTEM.INVENTARIO[04].UID_06, nil) | |
| 424 | + | else | |
| 425 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._SYSTEM.INVENTARIO[04].UID_06.. " AND `player_id` = " ..tid.. ");") | |
| 426 | + | end | |
| 427 | + | end | |
| 428 | + | ||
| 429 | + | if PlayOn then | |
| 430 | + | doInventario(tid, 00, 04, 00) | |
| 431 | + | tid:sendCancelMessage("@StarCliente") | |
| 432 | + | end | |
| 433 | + | addEvent(function() | |
| 434 | + | for _INVENTARIO = 01, 09 do | |
| 435 | + | if PlayOn then | |
| 436 | + | local A = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_01) | |
| 437 | + | local B = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_02) | |
| 438 | + | local C = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_03) | |
| 439 | + | local D = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_04) | |
| 440 | + | local E = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_05) | |
| 441 | + | local F = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_06) | |
| 442 | + | local G = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_07) | |
| 443 | + | local H = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_08) | |
| 444 | + | local I = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_09) | |
| 445 | + | local J = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_10) | |
| 446 | + | ||
| 447 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 448 | + | else | |
| 449 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 450 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 451 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 452 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 453 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 454 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 455 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 456 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 457 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 458 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 459 | + | ||
| 460 | + | if A then | |
| 461 | + | A = result.getDataInt(A, "value") | |
| 462 | + | else | |
| 463 | + | A = 0 | |
| 464 | + | end | |
| 465 | + | if B then | |
| 466 | + | B = result.getDataInt(B, "value") | |
| 467 | + | else | |
| 468 | + | B = 0 | |
| 469 | + | end | |
| 470 | + | if C then | |
| 471 | + | C = result.getDataInt(C, "value") | |
| 472 | + | else | |
| 473 | + | C = 0 | |
| 474 | + | end | |
| 475 | + | if D then | |
| 476 | + | D = result.getDataInt(D, "value") | |
| 477 | + | else | |
| 478 | + | D = 0 | |
| 479 | + | end | |
| 480 | + | if E then | |
| 481 | + | E = result.getDataInt(E, "value") | |
| 482 | + | else | |
| 483 | + | E = 0 | |
| 484 | + | end | |
| 485 | + | if F then | |
| 486 | + | F = result.getDataInt(F, "value") | |
| 487 | + | else | |
| 488 | + | F = 0 | |
| 489 | + | end | |
| 490 | + | if G then | |
| 491 | + | G = result.getDataInt(G, "value") | |
| 492 | + | else | |
| 493 | + | G = 0 | |
| 494 | + | end | |
| 495 | + | if H then | |
| 496 | + | H = result.getDataInt(H, "value") | |
| 497 | + | else | |
| 498 | + | H = 0 | |
| 499 | + | end | |
| 500 | + | if I then | |
| 501 | + | I = result.getDataInt(I, "value") | |
| 502 | + | else | |
| 503 | + | I = 0 | |
| 504 | + | end | |
| 505 | + | if J then | |
| 506 | + | J = result.getDataInt(J, "value") | |
| 507 | + | else | |
| 508 | + | J = 0 | |
| 509 | + | end | |
| 510 | + | ||
| 511 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 512 | + | end | |
| 513 | + | end | |
| 514 | + | if PlayOn then | |
| 515 | + | GOLD = PlayerGoldCoins(tid, 00) | |
| 516 | + | ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN) | |
| 517 | + | else | |
| 518 | + | local G_1 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[01].. ' AND `player_id` = ' ..tid .. ';') | |
| 519 | + | local G_2 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[02].. ' AND `player_id` = ' ..tid .. ';') | |
| 520 | + | local G_3 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[03].. ' AND `player_id` = ' ..tid .. ';') | |
| 521 | + | local G_4 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[04].. ' AND `player_id` = ' ..tid .. ';') | |
| 522 | + | local G_5 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[05].. ' AND `player_id` = ' ..tid .. ';') | |
| 523 | + | local G_6 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[06].. ' AND `player_id` = ' ..tid .. ';') | |
| 524 | + | local G_7 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[07].. ' AND `player_id` = ' ..tid .. ';') | |
| 525 | + | local G_8 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[08].. ' AND `player_id` = ' ..tid .. ';') | |
| 526 | + | local G_9 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[09].. ' AND `player_id` = ' ..tid .. ';') | |
| 527 | + | local G_10 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[10].. ' AND `player_id` = ' ..tid .. ';') | |
| 528 | + | local ONL = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.ONLINE_COIN.. ' AND `player_id` = ' ..tid .. ';') | |
| 529 | + | ||
| 530 | + | if G_1 then | |
| 531 | + | G_1 = result.getDataInt(G_1, "value") | |
| 532 | + | else | |
| 533 | + | G_1 = 0 | |
| 534 | + | end | |
| 535 | + | if G_2 then | |
| 536 | + | G_2 = result.getDataInt(G_2, "value") | |
| 537 | + | else | |
| 538 | + | G_2 = 0 | |
| 539 | + | end | |
| 540 | + | if G_3 then | |
| 541 | + | G_3 = result.getDataInt(G_3, "value") | |
| 542 | + | else | |
| 543 | + | G_3 = 0 | |
| 544 | + | end | |
| 545 | + | if G_4 then | |
| 546 | + | G_4 = result.getDataInt(G_4, "value") | |
| 547 | + | else | |
| 548 | + | G_4 = 0 | |
| 549 | + | end | |
| 550 | + | if G_5 then | |
| 551 | + | G_5 = result.getDataInt(G_5, "value") | |
| 552 | + | else | |
| 553 | + | G_5 = 0 | |
| 554 | + | end | |
| 555 | + | if G_6 then | |
| 556 | + | G_6 = result.getDataInt(G_6, "value") | |
| 557 | + | else | |
| 558 | + | G_6 = 0 | |
| 559 | + | end | |
| 560 | + | if G_7 then | |
| 561 | + | G_7 = result.getDataInt(G_7, "value") | |
| 562 | + | else | |
| 563 | + | G_7 = 0 | |
| 564 | + | end | |
| 565 | + | if G_8 then | |
| 566 | + | G_8 = result.getDataInt(G_8, "value") | |
| 567 | + | else | |
| 568 | + | G_8 = 0 | |
| 569 | + | end | |
| 570 | + | if G_9 then | |
| 571 | + | G_9 = result.getDataInt(G_9, "value") | |
| 572 | + | else | |
| 573 | + | G_9 = 0 | |
| 574 | + | end | |
| 575 | + | if G_10 then | |
| 576 | + | G_10 = result.getDataInt(G_10, "value") | |
| 577 | + | else | |
| 578 | + | G_10 = 0 | |
| 579 | + | end | |
| 580 | + | if ONL then | |
| 581 | + | ONL = result.getDataInt(ONL, "value") | |
| 582 | + | else | |
| 583 | + | ONL = 0 | |
| 584 | + | end | |
| 585 | + | ||
| 586 | + | GOLD = G_1 + G_2 + G_3 + G_4 + G_5 + G_6 + G_7 + G_8 + G_9 + G_10 | |
| 587 | + | ONLI = ONL | |
| 588 | + | end | |
| 589 | + | ||
| 590 | + | player:sendCancelMessage("@AdmPanel 1 " ..GOLD.. " " ..ONLI.. " " ..PlayLabel) | |
| 591 | + | return false | |
| 592 | + | end, 500) | |
| 593 | + | return false | |
| 594 | + | end | |
| 595 | + | if split[02] == "03" then -- CARREGANDO BACKPACK | |
| 596 | + | local SLOT_BAG = tonumber(split[03]) | |
| 597 | + | local EXT_BAG = tonumber(split[04]) | |
| 598 | + | for _BAG = 01, 20 do | |
| 599 | + | if PlayOn then | |
| 600 | + | local A = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_01) | |
| 601 | + | local B = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_02) | |
| 602 | + | local C = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_03) | |
| 603 | + | local D = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_04) | |
| 604 | + | local E = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_05) | |
| 605 | + | local F = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_06) | |
| 606 | + | local G = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_07) | |
| 607 | + | local H = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_08) | |
| 608 | + | local I = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_09) | |
| 609 | + | local J = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_10) | |
| 610 | + | ||
| 611 | + | local EXT = tid:getStorageValue(_SYSTEM.EXTENSION_BACK[SLOT_BAG].UID_01) | |
| 612 | + | ||
| 613 | + | player:sendCancelMessage("@loadInfo 02 " .._BAG.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J.. " " ..SLOT_BAG.. " " ..EXT_BAG.. " " ..EXT) | |
| 614 | + | else | |
| 615 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 616 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 617 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 618 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 619 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 620 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 621 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 622 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 623 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 624 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 625 | + | local EXT = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.EXTENSION_BACK[SLOT_BAG].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 626 | + | ||
| 627 | + | if A then | |
| 628 | + | A = result.getDataInt(A, "value") | |
| 629 | + | else | |
| 630 | + | A = 0 | |
| 631 | + | end | |
| 632 | + | if B then | |
| 633 | + | B = result.getDataInt(B, "value") | |
| 634 | + | else | |
| 635 | + | B = 0 | |
| 636 | + | end | |
| 637 | + | if C then | |
| 638 | + | C = result.getDataInt(C, "value") | |
| 639 | + | else | |
| 640 | + | C = 0 | |
| 641 | + | end | |
| 642 | + | if D then | |
| 643 | + | D = result.getDataInt(D, "value") | |
| 644 | + | else | |
| 645 | + | D = 0 | |
| 646 | + | end | |
| 647 | + | if E then | |
| 648 | + | E = result.getDataInt(E, "value") | |
| 649 | + | else | |
| 650 | + | E = 0 | |
| 651 | + | end | |
| 652 | + | if F then | |
| 653 | + | F = result.getDataInt(F, "value") | |
| 654 | + | else | |
| 655 | + | F = 0 | |
| 656 | + | end | |
| 657 | + | if G then | |
| 658 | + | G = result.getDataInt(G, "value") | |
| 659 | + | else | |
| 660 | + | G = 0 | |
| 661 | + | end | |
| 662 | + | if H then | |
| 663 | + | H = result.getDataInt(H, "value") | |
| 664 | + | else | |
| 665 | + | H = 0 | |
| 666 | + | end | |
| 667 | + | if I then | |
| 668 | + | I = result.getDataInt(I, "value") | |
| 669 | + | else | |
| 670 | + | I = 0 | |
| 671 | + | end | |
| 672 | + | if J then | |
| 673 | + | J = result.getDataInt(J, "value") | |
| 674 | + | else | |
| 675 | + | J = 0 | |
| 676 | + | end | |
| 677 | + | if EXT then | |
| 678 | + | EXT = result.getDataInt(EXT, "value") | |
| 679 | + | else | |
| 680 | + | EXT = 0 | |
| 681 | + | end | |
| 682 | + | ||
| 683 | + | player:sendCancelMessage("@loadInfo 02 " .._BAG.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J.. " " ..SLOT_BAG.. " " ..EXT_BAG.. " " ..EXT) | |
| 684 | + | end | |
| 685 | + | end | |
| 686 | + | return false | |
| 687 | + | end | |
| 688 | + | if split[02] == "04" then -- DESTRUINDO ITEMS DA BACKPACK | |
| 689 | + | local SLOT_BAG = tonumber(split[03]) | |
| 690 | + | local EXT_BAG = tonumber(split[04]) | |
| 691 | + | local POS_BAG = tonumber(split[05]) | |
| 692 | + | if PlayOn then | |
| 693 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_01, nil) | |
| 694 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_02, nil) | |
| 695 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_03, nil) | |
| 696 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_04, nil) | |
| 697 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_05, nil) | |
| 698 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_06, nil) | |
| 699 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_07, nil) | |
| 700 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_08, nil) | |
| 701 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_09, nil) | |
| 702 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_10, nil) | |
| 703 | + | ||
| 704 | + | doBackpack(tid, 00, SLOT_BAG, EXT_BAG, 01) | |
| 705 | + | tid:sendCancelMessage("@OpenBackpack " ..SLOT_BAG) | |
| 706 | + | else | |
| 707 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_01.. " AND `player_id` = " ..tid.. ");") | |
| 708 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_02.. " AND `player_id` = " ..tid.. ");") | |
| 709 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_03.. " AND `player_id` = " ..tid.. ");") | |
| 710 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_04.. " AND `player_id` = " ..tid.. ");") | |
| 711 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_05.. " AND `player_id` = " ..tid.. ");") | |
| 712 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_06.. " AND `player_id` = " ..tid.. ");") | |
| 713 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_07.. " AND `player_id` = " ..tid.. ");") | |
| 714 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_08.. " AND `player_id` = " ..tid.. ");") | |
| 715 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_09.. " AND `player_id` = " ..tid.. ");") | |
| 716 | + | db.query("UPDATE `player_storage` SET `value` = 0 WHERE (`key` = " .._BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_10.. " AND `player_id` = " ..tid.. ");") | |
| 717 | + | end | |
| 718 | + | addEvent(function() | |
| 719 | + | for _BAG = 01, 20 do | |
| 720 | + | if PlayOn then | |
| 721 | + | local A = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_01) | |
| 722 | + | local B = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_02) | |
| 723 | + | local C = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_03) | |
| 724 | + | local D = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_04) | |
| 725 | + | local E = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_05) | |
| 726 | + | local F = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_06) | |
| 727 | + | local G = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_07) | |
| 728 | + | local H = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_08) | |
| 729 | + | local I = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_09) | |
| 730 | + | local J = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_10) | |
| 731 | + | ||
| 732 | + | local EXT = tid:getStorageValue(_SYSTEM.EXTENSION_BACK[SLOT_BAG].UID_01) | |
| 733 | + | ||
| 734 | + | player:sendCancelMessage("@loadInfo 02 " .._BAG.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J.. " " ..SLOT_BAG.. " " ..EXT_BAG.. " " ..EXT) | |
| 735 | + | else | |
| 736 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 737 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 738 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 739 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 740 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 741 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 742 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 743 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 744 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 745 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 746 | + | local EXT = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.EXTENSION_BACK[SLOT_BAG].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 747 | + | ||
| 748 | + | if A then | |
| 749 | + | A = result.getDataInt(A, "value") | |
| 750 | + | else | |
| 751 | + | A = 0 | |
| 752 | + | end | |
| 753 | + | if B then | |
| 754 | + | B = result.getDataInt(B, "value") | |
| 755 | + | else | |
| 756 | + | B = 0 | |
| 757 | + | end | |
| 758 | + | if C then | |
| 759 | + | C = result.getDataInt(C, "value") | |
| 760 | + | else | |
| 761 | + | C = 0 | |
| 762 | + | end | |
| 763 | + | if D then | |
| 764 | + | D = result.getDataInt(D, "value") | |
| 765 | + | else | |
| 766 | + | D = 0 | |
| 767 | + | end | |
| 768 | + | if E then | |
| 769 | + | E = result.getDataInt(E, "value") | |
| 770 | + | else | |
| 771 | + | E = 0 | |
| 772 | + | end | |
| 773 | + | if F then | |
| 774 | + | F = result.getDataInt(F, "value") | |
| 775 | + | else | |
| 776 | + | F = 0 | |
| 777 | + | end | |
| 778 | + | if G then | |
| 779 | + | G = result.getDataInt(G, "value") | |
| 780 | + | else | |
| 781 | + | G = 0 | |
| 782 | + | end | |
| 783 | + | if H then | |
| 784 | + | H = result.getDataInt(H, "value") | |
| 785 | + | else | |
| 786 | + | H = 0 | |
| 787 | + | end | |
| 788 | + | if I then | |
| 789 | + | I = result.getDataInt(I, "value") | |
| 790 | + | else | |
| 791 | + | I = 0 | |
| 792 | + | end | |
| 793 | + | if J then | |
| 794 | + | J = result.getDataInt(J, "value") | |
| 795 | + | else | |
| 796 | + | J = 0 | |
| 797 | + | end | |
| 798 | + | if EXT then | |
| 799 | + | EXT = result.getDataInt(EXT, "value") | |
| 800 | + | else | |
| 801 | + | EXT = 0 | |
| 802 | + | end | |
| 803 | + | ||
| 804 | + | player:sendCancelMessage("@loadInfo 02 " .._BAG.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J.. " " ..SLOT_BAG.. " " ..EXT_BAG.. " " ..EXT) | |
| 805 | + | end | |
| 806 | + | end | |
| 807 | + | end, 500) | |
| 808 | + | end | |
| 809 | + | if split[02] == "05" then -- REMOVENDO OU ADICIONANDO DINHEIRO | |
| 810 | + | local VALUE = tonumber(split[03]) | |
| 811 | + | local ACTION = tonumber(split[04]) | |
| 812 | + | if PlayOn then | |
| 813 | + | PlayerGoldCoins(tid, ACTION, VALUE) | |
| 814 | + | doBackpack(tid, 11) | |
| 815 | + | else | |
| 816 | + | if ACTION == 01 then -- RETIRAR | |
| 817 | + | local G_1 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[01].. ' AND `player_id` = ' ..tid .. ';') | |
| 818 | + | local G_2 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[02].. ' AND `player_id` = ' ..tid .. ';') | |
| 819 | + | local G_3 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[03].. ' AND `player_id` = ' ..tid .. ';') | |
| 820 | + | local G_4 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[04].. ' AND `player_id` = ' ..tid .. ';') | |
| 821 | + | local G_5 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[05].. ' AND `player_id` = ' ..tid .. ';') | |
| 822 | + | local G_6 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[06].. ' AND `player_id` = ' ..tid .. ';') | |
| 823 | + | local G_7 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[07].. ' AND `player_id` = ' ..tid .. ';') | |
| 824 | + | local G_8 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[08].. ' AND `player_id` = ' ..tid .. ';') | |
| 825 | + | local G_9 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[09].. ' AND `player_id` = ' ..tid .. ';') | |
| 826 | + | local G_10 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[10].. ' AND `player_id` = ' ..tid .. ';') | |
| 827 | + | local ONL = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.ONLINE_COIN.. ' AND `player_id` = ' ..tid .. ';') | |
| 828 | + | ||
| 829 | + | if G_1 then | |
| 830 | + | G_1 = result.getDataInt(G_1, "value") | |
| 831 | + | else | |
| 832 | + | G_1 = 0 | |
| 833 | + | end | |
| 834 | + | if G_2 then | |
| 835 | + | G_2 = result.getDataInt(G_2, "value") | |
| 836 | + | else | |
| 837 | + | G_2 = 0 | |
| 838 | + | end | |
| 839 | + | if G_3 then | |
| 840 | + | G_3 = result.getDataInt(G_3, "value") | |
| 841 | + | else | |
| 842 | + | G_3 = 0 | |
| 843 | + | end | |
| 844 | + | if G_4 then | |
| 845 | + | G_4 = result.getDataInt(G_4, "value") | |
| 846 | + | else | |
| 847 | + | G_4 = 0 | |
| 848 | + | end | |
| 849 | + | if G_5 then | |
| 850 | + | G_5 = result.getDataInt(G_5, "value") | |
| 851 | + | else | |
| 852 | + | G_5 = 0 | |
| 853 | + | end | |
| 854 | + | if G_6 then | |
| 855 | + | G_6 = result.getDataInt(G_6, "value") | |
| 856 | + | else | |
| 857 | + | G_6 = 0 | |
| 858 | + | end | |
| 859 | + | if G_7 then | |
| 860 | + | G_7 = result.getDataInt(G_7, "value") | |
| 861 | + | else | |
| 862 | + | G_7 = 0 | |
| 863 | + | end | |
| 864 | + | if G_8 then | |
| 865 | + | G_8 = result.getDataInt(G_8, "value") | |
| 866 | + | else | |
| 867 | + | G_8 = 0 | |
| 868 | + | end | |
| 869 | + | if G_9 then | |
| 870 | + | G_9 = result.getDataInt(G_9, "value") | |
| 871 | + | else | |
| 872 | + | G_9 = 0 | |
| 873 | + | end | |
| 874 | + | if G_10 then | |
| 875 | + | G_10 = result.getDataInt(G_10, "value") | |
| 876 | + | else | |
| 877 | + | G_10 = 0 | |
| 878 | + | end | |
| 879 | + | if ONL then | |
| 880 | + | ONL = result.getDataInt(ONL, "value") | |
| 881 | + | else | |
| 882 | + | ONL = 0 | |
| 883 | + | end | |
| 884 | + | end | |
| 885 | + | end | |
| 886 | + | addEvent(function() | |
| 887 | + | local GOLD = PlayerGoldCoins(tid, 00) | |
| 888 | + | local ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN) | |
| 889 | + | player:sendCancelMessage("@AdmPanel 1 " ..GOLD.. " " ..ONLI) | |
| 890 | + | end, 500) | |
| 891 | + | return | |
| 892 | + | end | |
| 893 | + | if split[02] == "06" then -- DESTRUINDO SKILL ARMA DENTRO DA BACKPACK | |
| 894 | + | local SLOT_BAG = tonumber(split[03]) | |
| 895 | + | local EXT_BAG = tonumber(split[04]) | |
| 896 | + | local POS_BAG = tonumber(split[05]) | |
| 897 | + | local SKILL_POS = tonumber(split[06]) | |
| 898 | + | ||
| 899 | + | if SLOT_BAG == 04 then | |
| 900 | + | if SKILL_POS == 01 then | |
| 901 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_04, nil) | |
| 902 | + | end | |
| 903 | + | if SKILL_POS == 02 then | |
| 904 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_05, nil) | |
| 905 | + | end | |
| 906 | + | if SKILL_POS == 03 then | |
| 907 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_06, nil) | |
| 908 | + | end | |
| 909 | + | else | |
| 910 | + | if SKILL_POS == 01 then | |
| 911 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_06, nil) | |
| 912 | + | end | |
| 913 | + | if SKILL_POS == 02 then | |
| 914 | + | tid:setStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][POS_BAG].UID_07, nil) | |
| 915 | + | end | |
| 916 | + | end | |
| 917 | + | ||
| 918 | + | doBackpack(tid, 00, SLOT_BAG, EXT_BAG, 01) | |
| 919 | + | tid:sendCancelMessage("@OpenBackpack " ..SLOT_BAG) | |
| 920 | + | addEvent(function() | |
| 921 | + | for _BAG = 01, 20 do | |
| 922 | + | local A = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_01) | |
| 923 | + | local B = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_02) | |
| 924 | + | local C = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_03) | |
| 925 | + | local D = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_04) | |
| 926 | + | local E = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_05) | |
| 927 | + | local F = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_06) | |
| 928 | + | local G = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_07) | |
| 929 | + | local H = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_08) | |
| 930 | + | local I = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_09) | |
| 931 | + | local J = tid:getStorageValue(_BACKPACK[SLOT_BAG][EXT_BAG][_BAG].UID_10) | |
| 932 | + | ||
| 933 | + | player:sendCancelMessage("@loadInfo 02 " .._BAG.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J.. " " ..SLOT_BAG.. " " ..EXT_BAG) | |
| 934 | + | end | |
| 935 | + | end, 500) | |
| 936 | + | end | |
| 937 | + | if split[02] == "07" then -- REINICIANDO CLIENTE | |
| 938 | + | if PlayOn then | |
| 939 | + | tid:sendCancelMessage("@ClientSystem 00") | |
| 940 | + | addEvent(function() | |
| 941 | + | for _INVENTARIO = 01, 09 do | |
| 942 | + | if PlayOn then | |
| 943 | + | local A = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_01) | |
| 944 | + | local B = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_02) | |
| 945 | + | local C = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_03) | |
| 946 | + | local D = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_04) | |
| 947 | + | local E = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_05) | |
| 948 | + | local F = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_06) | |
| 949 | + | local G = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_07) | |
| 950 | + | local H = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_08) | |
| 951 | + | local I = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_09) | |
| 952 | + | local J = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_10) | |
| 953 | + | ||
| 954 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 955 | + | else | |
| 956 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 957 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 958 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 959 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 960 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 961 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 962 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 963 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 964 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 965 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 966 | + | ||
| 967 | + | if A then | |
| 968 | + | A = result.getDataInt(A, "value") | |
| 969 | + | else | |
| 970 | + | A = 0 | |
| 971 | + | end | |
| 972 | + | if B then | |
| 973 | + | B = result.getDataInt(B, "value") | |
| 974 | + | else | |
| 975 | + | B = 0 | |
| 976 | + | end | |
| 977 | + | if C then | |
| 978 | + | C = result.getDataInt(C, "value") | |
| 979 | + | else | |
| 980 | + | C = 0 | |
| 981 | + | end | |
| 982 | + | if D then | |
| 983 | + | D = result.getDataInt(D, "value") | |
| 984 | + | else | |
| 985 | + | D = 0 | |
| 986 | + | end | |
| 987 | + | if E then | |
| 988 | + | E = result.getDataInt(E, "value") | |
| 989 | + | else | |
| 990 | + | E = 0 | |
| 991 | + | end | |
| 992 | + | if F then | |
| 993 | + | F = result.getDataInt(F, "value") | |
| 994 | + | else | |
| 995 | + | F = 0 | |
| 996 | + | end | |
| 997 | + | if G then | |
| 998 | + | G = result.getDataInt(G, "value") | |
| 999 | + | else | |
| 1000 | + | G = 0 | |
| 1001 | + | end | |
| 1002 | + | if H then | |
| 1003 | + | H = result.getDataInt(H, "value") | |
| 1004 | + | else | |
| 1005 | + | H = 0 | |
| 1006 | + | end | |
| 1007 | + | if I then | |
| 1008 | + | I = result.getDataInt(I, "value") | |
| 1009 | + | else | |
| 1010 | + | I = 0 | |
| 1011 | + | end | |
| 1012 | + | if J then | |
| 1013 | + | J = result.getDataInt(J, "value") | |
| 1014 | + | else | |
| 1015 | + | J = 0 | |
| 1016 | + | end | |
| 1017 | + | ||
| 1018 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 1019 | + | end | |
| 1020 | + | end | |
| 1021 | + | if PlayOn then | |
| 1022 | + | GOLD = PlayerGoldCoins(tid, 00) | |
| 1023 | + | ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN) | |
| 1024 | + | else | |
| 1025 | + | local G_1 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[01].. ' AND `player_id` = ' ..tid .. ';') | |
| 1026 | + | local G_2 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[02].. ' AND `player_id` = ' ..tid .. ';') | |
| 1027 | + | local G_3 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[03].. ' AND `player_id` = ' ..tid .. ';') | |
| 1028 | + | local G_4 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[04].. ' AND `player_id` = ' ..tid .. ';') | |
| 1029 | + | local G_5 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[05].. ' AND `player_id` = ' ..tid .. ';') | |
| 1030 | + | local G_6 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[06].. ' AND `player_id` = ' ..tid .. ';') | |
| 1031 | + | local G_7 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[07].. ' AND `player_id` = ' ..tid .. ';') | |
| 1032 | + | local G_8 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[08].. ' AND `player_id` = ' ..tid .. ';') | |
| 1033 | + | local G_9 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[09].. ' AND `player_id` = ' ..tid .. ';') | |
| 1034 | + | local G_10 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[10].. ' AND `player_id` = ' ..tid .. ';') | |
| 1035 | + | local ONL = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.ONLINE_COIN.. ' AND `player_id` = ' ..tid .. ';') | |
| 1036 | + | ||
| 1037 | + | if G_1 then | |
| 1038 | + | G_1 = result.getDataInt(G_1, "value") | |
| 1039 | + | else | |
| 1040 | + | G_1 = 0 | |
| 1041 | + | end | |
| 1042 | + | if G_2 then | |
| 1043 | + | G_2 = result.getDataInt(G_2, "value") | |
| 1044 | + | else | |
| 1045 | + | G_2 = 0 | |
| 1046 | + | end | |
| 1047 | + | if G_3 then | |
| 1048 | + | G_3 = result.getDataInt(G_3, "value") | |
| 1049 | + | else | |
| 1050 | + | G_3 = 0 | |
| 1051 | + | end | |
| 1052 | + | if G_4 then | |
| 1053 | + | G_4 = result.getDataInt(G_4, "value") | |
| 1054 | + | else | |
| 1055 | + | G_4 = 0 | |
| 1056 | + | end | |
| 1057 | + | if G_5 then | |
| 1058 | + | G_5 = result.getDataInt(G_5, "value") | |
| 1059 | + | else | |
| 1060 | + | G_5 = 0 | |
| 1061 | + | end | |
| 1062 | + | if G_6 then | |
| 1063 | + | G_6 = result.getDataInt(G_6, "value") | |
| 1064 | + | else | |
| 1065 | + | G_6 = 0 | |
| 1066 | + | end | |
| 1067 | + | if G_7 then | |
| 1068 | + | G_7 = result.getDataInt(G_7, "value") | |
| 1069 | + | else | |
| 1070 | + | G_7 = 0 | |
| 1071 | + | end | |
| 1072 | + | if G_8 then | |
| 1073 | + | G_8 = result.getDataInt(G_8, "value") | |
| 1074 | + | else | |
| 1075 | + | G_8 = 0 | |
| 1076 | + | end | |
| 1077 | + | if G_9 then | |
| 1078 | + | G_9 = result.getDataInt(G_9, "value") | |
| 1079 | + | else | |
| 1080 | + | G_9 = 0 | |
| 1081 | + | end | |
| 1082 | + | if G_10 then | |
| 1083 | + | G_10 = result.getDataInt(G_10, "value") | |
| 1084 | + | else | |
| 1085 | + | G_10 = 0 | |
| 1086 | + | end | |
| 1087 | + | if ONL then | |
| 1088 | + | ONL = result.getDataInt(ONL, "value") | |
| 1089 | + | else | |
| 1090 | + | ONL = 0 | |
| 1091 | + | end | |
| 1092 | + | ||
| 1093 | + | GOLD = G_1 + G_2 + G_3 + G_4 + G_5 + G_6 + G_7 + G_8 + G_9 + G_10 | |
| 1094 | + | ONLI = ONL | |
| 1095 | + | end | |
| 1096 | + | ||
| 1097 | + | player:sendCancelMessage("@AdmPanel 1 " ..GOLD.. " " ..ONLI.. " " ..PlayLabel) | |
| 1098 | + | return false | |
| 1099 | + | end, 500) | |
| 1100 | + | return false | |
| 1101 | + | end | |
| 1102 | + | end | |
| 1103 | + | if split[02] == "08" then -- FECHANDO CLIENTE | |
| 1104 | + | if PlayOn then | |
| 1105 | + | tid:sendCancelMessage("@ClientSystem 01") | |
| 1106 | + | addEvent(function() | |
| 1107 | + | for _INVENTARIO = 01, 09 do | |
| 1108 | + | if PlayOn then | |
| 1109 | + | local A = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_01) | |
| 1110 | + | local B = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_02) | |
| 1111 | + | local C = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_03) | |
| 1112 | + | local D = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_04) | |
| 1113 | + | local E = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_05) | |
| 1114 | + | local F = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_06) | |
| 1115 | + | local G = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_07) | |
| 1116 | + | local H = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_08) | |
| 1117 | + | local I = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_09) | |
| 1118 | + | local J = tid:getStorageValue(_SYSTEM.INVENTARIO[_INVENTARIO].UID_10) | |
| 1119 | + | ||
| 1120 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 1121 | + | else | |
| 1122 | + | local A = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_01.. ' AND `player_id` = ' ..tid .. ';') | |
| 1123 | + | local B = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_02.. ' AND `player_id` = ' ..tid .. ';') | |
| 1124 | + | local C = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_03.. ' AND `player_id` = ' ..tid .. ';') | |
| 1125 | + | local D = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_04.. ' AND `player_id` = ' ..tid .. ';') | |
| 1126 | + | local E = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_05.. ' AND `player_id` = ' ..tid .. ';') | |
| 1127 | + | local F = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_06.. ' AND `player_id` = ' ..tid .. ';') | |
| 1128 | + | local G = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_07.. ' AND `player_id` = ' ..tid .. ';') | |
| 1129 | + | local H = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_08.. ' AND `player_id` = ' ..tid .. ';') | |
| 1130 | + | local I = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_09.. ' AND `player_id` = ' ..tid .. ';') | |
| 1131 | + | local J = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.INVENTARIO[_INVENTARIO].UID_10.. ' AND `player_id` = ' ..tid .. ';') | |
| 1132 | + | ||
| 1133 | + | if A then | |
| 1134 | + | A = result.getDataInt(A, "value") | |
| 1135 | + | else | |
| 1136 | + | A = 0 | |
| 1137 | + | end | |
| 1138 | + | if B then | |
| 1139 | + | B = result.getDataInt(B, "value") | |
| 1140 | + | else | |
| 1141 | + | B = 0 | |
| 1142 | + | end | |
| 1143 | + | if C then | |
| 1144 | + | C = result.getDataInt(C, "value") | |
| 1145 | + | else | |
| 1146 | + | C = 0 | |
| 1147 | + | end | |
| 1148 | + | if D then | |
| 1149 | + | D = result.getDataInt(D, "value") | |
| 1150 | + | else | |
| 1151 | + | D = 0 | |
| 1152 | + | end | |
| 1153 | + | if E then | |
| 1154 | + | E = result.getDataInt(E, "value") | |
| 1155 | + | else | |
| 1156 | + | E = 0 | |
| 1157 | + | end | |
| 1158 | + | if F then | |
| 1159 | + | F = result.getDataInt(F, "value") | |
| 1160 | + | else | |
| 1161 | + | F = 0 | |
| 1162 | + | end | |
| 1163 | + | if G then | |
| 1164 | + | G = result.getDataInt(G, "value") | |
| 1165 | + | else | |
| 1166 | + | G = 0 | |
| 1167 | + | end | |
| 1168 | + | if H then | |
| 1169 | + | H = result.getDataInt(H, "value") | |
| 1170 | + | else | |
| 1171 | + | H = 0 | |
| 1172 | + | end | |
| 1173 | + | if I then | |
| 1174 | + | I = result.getDataInt(I, "value") | |
| 1175 | + | else | |
| 1176 | + | I = 0 | |
| 1177 | + | end | |
| 1178 | + | if J then | |
| 1179 | + | J = result.getDataInt(J, "value") | |
| 1180 | + | else | |
| 1181 | + | J = 0 | |
| 1182 | + | end | |
| 1183 | + | ||
| 1184 | + | player:sendCancelMessage("@loadInfo 01 " .._INVENTARIO.. " " ..A.. " " ..B.. " " ..C.. " " ..D.. " " ..E.. " " ..F.. " " ..G.. " " ..H.. " " ..I.. " " ..J) | |
| 1185 | + | end | |
| 1186 | + | end | |
| 1187 | + | if PlayOn then | |
| 1188 | + | GOLD = PlayerGoldCoins(tid, 00) | |
| 1189 | + | ONLI = tid:getStorageValue(_SYSTEM.ONLINE_COIN) | |
| 1190 | + | else | |
| 1191 | + | local G_1 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[01].. ' AND `player_id` = ' ..tid .. ';') | |
| 1192 | + | local G_2 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[02].. ' AND `player_id` = ' ..tid .. ';') | |
| 1193 | + | local G_3 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[03].. ' AND `player_id` = ' ..tid .. ';') | |
| 1194 | + | local G_4 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[04].. ' AND `player_id` = ' ..tid .. ';') | |
| 1195 | + | local G_5 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[05].. ' AND `player_id` = ' ..tid .. ';') | |
| 1196 | + | local G_6 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[06].. ' AND `player_id` = ' ..tid .. ';') | |
| 1197 | + | local G_7 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[07].. ' AND `player_id` = ' ..tid .. ';') | |
| 1198 | + | local G_8 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[08].. ' AND `player_id` = ' ..tid .. ';') | |
| 1199 | + | local G_9 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[09].. ' AND `player_id` = ' ..tid .. ';') | |
| 1200 | + | local G_10 = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.GOLD_COIN[10].. ' AND `player_id` = ' ..tid .. ';') | |
| 1201 | + | local ONL = db.storeQuery('SELECT `value` FROM `player_storage` WHERE `key` = ' .._SYSTEM.ONLINE_COIN.. ' AND `player_id` = ' ..tid .. ';') | |
| 1202 | + | ||
| 1203 | + | if G_1 then | |
| 1204 | + | G_1 = result.getDataInt(G_1, "value") | |
| 1205 | + | else | |
| 1206 | + | G_1 = 0 | |
| 1207 | + | end | |
| 1208 | + | if G_2 then | |
| 1209 | + | G_2 = result.getDataInt(G_2, "value") | |
| 1210 | + | else | |
| 1211 | + | G_2 = 0 | |
| 1212 | + | end | |
| 1213 | + | if G_3 then | |
| 1214 | + | G_3 = result.getDataInt(G_3, "value") | |
| 1215 | + | else | |
| 1216 | + | G_3 = 0 | |
| 1217 | + | end | |
| 1218 | + | if G_4 then | |
| 1219 | + | G_4 = result.getDataInt(G_4, "value") | |
| 1220 | + | else | |
| 1221 | + | G_4 = 0 | |
| 1222 | + | end | |
| 1223 | + | if G_5 then | |
| 1224 | + | G_5 = result.getDataInt(G_5, "value") | |
| 1225 | + | else | |
| 1226 | + | G_5 = 0 | |
| 1227 | + | end | |
| 1228 | + | if G_6 then | |
| 1229 | + | G_6 = result.getDataInt(G_6, "value") | |
| 1230 | + | else | |
| 1231 | + | G_6 = 0 | |
| 1232 | + | end | |
| 1233 | + | if G_7 then | |
| 1234 | + | G_7 = result.getDataInt(G_7, "value") | |
| 1235 | + | else | |
| 1236 | + | G_7 = 0 | |
| 1237 | + | end | |
| 1238 | + | if G_8 then | |
| 1239 | + | G_8 = result.getDataInt(G_8, "value") | |
| 1240 | + | else | |
| 1241 | + | G_8 = 0 | |
| 1242 | + | end | |
| 1243 | + | if G_9 then | |
| 1244 | + | G_9 = result.getDataInt(G_9, "value") | |
| 1245 | + | else | |
| 1246 | + | G_9 = 0 | |
| 1247 | + | end | |
| 1248 | + | if G_10 then | |
| 1249 | + | G_10 = result.getDataInt(G_10, "value") | |
| 1250 | + | else | |
| 1251 | + | G_10 = 0 | |
| 1252 | + | end | |
| 1253 | + | if ONL then | |
| 1254 | + | ONL = result.getDataInt(ONL, "value") | |
| 1255 | + | else | |
| 1256 | + | ONL = 0 | |
| 1257 | + | end | |
| 1258 | + | ||
| 1259 | + | GOLD = G_1 + G_2 + G_3 + G_4 + G_5 + G_6 + G_7 + G_8 + G_9 + G_10 | |
| 1260 | + | ONLI = ONL | |
| 1261 | + | end | |
| 1262 | + | ||
| 1263 | + | player:sendCancelMessage("@AdmPanel 1 " ..GOLD.. " " ..ONLI.. " " ..PlayLabel) | |
| 1264 | + | return false | |
| 1265 | + | end, 500) | |
| 1266 | + | end | |
| 1267 | + | end | |
| 1268 | + | if split[02] == "09" then -- MAESTRIA | |
| 1269 | + | local MAESTRIA = tonumber(split[03]) | |
| 1270 | + | if PlayOn then | |
| 1271 | + | local MAESTRIA_NAME = { | |
| 1272 | + | [01] = {N = "REGEN", V = 02}; | |
| 1273 | + | [02] = {N = "TANKER", V = 03}; | |
| 1274 | + | [03] = {N = "SHOOTER", V = 04}; | |
| 1275 | + | [04] = {N = "VITAL", V = 05}; | |
| 1276 | + | [05] = {N = "LUCKY", V = 06}; | |
| 1277 | + | } | |
| 1278 | + | ||
| 1279 | + | if MAESTRIA < 06 then | |
| 1280 | + | tid:setStorageValue(_SYSTEM.MAESTRIA[01], MAESTRIA) | |
| 1281 | + | player:popupFYI("Maestria alterada para [ " ..MAESTRIA_NAME[MAESTRIA].N.. " ].") | |
| 1282 | + | else | |
| 1283 | + | tid:setStorageValue(_SYSTEM.MAESTRIA[01], nil) | |
| 1284 | + | player:popupFYI("Maestria removida com sucesso.") | |
| 1285 | + | end | |
| 1286 | + | ||
| 1287 | + | doInventario(tid, 03) | |
| 1288 | + | else | |
| 1289 | + | player:popupFYI("Este jugador n�o est� online.") | |
| 1290 | + | return false | |
| 1291 | + | end | |
| 1292 | + | end | |
| 1293 | + | if split[02] == "10" then -- ESPECIALISTA | |
| 1294 | + | local ESPECIALISTA = tonumber(split[03]) | |
| 1295 | + | if PlayOn then | |
| 1296 | + | local ESPECIALISTA_NAME = { | |
| 1297 | + | [01] = "Pistola"; | |
| 1298 | + | [02] = "Metralhadora"; | |
| 1299 | + | [03] = "Espingarda"; | |
| 1300 | + | [04] = "Rifle"; | |
| 1301 | + | } | |
| 1302 | + | ||
| 1303 | + | if ESPECIALISTA < 05 then | |
| 1304 | + | tid:setStorageValue(_SYSTEM.ESPECIALISTA[01], ESPECIALISTA) | |
| 1305 | + | player:popupFYI("Especialidade alterada para [ " ..ESPECIALISTA_NAME[ESPECIALISTA].. " ].") | |
| 1306 | + | else | |
| 1307 | + | tid:setStorageValue(_SYSTEM.ESPECIALISTA[01], nil) | |
| 1308 | + | player:popupFYI("Especialidade removida com sucesso.") | |
| 1309 | + | end | |
| 1310 | + | else | |
| 1311 | + | player:popupFYI("Este jugador n�o est� online.") | |
| 1312 | + | return false | |
| 1313 | + | end | |
| 1314 | + | end | |
| 1315 | + | if split[02] == "11" then -- GOTO | |
| 1316 | + | local target = Creature(split[01]) | |
| 1317 | + | if target then | |
| 1318 | + | local isGhost = not player:isInGhostMode() | |
| 1319 | + | ||
| 1320 | + | player:teleportTo(target:getPosition()) | |
| 1321 | + | if isGhost then | |
| 1322 | + | player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) | |
| 1323 | + | end | |
| 1324 | + | else | |
| 1325 | + | player:popupFYI("Jogador n�o encontrado.") | |
| 1326 | + | return false | |
| 1327 | + | end | |
| 1328 | + | return false | |
| 1329 | + | end | |
| 1330 | + | if split[02] == "12" then -- MODO GHOST | |
| 1331 | + | local position = player:getPosition() | |
| 1332 | + | local isGhost = not player:isInGhostMode() | |
| 1333 | + | ||
| 1334 | + | player:setGhostMode(isGhost) | |
| 1335 | + | if isGhost then | |
| 1336 | + | player:sendTextMessage(MESSAGE_INFO_DESCR, "You are now invisible.") | |
| 1337 | + | position:sendMagicEffect(CONST_ME_YALAHARIGHOST) | |
| 1338 | + | else | |
| 1339 | + | player:sendTextMessage(MESSAGE_INFO_DESCR, "You are visible again.") | |
| 1340 | + | position.x = position.x + 1 | |
| 1341 | + | position:sendMagicEffect(CONST_ME_SMOKE) | |
| 1342 | + | end | |
| 1343 | + | return false | |
| 1344 | + | end | |
| 1345 | + | if split[02] == "13" then -- BANIMENTOS | |
| 1346 | + | local banDays = tonumber(split[03]) | |
| 1347 | + | local banDesc = split[04] | |
| 1348 | + | local banType = tonumber(split[05]) | |
| 1349 | + | ||
| 1350 | + | if banDesc == "0" then | |
| 1351 | + | banDesc = "" | |
| 1352 | + | end | |
| 1353 | + | if banType == 01 then | |
| 1354 | + | local accountId = getAccountNumberByPlayerName(split[01]) | |
| 1355 | + | if accountId == 0 then | |
| 1356 | + | return false | |
| 1357 | + | end | |
| 1358 | + | ||
| 1359 | + | local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) | |
| 1360 | + | if resultId ~= false then | |
| 1361 | + | result.free(resultId) | |
| 1362 | + | return false | |
| 1363 | + | end | |
| 1364 | + | ||
| 1365 | + | local timeNow = os.time() | |
| 1366 | + | db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. | |
| 1367 | + | accountId .. ", " .. db.escapeString(banDesc) .. ", " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") | |
| 1368 | + | ||
| 1369 | + | local target = Player(split[01]) | |
| 1370 | + | if target then | |
| 1371 | + | player:popupFYI(target:getName() .. " has been banned.") | |
| 1372 | + | target:remove() | |
| 1373 | + | else | |
| 1374 | + | player:popupFYI(split[01] .. " has been banned.") | |
| 1375 | + | end | |
| 1376 | + | else | |
| 1377 | + | local resultId = db.storeQuery("SELECT `name`, `lastip` FROM `players` WHERE `name` = " .. db.escapeString(split[01])) | |
| 1378 | + | if resultId == false then | |
| 1379 | + | return false | |
| 1380 | + | end | |
| 1381 | + | ||
| 1382 | + | local targetName = result.getString(resultId, "name") | |
| 1383 | + | local targetIp = result.getNumber(resultId, "lastip") | |
| 1384 | + | result.free(resultId) | |
| 1385 | + | ||
| 1386 | + | local targetPlayer = Player(split[01]) | |
| 1387 | + | if targetPlayer then | |
| 1388 | + | targetIp = targetPlayer:getIp() | |
| 1389 | + | targetPlayer:remove() | |
| 1390 | + | end | |
| 1391 | + | ||
| 1392 | + | if targetIp == 0 then | |
| 1393 | + | return false | |
| 1394 | + | end | |
| 1395 | + | ||
| 1396 | + | resultId = db.storeQuery("SELECT 1 FROM `ip_bans` WHERE `ip` = " .. targetIp) | |
| 1397 | + | if resultId ~= false then | |
| 1398 | + | player:popupFYI(targetName .. " is already IP banned.") | |
| 1399 | + | result.free(resultId) | |
| 1400 | + | return false | |
| 1401 | + | end | |
| 1402 | + | ||
| 1403 | + | local timeNow = os.time() | |
| 1404 | + | db.query("INSERT INTO `ip_bans` (`ip`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. | |
| 1405 | + | targetIp .. ", '" ..banDesc.. "', " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") | |
| 1406 | + | player:popupFYI(targetName .. " has been IP banned.") | |
| 1407 | + | end | |
| 1408 | + | ||
| 1409 | + | player:sendCancelMessage("@MonitBot#6") | |
| 1410 | + | return false | |
| 1411 | + | end | |
| 1412 | + | else | |
| 1413 | + | player:sendCancelMessage("@AdmPanel 0") | |
| 1414 | + | return false | |
| 1415 | + | end | |
| 1416 | + | return false | |
| 1417 | + | end |