Postado Julho 11, 2019 6 anos Servidor OTX 2.9 Preciso de ajuda com este script de treiner skill com item ele treina, só que nao me deixa remover o item... da mão, se for possivel gostaria de definir o skill que vai upa tipo SKILL_AXE and SHIELD ou um só Citar local porcent = 4 local tempo = 1 * 1000 local lock = 0 local Skills = { { 1, 2 }, { 2, 1 }, { 3, 3 }, { 5, 5 }, { 4, 4 } } function onEquip(cid, item, slot) local x = {cid = cid, item = item, slot = slot} setPlayerStorageValue(x.cid, 12345, 1) if isPlayer(x.cid) then doPlayerSendTextMessage(x.cid,25,"O Treino Comecou") doPlayerSetNoMove(cid, true) addEvent(Shoguns, tempo, x) end return true end function onDeEquip(cid, item, slot) if getPlayerStorageValue(cid, 12345) == 2 then return false end setPlayerStorageValue(cid, 12345, 2) doPlayerSendTextMessage(cid,21,"O Treino acabou") doPlayerSetNoMove(cid, false) return true end function Shoguns(x) if isPlayer(x.cid) and getPlayerStorageValue(x.cid, 12345) == 1 then local weaponLeft = getPlayerSlotItem(x.cid, CONST_SLOT_LEFT) local weaponRight = getPlayerSlotItem(x.cid, CONST_SLOT_RIGHT) if weaponLeft.itemid ~= 0 then weaponLeft = getItemWeaponType(weaponLeft.uid) end if weaponRight.itemid ~= 0 then weaponRight = getItemWeaponType(weaponRight.uid) end for _, tempo in pairs(Skills) do if tempo[1] == weaponLeft or tempo[1] == weaponRight then doPlayerAddSkillTry(x.cid, tempo[2], porcent) end end magiclvl = getPlayerMana(x.cid) doPlayerAddSpentMana(x.cid, magiclvl, math.random(1,3)) doSendMagicEffect(getPlayerPosition(x.cid),30) doSendAnimatedText(getPlayerPosition(x.cid),"Treinando", math.random(1,255)) addEvent(Shoguns, tempo, x) end return true end tag <!-- Trainer Club--> <movevent type="Equip" itemid="2382" event="script" value="treinarskill/club.lua"/> <movevent type="DeEquip" itemid="2382" event="script" value="treinarskill/club.lua"/>
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.