Ogłoszenie

Jesteś nowy przywitaj się z innymi.W dziale Powitań i rejestrujcie się i zapraszajcie znajomych :) Zapraszam serdecznie :)

  • Index
  •  » Skrypty
  •  » [8.10-8.50][Różne] Avixu's Scripting Pwn4ge, czyli kilka moich skryptó

#1 2011-06-20 16:39:17

Tibiosz

Nowy użytkownik

Zarejestrowany: 2011-06-18
Posty: 5
Punktów :   

[8.10-8.50][Różne] Avixu's Scripting Pwn4ge, czyli kilka moich skryptó

Najlepszy skrypty Avisia. Wszystke posiadają konfgurację. Endżoj!

8.10
Aries 0.4.0

[Actions]Experience Rune
Bardziej zaawansowana runka dodająca graczowi expa. Jeśli chcesz w formule dodawanych pkt doświadczenia zastosować zmienne takie jak Level, Magic Level, Random czy jakieś inne pierdoły ustaw w configu specialFormula na 1 a następnie wpisz swoją formułę w linijce 17.
Kod:

-- Advanced Experence Rune by Avixu
-- Dedicated for Aries 0.4.0
-- Actions.XML: <action itemid="ITEMID" script="experience_rune.lua" allowfaruse="1" />

local config = {
  specialFormula = 0, -- jesli chcesz uzyc formuly ze zmiennymi typu level itp ustaw na 1 i podaj formule w linjce 17
  experiencePoints = 1000,
  magicEffect = 14,
  mayUseOnPlayersMsg = 'You may use this item only on players',
  removeItem = 1
}

function onUse(cid, item, frompos, item2, topos)
  if(isPlayer(item2.uid) == FALSE) then
    doPlayerSendCancel(cid, config.mayUseOnPlayerMsg)
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return FALSE
  end
 
  if config.specialFormula == 1 then
    local experiencePoints = math.random(getPlayerLevel(cid)*10, getPlayerLevel(cid)*200)
    doPlayerAddExp(item2.uid, experiencePoints)
    doPlayerSay(item2.uid, '+' ..experiencePoints.. ' EXP', 16)
  else
    doPlayerAddExp(item2.uid, config.experiencePoints) 
    doPlayerSay(item2.uid, '+' ..config.experiencePoints.. ' EXP', 16)
  end
   
  doSendMagicEffect(topos, config.magicEffect)
 
  if config.removeItem == 1 then
    if(item.type > 1) then
      doChangeTypeItem(item.uid, item.type - 1)
    elseif(item.type == 1) then
      doRemoveItem(item.uid, 1)
    end
  end
end


[Actions]Manaruna
Oparta na tej od Killavusa. Skrypt z serii "działa tak samo, ale lepiej" (np. podczas użycia nie na graczu - zamiast lecieć przez 3/4 skryptu zatrzymuje się na samym początku), poza tym jest łatwiejsza do zrozumienia i prostsza do edycji. Full konfiguracja. Jeśli chcesz, aby mr dodawała zawsze tyle samo many, ustaw constantManaAmount na określoną ilość. Jeśli chcesz wykorzystać jakąś formułę - ustaw constantManaAmount na 0 i wpisz ją w linijkach 33 i 34.
Kod:

-- Manarune by Avixu
-- Based on Killavus' manarune
-- Dedicated for Aries 0.4.0
-- Actions.XML: <action itemid="ITEMID" script="manarune.lua" allowfaruse="1" />

local config = {
  constantManaAmount = 0, -- set on 0 to use a formula with variables like level etc (line 33, 34)
  removeItem = 0,
  exhaustSeconds = 1,
  exhaustStorageID = 25500, -- this one MUST be unused!
  onlyOnPlayersMsg = 'You may use this item only on players',
  exhaustedMsg = 'You are exhausted.'
}

function onUse(cid, item, frompos, item2, topos)

  if(isPlayer(item2.uid) == FALSE) then
    doPlayerSendCancel(cid, config.onlyOnPlayersMsg)
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return FALSE
  end

  if(os.time() < getPlayerStorageValue(cid, config.exhaustStorageID)) then
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    doPlayerSendCancel(cid, config.exhaustedMsg)
    return FALSE
  end
 
  if config.constantManaAmount == 0 then
      local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
      -- formula settings
      -- you may use 'level' and 'mlevel'
    local manaMin = (level * 1) + (mlevel * 2)
    local manaMax = (level * 2) + (mlevel * 5)
      if manaMin < 10 then
        local manaMin = 10
      end
      if manaMax < 10 then
                local manaMax = 10
            end
    local manaAdd = math.random(manaMin, manaMax)
    doPlayerAddMana(item2.uid, manaAdd)
    doSendAnimatedText(getPlayerPosition(item2.uid), manaAdd, TEXTCOLOR_YELLOW)
   
  else
    doPlayerAddMana(item2.uid, config.constantManaAmount)
    doSendAnimatedText(getPlayerPosition(item2.uid), config.constantManaAmount, TEXTCOLOR_YELLOW)
  end
 
  setPlayerStorageValue(cid, config.exhaustStorageID, os.time() + config.exhaustSeconds)
  doSendMagicEffect(getPlayerPosition(item2.uid), CONST_ME_YELLOWENERGY)
  doPlayerSay(cid, "Aaaah...", 16)
     
  if config.removeItem == 1 then
    if(item.type > 1) then
      doChangeTypeItem(item.uid, item.type - 1)
    elseif(item.type == 1) then
      doRemoveItem(item.uid, 1)
    end
  end
