What's new

System Set?w

Status
Not open for further replies.

luksonik

Advanced User
Joined
Apr 11, 2008
Messages
273
Reaction score
21
Ostatnio zajmuje si? tworzeniem servera RPG o zupe?nie nowym klimacie i napisa?em dosy? du?o nowych skrypt?w... Jednym z nich jest ten na tworzenie w?asnych rozmaitych set?w. Jest on bardzo funkcjonalny i przedmiotem od setu mo?e by? ka?dy z ekwipunku.

Wersja skryptu: 1.1.0
Wersja TFS (na kt?rej testowano): 0.3.6
Autor: Ja AdamsiQ, na forum luksonik -,^

UWAGA:
Nie ?ycz? sobie udost?pniania skryptu na innych forach ni? to, jako autor nie chc? aby?cie usuwali stopki z moich prac. Stopk? jest zazwyczaj tekst "--AdamsiQ Works!".

Zaczynamy instalacj? :)

Wejd? do folderu: DATA/CREATURESCRIPTS/SCRIPTS/ i otw?rz plik LOGIN.LUA
>> Przed linijk?:
PHP:
return true
end
>> Dodaj linijk?:
PHP:
loadSetSystem(cid)
>> Ca?o?? ma wygl?da? mniej wi?cej tak:
PHP:
loadSetSystem(cid)
return true
end

Teraz wejd? do folderu: DATA/LIB/ i stw?rz plik o nazwie: AdamsiqSetSystem.lua
>> Wklej do pliku skrypt:
PHP:
--[[
AdamsiQ Set System Lib:
 Server version:
   > TheForgottenServer: 0.3.6pl1
   > AdamsiQ Core: 0.6.1+
AdamsiQ Works!
1 * 60 * 1000 = 1 minute
1000 = 1 second
2500 = 2,5 second
]]--
local slot = {
head = 1, -- glowa
necklace = 2, -- amulet
backpack = 3, -- backpack
armor = 4, -- zbroja
right = 5, -- prawa reka
left = 6, -- lewa reka
legs = 7, -- spodnie
feet = 8, -- buty
ring = 9, -- pierscien
ammo = 10 -- amunicja
}
local setItemTable = {
[1] = { -- Golden Set [Testowy]
setItems = {{2471,slot.head},{2466,slot.armor},{2470,slot.legs},{2646,slot.feet}},
setBonus = {health = {count = 20, time = 1000}, mana = {count = 10, time = 1000}, soul = {count = 1, time = 60000}, effect = {id = 15, time = 2500}, text = {color = 180, text = "Mam g.set", time = 2500}}
},

}

----------------- ## DONT EDIT THE SCRIPT ## ---------------------------
function setSystemStartHealthRegeneration(cid,count,time,storageCounter)
doCreatureAddHealth(cid,count)
if getPlayerStorageValue(cid,storageCounter) == 1 then
addEvent(setSystemStartHealthRegeneration,time,cid,count,time,storageCounter)
else
return false
end
return addEvent(setSystemStartHealthRegeneration,time,cid,count,time,storageCounter)
end
function setSystemStartManaRegeneration(cid,count,time,storageCounter)
doPlayerAddMana(cid,count)
if getPlayerStorageValue(cid,storageCounter) == 1 then
addEvent(setSystemStartManaRegeneration,time,cid,count,time,storageCounter)
else
return false
end
return addEvent(setSystemStartManaRegeneration,time,cid,count,time,storageCounter)
end
function setSystemStartSoulRegeneration(cid,count,time,storageCounter)
doPlayerAddSoul(cid,count)
if getPlayerStorageValue(cid,storageCounter) == 1 then
addEvent(setSystemStartSoulRegeneration,time,cid,count,time,storageCounter)
else
return false
end
return addEvent(setSystemStartSoulRegeneration,time,cid,count,time,storageCounter)
end
function setSystemSendEffect(cid,effect,time,storageCounter)
local position = getPlayerPosition(cid)
doSendMagicEffect(position,effect)
if getPlayerStorageValue(cid,storageCounter) == 1 then
addEvent(setSystemSendEffect,time,cid,effect,time,storageCounter)
else
return false
end
return addEvent(setSystemSendEffect,time,cid,effect,time,storageCounter)
end
function setSystemSendText(cid,color,text,time,storageCounter)
local position = getPlayerPosition(cid)
doSendAnimatedText(position,text,color)
if getPlayerStorageValue(cid,storageCounter) == 1 then
addEvent(setSystemSendText,time,cid,color,text,time,storageCounter)
else
return false
end
return addEvent(setSystemSendText,time,cid,color,text,time,storageCounter)
end
function setSystemCheckEqItems(cid,setItemsTable)
local count, value = #setItemsTable, 0
for i = 1, count do
 local item, slot = setItemsTable[i][1], setItemsTable[i][2]
 if getPlayerSlotItem(cid,slot).itemid == item then
  value = value + 1
 else
  value = value - 1
 end
end
return value
end
function setSystemCountEqItems(cid,setItemsTable)
local count, value = #setItemsTable, 0
for i = 1, count do
 local item = setItemsTable[i][1]
 if getPlayerItemCount(cid,item) >= 1 then
  value = value + 1
 else
  value = value - 1
 end
