Ir para conteúdo

jhon992

Conde
  • Total de itens

    631
  • Registro em

  • Última visita

  • Dias Ganhos

    13

Tudo que jhon992 postou

  1. -- <Script by jhon992> -- local weaponpar = {2377, 2378, 2379, 2380} -- id dos items que sugarão life local arrows = {1234, 5463} -- coloca o id das arrows local bows = {1234, 5463} -- coloque os ids das bows local chancepar = 5 -- chance de sugar (10 = 10%, 20 = 20%, 30 = 30%, 1 = 1%, 5 = 5%) e assim por diante function onAttack(cid, target) if ((getCreaturePosition(target).x == getCreaturePosition(cid).x or getCreaturePosition(target).x == getCreaturePosition(cid).x+1 or getCreaturePosition(target).x == getCreaturePosition(cid).x-1) and (getCreaturePosition(target).y == getCreaturePosition(cid).y or getCreaturePosition(target).y == getCreaturePosition(cid).y+1 or getCreaturePosition(target).y == getCreaturePosition(cid).y-1)) then if (isInArray(weaponpar, getPlayerSlotItem(cid, 5).itemid) or isInArray(weaponpar, getPlayerSlotItem(cid, 6).itemid)) then if (math.random(1,100) > (100 - chancepar)) then life = (getCreatureHealth(target)*0.1) doPlayerSendTextMessage(cid, 23, "Você sugou "..life.." de hp do "..getCreatureName(target)..".") doSendMagicEffect(getCreaturePosition(target), 68) doCreatureAddHealth(target, -life) doCreatureAddHealth(cid, life) return true else return true end end end if (isInArray(bows, getPlayerSlotItem(cid, 5).itemid) or isInArray(bows, getPlayerSlotItem(cid, 6).itemid)) then if (isInArray(arrows, getPlayerSlotItem(cid, 10).itemid)) then if (math.random(1,100) > (100 - chancepar)) then life = (getCreatureHealth(target)*0.1) doPlayerSendTextMessage(cid, 23, "Você sugou "..life.." de hp do "..getCreatureName(target)..".") doSendMagicEffect(getCreaturePosition(target), 68) doCreatureAddHealth(target, -life) doCreatureAddHealth(cid, life) return true else return true end end end return true end
  2. jhon992

    Troca De Pvp E Non-Pvp

    Vamo la. Primeiro vai em data/creaturescripts/scripts, duplica um arquivo e nomeia para "pvpmode" sem as aspas e nele cole: function onCombat(cid, target) if (isPlayer(cid) and isPlayer(target)) then if getPlayerStorageValue(cid, 102059) == 1 then doPlayerSendTextMessage(cid, 27, "Seu status é non-pvp.") return FALSE elseif getPlayerStorageValue(target, 102059) == 1 then doPlayerSendTextMessage(cid, 27, "O status de seu oponente é non-pvp.") return FALSE end end return TRUE end Agora em creaturescripts.xml coloque a tag: <event type="combat" name="PvpMode" event="script" value="pvpmode.lua"/> Depois vai no arquivo creaturescripts/scripts/login.lua e antes do último "return true" cole essa tag: registerCreatureEvent(cid, "PvpMode") ----------------------------------------------------------------------------------------------------------------------------------- Creaturescripts ta pronto, agora vamos para o talkaction de ativação. Vai em data/talkactions/scripts, duplica um arquivo e nomeia para "pvp_change" sem as aspas e nele cole: function onSay(cid, words, param, channel) local exausted = 1 -- dias de exausted if(exhaustion.check(cid, 34538) == TRUE) then if (exhaustion.get(cid, 34538) >= 60) then doPlayerSendCancel(cid, "Voçê só pode mudar modo após [" .. math.floor(exhaustion.get(cid, 34538) / 60 + 1) .."] minutos.") end if (exhaustion.get(cid, 34538) <= 60) then doPlayerSendCancel(cid, "Voçê só pode mudar modo após [" .. exhaustion.get(cid, 34538).."] segundos.") end return TRUE end if getPlayerStorageValue(cid, 102059) == 1 then setPlayerStorageValue(cid, 102059, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ativado Modo: PVP.") doSendMagicEffect(getCreaturePosition(cid), 30) -- mudar effect se desejar exhaustion.set(cid, 34538, exausted * 60 * 60 * 24) else setPlayerStorageValue(cid, 102059, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ativado Modo: NON-PVP.") doSendMagicEffect(getCreaturePosition(cid), 30) -- mudar effect se desejar exhaustion.set(cid, 34538, exausted * 60 * 60 * 24) end return true end E por último, em talkactions.xml cole a tag: <talkaction words="!mudarpvp" event="script" value="pvp_change.lua"/> -------------------------------------------------------------------------------------------------- Obs: nem testei, qualquer erro me fala.
  3. function onStepIn(cid, item, pos) if isPlayer(cid) == 1 then if getPlayerStorageValue(cid,20010) <= 0 then doSkillBag(cid) doPlayerAddItem(cid,2148,1) doPlayerAddItem(cid,2148,1) doPlayerAddItem(cid,2148,1) local vocs = {1,15,16,17,18,19,20,86,201,202,203,204,205,206,207,363,364} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2313,1) doPlayerAddItem(cid,2307,1) doPlayerAddItem(cid,2300,1) doPlayerAddItem(cid,2304,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2286,1) doPlayerAddItem(cid,2305,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {2,21,22,23,24,25,26,88,214,215,216,217,218,219,220,37,365} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2297,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {3,41,42,43,44,237,238,239,240,241,378} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2271,1) doPlayerAddItem(cid,2288,1) doPlayerAddItem(cid,2276,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2290,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {5,68,69,70,71,258,259,260,261,262,376} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2296,1) doPlayerAddItem(cid,2288,1) doPlayerAddItem(cid,2291,1) doPlayerAddItem(cid,2270,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {6,27,28,29,30,90,208,209,210,211,212,213,366} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2277,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {7,31,32,33,34,35,36,221,222,223,224,225,226,367} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2272,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {8,51,52,53,274,275,276,277,278,278,374} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2299,1) doPlayerAddItem(cid,2301,1) doPlayerAddItem(cid,2291,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2286,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {9,45,46,47,48,49,50,253,254,255,256,257,373} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2293,1) doPlayerAddItem(cid,2285,1) doPlayerAddItem(cid,2303,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {10,54,55,56,57,58,247,248,249,250,251,375} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2282,1) doPlayerAddItem(cid,2289,1) doPlayerAddItem(cid,2281,1) doPlayerAddItem(cid,2306,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2298,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {11,59,60,61,96,242,243,244,245,246,379} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2261,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {12,62,63,64,65,268,269,270,271,272,273} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2261,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {13,72,73,74,75,263,264,265,266,267} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2296,1) doPlayerAddItem(cid,2316,1) doPlayerAddItem(cid,2274,1) doPlayerAddItem(cid,2302,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {14} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2297,1) doPlayerAddItem(cid,2292,1) doPlayerAddItem(cid,2291,1) doPlayerAddItem(cid,2302,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {76,77,80,81,82,227,228,229,230,231} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2277,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {78,79,83,84,85,232,233,234,235,236} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2272,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {91,92,280,93,94,95,281,282,283,284,285} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2293,1) doPlayerAddItem(cid,2285,1) doPlayerAddItem(cid,2303,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {100,101,102,103,104,113,286,287,288,289,290,291} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2313,1) doPlayerAddItem(cid,2307,1) doPlayerAddItem(cid,2300,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2290,1) doPlayerAddItem(cid,2305,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {105,106,107,108,292,293,294,295,296,297} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2288,1) doPlayerAddItem(cid,2289,1) doPlayerAddItem(cid,2281,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2298,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {109,110,111,112,298,299,300,301,302,303,302} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2283,1) doPlayerAddItem(cid,2285,1) doPlayerAddItem(cid,2276,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2273,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2280,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {303,304,305,306,307,308,309,310,311,312,313} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2297,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {314,315,316,317,318,319,320,321,322,323} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2293,1) doPlayerAddItem(cid,2285,1) doPlayerAddItem(cid,2274,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {324,325,325,326,327,328,329,330,331,332} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2283,1) doPlayerAddItem(cid,2285,1) doPlayerAddItem(cid,2276,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2290,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {333,334,335,336,337,338,339,340,341,342} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2296,1) doPlayerAddItem(cid,2316,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {343,344,345,346,347,348,349,350,351,352} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2279,1) doPlayerAddItem(cid,2288,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2294,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2290,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {353,354,355,356,357,358,359,360,361,362} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2296,1) doPlayerAddItem(cid,2272,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {398,399,400,401,402,403,404,405,406,407,408} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2313,1) doPlayerAddItem(cid,2307,1) doPlayerAddItem(cid,2300,1) doPlayerAddItem(cid,2304,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2286,1) doPlayerAddItem(cid,2305,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {409,410,411,412,413,414,415,416,417,418,419} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2272,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {420,421,422,423,424,425,426,427,428,429,430,431} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2313,1) doPlayerAddItem(cid,2307,1) doPlayerAddItem(cid,2300,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2290,1) doPlayerAddItem(cid,2305,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {432,433,434,435,436,437,438,439,440,441,442} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2296,1) doPlayerAddItem(cid,2288,1) doPlayerAddItem(cid,2291,1) doPlayerAddItem(cid,2270,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {443,444,445,446,447,448,449,450,451,452,453} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2297,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {454,455,456,457,458,459,460,461,462,463,464} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2261,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2278,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end vocs = {465,466,467,468,469,470,471,472,473,474,475} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2297,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2266,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2314,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) end vocs = {476,477,478,479,480,481,482,483,484,485,486} if isInArray(vocs, getPlayerVocation(cid)) then doPlayerAddItem(cid,2311,1) doPlayerAddItem(cid,2297,1) doPlayerAddItem(cid,2310,1) doPlayerAddItem(cid,2268,1) doPlayerAddItem(cid,2308,1) doPlayerAddItem(cid,2267,1) doPlayerAddItem(cid,2295,1) doPlayerAddItem(cid,2309,1) doPlayerAddItem(cid,2269,1) doPlayerAddItem(cid,2312,1) doPlayerAddItem(cid,2287,1) doPlayerAddItem(cid,2315,1) setPlayerStorageValue(cid,20010,3) return 1 end end end return 1 end
  4. jhon992

    Troca De Pvp E Non-Pvp

    Reportado, por nome irregular de tópico. Da próxima vês seja mais especifico com o nome do tópico para organização do fórum.
  5. Fiz pra funcionar soh pra weapons dos slots de hand, se tu tivese explicado melhor tinha feito de arrow. Agora to sem tempo, quando tiver tempo eu faço se ninguem tiver feito antes.
  6. coloca tudo, o primeiro scritp que te passei e esse tbm.
  7. Acabei de testar, esta funcionando perfeitamente. Só colocar os itens que tu quer que funcione e a chance.
  8. Ta testado agora, mais pra funcionar tens que colocar os numeros de frags em 10 em 10, ali no login_transform, como jah ta ali. E configura as partes que são configuraveis no script. local LOGIN_TRANSFORM = { [20] = 100, -- [numero de mortes] = looktype, os numeros de mortes tem que seguir de 10 em 10 para funcionar perfeitamente. [30] = 120, [40] = 120, [50] = 130, [60] = 130, [70] = 130, [80] = 140, [90] = 140, [100] = 140 } function onLogin(cid) local storage = getPlayerStorageValue(cid, 102089) local cont = 10 addEvent(arredonda, 1, storage, cont, cid) return TRUE end function arredonda(storage, cont, cid) aux = 10 if storage < 20 then -- aqui vc coloca primeira quantidade de frag que o player deve ter, como exemplo na lista. return true end if storage >= 100 then -- aqui e na linha debaixo vc poem a ultima quantidade de frags que o player deve ter, como exemplo na lista.. outfit = {lookType = LOGIN_TRANSFORM[100]} doSetCreatureOutfit(cid, outfit, -1) return true end if storage > cont and storage < cont+aux then outfit = {lookType = LOGIN_TRANSFORM[cont]} doSetCreatureOutfit(cid, outfit, -1) else cont = cont+aux doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,cont) addEvent(arredonda, 1, storage, cont, cid) end end
  9. Reportado para moverem, para Pedidos Atendidos!
  10. Funciona com os 2. Quando acerta o sugar aparece uma msg no player de quanto sugou.
  11. Faiz assim: Abra a pasta "data/creaturescripts/scripts" duplique um arquivo qualquer e renomeie para "weaponsugar" sem as aspas e nele cole: -- <Script by jhon992> -- local weaponpar = {2377, 2378, 2379, 2380} -- id dos items que sugarão life local chancepar = 5 -- chance de sugar (10 = 10%, 20 = 20%, 30 = 30%, 1 = 1%, 5 = 5%) e assim por diante function onAttack(cid, target) if ((getCreaturePosition(target).x == getCreaturePosition(cid).x or getCreaturePosition(target).x == getCreaturePosition(cid).x+1 or getCreaturePosition(target).x == getCreaturePosition(cid).x-1) and (getCreaturePosition(target).y == getCreaturePosition(cid).y or getCreaturePosition(target).y == getCreaturePosition(cid).y+1 or getCreaturePosition(target).y == getCreaturePosition(cid).y-1)) then for i=0, #weaponpar do if (getPlayerSlotItem(cid, 5).itemid == weaponpar[i] or getPlayerSlotItem(cid, 6).itemid == weaponpar[i]) then if (math.random(1,100) > (100 - chancepar)) then life = (getCreatureHealth(target)*0.1) doPlayerSendTextMessage(cid, 23, "Você sugou "..life.." de hp do "..getCreatureName(target)..".") doSendMagicEffect(getCreaturePosition(target), 98) doCreatureAddHealth(target, -life) doCreatureAddHealth(cid, life) return true else return true end end end end return true end Agora no arquivo, "data/creaturescripts/creaturescripts.xml" cole a tag: <event type="attack" name="WeaponSugar" event="script" value="weaponsugar.lua"/> E por último, abra o arquivo login.lua que esta localizado em "data/creaturescripts/scripts" e cole a tag: registerCreatureEvent(cid, "WeaponSugar") Créditos pro cara desse tópico: http://www.xtibia.com/forum/topic/175370-creaturescript-weapons-paralyze/
  12. virar monstro? esse script não tranforma o player em nada n...
  13. Vai em creaturescripts/scripts, duplica outro arquivo e nomeia para "out_login", e cole: local LOGIN_TRANSFORM = { [20] = 100, -- [numero de mortes] = looktype [50] = 120, [100] = 130, [200] = 150, [400] = 190, [600] = 210 } function onLogin(cid) local storage = getPlayerStorageValue(cid, 102089) local cont = 10 addEvent(arredonda, 1, storage, cont, cid) return TRUE end function arredonda(storage, cont, cid) if storage > cont and storage < cont+cont then local outfit = {lookType = LOGIN_TRANSFORM[cont]} doSetCreatureOutfit(cid, outfit, -1) else cont = cont+cont arredonda(storage, cont, cid) end end Em creaturescripts.xml cole a tag: <event type="login" name="Out_Login" event="script" value="out_login.lua"/> Deu, só configura a parte do login_transform igual o do script de antes.
  14. Ta aew =) local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BOLT) local attackmin, attackmax = 100, 300 -- attack minimo, attack maximo function onCastSpell(cid, var) if doPlayerRemoveItem(cid, 2160, 1) then -- 2160, troque pelo id da bolt target = getCreatureTarget(cid) if (target <= 0) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Selecione um target.") return false end hit = (math.random(attackmin,attackmax) + getPlayerSkillLevel(cid, SKILL_DISTANCE) / 3) doCreatureAddHealth(target, -hit) doSendAnimatedText(getCreaturePosition(target), math.floor(hit), 144) return doCombat(cid, combat, var) end doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não possui bolt's.") return false end
  15. Creio que assim funcionara: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BOLT) local attackmin, attackmax = 100, 300 -- attack minimo, attack maximo function onCastSpell(cid, var) target = getCreatureTarget(cid) hit = (math.random(attackmin,attackmax) + getPlayerSkillLevel(cid, SKILL_DISTANCE) / 3) doCreatureAddHealth(target, -hit) return doCombat(cid, combat, var) end
  16. Em data/creaturescripts/scripts, duplique um arquivo e nomeia para "out_kill" sem as aspas e nele cole: local KILL_TRANSFORM = { [20] = 100, -- [numero de mortes] = looktype [50] = 120, [100] = 130, [200] = 150, [400] = 190, [600] = 210 } function onKill(cid, target, lastHit) if (isPlayer(target) == true) then setPlayerStorageValue(cid, 102089, getPlayerStorageValue(cid, 102089)+1) doSendAnimatedText(getThingPos(cid), 'Frag+', 144) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Você recebeu 1 frag por matar "..getCreatureName(target)..".") end local outfit = {lookType = KILL_TRANSFORM[getPlayerStorageValue(cid, 102089)]} if (outfit.lookType > 0) then doSetCreatureOutfit(cid, outfit, -1) end return TRUE end Agora em creaturescripts.xml cole a tag: <event type="kill" name="Out_Kill" event="script" value="out_kill.lua"/> E em data/creaturescripts/scripts/login.lua, antes do último "return true" coloque isso: if (getPlayerStorageValue(cid, 102091) ~= 1) then setPlayerStorageValue(cid, 102091, 1) setPlayerStorageValue(cid, 102089, 0) end registerCreatureEvent(cid, "Out_Kill")
  17. Em data/creaturescripts/scripts, duplica um arquivo e nomeia para "vocations_gain" sem as aspas e nele cole: local vocationsItem = { [1] = 1234, -- sorcerer, troque os 1234 pelo id do item. [2] = 1234, -- druid [3] = 1234, -- paladin [4] = 1234 -- knight } local lvlGain = 20 -- lvl para ganhar function onAdvance(cid, skill, oldLevel, newLevel) if (getPlayerLevel(cid) == lvlGain and getPlayerStorageValue(cid, 403245) ~= 1) then doPlayerAddItem(cid, vocationsItem[getPlayerVocation(cid)]) setPlayerStorageValue(cid, 403245, 1) end return true end Agora em creaturescripts.xml cole a tag: <event type="advance" name="VocationsGain" event="script" value="vocations_gain.lua"/> E por último em data/creaturescripts/scripts/login.lua, cole a tag antes do último "return true": registerCreatureEvent(cid, "VocationsGain")
  18. function onUse(cid, item, item2, frompos, topos, pos) local config = { ["Magic Plate Armor"] = {t1=2476,t2=2464,t3=2472}, -- t1 = ID do ITEM 1 |---| t2 = ID do ITEM 2 |---| t3 = ID do ITEM a ser FORJADO -- ["Dragon Scale Mail"] = {t1=2489,t2=2487,t3=2492}, } local r1 = {x = 222, y = 217, z = 7, stackpos= 2} -- Posição 1 ( NÃO MEXA NO stackpos= 2 ) local r2 = {x = 224, y = 217, z = 7, stackpos= 2} -- Posição 2 ( NÃO MEXA NO stackpos= 2 ) local r3 = {x = 223, y = 217, z = 7} -- Posição do Item a Ser Criado local chance = 60 -- chance de funcionar local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) for i, x in pairs(config) do if (q1.itemid == x.t1 and q2.itemid == x.t2) or (q1.itemid == x.t2 and q2.itemid == x.t1) then doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) if (math.random(0,100) > chance) then doPlayerSendTextMessage(cid, 22, "Você não conseguiu forjar!") return true end addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end return TRUE end
  19. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) - getCreatureHealth(cid))/2) return doCombat(cid, combat, var) end
  20. Apareceu algum erro na distro ou algo desse tipo? Tenta por o wordtype = "pvp", então e mudar só rateExperienceFromPlayers, como foi sugerido nesse link: http://www.xtibia.co...-matar-players/
  21. Vai no seu config.lua e procure por: worldType = "pvp" Troque por: worldType = "pvp-enforced" Agora procura por: rateExperienceFromPlayers = 0 E coloque a exp desejada.
  22. jhon992

    [Pedido De Script]8.54

    Tenta assim: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onCastSpell(cid, var) if (getPlayerStorageValue(cid, 103010) <= 0) then doCreatureAddHealth(cid, 100) setPlayerStorageValue(cid, 103010, 1) addEvent(testSto1, 15000, cid) elseif (getPlayerStorageValue(cid, 103010) == 1) then doCreatureAddHealth(cid, 200) setPlayerStorageValue(cid, 103010, 2) addEvent(testSto2, 15000, cid) else setPlayerStorageValue(cid, 103010, 0) doCreatureAddHealth(cid, 300) end return doCombat(cid, combat, var) end function testSto1(cid) if (isPlayer(cid)) then if (getPlayerStorageValue(cid, 103010) == 1) then setPlayerStorageValue(cid, 103010, 0) end end end function testSto2(cid) if (isPlayer(cid)) then if (getPlayerStorageValue(cid, 103010) == 2) then setPlayerStorageValue(cid, 103010, 0) end end end
  23. Acho que assim vai funcionar: Vai em data/actions/actions.xml e poem a tag: <action actionid="2015" event="script" value="doorguild.lua"/> Agora em data/actions/scripts, duplica um arquivo e nomeia pra "doorguild" sem as aspas e cole: function onUse(cid, item, fromPosition, itemEx, toPosition) if (db.getResult("SELECT * FROM `guilds` WHERE `id` = " .. getPlayerGuildId(cid) .. " AND `acesso` > " .. os.time() .. ";"):getID() ~= -1) then doTeleportThing(cid, toPosition) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não pode entrar nessa porta.") end return true end Por último poem o actionid na porta do seu ot pelo mapa editor!
  24. Relacionado ao seu pedido, achei esse topico respondido pelo @Demonbh. http://www.xtibia.com/forum/topic/167039-pedido-urgentesistema-de-durabilidade/
  25. oque esse script deve fazer? explica melhor para min poder ajudar.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...