end


[Actions]Wycinanie słonia z ice cube
Prosta funkcja, po prostu klikasz obsidian knifem na ice cube i jeśli się uda ajskjub coraz bardziej przypomina słonika.
Kod:

-- Creating an elephant statue of an ice cube
-- by Avixu
-- Dedicated for Aries 0.4.0
-- Actions.XML: <action itemid="5908" script="slonik.lua" />

local config = {
  breakChance = 30,
  effectOnSuccess = 3,
  effectOnDestroy = 9
}

function onUse(cid, item, frompos, item2, topos)

local random = math.random(1,100)

  if random <= config.breakChance then
    doRemoveItem(item.uid,1)
    doSendMagicEffect(topos, config.effectOnDestroy)

  elseif item2.itemid ~= 7442 then
    doTransformItem(item2.uid, item2.itemid+1)
    doSendMagicEffect(topos, config.effectOnSuccess)
 
  elseif item2.itemid == 7442 then
    doTransformItem(item2.uid, item2.itemid+2)
    doSendMagicEffect(topos, config.effectOnSuccess)
  end

end


[Talkactions]Naprawa softów
Gracz wpisuje !repair i jeśli ma 10k (cenę można zmienić) oraz zużyte softy zamienia je na nowe.
Kod:

-- Repair soft boots in talkactions by Avixu
-- Dedicated for Aries 0.4.0
-- Talkactons.XML: <talkaction words="!repair" script="repair_soft_boots.lua" />

local config = {
  repairPrice = 10000
}

function onSay(cid, words, param)
  if getPlayerItemCount(cid, 6530) >= 1 then
    if(not doPlayerRemoveMoney(cid, confg.repairPrice)) then
      doPlayerTakeItem(cid, 6530, 1)
      doPlayerAddItem(cid, 6132, 1)
      doPlayerSendTextMessage(cid, 19, 'Soft Boots repaired!')
      doSendAnimatedText(getPlayerPos(cid), 'Success!', TEXTCOLOR_DARKRED)
    else
      doPlayerSendCancel(cid, 'Sorry, you don\'t have enough money.')
    end
  else
    doPlayerSendCancel(cid, 'Sorry, you don\'t have a pair of worn soft boots.')
  end
end



8.50
TFS 0.3.5PL2

[Movements]Quest Tile
Kratka przepuszczająca tylko tych, którzy mają pod danym storage id daną wartość.
Kod:

-- Quest tile by Avixu
-- Dedicated for TFS 0.3.5PL2

local config = {
  storageID = 7000,
  storageValue = 1,
  mayPassMessage = "You may pass",
  noPassMessage = "Sorry, you need to do quest first",
  failMagicEffect = 2
}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if(getPlayerStorageValue(cid,config.storageID) == config.storageValue and isPlayer(cid)) then
    doCreatureSay(cid, config.mayPassMessage, TALKTYPE_ORANGE_1)
  else
    doTeleportThing(cid, fromPosition, false)
    doSendMagicEffect(fromPosition, config.failMagicEffect)
    doCreatureSay(cid, config.noPassMessage, TALKTYPE_ORANGE_1)
    end
    return true
end


[Actions]Item teleportujący do temple
Wcześniej dałem tu ten skrypt, teraz mocno go skróciłem i daję ponownie.
Kod:

-- Item teleporting to temple by Avixu
-- Dedicated for TFS 0.3.5PL2

local config = {
  teleportOnlyIfNoBattle = 1,
  teleportToTemple = 1, -- set on 0 if you want to use own position (teleportPosition)
  teleportPosition = { x=95, y=95, z=7 },
  removeItem = 1,
  startMagicEffect = 2,
  destinationMagicEffect = 10,
  haveBattleMessage = "You may not use teleportation while you have battle!",
  minLevel = 100, -- set on 0 to disable
  levelTooLowMessage = "Your level is too low."
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
  if config.teleportOnlyIfNoBattle == 1 then
    if getCreatureCondition(cid, 1024) == TRUE then
      doPlayerSendCancel(cid, config.haveBattleMessage)
      return FALSE
    end
  end
 
  if config.minLevel > 0 then
    if getPlayerLevel(cid) < config.minLevel then
      doPlayerSendCancel(cid, config.levelTooLowMessage)
      return FALSE
    end
  end
   
  if config.teleportToTemple == 1 then
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
  else
    doTeleportThing(cid, config.teleportPosition)
  end
 
  doSendMagicEffect(getCreaturePosition(cid), config.destinationMagicEffect)
  doSendMagicEffect(toPosition, config.startMagicEffect)
 
  if config.removeItem == 1 then
    doRemoveItem(item.uid, 1)
  end
end


Pjona!

Offline

 
  • Index
  •  » Skrypty
  •  » [8.10-8.50][Różne] Avixu's Scripting Pwn4ge, czyli kilka moich skryptó

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.mpc-metin2.pun.pl www.rani-mukherjee.pun.pl www.bleachplay.pun.pl www.cs-devil.pun.pl www.gra-metin2.pun.pl