What's new

Skrypty & Kody Pomoc - Upgrade System - 8.54

Status
Not open for further replies.

Nevereq

User
Joined
Aug 14, 2010
Messages
43
Reaction score
0
Witam, napisa?em w tym dziale z my?l?, ?e kto? pomo?e mi znale?? owy upgrade system:

Upgrade Rune dodaje w zale?no?ci od szcz??cia 1% do 15%
hp- ?ycia,
mp- many,
mlvl - magic levela
cas - club, axe & sword
shield- shielding
dist -distance
Na ka?dy item mo?na u?y? cztery krzyszta?y/ulepszacze.


Je?li poda?by skrypt na ten upgrade system, by?bym bardzo wdzi?czny. :)

System ukazuje na obrazku poni?ej:
2gt438y.png
 

TenTypSwir

NNSTORY.EU Developer
Joined
Jun 8, 2010
Messages
1,657
Reaction score
117
Odp: Pomoc - Upgrade System - 8.54

@@ Temat bardziej pod Request

Masz tu np taki od Gelia:
Code:
-- Upgrade system by Gelio v. 2
-- Dodane:
-- Szansa na zniszczenie przedmiotu
local znika = "tak"     -- Czy item ma znika? po upgrade (item upgraduj?cy)
local ileProcent = 10    -- O ile procent powi?ksza atrybuty czego?. Jak wyjdzie liczba rzeczywista to podnosi o tyle, ?eby by?a liczba ca?kowita.
local maksProcent = 0    -- Ile maksymalnie procent mo?e by? upgradowane. 0 - niesko?czono??
local zniszczenieProcent = 40     -- Ile procent szansy na zniszczenie przedmiotu. 0 - nie da si? zniszczy?
function onUse(cid, item, frompos, item2, topos)
if(item2.uid ~= 0) then
          local arm = getItemArmor(item2.uid)
          local def = getItemDefense(item2.uid)
          local atk = getItemAttack(item2.uid)
          local descr = ""
          local action = item2.actionid-100
          if(action < 0) then
                    action = 0
          end
          if(maksProcent > 0 and action >= maksProcent) then
                    doPlayerSendCancel(cid,"You can't upgrade it anymore.")
                    return TRUE
          end
          if(arm ~= 0 or def ~= 0 or atk ~= 0) then
                    if(znika == "tak") then
                              if(item.type > 1) then
                                        doChangeTypeItem(item.uid, item.type-1)
                              else
                                        doRemoveItem(item.uid,1)
                              end
                    end
                    if(zniszczenieProcent > 0) then
                              if(math.random(1,100) <= zniszczenieProcent) then
                                        doRemoveItem(item2.uid,1)
                                        doPlayerSendCancel(cid,"You have destroyed this item.")
                                        return TRUE
                              end
                    end
                    descr = "Values: "
                    if(arm ~= 0) then
                              descr = descr .."armor increased by ".. ileProcent+action .. " percents "
                              local ilePowieksza = math.ceil(arm * (ileProcent/100))
                              setItemArmor(item2.uid, arm+ilePowieksza)
                              doSetItemActionId(item2.uid,100+action+ileProcent)
                    end
                    if(def ~= 0) then
                              descr = descr .."defense increased by ".. ileProcent+action .." percents "
                              local ilePowieksza = math.ceil(def * (ileProcent/100))
                              setItemDefense(item2.uid, def+ilePowieksza)
                              doSetItemActionId(item2.uid,100+action+ileProcent)
                    end
                    if(atk ~= 0) then
                              descr = descr .."attack increased by ".. ileProcent+action .." percents "
                              local ilePowieksza = math.ceil(atk * (ileProcent/100))
                              setItemAttack(item2.uid, atk+ilePowieksza)
                              doSetItemActionId(item2.uid,100+action+ileProcent)
                    end
                    doSetItemSpecialDescription(item2.uid,descr)
                    doSendMagicEffect(topos,CONST_ME_MAGIC_GREEN)
          else
                    doPlayerSendCancel(cid,"You can't upgrade this.")
          end
          return TRUE
end
return FALSE
end
 

Nevereq

User
Joined
Aug 14, 2010
Messages
43
Reaction score
0
Odp: Pomoc - Upgrade System - 8.54

Dzi?ki majster, za odpowiedz, ale nie interesuje mnie zbytnio upgrade system Gelia. :/

Btw. Sp?jrz na film pewnego pana, kt?ry nakr?ci? ten o to skrypt ;p :
[video=youtube;XYLbg-ep9fw]http://www.youtube.com/watch?v=XYLbg-ep9fw[/video]​
 

Nevereq

User
Joined
Aug 14, 2010
Messages
43
Reaction score
0
Odp: Pomoc - Upgrade System - 8.54

No c??, po wielu pr?bach szukania w ko?cu uda?o mi si? znale??, ( nie chodzi mi o to co mi wys?a?e?), ale dobra. xD


Reput leci, za aktywno??! :D
 

Xordex11

Active User
Joined
Sep 20, 2012
Messages
137
Reaction score
0
Odp: Pomoc - Upgrade System - 8.54

Mozesz pdoac link, sam bym skozystal ;)
 
Status
Not open for further replies.
Top