end
return value
end
function checkBigSetItems(cid)
for i = 1, #setItemTable do
local load = setItemTable[i]
local storageCounter = i * 50 + 2000000
 if setSystemCountEqItems(cid,load.setItems) >= #load.setItems then
  if setSystemCheckEqItems(cid,load.setItems) == #load.setItems then
  setPlayerStorageValue(cid,storageCounter,0)
   if getPlayerStorageValue(cid,storageCounter) <= 0 then
   local special = load.setBonus
    if special.health.count > 0 then
     setSystemStartHealthRegeneration(cid,special.health.count,special.health.time,storageCounter)
    end
    if special.mana.count > 0 then
     setSystemStartManaRegeneration(cid,special.mana.count,special.mana.time,storageCounter)
    end
    if special.soul.count > 0 then
     setSystemStartSoulRegeneration(cid,special.soul.count,special.soul.time,storageCounter)
    end
    if special.effect.id > 0 then
     setSystemSendEffect(cid,special.effect.id,special.effect.time,storageCounter)
    end
    if special.text.color > 0 then
     setSystemSendText(cid,special.text.color,special.text.text,special.text.time,storageCounter)
    end
    setPlayerStorageValue(cid,storageCounter,1)
    return addEvent(checkBigSetItems,1000,cid)
   end
   else
   setPlayerStorageValue(cid,storageCounter,1)
  end
 elseif getPlayerStorageValue(cid,storageCounter) == 1 then
  setPlayerStorageValue(cid,storageCounter,0)
  return addEvent(checkBigSetItems,1000,cid)
 end
end
return addEvent(checkBigSetItems,1000,cid)
end
function loadSetSystem(cid)
checkBigSetItems(cid)
return true
end
Gratulacje zako?czy?e? pomy?lnie instalacj? mojego systemu :).

Teraz przejd? do t?umaczenia:
Aby doda? nowy secik nale?y doda? now? linijk? w tabeli:
PHP:
[Kolejny numer w tabeli] = {
setItems = {{id,slot},{id,slot}},
setBonus = {health = {count = ilo?? hp, time = czas hp w ms}, mana = {count = ilo?? mp, time = czas mp w ms}, soul = {count = ilo?? soula, time = czas soula w ms}, effect = {id = numer efektu, time = czas efektu w ms}, text = {color = kolor napisu, text = "napis do 9 liter", time = czas napisu}}
},

Dodatkowe informacje:
1. W tabeli setItems mo?esz doda? niesko?czon? liczb? przedmiot?w.
2. W miejsca takie jak count, id, color w tabeli setBonus wpisuj?c 0 wy??czasz efekt ;)
3. Do tabeli mo?esz doda? niesko?czenie wiele rozmaitych set?w tworzonych z wielu item?w.
4. B?d? produkowa? jeszcze wi?cej mo?liwo?ci do ka?dego setu. To jest dopiero wersja 1.0.0.

Mam nadziej?, ?e skrypt si? spodoba :) Jest to jedna z moich bardzooo wielu prac.

Pozdrawiam adamsiq.

@edit
Dzi?ki Oskar za przypomnienie nie doda?em opisu co to robi :)

A wi?c je?li masz na sobie wszystkie przedmioty z setu to dostajesz dan? ilo?? many/soul/hp na sekund?, dodaje magiczny efekt (jak by aura) oraz je?li kto? chce to tekst. Z biegiem czasu dodam wi?cej funkcji do tego skryptu.

@ UPDATE !
Nowa wersja: 1.1.0
Poprawi?em jeden b??d kt?ry sprawia?, ?e je?li mia?e? np 2 przedmioty z setu 1 w bp i jeden na sobie to nie by?o efektu...

@ Praca
Aktualnie pracuj? nad now? wersj? ale wiecie szko?a itd... Ale w nowej wersji b?dzie mo?na ustawi? ka?dy kill, ilo?? many i hp ale nie regeneracje tylko zwi?keszenie o dan? ilo?? punkt?w oraz magic level...
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: System Set?w

Nie testowa?em, ale patrz?c na skrypt widz?, ?e maj?c za?o?one full set ro?nie nam mana/hp/soul czy co tam jeszcze mo?e rosn??.
Skrypt w sumie dobry, ale czy komukolwiek potrzebny? Mi osobi?cie si? nie przyda, ale na reputa zas?ugujesz.
 

Lukanio

Senior User
Joined
Jun 25, 2008
Messages
521
Reaction score
25
Odp: System Set?w

Dal bys rade dodac jakies inne dodatki do tych setow np: wiecej HP/MP w % , albo wiecej atakujesz? :p
 

luksonik

Advanced User
Joined
Apr 11, 2008
Messages
273
Reaction score
21
Odp: System Set?w

Tak to dopiero wersja beta, ?e tak powiem. B?d? stara? si? dodawa? coraz to wi?cej dodatk?w :).
Prosz? komentowa? i je?li kto? doda? poprzedni? wersje skryptu prosz? j? zmieni?.
 
Last edited:

orzeleagle122

Advanced User
Joined
May 18, 2010
Messages
449
Reaction score
16
Odp: System Set?w

moze zrobic tak ze jak ktos bedzie mial full seta to daje mu np, mlvl, czy jakis skill ?
 
Joined
Dec 15, 2010
Messages
41
Reaction score
1
Odp: System Set?w

Skrypt wed?ug mnie jest dobry lecz nie bardzo dobry ^^
poczekam na wy?sze wersje , mam nadziej? ?e b?dzie wi?cej funkcji :)
i na zach?t? rep
 
Status
Not open for further replies.
Top